generated-configure.sh revision 820:b59990653fb9
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
684JT_HOME
685JTREGEXE
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_update_version
992with_build_number
993with_user_release_suffix
994with_boot_jdk
995with_boot_jdk_jvmargs
996with_add_source_root
997with_override_source_root
998with_adds_and_overrides
999with_override_langtools
1000with_override_corba
1001with_override_jaxp
1002with_override_jaxws
1003with_override_hotspot
1004with_override_jdk
1005with_import_hotspot
1006with_msvcr_dll
1007with_dxsdk
1008with_dxsdk_lib
1009with_dxsdk_include
1010with_jtreg
1011with_extra_cflags
1012with_extra_cxxflags
1013with_extra_ldflags
1014enable_debug_symbols
1015enable_zip_debug_info
1016enable_macosx_runtime_support
1017with_x
1018with_cups
1019with_cups_include
1020with_freetype
1021with_alsa
1022with_alsa_include
1023with_alsa_lib
1024with_giflib
1025with_zlib
1026with_stdc__lib
1027with_num_cores
1028with_memory_size
1029with_jobs
1030with_sjavac_server_java
1031enable_sjavac
1032enable_precompiled_headers
1033enable_ccache
1034with_ccache_dir
1035'
1036      ac_precious_vars='build_alias
1037host_alias
1038target_alias
1039PKG_CONFIG
1040CC
1041CFLAGS
1042LDFLAGS
1043LIBS
1044CPPFLAGS
1045CXX
1046CXXFLAGS
1047CCC
1048OBJC
1049OBJCFLAGS
1050CPP
1051CXXCPP
1052XMKMF
1053FREETYPE2_CFLAGS
1054FREETYPE2_LIBS
1055ALSA_CFLAGS
1056ALSA_LIBS
1057LIBFFI_CFLAGS
1058LIBFFI_LIBS'
1059
1060
1061# Initialize some variables set by options.
1062ac_init_help=
1063ac_init_version=false
1064ac_unrecognized_opts=
1065ac_unrecognized_sep=
1066# The variables have the same names as the options, with
1067# dashes changed to underlines.
1068cache_file=/dev/null
1069exec_prefix=NONE
1070no_create=
1071no_recursion=
1072prefix=NONE
1073program_prefix=NONE
1074program_suffix=NONE
1075program_transform_name=s,x,x,
1076silent=
1077site=
1078srcdir=
1079verbose=
1080x_includes=NONE
1081x_libraries=NONE
1082
1083# Installation directory options.
1084# These are left unexpanded so users can "make install exec_prefix=/foo"
1085# and all the variables that are supposed to be based on exec_prefix
1086# by default will actually change.
1087# Use braces instead of parens because sh, perl, etc. also accept them.
1088# (The list follows the same order as the GNU Coding Standards.)
1089bindir='${exec_prefix}/bin'
1090sbindir='${exec_prefix}/sbin'
1091libexecdir='${exec_prefix}/libexec'
1092datarootdir='${prefix}/share'
1093datadir='${datarootdir}'
1094sysconfdir='${prefix}/etc'
1095sharedstatedir='${prefix}/com'
1096localstatedir='${prefix}/var'
1097includedir='${prefix}/include'
1098oldincludedir='/usr/include'
1099docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1100infodir='${datarootdir}/info'
1101htmldir='${docdir}'
1102dvidir='${docdir}'
1103pdfdir='${docdir}'
1104psdir='${docdir}'
1105libdir='${exec_prefix}/lib'
1106localedir='${datarootdir}/locale'
1107mandir='${datarootdir}/man'
1108
1109ac_prev=
1110ac_dashdash=
1111for ac_option
1112do
1113  # If the previous option needs an argument, assign it.
1114  if test -n "$ac_prev"; then
1115    eval $ac_prev=\$ac_option
1116    ac_prev=
1117    continue
1118  fi
1119
1120  case $ac_option in
1121  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1122  *=)   ac_optarg= ;;
1123  *)    ac_optarg=yes ;;
1124  esac
1125
1126  # Accept the important Cygnus configure options, so we can diagnose typos.
1127
1128  case $ac_dashdash$ac_option in
1129  --)
1130    ac_dashdash=yes ;;
1131
1132  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1133    ac_prev=bindir ;;
1134  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1135    bindir=$ac_optarg ;;
1136
1137  -build | --build | --buil | --bui | --bu)
1138    ac_prev=build_alias ;;
1139  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1140    build_alias=$ac_optarg ;;
1141
1142  -cache-file | --cache-file | --cache-fil | --cache-fi \
1143  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1144    ac_prev=cache_file ;;
1145  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1146  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1147    cache_file=$ac_optarg ;;
1148
1149  --config-cache | -C)
1150    cache_file=config.cache ;;
1151
1152  -datadir | --datadir | --datadi | --datad)
1153    ac_prev=datadir ;;
1154  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1155    datadir=$ac_optarg ;;
1156
1157  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1158  | --dataroo | --dataro | --datar)
1159    ac_prev=datarootdir ;;
1160  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1161  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1162    datarootdir=$ac_optarg ;;
1163
1164  -disable-* | --disable-*)
1165    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1166    # Reject names that are not valid shell variable names.
1167    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1168      as_fn_error $? "invalid feature name: $ac_useropt"
1169    ac_useropt_orig=$ac_useropt
1170    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171    case $ac_user_opts in
1172      *"
1173"enable_$ac_useropt"
1174"*) ;;
1175      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1176	 ac_unrecognized_sep=', ';;
1177    esac
1178    eval enable_$ac_useropt=no ;;
1179
1180  -docdir | --docdir | --docdi | --doc | --do)
1181    ac_prev=docdir ;;
1182  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1183    docdir=$ac_optarg ;;
1184
1185  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1186    ac_prev=dvidir ;;
1187  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1188    dvidir=$ac_optarg ;;
1189
1190  -enable-* | --enable-*)
1191    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1192    # Reject names that are not valid shell variable names.
1193    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1194      as_fn_error $? "invalid feature name: $ac_useropt"
1195    ac_useropt_orig=$ac_useropt
1196    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197    case $ac_user_opts in
1198      *"
1199"enable_$ac_useropt"
1200"*) ;;
1201      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1202	 ac_unrecognized_sep=', ';;
1203    esac
1204    eval enable_$ac_useropt=\$ac_optarg ;;
1205
1206  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1207  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1208  | --exec | --exe | --ex)
1209    ac_prev=exec_prefix ;;
1210  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1211  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1212  | --exec=* | --exe=* | --ex=*)
1213    exec_prefix=$ac_optarg ;;
1214
1215  -gas | --gas | --ga | --g)
1216    # Obsolete; use --with-gas.
1217    with_gas=yes ;;
1218
1219  -help | --help | --hel | --he | -h)
1220    ac_init_help=long ;;
1221  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1222    ac_init_help=recursive ;;
1223  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1224    ac_init_help=short ;;
1225
1226  -host | --host | --hos | --ho)
1227    ac_prev=host_alias ;;
1228  -host=* | --host=* | --hos=* | --ho=*)
1229    host_alias=$ac_optarg ;;
1230
1231  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1232    ac_prev=htmldir ;;
1233  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1234  | --ht=*)
1235    htmldir=$ac_optarg ;;
1236
1237  -includedir | --includedir | --includedi | --included | --include \
1238  | --includ | --inclu | --incl | --inc)
1239    ac_prev=includedir ;;
1240  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1241  | --includ=* | --inclu=* | --incl=* | --inc=*)
1242    includedir=$ac_optarg ;;
1243
1244  -infodir | --infodir | --infodi | --infod | --info | --inf)
1245    ac_prev=infodir ;;
1246  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1247    infodir=$ac_optarg ;;
1248
1249  -libdir | --libdir | --libdi | --libd)
1250    ac_prev=libdir ;;
1251  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1252    libdir=$ac_optarg ;;
1253
1254  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1255  | --libexe | --libex | --libe)
1256    ac_prev=libexecdir ;;
1257  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1258  | --libexe=* | --libex=* | --libe=*)
1259    libexecdir=$ac_optarg ;;
1260
1261  -localedir | --localedir | --localedi | --localed | --locale)
1262    ac_prev=localedir ;;
1263  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1264    localedir=$ac_optarg ;;
1265
1266  -localstatedir | --localstatedir | --localstatedi | --localstated \
1267  | --localstate | --localstat | --localsta | --localst | --locals)
1268    ac_prev=localstatedir ;;
1269  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1270  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1271    localstatedir=$ac_optarg ;;
1272
1273  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1274    ac_prev=mandir ;;
1275  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1276    mandir=$ac_optarg ;;
1277
1278  -nfp | --nfp | --nf)
1279    # Obsolete; use --without-fp.
1280    with_fp=no ;;
1281
1282  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1283  | --no-cr | --no-c | -n)
1284    no_create=yes ;;
1285
1286  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1287  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1288    no_recursion=yes ;;
1289
1290  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1291  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1292  | --oldin | --oldi | --old | --ol | --o)
1293    ac_prev=oldincludedir ;;
1294  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1295  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1296  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1297    oldincludedir=$ac_optarg ;;
1298
1299  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1300    ac_prev=prefix ;;
1301  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1302    prefix=$ac_optarg ;;
1303
1304  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1305  | --program-pre | --program-pr | --program-p)
1306    ac_prev=program_prefix ;;
1307  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1308  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1309    program_prefix=$ac_optarg ;;
1310
1311  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1312  | --program-suf | --program-su | --program-s)
1313    ac_prev=program_suffix ;;
1314  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1315  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1316    program_suffix=$ac_optarg ;;
1317
1318  -program-transform-name | --program-transform-name \
1319  | --program-transform-nam | --program-transform-na \
1320  | --program-transform-n | --program-transform- \
1321  | --program-transform | --program-transfor \
1322  | --program-transfo | --program-transf \
1323  | --program-trans | --program-tran \
1324  | --progr-tra | --program-tr | --program-t)
1325    ac_prev=program_transform_name ;;
1326  -program-transform-name=* | --program-transform-name=* \
1327  | --program-transform-nam=* | --program-transform-na=* \
1328  | --program-transform-n=* | --program-transform-=* \
1329  | --program-transform=* | --program-transfor=* \
1330  | --program-transfo=* | --program-transf=* \
1331  | --program-trans=* | --program-tran=* \
1332  | --progr-tra=* | --program-tr=* | --program-t=*)
1333    program_transform_name=$ac_optarg ;;
1334
1335  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1336    ac_prev=pdfdir ;;
1337  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1338    pdfdir=$ac_optarg ;;
1339
1340  -psdir | --psdir | --psdi | --psd | --ps)
1341    ac_prev=psdir ;;
1342  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1343    psdir=$ac_optarg ;;
1344
1345  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1346  | -silent | --silent | --silen | --sile | --sil)
1347    silent=yes ;;
1348
1349  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1350    ac_prev=sbindir ;;
1351  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1352  | --sbi=* | --sb=*)
1353    sbindir=$ac_optarg ;;
1354
1355  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1356  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1357  | --sharedst | --shareds | --shared | --share | --shar \
1358  | --sha | --sh)
1359    ac_prev=sharedstatedir ;;
1360  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1361  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1362  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1363  | --sha=* | --sh=*)
1364    sharedstatedir=$ac_optarg ;;
1365
1366  -site | --site | --sit)
1367    ac_prev=site ;;
1368  -site=* | --site=* | --sit=*)
1369    site=$ac_optarg ;;
1370
1371  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1372    ac_prev=srcdir ;;
1373  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1374    srcdir=$ac_optarg ;;
1375
1376  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1377  | --syscon | --sysco | --sysc | --sys | --sy)
1378    ac_prev=sysconfdir ;;
1379  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1380  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1381    sysconfdir=$ac_optarg ;;
1382
1383  -target | --target | --targe | --targ | --tar | --ta | --t)
1384    ac_prev=target_alias ;;
1385  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1386    target_alias=$ac_optarg ;;
1387
1388  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1389    verbose=yes ;;
1390
1391  -version | --version | --versio | --versi | --vers | -V)
1392    ac_init_version=: ;;
1393
1394  -with-* | --with-*)
1395    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1396    # Reject names that are not valid shell variable names.
1397    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1398      as_fn_error $? "invalid package name: $ac_useropt"
1399    ac_useropt_orig=$ac_useropt
1400    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1401    case $ac_user_opts in
1402      *"
1403"with_$ac_useropt"
1404"*) ;;
1405      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1406	 ac_unrecognized_sep=', ';;
1407    esac
1408    eval with_$ac_useropt=\$ac_optarg ;;
1409
1410  -without-* | --without-*)
1411    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1412    # Reject names that are not valid shell variable names.
1413    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1414      as_fn_error $? "invalid package name: $ac_useropt"
1415    ac_useropt_orig=$ac_useropt
1416    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1417    case $ac_user_opts in
1418      *"
1419"with_$ac_useropt"
1420"*) ;;
1421      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1422	 ac_unrecognized_sep=', ';;
1423    esac
1424    eval with_$ac_useropt=no ;;
1425
1426  --x)
1427    # Obsolete; use --with-x.
1428    with_x=yes ;;
1429
1430  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1431  | --x-incl | --x-inc | --x-in | --x-i)
1432    ac_prev=x_includes ;;
1433  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1434  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1435    x_includes=$ac_optarg ;;
1436
1437  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1438  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1439    ac_prev=x_libraries ;;
1440  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1441  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1442    x_libraries=$ac_optarg ;;
1443
1444  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1445Try \`$0 --help' for more information"
1446    ;;
1447
1448  *=*)
1449    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1450    # Reject names that are not valid shell variable names.
1451    case $ac_envvar in #(
1452      '' | [0-9]* | *[!_$as_cr_alnum]* )
1453      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1454    esac
1455    eval $ac_envvar=\$ac_optarg
1456    export $ac_envvar ;;
1457
1458  *)
1459    # FIXME: should be removed in autoconf 3.0.
1460    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1461    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1462      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1463    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1464    ;;
1465
1466  esac
1467done
1468
1469if test -n "$ac_prev"; then
1470  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1471  as_fn_error $? "missing argument to $ac_option"
1472fi
1473
1474if test -n "$ac_unrecognized_opts"; then
1475  case $enable_option_checking in
1476    no) ;;
1477    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1478    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1479  esac
1480fi
1481
1482# Check all directory arguments for consistency.
1483for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1484		datadir sysconfdir sharedstatedir localstatedir includedir \
1485		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1486		libdir localedir mandir
1487do
1488  eval ac_val=\$$ac_var
1489  # Remove trailing slashes.
1490  case $ac_val in
1491    */ )
1492      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1493      eval $ac_var=\$ac_val;;
1494  esac
1495  # Be sure to have absolute directory names.
1496  case $ac_val in
1497    [\\/$]* | ?:[\\/]* )  continue;;
1498    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1499  esac
1500  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1501done
1502
1503# There might be people who depend on the old broken behavior: `$host'
1504# used to hold the argument of --host etc.
1505# FIXME: To remove some day.
1506build=$build_alias
1507host=$host_alias
1508target=$target_alias
1509
1510# FIXME: To remove some day.
1511if test "x$host_alias" != x; then
1512  if test "x$build_alias" = x; then
1513    cross_compiling=maybe
1514    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1515    If a cross compiler is detected then cross compile mode will be used" >&2
1516  elif test "x$build_alias" != "x$host_alias"; then
1517    cross_compiling=yes
1518  fi
1519fi
1520
1521ac_tool_prefix=
1522test -n "$host_alias" && ac_tool_prefix=$host_alias-
1523
1524test "$silent" = yes && exec 6>/dev/null
1525
1526
1527ac_pwd=`pwd` && test -n "$ac_pwd" &&
1528ac_ls_di=`ls -di .` &&
1529ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1530  as_fn_error $? "working directory cannot be determined"
1531test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1532  as_fn_error $? "pwd does not report name of working directory"
1533
1534
1535# Find the source files, if location was not specified.
1536if test -z "$srcdir"; then
1537  ac_srcdir_defaulted=yes
1538  # Try the directory containing this script, then the parent directory.
1539  ac_confdir=`$as_dirname -- "$as_myself" ||
1540$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1541	 X"$as_myself" : 'X\(//\)[^/]' \| \
1542	 X"$as_myself" : 'X\(//\)$' \| \
1543	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1544$as_echo X"$as_myself" |
1545    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1546	    s//\1/
1547	    q
1548	  }
1549	  /^X\(\/\/\)[^/].*/{
1550	    s//\1/
1551	    q
1552	  }
1553	  /^X\(\/\/\)$/{
1554	    s//\1/
1555	    q
1556	  }
1557	  /^X\(\/\).*/{
1558	    s//\1/
1559	    q
1560	  }
1561	  s/.*/./; q'`
1562  srcdir=$ac_confdir
1563  if test ! -r "$srcdir/$ac_unique_file"; then
1564    srcdir=..
1565  fi
1566else
1567  ac_srcdir_defaulted=no
1568fi
1569if test ! -r "$srcdir/$ac_unique_file"; then
1570  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1571  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1572fi
1573ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1574ac_abs_confdir=`(
1575	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1576	pwd)`
1577# When building in place, set srcdir=.
1578if test "$ac_abs_confdir" = "$ac_pwd"; then
1579  srcdir=.
1580fi
1581# Remove unnecessary trailing slashes from srcdir.
1582# Double slashes in file names in object file debugging info
1583# mess up M-x gdb in Emacs.
1584case $srcdir in
1585*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1586esac
1587for ac_var in $ac_precious_vars; do
1588  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1589  eval ac_env_${ac_var}_value=\$${ac_var}
1590  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1591  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1592done
1593
1594#
1595# Report the --help message.
1596#
1597if test "$ac_init_help" = "long"; then
1598  # Omit some internal or obsolete options to make the list less imposing.
1599  # This message is too long to be a string in the A/UX 3.1 sh.
1600  cat <<_ACEOF
1601\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1602
1603Usage: $0 [OPTION]... [VAR=VALUE]...
1604
1605To assign environment variables (e.g., CC, CFLAGS...), specify them as
1606VAR=VALUE.  See below for descriptions of some of the useful variables.
1607
1608Defaults for the options are specified in brackets.
1609
1610Configuration:
1611  -h, --help              display this help and exit
1612      --help=short        display options specific to this package
1613      --help=recursive    display the short help of all the included packages
1614  -V, --version           display version information and exit
1615  -q, --quiet, --silent   do not print \`checking ...' messages
1616      --cache-file=FILE   cache test results in FILE [disabled]
1617  -C, --config-cache      alias for \`--cache-file=config.cache'
1618  -n, --no-create         do not create output files
1619      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1620
1621Installation directories:
1622  --prefix=PREFIX         install architecture-independent files in PREFIX
1623                          [$ac_default_prefix]
1624  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1625                          [PREFIX]
1626
1627By default, \`make install' will install all the files in
1628\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1629an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1630for instance \`--prefix=\$HOME'.
1631
1632For better control, use the options below.
1633
1634Fine tuning of the installation directories:
1635  --bindir=DIR            user executables [EPREFIX/bin]
1636  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1637  --libexecdir=DIR        program executables [EPREFIX/libexec]
1638  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1639  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1640  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1641  --libdir=DIR            object code libraries [EPREFIX/lib]
1642  --includedir=DIR        C header files [PREFIX/include]
1643  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1644  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1645  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1646  --infodir=DIR           info documentation [DATAROOTDIR/info]
1647  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1648  --mandir=DIR            man documentation [DATAROOTDIR/man]
1649  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1650  --htmldir=DIR           html documentation [DOCDIR]
1651  --dvidir=DIR            dvi documentation [DOCDIR]
1652  --pdfdir=DIR            pdf documentation [DOCDIR]
1653  --psdir=DIR             ps documentation [DOCDIR]
1654_ACEOF
1655
1656  cat <<\_ACEOF
1657
1658X features:
1659  --x-includes=DIR    X include files are in DIR
1660  --x-libraries=DIR   X library files are in DIR
1661
1662System types:
1663  --build=BUILD     configure for building on BUILD [guessed]
1664  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1665  --target=TARGET   configure for building compilers for TARGET [HOST]
1666_ACEOF
1667fi
1668
1669if test -n "$ac_init_help"; then
1670  case $ac_init_help in
1671     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1672   esac
1673  cat <<\_ACEOF
1674
1675Optional Features:
1676  --disable-option-checking  ignore unrecognized --enable/--with options
1677  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1678  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1679  --enable-openjdk-only   suppress building custom source even if present
1680                          [disabled]
1681  --enable-debug          set the debug level to fastdebug (shorthand for
1682                          --with-debug-level=fastdebug) [disabled]
1683  --disable-headful       disable building headful support (graphical UI
1684                          support) [enabled]
1685  --enable-hotspot-test-in-build
1686                          run the Queens test after Hotspot build [disabled]
1687  --enable-unlimited-crypto
1688                          Enable unlimited crypto policy [disabled]
1689  --disable-debug-symbols disable generation of debug symbols [enabled]
1690  --disable-zip-debug-info
1691                          disable zipping of debug-info files [enabled]
1692  --disable-macosx-runtime-support
1693                          disable the use of MacOSX Java runtime support
1694                          framework [enabled]
1695  --enable-sjavac         use sjavac to do fast incremental compiles
1696                          [disabled]
1697  --disable-precompiled-headers
1698                          disable using precompiled headers when compiling C++
1699                          [enabled]
1700  --disable-ccache        disable using ccache to speed up recompilations
1701                          [enabled]
1702
1703Optional Packages:
1704  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1705  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1706  --with-custom-make-dir  use this directory for custom build/make files
1707  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1708                          support it), e.g. --with-target-bits=32 [guessed]
1709  --with-sys-root         pass this sys-root to the compilers and tools (for
1710                          cross-compiling)
1711  --with-tools-dir        search this directory for compilers and tools (for
1712                          cross-compiling)
1713  --with-devkit           use this directory as base for tools-dir and
1714                          sys-root (for cross-compiling)
1715  --with-jdk-variant      JDK variant to build (normal) [normal]
1716  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1717                          client, minimal1, kernel, zero, zeroshark) [server]
1718  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1719                          [release]
1720  --with-conf-name        use this as the name of the configuration [generated
1721                          from important configuration options]
1722  --with-builddeps-conf   use this configuration file for the builddeps
1723  --with-builddeps-server download and use build dependencies from this server
1724                          url
1725  --with-builddeps-dir    store downloaded build dependencies here
1726                          [/localhome/builddeps]
1727  --with-builddeps-group  chgrp the downloaded build dependencies to this
1728                          group
1729  --with-cacerts-file     specify alternative cacerts file
1730  --with-milestone        Set milestone value for build [internal]
1731  --with-update-version   Set update version value for build [b00]
1732  --with-build-number     Set build number value for build [b00]
1733  --with-user-release-suffix
1734                          Add a custom string to the version string if build
1735                          number isn't set.[username_builddateb00]
1736  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1737  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1738                          invocations of the Boot JDK, overriding the default
1739                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1740                          -enableassertions"
1741  --with-add-source-root  for each and every source directory, look in this
1742                          additional source root for the same directory; if it
1743                          exists and have files in it, include it in the build
1744  --with-override-source-root
1745                          for each and every source directory, look in this
1746                          override source root for the same directory; if it
1747                          exists, use that directory instead and ignore the
1748                          directory in the original source root
1749  --with-adds-and-overrides
1750                          use the subdirs 'adds' and 'overrides' in the
1751                          specified directory as add-source-root and
1752                          override-source-root
1753  --with-override-langtools
1754                          use this langtools dir for the build
1755  --with-override-corba   use this corba dir for the build
1756  --with-override-jaxp    use this jaxp dir for the build
1757  --with-override-jaxws   use this jaxws dir for the build
1758  --with-override-hotspot use this hotspot dir for the build
1759  --with-override-jdk     use this jdk dir for the build
1760  --with-import-hotspot   import hotspot binaries from this jdk image or
1761                          hotspot build dist dir instead of building from
1762                          source
1763  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1764                          only) [probed]
1765  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1766  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1767                          [probed]
1768  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1769                          [probed]
1770  --with-jtreg            Regression Test Harness [probed]
1771  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1772  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1773  --with-extra-ldflags    extra flags to be used when linking jdk
1774  --with-x                use the X Window System
1775  --with-cups             specify prefix directory for the cups package
1776                          (expecting the headers under PATH/include)
1777  --with-cups-include     specify directory for the cups include files
1778  --with-freetype         specify prefix directory for the freetype2 package
1779                          (expecting the libraries under PATH/lib and the
1780                          headers under PATH/include)
1781  --with-alsa             specify prefix directory for the alsa package
1782                          (expecting the libraries under PATH/lib and the
1783                          headers under PATH/include)
1784  --with-alsa-include     specify directory for the alsa include files
1785  --with-alsa-lib         specify directory for the alsa library
1786  --with-giflib           use giflib from build system or OpenJDK source
1787                          (system, bundled) [bundled]
1788  --with-zlib             use zlib from build system or OpenJDK source
1789                          (system, bundled) [bundled]
1790  --with-stdc++lib=<static>,<dynamic>,<default>
1791                          force linking of the C++ runtime on Linux to either
1792                          static or dynamic, default is static with dynamic as
1793                          fallback
1794  --with-num-cores        number of cores in the build system, e.g.
1795                          --with-num-cores=8 [probed]
1796  --with-memory-size      memory (in MB) available in the build system, e.g.
1797                          --with-memory-size=1024 [probed]
1798  --with-jobs             number of parallel jobs to let make run [calculated
1799                          based on cores and memory]
1800  --with-sjavac-server-java
1801                          use this java binary for running the sjavac
1802                          background server [Boot JDK java]
1803  --with-ccache-dir       where to store ccache files [~/.ccache]
1804
1805Some influential environment variables:
1806  PKG_CONFIG  path to pkg-config utility
1807  CC          C compiler command
1808  CFLAGS      C compiler flags
1809  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1810              nonstandard directory <lib dir>
1811  LIBS        libraries to pass to the linker, e.g. -l<library>
1812  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1813              you have headers in a nonstandard directory <include dir>
1814  CXX         C++ compiler command
1815  CXXFLAGS    C++ compiler flags
1816  OBJC        Objective C compiler command
1817  OBJCFLAGS   Objective C compiler flags
1818  CPP         C preprocessor
1819  CXXCPP      C++ preprocessor
1820  XMKMF       Path to xmkmf, Makefile generator for X Window System
1821  FREETYPE2_CFLAGS
1822              C compiler flags for FREETYPE2, overriding pkg-config
1823  FREETYPE2_LIBS
1824              linker flags for FREETYPE2, overriding pkg-config
1825  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1826  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1827  LIBFFI_CFLAGS
1828              C compiler flags for LIBFFI, overriding pkg-config
1829  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1830
1831Use these variables to override the choices made by `configure' or to help
1832it to find libraries and programs with nonstandard names/locations.
1833
1834Report bugs to <build-dev@openjdk.java.net>.
1835OpenJDK home page: <http://openjdk.java.net>.
1836_ACEOF
1837ac_status=$?
1838fi
1839
1840if test "$ac_init_help" = "recursive"; then
1841  # If there are subdirs, report their specific --help.
1842  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1843    test -d "$ac_dir" ||
1844      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1845      continue
1846    ac_builddir=.
1847
1848case "$ac_dir" in
1849.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1850*)
1851  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1852  # A ".." for each directory in $ac_dir_suffix.
1853  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1854  case $ac_top_builddir_sub in
1855  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1856  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1857  esac ;;
1858esac
1859ac_abs_top_builddir=$ac_pwd
1860ac_abs_builddir=$ac_pwd$ac_dir_suffix
1861# for backward compatibility:
1862ac_top_builddir=$ac_top_build_prefix
1863
1864case $srcdir in
1865  .)  # We are building in place.
1866    ac_srcdir=.
1867    ac_top_srcdir=$ac_top_builddir_sub
1868    ac_abs_top_srcdir=$ac_pwd ;;
1869  [\\/]* | ?:[\\/]* )  # Absolute name.
1870    ac_srcdir=$srcdir$ac_dir_suffix;
1871    ac_top_srcdir=$srcdir
1872    ac_abs_top_srcdir=$srcdir ;;
1873  *) # Relative name.
1874    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1875    ac_top_srcdir=$ac_top_build_prefix$srcdir
1876    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1877esac
1878ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1879
1880    cd "$ac_dir" || { ac_status=$?; continue; }
1881    # Check for guested configure.
1882    if test -f "$ac_srcdir/configure.gnu"; then
1883      echo &&
1884      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1885    elif test -f "$ac_srcdir/configure"; then
1886      echo &&
1887      $SHELL "$ac_srcdir/configure" --help=recursive
1888    else
1889      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1890    fi || ac_status=$?
1891    cd "$ac_pwd" || { ac_status=$?; break; }
1892  done
1893fi
1894
1895test -n "$ac_init_help" && exit $ac_status
1896if $ac_init_version; then
1897  cat <<\_ACEOF
1898OpenJDK configure jdk8
1899generated by GNU Autoconf 2.67
1900
1901Copyright (C) 2010 Free Software Foundation, Inc.
1902This configure script is free software; the Free Software Foundation
1903gives unlimited permission to copy, distribute and modify it.
1904_ACEOF
1905  exit
1906fi
1907
1908## ------------------------ ##
1909## Autoconf initialization. ##
1910## ------------------------ ##
1911
1912# ac_fn_c_try_compile LINENO
1913# --------------------------
1914# Try to compile conftest.$ac_ext, and return whether this succeeded.
1915ac_fn_c_try_compile ()
1916{
1917  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918  rm -f conftest.$ac_objext
1919  if { { ac_try="$ac_compile"
1920case "(($ac_try" in
1921  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1922  *) ac_try_echo=$ac_try;;
1923esac
1924eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1925$as_echo "$ac_try_echo"; } >&5
1926  (eval "$ac_compile") 2>conftest.err
1927  ac_status=$?
1928  if test -s conftest.err; then
1929    grep -v '^ *+' conftest.err >conftest.er1
1930    cat conftest.er1 >&5
1931    mv -f conftest.er1 conftest.err
1932  fi
1933  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1934  test $ac_status = 0; } && {
1935	 test -z "$ac_c_werror_flag" ||
1936	 test ! -s conftest.err
1937       } && test -s conftest.$ac_objext; then :
1938  ac_retval=0
1939else
1940  $as_echo "$as_me: failed program was:" >&5
1941sed 's/^/| /' conftest.$ac_ext >&5
1942
1943	ac_retval=1
1944fi
1945  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1946  as_fn_set_status $ac_retval
1947
1948} # ac_fn_c_try_compile
1949
1950# ac_fn_cxx_try_compile LINENO
1951# ----------------------------
1952# Try to compile conftest.$ac_ext, and return whether this succeeded.
1953ac_fn_cxx_try_compile ()
1954{
1955  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956  rm -f conftest.$ac_objext
1957  if { { ac_try="$ac_compile"
1958case "(($ac_try" in
1959  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960  *) ac_try_echo=$ac_try;;
1961esac
1962eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963$as_echo "$ac_try_echo"; } >&5
1964  (eval "$ac_compile") 2>conftest.err
1965  ac_status=$?
1966  if test -s conftest.err; then
1967    grep -v '^ *+' conftest.err >conftest.er1
1968    cat conftest.er1 >&5
1969    mv -f conftest.er1 conftest.err
1970  fi
1971  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1972  test $ac_status = 0; } && {
1973	 test -z "$ac_cxx_werror_flag" ||
1974	 test ! -s conftest.err
1975       } && test -s conftest.$ac_objext; then :
1976  ac_retval=0
1977else
1978  $as_echo "$as_me: failed program was:" >&5
1979sed 's/^/| /' conftest.$ac_ext >&5
1980
1981	ac_retval=1
1982fi
1983  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984  as_fn_set_status $ac_retval
1985
1986} # ac_fn_cxx_try_compile
1987
1988# ac_fn_objc_try_compile LINENO
1989# -----------------------------
1990# Try to compile conftest.$ac_ext, and return whether this succeeded.
1991ac_fn_objc_try_compile ()
1992{
1993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994  rm -f conftest.$ac_objext
1995  if { { ac_try="$ac_compile"
1996case "(($ac_try" in
1997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998  *) ac_try_echo=$ac_try;;
1999esac
2000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001$as_echo "$ac_try_echo"; } >&5
2002  (eval "$ac_compile") 2>conftest.err
2003  ac_status=$?
2004  if test -s conftest.err; then
2005    grep -v '^ *+' conftest.err >conftest.er1
2006    cat conftest.er1 >&5
2007    mv -f conftest.er1 conftest.err
2008  fi
2009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010  test $ac_status = 0; } && {
2011	 test -z "$ac_objc_werror_flag" ||
2012	 test ! -s conftest.err
2013       } && test -s conftest.$ac_objext; then :
2014  ac_retval=0
2015else
2016  $as_echo "$as_me: failed program was:" >&5
2017sed 's/^/| /' conftest.$ac_ext >&5
2018
2019	ac_retval=1
2020fi
2021  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2022  as_fn_set_status $ac_retval
2023
2024} # ac_fn_objc_try_compile
2025
2026# ac_fn_c_try_cpp LINENO
2027# ----------------------
2028# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2029ac_fn_c_try_cpp ()
2030{
2031  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032  if { { ac_try="$ac_cpp conftest.$ac_ext"
2033case "(($ac_try" in
2034  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035  *) ac_try_echo=$ac_try;;
2036esac
2037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038$as_echo "$ac_try_echo"; } >&5
2039  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2040  ac_status=$?
2041  if test -s conftest.err; then
2042    grep -v '^ *+' conftest.err >conftest.er1
2043    cat conftest.er1 >&5
2044    mv -f conftest.er1 conftest.err
2045  fi
2046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047  test $ac_status = 0; } > conftest.i && {
2048	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2049	 test ! -s conftest.err
2050       }; then :
2051  ac_retval=0
2052else
2053  $as_echo "$as_me: failed program was:" >&5
2054sed 's/^/| /' conftest.$ac_ext >&5
2055
2056    ac_retval=1
2057fi
2058  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2059  as_fn_set_status $ac_retval
2060
2061} # ac_fn_c_try_cpp
2062
2063# ac_fn_cxx_try_cpp LINENO
2064# ------------------------
2065# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2066ac_fn_cxx_try_cpp ()
2067{
2068  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069  if { { ac_try="$ac_cpp conftest.$ac_ext"
2070case "(($ac_try" in
2071  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2072  *) ac_try_echo=$ac_try;;
2073esac
2074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2075$as_echo "$ac_try_echo"; } >&5
2076  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2077  ac_status=$?
2078  if test -s conftest.err; then
2079    grep -v '^ *+' conftest.err >conftest.er1
2080    cat conftest.er1 >&5
2081    mv -f conftest.er1 conftest.err
2082  fi
2083  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2084  test $ac_status = 0; } > conftest.i && {
2085	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2086	 test ! -s conftest.err
2087       }; then :
2088  ac_retval=0
2089else
2090  $as_echo "$as_me: failed program was:" >&5
2091sed 's/^/| /' conftest.$ac_ext >&5
2092
2093    ac_retval=1
2094fi
2095  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2096  as_fn_set_status $ac_retval
2097
2098} # ac_fn_cxx_try_cpp
2099
2100# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2101# ---------------------------------------------------------
2102# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2103# the include files in INCLUDES and setting the cache variable VAR
2104# accordingly.
2105ac_fn_cxx_check_header_mongrel ()
2106{
2107  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2108  if eval "test \"\${$3+set}\"" = set; then :
2109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2110$as_echo_n "checking for $2... " >&6; }
2111if eval "test \"\${$3+set}\"" = set; then :
2112  $as_echo_n "(cached) " >&6
2113fi
2114eval ac_res=\$$3
2115	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2116$as_echo "$ac_res" >&6; }
2117else
2118  # Is the header compilable?
2119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2120$as_echo_n "checking $2 usability... " >&6; }
2121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h.  */
2123$4
2124#include <$2>
2125_ACEOF
2126if ac_fn_cxx_try_compile "$LINENO"; then :
2127  ac_header_compiler=yes
2128else
2129  ac_header_compiler=no
2130fi
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2133$as_echo "$ac_header_compiler" >&6; }
2134
2135# Is the header present?
2136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2137$as_echo_n "checking $2 presence... " >&6; }
2138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h.  */
2140#include <$2>
2141_ACEOF
2142if ac_fn_cxx_try_cpp "$LINENO"; then :
2143  ac_header_preproc=yes
2144else
2145  ac_header_preproc=no
2146fi
2147rm -f conftest.err conftest.i conftest.$ac_ext
2148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2149$as_echo "$ac_header_preproc" >&6; }
2150
2151# So?  What about this header?
2152case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2153  yes:no: )
2154    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2155$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2156    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2157$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2158    ;;
2159  no:yes:* )
2160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2161$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2163$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2164    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2165$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2166    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2167$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2168    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2169$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2170( $as_echo "## ----------------------------------------- ##
2171## Report this to build-dev@openjdk.java.net ##
2172## ----------------------------------------- ##"
2173     ) | sed "s/^/$as_me: WARNING:     /" >&2
2174    ;;
2175esac
2176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
2178if eval "test \"\${$3+set}\"" = set; then :
2179  $as_echo_n "(cached) " >&6
2180else
2181  eval "$3=\$ac_header_compiler"
2182fi
2183eval ac_res=\$$3
2184	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2185$as_echo "$ac_res" >&6; }
2186fi
2187  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2188
2189} # ac_fn_cxx_check_header_mongrel
2190
2191# ac_fn_cxx_try_run LINENO
2192# ------------------------
2193# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2194# that executables *can* be run.
2195ac_fn_cxx_try_run ()
2196{
2197  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198  if { { ac_try="$ac_link"
2199case "(($ac_try" in
2200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201  *) ac_try_echo=$ac_try;;
2202esac
2203eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204$as_echo "$ac_try_echo"; } >&5
2205  (eval "$ac_link") 2>&5
2206  ac_status=$?
2207  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2208  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2209  { { case "(($ac_try" in
2210  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2211  *) ac_try_echo=$ac_try;;
2212esac
2213eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2214$as_echo "$ac_try_echo"; } >&5
2215  (eval "$ac_try") 2>&5
2216  ac_status=$?
2217  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2218  test $ac_status = 0; }; }; then :
2219  ac_retval=0
2220else
2221  $as_echo "$as_me: program exited with status $ac_status" >&5
2222       $as_echo "$as_me: failed program was:" >&5
2223sed 's/^/| /' conftest.$ac_ext >&5
2224
2225       ac_retval=$ac_status
2226fi
2227  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2228  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229  as_fn_set_status $ac_retval
2230
2231} # ac_fn_cxx_try_run
2232
2233# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2234# ---------------------------------------------------------
2235# Tests whether HEADER exists and can be compiled using the include files in
2236# INCLUDES, setting the cache variable VAR accordingly.
2237ac_fn_cxx_check_header_compile ()
2238{
2239  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2241$as_echo_n "checking for $2... " >&6; }
2242if eval "test \"\${$3+set}\"" = set; then :
2243  $as_echo_n "(cached) " >&6
2244else
2245  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h.  */
2247$4
2248#include <$2>
2249_ACEOF
2250if ac_fn_cxx_try_compile "$LINENO"; then :
2251  eval "$3=yes"
2252else
2253  eval "$3=no"
2254fi
2255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2256fi
2257eval ac_res=\$$3
2258	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2259$as_echo "$ac_res" >&6; }
2260  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2261
2262} # ac_fn_cxx_check_header_compile
2263
2264# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2265# ----------------------------------------------
2266# Tries to find the compile-time value of EXPR in a program that includes
2267# INCLUDES, setting VAR accordingly. Returns whether the value could be
2268# computed
2269ac_fn_cxx_compute_int ()
2270{
2271  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272  if test "$cross_compiling" = yes; then
2273    # Depending upon the size, compute the lo and hi bounds.
2274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h.  */
2276$4
2277int
2278main ()
2279{
2280static int test_array [1 - 2 * !(($2) >= 0)];
2281test_array [0] = 0
2282
2283  ;
2284  return 0;
2285}
2286_ACEOF
2287if ac_fn_cxx_try_compile "$LINENO"; then :
2288  ac_lo=0 ac_mid=0
2289  while :; do
2290    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h.  */
2292$4
2293int
2294main ()
2295{
2296static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2297test_array [0] = 0
2298
2299  ;
2300  return 0;
2301}
2302_ACEOF
2303if ac_fn_cxx_try_compile "$LINENO"; then :
2304  ac_hi=$ac_mid; break
2305else
2306  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2307			if test $ac_lo -le $ac_mid; then
2308			  ac_lo= ac_hi=
2309			  break
2310			fi
2311			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2312fi
2313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314  done
2315else
2316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h.  */
2318$4
2319int
2320main ()
2321{
2322static int test_array [1 - 2 * !(($2) < 0)];
2323test_array [0] = 0
2324
2325  ;
2326  return 0;
2327}
2328_ACEOF
2329if ac_fn_cxx_try_compile "$LINENO"; then :
2330  ac_hi=-1 ac_mid=-1
2331  while :; do
2332    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333/* end confdefs.h.  */
2334$4
2335int
2336main ()
2337{
2338static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2339test_array [0] = 0
2340
2341  ;
2342  return 0;
2343}
2344_ACEOF
2345if ac_fn_cxx_try_compile "$LINENO"; then :
2346  ac_lo=$ac_mid; break
2347else
2348  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2349			if test $ac_mid -le $ac_hi; then
2350			  ac_lo= ac_hi=
2351			  break
2352			fi
2353			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2354fi
2355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356  done
2357else
2358  ac_lo= ac_hi=
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363# Binary search between lo and hi bounds.
2364while test "x$ac_lo" != "x$ac_hi"; do
2365  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367/* end confdefs.h.  */
2368$4
2369int
2370main ()
2371{
2372static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2373test_array [0] = 0
2374
2375  ;
2376  return 0;
2377}
2378_ACEOF
2379if ac_fn_cxx_try_compile "$LINENO"; then :
2380  ac_hi=$ac_mid
2381else
2382  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2383fi
2384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2385done
2386case $ac_lo in #((
2387?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2388'') ac_retval=1 ;;
2389esac
2390  else
2391    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h.  */
2393$4
2394static long int longval () { return $2; }
2395static unsigned long int ulongval () { return $2; }
2396#include <stdio.h>
2397#include <stdlib.h>
2398int
2399main ()
2400{
2401
2402  FILE *f = fopen ("conftest.val", "w");
2403  if (! f)
2404    return 1;
2405  if (($2) < 0)
2406    {
2407      long int i = longval ();
2408      if (i != ($2))
2409	return 1;
2410      fprintf (f, "%ld", i);
2411    }
2412  else
2413    {
2414      unsigned long int i = ulongval ();
2415      if (i != ($2))
2416	return 1;
2417      fprintf (f, "%lu", i);
2418    }
2419  /* Do not output a trailing newline, as this causes \r\n confusion
2420     on some platforms.  */
2421  return ferror (f) || fclose (f) != 0;
2422
2423  ;
2424  return 0;
2425}
2426_ACEOF
2427if ac_fn_cxx_try_run "$LINENO"; then :
2428  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2429else
2430  ac_retval=1
2431fi
2432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2433  conftest.$ac_objext conftest.beam conftest.$ac_ext
2434rm -f conftest.val
2435
2436  fi
2437  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2438  as_fn_set_status $ac_retval
2439
2440} # ac_fn_cxx_compute_int
2441
2442# ac_fn_cxx_try_link LINENO
2443# -------------------------
2444# Try to link conftest.$ac_ext, and return whether this succeeded.
2445ac_fn_cxx_try_link ()
2446{
2447  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2448  rm -f conftest.$ac_objext conftest$ac_exeext
2449  if { { ac_try="$ac_link"
2450case "(($ac_try" in
2451  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2452  *) ac_try_echo=$ac_try;;
2453esac
2454eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2455$as_echo "$ac_try_echo"; } >&5
2456  (eval "$ac_link") 2>conftest.err
2457  ac_status=$?
2458  if test -s conftest.err; then
2459    grep -v '^ *+' conftest.err >conftest.er1
2460    cat conftest.er1 >&5
2461    mv -f conftest.er1 conftest.err
2462  fi
2463  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2464  test $ac_status = 0; } && {
2465	 test -z "$ac_cxx_werror_flag" ||
2466	 test ! -s conftest.err
2467       } && test -s conftest$ac_exeext && {
2468	 test "$cross_compiling" = yes ||
2469	 $as_test_x conftest$ac_exeext
2470       }; then :
2471  ac_retval=0
2472else
2473  $as_echo "$as_me: failed program was:" >&5
2474sed 's/^/| /' conftest.$ac_ext >&5
2475
2476	ac_retval=1
2477fi
2478  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2479  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2480  # interfere with the next link command; also delete a directory that is
2481  # left behind by Apple's compiler.  We do this before executing the actions.
2482  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2483  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2484  as_fn_set_status $ac_retval
2485
2486} # ac_fn_cxx_try_link
2487
2488# ac_fn_cxx_check_func LINENO FUNC VAR
2489# ------------------------------------
2490# Tests whether FUNC exists, setting the cache variable VAR accordingly
2491ac_fn_cxx_check_func ()
2492{
2493  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2495$as_echo_n "checking for $2... " >&6; }
2496if eval "test \"\${$3+set}\"" = set; then :
2497  $as_echo_n "(cached) " >&6
2498else
2499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2500/* end confdefs.h.  */
2501/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2502   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2503#define $2 innocuous_$2
2504
2505/* System header to define __stub macros and hopefully few prototypes,
2506    which can conflict with char $2 (); below.
2507    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2508    <limits.h> exists even on freestanding compilers.  */
2509
2510#ifdef __STDC__
2511# include <limits.h>
2512#else
2513# include <assert.h>
2514#endif
2515
2516#undef $2
2517
2518/* Override any GCC internal prototype to avoid an error.
2519   Use char because int might match the return type of a GCC
2520   builtin and then its argument prototype would still apply.  */
2521#ifdef __cplusplus
2522extern "C"
2523#endif
2524char $2 ();
2525/* The GNU C library defines this for functions which it implements
2526    to always fail with ENOSYS.  Some functions are actually named
2527    something starting with __ and the normal name is an alias.  */
2528#if defined __stub_$2 || defined __stub___$2
2529choke me
2530#endif
2531
2532int
2533main ()
2534{
2535return $2 ();
2536  ;
2537  return 0;
2538}
2539_ACEOF
2540if ac_fn_cxx_try_link "$LINENO"; then :
2541  eval "$3=yes"
2542else
2543  eval "$3=no"
2544fi
2545rm -f core conftest.err conftest.$ac_objext \
2546    conftest$ac_exeext conftest.$ac_ext
2547fi
2548eval ac_res=\$$3
2549	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2550$as_echo "$ac_res" >&6; }
2551  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2552
2553} # ac_fn_cxx_check_func
2554
2555# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2556# -------------------------------------------------------
2557# Tests whether HEADER exists and can be compiled using the include files in
2558# INCLUDES, setting the cache variable VAR accordingly.
2559ac_fn_c_check_header_compile ()
2560{
2561  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2563$as_echo_n "checking for $2... " >&6; }
2564if eval "test \"\${$3+set}\"" = set; then :
2565  $as_echo_n "(cached) " >&6
2566else
2567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2568/* end confdefs.h.  */
2569$4
2570#include <$2>
2571_ACEOF
2572if ac_fn_c_try_compile "$LINENO"; then :
2573  eval "$3=yes"
2574else
2575  eval "$3=no"
2576fi
2577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2578fi
2579eval ac_res=\$$3
2580	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2581$as_echo "$ac_res" >&6; }
2582  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2583
2584} # ac_fn_c_check_header_compile
2585cat >config.log <<_ACEOF
2586This file contains any messages produced by compilers while
2587running configure, to aid debugging if configure makes a mistake.
2588
2589It was created by OpenJDK $as_me jdk8, which was
2590generated by GNU Autoconf 2.67.  Invocation command line was
2591
2592  $ $0 $@
2593
2594_ACEOF
2595exec 5>>config.log
2596{
2597cat <<_ASUNAME
2598## --------- ##
2599## Platform. ##
2600## --------- ##
2601
2602hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2603uname -m = `(uname -m) 2>/dev/null || echo unknown`
2604uname -r = `(uname -r) 2>/dev/null || echo unknown`
2605uname -s = `(uname -s) 2>/dev/null || echo unknown`
2606uname -v = `(uname -v) 2>/dev/null || echo unknown`
2607
2608/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2609/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2610
2611/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2612/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2613/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2614/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2615/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2616/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2617/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2618
2619_ASUNAME
2620
2621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2622for as_dir in $PATH
2623do
2624  IFS=$as_save_IFS
2625  test -z "$as_dir" && as_dir=.
2626    $as_echo "PATH: $as_dir"
2627  done
2628IFS=$as_save_IFS
2629
2630} >&5
2631
2632cat >&5 <<_ACEOF
2633
2634
2635## ----------- ##
2636## Core tests. ##
2637## ----------- ##
2638
2639_ACEOF
2640
2641
2642# Keep a trace of the command line.
2643# Strip out --no-create and --no-recursion so they do not pile up.
2644# Strip out --silent because we don't want to record it for future runs.
2645# Also quote any args containing shell meta-characters.
2646# Make two passes to allow for proper duplicate-argument suppression.
2647ac_configure_args=
2648ac_configure_args0=
2649ac_configure_args1=
2650ac_must_keep_next=false
2651for ac_pass in 1 2
2652do
2653  for ac_arg
2654  do
2655    case $ac_arg in
2656    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2657    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2658    | -silent | --silent | --silen | --sile | --sil)
2659      continue ;;
2660    *\'*)
2661      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2662    esac
2663    case $ac_pass in
2664    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2665    2)
2666      as_fn_append ac_configure_args1 " '$ac_arg'"
2667      if test $ac_must_keep_next = true; then
2668	ac_must_keep_next=false # Got value, back to normal.
2669      else
2670	case $ac_arg in
2671	  *=* | --config-cache | -C | -disable-* | --disable-* \
2672	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2673	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2674	  | -with-* | --with-* | -without-* | --without-* | --x)
2675	    case "$ac_configure_args0 " in
2676	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2677	    esac
2678	    ;;
2679	  -* ) ac_must_keep_next=true ;;
2680	esac
2681      fi
2682      as_fn_append ac_configure_args " '$ac_arg'"
2683      ;;
2684    esac
2685  done
2686done
2687{ ac_configure_args0=; unset ac_configure_args0;}
2688{ ac_configure_args1=; unset ac_configure_args1;}
2689
2690# When interrupted or exit'd, cleanup temporary files, and complete
2691# config.log.  We remove comments because anyway the quotes in there
2692# would cause problems or look ugly.
2693# WARNING: Use '\'' to represent an apostrophe within the trap.
2694# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2695trap 'exit_status=$?
2696  # Save into config.log some information that might help in debugging.
2697  {
2698    echo
2699
2700    $as_echo "## ---------------- ##
2701## Cache variables. ##
2702## ---------------- ##"
2703    echo
2704    # The following way of writing the cache mishandles newlines in values,
2705(
2706  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2707    eval ac_val=\$$ac_var
2708    case $ac_val in #(
2709    *${as_nl}*)
2710      case $ac_var in #(
2711      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2712$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2713      esac
2714      case $ac_var in #(
2715      _ | IFS | as_nl) ;; #(
2716      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2717      *) { eval $ac_var=; unset $ac_var;} ;;
2718      esac ;;
2719    esac
2720  done
2721  (set) 2>&1 |
2722    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2723    *${as_nl}ac_space=\ *)
2724      sed -n \
2725	"s/'\''/'\''\\\\'\'''\''/g;
2726	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2727      ;; #(
2728    *)
2729      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2730      ;;
2731    esac |
2732    sort
2733)
2734    echo
2735
2736    $as_echo "## ----------------- ##
2737## Output variables. ##
2738## ----------------- ##"
2739    echo
2740    for ac_var in $ac_subst_vars
2741    do
2742      eval ac_val=\$$ac_var
2743      case $ac_val in
2744      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2745      esac
2746      $as_echo "$ac_var='\''$ac_val'\''"
2747    done | sort
2748    echo
2749
2750    if test -n "$ac_subst_files"; then
2751      $as_echo "## ------------------- ##
2752## File substitutions. ##
2753## ------------------- ##"
2754      echo
2755      for ac_var in $ac_subst_files
2756      do
2757	eval ac_val=\$$ac_var
2758	case $ac_val in
2759	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2760	esac
2761	$as_echo "$ac_var='\''$ac_val'\''"
2762      done | sort
2763      echo
2764    fi
2765
2766    if test -s confdefs.h; then
2767      $as_echo "## ----------- ##
2768## confdefs.h. ##
2769## ----------- ##"
2770      echo
2771      cat confdefs.h
2772      echo
2773    fi
2774    test "$ac_signal" != 0 &&
2775      $as_echo "$as_me: caught signal $ac_signal"
2776    $as_echo "$as_me: exit $exit_status"
2777  } >&5
2778  rm -f core *.core core.conftest.* &&
2779    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2780    exit $exit_status
2781' 0
2782for ac_signal in 1 2 13 15; do
2783  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2784done
2785ac_signal=0
2786
2787# confdefs.h avoids OS command line length limits that DEFS can exceed.
2788rm -f -r conftest* confdefs.h
2789
2790$as_echo "/* confdefs.h */" > confdefs.h
2791
2792# Predefined preprocessor variables.
2793
2794cat >>confdefs.h <<_ACEOF
2795#define PACKAGE_NAME "$PACKAGE_NAME"
2796_ACEOF
2797
2798cat >>confdefs.h <<_ACEOF
2799#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2800_ACEOF
2801
2802cat >>confdefs.h <<_ACEOF
2803#define PACKAGE_VERSION "$PACKAGE_VERSION"
2804_ACEOF
2805
2806cat >>confdefs.h <<_ACEOF
2807#define PACKAGE_STRING "$PACKAGE_STRING"
2808_ACEOF
2809
2810cat >>confdefs.h <<_ACEOF
2811#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2812_ACEOF
2813
2814cat >>confdefs.h <<_ACEOF
2815#define PACKAGE_URL "$PACKAGE_URL"
2816_ACEOF
2817
2818
2819# Let the site file select an alternate cache file if it wants to.
2820# Prefer an explicitly selected file to automatically selected ones.
2821ac_site_file1=NONE
2822ac_site_file2=NONE
2823if test -n "$CONFIG_SITE"; then
2824  # We do not want a PATH search for config.site.
2825  case $CONFIG_SITE in #((
2826    -*)  ac_site_file1=./$CONFIG_SITE;;
2827    */*) ac_site_file1=$CONFIG_SITE;;
2828    *)   ac_site_file1=./$CONFIG_SITE;;
2829  esac
2830elif test "x$prefix" != xNONE; then
2831  ac_site_file1=$prefix/share/config.site
2832  ac_site_file2=$prefix/etc/config.site
2833else
2834  ac_site_file1=$ac_default_prefix/share/config.site
2835  ac_site_file2=$ac_default_prefix/etc/config.site
2836fi
2837for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2838do
2839  test "x$ac_site_file" = xNONE && continue
2840  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2841    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2842$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2843    sed 's/^/| /' "$ac_site_file" >&5
2844    . "$ac_site_file" \
2845      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2847as_fn_error $? "failed to load site script $ac_site_file
2848See \`config.log' for more details" "$LINENO" 5 ; }
2849  fi
2850done
2851
2852if test -r "$cache_file"; then
2853  # Some versions of bash will fail to source /dev/null (special files
2854  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2855  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2856    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2857$as_echo "$as_me: loading cache $cache_file" >&6;}
2858    case $cache_file in
2859      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2860      *)                      . "./$cache_file";;
2861    esac
2862  fi
2863else
2864  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2865$as_echo "$as_me: creating cache $cache_file" >&6;}
2866  >$cache_file
2867fi
2868
2869# Check that the precious variables saved in the cache have kept the same
2870# value.
2871ac_cache_corrupted=false
2872for ac_var in $ac_precious_vars; do
2873  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2874  eval ac_new_set=\$ac_env_${ac_var}_set
2875  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2876  eval ac_new_val=\$ac_env_${ac_var}_value
2877  case $ac_old_set,$ac_new_set in
2878    set,)
2879      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2880$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2881      ac_cache_corrupted=: ;;
2882    ,set)
2883      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2884$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2885      ac_cache_corrupted=: ;;
2886    ,);;
2887    *)
2888      if test "x$ac_old_val" != "x$ac_new_val"; then
2889	# differences in whitespace do not lead to failure.
2890	ac_old_val_w=`echo x $ac_old_val`
2891	ac_new_val_w=`echo x $ac_new_val`
2892	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2893	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2894$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2895	  ac_cache_corrupted=:
2896	else
2897	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2898$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2899	  eval $ac_var=\$ac_old_val
2900	fi
2901	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2902$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2903	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2904$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2905      fi;;
2906  esac
2907  # Pass precious variables to config.status.
2908  if test "$ac_new_set" = set; then
2909    case $ac_new_val in
2910    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2911    *) ac_arg=$ac_var=$ac_new_val ;;
2912    esac
2913    case " $ac_configure_args " in
2914      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2915      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2916    esac
2917  fi
2918done
2919if $ac_cache_corrupted; then
2920  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2922  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2923$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2924  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2925fi
2926## -------------------- ##
2927## Main body of script. ##
2928## -------------------- ##
2929
2930ac_ext=c
2931ac_cpp='$CPP $CPPFLAGS'
2932ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2933ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2934ac_compiler_gnu=$ac_cv_c_compiler_gnu
2935
2936
2937
2938ac_aux_dir=
2939for ac_dir in build-aux "$srcdir"/build-aux; do
2940  if test -f "$ac_dir/install-sh"; then
2941    ac_aux_dir=$ac_dir
2942    ac_install_sh="$ac_aux_dir/install-sh -c"
2943    break
2944  elif test -f "$ac_dir/install.sh"; then
2945    ac_aux_dir=$ac_dir
2946    ac_install_sh="$ac_aux_dir/install.sh -c"
2947    break
2948  elif test -f "$ac_dir/shtool"; then
2949    ac_aux_dir=$ac_dir
2950    ac_install_sh="$ac_aux_dir/shtool install -c"
2951    break
2952  fi
2953done
2954if test -z "$ac_aux_dir"; then
2955  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2956fi
2957
2958# These three variables are undocumented and unsupported,
2959# and are intended to be withdrawn in a future Autoconf release.
2960# They can cause serious problems if a builder's source tree is in a directory
2961# whose full name contains unusual characters.
2962ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2963ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2964ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2965
2966
2967# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2968
2969#
2970# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2971# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2972#
2973# This code is free software; you can redistribute it and/or modify it
2974# under the terms of the GNU General Public License version 2 only, as
2975# published by the Free Software Foundation.  Oracle designates this
2976# particular file as subject to the "Classpath" exception as provided
2977# by Oracle in the LICENSE file that accompanied this code.
2978#
2979# This code is distributed in the hope that it will be useful, but WITHOUT
2980# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2981# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2982# version 2 for more details (a copy is included in the LICENSE file that
2983# accompanied this code).
2984#
2985# You should have received a copy of the GNU General Public License version
2986# 2 along with this work; if not, write to the Free Software Foundation,
2987# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2988#
2989# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2990# or visit www.oracle.com if you need additional information or have any
2991# questions.
2992#
2993
2994#
2995# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2996#
2997# This program is free software; you can redistribute it and/or modify
2998# it under the terms of the GNU General Public License as published by
2999# the Free Software Foundation; either version 2 of the License, or
3000# (at your option) any later version.
3001#
3002# This program is distributed in the hope that it will be useful, but
3003# WITHOUT ANY WARRANTY; without even the implied warranty of
3004# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3005# General Public License for more details.
3006#
3007# You should have received a copy of the GNU General Public License
3008# along with this program; if not, write to the Free Software
3009# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3010#
3011# As a special exception to the GNU General Public License, if you
3012# distribute this file as part of a program that contains a
3013# configuration script generated by Autoconf, you may include it under
3014# the same distribution terms that you use for the rest of that program.
3015
3016# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3017# ----------------------------------
3018# PKG_PROG_PKG_CONFIG
3019
3020# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3021#
3022# Check to see whether a particular set of modules exists.  Similar
3023# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3024#
3025#
3026# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3027# this or PKG_CHECK_MODULES is called, or make sure to call
3028# PKG_CHECK_EXISTS manually
3029# --------------------------------------------------------------
3030
3031
3032
3033# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3034# ---------------------------------------------
3035# _PKG_CONFIG
3036
3037# _PKG_SHORT_ERRORS_SUPPORTED
3038# -----------------------------
3039# _PKG_SHORT_ERRORS_SUPPORTED
3040
3041
3042# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3043# [ACTION-IF-NOT-FOUND])
3044#
3045#
3046# Note that if there is a possibility the first call to
3047# PKG_CHECK_MODULES might not happen, you should be sure to include an
3048# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3049#
3050#
3051# --------------------------------------------------------------
3052# PKG_CHECK_MODULES
3053
3054
3055# Include these first...
3056#
3057# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3058# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3059#
3060# This code is free software; you can redistribute it and/or modify it
3061# under the terms of the GNU General Public License version 2 only, as
3062# published by the Free Software Foundation.  Oracle designates this
3063# particular file as subject to the "Classpath" exception as provided
3064# by Oracle in the LICENSE file that accompanied this code.
3065#
3066# This code is distributed in the hope that it will be useful, but WITHOUT
3067# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3068# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3069# version 2 for more details (a copy is included in the LICENSE file that
3070# accompanied this code).
3071#
3072# You should have received a copy of the GNU General Public License version
3073# 2 along with this work; if not, write to the Free Software Foundation,
3074# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3075#
3076# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3077# or visit www.oracle.com if you need additional information or have any
3078# questions.
3079#
3080
3081# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3082# If so, then append $1 to $2\
3083# Also set JVM_ARG_OK to true/false depending on outcome.
3084
3085
3086# This will make sure the given variable points to a full and proper
3087# path. This means:
3088# 1) There will be no spaces in the path. On posix platforms,
3089#    spaces in the path will result in an error. On Windows,
3090#    the path will be rewritten using short-style to be space-free.
3091# 2) The path will be absolute, and it will be in unix-style (on
3092#     cygwin).
3093# $1: The name of the variable to fix
3094
3095
3096# This will make sure the given variable points to a executable
3097# with a full and proper path. This means:
3098# 1) There will be no spaces in the path. On posix platforms,
3099#    spaces in the path will result in an error. On Windows,
3100#    the path will be rewritten using short-style to be space-free.
3101# 2) The path will be absolute, and it will be in unix-style (on
3102#     cygwin).
3103# Any arguments given to the executable is preserved.
3104# If the input variable does not have a directory specification, then
3105# it need to be in the PATH.
3106# $1: The name of the variable to fix
3107
3108
3109
3110
3111
3112
3113# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3114# $1: variable to check
3115# $2: executable name to print in warning (optional)
3116
3117
3118# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3119# Arguments as AC_PATH_PROG:
3120# $1: variable to set
3121# $2: executable name to look for
3122
3123
3124# Setup the most fundamental tools that relies on not much else to set up,
3125# but is used by much of the early bootstrap code.
3126
3127
3128# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3129
3130
3131
3132
3133
3134
3135
3136#%%% Simple tools %%%
3137
3138# Check if we have found a usable version of make
3139# $1: the path to a potential make binary (or empty)
3140# $2: the description on how we found this
3141
3142
3143# Goes looking for a usable version of GNU make.
3144
3145
3146
3147
3148
3149
3150# Check if build directory is on local disk. If not possible to determine,
3151# we prefer to claim it's local.
3152# Argument 1: directory to test
3153# Argument 2: what to do if it is on local disk
3154# Argument 3: what to do otherwise (remote disk or failure)
3155
3156
3157# Check that source files have basic read permissions set. This might
3158# not be the case in cygwin in certain conditions.
3159
3160
3161
3162
3163#
3164# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3165# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3166#
3167# This code is free software; you can redistribute it and/or modify it
3168# under the terms of the GNU General Public License version 2 only, as
3169# published by the Free Software Foundation.  Oracle designates this
3170# particular file as subject to the "Classpath" exception as provided
3171# by Oracle in the LICENSE file that accompanied this code.
3172#
3173# This code is distributed in the hope that it will be useful, but WITHOUT
3174# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3175# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3176# version 2 for more details (a copy is included in the LICENSE file that
3177# accompanied this code).
3178#
3179# You should have received a copy of the GNU General Public License version
3180# 2 along with this work; if not, write to the Free Software Foundation,
3181# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3182#
3183# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3184# or visit www.oracle.com if you need additional information or have any
3185# questions.
3186#
3187
3188
3189
3190
3191
3192# Helper function which possibly converts a path using DOS-style short mode.
3193# If so, the updated path is stored in $new_path.
3194# $1: The path to check
3195
3196
3197# Helper function which possibly converts a path using DOS-style short mode.
3198# If so, the updated path is stored in $new_path.
3199# $1: The path to check
3200
3201
3202# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3203# and could probably be heavily simplified. However, all changes in this
3204# area tend to need lot of testing in different scenarios, and in lack of
3205# proper unit testing, cleaning this up has not been deemed worth the effort
3206# at the moment.
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3217
3218
3219
3220
3221#
3222# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3223# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3224#
3225# This code is free software; you can redistribute it and/or modify it
3226# under the terms of the GNU General Public License version 2 only, as
3227# published by the Free Software Foundation.  Oracle designates this
3228# particular file as subject to the "Classpath" exception as provided
3229# by Oracle in the LICENSE file that accompanied this code.
3230#
3231# This code is distributed in the hope that it will be useful, but WITHOUT
3232# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3233# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3234# version 2 for more details (a copy is included in the LICENSE file that
3235# accompanied this code).
3236#
3237# You should have received a copy of the GNU General Public License version
3238# 2 along with this work; if not, write to the Free Software Foundation,
3239# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3240#
3241# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3242# or visit www.oracle.com if you need additional information or have any
3243# questions.
3244#
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256# ... then the rest
3257#
3258# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3259# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3260#
3261# This code is free software; you can redistribute it and/or modify it
3262# under the terms of the GNU General Public License version 2 only, as
3263# published by the Free Software Foundation.  Oracle designates this
3264# particular file as subject to the "Classpath" exception as provided
3265# by Oracle in the LICENSE file that accompanied this code.
3266#
3267# This code is distributed in the hope that it will be useful, but WITHOUT
3268# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3269# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3270# version 2 for more details (a copy is included in the LICENSE file that
3271# accompanied this code).
3272#
3273# You should have received a copy of the GNU General Public License version
3274# 2 along with this work; if not, write to the Free Software Foundation,
3275# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3276#
3277# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3278# or visit www.oracle.com if you need additional information or have any
3279# questions.
3280#
3281
3282# Execute the check given as argument, and verify the result
3283# If the Boot JDK was previously found, do nothing
3284# $1 A command line (typically autoconf macro) to execute
3285
3286
3287# Test: Is bootjdk explicitely set by command line arguments?
3288
3289
3290# Test: Is bootjdk available from builddeps?
3291
3292
3293# Test: Is $JAVA_HOME set?
3294
3295
3296# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3297
3298
3299# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3300
3301
3302# Look for a jdk in the given path. If there are multiple, try to select the newest.
3303# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3304# $1 = Path to directory containing jdk installations.
3305# $2 = String to append to the found JDK directory to get the proper JDK home
3306
3307
3308# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3309# environmental variable as base for where to look.
3310# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3311
3312
3313# Test: Is there a JDK installed in default, well-known locations?
3314
3315
3316# Check that a command-line tool in the Boot JDK is correct
3317# $1 = name of variable to assign
3318# $2 = name of binary
3319
3320
3321###############################################################################
3322#
3323# We need a Boot JDK to bootstrap the build.
3324#
3325
3326
3327
3328
3329
3330#
3331# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3332# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3333#
3334# This code is free software; you can redistribute it and/or modify it
3335# under the terms of the GNU General Public License version 2 only, as
3336# published by the Free Software Foundation.  Oracle designates this
3337# particular file as subject to the "Classpath" exception as provided
3338# by Oracle in the LICENSE file that accompanied this code.
3339#
3340# This code is distributed in the hope that it will be useful, but WITHOUT
3341# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3342# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3343# version 2 for more details (a copy is included in the LICENSE file that
3344# accompanied this code).
3345#
3346# You should have received a copy of the GNU General Public License version
3347# 2 along with this work; if not, write to the Free Software Foundation,
3348# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3349#
3350# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3351# or visit www.oracle.com if you need additional information or have any
3352# questions.
3353#
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374#
3375# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3376# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3377#
3378# This code is free software; you can redistribute it and/or modify it
3379# under the terms of the GNU General Public License version 2 only, as
3380# published by the Free Software Foundation.  Oracle designates this
3381# particular file as subject to the "Classpath" exception as provided
3382# by Oracle in the LICENSE file that accompanied this code.
3383#
3384# This code is distributed in the hope that it will be useful, but WITHOUT
3385# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3386# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3387# version 2 for more details (a copy is included in the LICENSE file that
3388# accompanied this code).
3389#
3390# You should have received a copy of the GNU General Public License version
3391# 2 along with this work; if not, write to the Free Software Foundation,
3392# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3393#
3394# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3395# or visit www.oracle.com if you need additional information or have any
3396# questions.
3397#
3398
3399
3400
3401
3402
3403cygwin_help() {
3404    case $1 in
3405    unzip)
3406        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3407    zip)
3408        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3409    make)
3410        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3411    * )
3412       break ;;
3413    esac
3414}
3415
3416apt_help() {
3417    case $1 in
3418    devkit)
3419        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3420    openjdk)
3421        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3422    alsa)
3423        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3424    cups)
3425        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3426    freetype2)
3427        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3428    pulse)
3429        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3430    x11)
3431        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3432    ccache)
3433        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3434    * )
3435       break ;;
3436    esac
3437}
3438
3439yum_help() {
3440    case $1 in
3441    devkit)
3442        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3443    openjdk)
3444        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3445    alsa)
3446        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3447    cups)
3448        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3449    freetype2)
3450        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3451    pulse)
3452        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3453    x11)
3454        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3455    ccache)
3456        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3457    * )
3458       break ;;
3459    esac
3460}
3461
3462port_help() {
3463    PKGHANDLER_COMMAND=""
3464}
3465
3466pkgutil_help() {
3467    PKGHANDLER_COMMAND=""
3468}
3469
3470pkgadd_help() {
3471    PKGHANDLER_COMMAND=""
3472}
3473
3474
3475
3476#
3477# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3478# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3479#
3480# This code is free software; you can redistribute it and/or modify it
3481# under the terms of the GNU General Public License version 2 only, as
3482# published by the Free Software Foundation.  Oracle designates this
3483# particular file as subject to the "Classpath" exception as provided
3484# by Oracle in the LICENSE file that accompanied this code.
3485#
3486# This code is distributed in the hope that it will be useful, but WITHOUT
3487# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3488# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3489# version 2 for more details (a copy is included in the LICENSE file that
3490# accompanied this code).
3491#
3492# You should have received a copy of the GNU General Public License version
3493# 2 along with this work; if not, write to the Free Software Foundation,
3494# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3495#
3496# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3497# or visit www.oracle.com if you need additional information or have any
3498# questions.
3499#
3500
3501
3502
3503
3504
3505
3506
3507
3508###############################################################################
3509#
3510# Should we build only OpenJDK even if closed sources are present?
3511#
3512
3513
3514
3515
3516###############################################################################
3517#
3518# Setup version numbers
3519#
3520
3521
3522
3523
3524
3525
3526# Support for customization of the build process. Some build files
3527# will include counterparts from this location, if they exist. This allows
3528# for a degree of customization of the build targets and the rules/recipes
3529# to create them
3530
3531# Check whether --with-custom-make-dir was given.
3532if test "${with_custom_make_dir+set}" = set; then :
3533  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3534fi
3535
3536
3537
3538#
3539# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3540# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3541#
3542# This code is free software; you can redistribute it and/or modify it
3543# under the terms of the GNU General Public License version 2 only, as
3544# published by the Free Software Foundation.  Oracle designates this
3545# particular file as subject to the "Classpath" exception as provided
3546# by Oracle in the LICENSE file that accompanied this code.
3547#
3548# This code is distributed in the hope that it will be useful, but WITHOUT
3549# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3550# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3551# version 2 for more details (a copy is included in the LICENSE file that
3552# accompanied this code).
3553#
3554# You should have received a copy of the GNU General Public License version
3555# 2 along with this work; if not, write to the Free Software Foundation,
3556# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3557#
3558# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3559# or visit www.oracle.com if you need additional information or have any
3560# questions.
3561#
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577#
3578# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3579# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3580#
3581# This code is free software; you can redistribute it and/or modify it
3582# under the terms of the GNU General Public License version 2 only, as
3583# published by the Free Software Foundation.  Oracle designates this
3584# particular file as subject to the "Classpath" exception as provided
3585# by Oracle in the LICENSE file that accompanied this code.
3586#
3587# This code is distributed in the hope that it will be useful, but WITHOUT
3588# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3589# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3590# version 2 for more details (a copy is included in the LICENSE file that
3591# accompanied this code).
3592#
3593# You should have received a copy of the GNU General Public License version
3594# 2 along with this work; if not, write to the Free Software Foundation,
3595# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3596#
3597# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3598# or visit www.oracle.com if you need additional information or have any
3599# questions.
3600#
3601
3602# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3603# Converts autoconf style CPU name to OpenJDK style, into
3604# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3605
3606
3607# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3608# Converts autoconf style OS name to OpenJDK style, into
3609# VAR_OS and VAR_OS_API.
3610
3611
3612# Expects $host_os $host_cpu $build_os and $build_cpu
3613# and $with_target_bits to have been setup!
3614#
3615# Translate the standard triplet(quadruplet) definition
3616# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3617# OPENJDK_BUILD_OS, etc.
3618
3619
3620# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3621# accordingly. Must be done after setting up build and target system, but before
3622# doing anything else with these values.
3623
3624
3625    # Setup the legacy variables, for controlling the old makefiles.
3626    #
3627
3628
3629
3630
3631#%%% Build and target systems %%%
3632
3633
3634
3635
3636# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3637# Add -mX to various FLAGS variables.
3638
3639
3640
3641
3642
3643
3644#
3645# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3646# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3647#
3648# This code is free software; you can redistribute it and/or modify it
3649# under the terms of the GNU General Public License version 2 only, as
3650# published by the Free Software Foundation.  Oracle designates this
3651# particular file as subject to the "Classpath" exception as provided
3652# by Oracle in the LICENSE file that accompanied this code.
3653#
3654# This code is distributed in the hope that it will be useful, but WITHOUT
3655# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3656# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3657# version 2 for more details (a copy is included in the LICENSE file that
3658# accompanied this code).
3659#
3660# You should have received a copy of the GNU General Public License version
3661# 2 along with this work; if not, write to the Free Software Foundation,
3662# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3663#
3664# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3665# or visit www.oracle.com if you need additional information or have any
3666# questions.
3667#
3668
3669
3670
3671
3672
3673
3674
3675
3676#
3677# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3678# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3679#
3680# This code is free software; you can redistribute it and/or modify it
3681# under the terms of the GNU General Public License version 2 only, as
3682# published by the Free Software Foundation.  Oracle designates this
3683# particular file as subject to the "Classpath" exception as provided
3684# by Oracle in the LICENSE file that accompanied this code.
3685#
3686# This code is distributed in the hope that it will be useful, but WITHOUT
3687# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3688# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3689# version 2 for more details (a copy is included in the LICENSE file that
3690# accompanied this code).
3691#
3692# You should have received a copy of the GNU General Public License version
3693# 2 along with this work; if not, write to the Free Software Foundation,
3694# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3695#
3696# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3697# or visit www.oracle.com if you need additional information or have any
3698# questions.
3699#
3700
3701# $1 = compiler to test (CC or CXX)
3702# $2 = human readable name of compiler (C or C++)
3703
3704
3705
3706
3707
3708# $1 = compiler to test (CC or CXX)
3709# $2 = human readable name of compiler (C or C++)
3710# $3 = list of compiler names to search for
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3725#                                   [RUN-IF-FALSE])
3726# ------------------------------------------------------------
3727# Check that the c and c++ compilers support an argument
3728
3729
3730
3731
3732# Setup the JTREG paths
3733
3734
3735#
3736# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3737# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3738#
3739# This code is free software; you can redistribute it and/or modify it
3740# under the terms of the GNU General Public License version 2 only, as
3741# published by the Free Software Foundation.  Oracle designates this
3742# particular file as subject to the "Classpath" exception as provided
3743# by Oracle in the LICENSE file that accompanied this code.
3744#
3745# This code is distributed in the hope that it will be useful, but WITHOUT
3746# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3747# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3748# version 2 for more details (a copy is included in the LICENSE file that
3749# accompanied this code).
3750#
3751# You should have received a copy of the GNU General Public License version
3752# 2 along with this work; if not, write to the Free Software Foundation,
3753# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3754#
3755# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3756# or visit www.oracle.com if you need additional information or have any
3757# questions.
3758#
3759
3760
3761
3762
3763
3764
3765
3766# Check if the VS env variables were setup prior to running configure.
3767# If not, then find vcvarsall.bat and run it automatically, and integrate
3768# the set env variables into the spec file.
3769
3770
3771
3772# Setup the DXSDK paths
3773
3774
3775
3776
3777
3778
3779# This line needs to be here, verbatim, after all includes and the dummy hook
3780# definitions. It is replaced with custom functionality when building
3781# custom sources.
3782#CUSTOM_AUTOCONF_INCLUDE
3783
3784# Do not change or remove the following line, it is needed for consistency checks:
3785DATE_WHEN_GENERATED=1371547824
3786
3787###############################################################################
3788#
3789# Initialization / Boot-strapping
3790#
3791# The bootstrapping process needs to solve the "chicken or the egg" problem,
3792# thus it jumps back and forth, each time gaining something needed later on.
3793#
3794###############################################################################
3795
3796# Basic initialization that must happen first of all
3797
3798# Save the original command line. This is passed to us by the wrapper configure script.
3799
3800DATE_WHEN_CONFIGURED=`LANG=C date`
3801
3802{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3803$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3804{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3805$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3806
3807
3808
3809# Start with tools that do not need have cross compilation support
3810# and can be expected to be found in the default PATH. These tools are
3811# used by configure. Nor are these tools expected to be found in the
3812# devkit from the builddeps server either, since they are
3813# needed to download the devkit.
3814
3815# First are all the simple required tools.
3816
3817    for ac_prog in basename
3818do
3819  # Extract the first word of "$ac_prog", so it can be a program name with args.
3820set dummy $ac_prog; ac_word=$2
3821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
3823if test "${ac_cv_path_BASENAME+set}" = set; then :
3824  $as_echo_n "(cached) " >&6
3825else
3826  case $BASENAME in
3827  [\\/]* | ?:[\\/]*)
3828  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3829  ;;
3830  *)
3831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3832for as_dir in $PATH
3833do
3834  IFS=$as_save_IFS
3835  test -z "$as_dir" && as_dir=.
3836    for ac_exec_ext in '' $ac_executable_extensions; do
3837  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3838    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3840    break 2
3841  fi
3842done
3843  done
3844IFS=$as_save_IFS
3845
3846  ;;
3847esac
3848fi
3849BASENAME=$ac_cv_path_BASENAME
3850if test -n "$BASENAME"; then
3851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3852$as_echo "$BASENAME" >&6; }
3853else
3854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855$as_echo "no" >&6; }
3856fi
3857
3858
3859  test -n "$BASENAME" && break
3860done
3861
3862
3863    if test "x$BASENAME" = x; then
3864        if test "xbasename" = x; then
3865          PROG_NAME=basename
3866        else
3867          PROG_NAME=basename
3868        fi
3869        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3870$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3871        as_fn_error $? "Cannot continue" "$LINENO" 5
3872    fi
3873
3874
3875
3876    for ac_prog in bash
3877do
3878  # Extract the first word of "$ac_prog", so it can be a program name with args.
3879set dummy $ac_prog; ac_word=$2
3880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3881$as_echo_n "checking for $ac_word... " >&6; }
3882if test "${ac_cv_path_BASH+set}" = set; then :
3883  $as_echo_n "(cached) " >&6
3884else
3885  case $BASH in
3886  [\\/]* | ?:[\\/]*)
3887  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3888  ;;
3889  *)
3890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3891for as_dir in $PATH
3892do
3893  IFS=$as_save_IFS
3894  test -z "$as_dir" && as_dir=.
3895    for ac_exec_ext in '' $ac_executable_extensions; do
3896  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3897    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3899    break 2
3900  fi
3901done
3902  done
3903IFS=$as_save_IFS
3904
3905  ;;
3906esac
3907fi
3908BASH=$ac_cv_path_BASH
3909if test -n "$BASH"; then
3910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3911$as_echo "$BASH" >&6; }
3912else
3913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3914$as_echo "no" >&6; }
3915fi
3916
3917
3918  test -n "$BASH" && break
3919done
3920
3921
3922    if test "x$BASH" = x; then
3923        if test "xbash" = x; then
3924          PROG_NAME=bash
3925        else
3926          PROG_NAME=bash
3927        fi
3928        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3929$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3930        as_fn_error $? "Cannot continue" "$LINENO" 5
3931    fi
3932
3933
3934
3935    for ac_prog in cat
3936do
3937  # Extract the first word of "$ac_prog", so it can be a program name with args.
3938set dummy $ac_prog; ac_word=$2
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3940$as_echo_n "checking for $ac_word... " >&6; }
3941if test "${ac_cv_path_CAT+set}" = set; then :
3942  $as_echo_n "(cached) " >&6
3943else
3944  case $CAT in
3945  [\\/]* | ?:[\\/]*)
3946  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3947  ;;
3948  *)
3949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3950for as_dir in $PATH
3951do
3952  IFS=$as_save_IFS
3953  test -z "$as_dir" && as_dir=.
3954    for ac_exec_ext in '' $ac_executable_extensions; do
3955  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3956    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3958    break 2
3959  fi
3960done
3961  done
3962IFS=$as_save_IFS
3963
3964  ;;
3965esac
3966fi
3967CAT=$ac_cv_path_CAT
3968if test -n "$CAT"; then
3969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3970$as_echo "$CAT" >&6; }
3971else
3972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3973$as_echo "no" >&6; }
3974fi
3975
3976
3977  test -n "$CAT" && break
3978done
3979
3980
3981    if test "x$CAT" = x; then
3982        if test "xcat" = x; then
3983          PROG_NAME=cat
3984        else
3985          PROG_NAME=cat
3986        fi
3987        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3988$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3989        as_fn_error $? "Cannot continue" "$LINENO" 5
3990    fi
3991
3992
3993
3994    for ac_prog in chmod
3995do
3996  # Extract the first word of "$ac_prog", so it can be a program name with args.
3997set dummy $ac_prog; ac_word=$2
3998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999$as_echo_n "checking for $ac_word... " >&6; }
4000if test "${ac_cv_path_CHMOD+set}" = set; then :
4001  $as_echo_n "(cached) " >&6
4002else
4003  case $CHMOD in
4004  [\\/]* | ?:[\\/]*)
4005  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4006  ;;
4007  *)
4008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009for as_dir in $PATH
4010do
4011  IFS=$as_save_IFS
4012  test -z "$as_dir" && as_dir=.
4013    for ac_exec_ext in '' $ac_executable_extensions; do
4014  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4015    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4017    break 2
4018  fi
4019done
4020  done
4021IFS=$as_save_IFS
4022
4023  ;;
4024esac
4025fi
4026CHMOD=$ac_cv_path_CHMOD
4027if test -n "$CHMOD"; then
4028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4029$as_echo "$CHMOD" >&6; }
4030else
4031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4032$as_echo "no" >&6; }
4033fi
4034
4035
4036  test -n "$CHMOD" && break
4037done
4038
4039
4040    if test "x$CHMOD" = x; then
4041        if test "xchmod" = x; then
4042          PROG_NAME=chmod
4043        else
4044          PROG_NAME=chmod
4045        fi
4046        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4047$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4048        as_fn_error $? "Cannot continue" "$LINENO" 5
4049    fi
4050
4051
4052
4053    for ac_prog in cmp
4054do
4055  # Extract the first word of "$ac_prog", so it can be a program name with args.
4056set dummy $ac_prog; ac_word=$2
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058$as_echo_n "checking for $ac_word... " >&6; }
4059if test "${ac_cv_path_CMP+set}" = set; then :
4060  $as_echo_n "(cached) " >&6
4061else
4062  case $CMP in
4063  [\\/]* | ?:[\\/]*)
4064  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4065  ;;
4066  *)
4067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068for as_dir in $PATH
4069do
4070  IFS=$as_save_IFS
4071  test -z "$as_dir" && as_dir=.
4072    for ac_exec_ext in '' $ac_executable_extensions; do
4073  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4074    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4076    break 2
4077  fi
4078done
4079  done
4080IFS=$as_save_IFS
4081
4082  ;;
4083esac
4084fi
4085CMP=$ac_cv_path_CMP
4086if test -n "$CMP"; then
4087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4088$as_echo "$CMP" >&6; }
4089else
4090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4091$as_echo "no" >&6; }
4092fi
4093
4094
4095  test -n "$CMP" && break
4096done
4097
4098
4099    if test "x$CMP" = x; then
4100        if test "xcmp" = x; then
4101          PROG_NAME=cmp
4102        else
4103          PROG_NAME=cmp
4104        fi
4105        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4106$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4107        as_fn_error $? "Cannot continue" "$LINENO" 5
4108    fi
4109
4110
4111
4112    for ac_prog in comm
4113do
4114  # Extract the first word of "$ac_prog", so it can be a program name with args.
4115set dummy $ac_prog; ac_word=$2
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117$as_echo_n "checking for $ac_word... " >&6; }
4118if test "${ac_cv_path_COMM+set}" = set; then :
4119  $as_echo_n "(cached) " >&6
4120else
4121  case $COMM in
4122  [\\/]* | ?:[\\/]*)
4123  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4124  ;;
4125  *)
4126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4127for as_dir in $PATH
4128do
4129  IFS=$as_save_IFS
4130  test -z "$as_dir" && as_dir=.
4131    for ac_exec_ext in '' $ac_executable_extensions; do
4132  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4133    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4135    break 2
4136  fi
4137done
4138  done
4139IFS=$as_save_IFS
4140
4141  ;;
4142esac
4143fi
4144COMM=$ac_cv_path_COMM
4145if test -n "$COMM"; then
4146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4147$as_echo "$COMM" >&6; }
4148else
4149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4150$as_echo "no" >&6; }
4151fi
4152
4153
4154  test -n "$COMM" && break
4155done
4156
4157
4158    if test "x$COMM" = x; then
4159        if test "xcomm" = x; then
4160          PROG_NAME=comm
4161        else
4162          PROG_NAME=comm
4163        fi
4164        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4165$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4166        as_fn_error $? "Cannot continue" "$LINENO" 5
4167    fi
4168
4169
4170
4171    for ac_prog in cp
4172do
4173  # Extract the first word of "$ac_prog", so it can be a program name with args.
4174set dummy $ac_prog; ac_word=$2
4175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4176$as_echo_n "checking for $ac_word... " >&6; }
4177if test "${ac_cv_path_CP+set}" = set; then :
4178  $as_echo_n "(cached) " >&6
4179else
4180  case $CP in
4181  [\\/]* | ?:[\\/]*)
4182  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4183  ;;
4184  *)
4185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4186for as_dir in $PATH
4187do
4188  IFS=$as_save_IFS
4189  test -z "$as_dir" && as_dir=.
4190    for ac_exec_ext in '' $ac_executable_extensions; do
4191  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4192    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4194    break 2
4195  fi
4196done
4197  done
4198IFS=$as_save_IFS
4199
4200  ;;
4201esac
4202fi
4203CP=$ac_cv_path_CP
4204if test -n "$CP"; then
4205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4206$as_echo "$CP" >&6; }
4207else
4208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4209$as_echo "no" >&6; }
4210fi
4211
4212
4213  test -n "$CP" && break
4214done
4215
4216
4217    if test "x$CP" = x; then
4218        if test "xcp" = x; then
4219          PROG_NAME=cp
4220        else
4221          PROG_NAME=cp
4222        fi
4223        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4224$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4225        as_fn_error $? "Cannot continue" "$LINENO" 5
4226    fi
4227
4228
4229
4230    for ac_prog in cpio
4231do
4232  # Extract the first word of "$ac_prog", so it can be a program name with args.
4233set dummy $ac_prog; ac_word=$2
4234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4235$as_echo_n "checking for $ac_word... " >&6; }
4236if test "${ac_cv_path_CPIO+set}" = set; then :
4237  $as_echo_n "(cached) " >&6
4238else
4239  case $CPIO in
4240  [\\/]* | ?:[\\/]*)
4241  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4242  ;;
4243  *)
4244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245for as_dir in $PATH
4246do
4247  IFS=$as_save_IFS
4248  test -z "$as_dir" && as_dir=.
4249    for ac_exec_ext in '' $ac_executable_extensions; do
4250  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4253    break 2
4254  fi
4255done
4256  done
4257IFS=$as_save_IFS
4258
4259  ;;
4260esac
4261fi
4262CPIO=$ac_cv_path_CPIO
4263if test -n "$CPIO"; then
4264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4265$as_echo "$CPIO" >&6; }
4266else
4267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4268$as_echo "no" >&6; }
4269fi
4270
4271
4272  test -n "$CPIO" && break
4273done
4274
4275
4276    if test "x$CPIO" = x; then
4277        if test "xcpio" = x; then
4278          PROG_NAME=cpio
4279        else
4280          PROG_NAME=cpio
4281        fi
4282        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4283$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4284        as_fn_error $? "Cannot continue" "$LINENO" 5
4285    fi
4286
4287
4288
4289    for ac_prog in cut
4290do
4291  # Extract the first word of "$ac_prog", so it can be a program name with args.
4292set dummy $ac_prog; ac_word=$2
4293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4294$as_echo_n "checking for $ac_word... " >&6; }
4295if test "${ac_cv_path_CUT+set}" = set; then :
4296  $as_echo_n "(cached) " >&6
4297else
4298  case $CUT in
4299  [\\/]* | ?:[\\/]*)
4300  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4301  ;;
4302  *)
4303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304for as_dir in $PATH
4305do
4306  IFS=$as_save_IFS
4307  test -z "$as_dir" && as_dir=.
4308    for ac_exec_ext in '' $ac_executable_extensions; do
4309  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4310    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4312    break 2
4313  fi
4314done
4315  done
4316IFS=$as_save_IFS
4317
4318  ;;
4319esac
4320fi
4321CUT=$ac_cv_path_CUT
4322if test -n "$CUT"; then
4323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4324$as_echo "$CUT" >&6; }
4325else
4326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4327$as_echo "no" >&6; }
4328fi
4329
4330
4331  test -n "$CUT" && break
4332done
4333
4334
4335    if test "x$CUT" = x; then
4336        if test "xcut" = x; then
4337          PROG_NAME=cut
4338        else
4339          PROG_NAME=cut
4340        fi
4341        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4342$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4343        as_fn_error $? "Cannot continue" "$LINENO" 5
4344    fi
4345
4346
4347
4348    for ac_prog in date
4349do
4350  # Extract the first word of "$ac_prog", so it can be a program name with args.
4351set dummy $ac_prog; ac_word=$2
4352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353$as_echo_n "checking for $ac_word... " >&6; }
4354if test "${ac_cv_path_DATE+set}" = set; then :
4355  $as_echo_n "(cached) " >&6
4356else
4357  case $DATE in
4358  [\\/]* | ?:[\\/]*)
4359  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4360  ;;
4361  *)
4362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4363for as_dir in $PATH
4364do
4365  IFS=$as_save_IFS
4366  test -z "$as_dir" && as_dir=.
4367    for ac_exec_ext in '' $ac_executable_extensions; do
4368  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4369    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4371    break 2
4372  fi
4373done
4374  done
4375IFS=$as_save_IFS
4376
4377  ;;
4378esac
4379fi
4380DATE=$ac_cv_path_DATE
4381if test -n "$DATE"; then
4382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4383$as_echo "$DATE" >&6; }
4384else
4385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4386$as_echo "no" >&6; }
4387fi
4388
4389
4390  test -n "$DATE" && break
4391done
4392
4393
4394    if test "x$DATE" = x; then
4395        if test "xdate" = x; then
4396          PROG_NAME=date
4397        else
4398          PROG_NAME=date
4399        fi
4400        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4401$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4402        as_fn_error $? "Cannot continue" "$LINENO" 5
4403    fi
4404
4405
4406
4407    for ac_prog in gdiff diff
4408do
4409  # Extract the first word of "$ac_prog", so it can be a program name with args.
4410set dummy $ac_prog; ac_word=$2
4411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4412$as_echo_n "checking for $ac_word... " >&6; }
4413if test "${ac_cv_path_DIFF+set}" = set; then :
4414  $as_echo_n "(cached) " >&6
4415else
4416  case $DIFF in
4417  [\\/]* | ?:[\\/]*)
4418  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4419  ;;
4420  *)
4421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4422for as_dir in $PATH
4423do
4424  IFS=$as_save_IFS
4425  test -z "$as_dir" && as_dir=.
4426    for ac_exec_ext in '' $ac_executable_extensions; do
4427  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4428    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4430    break 2
4431  fi
4432done
4433  done
4434IFS=$as_save_IFS
4435
4436  ;;
4437esac
4438fi
4439DIFF=$ac_cv_path_DIFF
4440if test -n "$DIFF"; then
4441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4442$as_echo "$DIFF" >&6; }
4443else
4444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445$as_echo "no" >&6; }
4446fi
4447
4448
4449  test -n "$DIFF" && break
4450done
4451
4452
4453    if test "x$DIFF" = x; then
4454        if test "xgdiff diff" = x; then
4455          PROG_NAME=diff
4456        else
4457          PROG_NAME=gdiff diff
4458        fi
4459        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4460$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4461        as_fn_error $? "Cannot continue" "$LINENO" 5
4462    fi
4463
4464
4465
4466    for ac_prog in dirname
4467do
4468  # Extract the first word of "$ac_prog", so it can be a program name with args.
4469set dummy $ac_prog; ac_word=$2
4470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471$as_echo_n "checking for $ac_word... " >&6; }
4472if test "${ac_cv_path_DIRNAME+set}" = set; then :
4473  $as_echo_n "(cached) " >&6
4474else
4475  case $DIRNAME in
4476  [\\/]* | ?:[\\/]*)
4477  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4478  ;;
4479  *)
4480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481for as_dir in $PATH
4482do
4483  IFS=$as_save_IFS
4484  test -z "$as_dir" && as_dir=.
4485    for ac_exec_ext in '' $ac_executable_extensions; do
4486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4487    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4489    break 2
4490  fi
4491done
4492  done
4493IFS=$as_save_IFS
4494
4495  ;;
4496esac
4497fi
4498DIRNAME=$ac_cv_path_DIRNAME
4499if test -n "$DIRNAME"; then
4500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4501$as_echo "$DIRNAME" >&6; }
4502else
4503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4504$as_echo "no" >&6; }
4505fi
4506
4507
4508  test -n "$DIRNAME" && break
4509done
4510
4511
4512    if test "x$DIRNAME" = x; then
4513        if test "xdirname" = x; then
4514          PROG_NAME=dirname
4515        else
4516          PROG_NAME=dirname
4517        fi
4518        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4519$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4520        as_fn_error $? "Cannot continue" "$LINENO" 5
4521    fi
4522
4523
4524
4525    for ac_prog in echo
4526do
4527  # Extract the first word of "$ac_prog", so it can be a program name with args.
4528set dummy $ac_prog; ac_word=$2
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
4531if test "${ac_cv_path_ECHO+set}" = set; then :
4532  $as_echo_n "(cached) " >&6
4533else
4534  case $ECHO in
4535  [\\/]* | ?:[\\/]*)
4536  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4537  ;;
4538  *)
4539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in $PATH
4541do
4542  IFS=$as_save_IFS
4543  test -z "$as_dir" && as_dir=.
4544    for ac_exec_ext in '' $ac_executable_extensions; do
4545  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4546    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4548    break 2
4549  fi
4550done
4551  done
4552IFS=$as_save_IFS
4553
4554  ;;
4555esac
4556fi
4557ECHO=$ac_cv_path_ECHO
4558if test -n "$ECHO"; then
4559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4560$as_echo "$ECHO" >&6; }
4561else
4562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
4564fi
4565
4566
4567  test -n "$ECHO" && break
4568done
4569
4570
4571    if test "x$ECHO" = x; then
4572        if test "xecho" = x; then
4573          PROG_NAME=echo
4574        else
4575          PROG_NAME=echo
4576        fi
4577        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4578$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4579        as_fn_error $? "Cannot continue" "$LINENO" 5
4580    fi
4581
4582
4583
4584    for ac_prog in expr
4585do
4586  # Extract the first word of "$ac_prog", so it can be a program name with args.
4587set dummy $ac_prog; ac_word=$2
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4589$as_echo_n "checking for $ac_word... " >&6; }
4590if test "${ac_cv_path_EXPR+set}" = set; then :
4591  $as_echo_n "(cached) " >&6
4592else
4593  case $EXPR in
4594  [\\/]* | ?:[\\/]*)
4595  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4596  ;;
4597  *)
4598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4599for as_dir in $PATH
4600do
4601  IFS=$as_save_IFS
4602  test -z "$as_dir" && as_dir=.
4603    for ac_exec_ext in '' $ac_executable_extensions; do
4604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4605    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4607    break 2
4608  fi
4609done
4610  done
4611IFS=$as_save_IFS
4612
4613  ;;
4614esac
4615fi
4616EXPR=$ac_cv_path_EXPR
4617if test -n "$EXPR"; then
4618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4619$as_echo "$EXPR" >&6; }
4620else
4621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4622$as_echo "no" >&6; }
4623fi
4624
4625
4626  test -n "$EXPR" && break
4627done
4628
4629
4630    if test "x$EXPR" = x; then
4631        if test "xexpr" = x; then
4632          PROG_NAME=expr
4633        else
4634          PROG_NAME=expr
4635        fi
4636        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4637$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4638        as_fn_error $? "Cannot continue" "$LINENO" 5
4639    fi
4640
4641
4642
4643    for ac_prog in file
4644do
4645  # Extract the first word of "$ac_prog", so it can be a program name with args.
4646set dummy $ac_prog; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if test "${ac_cv_path_FILE+set}" = set; then :
4650  $as_echo_n "(cached) " >&6
4651else
4652  case $FILE in
4653  [\\/]* | ?:[\\/]*)
4654  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4655  ;;
4656  *)
4657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in $PATH
4659do
4660  IFS=$as_save_IFS
4661  test -z "$as_dir" && as_dir=.
4662    for ac_exec_ext in '' $ac_executable_extensions; do
4663  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4664    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666    break 2
4667  fi
4668done
4669  done
4670IFS=$as_save_IFS
4671
4672  ;;
4673esac
4674fi
4675FILE=$ac_cv_path_FILE
4676if test -n "$FILE"; then
4677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4678$as_echo "$FILE" >&6; }
4679else
4680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685  test -n "$FILE" && break
4686done
4687
4688
4689    if test "x$FILE" = x; then
4690        if test "xfile" = x; then
4691          PROG_NAME=file
4692        else
4693          PROG_NAME=file
4694        fi
4695        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4696$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4697        as_fn_error $? "Cannot continue" "$LINENO" 5
4698    fi
4699
4700
4701
4702    for ac_prog in find
4703do
4704  # Extract the first word of "$ac_prog", so it can be a program name with args.
4705set dummy $ac_prog; ac_word=$2
4706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4707$as_echo_n "checking for $ac_word... " >&6; }
4708if test "${ac_cv_path_FIND+set}" = set; then :
4709  $as_echo_n "(cached) " >&6
4710else
4711  case $FIND in
4712  [\\/]* | ?:[\\/]*)
4713  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4714  ;;
4715  *)
4716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4717for as_dir in $PATH
4718do
4719  IFS=$as_save_IFS
4720  test -z "$as_dir" && as_dir=.
4721    for ac_exec_ext in '' $ac_executable_extensions; do
4722  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4723    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4725    break 2
4726  fi
4727done
4728  done
4729IFS=$as_save_IFS
4730
4731  ;;
4732esac
4733fi
4734FIND=$ac_cv_path_FIND
4735if test -n "$FIND"; then
4736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4737$as_echo "$FIND" >&6; }
4738else
4739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4740$as_echo "no" >&6; }
4741fi
4742
4743
4744  test -n "$FIND" && break
4745done
4746
4747
4748    if test "x$FIND" = x; then
4749        if test "xfind" = x; then
4750          PROG_NAME=find
4751        else
4752          PROG_NAME=find
4753        fi
4754        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4755$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4756        as_fn_error $? "Cannot continue" "$LINENO" 5
4757    fi
4758
4759
4760
4761    for ac_prog in head
4762do
4763  # Extract the first word of "$ac_prog", so it can be a program name with args.
4764set dummy $ac_prog; ac_word=$2
4765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4766$as_echo_n "checking for $ac_word... " >&6; }
4767if test "${ac_cv_path_HEAD+set}" = set; then :
4768  $as_echo_n "(cached) " >&6
4769else
4770  case $HEAD in
4771  [\\/]* | ?:[\\/]*)
4772  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4773  ;;
4774  *)
4775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776for as_dir in $PATH
4777do
4778  IFS=$as_save_IFS
4779  test -z "$as_dir" && as_dir=.
4780    for ac_exec_ext in '' $ac_executable_extensions; do
4781  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4782    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4784    break 2
4785  fi
4786done
4787  done
4788IFS=$as_save_IFS
4789
4790  ;;
4791esac
4792fi
4793HEAD=$ac_cv_path_HEAD
4794if test -n "$HEAD"; then
4795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4796$as_echo "$HEAD" >&6; }
4797else
4798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799$as_echo "no" >&6; }
4800fi
4801
4802
4803  test -n "$HEAD" && break
4804done
4805
4806
4807    if test "x$HEAD" = x; then
4808        if test "xhead" = x; then
4809          PROG_NAME=head
4810        else
4811          PROG_NAME=head
4812        fi
4813        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4814$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4815        as_fn_error $? "Cannot continue" "$LINENO" 5
4816    fi
4817
4818
4819
4820    for ac_prog in ln
4821do
4822  # Extract the first word of "$ac_prog", so it can be a program name with args.
4823set dummy $ac_prog; ac_word=$2
4824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825$as_echo_n "checking for $ac_word... " >&6; }
4826if test "${ac_cv_path_LN+set}" = set; then :
4827  $as_echo_n "(cached) " >&6
4828else
4829  case $LN in
4830  [\\/]* | ?:[\\/]*)
4831  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4832  ;;
4833  *)
4834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835for as_dir in $PATH
4836do
4837  IFS=$as_save_IFS
4838  test -z "$as_dir" && as_dir=.
4839    for ac_exec_ext in '' $ac_executable_extensions; do
4840  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4841    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4843    break 2
4844  fi
4845done
4846  done
4847IFS=$as_save_IFS
4848
4849  ;;
4850esac
4851fi
4852LN=$ac_cv_path_LN
4853if test -n "$LN"; then
4854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4855$as_echo "$LN" >&6; }
4856else
4857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858$as_echo "no" >&6; }
4859fi
4860
4861
4862  test -n "$LN" && break
4863done
4864
4865
4866    if test "x$LN" = x; then
4867        if test "xln" = x; then
4868          PROG_NAME=ln
4869        else
4870          PROG_NAME=ln
4871        fi
4872        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4873$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4874        as_fn_error $? "Cannot continue" "$LINENO" 5
4875    fi
4876
4877
4878
4879    for ac_prog in ls
4880do
4881  # Extract the first word of "$ac_prog", so it can be a program name with args.
4882set dummy $ac_prog; ac_word=$2
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884$as_echo_n "checking for $ac_word... " >&6; }
4885if test "${ac_cv_path_LS+set}" = set; then :
4886  $as_echo_n "(cached) " >&6
4887else
4888  case $LS in
4889  [\\/]* | ?:[\\/]*)
4890  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4891  ;;
4892  *)
4893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894for as_dir in $PATH
4895do
4896  IFS=$as_save_IFS
4897  test -z "$as_dir" && as_dir=.
4898    for ac_exec_ext in '' $ac_executable_extensions; do
4899  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4900    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4902    break 2
4903  fi
4904done
4905  done
4906IFS=$as_save_IFS
4907
4908  ;;
4909esac
4910fi
4911LS=$ac_cv_path_LS
4912if test -n "$LS"; then
4913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4914$as_echo "$LS" >&6; }
4915else
4916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4917$as_echo "no" >&6; }
4918fi
4919
4920
4921  test -n "$LS" && break
4922done
4923
4924
4925    if test "x$LS" = x; then
4926        if test "xls" = x; then
4927          PROG_NAME=ls
4928        else
4929          PROG_NAME=ls
4930        fi
4931        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4932$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4933        as_fn_error $? "Cannot continue" "$LINENO" 5
4934    fi
4935
4936
4937
4938    for ac_prog in mkdir
4939do
4940  # Extract the first word of "$ac_prog", so it can be a program name with args.
4941set dummy $ac_prog; ac_word=$2
4942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4943$as_echo_n "checking for $ac_word... " >&6; }
4944if test "${ac_cv_path_MKDIR+set}" = set; then :
4945  $as_echo_n "(cached) " >&6
4946else
4947  case $MKDIR in
4948  [\\/]* | ?:[\\/]*)
4949  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4950  ;;
4951  *)
4952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4953for as_dir in $PATH
4954do
4955  IFS=$as_save_IFS
4956  test -z "$as_dir" && as_dir=.
4957    for ac_exec_ext in '' $ac_executable_extensions; do
4958  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4959    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4961    break 2
4962  fi
4963done
4964  done
4965IFS=$as_save_IFS
4966
4967  ;;
4968esac
4969fi
4970MKDIR=$ac_cv_path_MKDIR
4971if test -n "$MKDIR"; then
4972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4973$as_echo "$MKDIR" >&6; }
4974else
4975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4976$as_echo "no" >&6; }
4977fi
4978
4979
4980  test -n "$MKDIR" && break
4981done
4982
4983
4984    if test "x$MKDIR" = x; then
4985        if test "xmkdir" = x; then
4986          PROG_NAME=mkdir
4987        else
4988          PROG_NAME=mkdir
4989        fi
4990        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4991$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4992        as_fn_error $? "Cannot continue" "$LINENO" 5
4993    fi
4994
4995
4996
4997    for ac_prog in mktemp
4998do
4999  # Extract the first word of "$ac_prog", so it can be a program name with args.
5000set dummy $ac_prog; ac_word=$2
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if test "${ac_cv_path_MKTEMP+set}" = set; then :
5004  $as_echo_n "(cached) " >&6
5005else
5006  case $MKTEMP in
5007  [\\/]* | ?:[\\/]*)
5008  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5009  ;;
5010  *)
5011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in $PATH
5013do
5014  IFS=$as_save_IFS
5015  test -z "$as_dir" && as_dir=.
5016    for ac_exec_ext in '' $ac_executable_extensions; do
5017  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5018    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020    break 2
5021  fi
5022done
5023  done
5024IFS=$as_save_IFS
5025
5026  ;;
5027esac
5028fi
5029MKTEMP=$ac_cv_path_MKTEMP
5030if test -n "$MKTEMP"; then
5031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5032$as_echo "$MKTEMP" >&6; }
5033else
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038
5039  test -n "$MKTEMP" && break
5040done
5041
5042
5043    if test "x$MKTEMP" = x; then
5044        if test "xmktemp" = x; then
5045          PROG_NAME=mktemp
5046        else
5047          PROG_NAME=mktemp
5048        fi
5049        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5050$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5051        as_fn_error $? "Cannot continue" "$LINENO" 5
5052    fi
5053
5054
5055
5056    for ac_prog in mv
5057do
5058  # Extract the first word of "$ac_prog", so it can be a program name with args.
5059set dummy $ac_prog; ac_word=$2
5060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061$as_echo_n "checking for $ac_word... " >&6; }
5062if test "${ac_cv_path_MV+set}" = set; then :
5063  $as_echo_n "(cached) " >&6
5064else
5065  case $MV in
5066  [\\/]* | ?:[\\/]*)
5067  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5068  ;;
5069  *)
5070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071for as_dir in $PATH
5072do
5073  IFS=$as_save_IFS
5074  test -z "$as_dir" && as_dir=.
5075    for ac_exec_ext in '' $ac_executable_extensions; do
5076  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5077    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079    break 2
5080  fi
5081done
5082  done
5083IFS=$as_save_IFS
5084
5085  ;;
5086esac
5087fi
5088MV=$ac_cv_path_MV
5089if test -n "$MV"; then
5090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5091$as_echo "$MV" >&6; }
5092else
5093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094$as_echo "no" >&6; }
5095fi
5096
5097
5098  test -n "$MV" && break
5099done
5100
5101
5102    if test "x$MV" = x; then
5103        if test "xmv" = x; then
5104          PROG_NAME=mv
5105        else
5106          PROG_NAME=mv
5107        fi
5108        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5109$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5110        as_fn_error $? "Cannot continue" "$LINENO" 5
5111    fi
5112
5113
5114
5115    for ac_prog in printf
5116do
5117  # Extract the first word of "$ac_prog", so it can be a program name with args.
5118set dummy $ac_prog; ac_word=$2
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5120$as_echo_n "checking for $ac_word... " >&6; }
5121if test "${ac_cv_path_PRINTF+set}" = set; then :
5122  $as_echo_n "(cached) " >&6
5123else
5124  case $PRINTF in
5125  [\\/]* | ?:[\\/]*)
5126  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5127  ;;
5128  *)
5129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5130for as_dir in $PATH
5131do
5132  IFS=$as_save_IFS
5133  test -z "$as_dir" && as_dir=.
5134    for ac_exec_ext in '' $ac_executable_extensions; do
5135  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5136    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5138    break 2
5139  fi
5140done
5141  done
5142IFS=$as_save_IFS
5143
5144  ;;
5145esac
5146fi
5147PRINTF=$ac_cv_path_PRINTF
5148if test -n "$PRINTF"; then
5149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5150$as_echo "$PRINTF" >&6; }
5151else
5152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5153$as_echo "no" >&6; }
5154fi
5155
5156
5157  test -n "$PRINTF" && break
5158done
5159
5160
5161    if test "x$PRINTF" = x; then
5162        if test "xprintf" = x; then
5163          PROG_NAME=printf
5164        else
5165          PROG_NAME=printf
5166        fi
5167        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5168$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5169        as_fn_error $? "Cannot continue" "$LINENO" 5
5170    fi
5171
5172
5173
5174    for ac_prog in rm
5175do
5176  # Extract the first word of "$ac_prog", so it can be a program name with args.
5177set dummy $ac_prog; ac_word=$2
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5179$as_echo_n "checking for $ac_word... " >&6; }
5180if test "${ac_cv_path_RM+set}" = set; then :
5181  $as_echo_n "(cached) " >&6
5182else
5183  case $RM in
5184  [\\/]* | ?:[\\/]*)
5185  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5186  ;;
5187  *)
5188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5189for as_dir in $PATH
5190do
5191  IFS=$as_save_IFS
5192  test -z "$as_dir" && as_dir=.
5193    for ac_exec_ext in '' $ac_executable_extensions; do
5194  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5195    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5197    break 2
5198  fi
5199done
5200  done
5201IFS=$as_save_IFS
5202
5203  ;;
5204esac
5205fi
5206RM=$ac_cv_path_RM
5207if test -n "$RM"; then
5208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5209$as_echo "$RM" >&6; }
5210else
5211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5212$as_echo "no" >&6; }
5213fi
5214
5215
5216  test -n "$RM" && break
5217done
5218
5219
5220    if test "x$RM" = x; then
5221        if test "xrm" = x; then
5222          PROG_NAME=rm
5223        else
5224          PROG_NAME=rm
5225        fi
5226        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5227$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5228        as_fn_error $? "Cannot continue" "$LINENO" 5
5229    fi
5230
5231
5232
5233    for ac_prog in sh
5234do
5235  # Extract the first word of "$ac_prog", so it can be a program name with args.
5236set dummy $ac_prog; ac_word=$2
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5238$as_echo_n "checking for $ac_word... " >&6; }
5239if test "${ac_cv_path_SH+set}" = set; then :
5240  $as_echo_n "(cached) " >&6
5241else
5242  case $SH in
5243  [\\/]* | ?:[\\/]*)
5244  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5245  ;;
5246  *)
5247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5248for as_dir in $PATH
5249do
5250  IFS=$as_save_IFS
5251  test -z "$as_dir" && as_dir=.
5252    for ac_exec_ext in '' $ac_executable_extensions; do
5253  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5254    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5256    break 2
5257  fi
5258done
5259  done
5260IFS=$as_save_IFS
5261
5262  ;;
5263esac
5264fi
5265SH=$ac_cv_path_SH
5266if test -n "$SH"; then
5267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5268$as_echo "$SH" >&6; }
5269else
5270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5271$as_echo "no" >&6; }
5272fi
5273
5274
5275  test -n "$SH" && break
5276done
5277
5278
5279    if test "x$SH" = x; then
5280        if test "xsh" = x; then
5281          PROG_NAME=sh
5282        else
5283          PROG_NAME=sh
5284        fi
5285        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5286$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5287        as_fn_error $? "Cannot continue" "$LINENO" 5
5288    fi
5289
5290
5291
5292    for ac_prog in sort
5293do
5294  # Extract the first word of "$ac_prog", so it can be a program name with args.
5295set dummy $ac_prog; ac_word=$2
5296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297$as_echo_n "checking for $ac_word... " >&6; }
5298if test "${ac_cv_path_SORT+set}" = set; then :
5299  $as_echo_n "(cached) " >&6
5300else
5301  case $SORT in
5302  [\\/]* | ?:[\\/]*)
5303  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5304  ;;
5305  *)
5306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307for as_dir in $PATH
5308do
5309  IFS=$as_save_IFS
5310  test -z "$as_dir" && as_dir=.
5311    for ac_exec_ext in '' $ac_executable_extensions; do
5312  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5313    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5315    break 2
5316  fi
5317done
5318  done
5319IFS=$as_save_IFS
5320
5321  ;;
5322esac
5323fi
5324SORT=$ac_cv_path_SORT
5325if test -n "$SORT"; then
5326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5327$as_echo "$SORT" >&6; }
5328else
5329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }
5331fi
5332
5333
5334  test -n "$SORT" && break
5335done
5336
5337
5338    if test "x$SORT" = x; then
5339        if test "xsort" = x; then
5340          PROG_NAME=sort
5341        else
5342          PROG_NAME=sort
5343        fi
5344        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5345$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5346        as_fn_error $? "Cannot continue" "$LINENO" 5
5347    fi
5348
5349
5350
5351    for ac_prog in tail
5352do
5353  # Extract the first word of "$ac_prog", so it can be a program name with args.
5354set dummy $ac_prog; ac_word=$2
5355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356$as_echo_n "checking for $ac_word... " >&6; }
5357if test "${ac_cv_path_TAIL+set}" = set; then :
5358  $as_echo_n "(cached) " >&6
5359else
5360  case $TAIL in
5361  [\\/]* | ?:[\\/]*)
5362  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5363  ;;
5364  *)
5365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5366for as_dir in $PATH
5367do
5368  IFS=$as_save_IFS
5369  test -z "$as_dir" && as_dir=.
5370    for ac_exec_ext in '' $ac_executable_extensions; do
5371  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5372    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5374    break 2
5375  fi
5376done
5377  done
5378IFS=$as_save_IFS
5379
5380  ;;
5381esac
5382fi
5383TAIL=$ac_cv_path_TAIL
5384if test -n "$TAIL"; then
5385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5386$as_echo "$TAIL" >&6; }
5387else
5388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389$as_echo "no" >&6; }
5390fi
5391
5392
5393  test -n "$TAIL" && break
5394done
5395
5396
5397    if test "x$TAIL" = x; then
5398        if test "xtail" = x; then
5399          PROG_NAME=tail
5400        else
5401          PROG_NAME=tail
5402        fi
5403        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5404$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5405        as_fn_error $? "Cannot continue" "$LINENO" 5
5406    fi
5407
5408
5409
5410    for ac_prog in tar
5411do
5412  # Extract the first word of "$ac_prog", so it can be a program name with args.
5413set dummy $ac_prog; ac_word=$2
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5415$as_echo_n "checking for $ac_word... " >&6; }
5416if test "${ac_cv_path_TAR+set}" = set; then :
5417  $as_echo_n "(cached) " >&6
5418else
5419  case $TAR in
5420  [\\/]* | ?:[\\/]*)
5421  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5422  ;;
5423  *)
5424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5425for as_dir in $PATH
5426do
5427  IFS=$as_save_IFS
5428  test -z "$as_dir" && as_dir=.
5429    for ac_exec_ext in '' $ac_executable_extensions; do
5430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5431    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5433    break 2
5434  fi
5435done
5436  done
5437IFS=$as_save_IFS
5438
5439  ;;
5440esac
5441fi
5442TAR=$ac_cv_path_TAR
5443if test -n "$TAR"; then
5444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5445$as_echo "$TAR" >&6; }
5446else
5447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448$as_echo "no" >&6; }
5449fi
5450
5451
5452  test -n "$TAR" && break
5453done
5454
5455
5456    if test "x$TAR" = x; then
5457        if test "xtar" = x; then
5458          PROG_NAME=tar
5459        else
5460          PROG_NAME=tar
5461        fi
5462        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5463$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5464        as_fn_error $? "Cannot continue" "$LINENO" 5
5465    fi
5466
5467
5468
5469    for ac_prog in tee
5470do
5471  # Extract the first word of "$ac_prog", so it can be a program name with args.
5472set dummy $ac_prog; ac_word=$2
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474$as_echo_n "checking for $ac_word... " >&6; }
5475if test "${ac_cv_path_TEE+set}" = set; then :
5476  $as_echo_n "(cached) " >&6
5477else
5478  case $TEE in
5479  [\\/]* | ?:[\\/]*)
5480  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5481  ;;
5482  *)
5483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486  IFS=$as_save_IFS
5487  test -z "$as_dir" && as_dir=.
5488    for ac_exec_ext in '' $ac_executable_extensions; do
5489  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5490    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492    break 2
5493  fi
5494done
5495  done
5496IFS=$as_save_IFS
5497
5498  ;;
5499esac
5500fi
5501TEE=$ac_cv_path_TEE
5502if test -n "$TEE"; then
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5504$as_echo "$TEE" >&6; }
5505else
5506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507$as_echo "no" >&6; }
5508fi
5509
5510
5511  test -n "$TEE" && break
5512done
5513
5514
5515    if test "x$TEE" = x; then
5516        if test "xtee" = x; then
5517          PROG_NAME=tee
5518        else
5519          PROG_NAME=tee
5520        fi
5521        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5522$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5523        as_fn_error $? "Cannot continue" "$LINENO" 5
5524    fi
5525
5526
5527
5528    for ac_prog in touch
5529do
5530  # Extract the first word of "$ac_prog", so it can be a program name with args.
5531set dummy $ac_prog; ac_word=$2
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533$as_echo_n "checking for $ac_word... " >&6; }
5534if test "${ac_cv_path_TOUCH+set}" = set; then :
5535  $as_echo_n "(cached) " >&6
5536else
5537  case $TOUCH in
5538  [\\/]* | ?:[\\/]*)
5539  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5540  ;;
5541  *)
5542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5543for as_dir in $PATH
5544do
5545  IFS=$as_save_IFS
5546  test -z "$as_dir" && as_dir=.
5547    for ac_exec_ext in '' $ac_executable_extensions; do
5548  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5549    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5551    break 2
5552  fi
5553done
5554  done
5555IFS=$as_save_IFS
5556
5557  ;;
5558esac
5559fi
5560TOUCH=$ac_cv_path_TOUCH
5561if test -n "$TOUCH"; then
5562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5563$as_echo "$TOUCH" >&6; }
5564else
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566$as_echo "no" >&6; }
5567fi
5568
5569
5570  test -n "$TOUCH" && break
5571done
5572
5573
5574    if test "x$TOUCH" = x; then
5575        if test "xtouch" = x; then
5576          PROG_NAME=touch
5577        else
5578          PROG_NAME=touch
5579        fi
5580        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5581$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5582        as_fn_error $? "Cannot continue" "$LINENO" 5
5583    fi
5584
5585
5586
5587    for ac_prog in tr
5588do
5589  # Extract the first word of "$ac_prog", so it can be a program name with args.
5590set dummy $ac_prog; ac_word=$2
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5592$as_echo_n "checking for $ac_word... " >&6; }
5593if test "${ac_cv_path_TR+set}" = set; then :
5594  $as_echo_n "(cached) " >&6
5595else
5596  case $TR in
5597  [\\/]* | ?:[\\/]*)
5598  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5599  ;;
5600  *)
5601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5602for as_dir in $PATH
5603do
5604  IFS=$as_save_IFS
5605  test -z "$as_dir" && as_dir=.
5606    for ac_exec_ext in '' $ac_executable_extensions; do
5607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5608    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5610    break 2
5611  fi
5612done
5613  done
5614IFS=$as_save_IFS
5615
5616  ;;
5617esac
5618fi
5619TR=$ac_cv_path_TR
5620if test -n "$TR"; then
5621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5622$as_echo "$TR" >&6; }
5623else
5624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5625$as_echo "no" >&6; }
5626fi
5627
5628
5629  test -n "$TR" && break
5630done
5631
5632
5633    if test "x$TR" = x; then
5634        if test "xtr" = x; then
5635          PROG_NAME=tr
5636        else
5637          PROG_NAME=tr
5638        fi
5639        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5640$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5641        as_fn_error $? "Cannot continue" "$LINENO" 5
5642    fi
5643
5644
5645
5646    for ac_prog in uname
5647do
5648  # Extract the first word of "$ac_prog", so it can be a program name with args.
5649set dummy $ac_prog; ac_word=$2
5650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5651$as_echo_n "checking for $ac_word... " >&6; }
5652if test "${ac_cv_path_UNAME+set}" = set; then :
5653  $as_echo_n "(cached) " >&6
5654else
5655  case $UNAME in
5656  [\\/]* | ?:[\\/]*)
5657  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5658  ;;
5659  *)
5660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661for as_dir in $PATH
5662do
5663  IFS=$as_save_IFS
5664  test -z "$as_dir" && as_dir=.
5665    for ac_exec_ext in '' $ac_executable_extensions; do
5666  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5667    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669    break 2
5670  fi
5671done
5672  done
5673IFS=$as_save_IFS
5674
5675  ;;
5676esac
5677fi
5678UNAME=$ac_cv_path_UNAME
5679if test -n "$UNAME"; then
5680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5681$as_echo "$UNAME" >&6; }
5682else
5683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684$as_echo "no" >&6; }
5685fi
5686
5687
5688  test -n "$UNAME" && break
5689done
5690
5691
5692    if test "x$UNAME" = x; then
5693        if test "xuname" = x; then
5694          PROG_NAME=uname
5695        else
5696          PROG_NAME=uname
5697        fi
5698        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5699$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5700        as_fn_error $? "Cannot continue" "$LINENO" 5
5701    fi
5702
5703
5704
5705    for ac_prog in uniq
5706do
5707  # Extract the first word of "$ac_prog", so it can be a program name with args.
5708set dummy $ac_prog; ac_word=$2
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
5711if test "${ac_cv_path_UNIQ+set}" = set; then :
5712  $as_echo_n "(cached) " >&6
5713else
5714  case $UNIQ in
5715  [\\/]* | ?:[\\/]*)
5716  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5717  ;;
5718  *)
5719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722  IFS=$as_save_IFS
5723  test -z "$as_dir" && as_dir=.
5724    for ac_exec_ext in '' $ac_executable_extensions; do
5725  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5726    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728    break 2
5729  fi
5730done
5731  done
5732IFS=$as_save_IFS
5733
5734  ;;
5735esac
5736fi
5737UNIQ=$ac_cv_path_UNIQ
5738if test -n "$UNIQ"; then
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5740$as_echo "$UNIQ" >&6; }
5741else
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
5744fi
5745
5746
5747  test -n "$UNIQ" && break
5748done
5749
5750
5751    if test "x$UNIQ" = x; then
5752        if test "xuniq" = x; then
5753          PROG_NAME=uniq
5754        else
5755          PROG_NAME=uniq
5756        fi
5757        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5758$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5759        as_fn_error $? "Cannot continue" "$LINENO" 5
5760    fi
5761
5762
5763
5764    for ac_prog in wc
5765do
5766  # Extract the first word of "$ac_prog", so it can be a program name with args.
5767set dummy $ac_prog; ac_word=$2
5768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5769$as_echo_n "checking for $ac_word... " >&6; }
5770if test "${ac_cv_path_WC+set}" = set; then :
5771  $as_echo_n "(cached) " >&6
5772else
5773  case $WC in
5774  [\\/]* | ?:[\\/]*)
5775  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5776  ;;
5777  *)
5778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5779for as_dir in $PATH
5780do
5781  IFS=$as_save_IFS
5782  test -z "$as_dir" && as_dir=.
5783    for ac_exec_ext in '' $ac_executable_extensions; do
5784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5785    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5787    break 2
5788  fi
5789done
5790  done
5791IFS=$as_save_IFS
5792
5793  ;;
5794esac
5795fi
5796WC=$ac_cv_path_WC
5797if test -n "$WC"; then
5798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5799$as_echo "$WC" >&6; }
5800else
5801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5802$as_echo "no" >&6; }
5803fi
5804
5805
5806  test -n "$WC" && break
5807done
5808
5809
5810    if test "x$WC" = x; then
5811        if test "xwc" = x; then
5812          PROG_NAME=wc
5813        else
5814          PROG_NAME=wc
5815        fi
5816        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5817$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5818        as_fn_error $? "Cannot continue" "$LINENO" 5
5819    fi
5820
5821
5822
5823    for ac_prog in which
5824do
5825  # Extract the first word of "$ac_prog", so it can be a program name with args.
5826set dummy $ac_prog; ac_word=$2
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5828$as_echo_n "checking for $ac_word... " >&6; }
5829if test "${ac_cv_path_WHICH+set}" = set; then :
5830  $as_echo_n "(cached) " >&6
5831else
5832  case $WHICH in
5833  [\\/]* | ?:[\\/]*)
5834  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5835  ;;
5836  *)
5837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838for as_dir in $PATH
5839do
5840  IFS=$as_save_IFS
5841  test -z "$as_dir" && as_dir=.
5842    for ac_exec_ext in '' $ac_executable_extensions; do
5843  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5844    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5846    break 2
5847  fi
5848done
5849  done
5850IFS=$as_save_IFS
5851
5852  ;;
5853esac
5854fi
5855WHICH=$ac_cv_path_WHICH
5856if test -n "$WHICH"; then
5857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5858$as_echo "$WHICH" >&6; }
5859else
5860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861$as_echo "no" >&6; }
5862fi
5863
5864
5865  test -n "$WHICH" && break
5866done
5867
5868
5869    if test "x$WHICH" = x; then
5870        if test "xwhich" = x; then
5871          PROG_NAME=which
5872        else
5873          PROG_NAME=which
5874        fi
5875        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5876$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5877        as_fn_error $? "Cannot continue" "$LINENO" 5
5878    fi
5879
5880
5881
5882    for ac_prog in xargs
5883do
5884  # Extract the first word of "$ac_prog", so it can be a program name with args.
5885set dummy $ac_prog; ac_word=$2
5886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887$as_echo_n "checking for $ac_word... " >&6; }
5888if test "${ac_cv_path_XARGS+set}" = set; then :
5889  $as_echo_n "(cached) " >&6
5890else
5891  case $XARGS in
5892  [\\/]* | ?:[\\/]*)
5893  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5894  ;;
5895  *)
5896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH
5898do
5899  IFS=$as_save_IFS
5900  test -z "$as_dir" && as_dir=.
5901    for ac_exec_ext in '' $ac_executable_extensions; do
5902  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5903    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5905    break 2
5906  fi
5907done
5908  done
5909IFS=$as_save_IFS
5910
5911  ;;
5912esac
5913fi
5914XARGS=$ac_cv_path_XARGS
5915if test -n "$XARGS"; then
5916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5917$as_echo "$XARGS" >&6; }
5918else
5919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }
5921fi
5922
5923
5924  test -n "$XARGS" && break
5925done
5926
5927
5928    if test "x$XARGS" = x; then
5929        if test "xxargs" = x; then
5930          PROG_NAME=xargs
5931        else
5932          PROG_NAME=xargs
5933        fi
5934        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5935$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5936        as_fn_error $? "Cannot continue" "$LINENO" 5
5937    fi
5938
5939
5940
5941# Then required tools that require some special treatment.
5942for ac_prog in gawk mawk nawk awk
5943do
5944  # Extract the first word of "$ac_prog", so it can be a program name with args.
5945set dummy $ac_prog; ac_word=$2
5946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947$as_echo_n "checking for $ac_word... " >&6; }
5948if test "${ac_cv_prog_AWK+set}" = set; then :
5949  $as_echo_n "(cached) " >&6
5950else
5951  if test -n "$AWK"; then
5952  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5953else
5954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955for as_dir in $PATH
5956do
5957  IFS=$as_save_IFS
5958  test -z "$as_dir" && as_dir=.
5959    for ac_exec_ext in '' $ac_executable_extensions; do
5960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5961    ac_cv_prog_AWK="$ac_prog"
5962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5963    break 2
5964  fi
5965done
5966  done
5967IFS=$as_save_IFS
5968
5969fi
5970fi
5971AWK=$ac_cv_prog_AWK
5972if test -n "$AWK"; then
5973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5974$as_echo "$AWK" >&6; }
5975else
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
5978fi
5979
5980
5981  test -n "$AWK" && break
5982done
5983
5984
5985    if test "x$AWK" = x; then
5986        if test "x" = x; then
5987          PROG_NAME=awk
5988        else
5989          PROG_NAME=
5990        fi
5991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5993        as_fn_error $? "Cannot continue" "$LINENO" 5
5994    fi
5995
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5997$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5998if test "${ac_cv_path_GREP+set}" = set; then :
5999  $as_echo_n "(cached) " >&6
6000else
6001  if test -z "$GREP"; then
6002  ac_path_GREP_found=false
6003  # Loop through the user's path and test for each of PROGNAME-LIST
6004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6006do
6007  IFS=$as_save_IFS
6008  test -z "$as_dir" && as_dir=.
6009    for ac_prog in grep ggrep; do
6010    for ac_exec_ext in '' $ac_executable_extensions; do
6011      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6012      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6013# Check for GNU ac_path_GREP and select it if it is found.
6014  # Check for GNU $ac_path_GREP
6015case `"$ac_path_GREP" --version 2>&1` in
6016*GNU*)
6017  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6018*)
6019  ac_count=0
6020  $as_echo_n 0123456789 >"conftest.in"
6021  while :
6022  do
6023    cat "conftest.in" "conftest.in" >"conftest.tmp"
6024    mv "conftest.tmp" "conftest.in"
6025    cp "conftest.in" "conftest.nl"
6026    $as_echo 'GREP' >> "conftest.nl"
6027    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6028    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6029    as_fn_arith $ac_count + 1 && ac_count=$as_val
6030    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6031      # Best one so far, save it but keep looking for a better one
6032      ac_cv_path_GREP="$ac_path_GREP"
6033      ac_path_GREP_max=$ac_count
6034    fi
6035    # 10*(2^10) chars as input seems more than enough
6036    test $ac_count -gt 10 && break
6037  done
6038  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6039esac
6040
6041      $ac_path_GREP_found && break 3
6042    done
6043  done
6044  done
6045IFS=$as_save_IFS
6046  if test -z "$ac_cv_path_GREP"; then
6047    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6048  fi
6049else
6050  ac_cv_path_GREP=$GREP
6051fi
6052
6053fi
6054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6055$as_echo "$ac_cv_path_GREP" >&6; }
6056 GREP="$ac_cv_path_GREP"
6057
6058
6059
6060    if test "x$GREP" = x; then
6061        if test "x" = x; then
6062          PROG_NAME=grep
6063        else
6064          PROG_NAME=
6065        fi
6066        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6067$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6068        as_fn_error $? "Cannot continue" "$LINENO" 5
6069    fi
6070
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6072$as_echo_n "checking for egrep... " >&6; }
6073if test "${ac_cv_path_EGREP+set}" = set; then :
6074  $as_echo_n "(cached) " >&6
6075else
6076  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6077   then ac_cv_path_EGREP="$GREP -E"
6078   else
6079     if test -z "$EGREP"; then
6080  ac_path_EGREP_found=false
6081  # Loop through the user's path and test for each of PROGNAME-LIST
6082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6084do
6085  IFS=$as_save_IFS
6086  test -z "$as_dir" && as_dir=.
6087    for ac_prog in egrep; do
6088    for ac_exec_ext in '' $ac_executable_extensions; do
6089      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6090      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6091# Check for GNU ac_path_EGREP and select it if it is found.
6092  # Check for GNU $ac_path_EGREP
6093case `"$ac_path_EGREP" --version 2>&1` in
6094*GNU*)
6095  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6096*)
6097  ac_count=0
6098  $as_echo_n 0123456789 >"conftest.in"
6099  while :
6100  do
6101    cat "conftest.in" "conftest.in" >"conftest.tmp"
6102    mv "conftest.tmp" "conftest.in"
6103    cp "conftest.in" "conftest.nl"
6104    $as_echo 'EGREP' >> "conftest.nl"
6105    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6106    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6107    as_fn_arith $ac_count + 1 && ac_count=$as_val
6108    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6109      # Best one so far, save it but keep looking for a better one
6110      ac_cv_path_EGREP="$ac_path_EGREP"
6111      ac_path_EGREP_max=$ac_count
6112    fi
6113    # 10*(2^10) chars as input seems more than enough
6114    test $ac_count -gt 10 && break
6115  done
6116  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6117esac
6118
6119      $ac_path_EGREP_found && break 3
6120    done
6121  done
6122  done
6123IFS=$as_save_IFS
6124  if test -z "$ac_cv_path_EGREP"; then
6125    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6126  fi
6127else
6128  ac_cv_path_EGREP=$EGREP
6129fi
6130
6131   fi
6132fi
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6134$as_echo "$ac_cv_path_EGREP" >&6; }
6135 EGREP="$ac_cv_path_EGREP"
6136
6137
6138
6139    if test "x$EGREP" = x; then
6140        if test "x" = x; then
6141          PROG_NAME=egrep
6142        else
6143          PROG_NAME=
6144        fi
6145        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6146$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6147        as_fn_error $? "Cannot continue" "$LINENO" 5
6148    fi
6149
6150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6151$as_echo_n "checking for fgrep... " >&6; }
6152if test "${ac_cv_path_FGREP+set}" = set; then :
6153  $as_echo_n "(cached) " >&6
6154else
6155  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6156   then ac_cv_path_FGREP="$GREP -F"
6157   else
6158     if test -z "$FGREP"; then
6159  ac_path_FGREP_found=false
6160  # Loop through the user's path and test for each of PROGNAME-LIST
6161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6163do
6164  IFS=$as_save_IFS
6165  test -z "$as_dir" && as_dir=.
6166    for ac_prog in fgrep; do
6167    for ac_exec_ext in '' $ac_executable_extensions; do
6168      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6169      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6170# Check for GNU ac_path_FGREP and select it if it is found.
6171  # Check for GNU $ac_path_FGREP
6172case `"$ac_path_FGREP" --version 2>&1` in
6173*GNU*)
6174  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6175*)
6176  ac_count=0
6177  $as_echo_n 0123456789 >"conftest.in"
6178  while :
6179  do
6180    cat "conftest.in" "conftest.in" >"conftest.tmp"
6181    mv "conftest.tmp" "conftest.in"
6182    cp "conftest.in" "conftest.nl"
6183    $as_echo 'FGREP' >> "conftest.nl"
6184    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6185    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6186    as_fn_arith $ac_count + 1 && ac_count=$as_val
6187    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6188      # Best one so far, save it but keep looking for a better one
6189      ac_cv_path_FGREP="$ac_path_FGREP"
6190      ac_path_FGREP_max=$ac_count
6191    fi
6192    # 10*(2^10) chars as input seems more than enough
6193    test $ac_count -gt 10 && break
6194  done
6195  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6196esac
6197
6198      $ac_path_FGREP_found && break 3
6199    done
6200  done
6201  done
6202IFS=$as_save_IFS
6203  if test -z "$ac_cv_path_FGREP"; then
6204    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6205  fi
6206else
6207  ac_cv_path_FGREP=$FGREP
6208fi
6209
6210   fi
6211fi
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6213$as_echo "$ac_cv_path_FGREP" >&6; }
6214 FGREP="$ac_cv_path_FGREP"
6215
6216
6217
6218    if test "x$FGREP" = x; then
6219        if test "x" = x; then
6220          PROG_NAME=fgrep
6221        else
6222          PROG_NAME=
6223        fi
6224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6225$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6226        as_fn_error $? "Cannot continue" "$LINENO" 5
6227    fi
6228
6229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6230$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6231if test "${ac_cv_path_SED+set}" = set; then :
6232  $as_echo_n "(cached) " >&6
6233else
6234            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6235     for ac_i in 1 2 3 4 5 6 7; do
6236       ac_script="$ac_script$as_nl$ac_script"
6237     done
6238     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6239     { ac_script=; unset ac_script;}
6240     if test -z "$SED"; then
6241  ac_path_SED_found=false
6242  # Loop through the user's path and test for each of PROGNAME-LIST
6243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6244for as_dir in $PATH
6245do
6246  IFS=$as_save_IFS
6247  test -z "$as_dir" && as_dir=.
6248    for ac_prog in sed gsed; do
6249    for ac_exec_ext in '' $ac_executable_extensions; do
6250      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6251      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6252# Check for GNU ac_path_SED and select it if it is found.
6253  # Check for GNU $ac_path_SED
6254case `"$ac_path_SED" --version 2>&1` in
6255*GNU*)
6256  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6257*)
6258  ac_count=0
6259  $as_echo_n 0123456789 >"conftest.in"
6260  while :
6261  do
6262    cat "conftest.in" "conftest.in" >"conftest.tmp"
6263    mv "conftest.tmp" "conftest.in"
6264    cp "conftest.in" "conftest.nl"
6265    $as_echo '' >> "conftest.nl"
6266    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6267    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6268    as_fn_arith $ac_count + 1 && ac_count=$as_val
6269    if test $ac_count -gt ${ac_path_SED_max-0}; then
6270      # Best one so far, save it but keep looking for a better one
6271      ac_cv_path_SED="$ac_path_SED"
6272      ac_path_SED_max=$ac_count
6273    fi
6274    # 10*(2^10) chars as input seems more than enough
6275    test $ac_count -gt 10 && break
6276  done
6277  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6278esac
6279
6280      $ac_path_SED_found && break 3
6281    done
6282  done
6283  done
6284IFS=$as_save_IFS
6285  if test -z "$ac_cv_path_SED"; then
6286    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6287  fi
6288else
6289  ac_cv_path_SED=$SED
6290fi
6291
6292fi
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6294$as_echo "$ac_cv_path_SED" >&6; }
6295 SED="$ac_cv_path_SED"
6296  rm -f conftest.sed
6297
6298
6299    if test "x$SED" = x; then
6300        if test "x" = x; then
6301          PROG_NAME=sed
6302        else
6303          PROG_NAME=
6304        fi
6305        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6306$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6307        as_fn_error $? "Cannot continue" "$LINENO" 5
6308    fi
6309
6310
6311for ac_prog in nawk gawk awk
6312do
6313  # Extract the first word of "$ac_prog", so it can be a program name with args.
6314set dummy $ac_prog; ac_word=$2
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6316$as_echo_n "checking for $ac_word... " >&6; }
6317if test "${ac_cv_path_NAWK+set}" = set; then :
6318  $as_echo_n "(cached) " >&6
6319else
6320  case $NAWK in
6321  [\\/]* | ?:[\\/]*)
6322  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6323  ;;
6324  *)
6325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6326for as_dir in $PATH
6327do
6328  IFS=$as_save_IFS
6329  test -z "$as_dir" && as_dir=.
6330    for ac_exec_ext in '' $ac_executable_extensions; do
6331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6332    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6334    break 2
6335  fi
6336done
6337  done
6338IFS=$as_save_IFS
6339
6340  ;;
6341esac
6342fi
6343NAWK=$ac_cv_path_NAWK
6344if test -n "$NAWK"; then
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6346$as_echo "$NAWK" >&6; }
6347else
6348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349$as_echo "no" >&6; }
6350fi
6351
6352
6353  test -n "$NAWK" && break
6354done
6355
6356
6357    if test "x$NAWK" = x; then
6358        if test "x" = x; then
6359          PROG_NAME=nawk
6360        else
6361          PROG_NAME=
6362        fi
6363        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6364$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6365        as_fn_error $? "Cannot continue" "$LINENO" 5
6366    fi
6367
6368
6369# Always force rm.
6370RM="$RM -f"
6371
6372# pwd behaves differently on various platforms and some don't support the -L flag.
6373# Always use the bash builtin pwd to get uniform behavior.
6374THEPWDCMD=pwd
6375
6376# These are not required on all platforms
6377# Extract the first word of "cygpath", so it can be a program name with args.
6378set dummy cygpath; ac_word=$2
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380$as_echo_n "checking for $ac_word... " >&6; }
6381if test "${ac_cv_path_CYGPATH+set}" = set; then :
6382  $as_echo_n "(cached) " >&6
6383else
6384  case $CYGPATH in
6385  [\\/]* | ?:[\\/]*)
6386  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6387  ;;
6388  *)
6389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390for as_dir in $PATH
6391do
6392  IFS=$as_save_IFS
6393  test -z "$as_dir" && as_dir=.
6394    for ac_exec_ext in '' $ac_executable_extensions; do
6395  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6396    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398    break 2
6399  fi
6400done
6401  done
6402IFS=$as_save_IFS
6403
6404  ;;
6405esac
6406fi
6407CYGPATH=$ac_cv_path_CYGPATH
6408if test -n "$CYGPATH"; then
6409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6410$as_echo "$CYGPATH" >&6; }
6411else
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413$as_echo "no" >&6; }
6414fi
6415
6416
6417# Extract the first word of "readlink", so it can be a program name with args.
6418set dummy readlink; ac_word=$2
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6420$as_echo_n "checking for $ac_word... " >&6; }
6421if test "${ac_cv_path_READLINK+set}" = set; then :
6422  $as_echo_n "(cached) " >&6
6423else
6424  case $READLINK in
6425  [\\/]* | ?:[\\/]*)
6426  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6427  ;;
6428  *)
6429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430for as_dir in $PATH
6431do
6432  IFS=$as_save_IFS
6433  test -z "$as_dir" && as_dir=.
6434    for ac_exec_ext in '' $ac_executable_extensions; do
6435  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6436    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6438    break 2
6439  fi
6440done
6441  done
6442IFS=$as_save_IFS
6443
6444  ;;
6445esac
6446fi
6447READLINK=$ac_cv_path_READLINK
6448if test -n "$READLINK"; then
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6450$as_echo "$READLINK" >&6; }
6451else
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }
6454fi
6455
6456
6457# Extract the first word of "df", so it can be a program name with args.
6458set dummy df; ac_word=$2
6459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6460$as_echo_n "checking for $ac_word... " >&6; }
6461if test "${ac_cv_path_DF+set}" = set; then :
6462  $as_echo_n "(cached) " >&6
6463else
6464  case $DF in
6465  [\\/]* | ?:[\\/]*)
6466  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6467  ;;
6468  *)
6469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6470for as_dir in $PATH
6471do
6472  IFS=$as_save_IFS
6473  test -z "$as_dir" && as_dir=.
6474    for ac_exec_ext in '' $ac_executable_extensions; do
6475  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6476    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6478    break 2
6479  fi
6480done
6481  done
6482IFS=$as_save_IFS
6483
6484  ;;
6485esac
6486fi
6487DF=$ac_cv_path_DF
6488if test -n "$DF"; then
6489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6490$as_echo "$DF" >&6; }
6491else
6492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493$as_echo "no" >&6; }
6494fi
6495
6496
6497# Extract the first word of "SetFile", so it can be a program name with args.
6498set dummy SetFile; ac_word=$2
6499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500$as_echo_n "checking for $ac_word... " >&6; }
6501if test "${ac_cv_path_SETFILE+set}" = set; then :
6502  $as_echo_n "(cached) " >&6
6503else
6504  case $SETFILE in
6505  [\\/]* | ?:[\\/]*)
6506  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6507  ;;
6508  *)
6509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510for as_dir in $PATH
6511do
6512  IFS=$as_save_IFS
6513  test -z "$as_dir" && as_dir=.
6514    for ac_exec_ext in '' $ac_executable_extensions; do
6515  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6516    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518    break 2
6519  fi
6520done
6521  done
6522IFS=$as_save_IFS
6523
6524  ;;
6525esac
6526fi
6527SETFILE=$ac_cv_path_SETFILE
6528if test -n "$SETFILE"; then
6529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6530$as_echo "$SETFILE" >&6; }
6531else
6532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533$as_echo "no" >&6; }
6534fi
6535
6536
6537
6538
6539# Now we can determine OpenJDK build and target platforms. This is required to
6540# have early on.
6541# Make sure we can run config.sub.
6542$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6543  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6544
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6546$as_echo_n "checking build system type... " >&6; }
6547if test "${ac_cv_build+set}" = set; then :
6548  $as_echo_n "(cached) " >&6
6549else
6550  ac_build_alias=$build_alias
6551test "x$ac_build_alias" = x &&
6552  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6553test "x$ac_build_alias" = x &&
6554  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6555ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6556  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6557
6558fi
6559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6560$as_echo "$ac_cv_build" >&6; }
6561case $ac_cv_build in
6562*-*-*) ;;
6563*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6564esac
6565build=$ac_cv_build
6566ac_save_IFS=$IFS; IFS='-'
6567set x $ac_cv_build
6568shift
6569build_cpu=$1
6570build_vendor=$2
6571shift; shift
6572# Remember, the first character of IFS is used to create $*,
6573# except with old shells:
6574build_os=$*
6575IFS=$ac_save_IFS
6576case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6577
6578
6579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6580$as_echo_n "checking host system type... " >&6; }
6581if test "${ac_cv_host+set}" = set; then :
6582  $as_echo_n "(cached) " >&6
6583else
6584  if test "x$host_alias" = x; then
6585  ac_cv_host=$ac_cv_build
6586else
6587  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6588    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6589fi
6590
6591fi
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6593$as_echo "$ac_cv_host" >&6; }
6594case $ac_cv_host in
6595*-*-*) ;;
6596*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6597esac
6598host=$ac_cv_host
6599ac_save_IFS=$IFS; IFS='-'
6600set x $ac_cv_host
6601shift
6602host_cpu=$1
6603host_vendor=$2
6604shift; shift
6605# Remember, the first character of IFS is used to create $*,
6606# except with old shells:
6607host_os=$*
6608IFS=$ac_save_IFS
6609case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6610
6611
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6613$as_echo_n "checking target system type... " >&6; }
6614if test "${ac_cv_target+set}" = set; then :
6615  $as_echo_n "(cached) " >&6
6616else
6617  if test "x$target_alias" = x; then
6618  ac_cv_target=$ac_cv_host
6619else
6620  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6621    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6622fi
6623
6624fi
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6626$as_echo "$ac_cv_target" >&6; }
6627case $ac_cv_target in
6628*-*-*) ;;
6629*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6630esac
6631target=$ac_cv_target
6632ac_save_IFS=$IFS; IFS='-'
6633set x $ac_cv_target
6634shift
6635target_cpu=$1
6636target_vendor=$2
6637shift; shift
6638# Remember, the first character of IFS is used to create $*,
6639# except with old shells:
6640target_os=$*
6641IFS=$ac_save_IFS
6642case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6643
6644
6645# The aliases save the names the user supplied, while $host etc.
6646# will get canonicalized.
6647test -n "$target_alias" &&
6648  test "$program_prefix$program_suffix$program_transform_name" = \
6649    NONENONEs,x,x, &&
6650  program_prefix=${target_alias}-
6651
6652# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6653# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6654# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6655# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6656# to use the configure naming style.
6657
6658
6659
6660
6661
6662    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6663    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6664    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6665    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6666    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6667    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6668
6669
6670
6671    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6672
6673  case "$build_os" in
6674    *linux*)
6675      VAR_OS=linux
6676      VAR_OS_API=posix
6677      VAR_OS_ENV=linux
6678      ;;
6679    *solaris*)
6680      VAR_OS=solaris
6681      VAR_OS_API=posix
6682      VAR_OS_ENV=solaris
6683      ;;
6684    *darwin*)
6685      VAR_OS=macosx
6686      VAR_OS_API=posix
6687      VAR_OS_ENV=macosx
6688      ;;
6689    *bsd*)
6690      VAR_OS=bsd
6691      VAR_OS_API=posix
6692      VAR_OS_ENV=bsd
6693      ;;
6694    *cygwin*)
6695      VAR_OS=windows
6696      VAR_OS_API=winapi
6697      VAR_OS_ENV=windows.cygwin
6698      ;;
6699    *mingw*)
6700      VAR_OS=windows
6701      VAR_OS_API=winapi
6702      VAR_OS_ENV=windows.msys
6703      ;;
6704    *)
6705      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6706      ;;
6707  esac
6708
6709
6710  # First argument is the cpu name from the trip/quad
6711  case "$build_cpu" in
6712    x86_64)
6713      VAR_CPU=x86_64
6714      VAR_CPU_ARCH=x86
6715      VAR_CPU_BITS=64
6716      VAR_CPU_ENDIAN=little
6717      ;;
6718    i?86)
6719      VAR_CPU=x86
6720      VAR_CPU_ARCH=x86
6721      VAR_CPU_BITS=32
6722      VAR_CPU_ENDIAN=little
6723      ;;
6724    arm*)
6725      VAR_CPU=arm
6726      VAR_CPU_ARCH=arm
6727      VAR_CPU_BITS=32
6728      VAR_CPU_ENDIAN=little
6729      ;;
6730    powerpc)
6731      VAR_CPU=ppc
6732      VAR_CPU_ARCH=ppc
6733      VAR_CPU_BITS=32
6734      VAR_CPU_ENDIAN=big
6735       ;;
6736    powerpc64)
6737      VAR_CPU=ppc64
6738      VAR_CPU_ARCH=ppc
6739      VAR_CPU_BITS=64
6740      VAR_CPU_ENDIAN=big
6741       ;;
6742    sparc)
6743      VAR_CPU=sparc
6744      VAR_CPU_ARCH=sparc
6745      VAR_CPU_BITS=32
6746      VAR_CPU_ENDIAN=big
6747       ;;
6748    sparcv9)
6749      VAR_CPU=sparcv9
6750      VAR_CPU_ARCH=sparc
6751      VAR_CPU_BITS=64
6752      VAR_CPU_ENDIAN=big
6753       ;;
6754    *)
6755      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6756      ;;
6757  esac
6758
6759    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6760    OPENJDK_BUILD_OS="$VAR_OS"
6761    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6762    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6763    OPENJDK_BUILD_CPU="$VAR_CPU"
6764    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6765    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6766    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6767
6768
6769
6770
6771
6772
6773
6774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6775$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6777$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6778
6779    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6780
6781  case "$host_os" in
6782    *linux*)
6783      VAR_OS=linux
6784      VAR_OS_API=posix
6785      VAR_OS_ENV=linux
6786      ;;
6787    *solaris*)
6788      VAR_OS=solaris
6789      VAR_OS_API=posix
6790      VAR_OS_ENV=solaris
6791      ;;
6792    *darwin*)
6793      VAR_OS=macosx
6794      VAR_OS_API=posix
6795      VAR_OS_ENV=macosx
6796      ;;
6797    *bsd*)
6798      VAR_OS=bsd
6799      VAR_OS_API=posix
6800      VAR_OS_ENV=bsd
6801      ;;
6802    *cygwin*)
6803      VAR_OS=windows
6804      VAR_OS_API=winapi
6805      VAR_OS_ENV=windows.cygwin
6806      ;;
6807    *mingw*)
6808      VAR_OS=windows
6809      VAR_OS_API=winapi
6810      VAR_OS_ENV=windows.msys
6811      ;;
6812    *)
6813      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6814      ;;
6815  esac
6816
6817
6818  # First argument is the cpu name from the trip/quad
6819  case "$host_cpu" in
6820    x86_64)
6821      VAR_CPU=x86_64
6822      VAR_CPU_ARCH=x86
6823      VAR_CPU_BITS=64
6824      VAR_CPU_ENDIAN=little
6825      ;;
6826    i?86)
6827      VAR_CPU=x86
6828      VAR_CPU_ARCH=x86
6829      VAR_CPU_BITS=32
6830      VAR_CPU_ENDIAN=little
6831      ;;
6832    arm*)
6833      VAR_CPU=arm
6834      VAR_CPU_ARCH=arm
6835      VAR_CPU_BITS=32
6836      VAR_CPU_ENDIAN=little
6837      ;;
6838    powerpc)
6839      VAR_CPU=ppc
6840      VAR_CPU_ARCH=ppc
6841      VAR_CPU_BITS=32
6842      VAR_CPU_ENDIAN=big
6843       ;;
6844    powerpc64)
6845      VAR_CPU=ppc64
6846      VAR_CPU_ARCH=ppc
6847      VAR_CPU_BITS=64
6848      VAR_CPU_ENDIAN=big
6849       ;;
6850    sparc)
6851      VAR_CPU=sparc
6852      VAR_CPU_ARCH=sparc
6853      VAR_CPU_BITS=32
6854      VAR_CPU_ENDIAN=big
6855       ;;
6856    sparcv9)
6857      VAR_CPU=sparcv9
6858      VAR_CPU_ARCH=sparc
6859      VAR_CPU_BITS=64
6860      VAR_CPU_ENDIAN=big
6861       ;;
6862    *)
6863      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6864      ;;
6865  esac
6866
6867    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6868    OPENJDK_TARGET_OS="$VAR_OS"
6869    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6870    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6871    OPENJDK_TARGET_CPU="$VAR_CPU"
6872    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6873    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6874    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6875
6876
6877
6878
6879
6880
6881
6882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6883$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6885$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6886
6887
6888
6889# Check whether --with-target-bits was given.
6890if test "${with_target_bits+set}" = set; then :
6891  withval=$with_target_bits;
6892fi
6893
6894
6895  # We have three types of compiles:
6896  # native  == normal compilation, target system == build system
6897  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6898  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6899  #
6900  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6901    # We're doing a proper cross-compilation
6902    COMPILE_TYPE="cross"
6903  else
6904    COMPILE_TYPE="native"
6905  fi
6906
6907  if test "x$with_target_bits" != x; then
6908    if test "x$COMPILE_TYPE" = "xcross"; then
6909      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6910    fi
6911
6912    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6913      # A reduced build is requested
6914      COMPILE_TYPE="reduced"
6915      OPENJDK_TARGET_CPU_BITS=32
6916      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6917        OPENJDK_TARGET_CPU=x86
6918      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6919        OPENJDK_TARGET_CPU=sparc
6920      else
6921        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6922      fi
6923    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6924      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
6925    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6926      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6927$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6928    else
6929      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6930    fi
6931  fi
6932
6933
6934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6935$as_echo_n "checking compilation type... " >&6; }
6936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6937$as_echo "$COMPILE_TYPE" >&6; }
6938
6939
6940    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6941       REQUIRED_OS_NAME=SunOS
6942       REQUIRED_OS_VERSION=5.10
6943    fi
6944    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6945       REQUIRED_OS_NAME=Linux
6946       REQUIRED_OS_VERSION=2.6
6947    fi
6948    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6949        REQUIRED_OS_NAME=Windows
6950        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6951            REQUIRED_OS_VERSION=5.2
6952        else
6953            REQUIRED_OS_VERSION=5.1
6954        fi
6955    fi
6956    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6957        REQUIRED_OS_NAME=Darwin
6958        REQUIRED_OS_VERSION=11.2
6959    fi
6960
6961
6962
6963
6964
6965    # Also store the legacy naming of the cpu.
6966    # Ie i586 and amd64 instead of x86 and x86_64
6967    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6968    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6969      OPENJDK_TARGET_CPU_LEGACY="i586"
6970    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6971      # On all platforms except MacOSX replace x86_64 with amd64.
6972      OPENJDK_TARGET_CPU_LEGACY="amd64"
6973    fi
6974
6975
6976    # And the second legacy naming of the cpu.
6977    # Ie i386 and amd64 instead of x86 and x86_64.
6978    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6979    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6980      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6981    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6982      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6983    fi
6984
6985
6986    # This is the name of the cpu (but using i386 and amd64 instead of
6987    # x86 and x86_64, respectively), preceeded by a /, to be used when
6988    # locating libraries. On macosx, it's empty, though.
6989    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6990    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6991        OPENJDK_TARGET_CPU_LIBDIR=""
6992    fi
6993
6994
6995    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6996    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6997    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6998    OPENJDK_TARGET_CPU_ISADIR=""
6999    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7000      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7001          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7002      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7003          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7004      fi
7005    fi
7006
7007
7008    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7009    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7010    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7011      # On linux only, we replace x86 with i386.
7012      OPENJDK_TARGET_CPU_OSARCH="i386"
7013    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7014      # On all platforms except macosx, we replace x86_64 with amd64.
7015      OPENJDK_TARGET_CPU_OSARCH="amd64"
7016    fi
7017
7018
7019    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7020    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7021      OPENJDK_TARGET_CPU_JLI="i386"
7022    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7023      # On all platforms except macosx, we replace x86_64 with amd64.
7024      OPENJDK_TARGET_CPU_JLI="amd64"
7025    fi
7026    # Now setup the -D flags for building libjli.
7027    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7028    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7029      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7030        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7031      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7032        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7033      fi
7034    fi
7035
7036
7037    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7038    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7039        OPENJDK_TARGET_OS_API_DIR="solaris"
7040    fi
7041    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7042        OPENJDK_TARGET_OS_API_DIR="windows"
7043    fi
7044
7045
7046    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7047        A_LP64="LP64:="
7048        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7049        # unpack200.exe
7050        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7051            ADD_LP64="-D_LP64=1"
7052        fi
7053    fi
7054    LP64=$A_LP64
7055
7056
7057    if test "x$COMPILE_TYPE" = "xcross"; then
7058      # FIXME: ... or should this include reduced builds..?
7059      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7060    else
7061      DEFINE_CROSS_COMPILE_ARCH=""
7062    fi
7063
7064
7065    # ZERO_ARCHDEF is used to enable architecture-specific code
7066    case "${OPENJDK_TARGET_CPU}" in
7067      ppc*)    ZERO_ARCHDEF=PPC   ;;
7068      s390*)   ZERO_ARCHDEF=S390  ;;
7069      sparc*)  ZERO_ARCHDEF=SPARC ;;
7070      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7071      x86)     ZERO_ARCHDEF=IA32  ;;
7072      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7073    esac
7074
7075
7076
7077
7078
7079# Continue setting up basic stuff. Most remaining code require fundamental tools.
7080
7081# Locate the directory of this script.
7082SCRIPT="$0"
7083AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7084
7085# Where is the source? It is located two levels above the configure script.
7086CURDIR="$PWD"
7087cd "$AUTOCONF_DIR/../.."
7088SRC_ROOT="`$THEPWDCMD -L`"
7089
7090if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7091  PATH_SEP=";"
7092
7093  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7094  if test $SRC_ROOT_LENGTH -gt 100; then
7095      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7096  fi
7097
7098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7100$as_echo_n "checking cygwin release... " >&6; }
7101    CYGWIN_VERSION=`$UNAME -r`
7102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7103$as_echo "$CYGWIN_VERSION" >&6; }
7104    WINDOWS_ENV_VENDOR='cygwin'
7105    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7106
7107    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7108    if test "x$CYGWIN_VERSION_OK" = x; then
7109      { $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
7110$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;}
7111      as_fn_error $? "Cannot continue" "$LINENO" 5
7112    fi
7113    if test "x$CYGPATH" = x; then
7114        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7115    fi
7116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7117$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7118    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7119    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7120    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7121    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7123$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7124    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7125    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7126    if test "x$test_cygdrive_prefix" = x; then
7127        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7128    fi
7129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7131$as_echo_n "checking msys release... " >&6; }
7132    MSYS_VERSION=`$UNAME -r`
7133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7134$as_echo "$MSYS_VERSION" >&6; }
7135
7136    WINDOWS_ENV_VENDOR='msys'
7137    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7138
7139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7140$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7141    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7142    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7143
7144  windows_path="$MSYS_ROOT_PATH"
7145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7146    unix_path=`$CYGPATH -u "$windows_path"`
7147    MSYS_ROOT_PATH="$unix_path"
7148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7150    MSYS_ROOT_PATH="$unix_path"
7151  fi
7152
7153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7154$as_echo "$MSYS_ROOT_PATH" >&6; }
7155    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7156  else
7157    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7158  fi
7159
7160  # Test if windows or unix (cygwin/msys) find is first in path.
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7162$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7163  FIND_BINARY_OUTPUT=`find --version 2>&1`
7164  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7166$as_echo "unix style" >&6; }
7167  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7169$as_echo "Windows" >&6; }
7170    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7171$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7172    { $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
7173$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7174    as_fn_error $? "Cannot continue" "$LINENO" 5
7175  else
7176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7177$as_echo "unknown" >&6; }
7178    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7179$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7180  fi
7181
7182else
7183  PATH_SEP=":"
7184fi
7185
7186
7187
7188cd "$CURDIR"
7189
7190
7191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7192
7193  # Input might be given as Windows format, start by converting to
7194  # unix format.
7195  path="$SRC_ROOT"
7196  new_path=`$CYGPATH -u "$path"`
7197
7198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7201  # "foo.exe" is OK but "foo" is an error.
7202  #
7203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7204  # It is also a way to make sure we got the proper file name for the real test later on.
7205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7206  if test "x$test_shortpath" = x; then
7207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7208$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7209    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7210  fi
7211
7212  # Call helper function which possibly converts this using DOS-style short mode.
7213  # If so, the updated path is stored in $new_path.
7214
7215  input_path="$new_path"
7216  # Check if we need to convert this using DOS-style short mode. If the path
7217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7218  # take no chances and rewrite it.
7219  # Note: m4 eats our [], so we need to use [ and ] instead.
7220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7221  if test "x$has_forbidden_chars" != x; then
7222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7226      # Going to short mode and back again did indeed matter. Since short mode is
7227      # case insensitive, let's make it lowercase to improve readability.
7228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7229      # Now convert it back to Unix-stile (cygpath)
7230      input_path=`$CYGPATH -u "$shortmode_path"`
7231      new_path="$input_path"
7232    fi
7233  fi
7234
7235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7236  if test "x$test_cygdrive_prefix" = x; then
7237    # As a simple fix, exclude /usr/bin since it's not a real path.
7238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7240      # a path prefixed by /cygdrive for fixpath to work.
7241      new_path="$CYGWIN_ROOT_PATH$input_path"
7242    fi
7243  fi
7244
7245
7246  if test "x$path" != "x$new_path"; then
7247    SRC_ROOT="$new_path"
7248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7249$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7250  fi
7251
7252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7253
7254  path="$SRC_ROOT"
7255  has_colon=`$ECHO $path | $GREP ^.:`
7256  new_path="$path"
7257  if test "x$has_colon" = x; then
7258    # Not in mixed or Windows style, start by that.
7259    new_path=`cmd //c echo $path`
7260  fi
7261
7262
7263  input_path="$new_path"
7264  # Check if we need to convert this using DOS-style short mode. If the path
7265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7266  # take no chances and rewrite it.
7267  # Note: m4 eats our [], so we need to use [ and ] instead.
7268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7269  if test "x$has_forbidden_chars" != x; then
7270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7272  fi
7273
7274
7275  windows_path="$new_path"
7276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7277    unix_path=`$CYGPATH -u "$windows_path"`
7278    new_path="$unix_path"
7279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7281    new_path="$unix_path"
7282  fi
7283
7284  if test "x$path" != "x$new_path"; then
7285    SRC_ROOT="$new_path"
7286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7287$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7288  fi
7289
7290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7292
7293  else
7294    # We're on a posix platform. Hooray! :)
7295    path="$SRC_ROOT"
7296    has_space=`$ECHO "$path" | $GREP " "`
7297    if test "x$has_space" != x; then
7298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7299$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7300      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7301    fi
7302
7303    # Use eval to expand a potential ~
7304    eval path="$path"
7305    if test ! -f "$path" && test ! -d "$path"; then
7306      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7307    fi
7308
7309    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7310  fi
7311
7312
7313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7314
7315  # Input might be given as Windows format, start by converting to
7316  # unix format.
7317  path="$CURDIR"
7318  new_path=`$CYGPATH -u "$path"`
7319
7320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7323  # "foo.exe" is OK but "foo" is an error.
7324  #
7325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7326  # It is also a way to make sure we got the proper file name for the real test later on.
7327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7328  if test "x$test_shortpath" = x; then
7329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7330$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7331    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7332  fi
7333
7334  # Call helper function which possibly converts this using DOS-style short mode.
7335  # If so, the updated path is stored in $new_path.
7336
7337  input_path="$new_path"
7338  # Check if we need to convert this using DOS-style short mode. If the path
7339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7340  # take no chances and rewrite it.
7341  # Note: m4 eats our [], so we need to use [ and ] instead.
7342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7343  if test "x$has_forbidden_chars" != x; then
7344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7348      # Going to short mode and back again did indeed matter. Since short mode is
7349      # case insensitive, let's make it lowercase to improve readability.
7350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7351      # Now convert it back to Unix-stile (cygpath)
7352      input_path=`$CYGPATH -u "$shortmode_path"`
7353      new_path="$input_path"
7354    fi
7355  fi
7356
7357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7358  if test "x$test_cygdrive_prefix" = x; then
7359    # As a simple fix, exclude /usr/bin since it's not a real path.
7360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7362      # a path prefixed by /cygdrive for fixpath to work.
7363      new_path="$CYGWIN_ROOT_PATH$input_path"
7364    fi
7365  fi
7366
7367
7368  if test "x$path" != "x$new_path"; then
7369    CURDIR="$new_path"
7370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7371$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7372  fi
7373
7374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7375
7376  path="$CURDIR"
7377  has_colon=`$ECHO $path | $GREP ^.:`
7378  new_path="$path"
7379  if test "x$has_colon" = x; then
7380    # Not in mixed or Windows style, start by that.
7381    new_path=`cmd //c echo $path`
7382  fi
7383
7384
7385  input_path="$new_path"
7386  # Check if we need to convert this using DOS-style short mode. If the path
7387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7388  # take no chances and rewrite it.
7389  # Note: m4 eats our [], so we need to use [ and ] instead.
7390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7391  if test "x$has_forbidden_chars" != x; then
7392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7394  fi
7395
7396
7397  windows_path="$new_path"
7398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7399    unix_path=`$CYGPATH -u "$windows_path"`
7400    new_path="$unix_path"
7401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7403    new_path="$unix_path"
7404  fi
7405
7406  if test "x$path" != "x$new_path"; then
7407    CURDIR="$new_path"
7408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7409$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7410  fi
7411
7412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7414
7415  else
7416    # We're on a posix platform. Hooray! :)
7417    path="$CURDIR"
7418    has_space=`$ECHO "$path" | $GREP " "`
7419    if test "x$has_space" != x; then
7420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7421$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7422      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7423    fi
7424
7425    # Use eval to expand a potential ~
7426    eval path="$path"
7427    if test ! -f "$path" && test ! -d "$path"; then
7428      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7429    fi
7430
7431    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7432  fi
7433
7434
7435if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7436    # Add extra search paths on solaris for utilities like ar and as etc...
7437    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7438fi
7439
7440# You can force the sys-root if the sys-root encoded into the cross compiler tools
7441# is not correct.
7442
7443# Check whether --with-sys-root was given.
7444if test "${with_sys_root+set}" = set; then :
7445  withval=$with_sys_root;
7446fi
7447
7448
7449if test "x$with_sys_root" != x; then
7450  SYS_ROOT=$with_sys_root
7451else
7452  SYS_ROOT=/
7453fi
7454
7455
7456
7457# Check whether --with-tools-dir was given.
7458if test "${with_tools_dir+set}" = set; then :
7459  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7460fi
7461
7462
7463
7464# Check whether --with-devkit was given.
7465if test "${with_devkit+set}" = set; then :
7466  withval=$with_devkit;
7467    if test "x$with_sys_root" != x; then
7468      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7469    fi
7470    if test "x$with_tools_dir" != x; then
7471      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7472    fi
7473    TOOLS_DIR=$with_devkit/bin
7474    if test -d "$with_devkit/$host_alias/libc"; then
7475      SYS_ROOT=$with_devkit/$host_alias/libc
7476    elif test -d "$with_devkit/$host/sys-root"; then
7477      SYS_ROOT=$with_devkit/$host/sys-root
7478    fi
7479
7480fi
7481
7482
7483
7484
7485# Setup default logging of stdout and stderr to build.log in the output root.
7486BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7487BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7488BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7489
7490
7491
7492
7493
7494# Check if it's a pure open build or if custom sources are to be used.
7495
7496  # Check whether --enable-openjdk-only was given.
7497if test "${enable_openjdk_only+set}" = set; then :
7498  enableval=$enable_openjdk_only;
7499else
7500  enable_openjdk_only="no"
7501fi
7502
7503
7504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7505$as_echo_n "checking for presence of closed sources... " >&6; }
7506  if test -d "$SRC_ROOT/jdk/src/closed"; then
7507    CLOSED_SOURCE_PRESENT=yes
7508  else
7509    CLOSED_SOURCE_PRESENT=no
7510  fi
7511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7512$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7513
7514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7515$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7516  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7518$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7519
7520  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7521    OPENJDK=true
7522    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7523      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7524$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7525    fi
7526  else
7527    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7528      OPENJDK=true
7529    else
7530      OPENJDK=false
7531    fi
7532  fi
7533
7534  if test "x$OPENJDK" = "xtrue"; then
7535    SET_OPENJDK="OPENJDK=true"
7536  fi
7537
7538
7539
7540
7541# These are needed to be able to create a configuration name (and thus the output directory)
7542
7543###############################################################################
7544#
7545# Check which variant of the JDK that we want to build.
7546# Currently we have:
7547#    normal:   standard edition
7548# but the custom make system may add other variants
7549#
7550# Effectively the JDK variant gives a name to a specific set of
7551# modules to compile into the JDK. In the future, these modules
7552# might even be Jigsaw modules.
7553#
7554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7555$as_echo_n "checking which variant of the JDK to build... " >&6; }
7556
7557# Check whether --with-jdk-variant was given.
7558if test "${with_jdk_variant+set}" = set; then :
7559  withval=$with_jdk_variant;
7560fi
7561
7562
7563if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7564    JDK_VARIANT="normal"
7565else
7566    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7567fi
7568
7569
7570
7571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7572$as_echo "$JDK_VARIANT" >&6; }
7573
7574
7575
7576###############################################################################
7577#
7578# Check which variants of the JVM that we want to build.
7579# Currently we have:
7580#    server: normal interpreter and a tiered C1/C2 compiler
7581#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7582#    minimal1: reduced form of client with optional VM services and features stripped out
7583#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7584#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7585#    zero: no machine code interpreter, no compiler
7586#    zeroshark: zero interpreter and shark/llvm compiler backend
7587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7588$as_echo_n "checking which variants of the JVM to build... " >&6; }
7589
7590# Check whether --with-jvm-variants was given.
7591if test "${with_jvm_variants+set}" = set; then :
7592  withval=$with_jvm_variants;
7593fi
7594
7595
7596if test "x$with_jvm_variants" = x; then
7597     with_jvm_variants="server"
7598fi
7599
7600JVM_VARIANTS=",$with_jvm_variants,"
7601TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7602
7603if test "x$TEST_VARIANTS" != "x,"; then
7604   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7605fi
7606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7607$as_echo "$with_jvm_variants" >&6; }
7608
7609JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7610JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7611JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7612JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7613JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7614JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7615
7616if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7617    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7618        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7619    fi
7620fi
7621if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7622    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7623        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7624    fi
7625fi
7626if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7627    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7628        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7629    fi
7630fi
7631
7632# Replace the commas with AND for use in the build directory name.
7633ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7634COUNT_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/'`
7635if test "x$COUNT_VARIANTS" != "x,1"; then
7636    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7637else
7638    BUILDING_MULTIPLE_JVM_VARIANTS=no
7639fi
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649INCLUDE_SA=true
7650if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7651    INCLUDE_SA=false
7652fi
7653if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7654    INCLUDE_SA=false
7655fi
7656
7657
7658if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7659   MACOSX_UNIVERSAL="true"
7660fi
7661
7662
7663
7664
7665
7666###############################################################################
7667#
7668# Set the debug level
7669#    release: no debug information, all optimizations, no asserts.
7670#    fastdebug: debug information (-g), all optimizations, all asserts
7671#    slowdebug: debug information (-g), no optimizations, all asserts
7672#
7673DEBUG_LEVEL="release"
7674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7675$as_echo_n "checking which debug level to use... " >&6; }
7676# Check whether --enable-debug was given.
7677if test "${enable_debug+set}" = set; then :
7678  enableval=$enable_debug;
7679        ENABLE_DEBUG="${enableval}"
7680        DEBUG_LEVEL="fastdebug"
7681
7682else
7683  ENABLE_DEBUG="no"
7684fi
7685
7686
7687
7688# Check whether --with-debug-level was given.
7689if test "${with_debug_level+set}" = set; then :
7690  withval=$with_debug_level;
7691        DEBUG_LEVEL="${withval}"
7692        if test "x$ENABLE_DEBUG" = xyes; then
7693			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7694        fi
7695
7696fi
7697
7698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7699$as_echo "$DEBUG_LEVEL" >&6; }
7700
7701if test "x$DEBUG_LEVEL" != xrelease && \
7702   test "x$DEBUG_LEVEL" != xfastdebug && \
7703   test "x$DEBUG_LEVEL" != xslowdebug; then
7704   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7705fi
7706
7707
7708###############################################################################
7709#
7710# Setup legacy vars/targets and new vars to deal with different debug levels.
7711#
7712
7713case $DEBUG_LEVEL in
7714      release )
7715          VARIANT="OPT"
7716          FASTDEBUG="false"
7717          DEBUG_CLASSFILES="false"
7718          BUILD_VARIANT_RELEASE=""
7719          HOTSPOT_DEBUG_LEVEL="product"
7720          HOTSPOT_EXPORT="product"
7721           ;;
7722      fastdebug )
7723          VARIANT="DBG"
7724          FASTDEBUG="true"
7725          DEBUG_CLASSFILES="true"
7726          BUILD_VARIANT_RELEASE="-fastdebug"
7727          HOTSPOT_DEBUG_LEVEL="fastdebug"
7728          HOTSPOT_EXPORT="fastdebug"
7729           ;;
7730      slowdebug )
7731          VARIANT="DBG"
7732          FASTDEBUG="false"
7733          DEBUG_CLASSFILES="true"
7734          BUILD_VARIANT_RELEASE="-debug"
7735          HOTSPOT_DEBUG_LEVEL="jvmg"
7736          HOTSPOT_EXPORT="debug"
7737           ;;
7738esac
7739
7740#####
7741# Generate the legacy makefile targets for hotspot.
7742# The hotspot api for selecting the build artifacts, really, needs to be improved.
7743# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7744# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7745# But until then ...
7746HOTSPOT_TARGET=""
7747
7748if test "x$JVM_VARIANT_SERVER" = xtrue; then
7749    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7750fi
7751
7752if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7753    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7754fi
7755
7756if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7757    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7758fi
7759
7760if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7761    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7762fi
7763
7764if test "x$JVM_VARIANT_ZERO" = xtrue; then
7765    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7766fi
7767
7768if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7769    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7770fi
7771
7772HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7773
7774# On Macosx universal binaries are produced, but they only contain
7775# 64 bit intel. This invalidates control of which jvms are built
7776# from configure, but only server is valid anyway. Fix this
7777# when hotspot makefiles are rewritten.
7778if test "x$MACOSX_UNIVERSAL" = xtrue; then
7779    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7780fi
7781
7782#####
7783
7784
7785
7786
7787
7788
7789
7790
7791# With basic setup done, call the custom early hook.
7792
7793
7794# To properly create a configuration name, we need to have the OpenJDK target
7795# and options (variants and debug level) parsed.
7796
7797
7798
7799# Check whether --with-conf-name was given.
7800if test "${with_conf_name+set}" = set; then :
7801  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7802fi
7803
7804
7805# Test from where we are running configure, in or outside of src root.
7806if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7807        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7808        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7809    # We are running configure from the src root.
7810    # Create a default ./build/target-variant-debuglevel output root.
7811    if test "x${CONF_NAME}" = x; then
7812        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7813    fi
7814    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7815    $MKDIR -p "$OUTPUT_ROOT"
7816    if test ! -d "$OUTPUT_ROOT"; then
7817        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7818    fi
7819else
7820    # We are running configure from outside of the src dir.
7821    # Then use the current directory as output dir!
7822    # If configuration is situated in normal build directory, just use the build
7823    # directory name as configuration name, otherwise use the complete path.
7824    if test "x${CONF_NAME}" = x; then
7825        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7826    fi
7827    OUTPUT_ROOT="$CURDIR"
7828
7829    # WARNING: This might be a bad thing to do. You need to be sure you want to
7830    # have a configuration in this directory. Do some sanity checks!
7831
7832    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7833      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7834      # other files
7835      files_present=`$LS $OUTPUT_ROOT`
7836      # Configure has already touched config.log and confdefs.h in the current dir when this check
7837      # is performed.
7838      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7839                                             | $TR -d '\n'`
7840      if test "x$filtered_files" != x; then
7841        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7842$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7843        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7844$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7845        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7846$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7847        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7848$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7849        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7850$as_echo "$as_me: seriously mess up just about everything." >&6;}
7851        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7852$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7853        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7854$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7855        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7856      fi
7857    fi
7858fi
7859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7860$as_echo_n "checking what configuration name to use... " >&6; }
7861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7862$as_echo "$CONF_NAME" >&6; }
7863
7864
7865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7866
7867  # Input might be given as Windows format, start by converting to
7868  # unix format.
7869  path="$OUTPUT_ROOT"
7870  new_path=`$CYGPATH -u "$path"`
7871
7872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7875  # "foo.exe" is OK but "foo" is an error.
7876  #
7877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7878  # It is also a way to make sure we got the proper file name for the real test later on.
7879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7880  if test "x$test_shortpath" = x; then
7881    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7882$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7883    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7884  fi
7885
7886  # Call helper function which possibly converts this using DOS-style short mode.
7887  # If so, the updated path is stored in $new_path.
7888
7889  input_path="$new_path"
7890  # Check if we need to convert this using DOS-style short mode. If the path
7891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7892  # take no chances and rewrite it.
7893  # Note: m4 eats our [], so we need to use [ and ] instead.
7894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7895  if test "x$has_forbidden_chars" != x; then
7896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7900      # Going to short mode and back again did indeed matter. Since short mode is
7901      # case insensitive, let's make it lowercase to improve readability.
7902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7903      # Now convert it back to Unix-stile (cygpath)
7904      input_path=`$CYGPATH -u "$shortmode_path"`
7905      new_path="$input_path"
7906    fi
7907  fi
7908
7909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7910  if test "x$test_cygdrive_prefix" = x; then
7911    # As a simple fix, exclude /usr/bin since it's not a real path.
7912    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7914      # a path prefixed by /cygdrive for fixpath to work.
7915      new_path="$CYGWIN_ROOT_PATH$input_path"
7916    fi
7917  fi
7918
7919
7920  if test "x$path" != "x$new_path"; then
7921    OUTPUT_ROOT="$new_path"
7922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7923$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7924  fi
7925
7926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7927
7928  path="$OUTPUT_ROOT"
7929  has_colon=`$ECHO $path | $GREP ^.:`
7930  new_path="$path"
7931  if test "x$has_colon" = x; then
7932    # Not in mixed or Windows style, start by that.
7933    new_path=`cmd //c echo $path`
7934  fi
7935
7936
7937  input_path="$new_path"
7938  # Check if we need to convert this using DOS-style short mode. If the path
7939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7940  # take no chances and rewrite it.
7941  # Note: m4 eats our [], so we need to use [ and ] instead.
7942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7943  if test "x$has_forbidden_chars" != x; then
7944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7946  fi
7947
7948
7949  windows_path="$new_path"
7950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7951    unix_path=`$CYGPATH -u "$windows_path"`
7952    new_path="$unix_path"
7953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7955    new_path="$unix_path"
7956  fi
7957
7958  if test "x$path" != "x$new_path"; then
7959    OUTPUT_ROOT="$new_path"
7960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7961$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7962  fi
7963
7964  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7965  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7966
7967  else
7968    # We're on a posix platform. Hooray! :)
7969    path="$OUTPUT_ROOT"
7970    has_space=`$ECHO "$path" | $GREP " "`
7971    if test "x$has_space" != x; then
7972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7973$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7974      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7975    fi
7976
7977    # Use eval to expand a potential ~
7978    eval path="$path"
7979    if test ! -f "$path" && test ! -d "$path"; then
7980      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7981    fi
7982
7983    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
7984  fi
7985
7986
7987SPEC=$OUTPUT_ROOT/spec.gmk
7988
7989CONF_NAME=$CONF_NAME
7990
7991OUTPUT_ROOT=$OUTPUT_ROOT
7992
7993
7994# Most of the probed defines are put into config.h
7995ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7996
7997# The spec.gmk file contains all variables for the make system.
7998ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7999
8000# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8001ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8002
8003# The bootcycle-spec.gmk file contains support for boot cycle builds.
8004ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8005
8006# The compare.sh is used to compare the build output to other builds.
8007ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8008
8009# Spec.sh is currently used by compare-objects.sh
8010ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8011
8012# The generated Makefile knows where the spec.gmk is and where the source is.
8013# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8014# which will look for generated configurations
8015ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8016
8017
8018# Save the arguments given to us
8019echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8020
8021
8022# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8023
8024    for ac_prog in apt-get yum port pkgutil pkgadd
8025do
8026  # Extract the first word of "$ac_prog", so it can be a program name with args.
8027set dummy $ac_prog; ac_word=$2
8028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8029$as_echo_n "checking for $ac_word... " >&6; }
8030if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8031  $as_echo_n "(cached) " >&6
8032else
8033  if test -n "$PKGHANDLER"; then
8034  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8035else
8036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8037for as_dir in $PATH
8038do
8039  IFS=$as_save_IFS
8040  test -z "$as_dir" && as_dir=.
8041    for ac_exec_ext in '' $ac_executable_extensions; do
8042  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8043    ac_cv_prog_PKGHANDLER="$ac_prog"
8044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8045    break 2
8046  fi
8047done
8048  done
8049IFS=$as_save_IFS
8050
8051fi
8052fi
8053PKGHANDLER=$ac_cv_prog_PKGHANDLER
8054if test -n "$PKGHANDLER"; then
8055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8056$as_echo "$PKGHANDLER" >&6; }
8057else
8058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8059$as_echo "no" >&6; }
8060fi
8061
8062
8063  test -n "$PKGHANDLER" && break
8064done
8065
8066
8067
8068# Setup tools that requires more complex handling, or that is not needed by the configure script.
8069
8070
8071  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8072  if test "x$MAKE" != x; then
8073    # User has supplied a make, test it.
8074    if test ! -f "$MAKE"; then
8075      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8076    fi
8077
8078  MAKE_CANDIDATE=""$MAKE""
8079  DESCRIPTION="user supplied MAKE=$MAKE"
8080  if test "x$MAKE_CANDIDATE" != x; then
8081    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8082$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8083    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8084    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8085    if test "x$IS_GNU_MAKE" = x; then
8086      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8087$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8088    else
8089      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8090      if test "x$IS_MODERN_MAKE" = x; then
8091        { $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
8092$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;}
8093      else
8094        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8095          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8096            MAKE_EXPECTED_ENV='cygwin'
8097          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8098            MAKE_EXPECTED_ENV='msys'
8099          else
8100            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8101          fi
8102          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8103          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8104        else
8105          # Not relevant for non-Windows
8106          IS_MAKE_CORRECT_ENV=true
8107        fi
8108        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8109          { $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
8110$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;}
8111        else
8112          FOUND_MAKE=$MAKE_CANDIDATE
8113
8114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8115
8116  # First separate the path from the arguments. This will split at the first
8117  # space.
8118  complete="$FOUND_MAKE"
8119  path="${complete%% *}"
8120  tmp="$complete EOL"
8121  arguments="${tmp#* }"
8122
8123  # Input might be given as Windows format, start by converting to
8124  # unix format.
8125  new_path=`$CYGPATH -u "$path"`
8126
8127  # Now try to locate executable using which
8128  new_path=`$WHICH "$new_path" 2> /dev/null`
8129  # bat and cmd files are not always considered executable in cygwin causing which
8130  # to not find them
8131  if test "x$new_path" = x \
8132           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8133           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8134    new_path=`$CYGPATH -u "$path"`
8135  fi
8136  if test "x$new_path" = x; then
8137    # Oops. Which didn't find the executable.
8138    # The splitting of arguments from the executable at a space might have been incorrect,
8139    # since paths with space are more likely in Windows. Give it another try with the whole
8140    # argument.
8141    path="$complete"
8142    arguments="EOL"
8143    new_path=`$CYGPATH -u "$path"`
8144    new_path=`$WHICH "$new_path" 2> /dev/null`
8145    # bat and cmd files are not always considered executable in cygwin causing which
8146    # to not find them
8147    if test "x$new_path" = x \
8148             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8149             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8150      new_path=`$CYGPATH -u "$path"`
8151    fi
8152    if test "x$new_path" = x; then
8153      # It's still not found. Now this is an unrecoverable error.
8154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8155$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8156      has_space=`$ECHO "$complete" | $GREP " "`
8157      if test "x$has_space" != x; then
8158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8160      fi
8161      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8162    fi
8163  fi
8164
8165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8168  # "foo.exe" is OK but "foo" is an error.
8169  #
8170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8171  # It is also a way to make sure we got the proper file name for the real test later on.
8172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8173  if test "x$test_shortpath" = x; then
8174    # Short path failed, file does not exist as specified.
8175    # Try adding .exe or .cmd
8176    if test -f "${new_path}.exe"; then
8177       input_to_shortpath="${new_path}.exe"
8178    elif test -f "${new_path}.cmd"; then
8179       input_to_shortpath="${new_path}.cmd"
8180    else
8181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8182$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8183      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8184$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8185      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8186    fi
8187  else
8188    input_to_shortpath="$new_path"
8189  fi
8190
8191  # Call helper function which possibly converts this using DOS-style short mode.
8192  # If so, the updated path is stored in $new_path.
8193  new_path="$input_to_shortpath"
8194
8195  input_path="$input_to_shortpath"
8196  # Check if we need to convert this using DOS-style short mode. If the path
8197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8198  # take no chances and rewrite it.
8199  # Note: m4 eats our [], so we need to use [ and ] instead.
8200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8201  if test "x$has_forbidden_chars" != x; then
8202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8206      # Going to short mode and back again did indeed matter. Since short mode is
8207      # case insensitive, let's make it lowercase to improve readability.
8208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8209      # Now convert it back to Unix-stile (cygpath)
8210      input_path=`$CYGPATH -u "$shortmode_path"`
8211      new_path="$input_path"
8212    fi
8213  fi
8214
8215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8216  if test "x$test_cygdrive_prefix" = x; then
8217    # As a simple fix, exclude /usr/bin since it's not a real path.
8218    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8220      # a path prefixed by /cygdrive for fixpath to work.
8221      new_path="$CYGWIN_ROOT_PATH$input_path"
8222    fi
8223  fi
8224
8225  # remove trailing .exe if any
8226  new_path="${new_path/%.exe/}"
8227
8228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8229
8230  # First separate the path from the arguments. This will split at the first
8231  # space.
8232  complete="$FOUND_MAKE"
8233  path="${complete%% *}"
8234  tmp="$complete EOL"
8235  arguments="${tmp#* }"
8236
8237  # Input might be given as Windows format, start by converting to
8238  # unix format.
8239  new_path="$path"
8240
8241  windows_path="$new_path"
8242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8243    unix_path=`$CYGPATH -u "$windows_path"`
8244    new_path="$unix_path"
8245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8247    new_path="$unix_path"
8248  fi
8249
8250
8251  # Now try to locate executable using which
8252  new_path=`$WHICH "$new_path" 2> /dev/null`
8253
8254  if test "x$new_path" = x; then
8255    # Oops. Which didn't find the executable.
8256    # The splitting of arguments from the executable at a space might have been incorrect,
8257    # since paths with space are more likely in Windows. Give it another try with the whole
8258    # argument.
8259    path="$complete"
8260    arguments="EOL"
8261    new_path="$path"
8262
8263  windows_path="$new_path"
8264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8265    unix_path=`$CYGPATH -u "$windows_path"`
8266    new_path="$unix_path"
8267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8269    new_path="$unix_path"
8270  fi
8271
8272
8273    new_path=`$WHICH "$new_path" 2> /dev/null`
8274
8275    if test "x$new_path" = x; then
8276      # It's still not found. Now this is an unrecoverable error.
8277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8278$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8279      has_space=`$ECHO "$complete" | $GREP " "`
8280      if test "x$has_space" != x; then
8281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8283      fi
8284      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8285    fi
8286  fi
8287
8288  # Now new_path has a complete unix path to the binary
8289  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8290    # Keep paths in /bin as-is, but remove trailing .exe if any
8291    new_path="${new_path/%.exe/}"
8292    # Do not save /bin paths to all_fixpath_prefixes!
8293  else
8294    # Not in mixed or Windows style, start by that.
8295    new_path=`cmd //c echo $new_path`
8296
8297  input_path="$new_path"
8298  # Check if we need to convert this using DOS-style short mode. If the path
8299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8300  # take no chances and rewrite it.
8301  # Note: m4 eats our [], so we need to use [ and ] instead.
8302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8303  if test "x$has_forbidden_chars" != x; then
8304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8306  fi
8307
8308    # Output is in $new_path
8309
8310  windows_path="$new_path"
8311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8312    unix_path=`$CYGPATH -u "$windows_path"`
8313    new_path="$unix_path"
8314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8316    new_path="$unix_path"
8317  fi
8318
8319    # remove trailing .exe if any
8320    new_path="${new_path/%.exe/}"
8321
8322    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8323    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8324  fi
8325
8326  else
8327    # We're on a posix platform. Hooray! :)
8328    # First separate the path from the arguments. This will split at the first
8329    # space.
8330    complete="$FOUND_MAKE"
8331    path="${complete%% *}"
8332    tmp="$complete EOL"
8333    arguments="${tmp#* }"
8334
8335    # Cannot rely on the command "which" here since it doesn't always work.
8336    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8337    if test -z "$is_absolute_path"; then
8338      # Path to executable is not absolute. Find it.
8339      IFS_save="$IFS"
8340      IFS=:
8341      for p in $PATH; do
8342        if test -f "$p/$path" && test -x "$p/$path"; then
8343          new_path="$p/$path"
8344          break
8345        fi
8346      done
8347      IFS="$IFS_save"
8348    else
8349      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8350$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8351      new_path="$path"
8352    fi
8353
8354    if test "x$new_path" = x; then
8355        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8356$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8357        has_space=`$ECHO "$complete" | $GREP " "`
8358        if test "x$has_space" != x; then
8359          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8360$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8361        fi
8362        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8363      fi
8364  fi
8365
8366      # Now join together the path and the arguments once again
8367      if test "x$arguments" != xEOL; then
8368        new_complete="$new_path ${arguments% *}"
8369      else
8370        new_complete="$new_path"
8371      fi
8372
8373  if test "x$complete" != "x$new_complete"; then
8374      FOUND_MAKE="$new_complete"
8375      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8376$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8377    fi
8378
8379        fi
8380      fi
8381    fi
8382  fi
8383
8384    if test "x$FOUND_MAKE" = x; then
8385      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8386    fi
8387  else
8388    # Try our hardest to locate a correct version of GNU make
8389    for ac_prog in gmake
8390do
8391  # Extract the first word of "$ac_prog", so it can be a program name with args.
8392set dummy $ac_prog; ac_word=$2
8393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8394$as_echo_n "checking for $ac_word... " >&6; }
8395if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8396  $as_echo_n "(cached) " >&6
8397else
8398  case $CHECK_GMAKE in
8399  [\\/]* | ?:[\\/]*)
8400  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8401  ;;
8402  *)
8403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8404for as_dir in $PATH
8405do
8406  IFS=$as_save_IFS
8407  test -z "$as_dir" && as_dir=.
8408    for ac_exec_ext in '' $ac_executable_extensions; do
8409  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8410    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8412    break 2
8413  fi
8414done
8415  done
8416IFS=$as_save_IFS
8417
8418  ;;
8419esac
8420fi
8421CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8422if test -n "$CHECK_GMAKE"; then
8423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8424$as_echo "$CHECK_GMAKE" >&6; }
8425else
8426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8427$as_echo "no" >&6; }
8428fi
8429
8430
8431  test -n "$CHECK_GMAKE" && break
8432done
8433
8434
8435  MAKE_CANDIDATE=""$CHECK_GMAKE""
8436  DESCRIPTION="gmake in PATH"
8437  if test "x$MAKE_CANDIDATE" != x; then
8438    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8439$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8440    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8441    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8442    if test "x$IS_GNU_MAKE" = x; then
8443      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8444$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8445    else
8446      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8447      if test "x$IS_MODERN_MAKE" = x; then
8448        { $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
8449$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;}
8450      else
8451        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8452          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8453            MAKE_EXPECTED_ENV='cygwin'
8454          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8455            MAKE_EXPECTED_ENV='msys'
8456          else
8457            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8458          fi
8459          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8460          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8461        else
8462          # Not relevant for non-Windows
8463          IS_MAKE_CORRECT_ENV=true
8464        fi
8465        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8466          { $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
8467$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;}
8468        else
8469          FOUND_MAKE=$MAKE_CANDIDATE
8470
8471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8472
8473  # First separate the path from the arguments. This will split at the first
8474  # space.
8475  complete="$FOUND_MAKE"
8476  path="${complete%% *}"
8477  tmp="$complete EOL"
8478  arguments="${tmp#* }"
8479
8480  # Input might be given as Windows format, start by converting to
8481  # unix format.
8482  new_path=`$CYGPATH -u "$path"`
8483
8484  # Now try to locate executable using which
8485  new_path=`$WHICH "$new_path" 2> /dev/null`
8486  # bat and cmd files are not always considered executable in cygwin causing which
8487  # to not find them
8488  if test "x$new_path" = x \
8489           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8490           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8491    new_path=`$CYGPATH -u "$path"`
8492  fi
8493  if test "x$new_path" = x; then
8494    # Oops. Which didn't find the executable.
8495    # The splitting of arguments from the executable at a space might have been incorrect,
8496    # since paths with space are more likely in Windows. Give it another try with the whole
8497    # argument.
8498    path="$complete"
8499    arguments="EOL"
8500    new_path=`$CYGPATH -u "$path"`
8501    new_path=`$WHICH "$new_path" 2> /dev/null`
8502    # bat and cmd files are not always considered executable in cygwin causing which
8503    # to not find them
8504    if test "x$new_path" = x \
8505             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8506             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8507      new_path=`$CYGPATH -u "$path"`
8508    fi
8509    if test "x$new_path" = x; then
8510      # It's still not found. Now this is an unrecoverable error.
8511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8512$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8513      has_space=`$ECHO "$complete" | $GREP " "`
8514      if test "x$has_space" != x; then
8515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8517      fi
8518      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8519    fi
8520  fi
8521
8522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8525  # "foo.exe" is OK but "foo" is an error.
8526  #
8527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8528  # It is also a way to make sure we got the proper file name for the real test later on.
8529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8530  if test "x$test_shortpath" = x; then
8531    # Short path failed, file does not exist as specified.
8532    # Try adding .exe or .cmd
8533    if test -f "${new_path}.exe"; then
8534       input_to_shortpath="${new_path}.exe"
8535    elif test -f "${new_path}.cmd"; then
8536       input_to_shortpath="${new_path}.cmd"
8537    else
8538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8539$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8540      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8541$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8542      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8543    fi
8544  else
8545    input_to_shortpath="$new_path"
8546  fi
8547
8548  # Call helper function which possibly converts this using DOS-style short mode.
8549  # If so, the updated path is stored in $new_path.
8550  new_path="$input_to_shortpath"
8551
8552  input_path="$input_to_shortpath"
8553  # Check if we need to convert this using DOS-style short mode. If the path
8554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8555  # take no chances and rewrite it.
8556  # Note: m4 eats our [], so we need to use [ and ] instead.
8557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8558  if test "x$has_forbidden_chars" != x; then
8559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8563      # Going to short mode and back again did indeed matter. Since short mode is
8564      # case insensitive, let's make it lowercase to improve readability.
8565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8566      # Now convert it back to Unix-stile (cygpath)
8567      input_path=`$CYGPATH -u "$shortmode_path"`
8568      new_path="$input_path"
8569    fi
8570  fi
8571
8572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8573  if test "x$test_cygdrive_prefix" = x; then
8574    # As a simple fix, exclude /usr/bin since it's not a real path.
8575    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8577      # a path prefixed by /cygdrive for fixpath to work.
8578      new_path="$CYGWIN_ROOT_PATH$input_path"
8579    fi
8580  fi
8581
8582  # remove trailing .exe if any
8583  new_path="${new_path/%.exe/}"
8584
8585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8586
8587  # First separate the path from the arguments. This will split at the first
8588  # space.
8589  complete="$FOUND_MAKE"
8590  path="${complete%% *}"
8591  tmp="$complete EOL"
8592  arguments="${tmp#* }"
8593
8594  # Input might be given as Windows format, start by converting to
8595  # unix format.
8596  new_path="$path"
8597
8598  windows_path="$new_path"
8599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8600    unix_path=`$CYGPATH -u "$windows_path"`
8601    new_path="$unix_path"
8602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8604    new_path="$unix_path"
8605  fi
8606
8607
8608  # Now try to locate executable using which
8609  new_path=`$WHICH "$new_path" 2> /dev/null`
8610
8611  if test "x$new_path" = x; then
8612    # Oops. Which didn't find the executable.
8613    # The splitting of arguments from the executable at a space might have been incorrect,
8614    # since paths with space are more likely in Windows. Give it another try with the whole
8615    # argument.
8616    path="$complete"
8617    arguments="EOL"
8618    new_path="$path"
8619
8620  windows_path="$new_path"
8621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8622    unix_path=`$CYGPATH -u "$windows_path"`
8623    new_path="$unix_path"
8624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8626    new_path="$unix_path"
8627  fi
8628
8629
8630    new_path=`$WHICH "$new_path" 2> /dev/null`
8631
8632    if test "x$new_path" = x; then
8633      # It's still not found. Now this is an unrecoverable error.
8634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8635$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8636      has_space=`$ECHO "$complete" | $GREP " "`
8637      if test "x$has_space" != x; then
8638        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8639$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8640      fi
8641      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8642    fi
8643  fi
8644
8645  # Now new_path has a complete unix path to the binary
8646  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8647    # Keep paths in /bin as-is, but remove trailing .exe if any
8648    new_path="${new_path/%.exe/}"
8649    # Do not save /bin paths to all_fixpath_prefixes!
8650  else
8651    # Not in mixed or Windows style, start by that.
8652    new_path=`cmd //c echo $new_path`
8653
8654  input_path="$new_path"
8655  # Check if we need to convert this using DOS-style short mode. If the path
8656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8657  # take no chances and rewrite it.
8658  # Note: m4 eats our [], so we need to use [ and ] instead.
8659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8660  if test "x$has_forbidden_chars" != x; then
8661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8663  fi
8664
8665    # Output is in $new_path
8666
8667  windows_path="$new_path"
8668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8669    unix_path=`$CYGPATH -u "$windows_path"`
8670    new_path="$unix_path"
8671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8673    new_path="$unix_path"
8674  fi
8675
8676    # remove trailing .exe if any
8677    new_path="${new_path/%.exe/}"
8678
8679    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8680    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8681  fi
8682
8683  else
8684    # We're on a posix platform. Hooray! :)
8685    # First separate the path from the arguments. This will split at the first
8686    # space.
8687    complete="$FOUND_MAKE"
8688    path="${complete%% *}"
8689    tmp="$complete EOL"
8690    arguments="${tmp#* }"
8691
8692    # Cannot rely on the command "which" here since it doesn't always work.
8693    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8694    if test -z "$is_absolute_path"; then
8695      # Path to executable is not absolute. Find it.
8696      IFS_save="$IFS"
8697      IFS=:
8698      for p in $PATH; do
8699        if test -f "$p/$path" && test -x "$p/$path"; then
8700          new_path="$p/$path"
8701          break
8702        fi
8703      done
8704      IFS="$IFS_save"
8705    else
8706      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8707$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8708      new_path="$path"
8709    fi
8710
8711    if test "x$new_path" = x; then
8712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8713$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8714        has_space=`$ECHO "$complete" | $GREP " "`
8715        if test "x$has_space" != x; then
8716          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8717$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8718        fi
8719        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8720      fi
8721  fi
8722
8723      # Now join together the path and the arguments once again
8724      if test "x$arguments" != xEOL; then
8725        new_complete="$new_path ${arguments% *}"
8726      else
8727        new_complete="$new_path"
8728      fi
8729
8730  if test "x$complete" != "x$new_complete"; then
8731      FOUND_MAKE="$new_complete"
8732      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8733$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8734    fi
8735
8736        fi
8737      fi
8738    fi
8739  fi
8740
8741
8742    if test "x$FOUND_MAKE" = x; then
8743      for ac_prog in make
8744do
8745  # Extract the first word of "$ac_prog", so it can be a program name with args.
8746set dummy $ac_prog; ac_word=$2
8747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8748$as_echo_n "checking for $ac_word... " >&6; }
8749if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8750  $as_echo_n "(cached) " >&6
8751else
8752  case $CHECK_MAKE in
8753  [\\/]* | ?:[\\/]*)
8754  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8755  ;;
8756  *)
8757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8758for as_dir in $PATH
8759do
8760  IFS=$as_save_IFS
8761  test -z "$as_dir" && as_dir=.
8762    for ac_exec_ext in '' $ac_executable_extensions; do
8763  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8764    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8766    break 2
8767  fi
8768done
8769  done
8770IFS=$as_save_IFS
8771
8772  ;;
8773esac
8774fi
8775CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8776if test -n "$CHECK_MAKE"; then
8777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8778$as_echo "$CHECK_MAKE" >&6; }
8779else
8780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8781$as_echo "no" >&6; }
8782fi
8783
8784
8785  test -n "$CHECK_MAKE" && break
8786done
8787
8788
8789  MAKE_CANDIDATE=""$CHECK_MAKE""
8790  DESCRIPTION="make in PATH"
8791  if test "x$MAKE_CANDIDATE" != x; then
8792    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8793$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8794    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8795    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8796    if test "x$IS_GNU_MAKE" = x; then
8797      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8798$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8799    else
8800      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8801      if test "x$IS_MODERN_MAKE" = x; then
8802        { $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
8803$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;}
8804      else
8805        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8806          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8807            MAKE_EXPECTED_ENV='cygwin'
8808          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8809            MAKE_EXPECTED_ENV='msys'
8810          else
8811            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8812          fi
8813          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8814          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8815        else
8816          # Not relevant for non-Windows
8817          IS_MAKE_CORRECT_ENV=true
8818        fi
8819        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8820          { $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
8821$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;}
8822        else
8823          FOUND_MAKE=$MAKE_CANDIDATE
8824
8825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8826
8827  # First separate the path from the arguments. This will split at the first
8828  # space.
8829  complete="$FOUND_MAKE"
8830  path="${complete%% *}"
8831  tmp="$complete EOL"
8832  arguments="${tmp#* }"
8833
8834  # Input might be given as Windows format, start by converting to
8835  # unix format.
8836  new_path=`$CYGPATH -u "$path"`
8837
8838  # Now try to locate executable using which
8839  new_path=`$WHICH "$new_path" 2> /dev/null`
8840  # bat and cmd files are not always considered executable in cygwin causing which
8841  # to not find them
8842  if test "x$new_path" = x \
8843           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8844           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8845    new_path=`$CYGPATH -u "$path"`
8846  fi
8847  if test "x$new_path" = x; then
8848    # Oops. Which didn't find the executable.
8849    # The splitting of arguments from the executable at a space might have been incorrect,
8850    # since paths with space are more likely in Windows. Give it another try with the whole
8851    # argument.
8852    path="$complete"
8853    arguments="EOL"
8854    new_path=`$CYGPATH -u "$path"`
8855    new_path=`$WHICH "$new_path" 2> /dev/null`
8856    # bat and cmd files are not always considered executable in cygwin causing which
8857    # to not find them
8858    if test "x$new_path" = x \
8859             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8860             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8861      new_path=`$CYGPATH -u "$path"`
8862    fi
8863    if test "x$new_path" = x; then
8864      # It's still not found. Now this is an unrecoverable error.
8865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8866$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8867      has_space=`$ECHO "$complete" | $GREP " "`
8868      if test "x$has_space" != x; then
8869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8871      fi
8872      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8873    fi
8874  fi
8875
8876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8879  # "foo.exe" is OK but "foo" is an error.
8880  #
8881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8882  # It is also a way to make sure we got the proper file name for the real test later on.
8883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8884  if test "x$test_shortpath" = x; then
8885    # Short path failed, file does not exist as specified.
8886    # Try adding .exe or .cmd
8887    if test -f "${new_path}.exe"; then
8888       input_to_shortpath="${new_path}.exe"
8889    elif test -f "${new_path}.cmd"; then
8890       input_to_shortpath="${new_path}.cmd"
8891    else
8892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8893$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8894      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8895$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8896      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8897    fi
8898  else
8899    input_to_shortpath="$new_path"
8900  fi
8901
8902  # Call helper function which possibly converts this using DOS-style short mode.
8903  # If so, the updated path is stored in $new_path.
8904  new_path="$input_to_shortpath"
8905
8906  input_path="$input_to_shortpath"
8907  # Check if we need to convert this using DOS-style short mode. If the path
8908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8909  # take no chances and rewrite it.
8910  # Note: m4 eats our [], so we need to use [ and ] instead.
8911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8912  if test "x$has_forbidden_chars" != x; then
8913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8917      # Going to short mode and back again did indeed matter. Since short mode is
8918      # case insensitive, let's make it lowercase to improve readability.
8919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8920      # Now convert it back to Unix-stile (cygpath)
8921      input_path=`$CYGPATH -u "$shortmode_path"`
8922      new_path="$input_path"
8923    fi
8924  fi
8925
8926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8927  if test "x$test_cygdrive_prefix" = x; then
8928    # As a simple fix, exclude /usr/bin since it's not a real path.
8929    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8931      # a path prefixed by /cygdrive for fixpath to work.
8932      new_path="$CYGWIN_ROOT_PATH$input_path"
8933    fi
8934  fi
8935
8936  # remove trailing .exe if any
8937  new_path="${new_path/%.exe/}"
8938
8939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8940
8941  # First separate the path from the arguments. This will split at the first
8942  # space.
8943  complete="$FOUND_MAKE"
8944  path="${complete%% *}"
8945  tmp="$complete EOL"
8946  arguments="${tmp#* }"
8947
8948  # Input might be given as Windows format, start by converting to
8949  # unix format.
8950  new_path="$path"
8951
8952  windows_path="$new_path"
8953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8954    unix_path=`$CYGPATH -u "$windows_path"`
8955    new_path="$unix_path"
8956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8958    new_path="$unix_path"
8959  fi
8960
8961
8962  # Now try to locate executable using which
8963  new_path=`$WHICH "$new_path" 2> /dev/null`
8964
8965  if test "x$new_path" = x; then
8966    # Oops. Which didn't find the executable.
8967    # The splitting of arguments from the executable at a space might have been incorrect,
8968    # since paths with space are more likely in Windows. Give it another try with the whole
8969    # argument.
8970    path="$complete"
8971    arguments="EOL"
8972    new_path="$path"
8973
8974  windows_path="$new_path"
8975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8976    unix_path=`$CYGPATH -u "$windows_path"`
8977    new_path="$unix_path"
8978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8980    new_path="$unix_path"
8981  fi
8982
8983
8984    new_path=`$WHICH "$new_path" 2> /dev/null`
8985
8986    if test "x$new_path" = x; then
8987      # It's still not found. Now this is an unrecoverable error.
8988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8989$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8990      has_space=`$ECHO "$complete" | $GREP " "`
8991      if test "x$has_space" != x; then
8992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8994      fi
8995      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8996    fi
8997  fi
8998
8999  # Now new_path has a complete unix path to the binary
9000  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9001    # Keep paths in /bin as-is, but remove trailing .exe if any
9002    new_path="${new_path/%.exe/}"
9003    # Do not save /bin paths to all_fixpath_prefixes!
9004  else
9005    # Not in mixed or Windows style, start by that.
9006    new_path=`cmd //c echo $new_path`
9007
9008  input_path="$new_path"
9009  # Check if we need to convert this using DOS-style short mode. If the path
9010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9011  # take no chances and rewrite it.
9012  # Note: m4 eats our [], so we need to use [ and ] instead.
9013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9014  if test "x$has_forbidden_chars" != x; then
9015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9017  fi
9018
9019    # Output is in $new_path
9020
9021  windows_path="$new_path"
9022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9023    unix_path=`$CYGPATH -u "$windows_path"`
9024    new_path="$unix_path"
9025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9027    new_path="$unix_path"
9028  fi
9029
9030    # remove trailing .exe if any
9031    new_path="${new_path/%.exe/}"
9032
9033    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9034    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9035  fi
9036
9037  else
9038    # We're on a posix platform. Hooray! :)
9039    # First separate the path from the arguments. This will split at the first
9040    # space.
9041    complete="$FOUND_MAKE"
9042    path="${complete%% *}"
9043    tmp="$complete EOL"
9044    arguments="${tmp#* }"
9045
9046    # Cannot rely on the command "which" here since it doesn't always work.
9047    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9048    if test -z "$is_absolute_path"; then
9049      # Path to executable is not absolute. Find it.
9050      IFS_save="$IFS"
9051      IFS=:
9052      for p in $PATH; do
9053        if test -f "$p/$path" && test -x "$p/$path"; then
9054          new_path="$p/$path"
9055          break
9056        fi
9057      done
9058      IFS="$IFS_save"
9059    else
9060      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9061$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9062      new_path="$path"
9063    fi
9064
9065    if test "x$new_path" = x; then
9066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9068        has_space=`$ECHO "$complete" | $GREP " "`
9069        if test "x$has_space" != x; then
9070          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9071$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9072        fi
9073        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9074      fi
9075  fi
9076
9077      # Now join together the path and the arguments once again
9078      if test "x$arguments" != xEOL; then
9079        new_complete="$new_path ${arguments% *}"
9080      else
9081        new_complete="$new_path"
9082      fi
9083
9084  if test "x$complete" != "x$new_complete"; then
9085      FOUND_MAKE="$new_complete"
9086      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9087$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9088    fi
9089
9090        fi
9091      fi
9092    fi
9093  fi
9094
9095    fi
9096
9097    if test "x$FOUND_MAKE" = x; then
9098      if test "x$TOOLS_DIR" != x; then
9099        # We have a tools-dir, check that as well before giving up.
9100        OLD_PATH=$PATH
9101        PATH=$TOOLS_DIR:$PATH
9102        for ac_prog in gmake
9103do
9104  # Extract the first word of "$ac_prog", so it can be a program name with args.
9105set dummy $ac_prog; ac_word=$2
9106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9107$as_echo_n "checking for $ac_word... " >&6; }
9108if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9109  $as_echo_n "(cached) " >&6
9110else
9111  case $CHECK_TOOLSDIR_GMAKE in
9112  [\\/]* | ?:[\\/]*)
9113  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9114  ;;
9115  *)
9116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9117for as_dir in $PATH
9118do
9119  IFS=$as_save_IFS
9120  test -z "$as_dir" && as_dir=.
9121    for ac_exec_ext in '' $ac_executable_extensions; do
9122  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9123    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9125    break 2
9126  fi
9127done
9128  done
9129IFS=$as_save_IFS
9130
9131  ;;
9132esac
9133fi
9134CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9135if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9137$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9138else
9139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9140$as_echo "no" >&6; }
9141fi
9142
9143
9144  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9145done
9146
9147
9148  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9149  DESCRIPTION="gmake in tools-dir"
9150  if test "x$MAKE_CANDIDATE" != x; then
9151    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9152$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9153    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9154    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9155    if test "x$IS_GNU_MAKE" = x; then
9156      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9157$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9158    else
9159      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9160      if test "x$IS_MODERN_MAKE" = x; then
9161        { $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
9162$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;}
9163      else
9164        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9165          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9166            MAKE_EXPECTED_ENV='cygwin'
9167          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9168            MAKE_EXPECTED_ENV='msys'
9169          else
9170            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9171          fi
9172          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9173          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9174        else
9175          # Not relevant for non-Windows
9176          IS_MAKE_CORRECT_ENV=true
9177        fi
9178        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9179          { $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
9180$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;}
9181        else
9182          FOUND_MAKE=$MAKE_CANDIDATE
9183
9184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9185
9186  # First separate the path from the arguments. This will split at the first
9187  # space.
9188  complete="$FOUND_MAKE"
9189  path="${complete%% *}"
9190  tmp="$complete EOL"
9191  arguments="${tmp#* }"
9192
9193  # Input might be given as Windows format, start by converting to
9194  # unix format.
9195  new_path=`$CYGPATH -u "$path"`
9196
9197  # Now try to locate executable using which
9198  new_path=`$WHICH "$new_path" 2> /dev/null`
9199  # bat and cmd files are not always considered executable in cygwin causing which
9200  # to not find them
9201  if test "x$new_path" = x \
9202           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9203           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9204    new_path=`$CYGPATH -u "$path"`
9205  fi
9206  if test "x$new_path" = x; then
9207    # Oops. Which didn't find the executable.
9208    # The splitting of arguments from the executable at a space might have been incorrect,
9209    # since paths with space are more likely in Windows. Give it another try with the whole
9210    # argument.
9211    path="$complete"
9212    arguments="EOL"
9213    new_path=`$CYGPATH -u "$path"`
9214    new_path=`$WHICH "$new_path" 2> /dev/null`
9215    # bat and cmd files are not always considered executable in cygwin causing which
9216    # to not find them
9217    if test "x$new_path" = x \
9218             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9219             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9220      new_path=`$CYGPATH -u "$path"`
9221    fi
9222    if test "x$new_path" = x; then
9223      # It's still not found. Now this is an unrecoverable error.
9224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9225$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9226      has_space=`$ECHO "$complete" | $GREP " "`
9227      if test "x$has_space" != x; then
9228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9230      fi
9231      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9232    fi
9233  fi
9234
9235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9238  # "foo.exe" is OK but "foo" is an error.
9239  #
9240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9241  # It is also a way to make sure we got the proper file name for the real test later on.
9242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9243  if test "x$test_shortpath" = x; then
9244    # Short path failed, file does not exist as specified.
9245    # Try adding .exe or .cmd
9246    if test -f "${new_path}.exe"; then
9247       input_to_shortpath="${new_path}.exe"
9248    elif test -f "${new_path}.cmd"; then
9249       input_to_shortpath="${new_path}.cmd"
9250    else
9251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9252$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9253      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9254$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9255      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9256    fi
9257  else
9258    input_to_shortpath="$new_path"
9259  fi
9260
9261  # Call helper function which possibly converts this using DOS-style short mode.
9262  # If so, the updated path is stored in $new_path.
9263  new_path="$input_to_shortpath"
9264
9265  input_path="$input_to_shortpath"
9266  # Check if we need to convert this using DOS-style short mode. If the path
9267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9268  # take no chances and rewrite it.
9269  # Note: m4 eats our [], so we need to use [ and ] instead.
9270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9271  if test "x$has_forbidden_chars" != x; then
9272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9276      # Going to short mode and back again did indeed matter. Since short mode is
9277      # case insensitive, let's make it lowercase to improve readability.
9278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9279      # Now convert it back to Unix-stile (cygpath)
9280      input_path=`$CYGPATH -u "$shortmode_path"`
9281      new_path="$input_path"
9282    fi
9283  fi
9284
9285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9286  if test "x$test_cygdrive_prefix" = x; then
9287    # As a simple fix, exclude /usr/bin since it's not a real path.
9288    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9290      # a path prefixed by /cygdrive for fixpath to work.
9291      new_path="$CYGWIN_ROOT_PATH$input_path"
9292    fi
9293  fi
9294
9295  # remove trailing .exe if any
9296  new_path="${new_path/%.exe/}"
9297
9298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9299
9300  # First separate the path from the arguments. This will split at the first
9301  # space.
9302  complete="$FOUND_MAKE"
9303  path="${complete%% *}"
9304  tmp="$complete EOL"
9305  arguments="${tmp#* }"
9306
9307  # Input might be given as Windows format, start by converting to
9308  # unix format.
9309  new_path="$path"
9310
9311  windows_path="$new_path"
9312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9313    unix_path=`$CYGPATH -u "$windows_path"`
9314    new_path="$unix_path"
9315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9317    new_path="$unix_path"
9318  fi
9319
9320
9321  # Now try to locate executable using which
9322  new_path=`$WHICH "$new_path" 2> /dev/null`
9323
9324  if test "x$new_path" = x; then
9325    # Oops. Which didn't find the executable.
9326    # The splitting of arguments from the executable at a space might have been incorrect,
9327    # since paths with space are more likely in Windows. Give it another try with the whole
9328    # argument.
9329    path="$complete"
9330    arguments="EOL"
9331    new_path="$path"
9332
9333  windows_path="$new_path"
9334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9335    unix_path=`$CYGPATH -u "$windows_path"`
9336    new_path="$unix_path"
9337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9339    new_path="$unix_path"
9340  fi
9341
9342
9343    new_path=`$WHICH "$new_path" 2> /dev/null`
9344
9345    if test "x$new_path" = x; then
9346      # It's still not found. Now this is an unrecoverable error.
9347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9348$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9349      has_space=`$ECHO "$complete" | $GREP " "`
9350      if test "x$has_space" != x; then
9351        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9352$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9353      fi
9354      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9355    fi
9356  fi
9357
9358  # Now new_path has a complete unix path to the binary
9359  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9360    # Keep paths in /bin as-is, but remove trailing .exe if any
9361    new_path="${new_path/%.exe/}"
9362    # Do not save /bin paths to all_fixpath_prefixes!
9363  else
9364    # Not in mixed or Windows style, start by that.
9365    new_path=`cmd //c echo $new_path`
9366
9367  input_path="$new_path"
9368  # Check if we need to convert this using DOS-style short mode. If the path
9369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9370  # take no chances and rewrite it.
9371  # Note: m4 eats our [], so we need to use [ and ] instead.
9372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9373  if test "x$has_forbidden_chars" != x; then
9374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9376  fi
9377
9378    # Output is in $new_path
9379
9380  windows_path="$new_path"
9381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9382    unix_path=`$CYGPATH -u "$windows_path"`
9383    new_path="$unix_path"
9384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9386    new_path="$unix_path"
9387  fi
9388
9389    # remove trailing .exe if any
9390    new_path="${new_path/%.exe/}"
9391
9392    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9393    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9394  fi
9395
9396  else
9397    # We're on a posix platform. Hooray! :)
9398    # First separate the path from the arguments. This will split at the first
9399    # space.
9400    complete="$FOUND_MAKE"
9401    path="${complete%% *}"
9402    tmp="$complete EOL"
9403    arguments="${tmp#* }"
9404
9405    # Cannot rely on the command "which" here since it doesn't always work.
9406    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9407    if test -z "$is_absolute_path"; then
9408      # Path to executable is not absolute. Find it.
9409      IFS_save="$IFS"
9410      IFS=:
9411      for p in $PATH; do
9412        if test -f "$p/$path" && test -x "$p/$path"; then
9413          new_path="$p/$path"
9414          break
9415        fi
9416      done
9417      IFS="$IFS_save"
9418    else
9419      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9420$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9421      new_path="$path"
9422    fi
9423
9424    if test "x$new_path" = x; then
9425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9426$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9427        has_space=`$ECHO "$complete" | $GREP " "`
9428        if test "x$has_space" != x; then
9429          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9430$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9431        fi
9432        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9433      fi
9434  fi
9435
9436      # Now join together the path and the arguments once again
9437      if test "x$arguments" != xEOL; then
9438        new_complete="$new_path ${arguments% *}"
9439      else
9440        new_complete="$new_path"
9441      fi
9442
9443  if test "x$complete" != "x$new_complete"; then
9444      FOUND_MAKE="$new_complete"
9445      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9446$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9447    fi
9448
9449        fi
9450      fi
9451    fi
9452  fi
9453
9454        if test "x$FOUND_MAKE" = x; then
9455          for ac_prog in make
9456do
9457  # Extract the first word of "$ac_prog", so it can be a program name with args.
9458set dummy $ac_prog; ac_word=$2
9459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9460$as_echo_n "checking for $ac_word... " >&6; }
9461if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9462  $as_echo_n "(cached) " >&6
9463else
9464  case $CHECK_TOOLSDIR_MAKE in
9465  [\\/]* | ?:[\\/]*)
9466  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9467  ;;
9468  *)
9469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9470for as_dir in $PATH
9471do
9472  IFS=$as_save_IFS
9473  test -z "$as_dir" && as_dir=.
9474    for ac_exec_ext in '' $ac_executable_extensions; do
9475  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9476    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9478    break 2
9479  fi
9480done
9481  done
9482IFS=$as_save_IFS
9483
9484  ;;
9485esac
9486fi
9487CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9488if test -n "$CHECK_TOOLSDIR_MAKE"; then
9489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9490$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9491else
9492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9493$as_echo "no" >&6; }
9494fi
9495
9496
9497  test -n "$CHECK_TOOLSDIR_MAKE" && break
9498done
9499
9500
9501  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9502  DESCRIPTION="make in tools-dir"
9503  if test "x$MAKE_CANDIDATE" != x; then
9504    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9505$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9506    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9507    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9508    if test "x$IS_GNU_MAKE" = x; then
9509      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9510$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9511    else
9512      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9513      if test "x$IS_MODERN_MAKE" = x; then
9514        { $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
9515$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;}
9516      else
9517        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9518          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9519            MAKE_EXPECTED_ENV='cygwin'
9520          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9521            MAKE_EXPECTED_ENV='msys'
9522          else
9523            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9524          fi
9525          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9526          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9527        else
9528          # Not relevant for non-Windows
9529          IS_MAKE_CORRECT_ENV=true
9530        fi
9531        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9532          { $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
9533$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;}
9534        else
9535          FOUND_MAKE=$MAKE_CANDIDATE
9536
9537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9538
9539  # First separate the path from the arguments. This will split at the first
9540  # space.
9541  complete="$FOUND_MAKE"
9542  path="${complete%% *}"
9543  tmp="$complete EOL"
9544  arguments="${tmp#* }"
9545
9546  # Input might be given as Windows format, start by converting to
9547  # unix format.
9548  new_path=`$CYGPATH -u "$path"`
9549
9550  # Now try to locate executable using which
9551  new_path=`$WHICH "$new_path" 2> /dev/null`
9552  # bat and cmd files are not always considered executable in cygwin causing which
9553  # to not find them
9554  if test "x$new_path" = x \
9555           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9556           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9557    new_path=`$CYGPATH -u "$path"`
9558  fi
9559  if test "x$new_path" = x; then
9560    # Oops. Which didn't find the executable.
9561    # The splitting of arguments from the executable at a space might have been incorrect,
9562    # since paths with space are more likely in Windows. Give it another try with the whole
9563    # argument.
9564    path="$complete"
9565    arguments="EOL"
9566    new_path=`$CYGPATH -u "$path"`
9567    new_path=`$WHICH "$new_path" 2> /dev/null`
9568    # bat and cmd files are not always considered executable in cygwin causing which
9569    # to not find them
9570    if test "x$new_path" = x \
9571             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9572             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9573      new_path=`$CYGPATH -u "$path"`
9574    fi
9575    if test "x$new_path" = x; then
9576      # It's still not found. Now this is an unrecoverable error.
9577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9578$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9579      has_space=`$ECHO "$complete" | $GREP " "`
9580      if test "x$has_space" != x; then
9581        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9582$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9583      fi
9584      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9585    fi
9586  fi
9587
9588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9591  # "foo.exe" is OK but "foo" is an error.
9592  #
9593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9594  # It is also a way to make sure we got the proper file name for the real test later on.
9595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9596  if test "x$test_shortpath" = x; then
9597    # Short path failed, file does not exist as specified.
9598    # Try adding .exe or .cmd
9599    if test -f "${new_path}.exe"; then
9600       input_to_shortpath="${new_path}.exe"
9601    elif test -f "${new_path}.cmd"; then
9602       input_to_shortpath="${new_path}.cmd"
9603    else
9604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9605$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9606      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9607$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9608      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9609    fi
9610  else
9611    input_to_shortpath="$new_path"
9612  fi
9613
9614  # Call helper function which possibly converts this using DOS-style short mode.
9615  # If so, the updated path is stored in $new_path.
9616  new_path="$input_to_shortpath"
9617
9618  input_path="$input_to_shortpath"
9619  # Check if we need to convert this using DOS-style short mode. If the path
9620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9621  # take no chances and rewrite it.
9622  # Note: m4 eats our [], so we need to use [ and ] instead.
9623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9624  if test "x$has_forbidden_chars" != x; then
9625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9629      # Going to short mode and back again did indeed matter. Since short mode is
9630      # case insensitive, let's make it lowercase to improve readability.
9631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9632      # Now convert it back to Unix-stile (cygpath)
9633      input_path=`$CYGPATH -u "$shortmode_path"`
9634      new_path="$input_path"
9635    fi
9636  fi
9637
9638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9639  if test "x$test_cygdrive_prefix" = x; then
9640    # As a simple fix, exclude /usr/bin since it's not a real path.
9641    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9643      # a path prefixed by /cygdrive for fixpath to work.
9644      new_path="$CYGWIN_ROOT_PATH$input_path"
9645    fi
9646  fi
9647
9648  # remove trailing .exe if any
9649  new_path="${new_path/%.exe/}"
9650
9651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9652
9653  # First separate the path from the arguments. This will split at the first
9654  # space.
9655  complete="$FOUND_MAKE"
9656  path="${complete%% *}"
9657  tmp="$complete EOL"
9658  arguments="${tmp#* }"
9659
9660  # Input might be given as Windows format, start by converting to
9661  # unix format.
9662  new_path="$path"
9663
9664  windows_path="$new_path"
9665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9666    unix_path=`$CYGPATH -u "$windows_path"`
9667    new_path="$unix_path"
9668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9670    new_path="$unix_path"
9671  fi
9672
9673
9674  # Now try to locate executable using which
9675  new_path=`$WHICH "$new_path" 2> /dev/null`
9676
9677  if test "x$new_path" = x; then
9678    # Oops. Which didn't find the executable.
9679    # The splitting of arguments from the executable at a space might have been incorrect,
9680    # since paths with space are more likely in Windows. Give it another try with the whole
9681    # argument.
9682    path="$complete"
9683    arguments="EOL"
9684    new_path="$path"
9685
9686  windows_path="$new_path"
9687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9688    unix_path=`$CYGPATH -u "$windows_path"`
9689    new_path="$unix_path"
9690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9692    new_path="$unix_path"
9693  fi
9694
9695
9696    new_path=`$WHICH "$new_path" 2> /dev/null`
9697
9698    if test "x$new_path" = x; then
9699      # It's still not found. Now this is an unrecoverable error.
9700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9701$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9702      has_space=`$ECHO "$complete" | $GREP " "`
9703      if test "x$has_space" != x; then
9704        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9705$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9706      fi
9707      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9708    fi
9709  fi
9710
9711  # Now new_path has a complete unix path to the binary
9712  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9713    # Keep paths in /bin as-is, but remove trailing .exe if any
9714    new_path="${new_path/%.exe/}"
9715    # Do not save /bin paths to all_fixpath_prefixes!
9716  else
9717    # Not in mixed or Windows style, start by that.
9718    new_path=`cmd //c echo $new_path`
9719
9720  input_path="$new_path"
9721  # Check if we need to convert this using DOS-style short mode. If the path
9722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9723  # take no chances and rewrite it.
9724  # Note: m4 eats our [], so we need to use [ and ] instead.
9725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9726  if test "x$has_forbidden_chars" != x; then
9727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9729  fi
9730
9731    # Output is in $new_path
9732
9733  windows_path="$new_path"
9734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9735    unix_path=`$CYGPATH -u "$windows_path"`
9736    new_path="$unix_path"
9737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9739    new_path="$unix_path"
9740  fi
9741
9742    # remove trailing .exe if any
9743    new_path="${new_path/%.exe/}"
9744
9745    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9746    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9747  fi
9748
9749  else
9750    # We're on a posix platform. Hooray! :)
9751    # First separate the path from the arguments. This will split at the first
9752    # space.
9753    complete="$FOUND_MAKE"
9754    path="${complete%% *}"
9755    tmp="$complete EOL"
9756    arguments="${tmp#* }"
9757
9758    # Cannot rely on the command "which" here since it doesn't always work.
9759    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9760    if test -z "$is_absolute_path"; then
9761      # Path to executable is not absolute. Find it.
9762      IFS_save="$IFS"
9763      IFS=:
9764      for p in $PATH; do
9765        if test -f "$p/$path" && test -x "$p/$path"; then
9766          new_path="$p/$path"
9767          break
9768        fi
9769      done
9770      IFS="$IFS_save"
9771    else
9772      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9773$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9774      new_path="$path"
9775    fi
9776
9777    if test "x$new_path" = x; then
9778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9779$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9780        has_space=`$ECHO "$complete" | $GREP " "`
9781        if test "x$has_space" != x; then
9782          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9783$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9784        fi
9785        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9786      fi
9787  fi
9788
9789      # Now join together the path and the arguments once again
9790      if test "x$arguments" != xEOL; then
9791        new_complete="$new_path ${arguments% *}"
9792      else
9793        new_complete="$new_path"
9794      fi
9795
9796  if test "x$complete" != "x$new_complete"; then
9797      FOUND_MAKE="$new_complete"
9798      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9799$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9800    fi
9801
9802        fi
9803      fi
9804    fi
9805  fi
9806
9807        fi
9808        PATH=$OLD_PATH
9809      fi
9810    fi
9811
9812    if test "x$FOUND_MAKE" = x; then
9813      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
9814    fi
9815  fi
9816
9817  MAKE=$FOUND_MAKE
9818
9819  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9820$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9821
9822
9823
9824    # Test if find supports -delete
9825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9826$as_echo_n "checking if find supports -delete... " >&6; }
9827    FIND_DELETE="-delete"
9828
9829    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9830
9831    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9832
9833    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9834    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9835        # No, it does not.
9836        rm $DELETEDIR/TestIfFindSupportsDelete
9837        FIND_DELETE="-exec rm \{\} \+"
9838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9839$as_echo "no" >&6; }
9840    else
9841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9842$as_echo "yes" >&6; }
9843    fi
9844    rmdir $DELETEDIR
9845
9846
9847
9848# These tools might not be installed by default,
9849# need hint on how to install them.
9850
9851    for ac_prog in unzip
9852do
9853  # Extract the first word of "$ac_prog", so it can be a program name with args.
9854set dummy $ac_prog; ac_word=$2
9855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9856$as_echo_n "checking for $ac_word... " >&6; }
9857if test "${ac_cv_path_UNZIP+set}" = set; then :
9858  $as_echo_n "(cached) " >&6
9859else
9860  case $UNZIP in
9861  [\\/]* | ?:[\\/]*)
9862  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9863  ;;
9864  *)
9865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9866for as_dir in $PATH
9867do
9868  IFS=$as_save_IFS
9869  test -z "$as_dir" && as_dir=.
9870    for ac_exec_ext in '' $ac_executable_extensions; do
9871  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9872    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9874    break 2
9875  fi
9876done
9877  done
9878IFS=$as_save_IFS
9879
9880  ;;
9881esac
9882fi
9883UNZIP=$ac_cv_path_UNZIP
9884if test -n "$UNZIP"; then
9885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9886$as_echo "$UNZIP" >&6; }
9887else
9888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9889$as_echo "no" >&6; }
9890fi
9891
9892
9893  test -n "$UNZIP" && break
9894done
9895
9896
9897    if test "x$UNZIP" = x; then
9898        if test "xunzip" = x; then
9899          PROG_NAME=unzip
9900        else
9901          PROG_NAME=unzip
9902        fi
9903        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9904$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9905        as_fn_error $? "Cannot continue" "$LINENO" 5
9906    fi
9907
9908
9909
9910    for ac_prog in zip
9911do
9912  # Extract the first word of "$ac_prog", so it can be a program name with args.
9913set dummy $ac_prog; ac_word=$2
9914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9915$as_echo_n "checking for $ac_word... " >&6; }
9916if test "${ac_cv_path_ZIP+set}" = set; then :
9917  $as_echo_n "(cached) " >&6
9918else
9919  case $ZIP in
9920  [\\/]* | ?:[\\/]*)
9921  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9922  ;;
9923  *)
9924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9925for as_dir in $PATH
9926do
9927  IFS=$as_save_IFS
9928  test -z "$as_dir" && as_dir=.
9929    for ac_exec_ext in '' $ac_executable_extensions; do
9930  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9931    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9933    break 2
9934  fi
9935done
9936  done
9937IFS=$as_save_IFS
9938
9939  ;;
9940esac
9941fi
9942ZIP=$ac_cv_path_ZIP
9943if test -n "$ZIP"; then
9944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9945$as_echo "$ZIP" >&6; }
9946else
9947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9948$as_echo "no" >&6; }
9949fi
9950
9951
9952  test -n "$ZIP" && break
9953done
9954
9955
9956    if test "x$ZIP" = x; then
9957        if test "xzip" = x; then
9958          PROG_NAME=zip
9959        else
9960          PROG_NAME=zip
9961        fi
9962        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9963$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9964        as_fn_error $? "Cannot continue" "$LINENO" 5
9965    fi
9966
9967
9968
9969# Non-required basic tools
9970
9971# Extract the first word of "ldd", so it can be a program name with args.
9972set dummy ldd; ac_word=$2
9973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9974$as_echo_n "checking for $ac_word... " >&6; }
9975if test "${ac_cv_path_LDD+set}" = set; then :
9976  $as_echo_n "(cached) " >&6
9977else
9978  case $LDD in
9979  [\\/]* | ?:[\\/]*)
9980  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9981  ;;
9982  *)
9983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9984for as_dir in $PATH
9985do
9986  IFS=$as_save_IFS
9987  test -z "$as_dir" && as_dir=.
9988    for ac_exec_ext in '' $ac_executable_extensions; do
9989  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9990    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9992    break 2
9993  fi
9994done
9995  done
9996IFS=$as_save_IFS
9997
9998  ;;
9999esac
10000fi
10001LDD=$ac_cv_path_LDD
10002if test -n "$LDD"; then
10003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10004$as_echo "$LDD" >&6; }
10005else
10006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10007$as_echo "no" >&6; }
10008fi
10009
10010
10011if test "x$LDD" = "x"; then
10012    # List shared lib dependencies is used for
10013    # debug output and checking for forbidden dependencies.
10014    # We can build without it.
10015    LDD="true"
10016fi
10017# Extract the first word of "otool", so it can be a program name with args.
10018set dummy otool; ac_word=$2
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10020$as_echo_n "checking for $ac_word... " >&6; }
10021if test "${ac_cv_path_OTOOL+set}" = set; then :
10022  $as_echo_n "(cached) " >&6
10023else
10024  case $OTOOL in
10025  [\\/]* | ?:[\\/]*)
10026  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10027  ;;
10028  *)
10029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10030for as_dir in $PATH
10031do
10032  IFS=$as_save_IFS
10033  test -z "$as_dir" && as_dir=.
10034    for ac_exec_ext in '' $ac_executable_extensions; do
10035  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10036    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10038    break 2
10039  fi
10040done
10041  done
10042IFS=$as_save_IFS
10043
10044  ;;
10045esac
10046fi
10047OTOOL=$ac_cv_path_OTOOL
10048if test -n "$OTOOL"; then
10049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10050$as_echo "$OTOOL" >&6; }
10051else
10052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
10054fi
10055
10056
10057if test "x$OTOOL" = "x"; then
10058   OTOOL="true"
10059fi
10060for ac_prog in readelf greadelf
10061do
10062  # Extract the first word of "$ac_prog", so it can be a program name with args.
10063set dummy $ac_prog; ac_word=$2
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065$as_echo_n "checking for $ac_word... " >&6; }
10066if test "${ac_cv_path_READELF+set}" = set; then :
10067  $as_echo_n "(cached) " >&6
10068else
10069  case $READELF in
10070  [\\/]* | ?:[\\/]*)
10071  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10072  ;;
10073  *)
10074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075for as_dir in $PATH
10076do
10077  IFS=$as_save_IFS
10078  test -z "$as_dir" && as_dir=.
10079    for ac_exec_ext in '' $ac_executable_extensions; do
10080  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10081    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083    break 2
10084  fi
10085done
10086  done
10087IFS=$as_save_IFS
10088
10089  ;;
10090esac
10091fi
10092READELF=$ac_cv_path_READELF
10093if test -n "$READELF"; then
10094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10095$as_echo "$READELF" >&6; }
10096else
10097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
10099fi
10100
10101
10102  test -n "$READELF" && break
10103done
10104
10105# Extract the first word of "hg", so it can be a program name with args.
10106set dummy hg; ac_word=$2
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10108$as_echo_n "checking for $ac_word... " >&6; }
10109if test "${ac_cv_path_HG+set}" = set; then :
10110  $as_echo_n "(cached) " >&6
10111else
10112  case $HG in
10113  [\\/]* | ?:[\\/]*)
10114  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10115  ;;
10116  *)
10117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10118for as_dir in $PATH
10119do
10120  IFS=$as_save_IFS
10121  test -z "$as_dir" && as_dir=.
10122    for ac_exec_ext in '' $ac_executable_extensions; do
10123  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10124    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10126    break 2
10127  fi
10128done
10129  done
10130IFS=$as_save_IFS
10131
10132  ;;
10133esac
10134fi
10135HG=$ac_cv_path_HG
10136if test -n "$HG"; then
10137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10138$as_echo "$HG" >&6; }
10139else
10140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10141$as_echo "no" >&6; }
10142fi
10143
10144
10145# Extract the first word of "stat", so it can be a program name with args.
10146set dummy stat; ac_word=$2
10147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10148$as_echo_n "checking for $ac_word... " >&6; }
10149if test "${ac_cv_path_STAT+set}" = set; then :
10150  $as_echo_n "(cached) " >&6
10151else
10152  case $STAT in
10153  [\\/]* | ?:[\\/]*)
10154  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10155  ;;
10156  *)
10157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10158for as_dir in $PATH
10159do
10160  IFS=$as_save_IFS
10161  test -z "$as_dir" && as_dir=.
10162    for ac_exec_ext in '' $ac_executable_extensions; do
10163  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10164    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10166    break 2
10167  fi
10168done
10169  done
10170IFS=$as_save_IFS
10171
10172  ;;
10173esac
10174fi
10175STAT=$ac_cv_path_STAT
10176if test -n "$STAT"; then
10177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10178$as_echo "$STAT" >&6; }
10179else
10180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10181$as_echo "no" >&6; }
10182fi
10183
10184
10185# Extract the first word of "time", so it can be a program name with args.
10186set dummy time; ac_word=$2
10187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10188$as_echo_n "checking for $ac_word... " >&6; }
10189if test "${ac_cv_path_TIME+set}" = set; then :
10190  $as_echo_n "(cached) " >&6
10191else
10192  case $TIME in
10193  [\\/]* | ?:[\\/]*)
10194  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10195  ;;
10196  *)
10197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10198for as_dir in $PATH
10199do
10200  IFS=$as_save_IFS
10201  test -z "$as_dir" && as_dir=.
10202    for ac_exec_ext in '' $ac_executable_extensions; do
10203  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10204    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10206    break 2
10207  fi
10208done
10209  done
10210IFS=$as_save_IFS
10211
10212  ;;
10213esac
10214fi
10215TIME=$ac_cv_path_TIME
10216if test -n "$TIME"; then
10217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10218$as_echo "$TIME" >&6; }
10219else
10220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221$as_echo "no" >&6; }
10222fi
10223
10224
10225
10226if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10227
10228    for ac_prog in comm
10229do
10230  # Extract the first word of "$ac_prog", so it can be a program name with args.
10231set dummy $ac_prog; ac_word=$2
10232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10233$as_echo_n "checking for $ac_word... " >&6; }
10234if test "${ac_cv_path_COMM+set}" = set; then :
10235  $as_echo_n "(cached) " >&6
10236else
10237  case $COMM in
10238  [\\/]* | ?:[\\/]*)
10239  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10240  ;;
10241  *)
10242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10243for as_dir in $PATH
10244do
10245  IFS=$as_save_IFS
10246  test -z "$as_dir" && as_dir=.
10247    for ac_exec_ext in '' $ac_executable_extensions; do
10248  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10249    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10251    break 2
10252  fi
10253done
10254  done
10255IFS=$as_save_IFS
10256
10257  ;;
10258esac
10259fi
10260COMM=$ac_cv_path_COMM
10261if test -n "$COMM"; then
10262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10263$as_echo "$COMM" >&6; }
10264else
10265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10266$as_echo "no" >&6; }
10267fi
10268
10269
10270  test -n "$COMM" && break
10271done
10272
10273
10274    if test "x$COMM" = x; then
10275        if test "xcomm" = x; then
10276          PROG_NAME=comm
10277        else
10278          PROG_NAME=comm
10279        fi
10280        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10281$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10282        as_fn_error $? "Cannot continue" "$LINENO" 5
10283    fi
10284
10285
10286fi
10287
10288if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10289
10290    for ac_prog in xattr
10291do
10292  # Extract the first word of "$ac_prog", so it can be a program name with args.
10293set dummy $ac_prog; ac_word=$2
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295$as_echo_n "checking for $ac_word... " >&6; }
10296if test "${ac_cv_path_XATTR+set}" = set; then :
10297  $as_echo_n "(cached) " >&6
10298else
10299  case $XATTR in
10300  [\\/]* | ?:[\\/]*)
10301  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10302  ;;
10303  *)
10304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305for as_dir in $PATH
10306do
10307  IFS=$as_save_IFS
10308  test -z "$as_dir" && as_dir=.
10309    for ac_exec_ext in '' $ac_executable_extensions; do
10310  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10311    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313    break 2
10314  fi
10315done
10316  done
10317IFS=$as_save_IFS
10318
10319  ;;
10320esac
10321fi
10322XATTR=$ac_cv_path_XATTR
10323if test -n "$XATTR"; then
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10325$as_echo "$XATTR" >&6; }
10326else
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329fi
10330
10331
10332  test -n "$XATTR" && break
10333done
10334
10335
10336    if test "x$XATTR" = x; then
10337        if test "xxattr" = x; then
10338          PROG_NAME=xattr
10339        else
10340          PROG_NAME=xattr
10341        fi
10342        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10343$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10344        as_fn_error $? "Cannot continue" "$LINENO" 5
10345    fi
10346
10347
10348  # Extract the first word of "codesign", so it can be a program name with args.
10349set dummy codesign; ac_word=$2
10350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10351$as_echo_n "checking for $ac_word... " >&6; }
10352if test "${ac_cv_path_CODESIGN+set}" = set; then :
10353  $as_echo_n "(cached) " >&6
10354else
10355  case $CODESIGN in
10356  [\\/]* | ?:[\\/]*)
10357  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10358  ;;
10359  *)
10360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10361for as_dir in $PATH
10362do
10363  IFS=$as_save_IFS
10364  test -z "$as_dir" && as_dir=.
10365    for ac_exec_ext in '' $ac_executable_extensions; do
10366  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10367    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10369    break 2
10370  fi
10371done
10372  done
10373IFS=$as_save_IFS
10374
10375  ;;
10376esac
10377fi
10378CODESIGN=$ac_cv_path_CODESIGN
10379if test -n "$CODESIGN"; then
10380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10381$as_echo "$CODESIGN" >&6; }
10382else
10383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10384$as_echo "no" >&6; }
10385fi
10386
10387
10388  if test "x$CODESIGN" != "x"; then
10389    # Verify that the openjdk_codesign certificate is present
10390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10391$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10392    rm -f codesign-testfile
10393    touch codesign-testfile
10394    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10395    rm -f codesign-testfile
10396    if test "x$CODESIGN" = x; then
10397      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
10399    else
10400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10401$as_echo "yes" >&6; }
10402    fi
10403  fi
10404fi
10405
10406
10407# Check if pkg-config is available.
10408
10409
10410if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10411	if test -n "$ac_tool_prefix"; then
10412  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10413set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10415$as_echo_n "checking for $ac_word... " >&6; }
10416if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10417  $as_echo_n "(cached) " >&6
10418else
10419  case $PKG_CONFIG in
10420  [\\/]* | ?:[\\/]*)
10421  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10422  ;;
10423  *)
10424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10425for as_dir in $PATH
10426do
10427  IFS=$as_save_IFS
10428  test -z "$as_dir" && as_dir=.
10429    for ac_exec_ext in '' $ac_executable_extensions; do
10430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10431    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10433    break 2
10434  fi
10435done
10436  done
10437IFS=$as_save_IFS
10438
10439  ;;
10440esac
10441fi
10442PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10443if test -n "$PKG_CONFIG"; then
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10445$as_echo "$PKG_CONFIG" >&6; }
10446else
10447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448$as_echo "no" >&6; }
10449fi
10450
10451
10452fi
10453if test -z "$ac_cv_path_PKG_CONFIG"; then
10454  ac_pt_PKG_CONFIG=$PKG_CONFIG
10455  # Extract the first word of "pkg-config", so it can be a program name with args.
10456set dummy pkg-config; ac_word=$2
10457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10458$as_echo_n "checking for $ac_word... " >&6; }
10459if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10460  $as_echo_n "(cached) " >&6
10461else
10462  case $ac_pt_PKG_CONFIG in
10463  [\\/]* | ?:[\\/]*)
10464  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10465  ;;
10466  *)
10467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10468for as_dir in $PATH
10469do
10470  IFS=$as_save_IFS
10471  test -z "$as_dir" && as_dir=.
10472    for ac_exec_ext in '' $ac_executable_extensions; do
10473  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10474    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10476    break 2
10477  fi
10478done
10479  done
10480IFS=$as_save_IFS
10481
10482  ;;
10483esac
10484fi
10485ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10486if test -n "$ac_pt_PKG_CONFIG"; then
10487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10488$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10489else
10490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10491$as_echo "no" >&6; }
10492fi
10493
10494  if test "x$ac_pt_PKG_CONFIG" = x; then
10495    PKG_CONFIG=""
10496  else
10497    case $cross_compiling:$ac_tool_warned in
10498yes:)
10499{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10500$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10501ac_tool_warned=yes ;;
10502esac
10503    PKG_CONFIG=$ac_pt_PKG_CONFIG
10504  fi
10505else
10506  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10507fi
10508
10509fi
10510if test -n "$PKG_CONFIG"; then
10511	_pkg_min_version=0.9.0
10512	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10513$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10514	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10515		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10516$as_echo "yes" >&6; }
10517	else
10518		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10519$as_echo "no" >&6; }
10520		PKG_CONFIG=""
10521	fi
10522
10523fi
10524
10525# After basic tools have been setup, we can check build os specific details.
10526
10527###############################################################################
10528
10529# Note that this is the build platform OS version!
10530
10531OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10532OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10533OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10534OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10535
10536
10537
10538
10539
10540# Setup builddeps, for automatic downloading of tools we need.
10541# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10542# boot-jdk setup, but we need to have basic tools setup first.
10543
10544
10545# Check whether --with-builddeps-conf was given.
10546if test "${with_builddeps_conf+set}" = set; then :
10547  withval=$with_builddeps_conf;
10548fi
10549
10550
10551
10552# Check whether --with-builddeps-server was given.
10553if test "${with_builddeps_server+set}" = set; then :
10554  withval=$with_builddeps_server;
10555fi
10556
10557
10558
10559# Check whether --with-builddeps-dir was given.
10560if test "${with_builddeps_dir+set}" = set; then :
10561  withval=$with_builddeps_dir;
10562else
10563  with_builddeps_dir=/localhome/builddeps
10564fi
10565
10566
10567
10568# Check whether --with-builddeps-group was given.
10569if test "${with_builddeps_group+set}" = set; then :
10570  withval=$with_builddeps_group;
10571fi
10572
10573
10574
10575
10576    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10577        if test "x$with_builddeps_conf" != x; then
10578            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10579$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10580            builddepsfile=$with_builddeps_conf
10581            if test -s $builddepsfile; then
10582                . $builddepsfile
10583                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10584$as_echo "loaded!" >&6; }
10585            else
10586               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10587           fi
10588        else
10589            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10590$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10591            builddepsfile=`mktemp`
10592            touch $builddepsfile
10593            # Put all found confs into a single file.
10594            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10595            # Source the file to acquire the variables
10596            if test -s $builddepsfile; then
10597                . $builddepsfile
10598                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10599$as_echo "found at least one!" >&6; }
10600            else
10601               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10602           fi
10603        fi
10604        # Create build and target names that use _ instead of "-" and ".".
10605        # This is necessary to use them in variable names.
10606        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10607        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10608        # Extract rewrite information for build and target
10609        eval rewritten_build=\${REWRITE_${build_var}}
10610        if test "x$rewritten_build" = x; then
10611            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10612            echo Build stays the same $rewritten_build
10613        else
10614            echo Rewriting build for builddeps into $rewritten_build
10615        fi
10616        eval rewritten_target=\${REWRITE_${target_var}}
10617        if test "x$rewritten_target" = x; then
10618            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10619            echo Target stays the same $rewritten_target
10620        else
10621            echo Rewriting target for builddeps into $rewritten_target
10622        fi
10623        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10624        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10625    fi
10626    for ac_prog in 7z unzip
10627do
10628  # Extract the first word of "$ac_prog", so it can be a program name with args.
10629set dummy $ac_prog; ac_word=$2
10630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10631$as_echo_n "checking for $ac_word... " >&6; }
10632if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10633  $as_echo_n "(cached) " >&6
10634else
10635  if test -n "$BDEPS_UNZIP"; then
10636  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10637else
10638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10639for as_dir in $PATH
10640do
10641  IFS=$as_save_IFS
10642  test -z "$as_dir" && as_dir=.
10643    for ac_exec_ext in '' $ac_executable_extensions; do
10644  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10645    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10647    break 2
10648  fi
10649done
10650  done
10651IFS=$as_save_IFS
10652
10653fi
10654fi
10655BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10656if test -n "$BDEPS_UNZIP"; then
10657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10658$as_echo "$BDEPS_UNZIP" >&6; }
10659else
10660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10661$as_echo "no" >&6; }
10662fi
10663
10664
10665  test -n "$BDEPS_UNZIP" && break
10666done
10667
10668    if test "x$BDEPS_UNZIP" = x7z; then
10669        BDEPS_UNZIP="7z x"
10670    fi
10671
10672    for ac_prog in wget lftp ftp
10673do
10674  # Extract the first word of "$ac_prog", so it can be a program name with args.
10675set dummy $ac_prog; ac_word=$2
10676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10677$as_echo_n "checking for $ac_word... " >&6; }
10678if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10679  $as_echo_n "(cached) " >&6
10680else
10681  if test -n "$BDEPS_FTP"; then
10682  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10683else
10684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10685for as_dir in $PATH
10686do
10687  IFS=$as_save_IFS
10688  test -z "$as_dir" && as_dir=.
10689    for ac_exec_ext in '' $ac_executable_extensions; do
10690  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10691    ac_cv_prog_BDEPS_FTP="$ac_prog"
10692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10693    break 2
10694  fi
10695done
10696  done
10697IFS=$as_save_IFS
10698
10699fi
10700fi
10701BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10702if test -n "$BDEPS_FTP"; then
10703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10704$as_echo "$BDEPS_FTP" >&6; }
10705else
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10707$as_echo "no" >&6; }
10708fi
10709
10710
10711  test -n "$BDEPS_FTP" && break
10712done
10713
10714
10715
10716###############################################################################
10717#
10718# Determine OpenJDK variants, options and version numbers.
10719#
10720###############################################################################
10721
10722# We need build & target for this.
10723
10724
10725###############################################################################
10726#
10727# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10728# We always build headless support.
10729#
10730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10731$as_echo_n "checking headful support... " >&6; }
10732# Check whether --enable-headful was given.
10733if test "${enable_headful+set}" = set; then :
10734  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10735else
10736  SUPPORT_HEADFUL=yes
10737fi
10738
10739
10740SUPPORT_HEADLESS=yes
10741BUILD_HEADLESS="BUILD_HEADLESS:=true"
10742
10743if test "x$SUPPORT_HEADFUL" = xyes; then
10744    # We are building both headful and headless.
10745    headful_msg="inlude support for both headful and headless"
10746fi
10747
10748if test "x$SUPPORT_HEADFUL" = xno; then
10749    # Thus we are building headless only.
10750    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10751    headful_msg="headless only"
10752fi
10753
10754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10755$as_echo "$headful_msg" >&6; }
10756
10757
10758
10759
10760
10761# Control wether Hotspot runs Queens test after build.
10762# Check whether --enable-hotspot-test-in-build was given.
10763if test "${enable_hotspot_test_in_build+set}" = set; then :
10764  enableval=$enable_hotspot_test_in_build;
10765else
10766  enable_hotspot_test_in_build=no
10767fi
10768
10769if test "x$enable_hotspot_test_in_build" = "xyes"; then
10770    TEST_IN_BUILD=true
10771else
10772    TEST_IN_BUILD=false
10773fi
10774
10775
10776###############################################################################
10777#
10778# Choose cacerts source file
10779#
10780
10781# Check whether --with-cacerts-file was given.
10782if test "${with_cacerts_file+set}" = set; then :
10783  withval=$with_cacerts_file;
10784fi
10785
10786if test "x$with_cacerts_file" != x; then
10787    CACERTS_FILE=$with_cacerts_file
10788else
10789    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10790fi
10791
10792
10793###############################################################################
10794#
10795# Enable or disable unlimited crypto
10796#
10797# Check whether --enable-unlimited-crypto was given.
10798if test "${enable_unlimited_crypto+set}" = set; then :
10799  enableval=$enable_unlimited_crypto;
10800else
10801  enable_unlimited_crypto=no
10802fi
10803
10804if test "x$enable_unlimited_crypto" = "xyes"; then
10805    UNLIMITED_CRYPTO=true
10806else
10807    UNLIMITED_CRYPTO=false
10808fi
10809
10810
10811###############################################################################
10812#
10813# Enable or disable the elliptic curve crypto implementation
10814#
10815
10816
10817###############################################################################
10818#
10819# Compress jars
10820#
10821COMPRESS_JARS=false
10822
10823
10824
10825
10826# Source the version numbers
10827. $AUTOCONF_DIR/version-numbers
10828
10829# Get the settings from parameters
10830
10831# Check whether --with-milestone was given.
10832if test "${with_milestone+set}" = set; then :
10833  withval=$with_milestone;
10834fi
10835
10836if test "x$with_milestone" = xyes; then
10837  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10838elif test "x$with_milestone" != x; then
10839    MILESTONE="$with_milestone"
10840fi
10841if test "x$MILESTONE" = x; then
10842  MILESTONE=internal
10843fi
10844
10845
10846# Check whether --with-update-version was given.
10847if test "${with_update_version+set}" = set; then :
10848  withval=$with_update_version;
10849fi
10850
10851if test "x$with_update_version" = xyes; then
10852  as_fn_error $? "Update version must have a value" "$LINENO" 5
10853elif test "x$with_update_version" != x; then
10854  JDK_UPDATE_VERSION="$with_update_version"
10855fi
10856
10857
10858# Check whether --with-build-number was given.
10859if test "${with_build_number+set}" = set; then :
10860  withval=$with_build_number;
10861fi
10862
10863if test "x$with_build_number" = xyes; then
10864  as_fn_error $? "Build number must have a value" "$LINENO" 5
10865elif test "x$with_build_number" != x; then
10866  JDK_BUILD_NUMBER="$with_build_number"
10867fi
10868if test "x$JDK_BUILD_NUMBER" = x; then
10869  JDK_BUILD_NUMBER=b00
10870fi
10871
10872
10873# Check whether --with-user-release-suffix was given.
10874if test "${with_user_release_suffix+set}" = set; then :
10875  withval=$with_user_release_suffix;
10876fi
10877
10878if test "x$with_user_release_suffix" = xyes; then
10879  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10880elif test "x$with_user_release_suffix" != x; then
10881  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10882else
10883  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10884  # Avoid [:alnum:] since it depends on the locale.
10885  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10886  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10887fi
10888
10889
10890# Now set the JDK version, milestone, build number etc.
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905COPYRIGHT_YEAR=`date +'%Y'`
10906
10907
10908if test "x$JDK_UPDATE_VERSION" != x; then
10909  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10910else
10911  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10912fi
10913
10914
10915COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10916
10917
10918
10919###############################################################################
10920#
10921# Setup BootJDK, used to bootstrap the build.
10922#
10923###############################################################################
10924
10925
10926BOOT_JDK_FOUND=no
10927
10928# Check whether --with-boot-jdk was given.
10929if test "${with_boot_jdk+set}" = set; then :
10930  withval=$with_boot_jdk;
10931fi
10932
10933
10934# We look for the Boot JDK through various means, going from more certain to
10935# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10936# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10937# must check if this is indeed valid; otherwise we'll continue looking.
10938
10939# Test: Is bootjdk explicitely set by command line arguments?
10940
10941  if test "x$BOOT_JDK_FOUND" = xno; then
10942    # Now execute the test
10943
10944if test "x$with_boot_jdk" != x; then
10945    BOOT_JDK=$with_boot_jdk
10946    BOOT_JDK_FOUND=maybe
10947    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10948$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10949fi
10950
10951
10952    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10953    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10954      # Do we have a bin/java?
10955      if test ! -x "$BOOT_JDK/bin/java"; then
10956        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10958        BOOT_JDK_FOUND=no
10959      else
10960        # Do we have a bin/javac?
10961        if test ! -x "$BOOT_JDK/bin/javac"; then
10962          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10964          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10965$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10966          BOOT_JDK_FOUND=no
10967        else
10968          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10969          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10970            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10972            BOOT_JDK_FOUND=no
10973          else
10974            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10975            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10976
10977            # Extra M4 quote needed to protect [] in grep expression.
10978            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10979            if test "x$FOUND_VERSION_78" = x; then
10980              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10982              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10983$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10984              BOOT_JDK_FOUND=no
10985            else
10986              # We're done! :-)
10987              BOOT_JDK_FOUND=yes
10988
10989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10990
10991  # Input might be given as Windows format, start by converting to
10992  # unix format.
10993  path="$BOOT_JDK"
10994  new_path=`$CYGPATH -u "$path"`
10995
10996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10999  # "foo.exe" is OK but "foo" is an error.
11000  #
11001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11002  # It is also a way to make sure we got the proper file name for the real test later on.
11003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11004  if test "x$test_shortpath" = x; then
11005    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11007    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11008  fi
11009
11010  # Call helper function which possibly converts this using DOS-style short mode.
11011  # If so, the updated path is stored in $new_path.
11012
11013  input_path="$new_path"
11014  # Check if we need to convert this using DOS-style short mode. If the path
11015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11016  # take no chances and rewrite it.
11017  # Note: m4 eats our [], so we need to use [ and ] instead.
11018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11019  if test "x$has_forbidden_chars" != x; then
11020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11024      # Going to short mode and back again did indeed matter. Since short mode is
11025      # case insensitive, let's make it lowercase to improve readability.
11026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11027      # Now convert it back to Unix-stile (cygpath)
11028      input_path=`$CYGPATH -u "$shortmode_path"`
11029      new_path="$input_path"
11030    fi
11031  fi
11032
11033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11034  if test "x$test_cygdrive_prefix" = x; then
11035    # As a simple fix, exclude /usr/bin since it's not a real path.
11036    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11038      # a path prefixed by /cygdrive for fixpath to work.
11039      new_path="$CYGWIN_ROOT_PATH$input_path"
11040    fi
11041  fi
11042
11043
11044  if test "x$path" != "x$new_path"; then
11045    BOOT_JDK="$new_path"
11046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11047$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11048  fi
11049
11050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11051
11052  path="$BOOT_JDK"
11053  has_colon=`$ECHO $path | $GREP ^.:`
11054  new_path="$path"
11055  if test "x$has_colon" = x; then
11056    # Not in mixed or Windows style, start by that.
11057    new_path=`cmd //c echo $path`
11058  fi
11059
11060
11061  input_path="$new_path"
11062  # Check if we need to convert this using DOS-style short mode. If the path
11063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11064  # take no chances and rewrite it.
11065  # Note: m4 eats our [], so we need to use [ and ] instead.
11066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11067  if test "x$has_forbidden_chars" != x; then
11068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11070  fi
11071
11072
11073  windows_path="$new_path"
11074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11075    unix_path=`$CYGPATH -u "$windows_path"`
11076    new_path="$unix_path"
11077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11079    new_path="$unix_path"
11080  fi
11081
11082  if test "x$path" != "x$new_path"; then
11083    BOOT_JDK="$new_path"
11084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11086  fi
11087
11088  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11089  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11090
11091  else
11092    # We're on a posix platform. Hooray! :)
11093    path="$BOOT_JDK"
11094    has_space=`$ECHO "$path" | $GREP " "`
11095    if test "x$has_space" != x; then
11096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11098      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11099    fi
11100
11101    # Use eval to expand a potential ~
11102    eval path="$path"
11103    if test ! -f "$path" && test ! -d "$path"; then
11104      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11105    fi
11106
11107    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11108  fi
11109
11110              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11111$as_echo_n "checking for Boot JDK... " >&6; }
11112              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11113$as_echo "$BOOT_JDK" >&6; }
11114              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11115$as_echo_n "checking Boot JDK version... " >&6; }
11116              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11117              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11118$as_echo "$BOOT_JDK_VERSION" >&6; }
11119            fi # end check jdk version
11120          fi # end check rt.jar
11121        fi # end check javac
11122      fi # end check java
11123    fi # end check boot jdk found
11124  fi
11125
11126if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11127  # Having specified an argument which is incorrect will produce an instant failure;
11128  # we should not go on looking
11129  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11130fi
11131
11132# Test: Is bootjdk available from builddeps?
11133
11134  if test "x$BOOT_JDK_FOUND" = xno; then
11135    # Now execute the test
11136
11137
11138
11139    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11140        # Source the builddeps file again, to make sure it uses the latest variables!
11141        . $builddepsfile
11142        # Look for a target and build machine specific resource!
11143        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11144        if test "x$resource" = x; then
11145            # Ok, lets instead look for a target specific resource
11146            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11147        fi
11148        if test "x$resource" = x; then
11149            # Ok, lets instead look for a build specific resource
11150            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11151        fi
11152        if test "x$resource" = x; then
11153            # Ok, lets instead look for a generic resource
11154            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11155            resource=${builddep_bootjdk}
11156        fi
11157        if test "x$resource" != x; then
11158            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11159$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11160	    # If the resource in the builddeps.conf file is an existing directory,
11161	    # for example /java/linux/cups
11162	    if test -d ${resource}; then
11163	       depdir=${resource}
11164	    else
11165
11166# bootjdk is for example mymodule
11167# $resource is for example libs/general/libmymod_1_2_3.zip
11168# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11169# $with_builddeps_dir is for example /localhome/builddeps
11170# depdir is the name of the variable into which we store the depdir, eg MYMOD
11171# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11172# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11173    filename=`basename $resource`
11174    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11175    filebase=${filename%%.*}
11176    extension=${filename#*.}
11177    installdir=$with_builddeps_dir/$filebase
11178    if test ! -f $installdir/$filename.unpacked; then
11179        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11180$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11181        if test ! -d $installdir; then
11182            mkdir -p $installdir
11183        fi
11184        if test ! -d $installdir; then
11185            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11186        fi
11187        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11188        touch $tmpfile
11189        if test ! -f $tmpfile; then
11190            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11191        fi
11192
11193    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11194    # $tmpfile is the local file name for the downloaded file.
11195    VALID_TOOL=no
11196    if test "x$BDEPS_FTP" = xwget; then
11197       VALID_TOOL=yes
11198       wget -O $tmpfile $with_builddeps_server/$resource
11199    fi
11200    if test "x$BDEPS_FTP" = xlftp; then
11201       VALID_TOOL=yes
11202       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11203    fi
11204    if test "x$BDEPS_FTP" = xftp; then
11205        VALID_TOOL=yes
11206        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11207        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11208        FTPUSERPWD=${FTPSERVER%%@*}
11209        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11210            FTPUSER=${userpwd%%:*}
11211            FTPPWD=${userpwd#*@}
11212            FTPSERVER=${FTPSERVER#*@}
11213        else
11214            FTPUSER=ftp
11215            FTPPWD=ftp
11216        fi
11217        # the "pass" command does not work on some
11218        # ftp clients (read ftp.exe) but if it works,
11219        # passive mode is better!
11220        (\
11221            echo "user $FTPUSER $FTPPWD"        ;\
11222            echo "pass"                         ;\
11223            echo "bin"                          ;\
11224            echo "get $FTPPATH $tmpfile"              ;\
11225        ) | ftp -in $FTPSERVER
11226    fi
11227    if test "x$VALID_TOOL" != xyes; then
11228       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11229    fi
11230
11231        mv $tmpfile $installdir/$filename
11232        if test ! -s $installdir/$filename; then
11233            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11234        fi
11235        case "$extension" in
11236            zip)  echo "Unzipping $installdir/$filename..."
11237               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11238            ;;
11239            tar.gz) echo "Untaring $installdir/$filename..."
11240               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11241            ;;
11242            tgz) echo "Untaring $installdir/$filename..."
11243               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11244            ;;
11245            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11246            ;;
11247        esac
11248    fi
11249    if test -f $installdir/$filename.unpacked; then
11250        depdir=$installdir
11251    fi
11252
11253	    fi
11254            # Source the builddeps file again, because in the previous command, the depdir
11255            # was updated to point at the current build dependency install directory.
11256            . $builddepsfile
11257            # Now extract variables from the builddeps.conf files.
11258            theroot=${builddep_bootjdk_ROOT}
11259            thecflags=${builddep_bootjdk_CFLAGS}
11260            thelibs=${builddep_bootjdk_LIBS}
11261            if test "x$depdir" = x; then
11262                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11263            fi
11264            BOOT_JDK=$depdir
11265            if test "x$theroot" != x; then
11266               BOOT_JDK="$theroot"
11267            fi
11268            if test "x$thecflags" != x; then
11269               BOOT_JDK_CFLAGS="$thecflags"
11270            fi
11271            if test "x$thelibs" != x; then
11272               BOOT_JDK_LIBS="$thelibs"
11273            fi
11274            BOOT_JDK_FOUND=maybe
11275            else BOOT_JDK_FOUND=no
11276
11277        fi
11278        else BOOT_JDK_FOUND=no
11279
11280    fi
11281
11282
11283
11284    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11285    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11286      # Do we have a bin/java?
11287      if test ! -x "$BOOT_JDK/bin/java"; then
11288        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11290        BOOT_JDK_FOUND=no
11291      else
11292        # Do we have a bin/javac?
11293        if test ! -x "$BOOT_JDK/bin/javac"; then
11294          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11296          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11297$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11298          BOOT_JDK_FOUND=no
11299        else
11300          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11301          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11302            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11304            BOOT_JDK_FOUND=no
11305          else
11306            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11307            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11308
11309            # Extra M4 quote needed to protect [] in grep expression.
11310            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11311            if test "x$FOUND_VERSION_78" = x; then
11312              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11314              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11315$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11316              BOOT_JDK_FOUND=no
11317            else
11318              # We're done! :-)
11319              BOOT_JDK_FOUND=yes
11320
11321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11322
11323  # Input might be given as Windows format, start by converting to
11324  # unix format.
11325  path="$BOOT_JDK"
11326  new_path=`$CYGPATH -u "$path"`
11327
11328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11331  # "foo.exe" is OK but "foo" is an error.
11332  #
11333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11334  # It is also a way to make sure we got the proper file name for the real test later on.
11335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11336  if test "x$test_shortpath" = x; then
11337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11339    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11340  fi
11341
11342  # Call helper function which possibly converts this using DOS-style short mode.
11343  # If so, the updated path is stored in $new_path.
11344
11345  input_path="$new_path"
11346  # Check if we need to convert this using DOS-style short mode. If the path
11347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11348  # take no chances and rewrite it.
11349  # Note: m4 eats our [], so we need to use [ and ] instead.
11350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11351  if test "x$has_forbidden_chars" != x; then
11352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11356      # Going to short mode and back again did indeed matter. Since short mode is
11357      # case insensitive, let's make it lowercase to improve readability.
11358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11359      # Now convert it back to Unix-stile (cygpath)
11360      input_path=`$CYGPATH -u "$shortmode_path"`
11361      new_path="$input_path"
11362    fi
11363  fi
11364
11365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11366  if test "x$test_cygdrive_prefix" = x; then
11367    # As a simple fix, exclude /usr/bin since it's not a real path.
11368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11370      # a path prefixed by /cygdrive for fixpath to work.
11371      new_path="$CYGWIN_ROOT_PATH$input_path"
11372    fi
11373  fi
11374
11375
11376  if test "x$path" != "x$new_path"; then
11377    BOOT_JDK="$new_path"
11378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11380  fi
11381
11382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11383
11384  path="$BOOT_JDK"
11385  has_colon=`$ECHO $path | $GREP ^.:`
11386  new_path="$path"
11387  if test "x$has_colon" = x; then
11388    # Not in mixed or Windows style, start by that.
11389    new_path=`cmd //c echo $path`
11390  fi
11391
11392
11393  input_path="$new_path"
11394  # Check if we need to convert this using DOS-style short mode. If the path
11395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11396  # take no chances and rewrite it.
11397  # Note: m4 eats our [], so we need to use [ and ] instead.
11398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11399  if test "x$has_forbidden_chars" != x; then
11400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11402  fi
11403
11404
11405  windows_path="$new_path"
11406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11407    unix_path=`$CYGPATH -u "$windows_path"`
11408    new_path="$unix_path"
11409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11411    new_path="$unix_path"
11412  fi
11413
11414  if test "x$path" != "x$new_path"; then
11415    BOOT_JDK="$new_path"
11416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11417$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11418  fi
11419
11420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11422
11423  else
11424    # We're on a posix platform. Hooray! :)
11425    path="$BOOT_JDK"
11426    has_space=`$ECHO "$path" | $GREP " "`
11427    if test "x$has_space" != x; then
11428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11430      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11431    fi
11432
11433    # Use eval to expand a potential ~
11434    eval path="$path"
11435    if test ! -f "$path" && test ! -d "$path"; then
11436      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11437    fi
11438
11439    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11440  fi
11441
11442              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11443$as_echo_n "checking for Boot JDK... " >&6; }
11444              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11445$as_echo "$BOOT_JDK" >&6; }
11446              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11447$as_echo_n "checking Boot JDK version... " >&6; }
11448              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11449              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11450$as_echo "$BOOT_JDK_VERSION" >&6; }
11451            fi # end check jdk version
11452          fi # end check rt.jar
11453        fi # end check javac
11454      fi # end check java
11455    fi # end check boot jdk found
11456  fi
11457
11458
11459# Test: Is $JAVA_HOME set?
11460
11461  if test "x$BOOT_JDK_FOUND" = xno; then
11462    # Now execute the test
11463
11464    if test "x$JAVA_HOME" != x; then
11465        JAVA_HOME_PROCESSED="$JAVA_HOME"
11466
11467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11468
11469  # Input might be given as Windows format, start by converting to
11470  # unix format.
11471  path="$JAVA_HOME_PROCESSED"
11472  new_path=`$CYGPATH -u "$path"`
11473
11474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11477  # "foo.exe" is OK but "foo" is an error.
11478  #
11479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11480  # It is also a way to make sure we got the proper file name for the real test later on.
11481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11482  if test "x$test_shortpath" = x; then
11483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11484$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11485    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11486  fi
11487
11488  # Call helper function which possibly converts this using DOS-style short mode.
11489  # If so, the updated path is stored in $new_path.
11490
11491  input_path="$new_path"
11492  # Check if we need to convert this using DOS-style short mode. If the path
11493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11494  # take no chances and rewrite it.
11495  # Note: m4 eats our [], so we need to use [ and ] instead.
11496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11497  if test "x$has_forbidden_chars" != x; then
11498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11502      # Going to short mode and back again did indeed matter. Since short mode is
11503      # case insensitive, let's make it lowercase to improve readability.
11504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11505      # Now convert it back to Unix-stile (cygpath)
11506      input_path=`$CYGPATH -u "$shortmode_path"`
11507      new_path="$input_path"
11508    fi
11509  fi
11510
11511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11512  if test "x$test_cygdrive_prefix" = x; then
11513    # As a simple fix, exclude /usr/bin since it's not a real path.
11514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11516      # a path prefixed by /cygdrive for fixpath to work.
11517      new_path="$CYGWIN_ROOT_PATH$input_path"
11518    fi
11519  fi
11520
11521
11522  if test "x$path" != "x$new_path"; then
11523    JAVA_HOME_PROCESSED="$new_path"
11524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11525$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11526  fi
11527
11528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11529
11530  path="$JAVA_HOME_PROCESSED"
11531  has_colon=`$ECHO $path | $GREP ^.:`
11532  new_path="$path"
11533  if test "x$has_colon" = x; then
11534    # Not in mixed or Windows style, start by that.
11535    new_path=`cmd //c echo $path`
11536  fi
11537
11538
11539  input_path="$new_path"
11540  # Check if we need to convert this using DOS-style short mode. If the path
11541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11542  # take no chances and rewrite it.
11543  # Note: m4 eats our [], so we need to use [ and ] instead.
11544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11545  if test "x$has_forbidden_chars" != x; then
11546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11548  fi
11549
11550
11551  windows_path="$new_path"
11552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11553    unix_path=`$CYGPATH -u "$windows_path"`
11554    new_path="$unix_path"
11555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11557    new_path="$unix_path"
11558  fi
11559
11560  if test "x$path" != "x$new_path"; then
11561    JAVA_HOME_PROCESSED="$new_path"
11562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11563$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11564  fi
11565
11566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11568
11569  else
11570    # We're on a posix platform. Hooray! :)
11571    path="$JAVA_HOME_PROCESSED"
11572    has_space=`$ECHO "$path" | $GREP " "`
11573    if test "x$has_space" != x; then
11574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11575$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11576      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11577    fi
11578
11579    # Use eval to expand a potential ~
11580    eval path="$path"
11581    if test ! -f "$path" && test ! -d "$path"; then
11582      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11583    fi
11584
11585    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11586  fi
11587
11588        if test ! -d "$JAVA_HOME_PROCESSED"; then
11589            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11590$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11591        else
11592          # Aha, the user has set a JAVA_HOME
11593          # let us use that as the Boot JDK.
11594          BOOT_JDK="$JAVA_HOME_PROCESSED"
11595          BOOT_JDK_FOUND=maybe
11596          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11597$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11598        fi
11599    fi
11600
11601
11602    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11603    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11604      # Do we have a bin/java?
11605      if test ! -x "$BOOT_JDK/bin/java"; then
11606        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11608        BOOT_JDK_FOUND=no
11609      else
11610        # Do we have a bin/javac?
11611        if test ! -x "$BOOT_JDK/bin/javac"; then
11612          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11614          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11615$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11616          BOOT_JDK_FOUND=no
11617        else
11618          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11619          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11620            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11622            BOOT_JDK_FOUND=no
11623          else
11624            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11625            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11626
11627            # Extra M4 quote needed to protect [] in grep expression.
11628            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11629            if test "x$FOUND_VERSION_78" = x; then
11630              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11632              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11633$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11634              BOOT_JDK_FOUND=no
11635            else
11636              # We're done! :-)
11637              BOOT_JDK_FOUND=yes
11638
11639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11640
11641  # Input might be given as Windows format, start by converting to
11642  # unix format.
11643  path="$BOOT_JDK"
11644  new_path=`$CYGPATH -u "$path"`
11645
11646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11649  # "foo.exe" is OK but "foo" is an error.
11650  #
11651  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11652  # It is also a way to make sure we got the proper file name for the real test later on.
11653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11654  if test "x$test_shortpath" = x; then
11655    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11656$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11657    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11658  fi
11659
11660  # Call helper function which possibly converts this using DOS-style short mode.
11661  # If so, the updated path is stored in $new_path.
11662
11663  input_path="$new_path"
11664  # Check if we need to convert this using DOS-style short mode. If the path
11665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11666  # take no chances and rewrite it.
11667  # Note: m4 eats our [], so we need to use [ and ] instead.
11668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11669  if test "x$has_forbidden_chars" != x; then
11670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11674      # Going to short mode and back again did indeed matter. Since short mode is
11675      # case insensitive, let's make it lowercase to improve readability.
11676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11677      # Now convert it back to Unix-stile (cygpath)
11678      input_path=`$CYGPATH -u "$shortmode_path"`
11679      new_path="$input_path"
11680    fi
11681  fi
11682
11683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11684  if test "x$test_cygdrive_prefix" = x; then
11685    # As a simple fix, exclude /usr/bin since it's not a real path.
11686    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11688      # a path prefixed by /cygdrive for fixpath to work.
11689      new_path="$CYGWIN_ROOT_PATH$input_path"
11690    fi
11691  fi
11692
11693
11694  if test "x$path" != "x$new_path"; then
11695    BOOT_JDK="$new_path"
11696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11697$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11698  fi
11699
11700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11701
11702  path="$BOOT_JDK"
11703  has_colon=`$ECHO $path | $GREP ^.:`
11704  new_path="$path"
11705  if test "x$has_colon" = x; then
11706    # Not in mixed or Windows style, start by that.
11707    new_path=`cmd //c echo $path`
11708  fi
11709
11710
11711  input_path="$new_path"
11712  # Check if we need to convert this using DOS-style short mode. If the path
11713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11714  # take no chances and rewrite it.
11715  # Note: m4 eats our [], so we need to use [ and ] instead.
11716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11717  if test "x$has_forbidden_chars" != x; then
11718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11720  fi
11721
11722
11723  windows_path="$new_path"
11724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11725    unix_path=`$CYGPATH -u "$windows_path"`
11726    new_path="$unix_path"
11727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11729    new_path="$unix_path"
11730  fi
11731
11732  if test "x$path" != "x$new_path"; then
11733    BOOT_JDK="$new_path"
11734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11735$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11736  fi
11737
11738  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11739  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11740
11741  else
11742    # We're on a posix platform. Hooray! :)
11743    path="$BOOT_JDK"
11744    has_space=`$ECHO "$path" | $GREP " "`
11745    if test "x$has_space" != x; then
11746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11748      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11749    fi
11750
11751    # Use eval to expand a potential ~
11752    eval path="$path"
11753    if test ! -f "$path" && test ! -d "$path"; then
11754      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11755    fi
11756
11757    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11758  fi
11759
11760              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11761$as_echo_n "checking for Boot JDK... " >&6; }
11762              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11763$as_echo "$BOOT_JDK" >&6; }
11764              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11765$as_echo_n "checking Boot JDK version... " >&6; }
11766              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11767              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11768$as_echo "$BOOT_JDK_VERSION" >&6; }
11769            fi # end check jdk version
11770          fi # end check rt.jar
11771        fi # end check javac
11772      fi # end check java
11773    fi # end check boot jdk found
11774  fi
11775
11776
11777# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11778
11779  if test "x$BOOT_JDK_FOUND" = xno; then
11780    # Now execute the test
11781
11782    if test -x /usr/libexec/java_home; then
11783        BOOT_JDK=`/usr/libexec/java_home`
11784        BOOT_JDK_FOUND=maybe
11785        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11786$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11787    fi
11788
11789
11790    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11791    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11792      # Do we have a bin/java?
11793      if test ! -x "$BOOT_JDK/bin/java"; then
11794        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11796        BOOT_JDK_FOUND=no
11797      else
11798        # Do we have a bin/javac?
11799        if test ! -x "$BOOT_JDK/bin/javac"; then
11800          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11802          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11803$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11804          BOOT_JDK_FOUND=no
11805        else
11806          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11807          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11808            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11810            BOOT_JDK_FOUND=no
11811          else
11812            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11813            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11814
11815            # Extra M4 quote needed to protect [] in grep expression.
11816            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11817            if test "x$FOUND_VERSION_78" = x; then
11818              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11820              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11821$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11822              BOOT_JDK_FOUND=no
11823            else
11824              # We're done! :-)
11825              BOOT_JDK_FOUND=yes
11826
11827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11828
11829  # Input might be given as Windows format, start by converting to
11830  # unix format.
11831  path="$BOOT_JDK"
11832  new_path=`$CYGPATH -u "$path"`
11833
11834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11837  # "foo.exe" is OK but "foo" is an error.
11838  #
11839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11840  # It is also a way to make sure we got the proper file name for the real test later on.
11841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11842  if test "x$test_shortpath" = x; then
11843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11845    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11846  fi
11847
11848  # Call helper function which possibly converts this using DOS-style short mode.
11849  # If so, the updated path is stored in $new_path.
11850
11851  input_path="$new_path"
11852  # Check if we need to convert this using DOS-style short mode. If the path
11853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11854  # take no chances and rewrite it.
11855  # Note: m4 eats our [], so we need to use [ and ] instead.
11856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11857  if test "x$has_forbidden_chars" != x; then
11858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11862      # Going to short mode and back again did indeed matter. Since short mode is
11863      # case insensitive, let's make it lowercase to improve readability.
11864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11865      # Now convert it back to Unix-stile (cygpath)
11866      input_path=`$CYGPATH -u "$shortmode_path"`
11867      new_path="$input_path"
11868    fi
11869  fi
11870
11871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11872  if test "x$test_cygdrive_prefix" = x; then
11873    # As a simple fix, exclude /usr/bin since it's not a real path.
11874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11876      # a path prefixed by /cygdrive for fixpath to work.
11877      new_path="$CYGWIN_ROOT_PATH$input_path"
11878    fi
11879  fi
11880
11881
11882  if test "x$path" != "x$new_path"; then
11883    BOOT_JDK="$new_path"
11884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11886  fi
11887
11888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11889
11890  path="$BOOT_JDK"
11891  has_colon=`$ECHO $path | $GREP ^.:`
11892  new_path="$path"
11893  if test "x$has_colon" = x; then
11894    # Not in mixed or Windows style, start by that.
11895    new_path=`cmd //c echo $path`
11896  fi
11897
11898
11899  input_path="$new_path"
11900  # Check if we need to convert this using DOS-style short mode. If the path
11901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11902  # take no chances and rewrite it.
11903  # Note: m4 eats our [], so we need to use [ and ] instead.
11904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11905  if test "x$has_forbidden_chars" != x; then
11906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11908  fi
11909
11910
11911  windows_path="$new_path"
11912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11913    unix_path=`$CYGPATH -u "$windows_path"`
11914    new_path="$unix_path"
11915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11917    new_path="$unix_path"
11918  fi
11919
11920  if test "x$path" != "x$new_path"; then
11921    BOOT_JDK="$new_path"
11922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11923$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11924  fi
11925
11926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11928
11929  else
11930    # We're on a posix platform. Hooray! :)
11931    path="$BOOT_JDK"
11932    has_space=`$ECHO "$path" | $GREP " "`
11933    if test "x$has_space" != x; then
11934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11935$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11936      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11937    fi
11938
11939    # Use eval to expand a potential ~
11940    eval path="$path"
11941    if test ! -f "$path" && test ! -d "$path"; then
11942      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11943    fi
11944
11945    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11946  fi
11947
11948              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11949$as_echo_n "checking for Boot JDK... " >&6; }
11950              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11951$as_echo "$BOOT_JDK" >&6; }
11952              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11953$as_echo_n "checking Boot JDK version... " >&6; }
11954              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11955              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11956$as_echo "$BOOT_JDK_VERSION" >&6; }
11957            fi # end check jdk version
11958          fi # end check rt.jar
11959        fi # end check javac
11960      fi # end check java
11961    fi # end check boot jdk found
11962  fi
11963
11964
11965# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11966
11967  if test "x$BOOT_JDK_FOUND" = xno; then
11968    # Now execute the test
11969
11970    # Extract the first word of "javac", so it can be a program name with args.
11971set dummy javac; ac_word=$2
11972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11973$as_echo_n "checking for $ac_word... " >&6; }
11974if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11975  $as_echo_n "(cached) " >&6
11976else
11977  case $JAVAC_CHECK in
11978  [\\/]* | ?:[\\/]*)
11979  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11980  ;;
11981  *)
11982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11983for as_dir in $PATH
11984do
11985  IFS=$as_save_IFS
11986  test -z "$as_dir" && as_dir=.
11987    for ac_exec_ext in '' $ac_executable_extensions; do
11988  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11989    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11991    break 2
11992  fi
11993done
11994  done
11995IFS=$as_save_IFS
11996
11997  ;;
11998esac
11999fi
12000JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12001if test -n "$JAVAC_CHECK"; then
12002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12003$as_echo "$JAVAC_CHECK" >&6; }
12004else
12005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12006$as_echo "no" >&6; }
12007fi
12008
12009
12010    # Extract the first word of "java", so it can be a program name with args.
12011set dummy java; ac_word=$2
12012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12013$as_echo_n "checking for $ac_word... " >&6; }
12014if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12015  $as_echo_n "(cached) " >&6
12016else
12017  case $JAVA_CHECK in
12018  [\\/]* | ?:[\\/]*)
12019  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12020  ;;
12021  *)
12022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12023for as_dir in $PATH
12024do
12025  IFS=$as_save_IFS
12026  test -z "$as_dir" && as_dir=.
12027    for ac_exec_ext in '' $ac_executable_extensions; do
12028  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12029    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12031    break 2
12032  fi
12033done
12034  done
12035IFS=$as_save_IFS
12036
12037  ;;
12038esac
12039fi
12040JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12041if test -n "$JAVA_CHECK"; then
12042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12043$as_echo "$JAVA_CHECK" >&6; }
12044else
12045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12046$as_echo "no" >&6; }
12047fi
12048
12049
12050    BINARY="$JAVAC_CHECK"
12051    if test "x$JAVAC_CHECK" = x; then
12052        BINARY="$JAVA_CHECK"
12053    fi
12054    if test "x$BINARY" != x; then
12055        # So there is a java(c) binary, it might be part of a JDK.
12056        # Lets find the JDK/JRE directory by following symbolic links.
12057        # Linux/GNU systems often have links from /usr/bin/java to
12058        # /etc/alternatives/java to the real JDK binary.
12059
12060    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12061        # Follow a chain of symbolic links. Use readlink
12062        # where it exists, else fall back to horribly
12063        # complicated shell code.
12064        if test "x$READLINK_TESTED" != yes; then
12065            # On MacOSX there is a readlink tool with a different
12066            # purpose than the GNU readlink tool. Check the found readlink.
12067            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12068            if test "x$ISGNU" = x; then
12069                 # A readlink that we do not know how to use.
12070                 # Are there other non-GNU readlinks out there?
12071                 READLINK_TESTED=yes
12072                 READLINK=
12073            fi
12074        fi
12075
12076        if test "x$READLINK" != x; then
12077            BINARY=`$READLINK -f $BINARY`
12078        else
12079            # Save the current directory for restoring afterwards
12080            STARTDIR=$PWD
12081            COUNTER=0
12082            sym_link_dir=`$DIRNAME $BINARY`
12083            sym_link_file=`$BASENAME $BINARY`
12084            cd $sym_link_dir
12085            # Use -P flag to resolve symlinks in directories.
12086            cd `$THEPWDCMD -P`
12087            sym_link_dir=`$THEPWDCMD -P`
12088            # Resolve file symlinks
12089            while test $COUNTER -lt 20; do
12090                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12091                if test "x$ISLINK" == x; then
12092                    # This is not a symbolic link! We are done!
12093                    break
12094                fi
12095                # Again resolve directory symlinks since the target of the just found
12096                # link could be in a different directory
12097                cd `$DIRNAME $ISLINK`
12098                sym_link_dir=`$THEPWDCMD -P`
12099                sym_link_file=`$BASENAME $ISLINK`
12100                let COUNTER=COUNTER+1
12101            done
12102            cd $STARTDIR
12103            BINARY=$sym_link_dir/$sym_link_file
12104        fi
12105    fi
12106
12107        BOOT_JDK=`dirname "$BINARY"`
12108        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12109        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12110            # Looks like we found ourselves an JDK
12111            BOOT_JDK_FOUND=maybe
12112            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12113$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12114        fi
12115    fi
12116
12117
12118    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12119    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12120      # Do we have a bin/java?
12121      if test ! -x "$BOOT_JDK/bin/java"; then
12122        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12124        BOOT_JDK_FOUND=no
12125      else
12126        # Do we have a bin/javac?
12127        if test ! -x "$BOOT_JDK/bin/javac"; then
12128          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12130          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12131$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12132          BOOT_JDK_FOUND=no
12133        else
12134          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12135          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12136            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12137$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12138            BOOT_JDK_FOUND=no
12139          else
12140            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12141            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12142
12143            # Extra M4 quote needed to protect [] in grep expression.
12144            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12145            if test "x$FOUND_VERSION_78" = x; then
12146              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12148              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12149$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12150              BOOT_JDK_FOUND=no
12151            else
12152              # We're done! :-)
12153              BOOT_JDK_FOUND=yes
12154
12155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12156
12157  # Input might be given as Windows format, start by converting to
12158  # unix format.
12159  path="$BOOT_JDK"
12160  new_path=`$CYGPATH -u "$path"`
12161
12162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12165  # "foo.exe" is OK but "foo" is an error.
12166  #
12167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12168  # It is also a way to make sure we got the proper file name for the real test later on.
12169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12170  if test "x$test_shortpath" = x; then
12171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12173    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12174  fi
12175
12176  # Call helper function which possibly converts this using DOS-style short mode.
12177  # If so, the updated path is stored in $new_path.
12178
12179  input_path="$new_path"
12180  # Check if we need to convert this using DOS-style short mode. If the path
12181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12182  # take no chances and rewrite it.
12183  # Note: m4 eats our [], so we need to use [ and ] instead.
12184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12185  if test "x$has_forbidden_chars" != x; then
12186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12190      # Going to short mode and back again did indeed matter. Since short mode is
12191      # case insensitive, let's make it lowercase to improve readability.
12192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12193      # Now convert it back to Unix-stile (cygpath)
12194      input_path=`$CYGPATH -u "$shortmode_path"`
12195      new_path="$input_path"
12196    fi
12197  fi
12198
12199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12200  if test "x$test_cygdrive_prefix" = x; then
12201    # As a simple fix, exclude /usr/bin since it's not a real path.
12202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12204      # a path prefixed by /cygdrive for fixpath to work.
12205      new_path="$CYGWIN_ROOT_PATH$input_path"
12206    fi
12207  fi
12208
12209
12210  if test "x$path" != "x$new_path"; then
12211    BOOT_JDK="$new_path"
12212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12214  fi
12215
12216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12217
12218  path="$BOOT_JDK"
12219  has_colon=`$ECHO $path | $GREP ^.:`
12220  new_path="$path"
12221  if test "x$has_colon" = x; then
12222    # Not in mixed or Windows style, start by that.
12223    new_path=`cmd //c echo $path`
12224  fi
12225
12226
12227  input_path="$new_path"
12228  # Check if we need to convert this using DOS-style short mode. If the path
12229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12230  # take no chances and rewrite it.
12231  # Note: m4 eats our [], so we need to use [ and ] instead.
12232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12233  if test "x$has_forbidden_chars" != x; then
12234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12236  fi
12237
12238
12239  windows_path="$new_path"
12240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12241    unix_path=`$CYGPATH -u "$windows_path"`
12242    new_path="$unix_path"
12243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12245    new_path="$unix_path"
12246  fi
12247
12248  if test "x$path" != "x$new_path"; then
12249    BOOT_JDK="$new_path"
12250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12252  fi
12253
12254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12256
12257  else
12258    # We're on a posix platform. Hooray! :)
12259    path="$BOOT_JDK"
12260    has_space=`$ECHO "$path" | $GREP " "`
12261    if test "x$has_space" != x; then
12262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12264      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12265    fi
12266
12267    # Use eval to expand a potential ~
12268    eval path="$path"
12269    if test ! -f "$path" && test ! -d "$path"; then
12270      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12271    fi
12272
12273    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12274  fi
12275
12276              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12277$as_echo_n "checking for Boot JDK... " >&6; }
12278              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12279$as_echo "$BOOT_JDK" >&6; }
12280              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12281$as_echo_n "checking Boot JDK version... " >&6; }
12282              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12283              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12284$as_echo "$BOOT_JDK_VERSION" >&6; }
12285            fi # end check jdk version
12286          fi # end check rt.jar
12287        fi # end check javac
12288      fi # end check java
12289    fi # end check boot jdk found
12290  fi
12291
12292
12293# Test: Is there a JDK installed in default, well-known locations?
12294
12295  if test "x$BOOT_JDK_FOUND" = xno; then
12296    # Now execute the test
12297
12298  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12299
12300  if test "x$BOOT_JDK_FOUND" = xno; then
12301    # Now execute the test
12302
12303  if test "x$ProgramW6432" != x; then
12304    VIRTUAL_DIR="$ProgramW6432/Java"
12305
12306  windows_path="$VIRTUAL_DIR"
12307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12308    unix_path=`$CYGPATH -u "$windows_path"`
12309    VIRTUAL_DIR="$unix_path"
12310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12312    VIRTUAL_DIR="$unix_path"
12313  fi
12314
12315
12316  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12317  BOOT_JDK_SUFFIX=""
12318  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12319  if test "x$ALL_JDKS_FOUND" != x; then
12320    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12321
12322  if test "x$BOOT_JDK_FOUND" = xno; then
12323    # Now execute the test
12324
12325        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12326        if test -d "$BOOT_JDK"; then
12327          BOOT_JDK_FOUND=maybe
12328          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12329$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12330        fi
12331
12332
12333    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12334    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12335      # Do we have a bin/java?
12336      if test ! -x "$BOOT_JDK/bin/java"; then
12337        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12339        BOOT_JDK_FOUND=no
12340      else
12341        # Do we have a bin/javac?
12342        if test ! -x "$BOOT_JDK/bin/javac"; then
12343          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12345          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12346$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12347          BOOT_JDK_FOUND=no
12348        else
12349          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12350          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12351            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12353            BOOT_JDK_FOUND=no
12354          else
12355            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12356            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12357
12358            # Extra M4 quote needed to protect [] in grep expression.
12359            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12360            if test "x$FOUND_VERSION_78" = x; then
12361              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12363              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12364$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12365              BOOT_JDK_FOUND=no
12366            else
12367              # We're done! :-)
12368              BOOT_JDK_FOUND=yes
12369
12370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12371
12372  # Input might be given as Windows format, start by converting to
12373  # unix format.
12374  path="$BOOT_JDK"
12375  new_path=`$CYGPATH -u "$path"`
12376
12377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12380  # "foo.exe" is OK but "foo" is an error.
12381  #
12382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12383  # It is also a way to make sure we got the proper file name for the real test later on.
12384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12385  if test "x$test_shortpath" = x; then
12386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12387$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12388    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12389  fi
12390
12391  # Call helper function which possibly converts this using DOS-style short mode.
12392  # If so, the updated path is stored in $new_path.
12393
12394  input_path="$new_path"
12395  # Check if we need to convert this using DOS-style short mode. If the path
12396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12397  # take no chances and rewrite it.
12398  # Note: m4 eats our [], so we need to use [ and ] instead.
12399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12400  if test "x$has_forbidden_chars" != x; then
12401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12405      # Going to short mode and back again did indeed matter. Since short mode is
12406      # case insensitive, let's make it lowercase to improve readability.
12407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12408      # Now convert it back to Unix-stile (cygpath)
12409      input_path=`$CYGPATH -u "$shortmode_path"`
12410      new_path="$input_path"
12411    fi
12412  fi
12413
12414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12415  if test "x$test_cygdrive_prefix" = x; then
12416    # As a simple fix, exclude /usr/bin since it's not a real path.
12417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12419      # a path prefixed by /cygdrive for fixpath to work.
12420      new_path="$CYGWIN_ROOT_PATH$input_path"
12421    fi
12422  fi
12423
12424
12425  if test "x$path" != "x$new_path"; then
12426    BOOT_JDK="$new_path"
12427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12429  fi
12430
12431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12432
12433  path="$BOOT_JDK"
12434  has_colon=`$ECHO $path | $GREP ^.:`
12435  new_path="$path"
12436  if test "x$has_colon" = x; then
12437    # Not in mixed or Windows style, start by that.
12438    new_path=`cmd //c echo $path`
12439  fi
12440
12441
12442  input_path="$new_path"
12443  # Check if we need to convert this using DOS-style short mode. If the path
12444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12445  # take no chances and rewrite it.
12446  # Note: m4 eats our [], so we need to use [ and ] instead.
12447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12448  if test "x$has_forbidden_chars" != x; then
12449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12451  fi
12452
12453
12454  windows_path="$new_path"
12455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12456    unix_path=`$CYGPATH -u "$windows_path"`
12457    new_path="$unix_path"
12458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12460    new_path="$unix_path"
12461  fi
12462
12463  if test "x$path" != "x$new_path"; then
12464    BOOT_JDK="$new_path"
12465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12466$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12467  fi
12468
12469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12471
12472  else
12473    # We're on a posix platform. Hooray! :)
12474    path="$BOOT_JDK"
12475    has_space=`$ECHO "$path" | $GREP " "`
12476    if test "x$has_space" != x; then
12477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12478$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12479      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12480    fi
12481
12482    # Use eval to expand a potential ~
12483    eval path="$path"
12484    if test ! -f "$path" && test ! -d "$path"; then
12485      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12486    fi
12487
12488    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12489  fi
12490
12491              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12492$as_echo_n "checking for Boot JDK... " >&6; }
12493              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12494$as_echo "$BOOT_JDK" >&6; }
12495              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12496$as_echo_n "checking Boot JDK version... " >&6; }
12497              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12498              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12499$as_echo "$BOOT_JDK_VERSION" >&6; }
12500            fi # end check jdk version
12501          fi # end check rt.jar
12502        fi # end check javac
12503      fi # end check java
12504    fi # end check boot jdk found
12505  fi
12506
12507    done
12508  fi
12509
12510  fi
12511
12512
12513    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12514    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12515      # Do we have a bin/java?
12516      if test ! -x "$BOOT_JDK/bin/java"; then
12517        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12519        BOOT_JDK_FOUND=no
12520      else
12521        # Do we have a bin/javac?
12522        if test ! -x "$BOOT_JDK/bin/javac"; then
12523          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12525          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12526$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12527          BOOT_JDK_FOUND=no
12528        else
12529          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12530          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12531            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12533            BOOT_JDK_FOUND=no
12534          else
12535            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12537
12538            # Extra M4 quote needed to protect [] in grep expression.
12539            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12540            if test "x$FOUND_VERSION_78" = x; then
12541              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12543              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12544$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12545              BOOT_JDK_FOUND=no
12546            else
12547              # We're done! :-)
12548              BOOT_JDK_FOUND=yes
12549
12550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12551
12552  # Input might be given as Windows format, start by converting to
12553  # unix format.
12554  path="$BOOT_JDK"
12555  new_path=`$CYGPATH -u "$path"`
12556
12557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12560  # "foo.exe" is OK but "foo" is an error.
12561  #
12562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12563  # It is also a way to make sure we got the proper file name for the real test later on.
12564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12565  if test "x$test_shortpath" = x; then
12566    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12567$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12568    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12569  fi
12570
12571  # Call helper function which possibly converts this using DOS-style short mode.
12572  # If so, the updated path is stored in $new_path.
12573
12574  input_path="$new_path"
12575  # Check if we need to convert this using DOS-style short mode. If the path
12576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12577  # take no chances and rewrite it.
12578  # Note: m4 eats our [], so we need to use [ and ] instead.
12579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12580  if test "x$has_forbidden_chars" != x; then
12581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12585      # Going to short mode and back again did indeed matter. Since short mode is
12586      # case insensitive, let's make it lowercase to improve readability.
12587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12588      # Now convert it back to Unix-stile (cygpath)
12589      input_path=`$CYGPATH -u "$shortmode_path"`
12590      new_path="$input_path"
12591    fi
12592  fi
12593
12594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12595  if test "x$test_cygdrive_prefix" = x; then
12596    # As a simple fix, exclude /usr/bin since it's not a real path.
12597    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12599      # a path prefixed by /cygdrive for fixpath to work.
12600      new_path="$CYGWIN_ROOT_PATH$input_path"
12601    fi
12602  fi
12603
12604
12605  if test "x$path" != "x$new_path"; then
12606    BOOT_JDK="$new_path"
12607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12608$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12609  fi
12610
12611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12612
12613  path="$BOOT_JDK"
12614  has_colon=`$ECHO $path | $GREP ^.:`
12615  new_path="$path"
12616  if test "x$has_colon" = x; then
12617    # Not in mixed or Windows style, start by that.
12618    new_path=`cmd //c echo $path`
12619  fi
12620
12621
12622  input_path="$new_path"
12623  # Check if we need to convert this using DOS-style short mode. If the path
12624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12625  # take no chances and rewrite it.
12626  # Note: m4 eats our [], so we need to use [ and ] instead.
12627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12628  if test "x$has_forbidden_chars" != x; then
12629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12631  fi
12632
12633
12634  windows_path="$new_path"
12635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12636    unix_path=`$CYGPATH -u "$windows_path"`
12637    new_path="$unix_path"
12638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12640    new_path="$unix_path"
12641  fi
12642
12643  if test "x$path" != "x$new_path"; then
12644    BOOT_JDK="$new_path"
12645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12646$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12647  fi
12648
12649  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12650  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12651
12652  else
12653    # We're on a posix platform. Hooray! :)
12654    path="$BOOT_JDK"
12655    has_space=`$ECHO "$path" | $GREP " "`
12656    if test "x$has_space" != x; then
12657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12658$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12659      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12660    fi
12661
12662    # Use eval to expand a potential ~
12663    eval path="$path"
12664    if test ! -f "$path" && test ! -d "$path"; then
12665      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12666    fi
12667
12668    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12669  fi
12670
12671              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12672$as_echo_n "checking for Boot JDK... " >&6; }
12673              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12674$as_echo "$BOOT_JDK" >&6; }
12675              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12676$as_echo_n "checking Boot JDK version... " >&6; }
12677              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12678              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12679$as_echo "$BOOT_JDK_VERSION" >&6; }
12680            fi # end check jdk version
12681          fi # end check rt.jar
12682        fi # end check javac
12683      fi # end check java
12684    fi # end check boot jdk found
12685  fi
12686
12687
12688  if test "x$BOOT_JDK_FOUND" = xno; then
12689    # Now execute the test
12690
12691  if test "x$PROGRAMW6432" != x; then
12692    VIRTUAL_DIR="$PROGRAMW6432/Java"
12693
12694  windows_path="$VIRTUAL_DIR"
12695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12696    unix_path=`$CYGPATH -u "$windows_path"`
12697    VIRTUAL_DIR="$unix_path"
12698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12700    VIRTUAL_DIR="$unix_path"
12701  fi
12702
12703
12704  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12705  BOOT_JDK_SUFFIX=""
12706  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12707  if test "x$ALL_JDKS_FOUND" != x; then
12708    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12709
12710  if test "x$BOOT_JDK_FOUND" = xno; then
12711    # Now execute the test
12712
12713        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12714        if test -d "$BOOT_JDK"; then
12715          BOOT_JDK_FOUND=maybe
12716          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12717$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12718        fi
12719
12720
12721    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12722    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12723      # Do we have a bin/java?
12724      if test ! -x "$BOOT_JDK/bin/java"; then
12725        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12727        BOOT_JDK_FOUND=no
12728      else
12729        # Do we have a bin/javac?
12730        if test ! -x "$BOOT_JDK/bin/javac"; then
12731          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12733          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12734$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12735          BOOT_JDK_FOUND=no
12736        else
12737          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12738          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12739            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12741            BOOT_JDK_FOUND=no
12742          else
12743            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12744            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12745
12746            # Extra M4 quote needed to protect [] in grep expression.
12747            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12748            if test "x$FOUND_VERSION_78" = x; then
12749              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12751              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12752$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12753              BOOT_JDK_FOUND=no
12754            else
12755              # We're done! :-)
12756              BOOT_JDK_FOUND=yes
12757
12758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12759
12760  # Input might be given as Windows format, start by converting to
12761  # unix format.
12762  path="$BOOT_JDK"
12763  new_path=`$CYGPATH -u "$path"`
12764
12765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12768  # "foo.exe" is OK but "foo" is an error.
12769  #
12770  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12771  # It is also a way to make sure we got the proper file name for the real test later on.
12772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12773  if test "x$test_shortpath" = x; then
12774    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12775$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12776    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12777  fi
12778
12779  # Call helper function which possibly converts this using DOS-style short mode.
12780  # If so, the updated path is stored in $new_path.
12781
12782  input_path="$new_path"
12783  # Check if we need to convert this using DOS-style short mode. If the path
12784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12785  # take no chances and rewrite it.
12786  # Note: m4 eats our [], so we need to use [ and ] instead.
12787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12788  if test "x$has_forbidden_chars" != x; then
12789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12793      # Going to short mode and back again did indeed matter. Since short mode is
12794      # case insensitive, let's make it lowercase to improve readability.
12795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12796      # Now convert it back to Unix-stile (cygpath)
12797      input_path=`$CYGPATH -u "$shortmode_path"`
12798      new_path="$input_path"
12799    fi
12800  fi
12801
12802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12803  if test "x$test_cygdrive_prefix" = x; then
12804    # As a simple fix, exclude /usr/bin since it's not a real path.
12805    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12807      # a path prefixed by /cygdrive for fixpath to work.
12808      new_path="$CYGWIN_ROOT_PATH$input_path"
12809    fi
12810  fi
12811
12812
12813  if test "x$path" != "x$new_path"; then
12814    BOOT_JDK="$new_path"
12815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12817  fi
12818
12819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12820
12821  path="$BOOT_JDK"
12822  has_colon=`$ECHO $path | $GREP ^.:`
12823  new_path="$path"
12824  if test "x$has_colon" = x; then
12825    # Not in mixed or Windows style, start by that.
12826    new_path=`cmd //c echo $path`
12827  fi
12828
12829
12830  input_path="$new_path"
12831  # Check if we need to convert this using DOS-style short mode. If the path
12832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12833  # take no chances and rewrite it.
12834  # Note: m4 eats our [], so we need to use [ and ] instead.
12835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12836  if test "x$has_forbidden_chars" != x; then
12837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12839  fi
12840
12841
12842  windows_path="$new_path"
12843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12844    unix_path=`$CYGPATH -u "$windows_path"`
12845    new_path="$unix_path"
12846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12848    new_path="$unix_path"
12849  fi
12850
12851  if test "x$path" != "x$new_path"; then
12852    BOOT_JDK="$new_path"
12853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12854$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12855  fi
12856
12857  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12858  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12859
12860  else
12861    # We're on a posix platform. Hooray! :)
12862    path="$BOOT_JDK"
12863    has_space=`$ECHO "$path" | $GREP " "`
12864    if test "x$has_space" != x; then
12865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12866$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12867      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12868    fi
12869
12870    # Use eval to expand a potential ~
12871    eval path="$path"
12872    if test ! -f "$path" && test ! -d "$path"; then
12873      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12874    fi
12875
12876    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12877  fi
12878
12879              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12880$as_echo_n "checking for Boot JDK... " >&6; }
12881              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12882$as_echo "$BOOT_JDK" >&6; }
12883              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12884$as_echo_n "checking Boot JDK version... " >&6; }
12885              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12886              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12887$as_echo "$BOOT_JDK_VERSION" >&6; }
12888            fi # end check jdk version
12889          fi # end check rt.jar
12890        fi # end check javac
12891      fi # end check java
12892    fi # end check boot jdk found
12893  fi
12894
12895    done
12896  fi
12897
12898  fi
12899
12900
12901    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12902    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12903      # Do we have a bin/java?
12904      if test ! -x "$BOOT_JDK/bin/java"; then
12905        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12907        BOOT_JDK_FOUND=no
12908      else
12909        # Do we have a bin/javac?
12910        if test ! -x "$BOOT_JDK/bin/javac"; then
12911          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12913          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12914$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12915          BOOT_JDK_FOUND=no
12916        else
12917          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12918          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12919            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12921            BOOT_JDK_FOUND=no
12922          else
12923            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12924            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12925
12926            # Extra M4 quote needed to protect [] in grep expression.
12927            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12928            if test "x$FOUND_VERSION_78" = x; then
12929              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12931              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12932$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12933              BOOT_JDK_FOUND=no
12934            else
12935              # We're done! :-)
12936              BOOT_JDK_FOUND=yes
12937
12938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12939
12940  # Input might be given as Windows format, start by converting to
12941  # unix format.
12942  path="$BOOT_JDK"
12943  new_path=`$CYGPATH -u "$path"`
12944
12945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12948  # "foo.exe" is OK but "foo" is an error.
12949  #
12950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12951  # It is also a way to make sure we got the proper file name for the real test later on.
12952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12953  if test "x$test_shortpath" = x; then
12954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12955$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12956    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12957  fi
12958
12959  # Call helper function which possibly converts this using DOS-style short mode.
12960  # If so, the updated path is stored in $new_path.
12961
12962  input_path="$new_path"
12963  # Check if we need to convert this using DOS-style short mode. If the path
12964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12965  # take no chances and rewrite it.
12966  # Note: m4 eats our [], so we need to use [ and ] instead.
12967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12968  if test "x$has_forbidden_chars" != x; then
12969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12973      # Going to short mode and back again did indeed matter. Since short mode is
12974      # case insensitive, let's make it lowercase to improve readability.
12975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12976      # Now convert it back to Unix-stile (cygpath)
12977      input_path=`$CYGPATH -u "$shortmode_path"`
12978      new_path="$input_path"
12979    fi
12980  fi
12981
12982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12983  if test "x$test_cygdrive_prefix" = x; then
12984    # As a simple fix, exclude /usr/bin since it's not a real path.
12985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12987      # a path prefixed by /cygdrive for fixpath to work.
12988      new_path="$CYGWIN_ROOT_PATH$input_path"
12989    fi
12990  fi
12991
12992
12993  if test "x$path" != "x$new_path"; then
12994    BOOT_JDK="$new_path"
12995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12997  fi
12998
12999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13000
13001  path="$BOOT_JDK"
13002  has_colon=`$ECHO $path | $GREP ^.:`
13003  new_path="$path"
13004  if test "x$has_colon" = x; then
13005    # Not in mixed or Windows style, start by that.
13006    new_path=`cmd //c echo $path`
13007  fi
13008
13009
13010  input_path="$new_path"
13011  # Check if we need to convert this using DOS-style short mode. If the path
13012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13013  # take no chances and rewrite it.
13014  # Note: m4 eats our [], so we need to use [ and ] instead.
13015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13016  if test "x$has_forbidden_chars" != x; then
13017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13019  fi
13020
13021
13022  windows_path="$new_path"
13023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13024    unix_path=`$CYGPATH -u "$windows_path"`
13025    new_path="$unix_path"
13026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13028    new_path="$unix_path"
13029  fi
13030
13031  if test "x$path" != "x$new_path"; then
13032    BOOT_JDK="$new_path"
13033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13035  fi
13036
13037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13039
13040  else
13041    # We're on a posix platform. Hooray! :)
13042    path="$BOOT_JDK"
13043    has_space=`$ECHO "$path" | $GREP " "`
13044    if test "x$has_space" != x; then
13045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13046$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13047      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13048    fi
13049
13050    # Use eval to expand a potential ~
13051    eval path="$path"
13052    if test ! -f "$path" && test ! -d "$path"; then
13053      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13054    fi
13055
13056    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13057  fi
13058
13059              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13060$as_echo_n "checking for Boot JDK... " >&6; }
13061              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13062$as_echo "$BOOT_JDK" >&6; }
13063              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13064$as_echo_n "checking Boot JDK version... " >&6; }
13065              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13066              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13067$as_echo "$BOOT_JDK_VERSION" >&6; }
13068            fi # end check jdk version
13069          fi # end check rt.jar
13070        fi # end check javac
13071      fi # end check java
13072    fi # end check boot jdk found
13073  fi
13074
13075
13076  if test "x$BOOT_JDK_FOUND" = xno; then
13077    # Now execute the test
13078
13079  if test "x$PROGRAMFILES" != x; then
13080    VIRTUAL_DIR="$PROGRAMFILES/Java"
13081
13082  windows_path="$VIRTUAL_DIR"
13083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13084    unix_path=`$CYGPATH -u "$windows_path"`
13085    VIRTUAL_DIR="$unix_path"
13086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13088    VIRTUAL_DIR="$unix_path"
13089  fi
13090
13091
13092  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13093  BOOT_JDK_SUFFIX=""
13094  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13095  if test "x$ALL_JDKS_FOUND" != x; then
13096    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13097
13098  if test "x$BOOT_JDK_FOUND" = xno; then
13099    # Now execute the test
13100
13101        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13102        if test -d "$BOOT_JDK"; then
13103          BOOT_JDK_FOUND=maybe
13104          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13105$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13106        fi
13107
13108
13109    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13110    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13111      # Do we have a bin/java?
13112      if test ! -x "$BOOT_JDK/bin/java"; then
13113        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13115        BOOT_JDK_FOUND=no
13116      else
13117        # Do we have a bin/javac?
13118        if test ! -x "$BOOT_JDK/bin/javac"; then
13119          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13121          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13122$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13123          BOOT_JDK_FOUND=no
13124        else
13125          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13126          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13127            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13129            BOOT_JDK_FOUND=no
13130          else
13131            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13132            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13133
13134            # Extra M4 quote needed to protect [] in grep expression.
13135            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13136            if test "x$FOUND_VERSION_78" = x; then
13137              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13139              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13140$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13141              BOOT_JDK_FOUND=no
13142            else
13143              # We're done! :-)
13144              BOOT_JDK_FOUND=yes
13145
13146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13147
13148  # Input might be given as Windows format, start by converting to
13149  # unix format.
13150  path="$BOOT_JDK"
13151  new_path=`$CYGPATH -u "$path"`
13152
13153  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13154  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13155  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13156  # "foo.exe" is OK but "foo" is an error.
13157  #
13158  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13159  # It is also a way to make sure we got the proper file name for the real test later on.
13160  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13161  if test "x$test_shortpath" = x; then
13162    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13163$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13164    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13165  fi
13166
13167  # Call helper function which possibly converts this using DOS-style short mode.
13168  # If so, the updated path is stored in $new_path.
13169
13170  input_path="$new_path"
13171  # Check if we need to convert this using DOS-style short mode. If the path
13172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13173  # take no chances and rewrite it.
13174  # Note: m4 eats our [], so we need to use [ and ] instead.
13175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13176  if test "x$has_forbidden_chars" != x; then
13177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13178    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13179    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13180    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13181      # Going to short mode and back again did indeed matter. Since short mode is
13182      # case insensitive, let's make it lowercase to improve readability.
13183      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13184      # Now convert it back to Unix-stile (cygpath)
13185      input_path=`$CYGPATH -u "$shortmode_path"`
13186      new_path="$input_path"
13187    fi
13188  fi
13189
13190  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13191  if test "x$test_cygdrive_prefix" = x; then
13192    # As a simple fix, exclude /usr/bin since it's not a real path.
13193    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13194      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13195      # a path prefixed by /cygdrive for fixpath to work.
13196      new_path="$CYGWIN_ROOT_PATH$input_path"
13197    fi
13198  fi
13199
13200
13201  if test "x$path" != "x$new_path"; then
13202    BOOT_JDK="$new_path"
13203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13204$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13205  fi
13206
13207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13208
13209  path="$BOOT_JDK"
13210  has_colon=`$ECHO $path | $GREP ^.:`
13211  new_path="$path"
13212  if test "x$has_colon" = x; then
13213    # Not in mixed or Windows style, start by that.
13214    new_path=`cmd //c echo $path`
13215  fi
13216
13217
13218  input_path="$new_path"
13219  # Check if we need to convert this using DOS-style short mode. If the path
13220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13221  # take no chances and rewrite it.
13222  # Note: m4 eats our [], so we need to use [ and ] instead.
13223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13224  if test "x$has_forbidden_chars" != x; then
13225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13227  fi
13228
13229
13230  windows_path="$new_path"
13231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13232    unix_path=`$CYGPATH -u "$windows_path"`
13233    new_path="$unix_path"
13234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13236    new_path="$unix_path"
13237  fi
13238
13239  if test "x$path" != "x$new_path"; then
13240    BOOT_JDK="$new_path"
13241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13242$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13243  fi
13244
13245  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13246  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13247
13248  else
13249    # We're on a posix platform. Hooray! :)
13250    path="$BOOT_JDK"
13251    has_space=`$ECHO "$path" | $GREP " "`
13252    if test "x$has_space" != x; then
13253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13254$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13255      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13256    fi
13257
13258    # Use eval to expand a potential ~
13259    eval path="$path"
13260    if test ! -f "$path" && test ! -d "$path"; then
13261      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13262    fi
13263
13264    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13265  fi
13266
13267              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13268$as_echo_n "checking for Boot JDK... " >&6; }
13269              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13270$as_echo "$BOOT_JDK" >&6; }
13271              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13272$as_echo_n "checking Boot JDK version... " >&6; }
13273              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13274              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13275$as_echo "$BOOT_JDK_VERSION" >&6; }
13276            fi # end check jdk version
13277          fi # end check rt.jar
13278        fi # end check javac
13279      fi # end check java
13280    fi # end check boot jdk found
13281  fi
13282
13283    done
13284  fi
13285
13286  fi
13287
13288
13289    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13290    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13291      # Do we have a bin/java?
13292      if test ! -x "$BOOT_JDK/bin/java"; then
13293        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13294$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13295        BOOT_JDK_FOUND=no
13296      else
13297        # Do we have a bin/javac?
13298        if test ! -x "$BOOT_JDK/bin/javac"; then
13299          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13301          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13302$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13303          BOOT_JDK_FOUND=no
13304        else
13305          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13306          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13307            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13309            BOOT_JDK_FOUND=no
13310          else
13311            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13312            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13313
13314            # Extra M4 quote needed to protect [] in grep expression.
13315            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13316            if test "x$FOUND_VERSION_78" = x; then
13317              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13319              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13320$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13321              BOOT_JDK_FOUND=no
13322            else
13323              # We're done! :-)
13324              BOOT_JDK_FOUND=yes
13325
13326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13327
13328  # Input might be given as Windows format, start by converting to
13329  # unix format.
13330  path="$BOOT_JDK"
13331  new_path=`$CYGPATH -u "$path"`
13332
13333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13336  # "foo.exe" is OK but "foo" is an error.
13337  #
13338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13339  # It is also a way to make sure we got the proper file name for the real test later on.
13340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13341  if test "x$test_shortpath" = x; then
13342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13343$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13344    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13345  fi
13346
13347  # Call helper function which possibly converts this using DOS-style short mode.
13348  # If so, the updated path is stored in $new_path.
13349
13350  input_path="$new_path"
13351  # Check if we need to convert this using DOS-style short mode. If the path
13352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13353  # take no chances and rewrite it.
13354  # Note: m4 eats our [], so we need to use [ and ] instead.
13355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13356  if test "x$has_forbidden_chars" != x; then
13357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13361      # Going to short mode and back again did indeed matter. Since short mode is
13362      # case insensitive, let's make it lowercase to improve readability.
13363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13364      # Now convert it back to Unix-stile (cygpath)
13365      input_path=`$CYGPATH -u "$shortmode_path"`
13366      new_path="$input_path"
13367    fi
13368  fi
13369
13370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13371  if test "x$test_cygdrive_prefix" = x; then
13372    # As a simple fix, exclude /usr/bin since it's not a real path.
13373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13375      # a path prefixed by /cygdrive for fixpath to work.
13376      new_path="$CYGWIN_ROOT_PATH$input_path"
13377    fi
13378  fi
13379
13380
13381  if test "x$path" != "x$new_path"; then
13382    BOOT_JDK="$new_path"
13383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13385  fi
13386
13387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13388
13389  path="$BOOT_JDK"
13390  has_colon=`$ECHO $path | $GREP ^.:`
13391  new_path="$path"
13392  if test "x$has_colon" = x; then
13393    # Not in mixed or Windows style, start by that.
13394    new_path=`cmd //c echo $path`
13395  fi
13396
13397
13398  input_path="$new_path"
13399  # Check if we need to convert this using DOS-style short mode. If the path
13400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13401  # take no chances and rewrite it.
13402  # Note: m4 eats our [], so we need to use [ and ] instead.
13403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13404  if test "x$has_forbidden_chars" != x; then
13405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13407  fi
13408
13409
13410  windows_path="$new_path"
13411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13412    unix_path=`$CYGPATH -u "$windows_path"`
13413    new_path="$unix_path"
13414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13416    new_path="$unix_path"
13417  fi
13418
13419  if test "x$path" != "x$new_path"; then
13420    BOOT_JDK="$new_path"
13421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13423  fi
13424
13425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13427
13428  else
13429    # We're on a posix platform. Hooray! :)
13430    path="$BOOT_JDK"
13431    has_space=`$ECHO "$path" | $GREP " "`
13432    if test "x$has_space" != x; then
13433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13435      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13436    fi
13437
13438    # Use eval to expand a potential ~
13439    eval path="$path"
13440    if test ! -f "$path" && test ! -d "$path"; then
13441      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13442    fi
13443
13444    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13445  fi
13446
13447              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13448$as_echo_n "checking for Boot JDK... " >&6; }
13449              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13450$as_echo "$BOOT_JDK" >&6; }
13451              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13452$as_echo_n "checking Boot JDK version... " >&6; }
13453              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13454              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13455$as_echo "$BOOT_JDK_VERSION" >&6; }
13456            fi # end check jdk version
13457          fi # end check rt.jar
13458        fi # end check javac
13459      fi # end check java
13460    fi # end check boot jdk found
13461  fi
13462
13463
13464  if test "x$BOOT_JDK_FOUND" = xno; then
13465    # Now execute the test
13466
13467  if test "x$ProgramFiles" != x; then
13468    VIRTUAL_DIR="$ProgramFiles/Java"
13469
13470  windows_path="$VIRTUAL_DIR"
13471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13472    unix_path=`$CYGPATH -u "$windows_path"`
13473    VIRTUAL_DIR="$unix_path"
13474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13476    VIRTUAL_DIR="$unix_path"
13477  fi
13478
13479
13480  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13481  BOOT_JDK_SUFFIX=""
13482  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13483  if test "x$ALL_JDKS_FOUND" != x; then
13484    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13485
13486  if test "x$BOOT_JDK_FOUND" = xno; then
13487    # Now execute the test
13488
13489        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13490        if test -d "$BOOT_JDK"; then
13491          BOOT_JDK_FOUND=maybe
13492          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13493$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13494        fi
13495
13496
13497    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13498    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13499      # Do we have a bin/java?
13500      if test ! -x "$BOOT_JDK/bin/java"; then
13501        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13503        BOOT_JDK_FOUND=no
13504      else
13505        # Do we have a bin/javac?
13506        if test ! -x "$BOOT_JDK/bin/javac"; then
13507          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13509          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13510$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13511          BOOT_JDK_FOUND=no
13512        else
13513          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13514          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13515            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13517            BOOT_JDK_FOUND=no
13518          else
13519            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13520            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13521
13522            # Extra M4 quote needed to protect [] in grep expression.
13523            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13524            if test "x$FOUND_VERSION_78" = x; then
13525              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13527              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13528$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13529              BOOT_JDK_FOUND=no
13530            else
13531              # We're done! :-)
13532              BOOT_JDK_FOUND=yes
13533
13534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13535
13536  # Input might be given as Windows format, start by converting to
13537  # unix format.
13538  path="$BOOT_JDK"
13539  new_path=`$CYGPATH -u "$path"`
13540
13541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13544  # "foo.exe" is OK but "foo" is an error.
13545  #
13546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13547  # It is also a way to make sure we got the proper file name for the real test later on.
13548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13549  if test "x$test_shortpath" = x; then
13550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13551$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13552    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13553  fi
13554
13555  # Call helper function which possibly converts this using DOS-style short mode.
13556  # If so, the updated path is stored in $new_path.
13557
13558  input_path="$new_path"
13559  # Check if we need to convert this using DOS-style short mode. If the path
13560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13561  # take no chances and rewrite it.
13562  # Note: m4 eats our [], so we need to use [ and ] instead.
13563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13564  if test "x$has_forbidden_chars" != x; then
13565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13569      # Going to short mode and back again did indeed matter. Since short mode is
13570      # case insensitive, let's make it lowercase to improve readability.
13571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13572      # Now convert it back to Unix-stile (cygpath)
13573      input_path=`$CYGPATH -u "$shortmode_path"`
13574      new_path="$input_path"
13575    fi
13576  fi
13577
13578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13579  if test "x$test_cygdrive_prefix" = x; then
13580    # As a simple fix, exclude /usr/bin since it's not a real path.
13581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13583      # a path prefixed by /cygdrive for fixpath to work.
13584      new_path="$CYGWIN_ROOT_PATH$input_path"
13585    fi
13586  fi
13587
13588
13589  if test "x$path" != "x$new_path"; then
13590    BOOT_JDK="$new_path"
13591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13592$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13593  fi
13594
13595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13596
13597  path="$BOOT_JDK"
13598  has_colon=`$ECHO $path | $GREP ^.:`
13599  new_path="$path"
13600  if test "x$has_colon" = x; then
13601    # Not in mixed or Windows style, start by that.
13602    new_path=`cmd //c echo $path`
13603  fi
13604
13605
13606  input_path="$new_path"
13607  # Check if we need to convert this using DOS-style short mode. If the path
13608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13609  # take no chances and rewrite it.
13610  # Note: m4 eats our [], so we need to use [ and ] instead.
13611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13612  if test "x$has_forbidden_chars" != x; then
13613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13615  fi
13616
13617
13618  windows_path="$new_path"
13619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13620    unix_path=`$CYGPATH -u "$windows_path"`
13621    new_path="$unix_path"
13622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13624    new_path="$unix_path"
13625  fi
13626
13627  if test "x$path" != "x$new_path"; then
13628    BOOT_JDK="$new_path"
13629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13631  fi
13632
13633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13635
13636  else
13637    # We're on a posix platform. Hooray! :)
13638    path="$BOOT_JDK"
13639    has_space=`$ECHO "$path" | $GREP " "`
13640    if test "x$has_space" != x; then
13641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13643      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13644    fi
13645
13646    # Use eval to expand a potential ~
13647    eval path="$path"
13648    if test ! -f "$path" && test ! -d "$path"; then
13649      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13650    fi
13651
13652    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13653  fi
13654
13655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13656$as_echo_n "checking for Boot JDK... " >&6; }
13657              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13658$as_echo "$BOOT_JDK" >&6; }
13659              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13660$as_echo_n "checking Boot JDK version... " >&6; }
13661              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13662              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13663$as_echo "$BOOT_JDK_VERSION" >&6; }
13664            fi # end check jdk version
13665          fi # end check rt.jar
13666        fi # end check javac
13667      fi # end check java
13668    fi # end check boot jdk found
13669  fi
13670
13671    done
13672  fi
13673
13674  fi
13675
13676
13677    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13678    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13679      # Do we have a bin/java?
13680      if test ! -x "$BOOT_JDK/bin/java"; then
13681        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13683        BOOT_JDK_FOUND=no
13684      else
13685        # Do we have a bin/javac?
13686        if test ! -x "$BOOT_JDK/bin/javac"; then
13687          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13689          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13690$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13691          BOOT_JDK_FOUND=no
13692        else
13693          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13694          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13695            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13697            BOOT_JDK_FOUND=no
13698          else
13699            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13700            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13701
13702            # Extra M4 quote needed to protect [] in grep expression.
13703            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13704            if test "x$FOUND_VERSION_78" = x; then
13705              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13707              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13708$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13709              BOOT_JDK_FOUND=no
13710            else
13711              # We're done! :-)
13712              BOOT_JDK_FOUND=yes
13713
13714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13715
13716  # Input might be given as Windows format, start by converting to
13717  # unix format.
13718  path="$BOOT_JDK"
13719  new_path=`$CYGPATH -u "$path"`
13720
13721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13724  # "foo.exe" is OK but "foo" is an error.
13725  #
13726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13727  # It is also a way to make sure we got the proper file name for the real test later on.
13728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13729  if test "x$test_shortpath" = x; then
13730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13732    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13733  fi
13734
13735  # Call helper function which possibly converts this using DOS-style short mode.
13736  # If so, the updated path is stored in $new_path.
13737
13738  input_path="$new_path"
13739  # Check if we need to convert this using DOS-style short mode. If the path
13740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13741  # take no chances and rewrite it.
13742  # Note: m4 eats our [], so we need to use [ and ] instead.
13743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13744  if test "x$has_forbidden_chars" != x; then
13745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13749      # Going to short mode and back again did indeed matter. Since short mode is
13750      # case insensitive, let's make it lowercase to improve readability.
13751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13752      # Now convert it back to Unix-stile (cygpath)
13753      input_path=`$CYGPATH -u "$shortmode_path"`
13754      new_path="$input_path"
13755    fi
13756  fi
13757
13758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13759  if test "x$test_cygdrive_prefix" = x; then
13760    # As a simple fix, exclude /usr/bin since it's not a real path.
13761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13763      # a path prefixed by /cygdrive for fixpath to work.
13764      new_path="$CYGWIN_ROOT_PATH$input_path"
13765    fi
13766  fi
13767
13768
13769  if test "x$path" != "x$new_path"; then
13770    BOOT_JDK="$new_path"
13771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13772$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13773  fi
13774
13775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13776
13777  path="$BOOT_JDK"
13778  has_colon=`$ECHO $path | $GREP ^.:`
13779  new_path="$path"
13780  if test "x$has_colon" = x; then
13781    # Not in mixed or Windows style, start by that.
13782    new_path=`cmd //c echo $path`
13783  fi
13784
13785
13786  input_path="$new_path"
13787  # Check if we need to convert this using DOS-style short mode. If the path
13788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13789  # take no chances and rewrite it.
13790  # Note: m4 eats our [], so we need to use [ and ] instead.
13791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13792  if test "x$has_forbidden_chars" != x; then
13793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13795  fi
13796
13797
13798  windows_path="$new_path"
13799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13800    unix_path=`$CYGPATH -u "$windows_path"`
13801    new_path="$unix_path"
13802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13804    new_path="$unix_path"
13805  fi
13806
13807  if test "x$path" != "x$new_path"; then
13808    BOOT_JDK="$new_path"
13809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13811  fi
13812
13813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13815
13816  else
13817    # We're on a posix platform. Hooray! :)
13818    path="$BOOT_JDK"
13819    has_space=`$ECHO "$path" | $GREP " "`
13820    if test "x$has_space" != x; then
13821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13823      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13824    fi
13825
13826    # Use eval to expand a potential ~
13827    eval path="$path"
13828    if test ! -f "$path" && test ! -d "$path"; then
13829      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13830    fi
13831
13832    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13833  fi
13834
13835              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13836$as_echo_n "checking for Boot JDK... " >&6; }
13837              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13838$as_echo "$BOOT_JDK" >&6; }
13839              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13840$as_echo_n "checking Boot JDK version... " >&6; }
13841              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13842              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13843$as_echo "$BOOT_JDK_VERSION" >&6; }
13844            fi # end check jdk version
13845          fi # end check rt.jar
13846        fi # end check javac
13847      fi # end check java
13848    fi # end check boot jdk found
13849  fi
13850
13851
13852  if test "x$BOOT_JDK_FOUND" = xno; then
13853    # Now execute the test
13854
13855  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13856  BOOT_JDK_SUFFIX=""
13857  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13858  if test "x$ALL_JDKS_FOUND" != x; then
13859    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13860
13861  if test "x$BOOT_JDK_FOUND" = xno; then
13862    # Now execute the test
13863
13864        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13865        if test -d "$BOOT_JDK"; then
13866          BOOT_JDK_FOUND=maybe
13867          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13868$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13869        fi
13870
13871
13872    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13873    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13874      # Do we have a bin/java?
13875      if test ! -x "$BOOT_JDK/bin/java"; then
13876        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13878        BOOT_JDK_FOUND=no
13879      else
13880        # Do we have a bin/javac?
13881        if test ! -x "$BOOT_JDK/bin/javac"; then
13882          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13884          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13885$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13886          BOOT_JDK_FOUND=no
13887        else
13888          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13889          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13890            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13892            BOOT_JDK_FOUND=no
13893          else
13894            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13895            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13896
13897            # Extra M4 quote needed to protect [] in grep expression.
13898            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13899            if test "x$FOUND_VERSION_78" = x; then
13900              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13902              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13903$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13904              BOOT_JDK_FOUND=no
13905            else
13906              # We're done! :-)
13907              BOOT_JDK_FOUND=yes
13908
13909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13910
13911  # Input might be given as Windows format, start by converting to
13912  # unix format.
13913  path="$BOOT_JDK"
13914  new_path=`$CYGPATH -u "$path"`
13915
13916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13919  # "foo.exe" is OK but "foo" is an error.
13920  #
13921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13922  # It is also a way to make sure we got the proper file name for the real test later on.
13923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13924  if test "x$test_shortpath" = x; then
13925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13927    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13928  fi
13929
13930  # Call helper function which possibly converts this using DOS-style short mode.
13931  # If so, the updated path is stored in $new_path.
13932
13933  input_path="$new_path"
13934  # Check if we need to convert this using DOS-style short mode. If the path
13935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13936  # take no chances and rewrite it.
13937  # Note: m4 eats our [], so we need to use [ and ] instead.
13938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13939  if test "x$has_forbidden_chars" != x; then
13940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13944      # Going to short mode and back again did indeed matter. Since short mode is
13945      # case insensitive, let's make it lowercase to improve readability.
13946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13947      # Now convert it back to Unix-stile (cygpath)
13948      input_path=`$CYGPATH -u "$shortmode_path"`
13949      new_path="$input_path"
13950    fi
13951  fi
13952
13953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13954  if test "x$test_cygdrive_prefix" = x; then
13955    # As a simple fix, exclude /usr/bin since it's not a real path.
13956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13958      # a path prefixed by /cygdrive for fixpath to work.
13959      new_path="$CYGWIN_ROOT_PATH$input_path"
13960    fi
13961  fi
13962
13963
13964  if test "x$path" != "x$new_path"; then
13965    BOOT_JDK="$new_path"
13966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13968  fi
13969
13970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13971
13972  path="$BOOT_JDK"
13973  has_colon=`$ECHO $path | $GREP ^.:`
13974  new_path="$path"
13975  if test "x$has_colon" = x; then
13976    # Not in mixed or Windows style, start by that.
13977    new_path=`cmd //c echo $path`
13978  fi
13979
13980
13981  input_path="$new_path"
13982  # Check if we need to convert this using DOS-style short mode. If the path
13983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13984  # take no chances and rewrite it.
13985  # Note: m4 eats our [], so we need to use [ and ] instead.
13986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13987  if test "x$has_forbidden_chars" != x; then
13988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13990  fi
13991
13992
13993  windows_path="$new_path"
13994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13995    unix_path=`$CYGPATH -u "$windows_path"`
13996    new_path="$unix_path"
13997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13999    new_path="$unix_path"
14000  fi
14001
14002  if test "x$path" != "x$new_path"; then
14003    BOOT_JDK="$new_path"
14004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14005$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14006  fi
14007
14008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14010
14011  else
14012    # We're on a posix platform. Hooray! :)
14013    path="$BOOT_JDK"
14014    has_space=`$ECHO "$path" | $GREP " "`
14015    if test "x$has_space" != x; then
14016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14017$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14018      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14019    fi
14020
14021    # Use eval to expand a potential ~
14022    eval path="$path"
14023    if test ! -f "$path" && test ! -d "$path"; then
14024      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14025    fi
14026
14027    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14028  fi
14029
14030              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14031$as_echo_n "checking for Boot JDK... " >&6; }
14032              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14033$as_echo "$BOOT_JDK" >&6; }
14034              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14035$as_echo_n "checking Boot JDK version... " >&6; }
14036              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14037              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14038$as_echo "$BOOT_JDK_VERSION" >&6; }
14039            fi # end check jdk version
14040          fi # end check rt.jar
14041        fi # end check javac
14042      fi # end check java
14043    fi # end check boot jdk found
14044  fi
14045
14046    done
14047  fi
14048
14049
14050    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14051    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14052      # Do we have a bin/java?
14053      if test ! -x "$BOOT_JDK/bin/java"; then
14054        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14056        BOOT_JDK_FOUND=no
14057      else
14058        # Do we have a bin/javac?
14059        if test ! -x "$BOOT_JDK/bin/javac"; then
14060          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14062          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14063$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14064          BOOT_JDK_FOUND=no
14065        else
14066          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14067          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14068            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14070            BOOT_JDK_FOUND=no
14071          else
14072            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14073            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14074
14075            # Extra M4 quote needed to protect [] in grep expression.
14076            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14077            if test "x$FOUND_VERSION_78" = x; then
14078              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14080              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14081$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14082              BOOT_JDK_FOUND=no
14083            else
14084              # We're done! :-)
14085              BOOT_JDK_FOUND=yes
14086
14087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14088
14089  # Input might be given as Windows format, start by converting to
14090  # unix format.
14091  path="$BOOT_JDK"
14092  new_path=`$CYGPATH -u "$path"`
14093
14094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14097  # "foo.exe" is OK but "foo" is an error.
14098  #
14099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14100  # It is also a way to make sure we got the proper file name for the real test later on.
14101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14102  if test "x$test_shortpath" = x; then
14103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14104$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14105    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14106  fi
14107
14108  # Call helper function which possibly converts this using DOS-style short mode.
14109  # If so, the updated path is stored in $new_path.
14110
14111  input_path="$new_path"
14112  # Check if we need to convert this using DOS-style short mode. If the path
14113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14114  # take no chances and rewrite it.
14115  # Note: m4 eats our [], so we need to use [ and ] instead.
14116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14117  if test "x$has_forbidden_chars" != x; then
14118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14122      # Going to short mode and back again did indeed matter. Since short mode is
14123      # case insensitive, let's make it lowercase to improve readability.
14124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14125      # Now convert it back to Unix-stile (cygpath)
14126      input_path=`$CYGPATH -u "$shortmode_path"`
14127      new_path="$input_path"
14128    fi
14129  fi
14130
14131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14132  if test "x$test_cygdrive_prefix" = x; then
14133    # As a simple fix, exclude /usr/bin since it's not a real path.
14134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14136      # a path prefixed by /cygdrive for fixpath to work.
14137      new_path="$CYGWIN_ROOT_PATH$input_path"
14138    fi
14139  fi
14140
14141
14142  if test "x$path" != "x$new_path"; then
14143    BOOT_JDK="$new_path"
14144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14145$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14146  fi
14147
14148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14149
14150  path="$BOOT_JDK"
14151  has_colon=`$ECHO $path | $GREP ^.:`
14152  new_path="$path"
14153  if test "x$has_colon" = x; then
14154    # Not in mixed or Windows style, start by that.
14155    new_path=`cmd //c echo $path`
14156  fi
14157
14158
14159  input_path="$new_path"
14160  # Check if we need to convert this using DOS-style short mode. If the path
14161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14162  # take no chances and rewrite it.
14163  # Note: m4 eats our [], so we need to use [ and ] instead.
14164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14165  if test "x$has_forbidden_chars" != x; then
14166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14168  fi
14169
14170
14171  windows_path="$new_path"
14172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14173    unix_path=`$CYGPATH -u "$windows_path"`
14174    new_path="$unix_path"
14175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14177    new_path="$unix_path"
14178  fi
14179
14180  if test "x$path" != "x$new_path"; then
14181    BOOT_JDK="$new_path"
14182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14183$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14184  fi
14185
14186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14188
14189  else
14190    # We're on a posix platform. Hooray! :)
14191    path="$BOOT_JDK"
14192    has_space=`$ECHO "$path" | $GREP " "`
14193    if test "x$has_space" != x; then
14194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14196      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14197    fi
14198
14199    # Use eval to expand a potential ~
14200    eval path="$path"
14201    if test ! -f "$path" && test ! -d "$path"; then
14202      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14203    fi
14204
14205    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14206  fi
14207
14208              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14209$as_echo_n "checking for Boot JDK... " >&6; }
14210              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14211$as_echo "$BOOT_JDK" >&6; }
14212              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14213$as_echo_n "checking Boot JDK version... " >&6; }
14214              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14215              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14216$as_echo "$BOOT_JDK_VERSION" >&6; }
14217            fi # end check jdk version
14218          fi # end check rt.jar
14219        fi # end check javac
14220      fi # end check java
14221    fi # end check boot jdk found
14222  fi
14223
14224  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14225
14226  if test "x$BOOT_JDK_FOUND" = xno; then
14227    # Now execute the test
14228
14229  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14230  BOOT_JDK_SUFFIX="/Contents/Home"
14231  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14232  if test "x$ALL_JDKS_FOUND" != x; then
14233    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14234
14235  if test "x$BOOT_JDK_FOUND" = xno; then
14236    # Now execute the test
14237
14238        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14239        if test -d "$BOOT_JDK"; then
14240          BOOT_JDK_FOUND=maybe
14241          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14242$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14243        fi
14244
14245
14246    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14247    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14248      # Do we have a bin/java?
14249      if test ! -x "$BOOT_JDK/bin/java"; then
14250        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14252        BOOT_JDK_FOUND=no
14253      else
14254        # Do we have a bin/javac?
14255        if test ! -x "$BOOT_JDK/bin/javac"; then
14256          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14258          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14259$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14260          BOOT_JDK_FOUND=no
14261        else
14262          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14263          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14264            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14266            BOOT_JDK_FOUND=no
14267          else
14268            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14269            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14270
14271            # Extra M4 quote needed to protect [] in grep expression.
14272            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14273            if test "x$FOUND_VERSION_78" = x; then
14274              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14276              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14277$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14278              BOOT_JDK_FOUND=no
14279            else
14280              # We're done! :-)
14281              BOOT_JDK_FOUND=yes
14282
14283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14284
14285  # Input might be given as Windows format, start by converting to
14286  # unix format.
14287  path="$BOOT_JDK"
14288  new_path=`$CYGPATH -u "$path"`
14289
14290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14293  # "foo.exe" is OK but "foo" is an error.
14294  #
14295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14296  # It is also a way to make sure we got the proper file name for the real test later on.
14297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14298  if test "x$test_shortpath" = x; then
14299    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14300$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14301    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14302  fi
14303
14304  # Call helper function which possibly converts this using DOS-style short mode.
14305  # If so, the updated path is stored in $new_path.
14306
14307  input_path="$new_path"
14308  # Check if we need to convert this using DOS-style short mode. If the path
14309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14310  # take no chances and rewrite it.
14311  # Note: m4 eats our [], so we need to use [ and ] instead.
14312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14313  if test "x$has_forbidden_chars" != x; then
14314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14318      # Going to short mode and back again did indeed matter. Since short mode is
14319      # case insensitive, let's make it lowercase to improve readability.
14320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14321      # Now convert it back to Unix-stile (cygpath)
14322      input_path=`$CYGPATH -u "$shortmode_path"`
14323      new_path="$input_path"
14324    fi
14325  fi
14326
14327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14328  if test "x$test_cygdrive_prefix" = x; then
14329    # As a simple fix, exclude /usr/bin since it's not a real path.
14330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14332      # a path prefixed by /cygdrive for fixpath to work.
14333      new_path="$CYGWIN_ROOT_PATH$input_path"
14334    fi
14335  fi
14336
14337
14338  if test "x$path" != "x$new_path"; then
14339    BOOT_JDK="$new_path"
14340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14341$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14342  fi
14343
14344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14345
14346  path="$BOOT_JDK"
14347  has_colon=`$ECHO $path | $GREP ^.:`
14348  new_path="$path"
14349  if test "x$has_colon" = x; then
14350    # Not in mixed or Windows style, start by that.
14351    new_path=`cmd //c echo $path`
14352  fi
14353
14354
14355  input_path="$new_path"
14356  # Check if we need to convert this using DOS-style short mode. If the path
14357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14358  # take no chances and rewrite it.
14359  # Note: m4 eats our [], so we need to use [ and ] instead.
14360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14361  if test "x$has_forbidden_chars" != x; then
14362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14364  fi
14365
14366
14367  windows_path="$new_path"
14368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14369    unix_path=`$CYGPATH -u "$windows_path"`
14370    new_path="$unix_path"
14371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14373    new_path="$unix_path"
14374  fi
14375
14376  if test "x$path" != "x$new_path"; then
14377    BOOT_JDK="$new_path"
14378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14380  fi
14381
14382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14384
14385  else
14386    # We're on a posix platform. Hooray! :)
14387    path="$BOOT_JDK"
14388    has_space=`$ECHO "$path" | $GREP " "`
14389    if test "x$has_space" != x; then
14390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14391$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14392      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14393    fi
14394
14395    # Use eval to expand a potential ~
14396    eval path="$path"
14397    if test ! -f "$path" && test ! -d "$path"; then
14398      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14399    fi
14400
14401    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14402  fi
14403
14404              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14405$as_echo_n "checking for Boot JDK... " >&6; }
14406              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14407$as_echo "$BOOT_JDK" >&6; }
14408              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14409$as_echo_n "checking Boot JDK version... " >&6; }
14410              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14411              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14412$as_echo "$BOOT_JDK_VERSION" >&6; }
14413            fi # end check jdk version
14414          fi # end check rt.jar
14415        fi # end check javac
14416      fi # end check java
14417    fi # end check boot jdk found
14418  fi
14419
14420    done
14421  fi
14422
14423
14424    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14425    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14426      # Do we have a bin/java?
14427      if test ! -x "$BOOT_JDK/bin/java"; then
14428        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14430        BOOT_JDK_FOUND=no
14431      else
14432        # Do we have a bin/javac?
14433        if test ! -x "$BOOT_JDK/bin/javac"; then
14434          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14436          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14437$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14438          BOOT_JDK_FOUND=no
14439        else
14440          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14441          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14442            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14444            BOOT_JDK_FOUND=no
14445          else
14446            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14447            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14448
14449            # Extra M4 quote needed to protect [] in grep expression.
14450            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14451            if test "x$FOUND_VERSION_78" = x; then
14452              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14454              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14455$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14456              BOOT_JDK_FOUND=no
14457            else
14458              # We're done! :-)
14459              BOOT_JDK_FOUND=yes
14460
14461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14462
14463  # Input might be given as Windows format, start by converting to
14464  # unix format.
14465  path="$BOOT_JDK"
14466  new_path=`$CYGPATH -u "$path"`
14467
14468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14471  # "foo.exe" is OK but "foo" is an error.
14472  #
14473  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14474  # It is also a way to make sure we got the proper file name for the real test later on.
14475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14476  if test "x$test_shortpath" = x; then
14477    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14478$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14479    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14480  fi
14481
14482  # Call helper function which possibly converts this using DOS-style short mode.
14483  # If so, the updated path is stored in $new_path.
14484
14485  input_path="$new_path"
14486  # Check if we need to convert this using DOS-style short mode. If the path
14487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14488  # take no chances and rewrite it.
14489  # Note: m4 eats our [], so we need to use [ and ] instead.
14490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14491  if test "x$has_forbidden_chars" != x; then
14492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14493    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14494    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14495    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14496      # Going to short mode and back again did indeed matter. Since short mode is
14497      # case insensitive, let's make it lowercase to improve readability.
14498      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14499      # Now convert it back to Unix-stile (cygpath)
14500      input_path=`$CYGPATH -u "$shortmode_path"`
14501      new_path="$input_path"
14502    fi
14503  fi
14504
14505  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14506  if test "x$test_cygdrive_prefix" = x; then
14507    # As a simple fix, exclude /usr/bin since it's not a real path.
14508    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14509      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14510      # a path prefixed by /cygdrive for fixpath to work.
14511      new_path="$CYGWIN_ROOT_PATH$input_path"
14512    fi
14513  fi
14514
14515
14516  if test "x$path" != "x$new_path"; then
14517    BOOT_JDK="$new_path"
14518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14519$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14520  fi
14521
14522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14523
14524  path="$BOOT_JDK"
14525  has_colon=`$ECHO $path | $GREP ^.:`
14526  new_path="$path"
14527  if test "x$has_colon" = x; then
14528    # Not in mixed or Windows style, start by that.
14529    new_path=`cmd //c echo $path`
14530  fi
14531
14532
14533  input_path="$new_path"
14534  # Check if we need to convert this using DOS-style short mode. If the path
14535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14536  # take no chances and rewrite it.
14537  # Note: m4 eats our [], so we need to use [ and ] instead.
14538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14539  if test "x$has_forbidden_chars" != x; then
14540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14542  fi
14543
14544
14545  windows_path="$new_path"
14546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14547    unix_path=`$CYGPATH -u "$windows_path"`
14548    new_path="$unix_path"
14549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14551    new_path="$unix_path"
14552  fi
14553
14554  if test "x$path" != "x$new_path"; then
14555    BOOT_JDK="$new_path"
14556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14557$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14558  fi
14559
14560  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14561  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14562
14563  else
14564    # We're on a posix platform. Hooray! :)
14565    path="$BOOT_JDK"
14566    has_space=`$ECHO "$path" | $GREP " "`
14567    if test "x$has_space" != x; then
14568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14569$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14570      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14571    fi
14572
14573    # Use eval to expand a potential ~
14574    eval path="$path"
14575    if test ! -f "$path" && test ! -d "$path"; then
14576      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14577    fi
14578
14579    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14580  fi
14581
14582              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14583$as_echo_n "checking for Boot JDK... " >&6; }
14584              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14585$as_echo "$BOOT_JDK" >&6; }
14586              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14587$as_echo_n "checking Boot JDK version... " >&6; }
14588              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14589              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14590$as_echo "$BOOT_JDK_VERSION" >&6; }
14591            fi # end check jdk version
14592          fi # end check rt.jar
14593        fi # end check javac
14594      fi # end check java
14595    fi # end check boot jdk found
14596  fi
14597
14598
14599  if test "x$BOOT_JDK_FOUND" = xno; then
14600    # Now execute the test
14601
14602  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14603  BOOT_JDK_SUFFIX="/Contents/Home"
14604  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14605  if test "x$ALL_JDKS_FOUND" != x; then
14606    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14607
14608  if test "x$BOOT_JDK_FOUND" = xno; then
14609    # Now execute the test
14610
14611        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14612        if test -d "$BOOT_JDK"; then
14613          BOOT_JDK_FOUND=maybe
14614          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14615$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14616        fi
14617
14618
14619    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14620    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14621      # Do we have a bin/java?
14622      if test ! -x "$BOOT_JDK/bin/java"; then
14623        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14625        BOOT_JDK_FOUND=no
14626      else
14627        # Do we have a bin/javac?
14628        if test ! -x "$BOOT_JDK/bin/javac"; then
14629          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14631          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14632$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14633          BOOT_JDK_FOUND=no
14634        else
14635          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14636          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14637            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14639            BOOT_JDK_FOUND=no
14640          else
14641            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14642            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14643
14644            # Extra M4 quote needed to protect [] in grep expression.
14645            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14646            if test "x$FOUND_VERSION_78" = x; then
14647              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14648$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14649              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14650$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14651              BOOT_JDK_FOUND=no
14652            else
14653              # We're done! :-)
14654              BOOT_JDK_FOUND=yes
14655
14656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14657
14658  # Input might be given as Windows format, start by converting to
14659  # unix format.
14660  path="$BOOT_JDK"
14661  new_path=`$CYGPATH -u "$path"`
14662
14663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14666  # "foo.exe" is OK but "foo" is an error.
14667  #
14668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14669  # It is also a way to make sure we got the proper file name for the real test later on.
14670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14671  if test "x$test_shortpath" = x; then
14672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14674    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14675  fi
14676
14677  # Call helper function which possibly converts this using DOS-style short mode.
14678  # If so, the updated path is stored in $new_path.
14679
14680  input_path="$new_path"
14681  # Check if we need to convert this using DOS-style short mode. If the path
14682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14683  # take no chances and rewrite it.
14684  # Note: m4 eats our [], so we need to use [ and ] instead.
14685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14686  if test "x$has_forbidden_chars" != x; then
14687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14691      # Going to short mode and back again did indeed matter. Since short mode is
14692      # case insensitive, let's make it lowercase to improve readability.
14693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14694      # Now convert it back to Unix-stile (cygpath)
14695      input_path=`$CYGPATH -u "$shortmode_path"`
14696      new_path="$input_path"
14697    fi
14698  fi
14699
14700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14701  if test "x$test_cygdrive_prefix" = x; then
14702    # As a simple fix, exclude /usr/bin since it's not a real path.
14703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14705      # a path prefixed by /cygdrive for fixpath to work.
14706      new_path="$CYGWIN_ROOT_PATH$input_path"
14707    fi
14708  fi
14709
14710
14711  if test "x$path" != "x$new_path"; then
14712    BOOT_JDK="$new_path"
14713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14715  fi
14716
14717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14718
14719  path="$BOOT_JDK"
14720  has_colon=`$ECHO $path | $GREP ^.:`
14721  new_path="$path"
14722  if test "x$has_colon" = x; then
14723    # Not in mixed or Windows style, start by that.
14724    new_path=`cmd //c echo $path`
14725  fi
14726
14727
14728  input_path="$new_path"
14729  # Check if we need to convert this using DOS-style short mode. If the path
14730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14731  # take no chances and rewrite it.
14732  # Note: m4 eats our [], so we need to use [ and ] instead.
14733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14734  if test "x$has_forbidden_chars" != x; then
14735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14737  fi
14738
14739
14740  windows_path="$new_path"
14741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14742    unix_path=`$CYGPATH -u "$windows_path"`
14743    new_path="$unix_path"
14744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14746    new_path="$unix_path"
14747  fi
14748
14749  if test "x$path" != "x$new_path"; then
14750    BOOT_JDK="$new_path"
14751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14753  fi
14754
14755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14757
14758  else
14759    # We're on a posix platform. Hooray! :)
14760    path="$BOOT_JDK"
14761    has_space=`$ECHO "$path" | $GREP " "`
14762    if test "x$has_space" != x; then
14763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14765      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14766    fi
14767
14768    # Use eval to expand a potential ~
14769    eval path="$path"
14770    if test ! -f "$path" && test ! -d "$path"; then
14771      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14772    fi
14773
14774    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14775  fi
14776
14777              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14778$as_echo_n "checking for Boot JDK... " >&6; }
14779              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14780$as_echo "$BOOT_JDK" >&6; }
14781              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14782$as_echo_n "checking Boot JDK version... " >&6; }
14783              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14784              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14785$as_echo "$BOOT_JDK_VERSION" >&6; }
14786            fi # end check jdk version
14787          fi # end check rt.jar
14788        fi # end check javac
14789      fi # end check java
14790    fi # end check boot jdk found
14791  fi
14792
14793    done
14794  fi
14795
14796
14797    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14798    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14799      # Do we have a bin/java?
14800      if test ! -x "$BOOT_JDK/bin/java"; then
14801        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14803        BOOT_JDK_FOUND=no
14804      else
14805        # Do we have a bin/javac?
14806        if test ! -x "$BOOT_JDK/bin/javac"; then
14807          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14809          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14810$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14811          BOOT_JDK_FOUND=no
14812        else
14813          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14814          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14815            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14817            BOOT_JDK_FOUND=no
14818          else
14819            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14820            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14821
14822            # Extra M4 quote needed to protect [] in grep expression.
14823            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14824            if test "x$FOUND_VERSION_78" = x; then
14825              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14826$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14827              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14828$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14829              BOOT_JDK_FOUND=no
14830            else
14831              # We're done! :-)
14832              BOOT_JDK_FOUND=yes
14833
14834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14835
14836  # Input might be given as Windows format, start by converting to
14837  # unix format.
14838  path="$BOOT_JDK"
14839  new_path=`$CYGPATH -u "$path"`
14840
14841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14844  # "foo.exe" is OK but "foo" is an error.
14845  #
14846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14847  # It is also a way to make sure we got the proper file name for the real test later on.
14848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14849  if test "x$test_shortpath" = x; then
14850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14852    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14853  fi
14854
14855  # Call helper function which possibly converts this using DOS-style short mode.
14856  # If so, the updated path is stored in $new_path.
14857
14858  input_path="$new_path"
14859  # Check if we need to convert this using DOS-style short mode. If the path
14860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14861  # take no chances and rewrite it.
14862  # Note: m4 eats our [], so we need to use [ and ] instead.
14863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14864  if test "x$has_forbidden_chars" != x; then
14865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14869      # Going to short mode and back again did indeed matter. Since short mode is
14870      # case insensitive, let's make it lowercase to improve readability.
14871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14872      # Now convert it back to Unix-stile (cygpath)
14873      input_path=`$CYGPATH -u "$shortmode_path"`
14874      new_path="$input_path"
14875    fi
14876  fi
14877
14878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14879  if test "x$test_cygdrive_prefix" = x; then
14880    # As a simple fix, exclude /usr/bin since it's not a real path.
14881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14883      # a path prefixed by /cygdrive for fixpath to work.
14884      new_path="$CYGWIN_ROOT_PATH$input_path"
14885    fi
14886  fi
14887
14888
14889  if test "x$path" != "x$new_path"; then
14890    BOOT_JDK="$new_path"
14891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14893  fi
14894
14895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14896
14897  path="$BOOT_JDK"
14898  has_colon=`$ECHO $path | $GREP ^.:`
14899  new_path="$path"
14900  if test "x$has_colon" = x; then
14901    # Not in mixed or Windows style, start by that.
14902    new_path=`cmd //c echo $path`
14903  fi
14904
14905
14906  input_path="$new_path"
14907  # Check if we need to convert this using DOS-style short mode. If the path
14908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14909  # take no chances and rewrite it.
14910  # Note: m4 eats our [], so we need to use [ and ] instead.
14911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14912  if test "x$has_forbidden_chars" != x; then
14913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14915  fi
14916
14917
14918  windows_path="$new_path"
14919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14920    unix_path=`$CYGPATH -u "$windows_path"`
14921    new_path="$unix_path"
14922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14924    new_path="$unix_path"
14925  fi
14926
14927  if test "x$path" != "x$new_path"; then
14928    BOOT_JDK="$new_path"
14929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14931  fi
14932
14933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14935
14936  else
14937    # We're on a posix platform. Hooray! :)
14938    path="$BOOT_JDK"
14939    has_space=`$ECHO "$path" | $GREP " "`
14940    if test "x$has_space" != x; then
14941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14943      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14944    fi
14945
14946    # Use eval to expand a potential ~
14947    eval path="$path"
14948    if test ! -f "$path" && test ! -d "$path"; then
14949      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14950    fi
14951
14952    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14953  fi
14954
14955              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14956$as_echo_n "checking for Boot JDK... " >&6; }
14957              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14958$as_echo "$BOOT_JDK" >&6; }
14959              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14960$as_echo_n "checking Boot JDK version... " >&6; }
14961              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14962              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14963$as_echo "$BOOT_JDK_VERSION" >&6; }
14964            fi # end check jdk version
14965          fi # end check rt.jar
14966        fi # end check javac
14967      fi # end check java
14968    fi # end check boot jdk found
14969  fi
14970
14971  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14972
14973  if test "x$BOOT_JDK_FOUND" = xno; then
14974    # Now execute the test
14975
14976  BOOT_JDK_PREFIX="/usr/lib/jvm"
14977  BOOT_JDK_SUFFIX=""
14978  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14979  if test "x$ALL_JDKS_FOUND" != x; then
14980    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14981
14982  if test "x$BOOT_JDK_FOUND" = xno; then
14983    # Now execute the test
14984
14985        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14986        if test -d "$BOOT_JDK"; then
14987          BOOT_JDK_FOUND=maybe
14988          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14989$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14990        fi
14991
14992
14993    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14994    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14995      # Do we have a bin/java?
14996      if test ! -x "$BOOT_JDK/bin/java"; then
14997        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14999        BOOT_JDK_FOUND=no
15000      else
15001        # Do we have a bin/javac?
15002        if test ! -x "$BOOT_JDK/bin/javac"; then
15003          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15005          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15006$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15007          BOOT_JDK_FOUND=no
15008        else
15009          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15010          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15011            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15013            BOOT_JDK_FOUND=no
15014          else
15015            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15016            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15017
15018            # Extra M4 quote needed to protect [] in grep expression.
15019            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15020            if test "x$FOUND_VERSION_78" = x; then
15021              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15023              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15024$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15025              BOOT_JDK_FOUND=no
15026            else
15027              # We're done! :-)
15028              BOOT_JDK_FOUND=yes
15029
15030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15031
15032  # Input might be given as Windows format, start by converting to
15033  # unix format.
15034  path="$BOOT_JDK"
15035  new_path=`$CYGPATH -u "$path"`
15036
15037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15040  # "foo.exe" is OK but "foo" is an error.
15041  #
15042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15043  # It is also a way to make sure we got the proper file name for the real test later on.
15044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15045  if test "x$test_shortpath" = x; then
15046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15048    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15049  fi
15050
15051  # Call helper function which possibly converts this using DOS-style short mode.
15052  # If so, the updated path is stored in $new_path.
15053
15054  input_path="$new_path"
15055  # Check if we need to convert this using DOS-style short mode. If the path
15056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15057  # take no chances and rewrite it.
15058  # Note: m4 eats our [], so we need to use [ and ] instead.
15059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15060  if test "x$has_forbidden_chars" != x; then
15061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15065      # Going to short mode and back again did indeed matter. Since short mode is
15066      # case insensitive, let's make it lowercase to improve readability.
15067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15068      # Now convert it back to Unix-stile (cygpath)
15069      input_path=`$CYGPATH -u "$shortmode_path"`
15070      new_path="$input_path"
15071    fi
15072  fi
15073
15074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15075  if test "x$test_cygdrive_prefix" = x; then
15076    # As a simple fix, exclude /usr/bin since it's not a real path.
15077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15079      # a path prefixed by /cygdrive for fixpath to work.
15080      new_path="$CYGWIN_ROOT_PATH$input_path"
15081    fi
15082  fi
15083
15084
15085  if test "x$path" != "x$new_path"; then
15086    BOOT_JDK="$new_path"
15087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15088$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15089  fi
15090
15091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15092
15093  path="$BOOT_JDK"
15094  has_colon=`$ECHO $path | $GREP ^.:`
15095  new_path="$path"
15096  if test "x$has_colon" = x; then
15097    # Not in mixed or Windows style, start by that.
15098    new_path=`cmd //c echo $path`
15099  fi
15100
15101
15102  input_path="$new_path"
15103  # Check if we need to convert this using DOS-style short mode. If the path
15104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15105  # take no chances and rewrite it.
15106  # Note: m4 eats our [], so we need to use [ and ] instead.
15107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15108  if test "x$has_forbidden_chars" != x; then
15109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15111  fi
15112
15113
15114  windows_path="$new_path"
15115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15116    unix_path=`$CYGPATH -u "$windows_path"`
15117    new_path="$unix_path"
15118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15120    new_path="$unix_path"
15121  fi
15122
15123  if test "x$path" != "x$new_path"; then
15124    BOOT_JDK="$new_path"
15125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15126$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15127  fi
15128
15129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15131
15132  else
15133    # We're on a posix platform. Hooray! :)
15134    path="$BOOT_JDK"
15135    has_space=`$ECHO "$path" | $GREP " "`
15136    if test "x$has_space" != x; then
15137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15139      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15140    fi
15141
15142    # Use eval to expand a potential ~
15143    eval path="$path"
15144    if test ! -f "$path" && test ! -d "$path"; then
15145      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15146    fi
15147
15148    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15149  fi
15150
15151              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15152$as_echo_n "checking for Boot JDK... " >&6; }
15153              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15154$as_echo "$BOOT_JDK" >&6; }
15155              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15156$as_echo_n "checking Boot JDK version... " >&6; }
15157              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15158              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15159$as_echo "$BOOT_JDK_VERSION" >&6; }
15160            fi # end check jdk version
15161          fi # end check rt.jar
15162        fi # end check javac
15163      fi # end check java
15164    fi # end check boot jdk found
15165  fi
15166
15167    done
15168  fi
15169
15170
15171    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15172    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15173      # Do we have a bin/java?
15174      if test ! -x "$BOOT_JDK/bin/java"; then
15175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15177        BOOT_JDK_FOUND=no
15178      else
15179        # Do we have a bin/javac?
15180        if test ! -x "$BOOT_JDK/bin/javac"; then
15181          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15183          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15184$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15185          BOOT_JDK_FOUND=no
15186        else
15187          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15188          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15189            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15191            BOOT_JDK_FOUND=no
15192          else
15193            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15194            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15195
15196            # Extra M4 quote needed to protect [] in grep expression.
15197            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15198            if test "x$FOUND_VERSION_78" = x; then
15199              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15201              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15202$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15203              BOOT_JDK_FOUND=no
15204            else
15205              # We're done! :-)
15206              BOOT_JDK_FOUND=yes
15207
15208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15209
15210  # Input might be given as Windows format, start by converting to
15211  # unix format.
15212  path="$BOOT_JDK"
15213  new_path=`$CYGPATH -u "$path"`
15214
15215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15218  # "foo.exe" is OK but "foo" is an error.
15219  #
15220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15221  # It is also a way to make sure we got the proper file name for the real test later on.
15222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15223  if test "x$test_shortpath" = x; then
15224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15226    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15227  fi
15228
15229  # Call helper function which possibly converts this using DOS-style short mode.
15230  # If so, the updated path is stored in $new_path.
15231
15232  input_path="$new_path"
15233  # Check if we need to convert this using DOS-style short mode. If the path
15234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15235  # take no chances and rewrite it.
15236  # Note: m4 eats our [], so we need to use [ and ] instead.
15237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15238  if test "x$has_forbidden_chars" != x; then
15239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15243      # Going to short mode and back again did indeed matter. Since short mode is
15244      # case insensitive, let's make it lowercase to improve readability.
15245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15246      # Now convert it back to Unix-stile (cygpath)
15247      input_path=`$CYGPATH -u "$shortmode_path"`
15248      new_path="$input_path"
15249    fi
15250  fi
15251
15252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15253  if test "x$test_cygdrive_prefix" = x; then
15254    # As a simple fix, exclude /usr/bin since it's not a real path.
15255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15257      # a path prefixed by /cygdrive for fixpath to work.
15258      new_path="$CYGWIN_ROOT_PATH$input_path"
15259    fi
15260  fi
15261
15262
15263  if test "x$path" != "x$new_path"; then
15264    BOOT_JDK="$new_path"
15265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15267  fi
15268
15269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15270
15271  path="$BOOT_JDK"
15272  has_colon=`$ECHO $path | $GREP ^.:`
15273  new_path="$path"
15274  if test "x$has_colon" = x; then
15275    # Not in mixed or Windows style, start by that.
15276    new_path=`cmd //c echo $path`
15277  fi
15278
15279
15280  input_path="$new_path"
15281  # Check if we need to convert this using DOS-style short mode. If the path
15282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15283  # take no chances and rewrite it.
15284  # Note: m4 eats our [], so we need to use [ and ] instead.
15285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15286  if test "x$has_forbidden_chars" != x; then
15287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15289  fi
15290
15291
15292  windows_path="$new_path"
15293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15294    unix_path=`$CYGPATH -u "$windows_path"`
15295    new_path="$unix_path"
15296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15298    new_path="$unix_path"
15299  fi
15300
15301  if test "x$path" != "x$new_path"; then
15302    BOOT_JDK="$new_path"
15303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15305  fi
15306
15307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15309
15310  else
15311    # We're on a posix platform. Hooray! :)
15312    path="$BOOT_JDK"
15313    has_space=`$ECHO "$path" | $GREP " "`
15314    if test "x$has_space" != x; then
15315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15317      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15318    fi
15319
15320    # Use eval to expand a potential ~
15321    eval path="$path"
15322    if test ! -f "$path" && test ! -d "$path"; then
15323      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15324    fi
15325
15326    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15327  fi
15328
15329              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15330$as_echo_n "checking for Boot JDK... " >&6; }
15331              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15332$as_echo "$BOOT_JDK" >&6; }
15333              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15334$as_echo_n "checking Boot JDK version... " >&6; }
15335              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15336              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15337$as_echo "$BOOT_JDK_VERSION" >&6; }
15338            fi # end check jdk version
15339          fi # end check rt.jar
15340        fi # end check javac
15341      fi # end check java
15342    fi # end check boot jdk found
15343  fi
15344
15345  fi
15346
15347
15348    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15349    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15350      # Do we have a bin/java?
15351      if test ! -x "$BOOT_JDK/bin/java"; then
15352        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15354        BOOT_JDK_FOUND=no
15355      else
15356        # Do we have a bin/javac?
15357        if test ! -x "$BOOT_JDK/bin/javac"; then
15358          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15360          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15361$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15362          BOOT_JDK_FOUND=no
15363        else
15364          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15365          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15366            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15368            BOOT_JDK_FOUND=no
15369          else
15370            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15371            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15372
15373            # Extra M4 quote needed to protect [] in grep expression.
15374            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15375            if test "x$FOUND_VERSION_78" = x; then
15376              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15378              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15379$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15380              BOOT_JDK_FOUND=no
15381            else
15382              # We're done! :-)
15383              BOOT_JDK_FOUND=yes
15384
15385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15386
15387  # Input might be given as Windows format, start by converting to
15388  # unix format.
15389  path="$BOOT_JDK"
15390  new_path=`$CYGPATH -u "$path"`
15391
15392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15395  # "foo.exe" is OK but "foo" is an error.
15396  #
15397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15398  # It is also a way to make sure we got the proper file name for the real test later on.
15399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15400  if test "x$test_shortpath" = x; then
15401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15403    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15404  fi
15405
15406  # Call helper function which possibly converts this using DOS-style short mode.
15407  # If so, the updated path is stored in $new_path.
15408
15409  input_path="$new_path"
15410  # Check if we need to convert this using DOS-style short mode. If the path
15411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15412  # take no chances and rewrite it.
15413  # Note: m4 eats our [], so we need to use [ and ] instead.
15414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15415  if test "x$has_forbidden_chars" != x; then
15416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15420      # Going to short mode and back again did indeed matter. Since short mode is
15421      # case insensitive, let's make it lowercase to improve readability.
15422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15423      # Now convert it back to Unix-stile (cygpath)
15424      input_path=`$CYGPATH -u "$shortmode_path"`
15425      new_path="$input_path"
15426    fi
15427  fi
15428
15429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15430  if test "x$test_cygdrive_prefix" = x; then
15431    # As a simple fix, exclude /usr/bin since it's not a real path.
15432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15434      # a path prefixed by /cygdrive for fixpath to work.
15435      new_path="$CYGWIN_ROOT_PATH$input_path"
15436    fi
15437  fi
15438
15439
15440  if test "x$path" != "x$new_path"; then
15441    BOOT_JDK="$new_path"
15442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15444  fi
15445
15446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15447
15448  path="$BOOT_JDK"
15449  has_colon=`$ECHO $path | $GREP ^.:`
15450  new_path="$path"
15451  if test "x$has_colon" = x; then
15452    # Not in mixed or Windows style, start by that.
15453    new_path=`cmd //c echo $path`
15454  fi
15455
15456
15457  input_path="$new_path"
15458  # Check if we need to convert this using DOS-style short mode. If the path
15459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15460  # take no chances and rewrite it.
15461  # Note: m4 eats our [], so we need to use [ and ] instead.
15462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15463  if test "x$has_forbidden_chars" != x; then
15464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15466  fi
15467
15468
15469  windows_path="$new_path"
15470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15471    unix_path=`$CYGPATH -u "$windows_path"`
15472    new_path="$unix_path"
15473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15475    new_path="$unix_path"
15476  fi
15477
15478  if test "x$path" != "x$new_path"; then
15479    BOOT_JDK="$new_path"
15480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15481$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15482  fi
15483
15484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15486
15487  else
15488    # We're on a posix platform. Hooray! :)
15489    path="$BOOT_JDK"
15490    has_space=`$ECHO "$path" | $GREP " "`
15491    if test "x$has_space" != x; then
15492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15494      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15495    fi
15496
15497    # Use eval to expand a potential ~
15498    eval path="$path"
15499    if test ! -f "$path" && test ! -d "$path"; then
15500      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15501    fi
15502
15503    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15504  fi
15505
15506              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15507$as_echo_n "checking for Boot JDK... " >&6; }
15508              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15509$as_echo "$BOOT_JDK" >&6; }
15510              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15511$as_echo_n "checking Boot JDK version... " >&6; }
15512              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15513              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15514$as_echo "$BOOT_JDK_VERSION" >&6; }
15515            fi # end check jdk version
15516          fi # end check rt.jar
15517        fi # end check javac
15518      fi # end check java
15519    fi # end check boot jdk found
15520  fi
15521
15522
15523# If we haven't found anything yet, we've truly lost. Give up.
15524if test "x$BOOT_JDK_FOUND" = xno; then
15525
15526    # Print a helpful message on how to acquire the necessary build dependency.
15527    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15528    MISSING_DEPENDENCY=openjdk
15529    PKGHANDLER_COMMAND=
15530
15531    case $PKGHANDLER in
15532	apt-get)
15533                apt_help     $MISSING_DEPENDENCY ;;
15534    yum)
15535                yum_help     $MISSING_DEPENDENCY ;;
15536	port)
15537                port_help    $MISSING_DEPENDENCY ;;
15538	pkgutil)
15539                pkgutil_help $MISSING_DEPENDENCY ;;
15540	pkgadd)
15541                pkgadd_help  $MISSING_DEPENDENCY ;;
15542    * )
15543      break ;;
15544    esac
15545
15546    if test "x$PKGHANDLER_COMMAND" != x; then
15547        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15548    fi
15549
15550  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15551$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15552  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15553$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15554  as_fn_error $? "Cannot continue" "$LINENO" 5
15555fi
15556
15557# Setup proper paths for what we found
15558BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15559if test ! -f "$BOOT_RTJAR"; then
15560    # On MacOSX it is called classes.jar
15561    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15562    if test -f "$BOOT_RTJAR"; then
15563      # Remove the ..
15564      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15565    fi
15566fi
15567BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15568BOOT_JDK="$BOOT_JDK"
15569
15570
15571
15572
15573# Setup tools from the Boot JDK.
15574
15575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15576$as_echo_n "checking for java in Boot JDK... " >&6; }
15577  JAVA=$BOOT_JDK/bin/java
15578  if test ! -x $JAVA; 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 java 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 javac in Boot JDK" >&5
15590$as_echo_n "checking for javac in Boot JDK... " >&6; }
15591  JAVAC=$BOOT_JDK/bin/javac
15592  if test ! -x $JAVAC; 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 javac 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 javah in Boot JDK" >&5
15604$as_echo_n "checking for javah in Boot JDK... " >&6; }
15605  JAVAH=$BOOT_JDK/bin/javah
15606  if test ! -x $JAVAH; 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 javah 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 javap in Boot JDK" >&5
15618$as_echo_n "checking for javap in Boot JDK... " >&6; }
15619  JAVAP=$BOOT_JDK/bin/javap
15620  if test ! -x $JAVAP; 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 javap 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 jar in Boot JDK" >&5
15632$as_echo_n "checking for jar in Boot JDK... " >&6; }
15633  JAR=$BOOT_JDK/bin/jar
15634  if test ! -x $JAR; 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 jar 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 rmic in Boot JDK" >&5
15646$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15647  RMIC=$BOOT_JDK/bin/rmic
15648  if test ! -x $RMIC; 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 rmic 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  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15660$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15661  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15662  if test ! -x $NATIVE2ASCII; then
15663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15664$as_echo "not found" >&6; }
15665      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15666$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15667      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15668  fi
15669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15670$as_echo "ok" >&6; }
15671
15672
15673# Finally, set some other options...
15674
15675# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15676BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15677
15678
15679
15680
15681##############################################################################
15682#
15683# Specify options for anything that is run with the Boot JDK.
15684#
15685
15686# Check whether --with-boot-jdk-jvmargs was given.
15687if test "${with_boot_jdk_jvmargs+set}" = set; then :
15688  withval=$with_boot_jdk_jvmargs;
15689fi
15690
15691
15692if test "x$with_boot_jdk_jvmargs" = x; then
15693    # Not all JVM:s accept the same arguments on the command line.
15694    # OpenJDK specific increase in thread stack for JDK build,
15695    # well more specifically, when running javac.
15696    if test "x$BUILD_NUM_BITS" = x32; then
15697       STACK_SIZE=768
15698    else
15699       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15700       # since 64-bit pointers are pushed on the stach. Apparently, we need
15701       # to increase the stack space when javacing the JDK....
15702       STACK_SIZE=1536
15703    fi
15704
15705    # Minimum amount of heap memory.
15706
15707    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15708    $ECHO "Command: $JAVA -Xms64M -version" >&5
15709    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15710    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15711    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15712    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15713        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15714	JVM_ARG_OK=true
15715    else
15716	$ECHO "Arg failed:" >&5
15717	$ECHO "$OUTPUT" >&5
15718	JVM_ARG_OK=false
15719    fi
15720
15721    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15722        # Why does macosx need more heap? Its the huge JDK batch.
15723
15724    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15725    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15726    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15727    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15728    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15729    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15730        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15731	JVM_ARG_OK=true
15732    else
15733	$ECHO "Arg failed:" >&5
15734	$ECHO "$OUTPUT" >&5
15735	JVM_ARG_OK=false
15736    fi
15737
15738    else
15739
15740    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15741    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15742    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15743    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15744    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15745    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15746        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15747	JVM_ARG_OK=true
15748    else
15749	$ECHO "Arg failed:" >&5
15750	$ECHO "$OUTPUT" >&5
15751	JVM_ARG_OK=false
15752    fi
15753
15754    fi
15755    # When is adding -client something that speeds up the JVM?
15756    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15757
15758    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15759    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15760    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15761    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15762    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15763    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15764        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15765	JVM_ARG_OK=true
15766    else
15767	$ECHO "Arg failed:" >&5
15768	$ECHO "$OUTPUT" >&5
15769	JVM_ARG_OK=false
15770    fi
15771
15772
15773    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15774    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15775    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15776    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15777    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15778    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15779        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15780	JVM_ARG_OK=true
15781    else
15782	$ECHO "Arg failed:" >&5
15783	$ECHO "$OUTPUT" >&5
15784	JVM_ARG_OK=false
15785    fi
15786
15787
15788    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15789    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15790    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15791    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15792    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15793    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15794        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15795	JVM_ARG_OK=true
15796    else
15797	$ECHO "Arg failed:" >&5
15798	$ECHO "$OUTPUT" >&5
15799	JVM_ARG_OK=false
15800    fi
15801
15802    # Disable special log output when a debug build is used as Boot JDK...
15803
15804    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15805    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15806    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15807    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15808    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15809    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15810        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15811	JVM_ARG_OK=true
15812    else
15813	$ECHO "Arg failed:" >&5
15814	$ECHO "$OUTPUT" >&5
15815	JVM_ARG_OK=false
15816    fi
15817
15818fi
15819
15820BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15821
15822
15823
15824###############################################################################
15825#
15826# Configure the sources to use. We can add or override individual directories.
15827#
15828###############################################################################
15829
15830
15831
15832# Where are the sources. Any of these can be overridden
15833# using --with-override-corba and the likes.
15834LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15835CORBA_TOPDIR="$SRC_ROOT/corba"
15836JAXP_TOPDIR="$SRC_ROOT/jaxp"
15837JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15838HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15839NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15840JDK_TOPDIR="$SRC_ROOT/jdk"
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851###############################################################################
15852#
15853# Pickup additional source for a component from outside of the source root
15854# or override source for a component.
15855#
15856
15857# Check whether --with-add-source-root was given.
15858if test "${with_add_source_root+set}" = set; then :
15859  withval=$with_add_source_root;
15860fi
15861
15862
15863
15864# Check whether --with-override-source-root was given.
15865if test "${with_override_source_root+set}" = set; then :
15866  withval=$with_override_source_root;
15867fi
15868
15869
15870
15871# Check whether --with-adds-and-overrides was given.
15872if test "${with_adds_and_overrides+set}" = set; then :
15873  withval=$with_adds_and_overrides;
15874fi
15875
15876
15877if test "x$with_adds_and_overrides" != x; then
15878    with_add_source_root="$with_adds_and_overrides/adds"
15879    with_override_source_root="$with_adds_and_overrides/overrides"
15880fi
15881
15882if test "x$with_add_source_root" != x; then
15883    if ! test -d $with_add_source_root; then
15884       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15885    fi
15886    CURDIR="$PWD"
15887    cd "$with_add_source_root"
15888    ADD_SRC_ROOT="`pwd`"
15889    cd "$CURDIR"
15890    # Verify that the addon source root does not have any root makefiles.
15891    # If it does, then it is usually an error, prevent this.
15892    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15893       test -f $with_add_source_root/langtools/make/Makefile; then
15894        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
15895    fi
15896    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15897       test -f $with_add_source_root/corba/make/Makefile; then
15898        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
15899    fi
15900    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15901       test -f $with_add_source_root/jaxp/make/Makefile; then
15902        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
15903    fi
15904    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15905       test -f $with_add_source_root/jaxws/make/Makefile; then
15906        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
15907    fi
15908    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15909       test -f $with_add_source_root/hotspot/make/Makefile; then
15910        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
15911    fi
15912    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15913       test -f $with_add_source_root/jdk/make/Makefile; then
15914        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
15915    fi
15916fi
15917
15918
15919if test "x$with_override_source_root" != x; then
15920    if ! test -d $with_override_source_root; then
15921       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15922    fi
15923    CURDIR="$PWD"
15924    cd "$with_override_source_root"
15925    OVERRIDE_SRC_ROOT="`pwd`"
15926    cd "$CURDIR"
15927    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15928       test -f $with_override_source_root/langtools/make/Makefile; then
15929        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
15930    fi
15931    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15932       test -f $with_override_source_root/corba/make/Makefile; then
15933        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
15934    fi
15935    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15936       test -f $with_override_source_root/jaxp/make/Makefile; then
15937        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
15938    fi
15939    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15940       test -f $with_override_source_root/jaxws/make/Makefile; then
15941        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
15942    fi
15943    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15944       test -f $with_override_source_root/hotspot/make/Makefile; then
15945        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
15946    fi
15947    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15948       test -f $with_override_source_root/jdk/make/Makefile; then
15949        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
15950    fi
15951fi
15952
15953
15954###############################################################################
15955#
15956# Override a repo completely, this is used for example when you have 3 small
15957# development sandboxes of the langtools sources and want to avoid having 3 full
15958# OpenJDK sources checked out on disk.
15959#
15960# Assuming that the 3 langtools sandboxes are located here:
15961# /home/fredrik/sandbox1/langtools
15962# /home/fredrik/sandbox2/langtools
15963# /home/fredrik/sandbox3/langtools
15964#
15965# From the source root you create build subdirs manually:
15966#     mkdir -p build1 build2 build3
15967# in each build directory run:
15968#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15969#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15970#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15971#
15972
15973
15974# Check whether --with-override-langtools was given.
15975if test "${with_override_langtools+set}" = set; then :
15976  withval=$with_override_langtools;
15977fi
15978
15979
15980
15981# Check whether --with-override-corba was given.
15982if test "${with_override_corba+set}" = set; then :
15983  withval=$with_override_corba;
15984fi
15985
15986
15987
15988# Check whether --with-override-jaxp was given.
15989if test "${with_override_jaxp+set}" = set; then :
15990  withval=$with_override_jaxp;
15991fi
15992
15993
15994
15995# Check whether --with-override-jaxws was given.
15996if test "${with_override_jaxws+set}" = set; then :
15997  withval=$with_override_jaxws;
15998fi
15999
16000
16001
16002# Check whether --with-override-hotspot was given.
16003if test "${with_override_hotspot+set}" = set; then :
16004  withval=$with_override_hotspot;
16005fi
16006
16007
16008
16009# Check whether --with-override-jdk was given.
16010if test "${with_override_jdk+set}" = set; then :
16011  withval=$with_override_jdk;
16012fi
16013
16014
16015if test "x$with_override_langtools" != x; then
16016    CURDIR="$PWD"
16017    cd "$with_override_langtools"
16018    LANGTOOLS_TOPDIR="`pwd`"
16019    cd "$CURDIR"
16020    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16021        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16022    fi
16023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16024$as_echo_n "checking if langtools should be overridden... " >&6; }
16025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16026$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16027fi
16028if test "x$with_override_corba" != x; then
16029    CURDIR="$PWD"
16030    cd "$with_override_corba"
16031    CORBA_TOPDIR="`pwd`"
16032    cd "$CURDIR"
16033    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16034        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16035    fi
16036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16037$as_echo_n "checking if corba should be overridden... " >&6; }
16038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16039$as_echo "yes with $CORBA_TOPDIR" >&6; }
16040fi
16041if test "x$with_override_jaxp" != x; then
16042    CURDIR="$PWD"
16043    cd "$with_override_jaxp"
16044    JAXP_TOPDIR="`pwd`"
16045    cd "$CURDIR"
16046    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16047        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16048    fi
16049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16050$as_echo_n "checking if jaxp should be overridden... " >&6; }
16051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16052$as_echo "yes with $JAXP_TOPDIR" >&6; }
16053fi
16054if test "x$with_override_jaxws" != x; then
16055    CURDIR="$PWD"
16056    cd "$with_override_jaxws"
16057    JAXWS_TOPDIR="`pwd`"
16058    cd "$CURDIR"
16059    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16060        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16061    fi
16062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16063$as_echo_n "checking if jaxws should be overridden... " >&6; }
16064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16065$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16066fi
16067if test "x$with_override_hotspot" != x; then
16068    CURDIR="$PWD"
16069    cd "$with_override_hotspot"
16070    HOTSPOT_TOPDIR="`pwd`"
16071    cd "$CURDIR"
16072    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16073       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16074        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16075    fi
16076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16077$as_echo_n "checking if hotspot should be overridden... " >&6; }
16078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16079$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16080fi
16081if test "x$with_override_nashorn" != x; then
16082    CURDIR="$PWD"
16083    cd "$with_override_nashorn"
16084    NASHORN_TOPDIR="`pwd`"
16085    cd "$CURDIR"
16086    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16087        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16088    fi
16089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16090$as_echo_n "checking if nashorn should be overridden... " >&6; }
16091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16092$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16093fi
16094if test "x$with_override_jdk" != x; then
16095    CURDIR="$PWD"
16096    cd "$with_override_jdk"
16097    JDK_TOPDIR="`pwd`"
16098    cd "$CURDIR"
16099    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16100        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16101    fi
16102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16103$as_echo_n "checking if JDK should be overridden... " >&6; }
16104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16105$as_echo "yes with $JDK_TOPDIR" >&6; }
16106fi
16107
16108
16109
16110BUILD_OUTPUT="$OUTPUT_ROOT"
16111
16112
16113HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16114BUILD_HOTSPOT=true
16115
16116
16117
16118# Check whether --with-import-hotspot was given.
16119if test "${with_import_hotspot+set}" = set; then :
16120  withval=$with_import_hotspot;
16121fi
16122
16123if test "x$with_import_hotspot" != x; then
16124    CURDIR="$PWD"
16125    cd "$with_import_hotspot"
16126    HOTSPOT_DIST="`pwd`"
16127    cd "$CURDIR"
16128    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16129        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16130    fi
16131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16132$as_echo_n "checking if hotspot should be imported... " >&6; }
16133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16134$as_echo "yes from $HOTSPOT_DIST" >&6; }
16135    BUILD_HOTSPOT=false
16136fi
16137
16138JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16139
16140
16141###############################################################################
16142#
16143# Setup the toolchain (compilers etc), i.e. the tools that need to be
16144# cross-compilation aware.
16145#
16146###############################################################################
16147
16148
16149###############################################################################
16150#
16151# Configure the development tool paths and potential sysroot.
16152#
16153ac_ext=cpp
16154ac_cpp='$CXXCPP $CPPFLAGS'
16155ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16156ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16157ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16158
16159
16160# The option used to specify the target .o,.a or .so file.
16161# When compiling, how to specify the to be created object file.
16162CC_OUT_OPTION='-o$(SPACE)'
16163# When linking, how to specify the to be created executable.
16164EXE_OUT_OPTION='-o$(SPACE)'
16165# When linking, how to specify the to be created dynamically linkable library.
16166LD_OUT_OPTION='-o$(SPACE)'
16167# When archiving, how to specify the to be create static archive for object files.
16168AR_OUT_OPTION='rcs$(SPACE)'
16169
16170
16171
16172
16173
16174# Locate the actual tools
16175
16176
16177# Check whether --with-jtreg was given.
16178if test "${with_jtreg+set}" = set; then :
16179  withval=$with_jtreg;
16180else
16181  with_jtreg=no
16182fi
16183
16184
16185  if test "x$with_jtreg" = xno; then
16186    # jtreg disabled
16187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16188$as_echo_n "checking for jtreg... " >&6; }
16189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16190$as_echo "no" >&6; }
16191  else
16192    if test "x$with_jtreg" != xyes; then
16193      # with path specified.
16194      JT_HOME="$with_jtreg"
16195    fi
16196
16197    if test "x$JT_HOME" != x; then
16198      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16199$as_echo_n "checking for jtreg... " >&6; }
16200
16201      # use JT_HOME enviroment var.
16202
16203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16204
16205  # Input might be given as Windows format, start by converting to
16206  # unix format.
16207  path="$JT_HOME"
16208  new_path=`$CYGPATH -u "$path"`
16209
16210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16213  # "foo.exe" is OK but "foo" is an error.
16214  #
16215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16216  # It is also a way to make sure we got the proper file name for the real test later on.
16217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16218  if test "x$test_shortpath" = x; then
16219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16220$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16221    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16222  fi
16223
16224  # Call helper function which possibly converts this using DOS-style short mode.
16225  # If so, the updated path is stored in $new_path.
16226
16227  input_path="$new_path"
16228  # Check if we need to convert this using DOS-style short mode. If the path
16229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16230  # take no chances and rewrite it.
16231  # Note: m4 eats our [], so we need to use [ and ] instead.
16232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16233  if test "x$has_forbidden_chars" != x; then
16234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16238      # Going to short mode and back again did indeed matter. Since short mode is
16239      # case insensitive, let's make it lowercase to improve readability.
16240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16241      # Now convert it back to Unix-stile (cygpath)
16242      input_path=`$CYGPATH -u "$shortmode_path"`
16243      new_path="$input_path"
16244    fi
16245  fi
16246
16247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16248  if test "x$test_cygdrive_prefix" = x; then
16249    # As a simple fix, exclude /usr/bin since it's not a real path.
16250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16252      # a path prefixed by /cygdrive for fixpath to work.
16253      new_path="$CYGWIN_ROOT_PATH$input_path"
16254    fi
16255  fi
16256
16257
16258  if test "x$path" != "x$new_path"; then
16259    JT_HOME="$new_path"
16260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16261$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16262  fi
16263
16264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16265
16266  path="$JT_HOME"
16267  has_colon=`$ECHO $path | $GREP ^.:`
16268  new_path="$path"
16269  if test "x$has_colon" = x; then
16270    # Not in mixed or Windows style, start by that.
16271    new_path=`cmd //c echo $path`
16272  fi
16273
16274
16275  input_path="$new_path"
16276  # Check if we need to convert this using DOS-style short mode. If the path
16277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16278  # take no chances and rewrite it.
16279  # Note: m4 eats our [], so we need to use [ and ] instead.
16280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16281  if test "x$has_forbidden_chars" != x; then
16282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16284  fi
16285
16286
16287  windows_path="$new_path"
16288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16289    unix_path=`$CYGPATH -u "$windows_path"`
16290    new_path="$unix_path"
16291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16293    new_path="$unix_path"
16294  fi
16295
16296  if test "x$path" != "x$new_path"; then
16297    JT_HOME="$new_path"
16298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16299$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16300  fi
16301
16302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16304
16305  else
16306    # We're on a posix platform. Hooray! :)
16307    path="$JT_HOME"
16308    has_space=`$ECHO "$path" | $GREP " "`
16309    if test "x$has_space" != x; then
16310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16311$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16312      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16313    fi
16314
16315    # Use eval to expand a potential ~
16316    eval path="$path"
16317    if test ! -f "$path" && test ! -d "$path"; then
16318      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16319    fi
16320
16321    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16322  fi
16323
16324
16325      # jtreg win32 script works for everybody
16326      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16327
16328      if test ! -f "$JTREGEXE"; then
16329        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16330      fi
16331
16332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16333$as_echo "$JTREGEXE" >&6; }
16334    else
16335      # try to find jtreg on path
16336
16337    for ac_prog in jtreg
16338do
16339  # Extract the first word of "$ac_prog", so it can be a program name with args.
16340set dummy $ac_prog; ac_word=$2
16341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16342$as_echo_n "checking for $ac_word... " >&6; }
16343if test "${ac_cv_path_JTREGEXE+set}" = set; then :
16344  $as_echo_n "(cached) " >&6
16345else
16346  case $JTREGEXE in
16347  [\\/]* | ?:[\\/]*)
16348  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16349  ;;
16350  *)
16351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16352for as_dir in $PATH
16353do
16354  IFS=$as_save_IFS
16355  test -z "$as_dir" && as_dir=.
16356    for ac_exec_ext in '' $ac_executable_extensions; do
16357  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16358    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16360    break 2
16361  fi
16362done
16363  done
16364IFS=$as_save_IFS
16365
16366  ;;
16367esac
16368fi
16369JTREGEXE=$ac_cv_path_JTREGEXE
16370if test -n "$JTREGEXE"; then
16371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16372$as_echo "$JTREGEXE" >&6; }
16373else
16374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16375$as_echo "no" >&6; }
16376fi
16377
16378
16379  test -n "$JTREGEXE" && break
16380done
16381
16382
16383    if test "x$JTREGEXE" = x; then
16384        if test "xjtreg" = x; then
16385          PROG_NAME=jtregexe
16386        else
16387          PROG_NAME=jtreg
16388        fi
16389        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16390$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16391        as_fn_error $? "Cannot continue" "$LINENO" 5
16392    fi
16393
16394
16395      JT_HOME="`$DIRNAME $JTREGEXE`"
16396    fi
16397  fi
16398
16399
16400
16401
16402
16403if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16404
16405  # Store path to cygwin link.exe to help excluding it when searching for
16406  # VS linker. This must be done before changing the PATH when looking for VS.
16407  # Extract the first word of "link", so it can be a program name with args.
16408set dummy link; ac_word=$2
16409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16410$as_echo_n "checking for $ac_word... " >&6; }
16411if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16412  $as_echo_n "(cached) " >&6
16413else
16414  case $CYGWIN_LINK in
16415  [\\/]* | ?:[\\/]*)
16416  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16417  ;;
16418  *)
16419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16420for as_dir in $PATH
16421do
16422  IFS=$as_save_IFS
16423  test -z "$as_dir" && as_dir=.
16424    for ac_exec_ext in '' $ac_executable_extensions; do
16425  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16426    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16428    break 2
16429  fi
16430done
16431  done
16432IFS=$as_save_IFS
16433
16434  ;;
16435esac
16436fi
16437CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16438if test -n "$CYGWIN_LINK"; then
16439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16440$as_echo "$CYGWIN_LINK" >&6; }
16441else
16442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16443$as_echo "no" >&6; }
16444fi
16445
16446
16447  if test "x$CYGWIN_LINK" != x; then
16448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16449$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16450    "$CYGWIN_LINK" --version > /dev/null
16451    if test $? -eq 0 ; then
16452      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16453$as_echo "yes" >&6; }
16454    else
16455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16456$as_echo "no" >&6; }
16457      # This might be the VS linker. Don't exclude it later on.
16458      CYGWIN_LINK=""
16459    fi
16460  fi
16461
16462  # First-hand choice is to locate and run the vsvars bat file.
16463
16464  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16465    VCVARSFILE="vc/bin/vcvars32.bat"
16466  else
16467    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16468  fi
16469
16470  VS_ENV_CMD=""
16471  VS_ENV_ARGS=""
16472  if test "x$with_toolsdir" != x; then
16473
16474  if test "x$VS_ENV_CMD" = x; then
16475    VS100BASE="$with_toolsdir/../.."
16476    METHOD="--with-tools-dir"
16477
16478  windows_path="$VS100BASE"
16479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16480    unix_path=`$CYGPATH -u "$windows_path"`
16481    VS100BASE="$unix_path"
16482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16484    VS100BASE="$unix_path"
16485  fi
16486
16487    if test -d "$VS100BASE"; then
16488      if test -f "$VS100BASE/$VCVARSFILE"; then
16489        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16490$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16491        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16492      else
16493        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16494$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16495        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16496$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16497      fi
16498    fi
16499  fi
16500
16501  fi
16502
16503  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16504    # Having specified an argument which is incorrect will produce an instant failure;
16505    # we should not go on looking
16506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16507$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16508    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16509$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16510    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16511  fi
16512
16513  if test "x$VS100COMNTOOLS" != x; then
16514
16515  if test "x$VS_ENV_CMD" = x; then
16516    VS100BASE="$VS100COMNTOOLS/../.."
16517    METHOD="VS100COMNTOOLS variable"
16518
16519  windows_path="$VS100BASE"
16520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16521    unix_path=`$CYGPATH -u "$windows_path"`
16522    VS100BASE="$unix_path"
16523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16525    VS100BASE="$unix_path"
16526  fi
16527
16528    if test -d "$VS100BASE"; then
16529      if test -f "$VS100BASE/$VCVARSFILE"; then
16530        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16531$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16532        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16533      else
16534        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16535$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16536        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16537$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16538      fi
16539    fi
16540  fi
16541
16542  fi
16543  if test "x$PROGRAMFILES" != x; then
16544
16545  if test "x$VS_ENV_CMD" = x; then
16546    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16547    METHOD="well-known name"
16548
16549  windows_path="$VS100BASE"
16550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16551    unix_path=`$CYGPATH -u "$windows_path"`
16552    VS100BASE="$unix_path"
16553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16555    VS100BASE="$unix_path"
16556  fi
16557
16558    if test -d "$VS100BASE"; then
16559      if test -f "$VS100BASE/$VCVARSFILE"; then
16560        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16561$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16562        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16563      else
16564        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16565$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16566        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16567$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16568      fi
16569    fi
16570  fi
16571
16572  fi
16573
16574  if test "x$VS_ENV_CMD" = x; then
16575    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16576    METHOD="well-known name"
16577
16578  windows_path="$VS100BASE"
16579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16580    unix_path=`$CYGPATH -u "$windows_path"`
16581    VS100BASE="$unix_path"
16582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16584    VS100BASE="$unix_path"
16585  fi
16586
16587    if test -d "$VS100BASE"; then
16588      if test -f "$VS100BASE/$VCVARSFILE"; then
16589        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16590$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16591        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16592      else
16593        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16594$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16595        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16596$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16597      fi
16598    fi
16599  fi
16600
16601
16602  if test "x$VS_ENV_CMD" = x; then
16603    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16604    METHOD="well-known name"
16605
16606  windows_path="$VS100BASE"
16607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16608    unix_path=`$CYGPATH -u "$windows_path"`
16609    VS100BASE="$unix_path"
16610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16612    VS100BASE="$unix_path"
16613  fi
16614
16615    if test -d "$VS100BASE"; then
16616      if test -f "$VS100BASE/$VCVARSFILE"; then
16617        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16618$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16619        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16620      else
16621        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16622$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16623        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16624$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16625      fi
16626    fi
16627  fi
16628
16629
16630  if test "x$ProgramW6432" != x; then
16631
16632  if test "x$VS_ENV_CMD" = x; then
16633    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16634    METHOD="well-known name"
16635
16636  windows_path="$WIN_SDK_BASE"
16637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16638    unix_path=`$CYGPATH -u "$windows_path"`
16639    WIN_SDK_BASE="$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    WIN_SDK_BASE="$unix_path"
16643  fi
16644
16645    if test -d "$WIN_SDK_BASE"; then
16646      # There have been cases of partial or broken SDK installations. A missing
16647      # lib dir is not going to work.
16648      if test ! -d "$WIN_SDK_BASE/../lib"; then
16649        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16650$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16651        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16652$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16653      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16654        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16655$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16656        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16657        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16658          VS_ENV_ARGS="/x86"
16659        else
16660          VS_ENV_ARGS="/x64"
16661        fi
16662      else
16663        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16664$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16665        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16666$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16667      fi
16668    fi
16669  fi
16670
16671  fi
16672  if test "x$PROGRAMW6432" != x; then
16673
16674  if test "x$VS_ENV_CMD" = x; then
16675    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16676    METHOD="well-known name"
16677
16678  windows_path="$WIN_SDK_BASE"
16679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16680    unix_path=`$CYGPATH -u "$windows_path"`
16681    WIN_SDK_BASE="$unix_path"
16682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16684    WIN_SDK_BASE="$unix_path"
16685  fi
16686
16687    if test -d "$WIN_SDK_BASE"; then
16688      # There have been cases of partial or broken SDK installations. A missing
16689      # lib dir is not going to work.
16690      if test ! -d "$WIN_SDK_BASE/../lib"; then
16691        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16692$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16693        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16694$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16695      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16696        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16697$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16698        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16699        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16700          VS_ENV_ARGS="/x86"
16701        else
16702          VS_ENV_ARGS="/x64"
16703        fi
16704      else
16705        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16706$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16707        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16708$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16709      fi
16710    fi
16711  fi
16712
16713  fi
16714  if test "x$PROGRAMFILES" != x; then
16715
16716  if test "x$VS_ENV_CMD" = x; then
16717    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16718    METHOD="well-known name"
16719
16720  windows_path="$WIN_SDK_BASE"
16721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16722    unix_path=`$CYGPATH -u "$windows_path"`
16723    WIN_SDK_BASE="$unix_path"
16724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16726    WIN_SDK_BASE="$unix_path"
16727  fi
16728
16729    if test -d "$WIN_SDK_BASE"; then
16730      # There have been cases of partial or broken SDK installations. A missing
16731      # lib dir is not going to work.
16732      if test ! -d "$WIN_SDK_BASE/../lib"; then
16733        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16734$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16735        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16736$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16737      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16738        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16739$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16740        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16741        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16742          VS_ENV_ARGS="/x86"
16743        else
16744          VS_ENV_ARGS="/x64"
16745        fi
16746      else
16747        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16748$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16749        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16750$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16751      fi
16752    fi
16753  fi
16754
16755  fi
16756
16757  if test "x$VS_ENV_CMD" = x; then
16758    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16759    METHOD="well-known name"
16760
16761  windows_path="$WIN_SDK_BASE"
16762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16763    unix_path=`$CYGPATH -u "$windows_path"`
16764    WIN_SDK_BASE="$unix_path"
16765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16767    WIN_SDK_BASE="$unix_path"
16768  fi
16769
16770    if test -d "$WIN_SDK_BASE"; then
16771      # There have been cases of partial or broken SDK installations. A missing
16772      # lib dir is not going to work.
16773      if test ! -d "$WIN_SDK_BASE/../lib"; then
16774        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16775$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16776        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16777$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16778      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16779        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16780$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16781        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16782        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16783          VS_ENV_ARGS="/x86"
16784        else
16785          VS_ENV_ARGS="/x64"
16786        fi
16787      else
16788        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16789$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16790        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16791$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16792      fi
16793    fi
16794  fi
16795
16796
16797  if test "x$VS_ENV_CMD" = x; then
16798    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16799    METHOD="well-known name"
16800
16801  windows_path="$WIN_SDK_BASE"
16802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16803    unix_path=`$CYGPATH -u "$windows_path"`
16804    WIN_SDK_BASE="$unix_path"
16805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16807    WIN_SDK_BASE="$unix_path"
16808  fi
16809
16810    if test -d "$WIN_SDK_BASE"; then
16811      # There have been cases of partial or broken SDK installations. A missing
16812      # lib dir is not going to work.
16813      if test ! -d "$WIN_SDK_BASE/../lib"; then
16814        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16815$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16816        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16817$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16818      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16819        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16820$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16821        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16822        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16823          VS_ENV_ARGS="/x86"
16824        else
16825          VS_ENV_ARGS="/x64"
16826        fi
16827      else
16828        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16829$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16830        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16831$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16832      fi
16833    fi
16834  fi
16835
16836
16837  if test "x$VS_ENV_CMD" != x; then
16838    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16839
16840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16841
16842  # First separate the path from the arguments. This will split at the first
16843  # space.
16844  complete="$VS_ENV_CMD"
16845  path="${complete%% *}"
16846  tmp="$complete EOL"
16847  arguments="${tmp#* }"
16848
16849  # Input might be given as Windows format, start by converting to
16850  # unix format.
16851  new_path=`$CYGPATH -u "$path"`
16852
16853  # Now try to locate executable using which
16854  new_path=`$WHICH "$new_path" 2> /dev/null`
16855  # bat and cmd files are not always considered executable in cygwin causing which
16856  # to not find them
16857  if test "x$new_path" = x \
16858           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16859           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16860    new_path=`$CYGPATH -u "$path"`
16861  fi
16862  if test "x$new_path" = x; then
16863    # Oops. Which didn't find the executable.
16864    # The splitting of arguments from the executable at a space might have been incorrect,
16865    # since paths with space are more likely in Windows. Give it another try with the whole
16866    # argument.
16867    path="$complete"
16868    arguments="EOL"
16869    new_path=`$CYGPATH -u "$path"`
16870    new_path=`$WHICH "$new_path" 2> /dev/null`
16871    # bat and cmd files are not always considered executable in cygwin causing which
16872    # to not find them
16873    if test "x$new_path" = x \
16874             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16875             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16876      new_path=`$CYGPATH -u "$path"`
16877    fi
16878    if test "x$new_path" = x; then
16879      # It's still not found. Now this is an unrecoverable error.
16880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16881$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16882      has_space=`$ECHO "$complete" | $GREP " "`
16883      if test "x$has_space" != x; then
16884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16886      fi
16887      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16888    fi
16889  fi
16890
16891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16894  # "foo.exe" is OK but "foo" is an error.
16895  #
16896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16897  # It is also a way to make sure we got the proper file name for the real test later on.
16898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16899  if test "x$test_shortpath" = x; then
16900    # Short path failed, file does not exist as specified.
16901    # Try adding .exe or .cmd
16902    if test -f "${new_path}.exe"; then
16903       input_to_shortpath="${new_path}.exe"
16904    elif test -f "${new_path}.cmd"; then
16905       input_to_shortpath="${new_path}.cmd"
16906    else
16907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16908$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16909      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16910$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16911      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16912    fi
16913  else
16914    input_to_shortpath="$new_path"
16915  fi
16916
16917  # Call helper function which possibly converts this using DOS-style short mode.
16918  # If so, the updated path is stored in $new_path.
16919  new_path="$input_to_shortpath"
16920
16921  input_path="$input_to_shortpath"
16922  # Check if we need to convert this using DOS-style short mode. If the path
16923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16924  # take no chances and rewrite it.
16925  # Note: m4 eats our [], so we need to use [ and ] instead.
16926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16927  if test "x$has_forbidden_chars" != x; then
16928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16932      # Going to short mode and back again did indeed matter. Since short mode is
16933      # case insensitive, let's make it lowercase to improve readability.
16934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16935      # Now convert it back to Unix-stile (cygpath)
16936      input_path=`$CYGPATH -u "$shortmode_path"`
16937      new_path="$input_path"
16938    fi
16939  fi
16940
16941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16942  if test "x$test_cygdrive_prefix" = x; then
16943    # As a simple fix, exclude /usr/bin since it's not a real path.
16944    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16946      # a path prefixed by /cygdrive for fixpath to work.
16947      new_path="$CYGWIN_ROOT_PATH$input_path"
16948    fi
16949  fi
16950
16951  # remove trailing .exe if any
16952  new_path="${new_path/%.exe/}"
16953
16954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16955
16956  # First separate the path from the arguments. This will split at the first
16957  # space.
16958  complete="$VS_ENV_CMD"
16959  path="${complete%% *}"
16960  tmp="$complete EOL"
16961  arguments="${tmp#* }"
16962
16963  # Input might be given as Windows format, start by converting to
16964  # unix format.
16965  new_path="$path"
16966
16967  windows_path="$new_path"
16968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16969    unix_path=`$CYGPATH -u "$windows_path"`
16970    new_path="$unix_path"
16971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16973    new_path="$unix_path"
16974  fi
16975
16976
16977  # Now try to locate executable using which
16978  new_path=`$WHICH "$new_path" 2> /dev/null`
16979
16980  if test "x$new_path" = x; then
16981    # Oops. Which didn't find the executable.
16982    # The splitting of arguments from the executable at a space might have been incorrect,
16983    # since paths with space are more likely in Windows. Give it another try with the whole
16984    # argument.
16985    path="$complete"
16986    arguments="EOL"
16987    new_path="$path"
16988
16989  windows_path="$new_path"
16990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16991    unix_path=`$CYGPATH -u "$windows_path"`
16992    new_path="$unix_path"
16993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16995    new_path="$unix_path"
16996  fi
16997
16998
16999    new_path=`$WHICH "$new_path" 2> /dev/null`
17000
17001    if test "x$new_path" = x; then
17002      # It's still not found. Now this is an unrecoverable error.
17003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17004$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17005      has_space=`$ECHO "$complete" | $GREP " "`
17006      if test "x$has_space" != x; then
17007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17009      fi
17010      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17011    fi
17012  fi
17013
17014  # Now new_path has a complete unix path to the binary
17015  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17016    # Keep paths in /bin as-is, but remove trailing .exe if any
17017    new_path="${new_path/%.exe/}"
17018    # Do not save /bin paths to all_fixpath_prefixes!
17019  else
17020    # Not in mixed or Windows style, start by that.
17021    new_path=`cmd //c echo $new_path`
17022
17023  input_path="$new_path"
17024  # Check if we need to convert this using DOS-style short mode. If the path
17025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17026  # take no chances and rewrite it.
17027  # Note: m4 eats our [], so we need to use [ and ] instead.
17028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17029  if test "x$has_forbidden_chars" != x; then
17030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17032  fi
17033
17034    # Output is in $new_path
17035
17036  windows_path="$new_path"
17037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17038    unix_path=`$CYGPATH -u "$windows_path"`
17039    new_path="$unix_path"
17040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17042    new_path="$unix_path"
17043  fi
17044
17045    # remove trailing .exe if any
17046    new_path="${new_path/%.exe/}"
17047
17048    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17049    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17050  fi
17051
17052  else
17053    # We're on a posix platform. Hooray! :)
17054    # First separate the path from the arguments. This will split at the first
17055    # space.
17056    complete="$VS_ENV_CMD"
17057    path="${complete%% *}"
17058    tmp="$complete EOL"
17059    arguments="${tmp#* }"
17060
17061    # Cannot rely on the command "which" here since it doesn't always work.
17062    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17063    if test -z "$is_absolute_path"; then
17064      # Path to executable is not absolute. Find it.
17065      IFS_save="$IFS"
17066      IFS=:
17067      for p in $PATH; do
17068        if test -f "$p/$path" && test -x "$p/$path"; then
17069          new_path="$p/$path"
17070          break
17071        fi
17072      done
17073      IFS="$IFS_save"
17074    else
17075      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17076$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17077      new_path="$path"
17078    fi
17079
17080    if test "x$new_path" = x; then
17081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17082$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17083        has_space=`$ECHO "$complete" | $GREP " "`
17084        if test "x$has_space" != x; then
17085          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17086$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17087        fi
17088        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17089      fi
17090  fi
17091
17092      # Now join together the path and the arguments once again
17093      if test "x$arguments" != xEOL; then
17094        new_complete="$new_path ${arguments% *}"
17095      else
17096        new_complete="$new_path"
17097      fi
17098
17099  if test "x$complete" != "x$new_complete"; then
17100      VS_ENV_CMD="$new_complete"
17101      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17102$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17103    fi
17104
17105
17106    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17107    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17108$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17109    cd $OUTPUT_ROOT
17110    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17111    # to autoconf standards.
17112
17113    #----
17114
17115    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17116    # but calculate the difference in Cygwin environment before/after running it and then
17117    # apply the diff.
17118
17119    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17120      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17121      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17122      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17123    else
17124      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17125      _dosbash=`cmd //c echo \`which bash\``
17126    fi
17127
17128    # generate the set of exported vars before/after the vs10 setup
17129    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17130    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17131    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17132    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17133
17134    # Now execute the newly created bat file.
17135    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17136    cmd /c localdevenvtmp.bat | cat
17137
17138    # apply the diff (less some non-vs10 vars named by "!")
17139    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17140    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17141    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17142
17143    # cleanup
17144    $RM localdevenvtmp*
17145    #----
17146    cd $CURDIR
17147    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17148      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17149$as_echo "no" >&6; }
17150      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17151$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17152      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17153$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17154      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17155$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17156      as_fn_error $? "Cannot continue" "$LINENO" 5
17157    fi
17158
17159    # Now set all paths and other env variables. This will allow the rest of
17160    # the configure script to find and run the compiler in the proper way.
17161    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17162$as_echo "$as_me: Setting extracted environment variables" >&6;}
17163    . $OUTPUT_ROOT/localdevenv.sh
17164  else
17165    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17166    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17167$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17168  fi
17169
17170  # At this point, we should have corrent variables in the environment, or we can't continue.
17171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17172$as_echo_n "checking for Visual Studio variables... " >&6; }
17173
17174  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17175    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17177$as_echo "present but broken" >&6; }
17178      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17179    else
17180      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17181$as_echo "ok" >&6; }
17182      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17183      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17184      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17185      VS_PATH="$PATH"
17186
17187
17188
17189    fi
17190  else
17191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17192$as_echo "not found" >&6; }
17193
17194    if test "x$VS_ENV_CMD" = x; then
17195      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17196$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17197      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17198$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17199    else
17200      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17201$as_echo "$as_me: Running the extraction script failed." >&6;}
17202    fi
17203    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17204$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17205    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17206$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17207    as_fn_error $? "Cannot continue" "$LINENO" 5
17208  fi
17209
17210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17211$as_echo_n "checking for msvcr100.dll... " >&6; }
17212
17213# Check whether --with-msvcr-dll was given.
17214if test "${with_msvcr_dll+set}" = set; then :
17215  withval=$with_msvcr_dll;
17216fi
17217
17218  if test "x$with_msvcr_dll" != x; then
17219    MSVCR_DLL="$with_msvcr_dll"
17220  else
17221    if test "x$VCINSTALLDIR" != x; then
17222      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17223        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17224      else
17225        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17226        if test "x$MSVCR_DLL" = x; then
17227          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17228        fi
17229      fi
17230      if test "x$MSVCR_DLL" != x; then
17231        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17232$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17233      else
17234        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17235$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17236      fi
17237    fi
17238    # Try some fallback alternatives
17239    if test "x$MSVCR_DLL" = x; then
17240      # If visual studio express is installed, there is usually one with the debugger
17241      if test "x$VS100COMNTOOLS" != x; then
17242        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17243          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17244          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17245$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17246        fi
17247      fi
17248    fi
17249    if test "x$MSVCR_DLL" = x; then
17250      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17251        # Fallback for 32bit builds, look in the windows directory.
17252        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17253          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17254$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17255          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17256        fi
17257      fi
17258    fi
17259  fi
17260  if test "x$MSVCR_DLL" = x; then
17261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17262$as_echo "no" >&6; }
17263    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17264  fi
17265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17266$as_echo "$MSVCR_DLL" >&6; }
17267
17268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17269
17270  # Input might be given as Windows format, start by converting to
17271  # unix format.
17272  path="$MSVCR_DLL"
17273  new_path=`$CYGPATH -u "$path"`
17274
17275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17278  # "foo.exe" is OK but "foo" is an error.
17279  #
17280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17281  # It is also a way to make sure we got the proper file name for the real test later on.
17282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17283  if test "x$test_shortpath" = x; then
17284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17285$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17286    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17287  fi
17288
17289  # Call helper function which possibly converts this using DOS-style short mode.
17290  # If so, the updated path is stored in $new_path.
17291
17292  input_path="$new_path"
17293  # Check if we need to convert this using DOS-style short mode. If the path
17294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17295  # take no chances and rewrite it.
17296  # Note: m4 eats our [], so we need to use [ and ] instead.
17297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17298  if test "x$has_forbidden_chars" != x; then
17299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17303      # Going to short mode and back again did indeed matter. Since short mode is
17304      # case insensitive, let's make it lowercase to improve readability.
17305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17306      # Now convert it back to Unix-stile (cygpath)
17307      input_path=`$CYGPATH -u "$shortmode_path"`
17308      new_path="$input_path"
17309    fi
17310  fi
17311
17312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17313  if test "x$test_cygdrive_prefix" = x; then
17314    # As a simple fix, exclude /usr/bin since it's not a real path.
17315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17317      # a path prefixed by /cygdrive for fixpath to work.
17318      new_path="$CYGWIN_ROOT_PATH$input_path"
17319    fi
17320  fi
17321
17322
17323  if test "x$path" != "x$new_path"; then
17324    MSVCR_DLL="$new_path"
17325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17326$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17327  fi
17328
17329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17330
17331  path="$MSVCR_DLL"
17332  has_colon=`$ECHO $path | $GREP ^.:`
17333  new_path="$path"
17334  if test "x$has_colon" = x; then
17335    # Not in mixed or Windows style, start by that.
17336    new_path=`cmd //c echo $path`
17337  fi
17338
17339
17340  input_path="$new_path"
17341  # Check if we need to convert this using DOS-style short mode. If the path
17342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17343  # take no chances and rewrite it.
17344  # Note: m4 eats our [], so we need to use [ and ] instead.
17345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17346  if test "x$has_forbidden_chars" != x; then
17347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17349  fi
17350
17351
17352  windows_path="$new_path"
17353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17354    unix_path=`$CYGPATH -u "$windows_path"`
17355    new_path="$unix_path"
17356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17358    new_path="$unix_path"
17359  fi
17360
17361  if test "x$path" != "x$new_path"; then
17362    MSVCR_DLL="$new_path"
17363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17364$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17365  fi
17366
17367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17369
17370  else
17371    # We're on a posix platform. Hooray! :)
17372    path="$MSVCR_DLL"
17373    has_space=`$ECHO "$path" | $GREP " "`
17374    if test "x$has_space" != x; then
17375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17376$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17377      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17378    fi
17379
17380    # Use eval to expand a potential ~
17381    eval path="$path"
17382    if test ! -f "$path" && test ! -d "$path"; then
17383      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17384    fi
17385
17386    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17387  fi
17388
17389
17390
17391
17392# Check whether --with-dxsdk was given.
17393if test "${with_dxsdk+set}" = set; then :
17394  withval=$with_dxsdk;
17395fi
17396
17397
17398# Check whether --with-dxsdk-lib was given.
17399if test "${with_dxsdk_lib+set}" = set; then :
17400  withval=$with_dxsdk_lib;
17401fi
17402
17403
17404# Check whether --with-dxsdk-include was given.
17405if test "${with_dxsdk_include+set}" = set; then :
17406  withval=$with_dxsdk_include;
17407fi
17408
17409
17410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17411$as_echo_n "checking for DirectX SDK... " >&6; }
17412
17413  if test "x$with_dxsdk" != x; then
17414    dxsdk_path="$with_dxsdk"
17415  elif test "x$DXSDK_DIR" != x; then
17416    dxsdk_path="$DXSDK_DIR"
17417  elif test -d "C:/DXSDK"; then
17418    dxsdk_path="C:/DXSDK"
17419  else
17420    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17421  fi
17422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17423$as_echo "$dxsdk_path" >&6; }
17424
17425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17426
17427  # Input might be given as Windows format, start by converting to
17428  # unix format.
17429  path="$dxsdk_path"
17430  new_path=`$CYGPATH -u "$path"`
17431
17432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17435  # "foo.exe" is OK but "foo" is an error.
17436  #
17437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17438  # It is also a way to make sure we got the proper file name for the real test later on.
17439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17440  if test "x$test_shortpath" = x; then
17441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17442$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17443    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17444  fi
17445
17446  # Call helper function which possibly converts this using DOS-style short mode.
17447  # If so, the updated path is stored in $new_path.
17448
17449  input_path="$new_path"
17450  # Check if we need to convert this using DOS-style short mode. If the path
17451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17452  # take no chances and rewrite it.
17453  # Note: m4 eats our [], so we need to use [ and ] instead.
17454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17455  if test "x$has_forbidden_chars" != x; then
17456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17460      # Going to short mode and back again did indeed matter. Since short mode is
17461      # case insensitive, let's make it lowercase to improve readability.
17462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17463      # Now convert it back to Unix-stile (cygpath)
17464      input_path=`$CYGPATH -u "$shortmode_path"`
17465      new_path="$input_path"
17466    fi
17467  fi
17468
17469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17470  if test "x$test_cygdrive_prefix" = x; then
17471    # As a simple fix, exclude /usr/bin since it's not a real path.
17472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17474      # a path prefixed by /cygdrive for fixpath to work.
17475      new_path="$CYGWIN_ROOT_PATH$input_path"
17476    fi
17477  fi
17478
17479
17480  if test "x$path" != "x$new_path"; then
17481    dxsdk_path="$new_path"
17482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17483$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17484  fi
17485
17486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17487
17488  path="$dxsdk_path"
17489  has_colon=`$ECHO $path | $GREP ^.:`
17490  new_path="$path"
17491  if test "x$has_colon" = x; then
17492    # Not in mixed or Windows style, start by that.
17493    new_path=`cmd //c echo $path`
17494  fi
17495
17496
17497  input_path="$new_path"
17498  # Check if we need to convert this using DOS-style short mode. If the path
17499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17500  # take no chances and rewrite it.
17501  # Note: m4 eats our [], so we need to use [ and ] instead.
17502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17503  if test "x$has_forbidden_chars" != x; then
17504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17506  fi
17507
17508
17509  windows_path="$new_path"
17510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17511    unix_path=`$CYGPATH -u "$windows_path"`
17512    new_path="$unix_path"
17513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17515    new_path="$unix_path"
17516  fi
17517
17518  if test "x$path" != "x$new_path"; then
17519    dxsdk_path="$new_path"
17520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17521$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17522  fi
17523
17524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17526
17527  else
17528    # We're on a posix platform. Hooray! :)
17529    path="$dxsdk_path"
17530    has_space=`$ECHO "$path" | $GREP " "`
17531    if test "x$has_space" != x; then
17532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17533$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17534      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17535    fi
17536
17537    # Use eval to expand a potential ~
17538    eval path="$path"
17539    if test ! -f "$path" && test ! -d "$path"; then
17540      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17541    fi
17542
17543    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17544  fi
17545
17546
17547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17548$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17549  if test "x$with_dxsdk_lib" != x; then
17550    DXSDK_LIB_PATH="$with_dxsdk_lib"
17551  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17552    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17553  else
17554    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17555  fi
17556  # dsound.lib is linked to in jsoundds
17557  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17558    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17559  fi
17560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17561$as_echo "$DXSDK_LIB_PATH" >&6; }
17562
17563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17564
17565  # Input might be given as Windows format, start by converting to
17566  # unix format.
17567  path="$DXSDK_LIB_PATH"
17568  new_path=`$CYGPATH -u "$path"`
17569
17570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17573  # "foo.exe" is OK but "foo" is an error.
17574  #
17575  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17576  # It is also a way to make sure we got the proper file name for the real test later on.
17577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17578  if test "x$test_shortpath" = x; then
17579    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17580$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17581    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17582  fi
17583
17584  # Call helper function which possibly converts this using DOS-style short mode.
17585  # If so, the updated path is stored in $new_path.
17586
17587  input_path="$new_path"
17588  # Check if we need to convert this using DOS-style short mode. If the path
17589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17590  # take no chances and rewrite it.
17591  # Note: m4 eats our [], so we need to use [ and ] instead.
17592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17593  if test "x$has_forbidden_chars" != x; then
17594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17598      # Going to short mode and back again did indeed matter. Since short mode is
17599      # case insensitive, let's make it lowercase to improve readability.
17600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17601      # Now convert it back to Unix-stile (cygpath)
17602      input_path=`$CYGPATH -u "$shortmode_path"`
17603      new_path="$input_path"
17604    fi
17605  fi
17606
17607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17608  if test "x$test_cygdrive_prefix" = x; then
17609    # As a simple fix, exclude /usr/bin since it's not a real path.
17610    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17612      # a path prefixed by /cygdrive for fixpath to work.
17613      new_path="$CYGWIN_ROOT_PATH$input_path"
17614    fi
17615  fi
17616
17617
17618  if test "x$path" != "x$new_path"; then
17619    DXSDK_LIB_PATH="$new_path"
17620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17621$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17622  fi
17623
17624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17625
17626  path="$DXSDK_LIB_PATH"
17627  has_colon=`$ECHO $path | $GREP ^.:`
17628  new_path="$path"
17629  if test "x$has_colon" = x; then
17630    # Not in mixed or Windows style, start by that.
17631    new_path=`cmd //c echo $path`
17632  fi
17633
17634
17635  input_path="$new_path"
17636  # Check if we need to convert this using DOS-style short mode. If the path
17637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17638  # take no chances and rewrite it.
17639  # Note: m4 eats our [], so we need to use [ and ] instead.
17640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17641  if test "x$has_forbidden_chars" != x; then
17642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17643    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17644  fi
17645
17646
17647  windows_path="$new_path"
17648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17649    unix_path=`$CYGPATH -u "$windows_path"`
17650    new_path="$unix_path"
17651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17653    new_path="$unix_path"
17654  fi
17655
17656  if test "x$path" != "x$new_path"; then
17657    DXSDK_LIB_PATH="$new_path"
17658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17659$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17660  fi
17661
17662  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17663  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17664
17665  else
17666    # We're on a posix platform. Hooray! :)
17667    path="$DXSDK_LIB_PATH"
17668    has_space=`$ECHO "$path" | $GREP " "`
17669    if test "x$has_space" != x; then
17670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17671$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17672      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17673    fi
17674
17675    # Use eval to expand a potential ~
17676    eval path="$path"
17677    if test ! -f "$path" && test ! -d "$path"; then
17678      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17679    fi
17680
17681    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17682  fi
17683
17684
17685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17686$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17687  if test "x$with_dxsdk_include" != x; then
17688    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17689  else
17690    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17691  fi
17692  # dsound.h is included in jsoundds
17693  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17694    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17695  fi
17696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17697$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17698
17699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17700
17701  # Input might be given as Windows format, start by converting to
17702  # unix format.
17703  path="$DXSDK_INCLUDE_PATH"
17704  new_path=`$CYGPATH -u "$path"`
17705
17706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17709  # "foo.exe" is OK but "foo" is an error.
17710  #
17711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17712  # It is also a way to make sure we got the proper file name for the real test later on.
17713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17714  if test "x$test_shortpath" = x; then
17715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17716$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17717    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17718  fi
17719
17720  # Call helper function which possibly converts this using DOS-style short mode.
17721  # If so, the updated path is stored in $new_path.
17722
17723  input_path="$new_path"
17724  # Check if we need to convert this using DOS-style short mode. If the path
17725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17726  # take no chances and rewrite it.
17727  # Note: m4 eats our [], so we need to use [ and ] instead.
17728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17729  if test "x$has_forbidden_chars" != x; then
17730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17734      # Going to short mode and back again did indeed matter. Since short mode is
17735      # case insensitive, let's make it lowercase to improve readability.
17736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17737      # Now convert it back to Unix-stile (cygpath)
17738      input_path=`$CYGPATH -u "$shortmode_path"`
17739      new_path="$input_path"
17740    fi
17741  fi
17742
17743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17744  if test "x$test_cygdrive_prefix" = x; then
17745    # As a simple fix, exclude /usr/bin since it's not a real path.
17746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17748      # a path prefixed by /cygdrive for fixpath to work.
17749      new_path="$CYGWIN_ROOT_PATH$input_path"
17750    fi
17751  fi
17752
17753
17754  if test "x$path" != "x$new_path"; then
17755    DXSDK_INCLUDE_PATH="$new_path"
17756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17757$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17758  fi
17759
17760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17761
17762  path="$DXSDK_INCLUDE_PATH"
17763  has_colon=`$ECHO $path | $GREP ^.:`
17764  new_path="$path"
17765  if test "x$has_colon" = x; then
17766    # Not in mixed or Windows style, start by that.
17767    new_path=`cmd //c echo $path`
17768  fi
17769
17770
17771  input_path="$new_path"
17772  # Check if we need to convert this using DOS-style short mode. If the path
17773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17774  # take no chances and rewrite it.
17775  # Note: m4 eats our [], so we need to use [ and ] instead.
17776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17777  if test "x$has_forbidden_chars" != x; then
17778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17780  fi
17781
17782
17783  windows_path="$new_path"
17784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17785    unix_path=`$CYGPATH -u "$windows_path"`
17786    new_path="$unix_path"
17787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17789    new_path="$unix_path"
17790  fi
17791
17792  if test "x$path" != "x$new_path"; then
17793    DXSDK_INCLUDE_PATH="$new_path"
17794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17795$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17796  fi
17797
17798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17800
17801  else
17802    # We're on a posix platform. Hooray! :)
17803    path="$DXSDK_INCLUDE_PATH"
17804    has_space=`$ECHO "$path" | $GREP " "`
17805    if test "x$has_space" != x; then
17806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17807$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17808      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17809    fi
17810
17811    # Use eval to expand a potential ~
17812    eval path="$path"
17813    if test ! -f "$path" && test ! -d "$path"; then
17814      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17815    fi
17816
17817    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17818  fi
17819
17820
17821
17822
17823  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17824
17825fi
17826
17827
17828
17829# If --build AND --host is set, then the configure script will find any
17830# cross compilation tools in the PATH. Cross compilation tools
17831# follows the cross compilation standard where they are prefixed with ${host}.
17832# For example the binary i686-sun-solaris2.10-gcc
17833# will cross compile for i686-sun-solaris2.10
17834# If neither of build and host is not set, then build=host and the
17835# default compiler found in the path will be used.
17836# Setting only --host, does not seem to be really supported.
17837# Please set both --build and --host if you want to cross compile.
17838
17839if test "x$COMPILE_TYPE" = "xcross"; then
17840    # Now we to find a C/C++ compiler that can build executables for the build
17841    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17842    # once. Also, we need to do this before adding a tools dir to the path,
17843    # otherwise we might pick up cross-compilers which don't use standard naming.
17844    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17845    # to wait until they are properly discovered.
17846    for ac_prog in cl cc gcc
17847do
17848  # Extract the first word of "$ac_prog", so it can be a program name with args.
17849set dummy $ac_prog; ac_word=$2
17850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17851$as_echo_n "checking for $ac_word... " >&6; }
17852if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17853  $as_echo_n "(cached) " >&6
17854else
17855  case $BUILD_CC in
17856  [\\/]* | ?:[\\/]*)
17857  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17858  ;;
17859  *)
17860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17861for as_dir in $PATH
17862do
17863  IFS=$as_save_IFS
17864  test -z "$as_dir" && as_dir=.
17865    for ac_exec_ext in '' $ac_executable_extensions; do
17866  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17867    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17869    break 2
17870  fi
17871done
17872  done
17873IFS=$as_save_IFS
17874
17875  ;;
17876esac
17877fi
17878BUILD_CC=$ac_cv_path_BUILD_CC
17879if test -n "$BUILD_CC"; then
17880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17881$as_echo "$BUILD_CC" >&6; }
17882else
17883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17884$as_echo "no" >&6; }
17885fi
17886
17887
17888  test -n "$BUILD_CC" && break
17889done
17890
17891
17892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17893
17894  # First separate the path from the arguments. This will split at the first
17895  # space.
17896  complete="$BUILD_CC"
17897  path="${complete%% *}"
17898  tmp="$complete EOL"
17899  arguments="${tmp#* }"
17900
17901  # Input might be given as Windows format, start by converting to
17902  # unix format.
17903  new_path=`$CYGPATH -u "$path"`
17904
17905  # Now try to locate executable using which
17906  new_path=`$WHICH "$new_path" 2> /dev/null`
17907  # bat and cmd files are not always considered executable in cygwin causing which
17908  # to not find them
17909  if test "x$new_path" = x \
17910           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17911           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17912    new_path=`$CYGPATH -u "$path"`
17913  fi
17914  if test "x$new_path" = x; then
17915    # Oops. Which didn't find the executable.
17916    # The splitting of arguments from the executable at a space might have been incorrect,
17917    # since paths with space are more likely in Windows. Give it another try with the whole
17918    # argument.
17919    path="$complete"
17920    arguments="EOL"
17921    new_path=`$CYGPATH -u "$path"`
17922    new_path=`$WHICH "$new_path" 2> /dev/null`
17923    # bat and cmd files are not always considered executable in cygwin causing which
17924    # to not find them
17925    if test "x$new_path" = x \
17926             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17927             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17928      new_path=`$CYGPATH -u "$path"`
17929    fi
17930    if test "x$new_path" = x; then
17931      # It's still not found. Now this is an unrecoverable error.
17932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17933$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17934      has_space=`$ECHO "$complete" | $GREP " "`
17935      if test "x$has_space" != x; then
17936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17938      fi
17939      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17940    fi
17941  fi
17942
17943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17946  # "foo.exe" is OK but "foo" is an error.
17947  #
17948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17949  # It is also a way to make sure we got the proper file name for the real test later on.
17950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17951  if test "x$test_shortpath" = x; then
17952    # Short path failed, file does not exist as specified.
17953    # Try adding .exe or .cmd
17954    if test -f "${new_path}.exe"; then
17955       input_to_shortpath="${new_path}.exe"
17956    elif test -f "${new_path}.cmd"; then
17957       input_to_shortpath="${new_path}.cmd"
17958    else
17959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17960$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17961      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17962$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17963      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17964    fi
17965  else
17966    input_to_shortpath="$new_path"
17967  fi
17968
17969  # Call helper function which possibly converts this using DOS-style short mode.
17970  # If so, the updated path is stored in $new_path.
17971  new_path="$input_to_shortpath"
17972
17973  input_path="$input_to_shortpath"
17974  # Check if we need to convert this using DOS-style short mode. If the path
17975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17976  # take no chances and rewrite it.
17977  # Note: m4 eats our [], so we need to use [ and ] instead.
17978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17979  if test "x$has_forbidden_chars" != x; then
17980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17984      # Going to short mode and back again did indeed matter. Since short mode is
17985      # case insensitive, let's make it lowercase to improve readability.
17986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17987      # Now convert it back to Unix-stile (cygpath)
17988      input_path=`$CYGPATH -u "$shortmode_path"`
17989      new_path="$input_path"
17990    fi
17991  fi
17992
17993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17994  if test "x$test_cygdrive_prefix" = x; then
17995    # As a simple fix, exclude /usr/bin since it's not a real path.
17996    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17998      # a path prefixed by /cygdrive for fixpath to work.
17999      new_path="$CYGWIN_ROOT_PATH$input_path"
18000    fi
18001  fi
18002
18003  # remove trailing .exe if any
18004  new_path="${new_path/%.exe/}"
18005
18006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18007
18008  # First separate the path from the arguments. This will split at the first
18009  # space.
18010  complete="$BUILD_CC"
18011  path="${complete%% *}"
18012  tmp="$complete EOL"
18013  arguments="${tmp#* }"
18014
18015  # Input might be given as Windows format, start by converting to
18016  # unix format.
18017  new_path="$path"
18018
18019  windows_path="$new_path"
18020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18021    unix_path=`$CYGPATH -u "$windows_path"`
18022    new_path="$unix_path"
18023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18025    new_path="$unix_path"
18026  fi
18027
18028
18029  # Now try to locate executable using which
18030  new_path=`$WHICH "$new_path" 2> /dev/null`
18031
18032  if test "x$new_path" = x; then
18033    # Oops. Which didn't find the executable.
18034    # The splitting of arguments from the executable at a space might have been incorrect,
18035    # since paths with space are more likely in Windows. Give it another try with the whole
18036    # argument.
18037    path="$complete"
18038    arguments="EOL"
18039    new_path="$path"
18040
18041  windows_path="$new_path"
18042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18043    unix_path=`$CYGPATH -u "$windows_path"`
18044    new_path="$unix_path"
18045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18047    new_path="$unix_path"
18048  fi
18049
18050
18051    new_path=`$WHICH "$new_path" 2> /dev/null`
18052
18053    if test "x$new_path" = x; then
18054      # It's still not found. Now this is an unrecoverable error.
18055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18056$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18057      has_space=`$ECHO "$complete" | $GREP " "`
18058      if test "x$has_space" != x; then
18059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18061      fi
18062      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18063    fi
18064  fi
18065
18066  # Now new_path has a complete unix path to the binary
18067  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18068    # Keep paths in /bin as-is, but remove trailing .exe if any
18069    new_path="${new_path/%.exe/}"
18070    # Do not save /bin paths to all_fixpath_prefixes!
18071  else
18072    # Not in mixed or Windows style, start by that.
18073    new_path=`cmd //c echo $new_path`
18074
18075  input_path="$new_path"
18076  # Check if we need to convert this using DOS-style short mode. If the path
18077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18078  # take no chances and rewrite it.
18079  # Note: m4 eats our [], so we need to use [ and ] instead.
18080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18081  if test "x$has_forbidden_chars" != x; then
18082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18084  fi
18085
18086    # Output is in $new_path
18087
18088  windows_path="$new_path"
18089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18090    unix_path=`$CYGPATH -u "$windows_path"`
18091    new_path="$unix_path"
18092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18094    new_path="$unix_path"
18095  fi
18096
18097    # remove trailing .exe if any
18098    new_path="${new_path/%.exe/}"
18099
18100    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18101    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18102  fi
18103
18104  else
18105    # We're on a posix platform. Hooray! :)
18106    # First separate the path from the arguments. This will split at the first
18107    # space.
18108    complete="$BUILD_CC"
18109    path="${complete%% *}"
18110    tmp="$complete EOL"
18111    arguments="${tmp#* }"
18112
18113    # Cannot rely on the command "which" here since it doesn't always work.
18114    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18115    if test -z "$is_absolute_path"; then
18116      # Path to executable is not absolute. Find it.
18117      IFS_save="$IFS"
18118      IFS=:
18119      for p in $PATH; do
18120        if test -f "$p/$path" && test -x "$p/$path"; then
18121          new_path="$p/$path"
18122          break
18123        fi
18124      done
18125      IFS="$IFS_save"
18126    else
18127      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18128$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18129      new_path="$path"
18130    fi
18131
18132    if test "x$new_path" = x; then
18133        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18134$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18135        has_space=`$ECHO "$complete" | $GREP " "`
18136        if test "x$has_space" != x; then
18137          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18138$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18139        fi
18140        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18141      fi
18142  fi
18143
18144      # Now join together the path and the arguments once again
18145      if test "x$arguments" != xEOL; then
18146        new_complete="$new_path ${arguments% *}"
18147      else
18148        new_complete="$new_path"
18149      fi
18150
18151  if test "x$complete" != "x$new_complete"; then
18152      BUILD_CC="$new_complete"
18153      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18154$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18155    fi
18156
18157    for ac_prog in cl CC g++
18158do
18159  # Extract the first word of "$ac_prog", so it can be a program name with args.
18160set dummy $ac_prog; ac_word=$2
18161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18162$as_echo_n "checking for $ac_word... " >&6; }
18163if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18164  $as_echo_n "(cached) " >&6
18165else
18166  case $BUILD_CXX in
18167  [\\/]* | ?:[\\/]*)
18168  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18169  ;;
18170  *)
18171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18172for as_dir in $PATH
18173do
18174  IFS=$as_save_IFS
18175  test -z "$as_dir" && as_dir=.
18176    for ac_exec_ext in '' $ac_executable_extensions; do
18177  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18178    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18180    break 2
18181  fi
18182done
18183  done
18184IFS=$as_save_IFS
18185
18186  ;;
18187esac
18188fi
18189BUILD_CXX=$ac_cv_path_BUILD_CXX
18190if test -n "$BUILD_CXX"; then
18191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18192$as_echo "$BUILD_CXX" >&6; }
18193else
18194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18195$as_echo "no" >&6; }
18196fi
18197
18198
18199  test -n "$BUILD_CXX" && break
18200done
18201
18202
18203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18204
18205  # First separate the path from the arguments. This will split at the first
18206  # space.
18207  complete="$BUILD_CXX"
18208  path="${complete%% *}"
18209  tmp="$complete EOL"
18210  arguments="${tmp#* }"
18211
18212  # Input might be given as Windows format, start by converting to
18213  # unix format.
18214  new_path=`$CYGPATH -u "$path"`
18215
18216  # Now try to locate executable using which
18217  new_path=`$WHICH "$new_path" 2> /dev/null`
18218  # bat and cmd files are not always considered executable in cygwin causing which
18219  # to not find them
18220  if test "x$new_path" = x \
18221           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18222           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18223    new_path=`$CYGPATH -u "$path"`
18224  fi
18225  if test "x$new_path" = x; then
18226    # Oops. Which didn't find the executable.
18227    # The splitting of arguments from the executable at a space might have been incorrect,
18228    # since paths with space are more likely in Windows. Give it another try with the whole
18229    # argument.
18230    path="$complete"
18231    arguments="EOL"
18232    new_path=`$CYGPATH -u "$path"`
18233    new_path=`$WHICH "$new_path" 2> /dev/null`
18234    # bat and cmd files are not always considered executable in cygwin causing which
18235    # to not find them
18236    if test "x$new_path" = x \
18237             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18238             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18239      new_path=`$CYGPATH -u "$path"`
18240    fi
18241    if test "x$new_path" = x; then
18242      # It's still not found. Now this is an unrecoverable error.
18243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18244$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18245      has_space=`$ECHO "$complete" | $GREP " "`
18246      if test "x$has_space" != x; then
18247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18249      fi
18250      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18251    fi
18252  fi
18253
18254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18257  # "foo.exe" is OK but "foo" is an error.
18258  #
18259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18260  # It is also a way to make sure we got the proper file name for the real test later on.
18261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18262  if test "x$test_shortpath" = x; then
18263    # Short path failed, file does not exist as specified.
18264    # Try adding .exe or .cmd
18265    if test -f "${new_path}.exe"; then
18266       input_to_shortpath="${new_path}.exe"
18267    elif test -f "${new_path}.cmd"; then
18268       input_to_shortpath="${new_path}.cmd"
18269    else
18270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18271$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18272      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18273$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18274      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18275    fi
18276  else
18277    input_to_shortpath="$new_path"
18278  fi
18279
18280  # Call helper function which possibly converts this using DOS-style short mode.
18281  # If so, the updated path is stored in $new_path.
18282  new_path="$input_to_shortpath"
18283
18284  input_path="$input_to_shortpath"
18285  # Check if we need to convert this using DOS-style short mode. If the path
18286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18287  # take no chances and rewrite it.
18288  # Note: m4 eats our [], so we need to use [ and ] instead.
18289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18290  if test "x$has_forbidden_chars" != x; then
18291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18295      # Going to short mode and back again did indeed matter. Since short mode is
18296      # case insensitive, let's make it lowercase to improve readability.
18297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18298      # Now convert it back to Unix-stile (cygpath)
18299      input_path=`$CYGPATH -u "$shortmode_path"`
18300      new_path="$input_path"
18301    fi
18302  fi
18303
18304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18305  if test "x$test_cygdrive_prefix" = x; then
18306    # As a simple fix, exclude /usr/bin since it's not a real path.
18307    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18309      # a path prefixed by /cygdrive for fixpath to work.
18310      new_path="$CYGWIN_ROOT_PATH$input_path"
18311    fi
18312  fi
18313
18314  # remove trailing .exe if any
18315  new_path="${new_path/%.exe/}"
18316
18317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18318
18319  # First separate the path from the arguments. This will split at the first
18320  # space.
18321  complete="$BUILD_CXX"
18322  path="${complete%% *}"
18323  tmp="$complete EOL"
18324  arguments="${tmp#* }"
18325
18326  # Input might be given as Windows format, start by converting to
18327  # unix format.
18328  new_path="$path"
18329
18330  windows_path="$new_path"
18331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18332    unix_path=`$CYGPATH -u "$windows_path"`
18333    new_path="$unix_path"
18334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18336    new_path="$unix_path"
18337  fi
18338
18339
18340  # Now try to locate executable using which
18341  new_path=`$WHICH "$new_path" 2> /dev/null`
18342
18343  if test "x$new_path" = x; then
18344    # Oops. Which didn't find the executable.
18345    # The splitting of arguments from the executable at a space might have been incorrect,
18346    # since paths with space are more likely in Windows. Give it another try with the whole
18347    # argument.
18348    path="$complete"
18349    arguments="EOL"
18350    new_path="$path"
18351
18352  windows_path="$new_path"
18353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18354    unix_path=`$CYGPATH -u "$windows_path"`
18355    new_path="$unix_path"
18356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18358    new_path="$unix_path"
18359  fi
18360
18361
18362    new_path=`$WHICH "$new_path" 2> /dev/null`
18363
18364    if test "x$new_path" = x; then
18365      # It's still not found. Now this is an unrecoverable error.
18366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18367$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18368      has_space=`$ECHO "$complete" | $GREP " "`
18369      if test "x$has_space" != x; then
18370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18372      fi
18373      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18374    fi
18375  fi
18376
18377  # Now new_path has a complete unix path to the binary
18378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18379    # Keep paths in /bin as-is, but remove trailing .exe if any
18380    new_path="${new_path/%.exe/}"
18381    # Do not save /bin paths to all_fixpath_prefixes!
18382  else
18383    # Not in mixed or Windows style, start by that.
18384    new_path=`cmd //c echo $new_path`
18385
18386  input_path="$new_path"
18387  # Check if we need to convert this using DOS-style short mode. If the path
18388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18389  # take no chances and rewrite it.
18390  # Note: m4 eats our [], so we need to use [ and ] instead.
18391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18392  if test "x$has_forbidden_chars" != x; then
18393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18395  fi
18396
18397    # Output is in $new_path
18398
18399  windows_path="$new_path"
18400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18401    unix_path=`$CYGPATH -u "$windows_path"`
18402    new_path="$unix_path"
18403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18405    new_path="$unix_path"
18406  fi
18407
18408    # remove trailing .exe if any
18409    new_path="${new_path/%.exe/}"
18410
18411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18413  fi
18414
18415  else
18416    # We're on a posix platform. Hooray! :)
18417    # First separate the path from the arguments. This will split at the first
18418    # space.
18419    complete="$BUILD_CXX"
18420    path="${complete%% *}"
18421    tmp="$complete EOL"
18422    arguments="${tmp#* }"
18423
18424    # Cannot rely on the command "which" here since it doesn't always work.
18425    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18426    if test -z "$is_absolute_path"; then
18427      # Path to executable is not absolute. Find it.
18428      IFS_save="$IFS"
18429      IFS=:
18430      for p in $PATH; do
18431        if test -f "$p/$path" && test -x "$p/$path"; then
18432          new_path="$p/$path"
18433          break
18434        fi
18435      done
18436      IFS="$IFS_save"
18437    else
18438      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18439$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18440      new_path="$path"
18441    fi
18442
18443    if test "x$new_path" = x; then
18444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18445$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18446        has_space=`$ECHO "$complete" | $GREP " "`
18447        if test "x$has_space" != x; then
18448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18450        fi
18451        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18452      fi
18453  fi
18454
18455      # Now join together the path and the arguments once again
18456      if test "x$arguments" != xEOL; then
18457        new_complete="$new_path ${arguments% *}"
18458      else
18459        new_complete="$new_path"
18460      fi
18461
18462  if test "x$complete" != "x$new_complete"; then
18463      BUILD_CXX="$new_complete"
18464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18465$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18466    fi
18467
18468    # Extract the first word of "ld", so it can be a program name with args.
18469set dummy ld; ac_word=$2
18470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18471$as_echo_n "checking for $ac_word... " >&6; }
18472if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18473  $as_echo_n "(cached) " >&6
18474else
18475  case $BUILD_LD in
18476  [\\/]* | ?:[\\/]*)
18477  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18478  ;;
18479  *)
18480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18481for as_dir in $PATH
18482do
18483  IFS=$as_save_IFS
18484  test -z "$as_dir" && as_dir=.
18485    for ac_exec_ext in '' $ac_executable_extensions; do
18486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18487    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18489    break 2
18490  fi
18491done
18492  done
18493IFS=$as_save_IFS
18494
18495  ;;
18496esac
18497fi
18498BUILD_LD=$ac_cv_path_BUILD_LD
18499if test -n "$BUILD_LD"; then
18500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18501$as_echo "$BUILD_LD" >&6; }
18502else
18503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18504$as_echo "no" >&6; }
18505fi
18506
18507
18508
18509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18510
18511  # First separate the path from the arguments. This will split at the first
18512  # space.
18513  complete="$BUILD_LD"
18514  path="${complete%% *}"
18515  tmp="$complete EOL"
18516  arguments="${tmp#* }"
18517
18518  # Input might be given as Windows format, start by converting to
18519  # unix format.
18520  new_path=`$CYGPATH -u "$path"`
18521
18522  # Now try to locate executable using which
18523  new_path=`$WHICH "$new_path" 2> /dev/null`
18524  # bat and cmd files are not always considered executable in cygwin causing which
18525  # to not find them
18526  if test "x$new_path" = x \
18527           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18528           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18529    new_path=`$CYGPATH -u "$path"`
18530  fi
18531  if test "x$new_path" = x; then
18532    # Oops. Which didn't find the executable.
18533    # The splitting of arguments from the executable at a space might have been incorrect,
18534    # since paths with space are more likely in Windows. Give it another try with the whole
18535    # argument.
18536    path="$complete"
18537    arguments="EOL"
18538    new_path=`$CYGPATH -u "$path"`
18539    new_path=`$WHICH "$new_path" 2> /dev/null`
18540    # bat and cmd files are not always considered executable in cygwin causing which
18541    # to not find them
18542    if test "x$new_path" = x \
18543             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18544             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18545      new_path=`$CYGPATH -u "$path"`
18546    fi
18547    if test "x$new_path" = x; then
18548      # It's still not found. Now this is an unrecoverable error.
18549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18550$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18551      has_space=`$ECHO "$complete" | $GREP " "`
18552      if test "x$has_space" != x; then
18553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18555      fi
18556      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18557    fi
18558  fi
18559
18560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18563  # "foo.exe" is OK but "foo" is an error.
18564  #
18565  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18566  # It is also a way to make sure we got the proper file name for the real test later on.
18567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18568  if test "x$test_shortpath" = x; then
18569    # Short path failed, file does not exist as specified.
18570    # Try adding .exe or .cmd
18571    if test -f "${new_path}.exe"; then
18572       input_to_shortpath="${new_path}.exe"
18573    elif test -f "${new_path}.cmd"; then
18574       input_to_shortpath="${new_path}.cmd"
18575    else
18576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18577$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18578      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18579$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18580      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18581    fi
18582  else
18583    input_to_shortpath="$new_path"
18584  fi
18585
18586  # Call helper function which possibly converts this using DOS-style short mode.
18587  # If so, the updated path is stored in $new_path.
18588  new_path="$input_to_shortpath"
18589
18590  input_path="$input_to_shortpath"
18591  # Check if we need to convert this using DOS-style short mode. If the path
18592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18593  # take no chances and rewrite it.
18594  # Note: m4 eats our [], so we need to use [ and ] instead.
18595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18596  if test "x$has_forbidden_chars" != x; then
18597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18601      # Going to short mode and back again did indeed matter. Since short mode is
18602      # case insensitive, let's make it lowercase to improve readability.
18603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18604      # Now convert it back to Unix-stile (cygpath)
18605      input_path=`$CYGPATH -u "$shortmode_path"`
18606      new_path="$input_path"
18607    fi
18608  fi
18609
18610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18611  if test "x$test_cygdrive_prefix" = x; then
18612    # As a simple fix, exclude /usr/bin since it's not a real path.
18613    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18615      # a path prefixed by /cygdrive for fixpath to work.
18616      new_path="$CYGWIN_ROOT_PATH$input_path"
18617    fi
18618  fi
18619
18620  # remove trailing .exe if any
18621  new_path="${new_path/%.exe/}"
18622
18623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18624
18625  # First separate the path from the arguments. This will split at the first
18626  # space.
18627  complete="$BUILD_LD"
18628  path="${complete%% *}"
18629  tmp="$complete EOL"
18630  arguments="${tmp#* }"
18631
18632  # Input might be given as Windows format, start by converting to
18633  # unix format.
18634  new_path="$path"
18635
18636  windows_path="$new_path"
18637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18638    unix_path=`$CYGPATH -u "$windows_path"`
18639    new_path="$unix_path"
18640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18642    new_path="$unix_path"
18643  fi
18644
18645
18646  # Now try to locate executable using which
18647  new_path=`$WHICH "$new_path" 2> /dev/null`
18648
18649  if test "x$new_path" = x; then
18650    # Oops. Which didn't find the executable.
18651    # The splitting of arguments from the executable at a space might have been incorrect,
18652    # since paths with space are more likely in Windows. Give it another try with the whole
18653    # argument.
18654    path="$complete"
18655    arguments="EOL"
18656    new_path="$path"
18657
18658  windows_path="$new_path"
18659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18660    unix_path=`$CYGPATH -u "$windows_path"`
18661    new_path="$unix_path"
18662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18664    new_path="$unix_path"
18665  fi
18666
18667
18668    new_path=`$WHICH "$new_path" 2> /dev/null`
18669
18670    if test "x$new_path" = x; then
18671      # It's still not found. Now this is an unrecoverable error.
18672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18673$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18674      has_space=`$ECHO "$complete" | $GREP " "`
18675      if test "x$has_space" != x; then
18676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18678      fi
18679      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18680    fi
18681  fi
18682
18683  # Now new_path has a complete unix path to the binary
18684  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18685    # Keep paths in /bin as-is, but remove trailing .exe if any
18686    new_path="${new_path/%.exe/}"
18687    # Do not save /bin paths to all_fixpath_prefixes!
18688  else
18689    # Not in mixed or Windows style, start by that.
18690    new_path=`cmd //c echo $new_path`
18691
18692  input_path="$new_path"
18693  # Check if we need to convert this using DOS-style short mode. If the path
18694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18695  # take no chances and rewrite it.
18696  # Note: m4 eats our [], so we need to use [ and ] instead.
18697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18698  if test "x$has_forbidden_chars" != x; then
18699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18701  fi
18702
18703    # Output is in $new_path
18704
18705  windows_path="$new_path"
18706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18707    unix_path=`$CYGPATH -u "$windows_path"`
18708    new_path="$unix_path"
18709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18711    new_path="$unix_path"
18712  fi
18713
18714    # remove trailing .exe if any
18715    new_path="${new_path/%.exe/}"
18716
18717    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18718    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18719  fi
18720
18721  else
18722    # We're on a posix platform. Hooray! :)
18723    # First separate the path from the arguments. This will split at the first
18724    # space.
18725    complete="$BUILD_LD"
18726    path="${complete%% *}"
18727    tmp="$complete EOL"
18728    arguments="${tmp#* }"
18729
18730    # Cannot rely on the command "which" here since it doesn't always work.
18731    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18732    if test -z "$is_absolute_path"; then
18733      # Path to executable is not absolute. Find it.
18734      IFS_save="$IFS"
18735      IFS=:
18736      for p in $PATH; do
18737        if test -f "$p/$path" && test -x "$p/$path"; then
18738          new_path="$p/$path"
18739          break
18740        fi
18741      done
18742      IFS="$IFS_save"
18743    else
18744      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18745$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18746      new_path="$path"
18747    fi
18748
18749    if test "x$new_path" = x; then
18750        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18751$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18752        has_space=`$ECHO "$complete" | $GREP " "`
18753        if test "x$has_space" != x; then
18754          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18755$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18756        fi
18757        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18758      fi
18759  fi
18760
18761      # Now join together the path and the arguments once again
18762      if test "x$arguments" != xEOL; then
18763        new_complete="$new_path ${arguments% *}"
18764      else
18765        new_complete="$new_path"
18766      fi
18767
18768  if test "x$complete" != "x$new_complete"; then
18769      BUILD_LD="$new_complete"
18770      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18771$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18772    fi
18773
18774fi
18775
18776
18777
18778
18779# If a devkit is found on the builddeps server, then prepend its path to the
18780# PATH variable. If there are cross compilers available in the devkit, these
18781# will be found by AC_PROG_CC et al.
18782DEVKIT=
18783
18784
18785    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18786        # Source the builddeps file again, to make sure it uses the latest variables!
18787        . $builddepsfile
18788        # Look for a target and build machine specific resource!
18789        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18790        if test "x$resource" = x; then
18791            # Ok, lets instead look for a target specific resource
18792            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18793        fi
18794        if test "x$resource" = x; then
18795            # Ok, lets instead look for a build specific resource
18796            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18797        fi
18798        if test "x$resource" = x; then
18799            # Ok, lets instead look for a generic resource
18800            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18801            resource=${builddep_devkit}
18802        fi
18803        if test "x$resource" != x; then
18804            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18805$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18806	    # If the resource in the builddeps.conf file is an existing directory,
18807	    # for example /java/linux/cups
18808	    if test -d ${resource}; then
18809	       depdir=${resource}
18810	    else
18811
18812# devkit is for example mymodule
18813# $resource is for example libs/general/libmymod_1_2_3.zip
18814# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18815# $with_builddeps_dir is for example /localhome/builddeps
18816# depdir is the name of the variable into which we store the depdir, eg MYMOD
18817# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18818# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18819    filename=`basename $resource`
18820    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18821    filebase=${filename%%.*}
18822    extension=${filename#*.}
18823    installdir=$with_builddeps_dir/$filebase
18824    if test ! -f $installdir/$filename.unpacked; then
18825        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18826$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18827        if test ! -d $installdir; then
18828            mkdir -p $installdir
18829        fi
18830        if test ! -d $installdir; then
18831            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18832        fi
18833        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18834        touch $tmpfile
18835        if test ! -f $tmpfile; then
18836            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18837        fi
18838
18839    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18840    # $tmpfile is the local file name for the downloaded file.
18841    VALID_TOOL=no
18842    if test "x$BDEPS_FTP" = xwget; then
18843       VALID_TOOL=yes
18844       wget -O $tmpfile $with_builddeps_server/$resource
18845    fi
18846    if test "x$BDEPS_FTP" = xlftp; then
18847       VALID_TOOL=yes
18848       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18849    fi
18850    if test "x$BDEPS_FTP" = xftp; then
18851        VALID_TOOL=yes
18852        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18853        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18854        FTPUSERPWD=${FTPSERVER%%@*}
18855        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18856            FTPUSER=${userpwd%%:*}
18857            FTPPWD=${userpwd#*@}
18858            FTPSERVER=${FTPSERVER#*@}
18859        else
18860            FTPUSER=ftp
18861            FTPPWD=ftp
18862        fi
18863        # the "pass" command does not work on some
18864        # ftp clients (read ftp.exe) but if it works,
18865        # passive mode is better!
18866        (\
18867            echo "user $FTPUSER $FTPPWD"        ;\
18868            echo "pass"                         ;\
18869            echo "bin"                          ;\
18870            echo "get $FTPPATH $tmpfile"              ;\
18871        ) | ftp -in $FTPSERVER
18872    fi
18873    if test "x$VALID_TOOL" != xyes; then
18874       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18875    fi
18876
18877        mv $tmpfile $installdir/$filename
18878        if test ! -s $installdir/$filename; then
18879            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18880        fi
18881        case "$extension" in
18882            zip)  echo "Unzipping $installdir/$filename..."
18883               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18884            ;;
18885            tar.gz) echo "Untaring $installdir/$filename..."
18886               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18887            ;;
18888            tgz) echo "Untaring $installdir/$filename..."
18889               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18890            ;;
18891            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18892            ;;
18893        esac
18894    fi
18895    if test -f $installdir/$filename.unpacked; then
18896        depdir=$installdir
18897    fi
18898
18899	    fi
18900            # Source the builddeps file again, because in the previous command, the depdir
18901            # was updated to point at the current build dependency install directory.
18902            . $builddepsfile
18903            # Now extract variables from the builddeps.conf files.
18904            theroot=${builddep_devkit_ROOT}
18905            thecflags=${builddep_devkit_CFLAGS}
18906            thelibs=${builddep_devkit_LIBS}
18907            if test "x$depdir" = x; then
18908                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18909            fi
18910            DEVKIT=$depdir
18911            if test "x$theroot" != x; then
18912               DEVKIT="$theroot"
18913            fi
18914            if test "x$thecflags" != x; then
18915               DEVKIT_CFLAGS="$thecflags"
18916            fi
18917            if test "x$thelibs" != x; then
18918               DEVKIT_LIBS="$thelibs"
18919            fi
18920            # Found devkit
18921                     PATH="$DEVKIT/bin:$PATH"
18922                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18923                     if test "x$x_includes" = "xNONE"; then
18924                         x_includes="$SYS_ROOT/usr/include/X11"
18925                     fi
18926                     if test "x$x_libraries" = "xNONE"; then
18927                         x_libraries="$SYS_ROOT/usr/lib"
18928                     fi
18929
18930
18931        fi
18932
18933    fi
18934
18935
18936if test "x$SYS_ROOT" != "x/" ; then
18937    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18938    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18939    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18940    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18941    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18942    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18943fi
18944
18945# Store the CFLAGS etal passed to the configure script.
18946ORG_CFLAGS="$CFLAGS"
18947ORG_CXXFLAGS="$CXXFLAGS"
18948ORG_OBJCFLAGS="$OBJCFLAGS"
18949
18950# autoconf magic only relies on PATH, so update it if tools dir is specified
18951OLD_PATH="$PATH"
18952if test "x$TOOLS_DIR" != x; then
18953  PATH=$TOOLS_DIR:$PATH
18954fi
18955
18956
18957### Locate C compiler (CC)
18958
18959# On windows, only cl.exe is supported.
18960# On Solaris, cc is preferred to gcc.
18961# Elsewhere, gcc is preferred to cc.
18962
18963if test "x$CC" != x; then
18964  COMPILER_CHECK_LIST="$CC"
18965elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18966  COMPILER_CHECK_LIST="cl"
18967elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18968  COMPILER_CHECK_LIST="cc gcc"
18969else
18970  COMPILER_CHECK_LIST="gcc cc"
18971fi
18972
18973
18974  COMPILER_NAME=C
18975
18976  CC=
18977  # If TOOLS_DIR is set, check for all compiler names in there first
18978  # before checking the rest of the PATH.
18979  if test -n "$TOOLS_DIR"; then
18980    PATH_save="$PATH"
18981    PATH="$TOOLS_DIR"
18982    for ac_prog in $COMPILER_CHECK_LIST
18983do
18984  # Extract the first word of "$ac_prog", so it can be a program name with args.
18985set dummy $ac_prog; ac_word=$2
18986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18987$as_echo_n "checking for $ac_word... " >&6; }
18988if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18989  $as_echo_n "(cached) " >&6
18990else
18991  case $TOOLS_DIR_CC in
18992  [\\/]* | ?:[\\/]*)
18993  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18994  ;;
18995  *)
18996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18997for as_dir in $PATH
18998do
18999  IFS=$as_save_IFS
19000  test -z "$as_dir" && as_dir=.
19001    for ac_exec_ext in '' $ac_executable_extensions; do
19002  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19003    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19005    break 2
19006  fi
19007done
19008  done
19009IFS=$as_save_IFS
19010
19011  ;;
19012esac
19013fi
19014TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19015if test -n "$TOOLS_DIR_CC"; then
19016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19017$as_echo "$TOOLS_DIR_CC" >&6; }
19018else
19019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19020$as_echo "no" >&6; }
19021fi
19022
19023
19024  test -n "$TOOLS_DIR_CC" && break
19025done
19026
19027    CC=$TOOLS_DIR_CC
19028    PATH="$PATH_save"
19029  fi
19030
19031  # AC_PATH_PROGS can't be run multiple times with the same variable,
19032  # so create a new name for this run.
19033  if test "x$CC" = x; then
19034    for ac_prog in $COMPILER_CHECK_LIST
19035do
19036  # Extract the first word of "$ac_prog", so it can be a program name with args.
19037set dummy $ac_prog; ac_word=$2
19038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19039$as_echo_n "checking for $ac_word... " >&6; }
19040if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
19041  $as_echo_n "(cached) " >&6
19042else
19043  case $POTENTIAL_CC in
19044  [\\/]* | ?:[\\/]*)
19045  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19046  ;;
19047  *)
19048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19049for as_dir in $PATH
19050do
19051  IFS=$as_save_IFS
19052  test -z "$as_dir" && as_dir=.
19053    for ac_exec_ext in '' $ac_executable_extensions; do
19054  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19055    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19057    break 2
19058  fi
19059done
19060  done
19061IFS=$as_save_IFS
19062
19063  ;;
19064esac
19065fi
19066POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19067if test -n "$POTENTIAL_CC"; then
19068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19069$as_echo "$POTENTIAL_CC" >&6; }
19070else
19071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19072$as_echo "no" >&6; }
19073fi
19074
19075
19076  test -n "$POTENTIAL_CC" && break
19077done
19078
19079    CC=$POTENTIAL_CC
19080  fi
19081
19082  if test "x$CC" = x; then
19083
19084    # Print a helpful message on how to acquire the necessary build dependency.
19085    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19086    MISSING_DEPENDENCY=devkit
19087    PKGHANDLER_COMMAND=
19088
19089    case $PKGHANDLER in
19090	apt-get)
19091                apt_help     $MISSING_DEPENDENCY ;;
19092    yum)
19093                yum_help     $MISSING_DEPENDENCY ;;
19094	port)
19095                port_help    $MISSING_DEPENDENCY ;;
19096	pkgutil)
19097                pkgutil_help $MISSING_DEPENDENCY ;;
19098	pkgadd)
19099                pkgadd_help  $MISSING_DEPENDENCY ;;
19100    * )
19101      break ;;
19102    esac
19103
19104    if test "x$PKGHANDLER_COMMAND" != x; then
19105        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19106    fi
19107
19108      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19109  fi
19110
19111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19112
19113  # First separate the path from the arguments. This will split at the first
19114  # space.
19115  complete="$CC"
19116  path="${complete%% *}"
19117  tmp="$complete EOL"
19118  arguments="${tmp#* }"
19119
19120  # Input might be given as Windows format, start by converting to
19121  # unix format.
19122  new_path=`$CYGPATH -u "$path"`
19123
19124  # Now try to locate executable using which
19125  new_path=`$WHICH "$new_path" 2> /dev/null`
19126  # bat and cmd files are not always considered executable in cygwin causing which
19127  # to not find them
19128  if test "x$new_path" = x \
19129           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19130           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19131    new_path=`$CYGPATH -u "$path"`
19132  fi
19133  if test "x$new_path" = x; then
19134    # Oops. Which didn't find the executable.
19135    # The splitting of arguments from the executable at a space might have been incorrect,
19136    # since paths with space are more likely in Windows. Give it another try with the whole
19137    # argument.
19138    path="$complete"
19139    arguments="EOL"
19140    new_path=`$CYGPATH -u "$path"`
19141    new_path=`$WHICH "$new_path" 2> /dev/null`
19142    # bat and cmd files are not always considered executable in cygwin causing which
19143    # to not find them
19144    if test "x$new_path" = x \
19145             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19146             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19147      new_path=`$CYGPATH -u "$path"`
19148    fi
19149    if test "x$new_path" = x; then
19150      # It's still not found. Now this is an unrecoverable error.
19151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19152$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19153      has_space=`$ECHO "$complete" | $GREP " "`
19154      if test "x$has_space" != x; then
19155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19157      fi
19158      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19159    fi
19160  fi
19161
19162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19165  # "foo.exe" is OK but "foo" is an error.
19166  #
19167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19168  # It is also a way to make sure we got the proper file name for the real test later on.
19169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19170  if test "x$test_shortpath" = x; then
19171    # Short path failed, file does not exist as specified.
19172    # Try adding .exe or .cmd
19173    if test -f "${new_path}.exe"; then
19174       input_to_shortpath="${new_path}.exe"
19175    elif test -f "${new_path}.cmd"; then
19176       input_to_shortpath="${new_path}.cmd"
19177    else
19178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19179$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19180      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19181$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19182      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19183    fi
19184  else
19185    input_to_shortpath="$new_path"
19186  fi
19187
19188  # Call helper function which possibly converts this using DOS-style short mode.
19189  # If so, the updated path is stored in $new_path.
19190  new_path="$input_to_shortpath"
19191
19192  input_path="$input_to_shortpath"
19193  # Check if we need to convert this using DOS-style short mode. If the path
19194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19195  # take no chances and rewrite it.
19196  # Note: m4 eats our [], so we need to use [ and ] instead.
19197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19198  if test "x$has_forbidden_chars" != x; then
19199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19203      # Going to short mode and back again did indeed matter. Since short mode is
19204      # case insensitive, let's make it lowercase to improve readability.
19205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19206      # Now convert it back to Unix-stile (cygpath)
19207      input_path=`$CYGPATH -u "$shortmode_path"`
19208      new_path="$input_path"
19209    fi
19210  fi
19211
19212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19213  if test "x$test_cygdrive_prefix" = x; then
19214    # As a simple fix, exclude /usr/bin since it's not a real path.
19215    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19217      # a path prefixed by /cygdrive for fixpath to work.
19218      new_path="$CYGWIN_ROOT_PATH$input_path"
19219    fi
19220  fi
19221
19222  # remove trailing .exe if any
19223  new_path="${new_path/%.exe/}"
19224
19225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19226
19227  # First separate the path from the arguments. This will split at the first
19228  # space.
19229  complete="$CC"
19230  path="${complete%% *}"
19231  tmp="$complete EOL"
19232  arguments="${tmp#* }"
19233
19234  # Input might be given as Windows format, start by converting to
19235  # unix format.
19236  new_path="$path"
19237
19238  windows_path="$new_path"
19239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19240    unix_path=`$CYGPATH -u "$windows_path"`
19241    new_path="$unix_path"
19242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19244    new_path="$unix_path"
19245  fi
19246
19247
19248  # Now try to locate executable using which
19249  new_path=`$WHICH "$new_path" 2> /dev/null`
19250
19251  if test "x$new_path" = x; then
19252    # Oops. Which didn't find the executable.
19253    # The splitting of arguments from the executable at a space might have been incorrect,
19254    # since paths with space are more likely in Windows. Give it another try with the whole
19255    # argument.
19256    path="$complete"
19257    arguments="EOL"
19258    new_path="$path"
19259
19260  windows_path="$new_path"
19261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19262    unix_path=`$CYGPATH -u "$windows_path"`
19263    new_path="$unix_path"
19264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19266    new_path="$unix_path"
19267  fi
19268
19269
19270    new_path=`$WHICH "$new_path" 2> /dev/null`
19271
19272    if test "x$new_path" = x; then
19273      # It's still not found. Now this is an unrecoverable error.
19274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19275$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19276      has_space=`$ECHO "$complete" | $GREP " "`
19277      if test "x$has_space" != x; then
19278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19280      fi
19281      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19282    fi
19283  fi
19284
19285  # Now new_path has a complete unix path to the binary
19286  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19287    # Keep paths in /bin as-is, but remove trailing .exe if any
19288    new_path="${new_path/%.exe/}"
19289    # Do not save /bin paths to all_fixpath_prefixes!
19290  else
19291    # Not in mixed or Windows style, start by that.
19292    new_path=`cmd //c echo $new_path`
19293
19294  input_path="$new_path"
19295  # Check if we need to convert this using DOS-style short mode. If the path
19296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19297  # take no chances and rewrite it.
19298  # Note: m4 eats our [], so we need to use [ and ] instead.
19299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19300  if test "x$has_forbidden_chars" != x; then
19301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19303  fi
19304
19305    # Output is in $new_path
19306
19307  windows_path="$new_path"
19308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19309    unix_path=`$CYGPATH -u "$windows_path"`
19310    new_path="$unix_path"
19311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19313    new_path="$unix_path"
19314  fi
19315
19316    # remove trailing .exe if any
19317    new_path="${new_path/%.exe/}"
19318
19319    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19320    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19321  fi
19322
19323  else
19324    # We're on a posix platform. Hooray! :)
19325    # First separate the path from the arguments. This will split at the first
19326    # space.
19327    complete="$CC"
19328    path="${complete%% *}"
19329    tmp="$complete EOL"
19330    arguments="${tmp#* }"
19331
19332    # Cannot rely on the command "which" here since it doesn't always work.
19333    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19334    if test -z "$is_absolute_path"; then
19335      # Path to executable is not absolute. Find it.
19336      IFS_save="$IFS"
19337      IFS=:
19338      for p in $PATH; do
19339        if test -f "$p/$path" && test -x "$p/$path"; then
19340          new_path="$p/$path"
19341          break
19342        fi
19343      done
19344      IFS="$IFS_save"
19345    else
19346      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19347$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19348      new_path="$path"
19349    fi
19350
19351    if test "x$new_path" = x; then
19352        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19353$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19354        has_space=`$ECHO "$complete" | $GREP " "`
19355        if test "x$has_space" != x; then
19356          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19357$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19358        fi
19359        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19360      fi
19361  fi
19362
19363      # Now join together the path and the arguments once again
19364      if test "x$arguments" != xEOL; then
19365        new_complete="$new_path ${arguments% *}"
19366      else
19367        new_complete="$new_path"
19368      fi
19369
19370  if test "x$complete" != "x$new_complete"; then
19371      CC="$new_complete"
19372      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19373$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19374    fi
19375
19376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19377$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19378  TEST_COMPILER="$CC"
19379
19380    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19381        # Follow a chain of symbolic links. Use readlink
19382        # where it exists, else fall back to horribly
19383        # complicated shell code.
19384        if test "x$READLINK_TESTED" != yes; then
19385            # On MacOSX there is a readlink tool with a different
19386            # purpose than the GNU readlink tool. Check the found readlink.
19387            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19388            if test "x$ISGNU" = x; then
19389                 # A readlink that we do not know how to use.
19390                 # Are there other non-GNU readlinks out there?
19391                 READLINK_TESTED=yes
19392                 READLINK=
19393            fi
19394        fi
19395
19396        if test "x$READLINK" != x; then
19397            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19398        else
19399            # Save the current directory for restoring afterwards
19400            STARTDIR=$PWD
19401            COUNTER=0
19402            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19403            sym_link_file=`$BASENAME $TEST_COMPILER`
19404            cd $sym_link_dir
19405            # Use -P flag to resolve symlinks in directories.
19406            cd `$THEPWDCMD -P`
19407            sym_link_dir=`$THEPWDCMD -P`
19408            # Resolve file symlinks
19409            while test $COUNTER -lt 20; do
19410                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19411                if test "x$ISLINK" == x; then
19412                    # This is not a symbolic link! We are done!
19413                    break
19414                fi
19415                # Again resolve directory symlinks since the target of the just found
19416                # link could be in a different directory
19417                cd `$DIRNAME $ISLINK`
19418                sym_link_dir=`$THEPWDCMD -P`
19419                sym_link_file=`$BASENAME $ISLINK`
19420                let COUNTER=COUNTER+1
19421            done
19422            cd $STARTDIR
19423            TEST_COMPILER=$sym_link_dir/$sym_link_file
19424        fi
19425    fi
19426
19427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19428$as_echo "$TEST_COMPILER" >&6; }
19429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19430$as_echo_n "checking if CC is disguised ccache... " >&6; }
19431
19432  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19433  if test "x$COMPILER_BASENAME" = "xccache"; then
19434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19435$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19436    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19437    # We want to control ccache invocation ourselves, so ignore this cc and try
19438    # searching again.
19439
19440    # Remove the path to the fake ccache cc from the PATH
19441    RETRY_COMPILER_SAVED_PATH="$PATH"
19442    COMPILER_DIRNAME=`$DIRNAME $CC`
19443    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19444
19445    # Try again looking for our compiler
19446    if test -n "$ac_tool_prefix"; then
19447  for ac_prog in $COMPILER_CHECK_LIST
19448  do
19449    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19450set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19452$as_echo_n "checking for $ac_word... " >&6; }
19453if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19454  $as_echo_n "(cached) " >&6
19455else
19456  if test -n "$PROPER_COMPILER_CC"; then
19457  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19458else
19459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19460for as_dir in $PATH
19461do
19462  IFS=$as_save_IFS
19463  test -z "$as_dir" && as_dir=.
19464    for ac_exec_ext in '' $ac_executable_extensions; do
19465  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19466    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19468    break 2
19469  fi
19470done
19471  done
19472IFS=$as_save_IFS
19473
19474fi
19475fi
19476PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19477if test -n "$PROPER_COMPILER_CC"; then
19478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19479$as_echo "$PROPER_COMPILER_CC" >&6; }
19480else
19481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19482$as_echo "no" >&6; }
19483fi
19484
19485
19486    test -n "$PROPER_COMPILER_CC" && break
19487  done
19488fi
19489if test -z "$PROPER_COMPILER_CC"; then
19490  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19491  for ac_prog in $COMPILER_CHECK_LIST
19492do
19493  # Extract the first word of "$ac_prog", so it can be a program name with args.
19494set dummy $ac_prog; ac_word=$2
19495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19496$as_echo_n "checking for $ac_word... " >&6; }
19497if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19498  $as_echo_n "(cached) " >&6
19499else
19500  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19501  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19502else
19503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19504for as_dir in $PATH
19505do
19506  IFS=$as_save_IFS
19507  test -z "$as_dir" && as_dir=.
19508    for ac_exec_ext in '' $ac_executable_extensions; do
19509  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19510    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19512    break 2
19513  fi
19514done
19515  done
19516IFS=$as_save_IFS
19517
19518fi
19519fi
19520ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19521if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19523$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19524else
19525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19526$as_echo "no" >&6; }
19527fi
19528
19529
19530  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19531done
19532
19533  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19534    PROPER_COMPILER_CC=""
19535  else
19536    case $cross_compiling:$ac_tool_warned in
19537yes:)
19538{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19539$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19540ac_tool_warned=yes ;;
19541esac
19542    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19543  fi
19544fi
19545
19546
19547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19548
19549  # First separate the path from the arguments. This will split at the first
19550  # space.
19551  complete="$PROPER_COMPILER_CC"
19552  path="${complete%% *}"
19553  tmp="$complete EOL"
19554  arguments="${tmp#* }"
19555
19556  # Input might be given as Windows format, start by converting to
19557  # unix format.
19558  new_path=`$CYGPATH -u "$path"`
19559
19560  # Now try to locate executable using which
19561  new_path=`$WHICH "$new_path" 2> /dev/null`
19562  # bat and cmd files are not always considered executable in cygwin causing which
19563  # to not find them
19564  if test "x$new_path" = x \
19565           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19566           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19567    new_path=`$CYGPATH -u "$path"`
19568  fi
19569  if test "x$new_path" = x; then
19570    # Oops. Which didn't find the executable.
19571    # The splitting of arguments from the executable at a space might have been incorrect,
19572    # since paths with space are more likely in Windows. Give it another try with the whole
19573    # argument.
19574    path="$complete"
19575    arguments="EOL"
19576    new_path=`$CYGPATH -u "$path"`
19577    new_path=`$WHICH "$new_path" 2> /dev/null`
19578    # bat and cmd files are not always considered executable in cygwin causing which
19579    # to not find them
19580    if test "x$new_path" = x \
19581             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19582             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19583      new_path=`$CYGPATH -u "$path"`
19584    fi
19585    if test "x$new_path" = x; then
19586      # It's still not found. Now this is an unrecoverable error.
19587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19588$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19589      has_space=`$ECHO "$complete" | $GREP " "`
19590      if test "x$has_space" != x; then
19591        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19592$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19593      fi
19594      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19595    fi
19596  fi
19597
19598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19601  # "foo.exe" is OK but "foo" is an error.
19602  #
19603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19604  # It is also a way to make sure we got the proper file name for the real test later on.
19605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19606  if test "x$test_shortpath" = x; then
19607    # Short path failed, file does not exist as specified.
19608    # Try adding .exe or .cmd
19609    if test -f "${new_path}.exe"; then
19610       input_to_shortpath="${new_path}.exe"
19611    elif test -f "${new_path}.cmd"; then
19612       input_to_shortpath="${new_path}.cmd"
19613    else
19614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19615$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19616      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19617$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19618      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19619    fi
19620  else
19621    input_to_shortpath="$new_path"
19622  fi
19623
19624  # Call helper function which possibly converts this using DOS-style short mode.
19625  # If so, the updated path is stored in $new_path.
19626  new_path="$input_to_shortpath"
19627
19628  input_path="$input_to_shortpath"
19629  # Check if we need to convert this using DOS-style short mode. If the path
19630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19631  # take no chances and rewrite it.
19632  # Note: m4 eats our [], so we need to use [ and ] instead.
19633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19634  if test "x$has_forbidden_chars" != x; then
19635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19639      # Going to short mode and back again did indeed matter. Since short mode is
19640      # case insensitive, let's make it lowercase to improve readability.
19641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19642      # Now convert it back to Unix-stile (cygpath)
19643      input_path=`$CYGPATH -u "$shortmode_path"`
19644      new_path="$input_path"
19645    fi
19646  fi
19647
19648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19649  if test "x$test_cygdrive_prefix" = x; then
19650    # As a simple fix, exclude /usr/bin since it's not a real path.
19651    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19653      # a path prefixed by /cygdrive for fixpath to work.
19654      new_path="$CYGWIN_ROOT_PATH$input_path"
19655    fi
19656  fi
19657
19658  # remove trailing .exe if any
19659  new_path="${new_path/%.exe/}"
19660
19661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19662
19663  # First separate the path from the arguments. This will split at the first
19664  # space.
19665  complete="$PROPER_COMPILER_CC"
19666  path="${complete%% *}"
19667  tmp="$complete EOL"
19668  arguments="${tmp#* }"
19669
19670  # Input might be given as Windows format, start by converting to
19671  # unix format.
19672  new_path="$path"
19673
19674  windows_path="$new_path"
19675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19676    unix_path=`$CYGPATH -u "$windows_path"`
19677    new_path="$unix_path"
19678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19680    new_path="$unix_path"
19681  fi
19682
19683
19684  # Now try to locate executable using which
19685  new_path=`$WHICH "$new_path" 2> /dev/null`
19686
19687  if test "x$new_path" = x; then
19688    # Oops. Which didn't find the executable.
19689    # The splitting of arguments from the executable at a space might have been incorrect,
19690    # since paths with space are more likely in Windows. Give it another try with the whole
19691    # argument.
19692    path="$complete"
19693    arguments="EOL"
19694    new_path="$path"
19695
19696  windows_path="$new_path"
19697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19698    unix_path=`$CYGPATH -u "$windows_path"`
19699    new_path="$unix_path"
19700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19702    new_path="$unix_path"
19703  fi
19704
19705
19706    new_path=`$WHICH "$new_path" 2> /dev/null`
19707
19708    if test "x$new_path" = x; then
19709      # It's still not found. Now this is an unrecoverable error.
19710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19711$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19712      has_space=`$ECHO "$complete" | $GREP " "`
19713      if test "x$has_space" != x; then
19714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19716      fi
19717      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19718    fi
19719  fi
19720
19721  # Now new_path has a complete unix path to the binary
19722  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19723    # Keep paths in /bin as-is, but remove trailing .exe if any
19724    new_path="${new_path/%.exe/}"
19725    # Do not save /bin paths to all_fixpath_prefixes!
19726  else
19727    # Not in mixed or Windows style, start by that.
19728    new_path=`cmd //c echo $new_path`
19729
19730  input_path="$new_path"
19731  # Check if we need to convert this using DOS-style short mode. If the path
19732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19733  # take no chances and rewrite it.
19734  # Note: m4 eats our [], so we need to use [ and ] instead.
19735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19736  if test "x$has_forbidden_chars" != x; then
19737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19739  fi
19740
19741    # Output is in $new_path
19742
19743  windows_path="$new_path"
19744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19745    unix_path=`$CYGPATH -u "$windows_path"`
19746    new_path="$unix_path"
19747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19749    new_path="$unix_path"
19750  fi
19751
19752    # remove trailing .exe if any
19753    new_path="${new_path/%.exe/}"
19754
19755    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19756    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19757  fi
19758
19759  else
19760    # We're on a posix platform. Hooray! :)
19761    # First separate the path from the arguments. This will split at the first
19762    # space.
19763    complete="$PROPER_COMPILER_CC"
19764    path="${complete%% *}"
19765    tmp="$complete EOL"
19766    arguments="${tmp#* }"
19767
19768    # Cannot rely on the command "which" here since it doesn't always work.
19769    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19770    if test -z "$is_absolute_path"; then
19771      # Path to executable is not absolute. Find it.
19772      IFS_save="$IFS"
19773      IFS=:
19774      for p in $PATH; do
19775        if test -f "$p/$path" && test -x "$p/$path"; then
19776          new_path="$p/$path"
19777          break
19778        fi
19779      done
19780      IFS="$IFS_save"
19781    else
19782      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19783$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19784      new_path="$path"
19785    fi
19786
19787    if test "x$new_path" = x; then
19788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19789$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19790        has_space=`$ECHO "$complete" | $GREP " "`
19791        if test "x$has_space" != x; then
19792          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19793$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19794        fi
19795        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19796      fi
19797  fi
19798
19799      # Now join together the path and the arguments once again
19800      if test "x$arguments" != xEOL; then
19801        new_complete="$new_path ${arguments% *}"
19802      else
19803        new_complete="$new_path"
19804      fi
19805
19806  if test "x$complete" != "x$new_complete"; then
19807      PROPER_COMPILER_CC="$new_complete"
19808      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19809$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19810    fi
19811
19812    PATH="$RETRY_COMPILER_SAVED_PATH"
19813
19814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19815$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19816
19817    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19818        # Follow a chain of symbolic links. Use readlink
19819        # where it exists, else fall back to horribly
19820        # complicated shell code.
19821        if test "x$READLINK_TESTED" != yes; then
19822            # On MacOSX there is a readlink tool with a different
19823            # purpose than the GNU readlink tool. Check the found readlink.
19824            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19825            if test "x$ISGNU" = x; then
19826                 # A readlink that we do not know how to use.
19827                 # Are there other non-GNU readlinks out there?
19828                 READLINK_TESTED=yes
19829                 READLINK=
19830            fi
19831        fi
19832
19833        if test "x$READLINK" != x; then
19834            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19835        else
19836            # Save the current directory for restoring afterwards
19837            STARTDIR=$PWD
19838            COUNTER=0
19839            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19840            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19841            cd $sym_link_dir
19842            # Use -P flag to resolve symlinks in directories.
19843            cd `$THEPWDCMD -P`
19844            sym_link_dir=`$THEPWDCMD -P`
19845            # Resolve file symlinks
19846            while test $COUNTER -lt 20; do
19847                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19848                if test "x$ISLINK" == x; then
19849                    # This is not a symbolic link! We are done!
19850                    break
19851                fi
19852                # Again resolve directory symlinks since the target of the just found
19853                # link could be in a different directory
19854                cd `$DIRNAME $ISLINK`
19855                sym_link_dir=`$THEPWDCMD -P`
19856                sym_link_file=`$BASENAME $ISLINK`
19857                let COUNTER=COUNTER+1
19858            done
19859            cd $STARTDIR
19860            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19861        fi
19862    fi
19863
19864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19865$as_echo "$PROPER_COMPILER_CC" >&6; }
19866    CC="$PROPER_COMPILER_CC"
19867  else
19868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19869$as_echo "no, keeping CC" >&6; }
19870    CC="$TEST_COMPILER"
19871  fi
19872
19873  COMPILER=$CC
19874  COMPILER_NAME=$COMPILER_NAME
19875
19876  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19877    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19878    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19879    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19880    if test $? -ne 0; then
19881      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19882
19883      { $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
19884$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19885      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19886$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19887      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19888    else
19889      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19890      COMPILER_VENDOR="Sun Studio"
19891    fi
19892  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19893    # First line typically looks something like:
19894    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19895    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19896    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19897    COMPILER_VENDOR="Microsoft CL.EXE"
19898    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19899    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19900      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19901        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19902      fi
19903    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19904      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19905        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19906      fi
19907    fi
19908  else
19909    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19910    # Check that this is likely to be GCC.
19911    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19912    if test $? -ne 0; then
19913      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19914$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19915      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19916$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19917      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19918    fi
19919
19920    # First line typically looks something like:
19921    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19922    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19923    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19924  fi
19925  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19926  CC_VERSION="$COMPILER_VERSION"
19927  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19928  CC_VENDOR="$COMPILER_VENDOR"
19929
19930  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19931$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19932
19933
19934# Now that we have resolved CC ourself, let autoconf have its go at it
19935ac_ext=c
19936ac_cpp='$CPP $CPPFLAGS'
19937ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19938ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19939ac_compiler_gnu=$ac_cv_c_compiler_gnu
19940if test -n "$ac_tool_prefix"; then
19941  for ac_prog in $CC
19942  do
19943    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19944set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19946$as_echo_n "checking for $ac_word... " >&6; }
19947if test "${ac_cv_prog_CC+set}" = set; then :
19948  $as_echo_n "(cached) " >&6
19949else
19950  if test -n "$CC"; then
19951  ac_cv_prog_CC="$CC" # Let the user override the test.
19952else
19953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19954for as_dir in $PATH
19955do
19956  IFS=$as_save_IFS
19957  test -z "$as_dir" && as_dir=.
19958    for ac_exec_ext in '' $ac_executable_extensions; do
19959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19960    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19962    break 2
19963  fi
19964done
19965  done
19966IFS=$as_save_IFS
19967
19968fi
19969fi
19970CC=$ac_cv_prog_CC
19971if test -n "$CC"; then
19972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19973$as_echo "$CC" >&6; }
19974else
19975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19976$as_echo "no" >&6; }
19977fi
19978
19979
19980    test -n "$CC" && break
19981  done
19982fi
19983if test -z "$CC"; then
19984  ac_ct_CC=$CC
19985  for ac_prog in $CC
19986do
19987  # Extract the first word of "$ac_prog", so it can be a program name with args.
19988set dummy $ac_prog; ac_word=$2
19989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19990$as_echo_n "checking for $ac_word... " >&6; }
19991if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19992  $as_echo_n "(cached) " >&6
19993else
19994  if test -n "$ac_ct_CC"; then
19995  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19996else
19997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19998for as_dir in $PATH
19999do
20000  IFS=$as_save_IFS
20001  test -z "$as_dir" && as_dir=.
20002    for ac_exec_ext in '' $ac_executable_extensions; do
20003  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20004    ac_cv_prog_ac_ct_CC="$ac_prog"
20005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20006    break 2
20007  fi
20008done
20009  done
20010IFS=$as_save_IFS
20011
20012fi
20013fi
20014ac_ct_CC=$ac_cv_prog_ac_ct_CC
20015if test -n "$ac_ct_CC"; then
20016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20017$as_echo "$ac_ct_CC" >&6; }
20018else
20019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20020$as_echo "no" >&6; }
20021fi
20022
20023
20024  test -n "$ac_ct_CC" && break
20025done
20026
20027  if test "x$ac_ct_CC" = x; then
20028    CC=""
20029  else
20030    case $cross_compiling:$ac_tool_warned in
20031yes:)
20032{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20033$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20034ac_tool_warned=yes ;;
20035esac
20036    CC=$ac_ct_CC
20037  fi
20038fi
20039
20040
20041test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20042$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20043as_fn_error $? "no acceptable C compiler found in \$PATH
20044See \`config.log' for more details" "$LINENO" 5 ; }
20045
20046# Provide some information about the compiler.
20047$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20048set X $ac_compile
20049ac_compiler=$2
20050for ac_option in --version -v -V -qversion; do
20051  { { ac_try="$ac_compiler $ac_option >&5"
20052case "(($ac_try" in
20053  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20054  *) ac_try_echo=$ac_try;;
20055esac
20056eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20057$as_echo "$ac_try_echo"; } >&5
20058  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20059  ac_status=$?
20060  if test -s conftest.err; then
20061    sed '10a\
20062... rest of stderr output deleted ...
20063         10q' conftest.err >conftest.er1
20064    cat conftest.er1 >&5
20065  fi
20066  rm -f conftest.er1 conftest.err
20067  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20068  test $ac_status = 0; }
20069done
20070
20071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20072/* end confdefs.h.  */
20073
20074int
20075main ()
20076{
20077
20078  ;
20079  return 0;
20080}
20081_ACEOF
20082ac_clean_files_save=$ac_clean_files
20083ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20084# Try to create an executable without -o first, disregard a.out.
20085# It will help us diagnose broken compilers, and finding out an intuition
20086# of exeext.
20087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20088$as_echo_n "checking whether the C compiler works... " >&6; }
20089ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20090
20091# The possible output files:
20092ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20093
20094ac_rmfiles=
20095for ac_file in $ac_files
20096do
20097  case $ac_file in
20098    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20099    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20100  esac
20101done
20102rm -f $ac_rmfiles
20103
20104if { { ac_try="$ac_link_default"
20105case "(($ac_try" in
20106  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20107  *) ac_try_echo=$ac_try;;
20108esac
20109eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20110$as_echo "$ac_try_echo"; } >&5
20111  (eval "$ac_link_default") 2>&5
20112  ac_status=$?
20113  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20114  test $ac_status = 0; }; then :
20115  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20116# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20117# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20118# so that the user can short-circuit this test for compilers unknown to
20119# Autoconf.
20120for ac_file in $ac_files ''
20121do
20122  test -f "$ac_file" || continue
20123  case $ac_file in
20124    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20125	;;
20126    [ab].out )
20127	# We found the default executable, but exeext='' is most
20128	# certainly right.
20129	break;;
20130    *.* )
20131	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20132	then :; else
20133	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20134	fi
20135	# We set ac_cv_exeext here because the later test for it is not
20136	# safe: cross compilers may not add the suffix if given an `-o'
20137	# argument, so we may need to know it at that point already.
20138	# Even if this section looks crufty: it has the advantage of
20139	# actually working.
20140	break;;
20141    * )
20142	break;;
20143  esac
20144done
20145test "$ac_cv_exeext" = no && ac_cv_exeext=
20146
20147else
20148  ac_file=''
20149fi
20150if test -z "$ac_file"; then :
20151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20152$as_echo "no" >&6; }
20153$as_echo "$as_me: failed program was:" >&5
20154sed 's/^/| /' conftest.$ac_ext >&5
20155
20156{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20158as_fn_error 77 "C compiler cannot create executables
20159See \`config.log' for more details" "$LINENO" 5 ; }
20160else
20161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20162$as_echo "yes" >&6; }
20163fi
20164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20165$as_echo_n "checking for C compiler default output file name... " >&6; }
20166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20167$as_echo "$ac_file" >&6; }
20168ac_exeext=$ac_cv_exeext
20169
20170rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20171ac_clean_files=$ac_clean_files_save
20172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20173$as_echo_n "checking for suffix of executables... " >&6; }
20174if { { ac_try="$ac_link"
20175case "(($ac_try" in
20176  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20177  *) ac_try_echo=$ac_try;;
20178esac
20179eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20180$as_echo "$ac_try_echo"; } >&5
20181  (eval "$ac_link") 2>&5
20182  ac_status=$?
20183  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20184  test $ac_status = 0; }; then :
20185  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20186# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20187# work properly (i.e., refer to `conftest.exe'), while it won't with
20188# `rm'.
20189for ac_file in conftest.exe conftest conftest.*; do
20190  test -f "$ac_file" || continue
20191  case $ac_file in
20192    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20193    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20194	  break;;
20195    * ) break;;
20196  esac
20197done
20198else
20199  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20201as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20202See \`config.log' for more details" "$LINENO" 5 ; }
20203fi
20204rm -f conftest conftest$ac_cv_exeext
20205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20206$as_echo "$ac_cv_exeext" >&6; }
20207
20208rm -f conftest.$ac_ext
20209EXEEXT=$ac_cv_exeext
20210ac_exeext=$EXEEXT
20211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20212/* end confdefs.h.  */
20213#include <stdio.h>
20214int
20215main ()
20216{
20217FILE *f = fopen ("conftest.out", "w");
20218 return ferror (f) || fclose (f) != 0;
20219
20220  ;
20221  return 0;
20222}
20223_ACEOF
20224ac_clean_files="$ac_clean_files conftest.out"
20225# Check that the compiler produces executables we can run.  If not, either
20226# the compiler is broken, or we cross compile.
20227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20228$as_echo_n "checking whether we are cross compiling... " >&6; }
20229if test "$cross_compiling" != yes; then
20230  { { ac_try="$ac_link"
20231case "(($ac_try" in
20232  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20233  *) ac_try_echo=$ac_try;;
20234esac
20235eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20236$as_echo "$ac_try_echo"; } >&5
20237  (eval "$ac_link") 2>&5
20238  ac_status=$?
20239  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20240  test $ac_status = 0; }
20241  if { ac_try='./conftest$ac_cv_exeext'
20242  { { case "(($ac_try" in
20243  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20244  *) ac_try_echo=$ac_try;;
20245esac
20246eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20247$as_echo "$ac_try_echo"; } >&5
20248  (eval "$ac_try") 2>&5
20249  ac_status=$?
20250  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20251  test $ac_status = 0; }; }; then
20252    cross_compiling=no
20253  else
20254    if test "$cross_compiling" = maybe; then
20255	cross_compiling=yes
20256    else
20257	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20258$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20259as_fn_error $? "cannot run C compiled programs.
20260If you meant to cross compile, use \`--host'.
20261See \`config.log' for more details" "$LINENO" 5 ; }
20262    fi
20263  fi
20264fi
20265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20266$as_echo "$cross_compiling" >&6; }
20267
20268rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20269ac_clean_files=$ac_clean_files_save
20270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20271$as_echo_n "checking for suffix of object files... " >&6; }
20272if test "${ac_cv_objext+set}" = set; then :
20273  $as_echo_n "(cached) " >&6
20274else
20275  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20276/* end confdefs.h.  */
20277
20278int
20279main ()
20280{
20281
20282  ;
20283  return 0;
20284}
20285_ACEOF
20286rm -f conftest.o conftest.obj
20287if { { ac_try="$ac_compile"
20288case "(($ac_try" in
20289  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20290  *) ac_try_echo=$ac_try;;
20291esac
20292eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20293$as_echo "$ac_try_echo"; } >&5
20294  (eval "$ac_compile") 2>&5
20295  ac_status=$?
20296  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20297  test $ac_status = 0; }; then :
20298  for ac_file in conftest.o conftest.obj conftest.*; do
20299  test -f "$ac_file" || continue;
20300  case $ac_file in
20301    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20302    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20303       break;;
20304  esac
20305done
20306else
20307  $as_echo "$as_me: failed program was:" >&5
20308sed 's/^/| /' conftest.$ac_ext >&5
20309
20310{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20312as_fn_error $? "cannot compute suffix of object files: cannot compile
20313See \`config.log' for more details" "$LINENO" 5 ; }
20314fi
20315rm -f conftest.$ac_cv_objext conftest.$ac_ext
20316fi
20317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20318$as_echo "$ac_cv_objext" >&6; }
20319OBJEXT=$ac_cv_objext
20320ac_objext=$OBJEXT
20321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20322$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20323if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20324  $as_echo_n "(cached) " >&6
20325else
20326  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20327/* end confdefs.h.  */
20328
20329int
20330main ()
20331{
20332#ifndef __GNUC__
20333       choke me
20334#endif
20335
20336  ;
20337  return 0;
20338}
20339_ACEOF
20340if ac_fn_c_try_compile "$LINENO"; then :
20341  ac_compiler_gnu=yes
20342else
20343  ac_compiler_gnu=no
20344fi
20345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20346ac_cv_c_compiler_gnu=$ac_compiler_gnu
20347
20348fi
20349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20350$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20351if test $ac_compiler_gnu = yes; then
20352  GCC=yes
20353else
20354  GCC=
20355fi
20356ac_test_CFLAGS=${CFLAGS+set}
20357ac_save_CFLAGS=$CFLAGS
20358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20359$as_echo_n "checking whether $CC accepts -g... " >&6; }
20360if test "${ac_cv_prog_cc_g+set}" = set; then :
20361  $as_echo_n "(cached) " >&6
20362else
20363  ac_save_c_werror_flag=$ac_c_werror_flag
20364   ac_c_werror_flag=yes
20365   ac_cv_prog_cc_g=no
20366   CFLAGS="-g"
20367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20368/* end confdefs.h.  */
20369
20370int
20371main ()
20372{
20373
20374  ;
20375  return 0;
20376}
20377_ACEOF
20378if ac_fn_c_try_compile "$LINENO"; then :
20379  ac_cv_prog_cc_g=yes
20380else
20381  CFLAGS=""
20382      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20383/* end confdefs.h.  */
20384
20385int
20386main ()
20387{
20388
20389  ;
20390  return 0;
20391}
20392_ACEOF
20393if ac_fn_c_try_compile "$LINENO"; then :
20394
20395else
20396  ac_c_werror_flag=$ac_save_c_werror_flag
20397	 CFLAGS="-g"
20398	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20399/* end confdefs.h.  */
20400
20401int
20402main ()
20403{
20404
20405  ;
20406  return 0;
20407}
20408_ACEOF
20409if ac_fn_c_try_compile "$LINENO"; then :
20410  ac_cv_prog_cc_g=yes
20411fi
20412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20413fi
20414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20415fi
20416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20417   ac_c_werror_flag=$ac_save_c_werror_flag
20418fi
20419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20420$as_echo "$ac_cv_prog_cc_g" >&6; }
20421if test "$ac_test_CFLAGS" = set; then
20422  CFLAGS=$ac_save_CFLAGS
20423elif test $ac_cv_prog_cc_g = yes; then
20424  if test "$GCC" = yes; then
20425    CFLAGS="-g -O2"
20426  else
20427    CFLAGS="-g"
20428  fi
20429else
20430  if test "$GCC" = yes; then
20431    CFLAGS="-O2"
20432  else
20433    CFLAGS=
20434  fi
20435fi
20436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20437$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20438if test "${ac_cv_prog_cc_c89+set}" = set; then :
20439  $as_echo_n "(cached) " >&6
20440else
20441  ac_cv_prog_cc_c89=no
20442ac_save_CC=$CC
20443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20444/* end confdefs.h.  */
20445#include <stdarg.h>
20446#include <stdio.h>
20447#include <sys/types.h>
20448#include <sys/stat.h>
20449/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20450struct buf { int x; };
20451FILE * (*rcsopen) (struct buf *, struct stat *, int);
20452static char *e (p, i)
20453     char **p;
20454     int i;
20455{
20456  return p[i];
20457}
20458static char *f (char * (*g) (char **, int), char **p, ...)
20459{
20460  char *s;
20461  va_list v;
20462  va_start (v,p);
20463  s = g (p, va_arg (v,int));
20464  va_end (v);
20465  return s;
20466}
20467
20468/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20469   function prototypes and stuff, but not '\xHH' hex character constants.
20470   These don't provoke an error unfortunately, instead are silently treated
20471   as 'x'.  The following induces an error, until -std is added to get
20472   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20473   array size at least.  It's necessary to write '\x00'==0 to get something
20474   that's true only with -std.  */
20475int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20476
20477/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20478   inside strings and character constants.  */
20479#define FOO(x) 'x'
20480int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20481
20482int test (int i, double x);
20483struct s1 {int (*f) (int a);};
20484struct s2 {int (*f) (double a);};
20485int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20486int argc;
20487char **argv;
20488int
20489main ()
20490{
20491return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20492  ;
20493  return 0;
20494}
20495_ACEOF
20496for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20497	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20498do
20499  CC="$ac_save_CC $ac_arg"
20500  if ac_fn_c_try_compile "$LINENO"; then :
20501  ac_cv_prog_cc_c89=$ac_arg
20502fi
20503rm -f core conftest.err conftest.$ac_objext
20504  test "x$ac_cv_prog_cc_c89" != "xno" && break
20505done
20506rm -f conftest.$ac_ext
20507CC=$ac_save_CC
20508
20509fi
20510# AC_CACHE_VAL
20511case "x$ac_cv_prog_cc_c89" in
20512  x)
20513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20514$as_echo "none needed" >&6; } ;;
20515  xno)
20516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20517$as_echo "unsupported" >&6; } ;;
20518  *)
20519    CC="$CC $ac_cv_prog_cc_c89"
20520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20521$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20522esac
20523if test "x$ac_cv_prog_cc_c89" != xno; then :
20524
20525fi
20526
20527ac_ext=cpp
20528ac_cpp='$CXXCPP $CPPFLAGS'
20529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20532
20533
20534### Locate C++ compiler (CXX)
20535
20536if test "x$CXX" != x; then
20537  COMPILER_CHECK_LIST="$CXX"
20538elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20539  COMPILER_CHECK_LIST="cl"
20540elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20541  COMPILER_CHECK_LIST="CC g++"
20542else
20543  COMPILER_CHECK_LIST="g++ CC"
20544fi
20545
20546
20547  COMPILER_NAME=C++
20548
20549  CXX=
20550  # If TOOLS_DIR is set, check for all compiler names in there first
20551  # before checking the rest of the PATH.
20552  if test -n "$TOOLS_DIR"; then
20553    PATH_save="$PATH"
20554    PATH="$TOOLS_DIR"
20555    for ac_prog in $COMPILER_CHECK_LIST
20556do
20557  # Extract the first word of "$ac_prog", so it can be a program name with args.
20558set dummy $ac_prog; ac_word=$2
20559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20560$as_echo_n "checking for $ac_word... " >&6; }
20561if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20562  $as_echo_n "(cached) " >&6
20563else
20564  case $TOOLS_DIR_CXX in
20565  [\\/]* | ?:[\\/]*)
20566  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20567  ;;
20568  *)
20569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20570for as_dir in $PATH
20571do
20572  IFS=$as_save_IFS
20573  test -z "$as_dir" && as_dir=.
20574    for ac_exec_ext in '' $ac_executable_extensions; do
20575  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20576    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20578    break 2
20579  fi
20580done
20581  done
20582IFS=$as_save_IFS
20583
20584  ;;
20585esac
20586fi
20587TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20588if test -n "$TOOLS_DIR_CXX"; then
20589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20590$as_echo "$TOOLS_DIR_CXX" >&6; }
20591else
20592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20593$as_echo "no" >&6; }
20594fi
20595
20596
20597  test -n "$TOOLS_DIR_CXX" && break
20598done
20599
20600    CXX=$TOOLS_DIR_CXX
20601    PATH="$PATH_save"
20602  fi
20603
20604  # AC_PATH_PROGS can't be run multiple times with the same variable,
20605  # so create a new name for this run.
20606  if test "x$CXX" = x; then
20607    for ac_prog in $COMPILER_CHECK_LIST
20608do
20609  # Extract the first word of "$ac_prog", so it can be a program name with args.
20610set dummy $ac_prog; ac_word=$2
20611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20612$as_echo_n "checking for $ac_word... " >&6; }
20613if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20614  $as_echo_n "(cached) " >&6
20615else
20616  case $POTENTIAL_CXX in
20617  [\\/]* | ?:[\\/]*)
20618  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20619  ;;
20620  *)
20621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20622for as_dir in $PATH
20623do
20624  IFS=$as_save_IFS
20625  test -z "$as_dir" && as_dir=.
20626    for ac_exec_ext in '' $ac_executable_extensions; do
20627  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20628    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20630    break 2
20631  fi
20632done
20633  done
20634IFS=$as_save_IFS
20635
20636  ;;
20637esac
20638fi
20639POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20640if test -n "$POTENTIAL_CXX"; then
20641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20642$as_echo "$POTENTIAL_CXX" >&6; }
20643else
20644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20645$as_echo "no" >&6; }
20646fi
20647
20648
20649  test -n "$POTENTIAL_CXX" && break
20650done
20651
20652    CXX=$POTENTIAL_CXX
20653  fi
20654
20655  if test "x$CXX" = x; then
20656
20657    # Print a helpful message on how to acquire the necessary build dependency.
20658    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20659    MISSING_DEPENDENCY=devkit
20660    PKGHANDLER_COMMAND=
20661
20662    case $PKGHANDLER in
20663	apt-get)
20664                apt_help     $MISSING_DEPENDENCY ;;
20665    yum)
20666                yum_help     $MISSING_DEPENDENCY ;;
20667	port)
20668                port_help    $MISSING_DEPENDENCY ;;
20669	pkgutil)
20670                pkgutil_help $MISSING_DEPENDENCY ;;
20671	pkgadd)
20672                pkgadd_help  $MISSING_DEPENDENCY ;;
20673    * )
20674      break ;;
20675    esac
20676
20677    if test "x$PKGHANDLER_COMMAND" != x; then
20678        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20679    fi
20680
20681      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20682  fi
20683
20684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20685
20686  # First separate the path from the arguments. This will split at the first
20687  # space.
20688  complete="$CXX"
20689  path="${complete%% *}"
20690  tmp="$complete EOL"
20691  arguments="${tmp#* }"
20692
20693  # Input might be given as Windows format, start by converting to
20694  # unix format.
20695  new_path=`$CYGPATH -u "$path"`
20696
20697  # Now try to locate executable using which
20698  new_path=`$WHICH "$new_path" 2> /dev/null`
20699  # bat and cmd files are not always considered executable in cygwin causing which
20700  # to not find them
20701  if test "x$new_path" = x \
20702           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20703           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20704    new_path=`$CYGPATH -u "$path"`
20705  fi
20706  if test "x$new_path" = x; then
20707    # Oops. Which didn't find the executable.
20708    # The splitting of arguments from the executable at a space might have been incorrect,
20709    # since paths with space are more likely in Windows. Give it another try with the whole
20710    # argument.
20711    path="$complete"
20712    arguments="EOL"
20713    new_path=`$CYGPATH -u "$path"`
20714    new_path=`$WHICH "$new_path" 2> /dev/null`
20715    # bat and cmd files are not always considered executable in cygwin causing which
20716    # to not find them
20717    if test "x$new_path" = x \
20718             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20719             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20720      new_path=`$CYGPATH -u "$path"`
20721    fi
20722    if test "x$new_path" = x; then
20723      # It's still not found. Now this is an unrecoverable error.
20724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20725$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20726      has_space=`$ECHO "$complete" | $GREP " "`
20727      if test "x$has_space" != x; then
20728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20730      fi
20731      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20732    fi
20733  fi
20734
20735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20738  # "foo.exe" is OK but "foo" is an error.
20739  #
20740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20741  # It is also a way to make sure we got the proper file name for the real test later on.
20742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20743  if test "x$test_shortpath" = x; then
20744    # Short path failed, file does not exist as specified.
20745    # Try adding .exe or .cmd
20746    if test -f "${new_path}.exe"; then
20747       input_to_shortpath="${new_path}.exe"
20748    elif test -f "${new_path}.cmd"; then
20749       input_to_shortpath="${new_path}.cmd"
20750    else
20751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20752$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20755      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20756    fi
20757  else
20758    input_to_shortpath="$new_path"
20759  fi
20760
20761  # Call helper function which possibly converts this using DOS-style short mode.
20762  # If so, the updated path is stored in $new_path.
20763  new_path="$input_to_shortpath"
20764
20765  input_path="$input_to_shortpath"
20766  # Check if we need to convert this using DOS-style short mode. If the path
20767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20768  # take no chances and rewrite it.
20769  # Note: m4 eats our [], so we need to use [ and ] instead.
20770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20771  if test "x$has_forbidden_chars" != x; then
20772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20776      # Going to short mode and back again did indeed matter. Since short mode is
20777      # case insensitive, let's make it lowercase to improve readability.
20778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20779      # Now convert it back to Unix-stile (cygpath)
20780      input_path=`$CYGPATH -u "$shortmode_path"`
20781      new_path="$input_path"
20782    fi
20783  fi
20784
20785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20786  if test "x$test_cygdrive_prefix" = x; then
20787    # As a simple fix, exclude /usr/bin since it's not a real path.
20788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20790      # a path prefixed by /cygdrive for fixpath to work.
20791      new_path="$CYGWIN_ROOT_PATH$input_path"
20792    fi
20793  fi
20794
20795  # remove trailing .exe if any
20796  new_path="${new_path/%.exe/}"
20797
20798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20799
20800  # First separate the path from the arguments. This will split at the first
20801  # space.
20802  complete="$CXX"
20803  path="${complete%% *}"
20804  tmp="$complete EOL"
20805  arguments="${tmp#* }"
20806
20807  # Input might be given as Windows format, start by converting to
20808  # unix format.
20809  new_path="$path"
20810
20811  windows_path="$new_path"
20812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20813    unix_path=`$CYGPATH -u "$windows_path"`
20814    new_path="$unix_path"
20815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20817    new_path="$unix_path"
20818  fi
20819
20820
20821  # Now try to locate executable using which
20822  new_path=`$WHICH "$new_path" 2> /dev/null`
20823
20824  if test "x$new_path" = x; then
20825    # Oops. Which didn't find the executable.
20826    # The splitting of arguments from the executable at a space might have been incorrect,
20827    # since paths with space are more likely in Windows. Give it another try with the whole
20828    # argument.
20829    path="$complete"
20830    arguments="EOL"
20831    new_path="$path"
20832
20833  windows_path="$new_path"
20834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20835    unix_path=`$CYGPATH -u "$windows_path"`
20836    new_path="$unix_path"
20837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20839    new_path="$unix_path"
20840  fi
20841
20842
20843    new_path=`$WHICH "$new_path" 2> /dev/null`
20844
20845    if test "x$new_path" = x; then
20846      # It's still not found. Now this is an unrecoverable error.
20847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20848$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20849      has_space=`$ECHO "$complete" | $GREP " "`
20850      if test "x$has_space" != x; then
20851        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20852$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20853      fi
20854      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20855    fi
20856  fi
20857
20858  # Now new_path has a complete unix path to the binary
20859  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20860    # Keep paths in /bin as-is, but remove trailing .exe if any
20861    new_path="${new_path/%.exe/}"
20862    # Do not save /bin paths to all_fixpath_prefixes!
20863  else
20864    # Not in mixed or Windows style, start by that.
20865    new_path=`cmd //c echo $new_path`
20866
20867  input_path="$new_path"
20868  # Check if we need to convert this using DOS-style short mode. If the path
20869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20870  # take no chances and rewrite it.
20871  # Note: m4 eats our [], so we need to use [ and ] instead.
20872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20873  if test "x$has_forbidden_chars" != x; then
20874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20876  fi
20877
20878    # Output is in $new_path
20879
20880  windows_path="$new_path"
20881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20882    unix_path=`$CYGPATH -u "$windows_path"`
20883    new_path="$unix_path"
20884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20886    new_path="$unix_path"
20887  fi
20888
20889    # remove trailing .exe if any
20890    new_path="${new_path/%.exe/}"
20891
20892    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20893    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20894  fi
20895
20896  else
20897    # We're on a posix platform. Hooray! :)
20898    # First separate the path from the arguments. This will split at the first
20899    # space.
20900    complete="$CXX"
20901    path="${complete%% *}"
20902    tmp="$complete EOL"
20903    arguments="${tmp#* }"
20904
20905    # Cannot rely on the command "which" here since it doesn't always work.
20906    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20907    if test -z "$is_absolute_path"; then
20908      # Path to executable is not absolute. Find it.
20909      IFS_save="$IFS"
20910      IFS=:
20911      for p in $PATH; do
20912        if test -f "$p/$path" && test -x "$p/$path"; then
20913          new_path="$p/$path"
20914          break
20915        fi
20916      done
20917      IFS="$IFS_save"
20918    else
20919      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20920$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20921      new_path="$path"
20922    fi
20923
20924    if test "x$new_path" = x; then
20925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20926$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20927        has_space=`$ECHO "$complete" | $GREP " "`
20928        if test "x$has_space" != x; then
20929          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20930$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20931        fi
20932        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20933      fi
20934  fi
20935
20936      # Now join together the path and the arguments once again
20937      if test "x$arguments" != xEOL; then
20938        new_complete="$new_path ${arguments% *}"
20939      else
20940        new_complete="$new_path"
20941      fi
20942
20943  if test "x$complete" != "x$new_complete"; then
20944      CXX="$new_complete"
20945      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20946$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20947    fi
20948
20949  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20950$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20951  TEST_COMPILER="$CXX"
20952
20953    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20954        # Follow a chain of symbolic links. Use readlink
20955        # where it exists, else fall back to horribly
20956        # complicated shell code.
20957        if test "x$READLINK_TESTED" != yes; then
20958            # On MacOSX there is a readlink tool with a different
20959            # purpose than the GNU readlink tool. Check the found readlink.
20960            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20961            if test "x$ISGNU" = x; then
20962                 # A readlink that we do not know how to use.
20963                 # Are there other non-GNU readlinks out there?
20964                 READLINK_TESTED=yes
20965                 READLINK=
20966            fi
20967        fi
20968
20969        if test "x$READLINK" != x; then
20970            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20971        else
20972            # Save the current directory for restoring afterwards
20973            STARTDIR=$PWD
20974            COUNTER=0
20975            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20976            sym_link_file=`$BASENAME $TEST_COMPILER`
20977            cd $sym_link_dir
20978            # Use -P flag to resolve symlinks in directories.
20979            cd `$THEPWDCMD -P`
20980            sym_link_dir=`$THEPWDCMD -P`
20981            # Resolve file symlinks
20982            while test $COUNTER -lt 20; do
20983                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20984                if test "x$ISLINK" == x; then
20985                    # This is not a symbolic link! We are done!
20986                    break
20987                fi
20988                # Again resolve directory symlinks since the target of the just found
20989                # link could be in a different directory
20990                cd `$DIRNAME $ISLINK`
20991                sym_link_dir=`$THEPWDCMD -P`
20992                sym_link_file=`$BASENAME $ISLINK`
20993                let COUNTER=COUNTER+1
20994            done
20995            cd $STARTDIR
20996            TEST_COMPILER=$sym_link_dir/$sym_link_file
20997        fi
20998    fi
20999
21000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21001$as_echo "$TEST_COMPILER" >&6; }
21002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21003$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21004
21005  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21006  if test "x$COMPILER_BASENAME" = "xccache"; then
21007    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21008$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21009    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21010    # We want to control ccache invocation ourselves, so ignore this cc and try
21011    # searching again.
21012
21013    # Remove the path to the fake ccache cc from the PATH
21014    RETRY_COMPILER_SAVED_PATH="$PATH"
21015    COMPILER_DIRNAME=`$DIRNAME $CXX`
21016    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21017
21018    # Try again looking for our compiler
21019    if test -n "$ac_tool_prefix"; then
21020  for ac_prog in $COMPILER_CHECK_LIST
21021  do
21022    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21023set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21025$as_echo_n "checking for $ac_word... " >&6; }
21026if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
21027  $as_echo_n "(cached) " >&6
21028else
21029  if test -n "$PROPER_COMPILER_CXX"; then
21030  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21031else
21032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21033for as_dir in $PATH
21034do
21035  IFS=$as_save_IFS
21036  test -z "$as_dir" && as_dir=.
21037    for ac_exec_ext in '' $ac_executable_extensions; do
21038  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21039    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21041    break 2
21042  fi
21043done
21044  done
21045IFS=$as_save_IFS
21046
21047fi
21048fi
21049PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21050if test -n "$PROPER_COMPILER_CXX"; then
21051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21052$as_echo "$PROPER_COMPILER_CXX" >&6; }
21053else
21054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21055$as_echo "no" >&6; }
21056fi
21057
21058
21059    test -n "$PROPER_COMPILER_CXX" && break
21060  done
21061fi
21062if test -z "$PROPER_COMPILER_CXX"; then
21063  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21064  for ac_prog in $COMPILER_CHECK_LIST
21065do
21066  # Extract the first word of "$ac_prog", so it can be a program name with args.
21067set dummy $ac_prog; ac_word=$2
21068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21069$as_echo_n "checking for $ac_word... " >&6; }
21070if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
21071  $as_echo_n "(cached) " >&6
21072else
21073  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21074  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21075else
21076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21077for as_dir in $PATH
21078do
21079  IFS=$as_save_IFS
21080  test -z "$as_dir" && as_dir=.
21081    for ac_exec_ext in '' $ac_executable_extensions; do
21082  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21083    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21085    break 2
21086  fi
21087done
21088  done
21089IFS=$as_save_IFS
21090
21091fi
21092fi
21093ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21094if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21096$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21097else
21098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21099$as_echo "no" >&6; }
21100fi
21101
21102
21103  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21104done
21105
21106  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21107    PROPER_COMPILER_CXX=""
21108  else
21109    case $cross_compiling:$ac_tool_warned in
21110yes:)
21111{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21112$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21113ac_tool_warned=yes ;;
21114esac
21115    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21116  fi
21117fi
21118
21119
21120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21121
21122  # First separate the path from the arguments. This will split at the first
21123  # space.
21124  complete="$PROPER_COMPILER_CXX"
21125  path="${complete%% *}"
21126  tmp="$complete EOL"
21127  arguments="${tmp#* }"
21128
21129  # Input might be given as Windows format, start by converting to
21130  # unix format.
21131  new_path=`$CYGPATH -u "$path"`
21132
21133  # Now try to locate executable using which
21134  new_path=`$WHICH "$new_path" 2> /dev/null`
21135  # bat and cmd files are not always considered executable in cygwin causing which
21136  # to not find them
21137  if test "x$new_path" = x \
21138           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21139           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21140    new_path=`$CYGPATH -u "$path"`
21141  fi
21142  if test "x$new_path" = x; then
21143    # Oops. Which didn't find the executable.
21144    # The splitting of arguments from the executable at a space might have been incorrect,
21145    # since paths with space are more likely in Windows. Give it another try with the whole
21146    # argument.
21147    path="$complete"
21148    arguments="EOL"
21149    new_path=`$CYGPATH -u "$path"`
21150    new_path=`$WHICH "$new_path" 2> /dev/null`
21151    # bat and cmd files are not always considered executable in cygwin causing which
21152    # to not find them
21153    if test "x$new_path" = x \
21154             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21155             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21156      new_path=`$CYGPATH -u "$path"`
21157    fi
21158    if test "x$new_path" = x; then
21159      # It's still not found. Now this is an unrecoverable error.
21160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21161$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21162      has_space=`$ECHO "$complete" | $GREP " "`
21163      if test "x$has_space" != x; then
21164        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21165$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21166      fi
21167      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21168    fi
21169  fi
21170
21171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21174  # "foo.exe" is OK but "foo" is an error.
21175  #
21176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21177  # It is also a way to make sure we got the proper file name for the real test later on.
21178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21179  if test "x$test_shortpath" = x; then
21180    # Short path failed, file does not exist as specified.
21181    # Try adding .exe or .cmd
21182    if test -f "${new_path}.exe"; then
21183       input_to_shortpath="${new_path}.exe"
21184    elif test -f "${new_path}.cmd"; then
21185       input_to_shortpath="${new_path}.cmd"
21186    else
21187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21188$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21189      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21190$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21191      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21192    fi
21193  else
21194    input_to_shortpath="$new_path"
21195  fi
21196
21197  # Call helper function which possibly converts this using DOS-style short mode.
21198  # If so, the updated path is stored in $new_path.
21199  new_path="$input_to_shortpath"
21200
21201  input_path="$input_to_shortpath"
21202  # Check if we need to convert this using DOS-style short mode. If the path
21203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21204  # take no chances and rewrite it.
21205  # Note: m4 eats our [], so we need to use [ and ] instead.
21206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21207  if test "x$has_forbidden_chars" != x; then
21208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21212      # Going to short mode and back again did indeed matter. Since short mode is
21213      # case insensitive, let's make it lowercase to improve readability.
21214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21215      # Now convert it back to Unix-stile (cygpath)
21216      input_path=`$CYGPATH -u "$shortmode_path"`
21217      new_path="$input_path"
21218    fi
21219  fi
21220
21221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21222  if test "x$test_cygdrive_prefix" = x; then
21223    # As a simple fix, exclude /usr/bin since it's not a real path.
21224    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21226      # a path prefixed by /cygdrive for fixpath to work.
21227      new_path="$CYGWIN_ROOT_PATH$input_path"
21228    fi
21229  fi
21230
21231  # remove trailing .exe if any
21232  new_path="${new_path/%.exe/}"
21233
21234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21235
21236  # First separate the path from the arguments. This will split at the first
21237  # space.
21238  complete="$PROPER_COMPILER_CXX"
21239  path="${complete%% *}"
21240  tmp="$complete EOL"
21241  arguments="${tmp#* }"
21242
21243  # Input might be given as Windows format, start by converting to
21244  # unix format.
21245  new_path="$path"
21246
21247  windows_path="$new_path"
21248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21249    unix_path=`$CYGPATH -u "$windows_path"`
21250    new_path="$unix_path"
21251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21253    new_path="$unix_path"
21254  fi
21255
21256
21257  # Now try to locate executable using which
21258  new_path=`$WHICH "$new_path" 2> /dev/null`
21259
21260  if test "x$new_path" = x; then
21261    # Oops. Which didn't find the executable.
21262    # The splitting of arguments from the executable at a space might have been incorrect,
21263    # since paths with space are more likely in Windows. Give it another try with the whole
21264    # argument.
21265    path="$complete"
21266    arguments="EOL"
21267    new_path="$path"
21268
21269  windows_path="$new_path"
21270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21271    unix_path=`$CYGPATH -u "$windows_path"`
21272    new_path="$unix_path"
21273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21275    new_path="$unix_path"
21276  fi
21277
21278
21279    new_path=`$WHICH "$new_path" 2> /dev/null`
21280
21281    if test "x$new_path" = x; then
21282      # It's still not found. Now this is an unrecoverable error.
21283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21284$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21285      has_space=`$ECHO "$complete" | $GREP " "`
21286      if test "x$has_space" != x; then
21287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21289      fi
21290      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21291    fi
21292  fi
21293
21294  # Now new_path has a complete unix path to the binary
21295  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21296    # Keep paths in /bin as-is, but remove trailing .exe if any
21297    new_path="${new_path/%.exe/}"
21298    # Do not save /bin paths to all_fixpath_prefixes!
21299  else
21300    # Not in mixed or Windows style, start by that.
21301    new_path=`cmd //c echo $new_path`
21302
21303  input_path="$new_path"
21304  # Check if we need to convert this using DOS-style short mode. If the path
21305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21306  # take no chances and rewrite it.
21307  # Note: m4 eats our [], so we need to use [ and ] instead.
21308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21309  if test "x$has_forbidden_chars" != x; then
21310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21312  fi
21313
21314    # Output is in $new_path
21315
21316  windows_path="$new_path"
21317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21318    unix_path=`$CYGPATH -u "$windows_path"`
21319    new_path="$unix_path"
21320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21322    new_path="$unix_path"
21323  fi
21324
21325    # remove trailing .exe if any
21326    new_path="${new_path/%.exe/}"
21327
21328    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21329    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21330  fi
21331
21332  else
21333    # We're on a posix platform. Hooray! :)
21334    # First separate the path from the arguments. This will split at the first
21335    # space.
21336    complete="$PROPER_COMPILER_CXX"
21337    path="${complete%% *}"
21338    tmp="$complete EOL"
21339    arguments="${tmp#* }"
21340
21341    # Cannot rely on the command "which" here since it doesn't always work.
21342    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21343    if test -z "$is_absolute_path"; then
21344      # Path to executable is not absolute. Find it.
21345      IFS_save="$IFS"
21346      IFS=:
21347      for p in $PATH; do
21348        if test -f "$p/$path" && test -x "$p/$path"; then
21349          new_path="$p/$path"
21350          break
21351        fi
21352      done
21353      IFS="$IFS_save"
21354    else
21355      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21356$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21357      new_path="$path"
21358    fi
21359
21360    if test "x$new_path" = x; then
21361        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21362$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21363        has_space=`$ECHO "$complete" | $GREP " "`
21364        if test "x$has_space" != x; then
21365          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21366$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21367        fi
21368        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21369      fi
21370  fi
21371
21372      # Now join together the path and the arguments once again
21373      if test "x$arguments" != xEOL; then
21374        new_complete="$new_path ${arguments% *}"
21375      else
21376        new_complete="$new_path"
21377      fi
21378
21379  if test "x$complete" != "x$new_complete"; then
21380      PROPER_COMPILER_CXX="$new_complete"
21381      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21382$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21383    fi
21384
21385    PATH="$RETRY_COMPILER_SAVED_PATH"
21386
21387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21388$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21389
21390    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21391        # Follow a chain of symbolic links. Use readlink
21392        # where it exists, else fall back to horribly
21393        # complicated shell code.
21394        if test "x$READLINK_TESTED" != yes; then
21395            # On MacOSX there is a readlink tool with a different
21396            # purpose than the GNU readlink tool. Check the found readlink.
21397            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21398            if test "x$ISGNU" = x; then
21399                 # A readlink that we do not know how to use.
21400                 # Are there other non-GNU readlinks out there?
21401                 READLINK_TESTED=yes
21402                 READLINK=
21403            fi
21404        fi
21405
21406        if test "x$READLINK" != x; then
21407            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21408        else
21409            # Save the current directory for restoring afterwards
21410            STARTDIR=$PWD
21411            COUNTER=0
21412            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21413            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21414            cd $sym_link_dir
21415            # Use -P flag to resolve symlinks in directories.
21416            cd `$THEPWDCMD -P`
21417            sym_link_dir=`$THEPWDCMD -P`
21418            # Resolve file symlinks
21419            while test $COUNTER -lt 20; do
21420                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21421                if test "x$ISLINK" == x; then
21422                    # This is not a symbolic link! We are done!
21423                    break
21424                fi
21425                # Again resolve directory symlinks since the target of the just found
21426                # link could be in a different directory
21427                cd `$DIRNAME $ISLINK`
21428                sym_link_dir=`$THEPWDCMD -P`
21429                sym_link_file=`$BASENAME $ISLINK`
21430                let COUNTER=COUNTER+1
21431            done
21432            cd $STARTDIR
21433            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21434        fi
21435    fi
21436
21437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21438$as_echo "$PROPER_COMPILER_CXX" >&6; }
21439    CXX="$PROPER_COMPILER_CXX"
21440  else
21441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21442$as_echo "no, keeping CXX" >&6; }
21443    CXX="$TEST_COMPILER"
21444  fi
21445
21446  COMPILER=$CXX
21447  COMPILER_NAME=$COMPILER_NAME
21448
21449  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21450    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21451    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21452    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21453    if test $? -ne 0; then
21454      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21455
21456      { $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
21457$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21458      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21459$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21460      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21461    else
21462      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21463      COMPILER_VENDOR="Sun Studio"
21464    fi
21465  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21466    # First line typically looks something like:
21467    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21468    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21469    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21470    COMPILER_VENDOR="Microsoft CL.EXE"
21471    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21472    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21473      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21474        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21475      fi
21476    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21477      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21478        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21479      fi
21480    fi
21481  else
21482    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21483    # Check that this is likely to be GCC.
21484    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21485    if test $? -ne 0; then
21486      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21487$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21488      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21489$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21490      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21491    fi
21492
21493    # First line typically looks something like:
21494    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21495    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21496    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21497  fi
21498  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21499  CXX_VERSION="$COMPILER_VERSION"
21500  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21501  CXX_VENDOR="$COMPILER_VENDOR"
21502
21503  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21504$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21505
21506
21507# Now that we have resolved CXX ourself, let autoconf have its go at it
21508ac_ext=cpp
21509ac_cpp='$CXXCPP $CPPFLAGS'
21510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21513if test -z "$CXX"; then
21514  if test -n "$CCC"; then
21515    CXX=$CCC
21516  else
21517    if test -n "$ac_tool_prefix"; then
21518  for ac_prog in $CXX
21519  do
21520    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21521set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21523$as_echo_n "checking for $ac_word... " >&6; }
21524if test "${ac_cv_prog_CXX+set}" = set; then :
21525  $as_echo_n "(cached) " >&6
21526else
21527  if test -n "$CXX"; then
21528  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21529else
21530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21531for as_dir in $PATH
21532do
21533  IFS=$as_save_IFS
21534  test -z "$as_dir" && as_dir=.
21535    for ac_exec_ext in '' $ac_executable_extensions; do
21536  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21537    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21539    break 2
21540  fi
21541done
21542  done
21543IFS=$as_save_IFS
21544
21545fi
21546fi
21547CXX=$ac_cv_prog_CXX
21548if test -n "$CXX"; then
21549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21550$as_echo "$CXX" >&6; }
21551else
21552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21553$as_echo "no" >&6; }
21554fi
21555
21556
21557    test -n "$CXX" && break
21558  done
21559fi
21560if test -z "$CXX"; then
21561  ac_ct_CXX=$CXX
21562  for ac_prog in $CXX
21563do
21564  # Extract the first word of "$ac_prog", so it can be a program name with args.
21565set dummy $ac_prog; ac_word=$2
21566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21567$as_echo_n "checking for $ac_word... " >&6; }
21568if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21569  $as_echo_n "(cached) " >&6
21570else
21571  if test -n "$ac_ct_CXX"; then
21572  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21573else
21574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21575for as_dir in $PATH
21576do
21577  IFS=$as_save_IFS
21578  test -z "$as_dir" && as_dir=.
21579    for ac_exec_ext in '' $ac_executable_extensions; do
21580  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21581    ac_cv_prog_ac_ct_CXX="$ac_prog"
21582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21583    break 2
21584  fi
21585done
21586  done
21587IFS=$as_save_IFS
21588
21589fi
21590fi
21591ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21592if test -n "$ac_ct_CXX"; then
21593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21594$as_echo "$ac_ct_CXX" >&6; }
21595else
21596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21597$as_echo "no" >&6; }
21598fi
21599
21600
21601  test -n "$ac_ct_CXX" && break
21602done
21603
21604  if test "x$ac_ct_CXX" = x; then
21605    CXX="g++"
21606  else
21607    case $cross_compiling:$ac_tool_warned in
21608yes:)
21609{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21610$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21611ac_tool_warned=yes ;;
21612esac
21613    CXX=$ac_ct_CXX
21614  fi
21615fi
21616
21617  fi
21618fi
21619# Provide some information about the compiler.
21620$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21621set X $ac_compile
21622ac_compiler=$2
21623for ac_option in --version -v -V -qversion; do
21624  { { ac_try="$ac_compiler $ac_option >&5"
21625case "(($ac_try" in
21626  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21627  *) ac_try_echo=$ac_try;;
21628esac
21629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21630$as_echo "$ac_try_echo"; } >&5
21631  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21632  ac_status=$?
21633  if test -s conftest.err; then
21634    sed '10a\
21635... rest of stderr output deleted ...
21636         10q' conftest.err >conftest.er1
21637    cat conftest.er1 >&5
21638  fi
21639  rm -f conftest.er1 conftest.err
21640  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21641  test $ac_status = 0; }
21642done
21643
21644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21645$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21646if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21647  $as_echo_n "(cached) " >&6
21648else
21649  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21650/* end confdefs.h.  */
21651
21652int
21653main ()
21654{
21655#ifndef __GNUC__
21656       choke me
21657#endif
21658
21659  ;
21660  return 0;
21661}
21662_ACEOF
21663if ac_fn_cxx_try_compile "$LINENO"; then :
21664  ac_compiler_gnu=yes
21665else
21666  ac_compiler_gnu=no
21667fi
21668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21669ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21670
21671fi
21672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21673$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21674if test $ac_compiler_gnu = yes; then
21675  GXX=yes
21676else
21677  GXX=
21678fi
21679ac_test_CXXFLAGS=${CXXFLAGS+set}
21680ac_save_CXXFLAGS=$CXXFLAGS
21681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21682$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21683if test "${ac_cv_prog_cxx_g+set}" = set; then :
21684  $as_echo_n "(cached) " >&6
21685else
21686  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21687   ac_cxx_werror_flag=yes
21688   ac_cv_prog_cxx_g=no
21689   CXXFLAGS="-g"
21690   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21691/* end confdefs.h.  */
21692
21693int
21694main ()
21695{
21696
21697  ;
21698  return 0;
21699}
21700_ACEOF
21701if ac_fn_cxx_try_compile "$LINENO"; then :
21702  ac_cv_prog_cxx_g=yes
21703else
21704  CXXFLAGS=""
21705      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21706/* end confdefs.h.  */
21707
21708int
21709main ()
21710{
21711
21712  ;
21713  return 0;
21714}
21715_ACEOF
21716if ac_fn_cxx_try_compile "$LINENO"; then :
21717
21718else
21719  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21720	 CXXFLAGS="-g"
21721	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21722/* end confdefs.h.  */
21723
21724int
21725main ()
21726{
21727
21728  ;
21729  return 0;
21730}
21731_ACEOF
21732if ac_fn_cxx_try_compile "$LINENO"; then :
21733  ac_cv_prog_cxx_g=yes
21734fi
21735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21736fi
21737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21738fi
21739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21740   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21741fi
21742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21743$as_echo "$ac_cv_prog_cxx_g" >&6; }
21744if test "$ac_test_CXXFLAGS" = set; then
21745  CXXFLAGS=$ac_save_CXXFLAGS
21746elif test $ac_cv_prog_cxx_g = yes; then
21747  if test "$GXX" = yes; then
21748    CXXFLAGS="-g -O2"
21749  else
21750    CXXFLAGS="-g"
21751  fi
21752else
21753  if test "$GXX" = yes; then
21754    CXXFLAGS="-O2"
21755  else
21756    CXXFLAGS=
21757  fi
21758fi
21759ac_ext=cpp
21760ac_cpp='$CXXCPP $CPPFLAGS'
21761ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21762ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21763ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21764
21765
21766### Locate other tools
21767
21768if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21769    ac_ext=m
21770ac_cpp='$OBJCPP $CPPFLAGS'
21771ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21772ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21773ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21774if test -n "$ac_tool_prefix"; then
21775  for ac_prog in gcc objcc objc cc CC
21776  do
21777    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21778set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21780$as_echo_n "checking for $ac_word... " >&6; }
21781if test "${ac_cv_prog_OBJC+set}" = set; then :
21782  $as_echo_n "(cached) " >&6
21783else
21784  if test -n "$OBJC"; then
21785  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21786else
21787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21788for as_dir in $PATH
21789do
21790  IFS=$as_save_IFS
21791  test -z "$as_dir" && as_dir=.
21792    for ac_exec_ext in '' $ac_executable_extensions; do
21793  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21794    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21796    break 2
21797  fi
21798done
21799  done
21800IFS=$as_save_IFS
21801
21802fi
21803fi
21804OBJC=$ac_cv_prog_OBJC
21805if test -n "$OBJC"; then
21806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21807$as_echo "$OBJC" >&6; }
21808else
21809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21810$as_echo "no" >&6; }
21811fi
21812
21813
21814    test -n "$OBJC" && break
21815  done
21816fi
21817if test -z "$OBJC"; then
21818  ac_ct_OBJC=$OBJC
21819  for ac_prog in gcc objcc objc cc CC
21820do
21821  # Extract the first word of "$ac_prog", so it can be a program name with args.
21822set dummy $ac_prog; ac_word=$2
21823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21824$as_echo_n "checking for $ac_word... " >&6; }
21825if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21826  $as_echo_n "(cached) " >&6
21827else
21828  if test -n "$ac_ct_OBJC"; then
21829  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21830else
21831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21832for as_dir in $PATH
21833do
21834  IFS=$as_save_IFS
21835  test -z "$as_dir" && as_dir=.
21836    for ac_exec_ext in '' $ac_executable_extensions; do
21837  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21838    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21840    break 2
21841  fi
21842done
21843  done
21844IFS=$as_save_IFS
21845
21846fi
21847fi
21848ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21849if test -n "$ac_ct_OBJC"; then
21850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21851$as_echo "$ac_ct_OBJC" >&6; }
21852else
21853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21854$as_echo "no" >&6; }
21855fi
21856
21857
21858  test -n "$ac_ct_OBJC" && break
21859done
21860
21861  if test "x$ac_ct_OBJC" = x; then
21862    OBJC="gcc"
21863  else
21864    case $cross_compiling:$ac_tool_warned in
21865yes:)
21866{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21867$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21868ac_tool_warned=yes ;;
21869esac
21870    OBJC=$ac_ct_OBJC
21871  fi
21872fi
21873
21874# Provide some information about the compiler.
21875$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21876set X $ac_compile
21877ac_compiler=$2
21878for ac_option in --version -v -V -qversion; do
21879  { { ac_try="$ac_compiler $ac_option >&5"
21880case "(($ac_try" in
21881  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21882  *) ac_try_echo=$ac_try;;
21883esac
21884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21885$as_echo "$ac_try_echo"; } >&5
21886  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21887  ac_status=$?
21888  if test -s conftest.err; then
21889    sed '10a\
21890... rest of stderr output deleted ...
21891         10q' conftest.err >conftest.er1
21892    cat conftest.er1 >&5
21893  fi
21894  rm -f conftest.er1 conftest.err
21895  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21896  test $ac_status = 0; }
21897done
21898
21899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21900$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21901if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21902  $as_echo_n "(cached) " >&6
21903else
21904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21905/* end confdefs.h.  */
21906
21907int
21908main ()
21909{
21910#ifndef __GNUC__
21911       choke me
21912#endif
21913
21914  ;
21915  return 0;
21916}
21917_ACEOF
21918if ac_fn_objc_try_compile "$LINENO"; then :
21919  ac_compiler_gnu=yes
21920else
21921  ac_compiler_gnu=no
21922fi
21923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21924ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21925
21926fi
21927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21928$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21929if test $ac_compiler_gnu = yes; then
21930  GOBJC=yes
21931else
21932  GOBJC=
21933fi
21934ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21935ac_save_OBJCFLAGS=$OBJCFLAGS
21936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21937$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21938if test "${ac_cv_prog_objc_g+set}" = set; then :
21939  $as_echo_n "(cached) " >&6
21940else
21941  ac_save_objc_werror_flag=$ac_objc_werror_flag
21942   ac_objc_werror_flag=yes
21943   ac_cv_prog_objc_g=no
21944   OBJCFLAGS="-g"
21945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21946/* end confdefs.h.  */
21947
21948int
21949main ()
21950{
21951
21952  ;
21953  return 0;
21954}
21955_ACEOF
21956if ac_fn_objc_try_compile "$LINENO"; then :
21957  ac_cv_prog_objc_g=yes
21958else
21959  OBJCFLAGS=""
21960      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21961/* end confdefs.h.  */
21962
21963int
21964main ()
21965{
21966
21967  ;
21968  return 0;
21969}
21970_ACEOF
21971if ac_fn_objc_try_compile "$LINENO"; then :
21972
21973else
21974  ac_objc_werror_flag=$ac_save_objc_werror_flag
21975	 OBJCFLAGS="-g"
21976	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21977/* end confdefs.h.  */
21978
21979int
21980main ()
21981{
21982
21983  ;
21984  return 0;
21985}
21986_ACEOF
21987if ac_fn_objc_try_compile "$LINENO"; then :
21988  ac_cv_prog_objc_g=yes
21989fi
21990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21991fi
21992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21993fi
21994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21995   ac_objc_werror_flag=$ac_save_objc_werror_flag
21996fi
21997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21998$as_echo "$ac_cv_prog_objc_g" >&6; }
21999if test "$ac_test_OBJCFLAGS" = set; then
22000  OBJCFLAGS=$ac_save_OBJCFLAGS
22001elif test $ac_cv_prog_objc_g = yes; then
22002  if test "$GOBJC" = yes; then
22003    OBJCFLAGS="-g -O2"
22004  else
22005    OBJCFLAGS="-g"
22006  fi
22007else
22008  if test "$GOBJC" = yes; then
22009    OBJCFLAGS="-O2"
22010  else
22011    OBJCFLAGS=
22012  fi
22013fi
22014ac_ext=cpp
22015ac_cpp='$CXXCPP $CPPFLAGS'
22016ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22017ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22018ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22019
22020
22021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22022
22023  # First separate the path from the arguments. This will split at the first
22024  # space.
22025  complete="$OBJC"
22026  path="${complete%% *}"
22027  tmp="$complete EOL"
22028  arguments="${tmp#* }"
22029
22030  # Input might be given as Windows format, start by converting to
22031  # unix format.
22032  new_path=`$CYGPATH -u "$path"`
22033
22034  # Now try to locate executable using which
22035  new_path=`$WHICH "$new_path" 2> /dev/null`
22036  # bat and cmd files are not always considered executable in cygwin causing which
22037  # to not find them
22038  if test "x$new_path" = x \
22039           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22040           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22041    new_path=`$CYGPATH -u "$path"`
22042  fi
22043  if test "x$new_path" = x; then
22044    # Oops. Which didn't find the executable.
22045    # The splitting of arguments from the executable at a space might have been incorrect,
22046    # since paths with space are more likely in Windows. Give it another try with the whole
22047    # argument.
22048    path="$complete"
22049    arguments="EOL"
22050    new_path=`$CYGPATH -u "$path"`
22051    new_path=`$WHICH "$new_path" 2> /dev/null`
22052    # bat and cmd files are not always considered executable in cygwin causing which
22053    # to not find them
22054    if test "x$new_path" = x \
22055             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22056             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22057      new_path=`$CYGPATH -u "$path"`
22058    fi
22059    if test "x$new_path" = x; then
22060      # It's still not found. Now this is an unrecoverable error.
22061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22062$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22063      has_space=`$ECHO "$complete" | $GREP " "`
22064      if test "x$has_space" != x; then
22065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22067      fi
22068      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22069    fi
22070  fi
22071
22072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22075  # "foo.exe" is OK but "foo" is an error.
22076  #
22077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22078  # It is also a way to make sure we got the proper file name for the real test later on.
22079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22080  if test "x$test_shortpath" = x; then
22081    # Short path failed, file does not exist as specified.
22082    # Try adding .exe or .cmd
22083    if test -f "${new_path}.exe"; then
22084       input_to_shortpath="${new_path}.exe"
22085    elif test -f "${new_path}.cmd"; then
22086       input_to_shortpath="${new_path}.cmd"
22087    else
22088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22089$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22090      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22091$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22092      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22093    fi
22094  else
22095    input_to_shortpath="$new_path"
22096  fi
22097
22098  # Call helper function which possibly converts this using DOS-style short mode.
22099  # If so, the updated path is stored in $new_path.
22100  new_path="$input_to_shortpath"
22101
22102  input_path="$input_to_shortpath"
22103  # Check if we need to convert this using DOS-style short mode. If the path
22104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22105  # take no chances and rewrite it.
22106  # Note: m4 eats our [], so we need to use [ and ] instead.
22107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22108  if test "x$has_forbidden_chars" != x; then
22109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22113      # Going to short mode and back again did indeed matter. Since short mode is
22114      # case insensitive, let's make it lowercase to improve readability.
22115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22116      # Now convert it back to Unix-stile (cygpath)
22117      input_path=`$CYGPATH -u "$shortmode_path"`
22118      new_path="$input_path"
22119    fi
22120  fi
22121
22122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22123  if test "x$test_cygdrive_prefix" = x; then
22124    # As a simple fix, exclude /usr/bin since it's not a real path.
22125    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22127      # a path prefixed by /cygdrive for fixpath to work.
22128      new_path="$CYGWIN_ROOT_PATH$input_path"
22129    fi
22130  fi
22131
22132  # remove trailing .exe if any
22133  new_path="${new_path/%.exe/}"
22134
22135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22136
22137  # First separate the path from the arguments. This will split at the first
22138  # space.
22139  complete="$OBJC"
22140  path="${complete%% *}"
22141  tmp="$complete EOL"
22142  arguments="${tmp#* }"
22143
22144  # Input might be given as Windows format, start by converting to
22145  # unix format.
22146  new_path="$path"
22147
22148  windows_path="$new_path"
22149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22150    unix_path=`$CYGPATH -u "$windows_path"`
22151    new_path="$unix_path"
22152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22154    new_path="$unix_path"
22155  fi
22156
22157
22158  # Now try to locate executable using which
22159  new_path=`$WHICH "$new_path" 2> /dev/null`
22160
22161  if test "x$new_path" = x; then
22162    # Oops. Which didn't find the executable.
22163    # The splitting of arguments from the executable at a space might have been incorrect,
22164    # since paths with space are more likely in Windows. Give it another try with the whole
22165    # argument.
22166    path="$complete"
22167    arguments="EOL"
22168    new_path="$path"
22169
22170  windows_path="$new_path"
22171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22172    unix_path=`$CYGPATH -u "$windows_path"`
22173    new_path="$unix_path"
22174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22176    new_path="$unix_path"
22177  fi
22178
22179
22180    new_path=`$WHICH "$new_path" 2> /dev/null`
22181
22182    if test "x$new_path" = x; then
22183      # It's still not found. Now this is an unrecoverable error.
22184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22185$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22186      has_space=`$ECHO "$complete" | $GREP " "`
22187      if test "x$has_space" != x; then
22188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22190      fi
22191      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22192    fi
22193  fi
22194
22195  # Now new_path has a complete unix path to the binary
22196  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22197    # Keep paths in /bin as-is, but remove trailing .exe if any
22198    new_path="${new_path/%.exe/}"
22199    # Do not save /bin paths to all_fixpath_prefixes!
22200  else
22201    # Not in mixed or Windows style, start by that.
22202    new_path=`cmd //c echo $new_path`
22203
22204  input_path="$new_path"
22205  # Check if we need to convert this using DOS-style short mode. If the path
22206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22207  # take no chances and rewrite it.
22208  # Note: m4 eats our [], so we need to use [ and ] instead.
22209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22210  if test "x$has_forbidden_chars" != x; then
22211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22213  fi
22214
22215    # Output is in $new_path
22216
22217  windows_path="$new_path"
22218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22219    unix_path=`$CYGPATH -u "$windows_path"`
22220    new_path="$unix_path"
22221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22223    new_path="$unix_path"
22224  fi
22225
22226    # remove trailing .exe if any
22227    new_path="${new_path/%.exe/}"
22228
22229    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22230    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22231  fi
22232
22233  else
22234    # We're on a posix platform. Hooray! :)
22235    # First separate the path from the arguments. This will split at the first
22236    # space.
22237    complete="$OBJC"
22238    path="${complete%% *}"
22239    tmp="$complete EOL"
22240    arguments="${tmp#* }"
22241
22242    # Cannot rely on the command "which" here since it doesn't always work.
22243    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22244    if test -z "$is_absolute_path"; then
22245      # Path to executable is not absolute. Find it.
22246      IFS_save="$IFS"
22247      IFS=:
22248      for p in $PATH; do
22249        if test -f "$p/$path" && test -x "$p/$path"; then
22250          new_path="$p/$path"
22251          break
22252        fi
22253      done
22254      IFS="$IFS_save"
22255    else
22256      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22257$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22258      new_path="$path"
22259    fi
22260
22261    if test "x$new_path" = x; then
22262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22263$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22264        has_space=`$ECHO "$complete" | $GREP " "`
22265        if test "x$has_space" != x; then
22266          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22267$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22268        fi
22269        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22270      fi
22271  fi
22272
22273      # Now join together the path and the arguments once again
22274      if test "x$arguments" != xEOL; then
22275        new_complete="$new_path ${arguments% *}"
22276      else
22277        new_complete="$new_path"
22278      fi
22279
22280  if test "x$complete" != "x$new_complete"; then
22281      OBJC="$new_complete"
22282      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22283$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22284    fi
22285
22286else
22287    OBJC=
22288fi
22289
22290# Restore the flags to the user specified values.
22291# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22292CFLAGS="$ORG_CFLAGS"
22293CXXFLAGS="$ORG_CXXFLAGS"
22294OBJCFLAGS="$ORG_OBJCFLAGS"
22295
22296LD="$CC"
22297LDEXE="$CC"
22298LDCXX="$CXX"
22299LDEXECXX="$CXX"
22300
22301# LDEXE is the linker to use, when creating executables.
22302
22303# Linking C++ libraries.
22304
22305# Linking C++ executables.
22306
22307
22308if test "x$OPENJDK_TARGET_OS" != xwindows; then
22309    if test -n "$ac_tool_prefix"; then
22310  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22311set dummy ${ac_tool_prefix}ar; ac_word=$2
22312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22313$as_echo_n "checking for $ac_word... " >&6; }
22314if test "${ac_cv_prog_AR+set}" = set; then :
22315  $as_echo_n "(cached) " >&6
22316else
22317  if test -n "$AR"; then
22318  ac_cv_prog_AR="$AR" # Let the user override the test.
22319else
22320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22321for as_dir in $PATH
22322do
22323  IFS=$as_save_IFS
22324  test -z "$as_dir" && as_dir=.
22325    for ac_exec_ext in '' $ac_executable_extensions; do
22326  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22327    ac_cv_prog_AR="${ac_tool_prefix}ar"
22328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22329    break 2
22330  fi
22331done
22332  done
22333IFS=$as_save_IFS
22334
22335fi
22336fi
22337AR=$ac_cv_prog_AR
22338if test -n "$AR"; then
22339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22340$as_echo "$AR" >&6; }
22341else
22342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22343$as_echo "no" >&6; }
22344fi
22345
22346
22347fi
22348if test -z "$ac_cv_prog_AR"; then
22349  ac_ct_AR=$AR
22350  # Extract the first word of "ar", so it can be a program name with args.
22351set dummy ar; ac_word=$2
22352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22353$as_echo_n "checking for $ac_word... " >&6; }
22354if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22355  $as_echo_n "(cached) " >&6
22356else
22357  if test -n "$ac_ct_AR"; then
22358  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22359else
22360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22361for as_dir in $PATH
22362do
22363  IFS=$as_save_IFS
22364  test -z "$as_dir" && as_dir=.
22365    for ac_exec_ext in '' $ac_executable_extensions; do
22366  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22367    ac_cv_prog_ac_ct_AR="ar"
22368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22369    break 2
22370  fi
22371done
22372  done
22373IFS=$as_save_IFS
22374
22375fi
22376fi
22377ac_ct_AR=$ac_cv_prog_ac_ct_AR
22378if test -n "$ac_ct_AR"; then
22379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22380$as_echo "$ac_ct_AR" >&6; }
22381else
22382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22383$as_echo "no" >&6; }
22384fi
22385
22386  if test "x$ac_ct_AR" = x; then
22387    AR=""
22388  else
22389    case $cross_compiling:$ac_tool_warned in
22390yes:)
22391{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22392$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22393ac_tool_warned=yes ;;
22394esac
22395    AR=$ac_ct_AR
22396  fi
22397else
22398  AR="$ac_cv_prog_AR"
22399fi
22400
22401
22402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22403
22404  # First separate the path from the arguments. This will split at the first
22405  # space.
22406  complete="$AR"
22407  path="${complete%% *}"
22408  tmp="$complete EOL"
22409  arguments="${tmp#* }"
22410
22411  # Input might be given as Windows format, start by converting to
22412  # unix format.
22413  new_path=`$CYGPATH -u "$path"`
22414
22415  # Now try to locate executable using which
22416  new_path=`$WHICH "$new_path" 2> /dev/null`
22417  # bat and cmd files are not always considered executable in cygwin causing which
22418  # to not find them
22419  if test "x$new_path" = x \
22420           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22421           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22422    new_path=`$CYGPATH -u "$path"`
22423  fi
22424  if test "x$new_path" = x; then
22425    # Oops. Which didn't find the executable.
22426    # The splitting of arguments from the executable at a space might have been incorrect,
22427    # since paths with space are more likely in Windows. Give it another try with the whole
22428    # argument.
22429    path="$complete"
22430    arguments="EOL"
22431    new_path=`$CYGPATH -u "$path"`
22432    new_path=`$WHICH "$new_path" 2> /dev/null`
22433    # bat and cmd files are not always considered executable in cygwin causing which
22434    # to not find them
22435    if test "x$new_path" = x \
22436             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22437             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22438      new_path=`$CYGPATH -u "$path"`
22439    fi
22440    if test "x$new_path" = x; then
22441      # It's still not found. Now this is an unrecoverable error.
22442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22443$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22444      has_space=`$ECHO "$complete" | $GREP " "`
22445      if test "x$has_space" != x; then
22446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22448      fi
22449      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22450    fi
22451  fi
22452
22453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22456  # "foo.exe" is OK but "foo" is an error.
22457  #
22458  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22459  # It is also a way to make sure we got the proper file name for the real test later on.
22460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22461  if test "x$test_shortpath" = x; then
22462    # Short path failed, file does not exist as specified.
22463    # Try adding .exe or .cmd
22464    if test -f "${new_path}.exe"; then
22465       input_to_shortpath="${new_path}.exe"
22466    elif test -f "${new_path}.cmd"; then
22467       input_to_shortpath="${new_path}.cmd"
22468    else
22469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22470$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22471      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22472$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22473      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22474    fi
22475  else
22476    input_to_shortpath="$new_path"
22477  fi
22478
22479  # Call helper function which possibly converts this using DOS-style short mode.
22480  # If so, the updated path is stored in $new_path.
22481  new_path="$input_to_shortpath"
22482
22483  input_path="$input_to_shortpath"
22484  # Check if we need to convert this using DOS-style short mode. If the path
22485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22486  # take no chances and rewrite it.
22487  # Note: m4 eats our [], so we need to use [ and ] instead.
22488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22489  if test "x$has_forbidden_chars" != x; then
22490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22494      # Going to short mode and back again did indeed matter. Since short mode is
22495      # case insensitive, let's make it lowercase to improve readability.
22496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22497      # Now convert it back to Unix-stile (cygpath)
22498      input_path=`$CYGPATH -u "$shortmode_path"`
22499      new_path="$input_path"
22500    fi
22501  fi
22502
22503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22504  if test "x$test_cygdrive_prefix" = x; then
22505    # As a simple fix, exclude /usr/bin since it's not a real path.
22506    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22508      # a path prefixed by /cygdrive for fixpath to work.
22509      new_path="$CYGWIN_ROOT_PATH$input_path"
22510    fi
22511  fi
22512
22513  # remove trailing .exe if any
22514  new_path="${new_path/%.exe/}"
22515
22516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22517
22518  # First separate the path from the arguments. This will split at the first
22519  # space.
22520  complete="$AR"
22521  path="${complete%% *}"
22522  tmp="$complete EOL"
22523  arguments="${tmp#* }"
22524
22525  # Input might be given as Windows format, start by converting to
22526  # unix format.
22527  new_path="$path"
22528
22529  windows_path="$new_path"
22530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22531    unix_path=`$CYGPATH -u "$windows_path"`
22532    new_path="$unix_path"
22533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22535    new_path="$unix_path"
22536  fi
22537
22538
22539  # Now try to locate executable using which
22540  new_path=`$WHICH "$new_path" 2> /dev/null`
22541
22542  if test "x$new_path" = x; then
22543    # Oops. Which didn't find the executable.
22544    # The splitting of arguments from the executable at a space might have been incorrect,
22545    # since paths with space are more likely in Windows. Give it another try with the whole
22546    # argument.
22547    path="$complete"
22548    arguments="EOL"
22549    new_path="$path"
22550
22551  windows_path="$new_path"
22552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22553    unix_path=`$CYGPATH -u "$windows_path"`
22554    new_path="$unix_path"
22555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22557    new_path="$unix_path"
22558  fi
22559
22560
22561    new_path=`$WHICH "$new_path" 2> /dev/null`
22562
22563    if test "x$new_path" = x; then
22564      # It's still not found. Now this is an unrecoverable error.
22565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22566$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22567      has_space=`$ECHO "$complete" | $GREP " "`
22568      if test "x$has_space" != x; then
22569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22571      fi
22572      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22573    fi
22574  fi
22575
22576  # Now new_path has a complete unix path to the binary
22577  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22578    # Keep paths in /bin as-is, but remove trailing .exe if any
22579    new_path="${new_path/%.exe/}"
22580    # Do not save /bin paths to all_fixpath_prefixes!
22581  else
22582    # Not in mixed or Windows style, start by that.
22583    new_path=`cmd //c echo $new_path`
22584
22585  input_path="$new_path"
22586  # Check if we need to convert this using DOS-style short mode. If the path
22587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22588  # take no chances and rewrite it.
22589  # Note: m4 eats our [], so we need to use [ and ] instead.
22590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22591  if test "x$has_forbidden_chars" != x; then
22592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22593    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22594  fi
22595
22596    # Output is in $new_path
22597
22598  windows_path="$new_path"
22599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22600    unix_path=`$CYGPATH -u "$windows_path"`
22601    new_path="$unix_path"
22602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22604    new_path="$unix_path"
22605  fi
22606
22607    # remove trailing .exe if any
22608    new_path="${new_path/%.exe/}"
22609
22610    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22611    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22612  fi
22613
22614  else
22615    # We're on a posix platform. Hooray! :)
22616    # First separate the path from the arguments. This will split at the first
22617    # space.
22618    complete="$AR"
22619    path="${complete%% *}"
22620    tmp="$complete EOL"
22621    arguments="${tmp#* }"
22622
22623    # Cannot rely on the command "which" here since it doesn't always work.
22624    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22625    if test -z "$is_absolute_path"; then
22626      # Path to executable is not absolute. Find it.
22627      IFS_save="$IFS"
22628      IFS=:
22629      for p in $PATH; do
22630        if test -f "$p/$path" && test -x "$p/$path"; then
22631          new_path="$p/$path"
22632          break
22633        fi
22634      done
22635      IFS="$IFS_save"
22636    else
22637      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22638$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22639      new_path="$path"
22640    fi
22641
22642    if test "x$new_path" = x; then
22643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22644$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22645        has_space=`$ECHO "$complete" | $GREP " "`
22646        if test "x$has_space" != x; then
22647          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22648$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22649        fi
22650        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22651      fi
22652  fi
22653
22654      # Now join together the path and the arguments once again
22655      if test "x$arguments" != xEOL; then
22656        new_complete="$new_path ${arguments% *}"
22657      else
22658        new_complete="$new_path"
22659      fi
22660
22661  if test "x$complete" != "x$new_complete"; then
22662      AR="$new_complete"
22663      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22664$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22665    fi
22666
22667fi
22668if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22669    ARFLAGS="-r"
22670else
22671    ARFLAGS=""
22672fi
22673
22674
22675# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22676HOTSPOT_CXX="$CXX"
22677HOTSPOT_LD="$LD"
22678
22679
22680
22681COMPILER_NAME=gcc
22682COMPILER_TYPE=CC
22683if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22684
22685    # For now, assume that we are always compiling using cl.exe.
22686    CC_OUT_OPTION=-Fo
22687    EXE_OUT_OPTION=-out:
22688    LD_OUT_OPTION=-out:
22689    AR_OUT_OPTION=-out:
22690    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22691    # program for something completely different.
22692    # Extract the first word of "link", so it can be a program name with args.
22693set dummy link; ac_word=$2
22694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22695$as_echo_n "checking for $ac_word... " >&6; }
22696if test "${ac_cv_prog_WINLD+set}" = set; then :
22697  $as_echo_n "(cached) " >&6
22698else
22699  if test -n "$WINLD"; then
22700  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22701else
22702  ac_prog_rejected=no
22703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22704for as_dir in $PATH
22705do
22706  IFS=$as_save_IFS
22707  test -z "$as_dir" && as_dir=.
22708    for ac_exec_ext in '' $ac_executable_extensions; do
22709  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22710    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22711       ac_prog_rejected=yes
22712       continue
22713     fi
22714    ac_cv_prog_WINLD="link"
22715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22716    break 2
22717  fi
22718done
22719  done
22720IFS=$as_save_IFS
22721
22722if test $ac_prog_rejected = yes; then
22723  # We found a bogon in the path, so make sure we never use it.
22724  set dummy $ac_cv_prog_WINLD
22725  shift
22726  if test $# != 0; then
22727    # We chose a different compiler from the bogus one.
22728    # However, it has the same basename, so the bogon will be chosen
22729    # first if we set WINLD to just the basename; use the full file name.
22730    shift
22731    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22732  fi
22733fi
22734fi
22735fi
22736WINLD=$ac_cv_prog_WINLD
22737if test -n "$WINLD"; then
22738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22739$as_echo "$WINLD" >&6; }
22740else
22741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22742$as_echo "no" >&6; }
22743fi
22744
22745
22746    # Since we must ignore the first found link, WINLD will contain
22747    # the full path to the link.exe program.
22748
22749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22750
22751  # First separate the path from the arguments. This will split at the first
22752  # space.
22753  complete="$WINLD"
22754  path="${complete%% *}"
22755  tmp="$complete EOL"
22756  arguments="${tmp#* }"
22757
22758  # Input might be given as Windows format, start by converting to
22759  # unix format.
22760  new_path=`$CYGPATH -u "$path"`
22761
22762  # Now try to locate executable using which
22763  new_path=`$WHICH "$new_path" 2> /dev/null`
22764  # bat and cmd files are not always considered executable in cygwin causing which
22765  # to not find them
22766  if test "x$new_path" = x \
22767           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22768           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22769    new_path=`$CYGPATH -u "$path"`
22770  fi
22771  if test "x$new_path" = x; then
22772    # Oops. Which didn't find the executable.
22773    # The splitting of arguments from the executable at a space might have been incorrect,
22774    # since paths with space are more likely in Windows. Give it another try with the whole
22775    # argument.
22776    path="$complete"
22777    arguments="EOL"
22778    new_path=`$CYGPATH -u "$path"`
22779    new_path=`$WHICH "$new_path" 2> /dev/null`
22780    # bat and cmd files are not always considered executable in cygwin causing which
22781    # to not find them
22782    if test "x$new_path" = x \
22783             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22784             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22785      new_path=`$CYGPATH -u "$path"`
22786    fi
22787    if test "x$new_path" = x; then
22788      # It's still not found. Now this is an unrecoverable error.
22789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22790$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22791      has_space=`$ECHO "$complete" | $GREP " "`
22792      if test "x$has_space" != x; then
22793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22795      fi
22796      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22797    fi
22798  fi
22799
22800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22803  # "foo.exe" is OK but "foo" is an error.
22804  #
22805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22806  # It is also a way to make sure we got the proper file name for the real test later on.
22807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22808  if test "x$test_shortpath" = x; then
22809    # Short path failed, file does not exist as specified.
22810    # Try adding .exe or .cmd
22811    if test -f "${new_path}.exe"; then
22812       input_to_shortpath="${new_path}.exe"
22813    elif test -f "${new_path}.cmd"; then
22814       input_to_shortpath="${new_path}.cmd"
22815    else
22816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22817$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22818      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22819$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22820      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22821    fi
22822  else
22823    input_to_shortpath="$new_path"
22824  fi
22825
22826  # Call helper function which possibly converts this using DOS-style short mode.
22827  # If so, the updated path is stored in $new_path.
22828  new_path="$input_to_shortpath"
22829
22830  input_path="$input_to_shortpath"
22831  # Check if we need to convert this using DOS-style short mode. If the path
22832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22833  # take no chances and rewrite it.
22834  # Note: m4 eats our [], so we need to use [ and ] instead.
22835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22836  if test "x$has_forbidden_chars" != x; then
22837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22841      # Going to short mode and back again did indeed matter. Since short mode is
22842      # case insensitive, let's make it lowercase to improve readability.
22843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22844      # Now convert it back to Unix-stile (cygpath)
22845      input_path=`$CYGPATH -u "$shortmode_path"`
22846      new_path="$input_path"
22847    fi
22848  fi
22849
22850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22851  if test "x$test_cygdrive_prefix" = x; then
22852    # As a simple fix, exclude /usr/bin since it's not a real path.
22853    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22855      # a path prefixed by /cygdrive for fixpath to work.
22856      new_path="$CYGWIN_ROOT_PATH$input_path"
22857    fi
22858  fi
22859
22860  # remove trailing .exe if any
22861  new_path="${new_path/%.exe/}"
22862
22863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22864
22865  # First separate the path from the arguments. This will split at the first
22866  # space.
22867  complete="$WINLD"
22868  path="${complete%% *}"
22869  tmp="$complete EOL"
22870  arguments="${tmp#* }"
22871
22872  # Input might be given as Windows format, start by converting to
22873  # unix format.
22874  new_path="$path"
22875
22876  windows_path="$new_path"
22877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22878    unix_path=`$CYGPATH -u "$windows_path"`
22879    new_path="$unix_path"
22880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22882    new_path="$unix_path"
22883  fi
22884
22885
22886  # Now try to locate executable using which
22887  new_path=`$WHICH "$new_path" 2> /dev/null`
22888
22889  if test "x$new_path" = x; then
22890    # Oops. Which didn't find the executable.
22891    # The splitting of arguments from the executable at a space might have been incorrect,
22892    # since paths with space are more likely in Windows. Give it another try with the whole
22893    # argument.
22894    path="$complete"
22895    arguments="EOL"
22896    new_path="$path"
22897
22898  windows_path="$new_path"
22899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22900    unix_path=`$CYGPATH -u "$windows_path"`
22901    new_path="$unix_path"
22902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22904    new_path="$unix_path"
22905  fi
22906
22907
22908    new_path=`$WHICH "$new_path" 2> /dev/null`
22909
22910    if test "x$new_path" = x; then
22911      # It's still not found. Now this is an unrecoverable error.
22912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22913$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22914      has_space=`$ECHO "$complete" | $GREP " "`
22915      if test "x$has_space" != x; then
22916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22918      fi
22919      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22920    fi
22921  fi
22922
22923  # Now new_path has a complete unix path to the binary
22924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22925    # Keep paths in /bin as-is, but remove trailing .exe if any
22926    new_path="${new_path/%.exe/}"
22927    # Do not save /bin paths to all_fixpath_prefixes!
22928  else
22929    # Not in mixed or Windows style, start by that.
22930    new_path=`cmd //c echo $new_path`
22931
22932  input_path="$new_path"
22933  # Check if we need to convert this using DOS-style short mode. If the path
22934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22935  # take no chances and rewrite it.
22936  # Note: m4 eats our [], so we need to use [ and ] instead.
22937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22938  if test "x$has_forbidden_chars" != x; then
22939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22941  fi
22942
22943    # Output is in $new_path
22944
22945  windows_path="$new_path"
22946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22947    unix_path=`$CYGPATH -u "$windows_path"`
22948    new_path="$unix_path"
22949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22951    new_path="$unix_path"
22952  fi
22953
22954    # remove trailing .exe if any
22955    new_path="${new_path/%.exe/}"
22956
22957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22959  fi
22960
22961  else
22962    # We're on a posix platform. Hooray! :)
22963    # First separate the path from the arguments. This will split at the first
22964    # space.
22965    complete="$WINLD"
22966    path="${complete%% *}"
22967    tmp="$complete EOL"
22968    arguments="${tmp#* }"
22969
22970    # Cannot rely on the command "which" here since it doesn't always work.
22971    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22972    if test -z "$is_absolute_path"; then
22973      # Path to executable is not absolute. Find it.
22974      IFS_save="$IFS"
22975      IFS=:
22976      for p in $PATH; do
22977        if test -f "$p/$path" && test -x "$p/$path"; then
22978          new_path="$p/$path"
22979          break
22980        fi
22981      done
22982      IFS="$IFS_save"
22983    else
22984      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22985$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22986      new_path="$path"
22987    fi
22988
22989    if test "x$new_path" = x; then
22990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22991$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22992        has_space=`$ECHO "$complete" | $GREP " "`
22993        if test "x$has_space" != x; then
22994          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22995$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22996        fi
22997        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22998      fi
22999  fi
23000
23001      # Now join together the path and the arguments once again
23002      if test "x$arguments" != xEOL; then
23003        new_complete="$new_path ${arguments% *}"
23004      else
23005        new_complete="$new_path"
23006      fi
23007
23008  if test "x$complete" != "x$new_complete"; then
23009      WINLD="$new_complete"
23010      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23011$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23012    fi
23013
23014    printf "Windows linker was found at $WINLD\n"
23015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23016$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23017    "$WINLD" --version > /dev/null
23018    if test $? -eq 0 ; then
23019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23020$as_echo "no" >&6; }
23021      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23022    else
23023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23024$as_echo "yes" >&6; }
23025    fi
23026    LD="$WINLD"
23027    LDEXE="$WINLD"
23028    LDCXX="$WINLD"
23029    LDEXECXX="$WINLD"
23030
23031    # Extract the first word of "mt", so it can be a program name with args.
23032set dummy mt; ac_word=$2
23033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23034$as_echo_n "checking for $ac_word... " >&6; }
23035if test "${ac_cv_prog_MT+set}" = set; then :
23036  $as_echo_n "(cached) " >&6
23037else
23038  if test -n "$MT"; then
23039  ac_cv_prog_MT="$MT" # Let the user override the test.
23040else
23041  ac_prog_rejected=no
23042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23043for as_dir in $PATH
23044do
23045  IFS=$as_save_IFS
23046  test -z "$as_dir" && as_dir=.
23047    for ac_exec_ext in '' $ac_executable_extensions; do
23048  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23049    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23050       ac_prog_rejected=yes
23051       continue
23052     fi
23053    ac_cv_prog_MT="mt"
23054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23055    break 2
23056  fi
23057done
23058  done
23059IFS=$as_save_IFS
23060
23061if test $ac_prog_rejected = yes; then
23062  # We found a bogon in the path, so make sure we never use it.
23063  set dummy $ac_cv_prog_MT
23064  shift
23065  if test $# != 0; then
23066    # We chose a different compiler from the bogus one.
23067    # However, it has the same basename, so the bogon will be chosen
23068    # first if we set MT to just the basename; use the full file name.
23069    shift
23070    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23071  fi
23072fi
23073fi
23074fi
23075MT=$ac_cv_prog_MT
23076if test -n "$MT"; then
23077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23078$as_echo "$MT" >&6; }
23079else
23080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23081$as_echo "no" >&6; }
23082fi
23083
23084
23085
23086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23087
23088  # First separate the path from the arguments. This will split at the first
23089  # space.
23090  complete="$MT"
23091  path="${complete%% *}"
23092  tmp="$complete EOL"
23093  arguments="${tmp#* }"
23094
23095  # Input might be given as Windows format, start by converting to
23096  # unix format.
23097  new_path=`$CYGPATH -u "$path"`
23098
23099  # Now try to locate executable using which
23100  new_path=`$WHICH "$new_path" 2> /dev/null`
23101  # bat and cmd files are not always considered executable in cygwin causing which
23102  # to not find them
23103  if test "x$new_path" = x \
23104           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23105           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23106    new_path=`$CYGPATH -u "$path"`
23107  fi
23108  if test "x$new_path" = x; then
23109    # Oops. Which didn't find the executable.
23110    # The splitting of arguments from the executable at a space might have been incorrect,
23111    # since paths with space are more likely in Windows. Give it another try with the whole
23112    # argument.
23113    path="$complete"
23114    arguments="EOL"
23115    new_path=`$CYGPATH -u "$path"`
23116    new_path=`$WHICH "$new_path" 2> /dev/null`
23117    # bat and cmd files are not always considered executable in cygwin causing which
23118    # to not find them
23119    if test "x$new_path" = x \
23120             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23121             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23122      new_path=`$CYGPATH -u "$path"`
23123    fi
23124    if test "x$new_path" = x; then
23125      # It's still not found. Now this is an unrecoverable error.
23126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23127$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23128      has_space=`$ECHO "$complete" | $GREP " "`
23129      if test "x$has_space" != x; then
23130        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23131$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23132      fi
23133      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23134    fi
23135  fi
23136
23137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23140  # "foo.exe" is OK but "foo" is an error.
23141  #
23142  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23143  # It is also a way to make sure we got the proper file name for the real test later on.
23144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23145  if test "x$test_shortpath" = x; then
23146    # Short path failed, file does not exist as specified.
23147    # Try adding .exe or .cmd
23148    if test -f "${new_path}.exe"; then
23149       input_to_shortpath="${new_path}.exe"
23150    elif test -f "${new_path}.cmd"; then
23151       input_to_shortpath="${new_path}.cmd"
23152    else
23153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23154$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23155      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23156$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23157      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23158    fi
23159  else
23160    input_to_shortpath="$new_path"
23161  fi
23162
23163  # Call helper function which possibly converts this using DOS-style short mode.
23164  # If so, the updated path is stored in $new_path.
23165  new_path="$input_to_shortpath"
23166
23167  input_path="$input_to_shortpath"
23168  # Check if we need to convert this using DOS-style short mode. If the path
23169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23170  # take no chances and rewrite it.
23171  # Note: m4 eats our [], so we need to use [ and ] instead.
23172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23173  if test "x$has_forbidden_chars" != x; then
23174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23178      # Going to short mode and back again did indeed matter. Since short mode is
23179      # case insensitive, let's make it lowercase to improve readability.
23180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23181      # Now convert it back to Unix-stile (cygpath)
23182      input_path=`$CYGPATH -u "$shortmode_path"`
23183      new_path="$input_path"
23184    fi
23185  fi
23186
23187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23188  if test "x$test_cygdrive_prefix" = x; then
23189    # As a simple fix, exclude /usr/bin since it's not a real path.
23190    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23192      # a path prefixed by /cygdrive for fixpath to work.
23193      new_path="$CYGWIN_ROOT_PATH$input_path"
23194    fi
23195  fi
23196
23197  # remove trailing .exe if any
23198  new_path="${new_path/%.exe/}"
23199
23200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23201
23202  # First separate the path from the arguments. This will split at the first
23203  # space.
23204  complete="$MT"
23205  path="${complete%% *}"
23206  tmp="$complete EOL"
23207  arguments="${tmp#* }"
23208
23209  # Input might be given as Windows format, start by converting to
23210  # unix format.
23211  new_path="$path"
23212
23213  windows_path="$new_path"
23214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23215    unix_path=`$CYGPATH -u "$windows_path"`
23216    new_path="$unix_path"
23217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23219    new_path="$unix_path"
23220  fi
23221
23222
23223  # Now try to locate executable using which
23224  new_path=`$WHICH "$new_path" 2> /dev/null`
23225
23226  if test "x$new_path" = x; then
23227    # Oops. Which didn't find the executable.
23228    # The splitting of arguments from the executable at a space might have been incorrect,
23229    # since paths with space are more likely in Windows. Give it another try with the whole
23230    # argument.
23231    path="$complete"
23232    arguments="EOL"
23233    new_path="$path"
23234
23235  windows_path="$new_path"
23236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23237    unix_path=`$CYGPATH -u "$windows_path"`
23238    new_path="$unix_path"
23239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23241    new_path="$unix_path"
23242  fi
23243
23244
23245    new_path=`$WHICH "$new_path" 2> /dev/null`
23246
23247    if test "x$new_path" = x; then
23248      # It's still not found. Now this is an unrecoverable error.
23249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23250$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23251      has_space=`$ECHO "$complete" | $GREP " "`
23252      if test "x$has_space" != x; then
23253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23255      fi
23256      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23257    fi
23258  fi
23259
23260  # Now new_path has a complete unix path to the binary
23261  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23262    # Keep paths in /bin as-is, but remove trailing .exe if any
23263    new_path="${new_path/%.exe/}"
23264    # Do not save /bin paths to all_fixpath_prefixes!
23265  else
23266    # Not in mixed or Windows style, start by that.
23267    new_path=`cmd //c echo $new_path`
23268
23269  input_path="$new_path"
23270  # Check if we need to convert this using DOS-style short mode. If the path
23271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23272  # take no chances and rewrite it.
23273  # Note: m4 eats our [], so we need to use [ and ] instead.
23274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23275  if test "x$has_forbidden_chars" != x; then
23276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23278  fi
23279
23280    # Output is in $new_path
23281
23282  windows_path="$new_path"
23283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23284    unix_path=`$CYGPATH -u "$windows_path"`
23285    new_path="$unix_path"
23286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23288    new_path="$unix_path"
23289  fi
23290
23291    # remove trailing .exe if any
23292    new_path="${new_path/%.exe/}"
23293
23294    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23295    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23296  fi
23297
23298  else
23299    # We're on a posix platform. Hooray! :)
23300    # First separate the path from the arguments. This will split at the first
23301    # space.
23302    complete="$MT"
23303    path="${complete%% *}"
23304    tmp="$complete EOL"
23305    arguments="${tmp#* }"
23306
23307    # Cannot rely on the command "which" here since it doesn't always work.
23308    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23309    if test -z "$is_absolute_path"; then
23310      # Path to executable is not absolute. Find it.
23311      IFS_save="$IFS"
23312      IFS=:
23313      for p in $PATH; do
23314        if test -f "$p/$path" && test -x "$p/$path"; then
23315          new_path="$p/$path"
23316          break
23317        fi
23318      done
23319      IFS="$IFS_save"
23320    else
23321      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23322$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23323      new_path="$path"
23324    fi
23325
23326    if test "x$new_path" = x; then
23327        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23328$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23329        has_space=`$ECHO "$complete" | $GREP " "`
23330        if test "x$has_space" != x; then
23331          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23332$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23333        fi
23334        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23335      fi
23336  fi
23337
23338      # Now join together the path and the arguments once again
23339      if test "x$arguments" != xEOL; then
23340        new_complete="$new_path ${arguments% *}"
23341      else
23342        new_complete="$new_path"
23343      fi
23344
23345  if test "x$complete" != "x$new_complete"; then
23346      MT="$new_complete"
23347      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23348$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23349    fi
23350
23351    # The resource compiler
23352    # Extract the first word of "rc", so it can be a program name with args.
23353set dummy rc; ac_word=$2
23354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23355$as_echo_n "checking for $ac_word... " >&6; }
23356if test "${ac_cv_prog_RC+set}" = set; then :
23357  $as_echo_n "(cached) " >&6
23358else
23359  if test -n "$RC"; then
23360  ac_cv_prog_RC="$RC" # Let the user override the test.
23361else
23362  ac_prog_rejected=no
23363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23364for as_dir in $PATH
23365do
23366  IFS=$as_save_IFS
23367  test -z "$as_dir" && as_dir=.
23368    for ac_exec_ext in '' $ac_executable_extensions; do
23369  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23370    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23371       ac_prog_rejected=yes
23372       continue
23373     fi
23374    ac_cv_prog_RC="rc"
23375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23376    break 2
23377  fi
23378done
23379  done
23380IFS=$as_save_IFS
23381
23382if test $ac_prog_rejected = yes; then
23383  # We found a bogon in the path, so make sure we never use it.
23384  set dummy $ac_cv_prog_RC
23385  shift
23386  if test $# != 0; then
23387    # We chose a different compiler from the bogus one.
23388    # However, it has the same basename, so the bogon will be chosen
23389    # first if we set RC to just the basename; use the full file name.
23390    shift
23391    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23392  fi
23393fi
23394fi
23395fi
23396RC=$ac_cv_prog_RC
23397if test -n "$RC"; then
23398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23399$as_echo "$RC" >&6; }
23400else
23401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23402$as_echo "no" >&6; }
23403fi
23404
23405
23406
23407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23408
23409  # First separate the path from the arguments. This will split at the first
23410  # space.
23411  complete="$RC"
23412  path="${complete%% *}"
23413  tmp="$complete EOL"
23414  arguments="${tmp#* }"
23415
23416  # Input might be given as Windows format, start by converting to
23417  # unix format.
23418  new_path=`$CYGPATH -u "$path"`
23419
23420  # Now try to locate executable using which
23421  new_path=`$WHICH "$new_path" 2> /dev/null`
23422  # bat and cmd files are not always considered executable in cygwin causing which
23423  # to not find them
23424  if test "x$new_path" = x \
23425           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23426           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23427    new_path=`$CYGPATH -u "$path"`
23428  fi
23429  if test "x$new_path" = x; then
23430    # Oops. Which didn't find the executable.
23431    # The splitting of arguments from the executable at a space might have been incorrect,
23432    # since paths with space are more likely in Windows. Give it another try with the whole
23433    # argument.
23434    path="$complete"
23435    arguments="EOL"
23436    new_path=`$CYGPATH -u "$path"`
23437    new_path=`$WHICH "$new_path" 2> /dev/null`
23438    # bat and cmd files are not always considered executable in cygwin causing which
23439    # to not find them
23440    if test "x$new_path" = x \
23441             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23442             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23443      new_path=`$CYGPATH -u "$path"`
23444    fi
23445    if test "x$new_path" = x; then
23446      # It's still not found. Now this is an unrecoverable error.
23447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23448$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23449      has_space=`$ECHO "$complete" | $GREP " "`
23450      if test "x$has_space" != x; then
23451        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23452$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23453      fi
23454      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23455    fi
23456  fi
23457
23458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23461  # "foo.exe" is OK but "foo" is an error.
23462  #
23463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23464  # It is also a way to make sure we got the proper file name for the real test later on.
23465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23466  if test "x$test_shortpath" = x; then
23467    # Short path failed, file does not exist as specified.
23468    # Try adding .exe or .cmd
23469    if test -f "${new_path}.exe"; then
23470       input_to_shortpath="${new_path}.exe"
23471    elif test -f "${new_path}.cmd"; then
23472       input_to_shortpath="${new_path}.cmd"
23473    else
23474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23475$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23476      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23477$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23478      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23479    fi
23480  else
23481    input_to_shortpath="$new_path"
23482  fi
23483
23484  # Call helper function which possibly converts this using DOS-style short mode.
23485  # If so, the updated path is stored in $new_path.
23486  new_path="$input_to_shortpath"
23487
23488  input_path="$input_to_shortpath"
23489  # Check if we need to convert this using DOS-style short mode. If the path
23490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23491  # take no chances and rewrite it.
23492  # Note: m4 eats our [], so we need to use [ and ] instead.
23493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23494  if test "x$has_forbidden_chars" != x; then
23495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23499      # Going to short mode and back again did indeed matter. Since short mode is
23500      # case insensitive, let's make it lowercase to improve readability.
23501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23502      # Now convert it back to Unix-stile (cygpath)
23503      input_path=`$CYGPATH -u "$shortmode_path"`
23504      new_path="$input_path"
23505    fi
23506  fi
23507
23508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23509  if test "x$test_cygdrive_prefix" = x; then
23510    # As a simple fix, exclude /usr/bin since it's not a real path.
23511    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23513      # a path prefixed by /cygdrive for fixpath to work.
23514      new_path="$CYGWIN_ROOT_PATH$input_path"
23515    fi
23516  fi
23517
23518  # remove trailing .exe if any
23519  new_path="${new_path/%.exe/}"
23520
23521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23522
23523  # First separate the path from the arguments. This will split at the first
23524  # space.
23525  complete="$RC"
23526  path="${complete%% *}"
23527  tmp="$complete EOL"
23528  arguments="${tmp#* }"
23529
23530  # Input might be given as Windows format, start by converting to
23531  # unix format.
23532  new_path="$path"
23533
23534  windows_path="$new_path"
23535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23536    unix_path=`$CYGPATH -u "$windows_path"`
23537    new_path="$unix_path"
23538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23540    new_path="$unix_path"
23541  fi
23542
23543
23544  # Now try to locate executable using which
23545  new_path=`$WHICH "$new_path" 2> /dev/null`
23546
23547  if test "x$new_path" = x; then
23548    # Oops. Which didn't find the executable.
23549    # The splitting of arguments from the executable at a space might have been incorrect,
23550    # since paths with space are more likely in Windows. Give it another try with the whole
23551    # argument.
23552    path="$complete"
23553    arguments="EOL"
23554    new_path="$path"
23555
23556  windows_path="$new_path"
23557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23558    unix_path=`$CYGPATH -u "$windows_path"`
23559    new_path="$unix_path"
23560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23562    new_path="$unix_path"
23563  fi
23564
23565
23566    new_path=`$WHICH "$new_path" 2> /dev/null`
23567
23568    if test "x$new_path" = x; then
23569      # It's still not found. Now this is an unrecoverable error.
23570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23571$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23572      has_space=`$ECHO "$complete" | $GREP " "`
23573      if test "x$has_space" != x; then
23574        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23575$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23576      fi
23577      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23578    fi
23579  fi
23580
23581  # Now new_path has a complete unix path to the binary
23582  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23583    # Keep paths in /bin as-is, but remove trailing .exe if any
23584    new_path="${new_path/%.exe/}"
23585    # Do not save /bin paths to all_fixpath_prefixes!
23586  else
23587    # Not in mixed or Windows style, start by that.
23588    new_path=`cmd //c echo $new_path`
23589
23590  input_path="$new_path"
23591  # Check if we need to convert this using DOS-style short mode. If the path
23592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23593  # take no chances and rewrite it.
23594  # Note: m4 eats our [], so we need to use [ and ] instead.
23595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23596  if test "x$has_forbidden_chars" != x; then
23597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23599  fi
23600
23601    # Output is in $new_path
23602
23603  windows_path="$new_path"
23604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23605    unix_path=`$CYGPATH -u "$windows_path"`
23606    new_path="$unix_path"
23607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23609    new_path="$unix_path"
23610  fi
23611
23612    # remove trailing .exe if any
23613    new_path="${new_path/%.exe/}"
23614
23615    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23616    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23617  fi
23618
23619  else
23620    # We're on a posix platform. Hooray! :)
23621    # First separate the path from the arguments. This will split at the first
23622    # space.
23623    complete="$RC"
23624    path="${complete%% *}"
23625    tmp="$complete EOL"
23626    arguments="${tmp#* }"
23627
23628    # Cannot rely on the command "which" here since it doesn't always work.
23629    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23630    if test -z "$is_absolute_path"; then
23631      # Path to executable is not absolute. Find it.
23632      IFS_save="$IFS"
23633      IFS=:
23634      for p in $PATH; do
23635        if test -f "$p/$path" && test -x "$p/$path"; then
23636          new_path="$p/$path"
23637          break
23638        fi
23639      done
23640      IFS="$IFS_save"
23641    else
23642      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23643$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23644      new_path="$path"
23645    fi
23646
23647    if test "x$new_path" = x; then
23648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23649$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23650        has_space=`$ECHO "$complete" | $GREP " "`
23651        if test "x$has_space" != x; then
23652          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23653$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23654        fi
23655        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23656      fi
23657  fi
23658
23659      # Now join together the path and the arguments once again
23660      if test "x$arguments" != xEOL; then
23661        new_complete="$new_path ${arguments% *}"
23662      else
23663        new_complete="$new_path"
23664      fi
23665
23666  if test "x$complete" != "x$new_complete"; then
23667      RC="$new_complete"
23668      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23669$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23670    fi
23671
23672
23673    # For hotspot, we need these in Windows mixed path,
23674    # so rewrite them all. Need added .exe suffix.
23675    HOTSPOT_CXX="$CXX.exe"
23676    HOTSPOT_LD="$LD.exe"
23677    HOTSPOT_MT="$MT.exe"
23678    HOTSPOT_RC="$RC.exe"
23679
23680  unix_path="$HOTSPOT_CXX"
23681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23682    windows_path=`$CYGPATH -m "$unix_path"`
23683    HOTSPOT_CXX="$windows_path"
23684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23685    windows_path=`cmd //c echo $unix_path`
23686    HOTSPOT_CXX="$windows_path"
23687  fi
23688
23689
23690  unix_path="$HOTSPOT_LD"
23691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23692    windows_path=`$CYGPATH -m "$unix_path"`
23693    HOTSPOT_LD="$windows_path"
23694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23695    windows_path=`cmd //c echo $unix_path`
23696    HOTSPOT_LD="$windows_path"
23697  fi
23698
23699
23700  unix_path="$HOTSPOT_MT"
23701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23702    windows_path=`$CYGPATH -m "$unix_path"`
23703    HOTSPOT_MT="$windows_path"
23704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23705    windows_path=`cmd //c echo $unix_path`
23706    HOTSPOT_MT="$windows_path"
23707  fi
23708
23709
23710  unix_path="$HOTSPOT_RC"
23711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23712    windows_path=`$CYGPATH -m "$unix_path"`
23713    HOTSPOT_RC="$windows_path"
23714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23715    windows_path=`cmd //c echo $unix_path`
23716    HOTSPOT_RC="$windows_path"
23717  fi
23718
23719
23720
23721
23722    RC_FLAGS="-nologo -l 0x409 -r"
23723    if test "x$VARIANT" = xOPT; then :
23724
23725        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23726
23727fi
23728    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23729    if test "x$JDK_UPDATE_VERSION" = x; then :
23730
23731        JDK_UPDATE_VERSION_NOTNULL=0
23732
23733fi
23734    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23735    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23736    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23737    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23738    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23739    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23740    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23741
23742    # lib.exe is used to create static libraries.
23743    # Extract the first word of "lib", so it can be a program name with args.
23744set dummy lib; ac_word=$2
23745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23746$as_echo_n "checking for $ac_word... " >&6; }
23747if test "${ac_cv_prog_WINAR+set}" = set; then :
23748  $as_echo_n "(cached) " >&6
23749else
23750  if test -n "$WINAR"; then
23751  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23752else
23753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23754for as_dir in $PATH
23755do
23756  IFS=$as_save_IFS
23757  test -z "$as_dir" && as_dir=.
23758    for ac_exec_ext in '' $ac_executable_extensions; do
23759  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23760    ac_cv_prog_WINAR="lib"
23761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23762    break 2
23763  fi
23764done
23765  done
23766IFS=$as_save_IFS
23767
23768fi
23769fi
23770WINAR=$ac_cv_prog_WINAR
23771if test -n "$WINAR"; then
23772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23773$as_echo "$WINAR" >&6; }
23774else
23775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23776$as_echo "no" >&6; }
23777fi
23778
23779
23780
23781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23782
23783  # First separate the path from the arguments. This will split at the first
23784  # space.
23785  complete="$WINAR"
23786  path="${complete%% *}"
23787  tmp="$complete EOL"
23788  arguments="${tmp#* }"
23789
23790  # Input might be given as Windows format, start by converting to
23791  # unix format.
23792  new_path=`$CYGPATH -u "$path"`
23793
23794  # Now try to locate executable using which
23795  new_path=`$WHICH "$new_path" 2> /dev/null`
23796  # bat and cmd files are not always considered executable in cygwin causing which
23797  # to not find them
23798  if test "x$new_path" = x \
23799           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23800           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23801    new_path=`$CYGPATH -u "$path"`
23802  fi
23803  if test "x$new_path" = x; then
23804    # Oops. Which didn't find the executable.
23805    # The splitting of arguments from the executable at a space might have been incorrect,
23806    # since paths with space are more likely in Windows. Give it another try with the whole
23807    # argument.
23808    path="$complete"
23809    arguments="EOL"
23810    new_path=`$CYGPATH -u "$path"`
23811    new_path=`$WHICH "$new_path" 2> /dev/null`
23812    # bat and cmd files are not always considered executable in cygwin causing which
23813    # to not find them
23814    if test "x$new_path" = x \
23815             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23816             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23817      new_path=`$CYGPATH -u "$path"`
23818    fi
23819    if test "x$new_path" = x; then
23820      # It's still not found. Now this is an unrecoverable error.
23821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23822$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23823      has_space=`$ECHO "$complete" | $GREP " "`
23824      if test "x$has_space" != x; then
23825        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23826$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23827      fi
23828      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23829    fi
23830  fi
23831
23832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23835  # "foo.exe" is OK but "foo" is an error.
23836  #
23837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23838  # It is also a way to make sure we got the proper file name for the real test later on.
23839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23840  if test "x$test_shortpath" = x; then
23841    # Short path failed, file does not exist as specified.
23842    # Try adding .exe or .cmd
23843    if test -f "${new_path}.exe"; then
23844       input_to_shortpath="${new_path}.exe"
23845    elif test -f "${new_path}.cmd"; then
23846       input_to_shortpath="${new_path}.cmd"
23847    else
23848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23849$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23850      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23851$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23852      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23853    fi
23854  else
23855    input_to_shortpath="$new_path"
23856  fi
23857
23858  # Call helper function which possibly converts this using DOS-style short mode.
23859  # If so, the updated path is stored in $new_path.
23860  new_path="$input_to_shortpath"
23861
23862  input_path="$input_to_shortpath"
23863  # Check if we need to convert this using DOS-style short mode. If the path
23864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23865  # take no chances and rewrite it.
23866  # Note: m4 eats our [], so we need to use [ and ] instead.
23867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23868  if test "x$has_forbidden_chars" != x; then
23869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23873      # Going to short mode and back again did indeed matter. Since short mode is
23874      # case insensitive, let's make it lowercase to improve readability.
23875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23876      # Now convert it back to Unix-stile (cygpath)
23877      input_path=`$CYGPATH -u "$shortmode_path"`
23878      new_path="$input_path"
23879    fi
23880  fi
23881
23882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23883  if test "x$test_cygdrive_prefix" = x; then
23884    # As a simple fix, exclude /usr/bin since it's not a real path.
23885    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23887      # a path prefixed by /cygdrive for fixpath to work.
23888      new_path="$CYGWIN_ROOT_PATH$input_path"
23889    fi
23890  fi
23891
23892  # remove trailing .exe if any
23893  new_path="${new_path/%.exe/}"
23894
23895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23896
23897  # First separate the path from the arguments. This will split at the first
23898  # space.
23899  complete="$WINAR"
23900  path="${complete%% *}"
23901  tmp="$complete EOL"
23902  arguments="${tmp#* }"
23903
23904  # Input might be given as Windows format, start by converting to
23905  # unix format.
23906  new_path="$path"
23907
23908  windows_path="$new_path"
23909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23910    unix_path=`$CYGPATH -u "$windows_path"`
23911    new_path="$unix_path"
23912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23914    new_path="$unix_path"
23915  fi
23916
23917
23918  # Now try to locate executable using which
23919  new_path=`$WHICH "$new_path" 2> /dev/null`
23920
23921  if test "x$new_path" = x; then
23922    # Oops. Which didn't find the executable.
23923    # The splitting of arguments from the executable at a space might have been incorrect,
23924    # since paths with space are more likely in Windows. Give it another try with the whole
23925    # argument.
23926    path="$complete"
23927    arguments="EOL"
23928    new_path="$path"
23929
23930  windows_path="$new_path"
23931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23932    unix_path=`$CYGPATH -u "$windows_path"`
23933    new_path="$unix_path"
23934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23936    new_path="$unix_path"
23937  fi
23938
23939
23940    new_path=`$WHICH "$new_path" 2> /dev/null`
23941
23942    if test "x$new_path" = x; then
23943      # It's still not found. Now this is an unrecoverable error.
23944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23945$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23946      has_space=`$ECHO "$complete" | $GREP " "`
23947      if test "x$has_space" != x; then
23948        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23949$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23950      fi
23951      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23952    fi
23953  fi
23954
23955  # Now new_path has a complete unix path to the binary
23956  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23957    # Keep paths in /bin as-is, but remove trailing .exe if any
23958    new_path="${new_path/%.exe/}"
23959    # Do not save /bin paths to all_fixpath_prefixes!
23960  else
23961    # Not in mixed or Windows style, start by that.
23962    new_path=`cmd //c echo $new_path`
23963
23964  input_path="$new_path"
23965  # Check if we need to convert this using DOS-style short mode. If the path
23966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23967  # take no chances and rewrite it.
23968  # Note: m4 eats our [], so we need to use [ and ] instead.
23969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23970  if test "x$has_forbidden_chars" != x; then
23971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23973  fi
23974
23975    # Output is in $new_path
23976
23977  windows_path="$new_path"
23978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23979    unix_path=`$CYGPATH -u "$windows_path"`
23980    new_path="$unix_path"
23981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23983    new_path="$unix_path"
23984  fi
23985
23986    # remove trailing .exe if any
23987    new_path="${new_path/%.exe/}"
23988
23989    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23990    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23991  fi
23992
23993  else
23994    # We're on a posix platform. Hooray! :)
23995    # First separate the path from the arguments. This will split at the first
23996    # space.
23997    complete="$WINAR"
23998    path="${complete%% *}"
23999    tmp="$complete EOL"
24000    arguments="${tmp#* }"
24001
24002    # Cannot rely on the command "which" here since it doesn't always work.
24003    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24004    if test -z "$is_absolute_path"; then
24005      # Path to executable is not absolute. Find it.
24006      IFS_save="$IFS"
24007      IFS=:
24008      for p in $PATH; do
24009        if test -f "$p/$path" && test -x "$p/$path"; then
24010          new_path="$p/$path"
24011          break
24012        fi
24013      done
24014      IFS="$IFS_save"
24015    else
24016      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24017$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24018      new_path="$path"
24019    fi
24020
24021    if test "x$new_path" = x; then
24022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24023$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24024        has_space=`$ECHO "$complete" | $GREP " "`
24025        if test "x$has_space" != x; then
24026          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24027$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24028        fi
24029        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24030      fi
24031  fi
24032
24033      # Now join together the path and the arguments once again
24034      if test "x$arguments" != xEOL; then
24035        new_complete="$new_path ${arguments% *}"
24036      else
24037        new_complete="$new_path"
24038      fi
24039
24040  if test "x$complete" != "x$new_complete"; then
24041      WINAR="$new_complete"
24042      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24043$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24044    fi
24045
24046    AR="$WINAR"
24047    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24048
24049    # Extract the first word of "dumpbin", so it can be a program name with args.
24050set dummy dumpbin; ac_word=$2
24051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24052$as_echo_n "checking for $ac_word... " >&6; }
24053if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
24054  $as_echo_n "(cached) " >&6
24055else
24056  if test -n "$DUMPBIN"; then
24057  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24058else
24059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24060for as_dir in $PATH
24061do
24062  IFS=$as_save_IFS
24063  test -z "$as_dir" && as_dir=.
24064    for ac_exec_ext in '' $ac_executable_extensions; do
24065  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24066    ac_cv_prog_DUMPBIN="dumpbin"
24067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24068    break 2
24069  fi
24070done
24071  done
24072IFS=$as_save_IFS
24073
24074fi
24075fi
24076DUMPBIN=$ac_cv_prog_DUMPBIN
24077if test -n "$DUMPBIN"; then
24078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24079$as_echo "$DUMPBIN" >&6; }
24080else
24081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24082$as_echo "no" >&6; }
24083fi
24084
24085
24086
24087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24088
24089  # First separate the path from the arguments. This will split at the first
24090  # space.
24091  complete="$DUMPBIN"
24092  path="${complete%% *}"
24093  tmp="$complete EOL"
24094  arguments="${tmp#* }"
24095
24096  # Input might be given as Windows format, start by converting to
24097  # unix format.
24098  new_path=`$CYGPATH -u "$path"`
24099
24100  # Now try to locate executable using which
24101  new_path=`$WHICH "$new_path" 2> /dev/null`
24102  # bat and cmd files are not always considered executable in cygwin causing which
24103  # to not find them
24104  if test "x$new_path" = x \
24105           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24106           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24107    new_path=`$CYGPATH -u "$path"`
24108  fi
24109  if test "x$new_path" = x; then
24110    # Oops. Which didn't find the executable.
24111    # The splitting of arguments from the executable at a space might have been incorrect,
24112    # since paths with space are more likely in Windows. Give it another try with the whole
24113    # argument.
24114    path="$complete"
24115    arguments="EOL"
24116    new_path=`$CYGPATH -u "$path"`
24117    new_path=`$WHICH "$new_path" 2> /dev/null`
24118    # bat and cmd files are not always considered executable in cygwin causing which
24119    # to not find them
24120    if test "x$new_path" = x \
24121             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24122             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24123      new_path=`$CYGPATH -u "$path"`
24124    fi
24125    if test "x$new_path" = x; then
24126      # It's still not found. Now this is an unrecoverable error.
24127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24128$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24129      has_space=`$ECHO "$complete" | $GREP " "`
24130      if test "x$has_space" != x; then
24131        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24132$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24133      fi
24134      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24135    fi
24136  fi
24137
24138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24141  # "foo.exe" is OK but "foo" is an error.
24142  #
24143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24144  # It is also a way to make sure we got the proper file name for the real test later on.
24145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24146  if test "x$test_shortpath" = x; then
24147    # Short path failed, file does not exist as specified.
24148    # Try adding .exe or .cmd
24149    if test -f "${new_path}.exe"; then
24150       input_to_shortpath="${new_path}.exe"
24151    elif test -f "${new_path}.cmd"; then
24152       input_to_shortpath="${new_path}.cmd"
24153    else
24154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24155$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24156      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24157$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24158      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24159    fi
24160  else
24161    input_to_shortpath="$new_path"
24162  fi
24163
24164  # Call helper function which possibly converts this using DOS-style short mode.
24165  # If so, the updated path is stored in $new_path.
24166  new_path="$input_to_shortpath"
24167
24168  input_path="$input_to_shortpath"
24169  # Check if we need to convert this using DOS-style short mode. If the path
24170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24171  # take no chances and rewrite it.
24172  # Note: m4 eats our [], so we need to use [ and ] instead.
24173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24174  if test "x$has_forbidden_chars" != x; then
24175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24179      # Going to short mode and back again did indeed matter. Since short mode is
24180      # case insensitive, let's make it lowercase to improve readability.
24181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24182      # Now convert it back to Unix-stile (cygpath)
24183      input_path=`$CYGPATH -u "$shortmode_path"`
24184      new_path="$input_path"
24185    fi
24186  fi
24187
24188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24189  if test "x$test_cygdrive_prefix" = x; then
24190    # As a simple fix, exclude /usr/bin since it's not a real path.
24191    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24193      # a path prefixed by /cygdrive for fixpath to work.
24194      new_path="$CYGWIN_ROOT_PATH$input_path"
24195    fi
24196  fi
24197
24198  # remove trailing .exe if any
24199  new_path="${new_path/%.exe/}"
24200
24201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24202
24203  # First separate the path from the arguments. This will split at the first
24204  # space.
24205  complete="$DUMPBIN"
24206  path="${complete%% *}"
24207  tmp="$complete EOL"
24208  arguments="${tmp#* }"
24209
24210  # Input might be given as Windows format, start by converting to
24211  # unix format.
24212  new_path="$path"
24213
24214  windows_path="$new_path"
24215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24216    unix_path=`$CYGPATH -u "$windows_path"`
24217    new_path="$unix_path"
24218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24220    new_path="$unix_path"
24221  fi
24222
24223
24224  # Now try to locate executable using which
24225  new_path=`$WHICH "$new_path" 2> /dev/null`
24226
24227  if test "x$new_path" = x; then
24228    # Oops. Which didn't find the executable.
24229    # The splitting of arguments from the executable at a space might have been incorrect,
24230    # since paths with space are more likely in Windows. Give it another try with the whole
24231    # argument.
24232    path="$complete"
24233    arguments="EOL"
24234    new_path="$path"
24235
24236  windows_path="$new_path"
24237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24238    unix_path=`$CYGPATH -u "$windows_path"`
24239    new_path="$unix_path"
24240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24242    new_path="$unix_path"
24243  fi
24244
24245
24246    new_path=`$WHICH "$new_path" 2> /dev/null`
24247
24248    if test "x$new_path" = x; then
24249      # It's still not found. Now this is an unrecoverable error.
24250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24251$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24252      has_space=`$ECHO "$complete" | $GREP " "`
24253      if test "x$has_space" != x; then
24254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24256      fi
24257      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24258    fi
24259  fi
24260
24261  # Now new_path has a complete unix path to the binary
24262  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24263    # Keep paths in /bin as-is, but remove trailing .exe if any
24264    new_path="${new_path/%.exe/}"
24265    # Do not save /bin paths to all_fixpath_prefixes!
24266  else
24267    # Not in mixed or Windows style, start by that.
24268    new_path=`cmd //c echo $new_path`
24269
24270  input_path="$new_path"
24271  # Check if we need to convert this using DOS-style short mode. If the path
24272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24273  # take no chances and rewrite it.
24274  # Note: m4 eats our [], so we need to use [ and ] instead.
24275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24276  if test "x$has_forbidden_chars" != x; then
24277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24279  fi
24280
24281    # Output is in $new_path
24282
24283  windows_path="$new_path"
24284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24285    unix_path=`$CYGPATH -u "$windows_path"`
24286    new_path="$unix_path"
24287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24289    new_path="$unix_path"
24290  fi
24291
24292    # remove trailing .exe if any
24293    new_path="${new_path/%.exe/}"
24294
24295    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24296    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24297  fi
24298
24299  else
24300    # We're on a posix platform. Hooray! :)
24301    # First separate the path from the arguments. This will split at the first
24302    # space.
24303    complete="$DUMPBIN"
24304    path="${complete%% *}"
24305    tmp="$complete EOL"
24306    arguments="${tmp#* }"
24307
24308    # Cannot rely on the command "which" here since it doesn't always work.
24309    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24310    if test -z "$is_absolute_path"; then
24311      # Path to executable is not absolute. Find it.
24312      IFS_save="$IFS"
24313      IFS=:
24314      for p in $PATH; do
24315        if test -f "$p/$path" && test -x "$p/$path"; then
24316          new_path="$p/$path"
24317          break
24318        fi
24319      done
24320      IFS="$IFS_save"
24321    else
24322      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24323$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24324      new_path="$path"
24325    fi
24326
24327    if test "x$new_path" = x; then
24328        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24329$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24330        has_space=`$ECHO "$complete" | $GREP " "`
24331        if test "x$has_space" != x; then
24332          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24333$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24334        fi
24335        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24336      fi
24337  fi
24338
24339      # Now join together the path and the arguments once again
24340      if test "x$arguments" != xEOL; then
24341        new_complete="$new_path ${arguments% *}"
24342      else
24343        new_complete="$new_path"
24344      fi
24345
24346  if test "x$complete" != "x$new_complete"; then
24347      DUMPBIN="$new_complete"
24348      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24349$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24350    fi
24351
24352
24353    COMPILER_TYPE=CL
24354    CCXXFLAGS="$CCXXFLAGS -nologo"
24355
24356fi
24357
24358
24359
24360ac_ext=c
24361ac_cpp='$CPP $CPPFLAGS'
24362ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24363ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24364ac_compiler_gnu=$ac_cv_c_compiler_gnu
24365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24366$as_echo_n "checking how to run the C preprocessor... " >&6; }
24367# On Suns, sometimes $CPP names a directory.
24368if test -n "$CPP" && test -d "$CPP"; then
24369  CPP=
24370fi
24371if test -z "$CPP"; then
24372  if test "${ac_cv_prog_CPP+set}" = set; then :
24373  $as_echo_n "(cached) " >&6
24374else
24375      # Double quotes because CPP needs to be expanded
24376    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24377    do
24378      ac_preproc_ok=false
24379for ac_c_preproc_warn_flag in '' yes
24380do
24381  # Use a header file that comes with gcc, so configuring glibc
24382  # with a fresh cross-compiler works.
24383  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24384  # <limits.h> exists even on freestanding compilers.
24385  # On the NeXT, cc -E runs the code through the compiler's parser,
24386  # not just through cpp. "Syntax error" is here to catch this case.
24387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24388/* end confdefs.h.  */
24389#ifdef __STDC__
24390# include <limits.h>
24391#else
24392# include <assert.h>
24393#endif
24394		     Syntax error
24395_ACEOF
24396if ac_fn_c_try_cpp "$LINENO"; then :
24397
24398else
24399  # Broken: fails on valid input.
24400continue
24401fi
24402rm -f conftest.err conftest.i conftest.$ac_ext
24403
24404  # OK, works on sane cases.  Now check whether nonexistent headers
24405  # can be detected and how.
24406  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24407/* end confdefs.h.  */
24408#include <ac_nonexistent.h>
24409_ACEOF
24410if ac_fn_c_try_cpp "$LINENO"; then :
24411  # Broken: success on invalid input.
24412continue
24413else
24414  # Passes both tests.
24415ac_preproc_ok=:
24416break
24417fi
24418rm -f conftest.err conftest.i conftest.$ac_ext
24419
24420done
24421# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24422rm -f conftest.i conftest.err conftest.$ac_ext
24423if $ac_preproc_ok; then :
24424  break
24425fi
24426
24427    done
24428    ac_cv_prog_CPP=$CPP
24429
24430fi
24431  CPP=$ac_cv_prog_CPP
24432else
24433  ac_cv_prog_CPP=$CPP
24434fi
24435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24436$as_echo "$CPP" >&6; }
24437ac_preproc_ok=false
24438for ac_c_preproc_warn_flag in '' yes
24439do
24440  # Use a header file that comes with gcc, so configuring glibc
24441  # with a fresh cross-compiler works.
24442  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24443  # <limits.h> exists even on freestanding compilers.
24444  # On the NeXT, cc -E runs the code through the compiler's parser,
24445  # not just through cpp. "Syntax error" is here to catch this case.
24446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24447/* end confdefs.h.  */
24448#ifdef __STDC__
24449# include <limits.h>
24450#else
24451# include <assert.h>
24452#endif
24453		     Syntax error
24454_ACEOF
24455if ac_fn_c_try_cpp "$LINENO"; then :
24456
24457else
24458  # Broken: fails on valid input.
24459continue
24460fi
24461rm -f conftest.err conftest.i conftest.$ac_ext
24462
24463  # OK, works on sane cases.  Now check whether nonexistent headers
24464  # can be detected and how.
24465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24466/* end confdefs.h.  */
24467#include <ac_nonexistent.h>
24468_ACEOF
24469if ac_fn_c_try_cpp "$LINENO"; then :
24470  # Broken: success on invalid input.
24471continue
24472else
24473  # Passes both tests.
24474ac_preproc_ok=:
24475break
24476fi
24477rm -f conftest.err conftest.i conftest.$ac_ext
24478
24479done
24480# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24481rm -f conftest.i conftest.err conftest.$ac_ext
24482if $ac_preproc_ok; then :
24483
24484else
24485  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24487as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24488See \`config.log' for more details" "$LINENO" 5 ; }
24489fi
24490
24491ac_ext=cpp
24492ac_cpp='$CXXCPP $CPPFLAGS'
24493ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24494ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24495ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24496
24497
24498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24499
24500  # First separate the path from the arguments. This will split at the first
24501  # space.
24502  complete="$CPP"
24503  path="${complete%% *}"
24504  tmp="$complete EOL"
24505  arguments="${tmp#* }"
24506
24507  # Input might be given as Windows format, start by converting to
24508  # unix format.
24509  new_path=`$CYGPATH -u "$path"`
24510
24511  # Now try to locate executable using which
24512  new_path=`$WHICH "$new_path" 2> /dev/null`
24513  # bat and cmd files are not always considered executable in cygwin causing which
24514  # to not find them
24515  if test "x$new_path" = x \
24516           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24517           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24518    new_path=`$CYGPATH -u "$path"`
24519  fi
24520  if test "x$new_path" = x; then
24521    # Oops. Which didn't find the executable.
24522    # The splitting of arguments from the executable at a space might have been incorrect,
24523    # since paths with space are more likely in Windows. Give it another try with the whole
24524    # argument.
24525    path="$complete"
24526    arguments="EOL"
24527    new_path=`$CYGPATH -u "$path"`
24528    new_path=`$WHICH "$new_path" 2> /dev/null`
24529    # bat and cmd files are not always considered executable in cygwin causing which
24530    # to not find them
24531    if test "x$new_path" = x \
24532             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24533             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24534      new_path=`$CYGPATH -u "$path"`
24535    fi
24536    if test "x$new_path" = x; then
24537      # It's still not found. Now this is an unrecoverable error.
24538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24539$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24540      has_space=`$ECHO "$complete" | $GREP " "`
24541      if test "x$has_space" != x; then
24542        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24543$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24544      fi
24545      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24546    fi
24547  fi
24548
24549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24552  # "foo.exe" is OK but "foo" is an error.
24553  #
24554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24555  # It is also a way to make sure we got the proper file name for the real test later on.
24556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24557  if test "x$test_shortpath" = x; then
24558    # Short path failed, file does not exist as specified.
24559    # Try adding .exe or .cmd
24560    if test -f "${new_path}.exe"; then
24561       input_to_shortpath="${new_path}.exe"
24562    elif test -f "${new_path}.cmd"; then
24563       input_to_shortpath="${new_path}.cmd"
24564    else
24565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24566$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24567      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24568$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24569      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24570    fi
24571  else
24572    input_to_shortpath="$new_path"
24573  fi
24574
24575  # Call helper function which possibly converts this using DOS-style short mode.
24576  # If so, the updated path is stored in $new_path.
24577  new_path="$input_to_shortpath"
24578
24579  input_path="$input_to_shortpath"
24580  # Check if we need to convert this using DOS-style short mode. If the path
24581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24582  # take no chances and rewrite it.
24583  # Note: m4 eats our [], so we need to use [ and ] instead.
24584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24585  if test "x$has_forbidden_chars" != x; then
24586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24590      # Going to short mode and back again did indeed matter. Since short mode is
24591      # case insensitive, let's make it lowercase to improve readability.
24592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24593      # Now convert it back to Unix-stile (cygpath)
24594      input_path=`$CYGPATH -u "$shortmode_path"`
24595      new_path="$input_path"
24596    fi
24597  fi
24598
24599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24600  if test "x$test_cygdrive_prefix" = x; then
24601    # As a simple fix, exclude /usr/bin since it's not a real path.
24602    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24604      # a path prefixed by /cygdrive for fixpath to work.
24605      new_path="$CYGWIN_ROOT_PATH$input_path"
24606    fi
24607  fi
24608
24609  # remove trailing .exe if any
24610  new_path="${new_path/%.exe/}"
24611
24612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24613
24614  # First separate the path from the arguments. This will split at the first
24615  # space.
24616  complete="$CPP"
24617  path="${complete%% *}"
24618  tmp="$complete EOL"
24619  arguments="${tmp#* }"
24620
24621  # Input might be given as Windows format, start by converting to
24622  # unix format.
24623  new_path="$path"
24624
24625  windows_path="$new_path"
24626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24627    unix_path=`$CYGPATH -u "$windows_path"`
24628    new_path="$unix_path"
24629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24631    new_path="$unix_path"
24632  fi
24633
24634
24635  # Now try to locate executable using which
24636  new_path=`$WHICH "$new_path" 2> /dev/null`
24637
24638  if test "x$new_path" = x; then
24639    # Oops. Which didn't find the executable.
24640    # The splitting of arguments from the executable at a space might have been incorrect,
24641    # since paths with space are more likely in Windows. Give it another try with the whole
24642    # argument.
24643    path="$complete"
24644    arguments="EOL"
24645    new_path="$path"
24646
24647  windows_path="$new_path"
24648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24649    unix_path=`$CYGPATH -u "$windows_path"`
24650    new_path="$unix_path"
24651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24653    new_path="$unix_path"
24654  fi
24655
24656
24657    new_path=`$WHICH "$new_path" 2> /dev/null`
24658
24659    if test "x$new_path" = x; then
24660      # It's still not found. Now this is an unrecoverable error.
24661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24662$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24663      has_space=`$ECHO "$complete" | $GREP " "`
24664      if test "x$has_space" != x; then
24665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24667      fi
24668      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24669    fi
24670  fi
24671
24672  # Now new_path has a complete unix path to the binary
24673  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24674    # Keep paths in /bin as-is, but remove trailing .exe if any
24675    new_path="${new_path/%.exe/}"
24676    # Do not save /bin paths to all_fixpath_prefixes!
24677  else
24678    # Not in mixed or Windows style, start by that.
24679    new_path=`cmd //c echo $new_path`
24680
24681  input_path="$new_path"
24682  # Check if we need to convert this using DOS-style short mode. If the path
24683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24684  # take no chances and rewrite it.
24685  # Note: m4 eats our [], so we need to use [ and ] instead.
24686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24687  if test "x$has_forbidden_chars" != x; then
24688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24690  fi
24691
24692    # Output is in $new_path
24693
24694  windows_path="$new_path"
24695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24696    unix_path=`$CYGPATH -u "$windows_path"`
24697    new_path="$unix_path"
24698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24700    new_path="$unix_path"
24701  fi
24702
24703    # remove trailing .exe if any
24704    new_path="${new_path/%.exe/}"
24705
24706    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24707    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24708  fi
24709
24710  else
24711    # We're on a posix platform. Hooray! :)
24712    # First separate the path from the arguments. This will split at the first
24713    # space.
24714    complete="$CPP"
24715    path="${complete%% *}"
24716    tmp="$complete EOL"
24717    arguments="${tmp#* }"
24718
24719    # Cannot rely on the command "which" here since it doesn't always work.
24720    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24721    if test -z "$is_absolute_path"; then
24722      # Path to executable is not absolute. Find it.
24723      IFS_save="$IFS"
24724      IFS=:
24725      for p in $PATH; do
24726        if test -f "$p/$path" && test -x "$p/$path"; then
24727          new_path="$p/$path"
24728          break
24729        fi
24730      done
24731      IFS="$IFS_save"
24732    else
24733      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24734$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24735      new_path="$path"
24736    fi
24737
24738    if test "x$new_path" = x; then
24739        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24740$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24741        has_space=`$ECHO "$complete" | $GREP " "`
24742        if test "x$has_space" != x; then
24743          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24744$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24745        fi
24746        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24747      fi
24748  fi
24749
24750      # Now join together the path and the arguments once again
24751      if test "x$arguments" != xEOL; then
24752        new_complete="$new_path ${arguments% *}"
24753      else
24754        new_complete="$new_path"
24755      fi
24756
24757  if test "x$complete" != "x$new_complete"; then
24758      CPP="$new_complete"
24759      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24760$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24761    fi
24762
24763
24764ac_ext=cpp
24765ac_cpp='$CXXCPP $CPPFLAGS'
24766ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24767ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24768ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24770$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24771if test -z "$CXXCPP"; then
24772  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24773  $as_echo_n "(cached) " >&6
24774else
24775      # Double quotes because CXXCPP needs to be expanded
24776    for CXXCPP in "$CXX -E" "/lib/cpp"
24777    do
24778      ac_preproc_ok=false
24779for ac_cxx_preproc_warn_flag in '' yes
24780do
24781  # Use a header file that comes with gcc, so configuring glibc
24782  # with a fresh cross-compiler works.
24783  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24784  # <limits.h> exists even on freestanding compilers.
24785  # On the NeXT, cc -E runs the code through the compiler's parser,
24786  # not just through cpp. "Syntax error" is here to catch this case.
24787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24788/* end confdefs.h.  */
24789#ifdef __STDC__
24790# include <limits.h>
24791#else
24792# include <assert.h>
24793#endif
24794		     Syntax error
24795_ACEOF
24796if ac_fn_cxx_try_cpp "$LINENO"; then :
24797
24798else
24799  # Broken: fails on valid input.
24800continue
24801fi
24802rm -f conftest.err conftest.i conftest.$ac_ext
24803
24804  # OK, works on sane cases.  Now check whether nonexistent headers
24805  # can be detected and how.
24806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24807/* end confdefs.h.  */
24808#include <ac_nonexistent.h>
24809_ACEOF
24810if ac_fn_cxx_try_cpp "$LINENO"; then :
24811  # Broken: success on invalid input.
24812continue
24813else
24814  # Passes both tests.
24815ac_preproc_ok=:
24816break
24817fi
24818rm -f conftest.err conftest.i conftest.$ac_ext
24819
24820done
24821# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24822rm -f conftest.i conftest.err conftest.$ac_ext
24823if $ac_preproc_ok; then :
24824  break
24825fi
24826
24827    done
24828    ac_cv_prog_CXXCPP=$CXXCPP
24829
24830fi
24831  CXXCPP=$ac_cv_prog_CXXCPP
24832else
24833  ac_cv_prog_CXXCPP=$CXXCPP
24834fi
24835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24836$as_echo "$CXXCPP" >&6; }
24837ac_preproc_ok=false
24838for ac_cxx_preproc_warn_flag in '' yes
24839do
24840  # Use a header file that comes with gcc, so configuring glibc
24841  # with a fresh cross-compiler works.
24842  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24843  # <limits.h> exists even on freestanding compilers.
24844  # On the NeXT, cc -E runs the code through the compiler's parser,
24845  # not just through cpp. "Syntax error" is here to catch this case.
24846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24847/* end confdefs.h.  */
24848#ifdef __STDC__
24849# include <limits.h>
24850#else
24851# include <assert.h>
24852#endif
24853		     Syntax error
24854_ACEOF
24855if ac_fn_cxx_try_cpp "$LINENO"; then :
24856
24857else
24858  # Broken: fails on valid input.
24859continue
24860fi
24861rm -f conftest.err conftest.i conftest.$ac_ext
24862
24863  # OK, works on sane cases.  Now check whether nonexistent headers
24864  # can be detected and how.
24865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24866/* end confdefs.h.  */
24867#include <ac_nonexistent.h>
24868_ACEOF
24869if ac_fn_cxx_try_cpp "$LINENO"; then :
24870  # Broken: success on invalid input.
24871continue
24872else
24873  # Passes both tests.
24874ac_preproc_ok=:
24875break
24876fi
24877rm -f conftest.err conftest.i conftest.$ac_ext
24878
24879done
24880# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24881rm -f conftest.i conftest.err conftest.$ac_ext
24882if $ac_preproc_ok; then :
24883
24884else
24885  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24887as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24888See \`config.log' for more details" "$LINENO" 5 ; }
24889fi
24890
24891ac_ext=cpp
24892ac_cpp='$CXXCPP $CPPFLAGS'
24893ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24894ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24895ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24896
24897
24898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24899
24900  # First separate the path from the arguments. This will split at the first
24901  # space.
24902  complete="$CXXCPP"
24903  path="${complete%% *}"
24904  tmp="$complete EOL"
24905  arguments="${tmp#* }"
24906
24907  # Input might be given as Windows format, start by converting to
24908  # unix format.
24909  new_path=`$CYGPATH -u "$path"`
24910
24911  # Now try to locate executable using which
24912  new_path=`$WHICH "$new_path" 2> /dev/null`
24913  # bat and cmd files are not always considered executable in cygwin causing which
24914  # to not find them
24915  if test "x$new_path" = x \
24916           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24917           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24918    new_path=`$CYGPATH -u "$path"`
24919  fi
24920  if test "x$new_path" = x; then
24921    # Oops. Which didn't find the executable.
24922    # The splitting of arguments from the executable at a space might have been incorrect,
24923    # since paths with space are more likely in Windows. Give it another try with the whole
24924    # argument.
24925    path="$complete"
24926    arguments="EOL"
24927    new_path=`$CYGPATH -u "$path"`
24928    new_path=`$WHICH "$new_path" 2> /dev/null`
24929    # bat and cmd files are not always considered executable in cygwin causing which
24930    # to not find them
24931    if test "x$new_path" = x \
24932             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24933             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24934      new_path=`$CYGPATH -u "$path"`
24935    fi
24936    if test "x$new_path" = x; then
24937      # It's still not found. Now this is an unrecoverable error.
24938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24939$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24940      has_space=`$ECHO "$complete" | $GREP " "`
24941      if test "x$has_space" != x; then
24942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24944      fi
24945      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24946    fi
24947  fi
24948
24949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24952  # "foo.exe" is OK but "foo" is an error.
24953  #
24954  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24955  # It is also a way to make sure we got the proper file name for the real test later on.
24956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24957  if test "x$test_shortpath" = x; then
24958    # Short path failed, file does not exist as specified.
24959    # Try adding .exe or .cmd
24960    if test -f "${new_path}.exe"; then
24961       input_to_shortpath="${new_path}.exe"
24962    elif test -f "${new_path}.cmd"; then
24963       input_to_shortpath="${new_path}.cmd"
24964    else
24965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24966$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24967      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24968$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24969      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24970    fi
24971  else
24972    input_to_shortpath="$new_path"
24973  fi
24974
24975  # Call helper function which possibly converts this using DOS-style short mode.
24976  # If so, the updated path is stored in $new_path.
24977  new_path="$input_to_shortpath"
24978
24979  input_path="$input_to_shortpath"
24980  # Check if we need to convert this using DOS-style short mode. If the path
24981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24982  # take no chances and rewrite it.
24983  # Note: m4 eats our [], so we need to use [ and ] instead.
24984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24985  if test "x$has_forbidden_chars" != x; then
24986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24990      # Going to short mode and back again did indeed matter. Since short mode is
24991      # case insensitive, let's make it lowercase to improve readability.
24992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24993      # Now convert it back to Unix-stile (cygpath)
24994      input_path=`$CYGPATH -u "$shortmode_path"`
24995      new_path="$input_path"
24996    fi
24997  fi
24998
24999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25000  if test "x$test_cygdrive_prefix" = x; then
25001    # As a simple fix, exclude /usr/bin since it's not a real path.
25002    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25004      # a path prefixed by /cygdrive for fixpath to work.
25005      new_path="$CYGWIN_ROOT_PATH$input_path"
25006    fi
25007  fi
25008
25009  # remove trailing .exe if any
25010  new_path="${new_path/%.exe/}"
25011
25012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25013
25014  # First separate the path from the arguments. This will split at the first
25015  # space.
25016  complete="$CXXCPP"
25017  path="${complete%% *}"
25018  tmp="$complete EOL"
25019  arguments="${tmp#* }"
25020
25021  # Input might be given as Windows format, start by converting to
25022  # unix format.
25023  new_path="$path"
25024
25025  windows_path="$new_path"
25026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25027    unix_path=`$CYGPATH -u "$windows_path"`
25028    new_path="$unix_path"
25029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25031    new_path="$unix_path"
25032  fi
25033
25034
25035  # Now try to locate executable using which
25036  new_path=`$WHICH "$new_path" 2> /dev/null`
25037
25038  if test "x$new_path" = x; then
25039    # Oops. Which didn't find the executable.
25040    # The splitting of arguments from the executable at a space might have been incorrect,
25041    # since paths with space are more likely in Windows. Give it another try with the whole
25042    # argument.
25043    path="$complete"
25044    arguments="EOL"
25045    new_path="$path"
25046
25047  windows_path="$new_path"
25048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25049    unix_path=`$CYGPATH -u "$windows_path"`
25050    new_path="$unix_path"
25051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25053    new_path="$unix_path"
25054  fi
25055
25056
25057    new_path=`$WHICH "$new_path" 2> /dev/null`
25058
25059    if test "x$new_path" = x; then
25060      # It's still not found. Now this is an unrecoverable error.
25061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25062$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25063      has_space=`$ECHO "$complete" | $GREP " "`
25064      if test "x$has_space" != x; then
25065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25067      fi
25068      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25069    fi
25070  fi
25071
25072  # Now new_path has a complete unix path to the binary
25073  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25074    # Keep paths in /bin as-is, but remove trailing .exe if any
25075    new_path="${new_path/%.exe/}"
25076    # Do not save /bin paths to all_fixpath_prefixes!
25077  else
25078    # Not in mixed or Windows style, start by that.
25079    new_path=`cmd //c echo $new_path`
25080
25081  input_path="$new_path"
25082  # Check if we need to convert this using DOS-style short mode. If the path
25083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25084  # take no chances and rewrite it.
25085  # Note: m4 eats our [], so we need to use [ and ] instead.
25086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25087  if test "x$has_forbidden_chars" != x; then
25088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25090  fi
25091
25092    # Output is in $new_path
25093
25094  windows_path="$new_path"
25095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25096    unix_path=`$CYGPATH -u "$windows_path"`
25097    new_path="$unix_path"
25098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25100    new_path="$unix_path"
25101  fi
25102
25103    # remove trailing .exe if any
25104    new_path="${new_path/%.exe/}"
25105
25106    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25107    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25108  fi
25109
25110  else
25111    # We're on a posix platform. Hooray! :)
25112    # First separate the path from the arguments. This will split at the first
25113    # space.
25114    complete="$CXXCPP"
25115    path="${complete%% *}"
25116    tmp="$complete EOL"
25117    arguments="${tmp#* }"
25118
25119    # Cannot rely on the command "which" here since it doesn't always work.
25120    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25121    if test -z "$is_absolute_path"; then
25122      # Path to executable is not absolute. Find it.
25123      IFS_save="$IFS"
25124      IFS=:
25125      for p in $PATH; do
25126        if test -f "$p/$path" && test -x "$p/$path"; then
25127          new_path="$p/$path"
25128          break
25129        fi
25130      done
25131      IFS="$IFS_save"
25132    else
25133      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25134$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25135      new_path="$path"
25136    fi
25137
25138    if test "x$new_path" = x; then
25139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25140$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25141        has_space=`$ECHO "$complete" | $GREP " "`
25142        if test "x$has_space" != x; then
25143          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25144$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25145        fi
25146        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25147      fi
25148  fi
25149
25150      # Now join together the path and the arguments once again
25151      if test "x$arguments" != xEOL; then
25152        new_complete="$new_path ${arguments% *}"
25153      else
25154        new_complete="$new_path"
25155      fi
25156
25157  if test "x$complete" != "x$new_complete"; then
25158      CXXCPP="$new_complete"
25159      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25160$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25161    fi
25162
25163
25164if test "x$COMPILE_TYPE" != "xcross"; then
25165    # If we are not cross compiling, use the same compilers for
25166    # building the build platform executables. The cross-compilation
25167    # case needed to be done earlier, but this can only be done after
25168    # the native tools have been localized.
25169    BUILD_CC="$CC"
25170    BUILD_CXX="$CXX"
25171    BUILD_LD="$LD"
25172fi
25173
25174# for solaris we really need solaris tools, and not gnu equivalent
25175#   these seems to normally reside in /usr/ccs/bin so add that to path before
25176#   starting to probe
25177#
25178#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25179#         so that it can be overriden --with-tools-dir
25180if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25181    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25182fi
25183
25184# Find the right assembler.
25185if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25186    # Extract the first word of "as", so it can be a program name with args.
25187set dummy as; ac_word=$2
25188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25189$as_echo_n "checking for $ac_word... " >&6; }
25190if test "${ac_cv_path_AS+set}" = set; then :
25191  $as_echo_n "(cached) " >&6
25192else
25193  case $AS in
25194  [\\/]* | ?:[\\/]*)
25195  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25196  ;;
25197  *)
25198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25199for as_dir in $PATH
25200do
25201  IFS=$as_save_IFS
25202  test -z "$as_dir" && as_dir=.
25203    for ac_exec_ext in '' $ac_executable_extensions; do
25204  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25205    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25207    break 2
25208  fi
25209done
25210  done
25211IFS=$as_save_IFS
25212
25213  ;;
25214esac
25215fi
25216AS=$ac_cv_path_AS
25217if test -n "$AS"; then
25218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25219$as_echo "$AS" >&6; }
25220else
25221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25222$as_echo "no" >&6; }
25223fi
25224
25225
25226
25227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25228
25229  # First separate the path from the arguments. This will split at the first
25230  # space.
25231  complete="$AS"
25232  path="${complete%% *}"
25233  tmp="$complete EOL"
25234  arguments="${tmp#* }"
25235
25236  # Input might be given as Windows format, start by converting to
25237  # unix format.
25238  new_path=`$CYGPATH -u "$path"`
25239
25240  # Now try to locate executable using which
25241  new_path=`$WHICH "$new_path" 2> /dev/null`
25242  # bat and cmd files are not always considered executable in cygwin causing which
25243  # to not find them
25244  if test "x$new_path" = x \
25245           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25246           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25247    new_path=`$CYGPATH -u "$path"`
25248  fi
25249  if test "x$new_path" = x; then
25250    # Oops. Which didn't find the executable.
25251    # The splitting of arguments from the executable at a space might have been incorrect,
25252    # since paths with space are more likely in Windows. Give it another try with the whole
25253    # argument.
25254    path="$complete"
25255    arguments="EOL"
25256    new_path=`$CYGPATH -u "$path"`
25257    new_path=`$WHICH "$new_path" 2> /dev/null`
25258    # bat and cmd files are not always considered executable in cygwin causing which
25259    # to not find them
25260    if test "x$new_path" = x \
25261             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25262             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25263      new_path=`$CYGPATH -u "$path"`
25264    fi
25265    if test "x$new_path" = x; then
25266      # It's still not found. Now this is an unrecoverable error.
25267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25268$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25269      has_space=`$ECHO "$complete" | $GREP " "`
25270      if test "x$has_space" != x; then
25271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25273      fi
25274      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25275    fi
25276  fi
25277
25278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25281  # "foo.exe" is OK but "foo" is an error.
25282  #
25283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25284  # It is also a way to make sure we got the proper file name for the real test later on.
25285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25286  if test "x$test_shortpath" = x; then
25287    # Short path failed, file does not exist as specified.
25288    # Try adding .exe or .cmd
25289    if test -f "${new_path}.exe"; then
25290       input_to_shortpath="${new_path}.exe"
25291    elif test -f "${new_path}.cmd"; then
25292       input_to_shortpath="${new_path}.cmd"
25293    else
25294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25295$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25298      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25299    fi
25300  else
25301    input_to_shortpath="$new_path"
25302  fi
25303
25304  # Call helper function which possibly converts this using DOS-style short mode.
25305  # If so, the updated path is stored in $new_path.
25306  new_path="$input_to_shortpath"
25307
25308  input_path="$input_to_shortpath"
25309  # Check if we need to convert this using DOS-style short mode. If the path
25310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25311  # take no chances and rewrite it.
25312  # Note: m4 eats our [], so we need to use [ and ] instead.
25313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25314  if test "x$has_forbidden_chars" != x; then
25315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25319      # Going to short mode and back again did indeed matter. Since short mode is
25320      # case insensitive, let's make it lowercase to improve readability.
25321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25322      # Now convert it back to Unix-stile (cygpath)
25323      input_path=`$CYGPATH -u "$shortmode_path"`
25324      new_path="$input_path"
25325    fi
25326  fi
25327
25328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25329  if test "x$test_cygdrive_prefix" = x; then
25330    # As a simple fix, exclude /usr/bin since it's not a real path.
25331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25333      # a path prefixed by /cygdrive for fixpath to work.
25334      new_path="$CYGWIN_ROOT_PATH$input_path"
25335    fi
25336  fi
25337
25338  # remove trailing .exe if any
25339  new_path="${new_path/%.exe/}"
25340
25341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25342
25343  # First separate the path from the arguments. This will split at the first
25344  # space.
25345  complete="$AS"
25346  path="${complete%% *}"
25347  tmp="$complete EOL"
25348  arguments="${tmp#* }"
25349
25350  # Input might be given as Windows format, start by converting to
25351  # unix format.
25352  new_path="$path"
25353
25354  windows_path="$new_path"
25355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25356    unix_path=`$CYGPATH -u "$windows_path"`
25357    new_path="$unix_path"
25358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25360    new_path="$unix_path"
25361  fi
25362
25363
25364  # Now try to locate executable using which
25365  new_path=`$WHICH "$new_path" 2> /dev/null`
25366
25367  if test "x$new_path" = x; then
25368    # Oops. Which didn't find the executable.
25369    # The splitting of arguments from the executable at a space might have been incorrect,
25370    # since paths with space are more likely in Windows. Give it another try with the whole
25371    # argument.
25372    path="$complete"
25373    arguments="EOL"
25374    new_path="$path"
25375
25376  windows_path="$new_path"
25377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25378    unix_path=`$CYGPATH -u "$windows_path"`
25379    new_path="$unix_path"
25380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25382    new_path="$unix_path"
25383  fi
25384
25385
25386    new_path=`$WHICH "$new_path" 2> /dev/null`
25387
25388    if test "x$new_path" = x; then
25389      # It's still not found. Now this is an unrecoverable error.
25390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25391$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25392      has_space=`$ECHO "$complete" | $GREP " "`
25393      if test "x$has_space" != x; then
25394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25396      fi
25397      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25398    fi
25399  fi
25400
25401  # Now new_path has a complete unix path to the binary
25402  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25403    # Keep paths in /bin as-is, but remove trailing .exe if any
25404    new_path="${new_path/%.exe/}"
25405    # Do not save /bin paths to all_fixpath_prefixes!
25406  else
25407    # Not in mixed or Windows style, start by that.
25408    new_path=`cmd //c echo $new_path`
25409
25410  input_path="$new_path"
25411  # Check if we need to convert this using DOS-style short mode. If the path
25412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25413  # take no chances and rewrite it.
25414  # Note: m4 eats our [], so we need to use [ and ] instead.
25415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25416  if test "x$has_forbidden_chars" != x; then
25417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25419  fi
25420
25421    # Output is in $new_path
25422
25423  windows_path="$new_path"
25424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25425    unix_path=`$CYGPATH -u "$windows_path"`
25426    new_path="$unix_path"
25427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25429    new_path="$unix_path"
25430  fi
25431
25432    # remove trailing .exe if any
25433    new_path="${new_path/%.exe/}"
25434
25435    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25436    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25437  fi
25438
25439  else
25440    # We're on a posix platform. Hooray! :)
25441    # First separate the path from the arguments. This will split at the first
25442    # space.
25443    complete="$AS"
25444    path="${complete%% *}"
25445    tmp="$complete EOL"
25446    arguments="${tmp#* }"
25447
25448    # Cannot rely on the command "which" here since it doesn't always work.
25449    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25450    if test -z "$is_absolute_path"; then
25451      # Path to executable is not absolute. Find it.
25452      IFS_save="$IFS"
25453      IFS=:
25454      for p in $PATH; do
25455        if test -f "$p/$path" && test -x "$p/$path"; then
25456          new_path="$p/$path"
25457          break
25458        fi
25459      done
25460      IFS="$IFS_save"
25461    else
25462      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25463$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25464      new_path="$path"
25465    fi
25466
25467    if test "x$new_path" = x; then
25468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25469$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25470        has_space=`$ECHO "$complete" | $GREP " "`
25471        if test "x$has_space" != x; then
25472          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25473$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25474        fi
25475        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25476      fi
25477  fi
25478
25479      # Now join together the path and the arguments once again
25480      if test "x$arguments" != xEOL; then
25481        new_complete="$new_path ${arguments% *}"
25482      else
25483        new_complete="$new_path"
25484      fi
25485
25486  if test "x$complete" != "x$new_complete"; then
25487      AS="$new_complete"
25488      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25489$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25490    fi
25491
25492else
25493    AS="$CC -c"
25494fi
25495
25496
25497if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25498    # Extract the first word of "nm", so it can be a program name with args.
25499set dummy nm; ac_word=$2
25500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25501$as_echo_n "checking for $ac_word... " >&6; }
25502if test "${ac_cv_path_NM+set}" = set; then :
25503  $as_echo_n "(cached) " >&6
25504else
25505  case $NM in
25506  [\\/]* | ?:[\\/]*)
25507  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25508  ;;
25509  *)
25510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25511for as_dir in $PATH
25512do
25513  IFS=$as_save_IFS
25514  test -z "$as_dir" && as_dir=.
25515    for ac_exec_ext in '' $ac_executable_extensions; do
25516  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25517    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25519    break 2
25520  fi
25521done
25522  done
25523IFS=$as_save_IFS
25524
25525  ;;
25526esac
25527fi
25528NM=$ac_cv_path_NM
25529if test -n "$NM"; then
25530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25531$as_echo "$NM" >&6; }
25532else
25533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25534$as_echo "no" >&6; }
25535fi
25536
25537
25538
25539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25540
25541  # First separate the path from the arguments. This will split at the first
25542  # space.
25543  complete="$NM"
25544  path="${complete%% *}"
25545  tmp="$complete EOL"
25546  arguments="${tmp#* }"
25547
25548  # Input might be given as Windows format, start by converting to
25549  # unix format.
25550  new_path=`$CYGPATH -u "$path"`
25551
25552  # Now try to locate executable using which
25553  new_path=`$WHICH "$new_path" 2> /dev/null`
25554  # bat and cmd files are not always considered executable in cygwin causing which
25555  # to not find them
25556  if test "x$new_path" = x \
25557           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25558           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25559    new_path=`$CYGPATH -u "$path"`
25560  fi
25561  if test "x$new_path" = x; then
25562    # Oops. Which didn't find the executable.
25563    # The splitting of arguments from the executable at a space might have been incorrect,
25564    # since paths with space are more likely in Windows. Give it another try with the whole
25565    # argument.
25566    path="$complete"
25567    arguments="EOL"
25568    new_path=`$CYGPATH -u "$path"`
25569    new_path=`$WHICH "$new_path" 2> /dev/null`
25570    # bat and cmd files are not always considered executable in cygwin causing which
25571    # to not find them
25572    if test "x$new_path" = x \
25573             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25574             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25575      new_path=`$CYGPATH -u "$path"`
25576    fi
25577    if test "x$new_path" = x; then
25578      # It's still not found. Now this is an unrecoverable error.
25579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25580$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25581      has_space=`$ECHO "$complete" | $GREP " "`
25582      if test "x$has_space" != x; then
25583        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25584$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25585      fi
25586      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25587    fi
25588  fi
25589
25590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25593  # "foo.exe" is OK but "foo" is an error.
25594  #
25595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25596  # It is also a way to make sure we got the proper file name for the real test later on.
25597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25598  if test "x$test_shortpath" = x; then
25599    # Short path failed, file does not exist as specified.
25600    # Try adding .exe or .cmd
25601    if test -f "${new_path}.exe"; then
25602       input_to_shortpath="${new_path}.exe"
25603    elif test -f "${new_path}.cmd"; then
25604       input_to_shortpath="${new_path}.cmd"
25605    else
25606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25607$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25608      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25609$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25610      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25611    fi
25612  else
25613    input_to_shortpath="$new_path"
25614  fi
25615
25616  # Call helper function which possibly converts this using DOS-style short mode.
25617  # If so, the updated path is stored in $new_path.
25618  new_path="$input_to_shortpath"
25619
25620  input_path="$input_to_shortpath"
25621  # Check if we need to convert this using DOS-style short mode. If the path
25622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25623  # take no chances and rewrite it.
25624  # Note: m4 eats our [], so we need to use [ and ] instead.
25625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25626  if test "x$has_forbidden_chars" != x; then
25627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25631      # Going to short mode and back again did indeed matter. Since short mode is
25632      # case insensitive, let's make it lowercase to improve readability.
25633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25634      # Now convert it back to Unix-stile (cygpath)
25635      input_path=`$CYGPATH -u "$shortmode_path"`
25636      new_path="$input_path"
25637    fi
25638  fi
25639
25640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25641  if test "x$test_cygdrive_prefix" = x; then
25642    # As a simple fix, exclude /usr/bin since it's not a real path.
25643    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25645      # a path prefixed by /cygdrive for fixpath to work.
25646      new_path="$CYGWIN_ROOT_PATH$input_path"
25647    fi
25648  fi
25649
25650  # remove trailing .exe if any
25651  new_path="${new_path/%.exe/}"
25652
25653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25654
25655  # First separate the path from the arguments. This will split at the first
25656  # space.
25657  complete="$NM"
25658  path="${complete%% *}"
25659  tmp="$complete EOL"
25660  arguments="${tmp#* }"
25661
25662  # Input might be given as Windows format, start by converting to
25663  # unix format.
25664  new_path="$path"
25665
25666  windows_path="$new_path"
25667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25668    unix_path=`$CYGPATH -u "$windows_path"`
25669    new_path="$unix_path"
25670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25672    new_path="$unix_path"
25673  fi
25674
25675
25676  # Now try to locate executable using which
25677  new_path=`$WHICH "$new_path" 2> /dev/null`
25678
25679  if test "x$new_path" = x; then
25680    # Oops. Which didn't find the executable.
25681    # The splitting of arguments from the executable at a space might have been incorrect,
25682    # since paths with space are more likely in Windows. Give it another try with the whole
25683    # argument.
25684    path="$complete"
25685    arguments="EOL"
25686    new_path="$path"
25687
25688  windows_path="$new_path"
25689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25690    unix_path=`$CYGPATH -u "$windows_path"`
25691    new_path="$unix_path"
25692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25694    new_path="$unix_path"
25695  fi
25696
25697
25698    new_path=`$WHICH "$new_path" 2> /dev/null`
25699
25700    if test "x$new_path" = x; then
25701      # It's still not found. Now this is an unrecoverable error.
25702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25703$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25704      has_space=`$ECHO "$complete" | $GREP " "`
25705      if test "x$has_space" != x; then
25706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25708      fi
25709      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25710    fi
25711  fi
25712
25713  # Now new_path has a complete unix path to the binary
25714  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25715    # Keep paths in /bin as-is, but remove trailing .exe if any
25716    new_path="${new_path/%.exe/}"
25717    # Do not save /bin paths to all_fixpath_prefixes!
25718  else
25719    # Not in mixed or Windows style, start by that.
25720    new_path=`cmd //c echo $new_path`
25721
25722  input_path="$new_path"
25723  # Check if we need to convert this using DOS-style short mode. If the path
25724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25725  # take no chances and rewrite it.
25726  # Note: m4 eats our [], so we need to use [ and ] instead.
25727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25728  if test "x$has_forbidden_chars" != x; then
25729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25731  fi
25732
25733    # Output is in $new_path
25734
25735  windows_path="$new_path"
25736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25737    unix_path=`$CYGPATH -u "$windows_path"`
25738    new_path="$unix_path"
25739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25741    new_path="$unix_path"
25742  fi
25743
25744    # remove trailing .exe if any
25745    new_path="${new_path/%.exe/}"
25746
25747    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25748    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25749  fi
25750
25751  else
25752    # We're on a posix platform. Hooray! :)
25753    # First separate the path from the arguments. This will split at the first
25754    # space.
25755    complete="$NM"
25756    path="${complete%% *}"
25757    tmp="$complete EOL"
25758    arguments="${tmp#* }"
25759
25760    # Cannot rely on the command "which" here since it doesn't always work.
25761    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25762    if test -z "$is_absolute_path"; then
25763      # Path to executable is not absolute. Find it.
25764      IFS_save="$IFS"
25765      IFS=:
25766      for p in $PATH; do
25767        if test -f "$p/$path" && test -x "$p/$path"; then
25768          new_path="$p/$path"
25769          break
25770        fi
25771      done
25772      IFS="$IFS_save"
25773    else
25774      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25775$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25776      new_path="$path"
25777    fi
25778
25779    if test "x$new_path" = x; then
25780        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25781$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25782        has_space=`$ECHO "$complete" | $GREP " "`
25783        if test "x$has_space" != x; then
25784          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25785$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25786        fi
25787        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25788      fi
25789  fi
25790
25791      # Now join together the path and the arguments once again
25792      if test "x$arguments" != xEOL; then
25793        new_complete="$new_path ${arguments% *}"
25794      else
25795        new_complete="$new_path"
25796      fi
25797
25798  if test "x$complete" != "x$new_complete"; then
25799      NM="$new_complete"
25800      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25801$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25802    fi
25803
25804    # Extract the first word of "gnm", so it can be a program name with args.
25805set dummy gnm; ac_word=$2
25806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25807$as_echo_n "checking for $ac_word... " >&6; }
25808if test "${ac_cv_path_GNM+set}" = set; then :
25809  $as_echo_n "(cached) " >&6
25810else
25811  case $GNM in
25812  [\\/]* | ?:[\\/]*)
25813  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25814  ;;
25815  *)
25816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25817for as_dir in $PATH
25818do
25819  IFS=$as_save_IFS
25820  test -z "$as_dir" && as_dir=.
25821    for ac_exec_ext in '' $ac_executable_extensions; do
25822  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25823    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25825    break 2
25826  fi
25827done
25828  done
25829IFS=$as_save_IFS
25830
25831  ;;
25832esac
25833fi
25834GNM=$ac_cv_path_GNM
25835if test -n "$GNM"; then
25836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25837$as_echo "$GNM" >&6; }
25838else
25839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25840$as_echo "no" >&6; }
25841fi
25842
25843
25844
25845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25846
25847  # First separate the path from the arguments. This will split at the first
25848  # space.
25849  complete="$GNM"
25850  path="${complete%% *}"
25851  tmp="$complete EOL"
25852  arguments="${tmp#* }"
25853
25854  # Input might be given as Windows format, start by converting to
25855  # unix format.
25856  new_path=`$CYGPATH -u "$path"`
25857
25858  # Now try to locate executable using which
25859  new_path=`$WHICH "$new_path" 2> /dev/null`
25860  # bat and cmd files are not always considered executable in cygwin causing which
25861  # to not find them
25862  if test "x$new_path" = x \
25863           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25864           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25865    new_path=`$CYGPATH -u "$path"`
25866  fi
25867  if test "x$new_path" = x; then
25868    # Oops. Which didn't find the executable.
25869    # The splitting of arguments from the executable at a space might have been incorrect,
25870    # since paths with space are more likely in Windows. Give it another try with the whole
25871    # argument.
25872    path="$complete"
25873    arguments="EOL"
25874    new_path=`$CYGPATH -u "$path"`
25875    new_path=`$WHICH "$new_path" 2> /dev/null`
25876    # bat and cmd files are not always considered executable in cygwin causing which
25877    # to not find them
25878    if test "x$new_path" = x \
25879             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25880             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25881      new_path=`$CYGPATH -u "$path"`
25882    fi
25883    if test "x$new_path" = x; then
25884      # It's still not found. Now this is an unrecoverable error.
25885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25886$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25887      has_space=`$ECHO "$complete" | $GREP " "`
25888      if test "x$has_space" != x; then
25889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25891      fi
25892      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25893    fi
25894  fi
25895
25896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25899  # "foo.exe" is OK but "foo" is an error.
25900  #
25901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25902  # It is also a way to make sure we got the proper file name for the real test later on.
25903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25904  if test "x$test_shortpath" = x; then
25905    # Short path failed, file does not exist as specified.
25906    # Try adding .exe or .cmd
25907    if test -f "${new_path}.exe"; then
25908       input_to_shortpath="${new_path}.exe"
25909    elif test -f "${new_path}.cmd"; then
25910       input_to_shortpath="${new_path}.cmd"
25911    else
25912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25913$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25914      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25915$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25916      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25917    fi
25918  else
25919    input_to_shortpath="$new_path"
25920  fi
25921
25922  # Call helper function which possibly converts this using DOS-style short mode.
25923  # If so, the updated path is stored in $new_path.
25924  new_path="$input_to_shortpath"
25925
25926  input_path="$input_to_shortpath"
25927  # Check if we need to convert this using DOS-style short mode. If the path
25928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25929  # take no chances and rewrite it.
25930  # Note: m4 eats our [], so we need to use [ and ] instead.
25931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25932  if test "x$has_forbidden_chars" != x; then
25933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25937      # Going to short mode and back again did indeed matter. Since short mode is
25938      # case insensitive, let's make it lowercase to improve readability.
25939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25940      # Now convert it back to Unix-stile (cygpath)
25941      input_path=`$CYGPATH -u "$shortmode_path"`
25942      new_path="$input_path"
25943    fi
25944  fi
25945
25946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25947  if test "x$test_cygdrive_prefix" = x; then
25948    # As a simple fix, exclude /usr/bin since it's not a real path.
25949    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25951      # a path prefixed by /cygdrive for fixpath to work.
25952      new_path="$CYGWIN_ROOT_PATH$input_path"
25953    fi
25954  fi
25955
25956  # remove trailing .exe if any
25957  new_path="${new_path/%.exe/}"
25958
25959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25960
25961  # First separate the path from the arguments. This will split at the first
25962  # space.
25963  complete="$GNM"
25964  path="${complete%% *}"
25965  tmp="$complete EOL"
25966  arguments="${tmp#* }"
25967
25968  # Input might be given as Windows format, start by converting to
25969  # unix format.
25970  new_path="$path"
25971
25972  windows_path="$new_path"
25973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25974    unix_path=`$CYGPATH -u "$windows_path"`
25975    new_path="$unix_path"
25976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25978    new_path="$unix_path"
25979  fi
25980
25981
25982  # Now try to locate executable using which
25983  new_path=`$WHICH "$new_path" 2> /dev/null`
25984
25985  if test "x$new_path" = x; then
25986    # Oops. Which didn't find the executable.
25987    # The splitting of arguments from the executable at a space might have been incorrect,
25988    # since paths with space are more likely in Windows. Give it another try with the whole
25989    # argument.
25990    path="$complete"
25991    arguments="EOL"
25992    new_path="$path"
25993
25994  windows_path="$new_path"
25995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25996    unix_path=`$CYGPATH -u "$windows_path"`
25997    new_path="$unix_path"
25998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26000    new_path="$unix_path"
26001  fi
26002
26003
26004    new_path=`$WHICH "$new_path" 2> /dev/null`
26005
26006    if test "x$new_path" = x; then
26007      # It's still not found. Now this is an unrecoverable error.
26008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26009$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26010      has_space=`$ECHO "$complete" | $GREP " "`
26011      if test "x$has_space" != x; then
26012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26014      fi
26015      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26016    fi
26017  fi
26018
26019  # Now new_path has a complete unix path to the binary
26020  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26021    # Keep paths in /bin as-is, but remove trailing .exe if any
26022    new_path="${new_path/%.exe/}"
26023    # Do not save /bin paths to all_fixpath_prefixes!
26024  else
26025    # Not in mixed or Windows style, start by that.
26026    new_path=`cmd //c echo $new_path`
26027
26028  input_path="$new_path"
26029  # Check if we need to convert this using DOS-style short mode. If the path
26030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26031  # take no chances and rewrite it.
26032  # Note: m4 eats our [], so we need to use [ and ] instead.
26033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26034  if test "x$has_forbidden_chars" != x; then
26035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26037  fi
26038
26039    # Output is in $new_path
26040
26041  windows_path="$new_path"
26042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26043    unix_path=`$CYGPATH -u "$windows_path"`
26044    new_path="$unix_path"
26045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26047    new_path="$unix_path"
26048  fi
26049
26050    # remove trailing .exe if any
26051    new_path="${new_path/%.exe/}"
26052
26053    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26054    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26055  fi
26056
26057  else
26058    # We're on a posix platform. Hooray! :)
26059    # First separate the path from the arguments. This will split at the first
26060    # space.
26061    complete="$GNM"
26062    path="${complete%% *}"
26063    tmp="$complete EOL"
26064    arguments="${tmp#* }"
26065
26066    # Cannot rely on the command "which" here since it doesn't always work.
26067    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26068    if test -z "$is_absolute_path"; then
26069      # Path to executable is not absolute. Find it.
26070      IFS_save="$IFS"
26071      IFS=:
26072      for p in $PATH; do
26073        if test -f "$p/$path" && test -x "$p/$path"; then
26074          new_path="$p/$path"
26075          break
26076        fi
26077      done
26078      IFS="$IFS_save"
26079    else
26080      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26081$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26082      new_path="$path"
26083    fi
26084
26085    if test "x$new_path" = x; then
26086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26087$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26088        has_space=`$ECHO "$complete" | $GREP " "`
26089        if test "x$has_space" != x; then
26090          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26091$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26092        fi
26093        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26094      fi
26095  fi
26096
26097      # Now join together the path and the arguments once again
26098      if test "x$arguments" != xEOL; then
26099        new_complete="$new_path ${arguments% *}"
26100      else
26101        new_complete="$new_path"
26102      fi
26103
26104  if test "x$complete" != "x$new_complete"; then
26105      GNM="$new_complete"
26106      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26107$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26108    fi
26109
26110    # Extract the first word of "strip", so it can be a program name with args.
26111set dummy strip; ac_word=$2
26112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26113$as_echo_n "checking for $ac_word... " >&6; }
26114if test "${ac_cv_path_STRIP+set}" = set; then :
26115  $as_echo_n "(cached) " >&6
26116else
26117  case $STRIP in
26118  [\\/]* | ?:[\\/]*)
26119  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26120  ;;
26121  *)
26122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26123for as_dir in $PATH
26124do
26125  IFS=$as_save_IFS
26126  test -z "$as_dir" && as_dir=.
26127    for ac_exec_ext in '' $ac_executable_extensions; do
26128  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26129    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26131    break 2
26132  fi
26133done
26134  done
26135IFS=$as_save_IFS
26136
26137  ;;
26138esac
26139fi
26140STRIP=$ac_cv_path_STRIP
26141if test -n "$STRIP"; then
26142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26143$as_echo "$STRIP" >&6; }
26144else
26145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26146$as_echo "no" >&6; }
26147fi
26148
26149
26150
26151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26152
26153  # First separate the path from the arguments. This will split at the first
26154  # space.
26155  complete="$STRIP"
26156  path="${complete%% *}"
26157  tmp="$complete EOL"
26158  arguments="${tmp#* }"
26159
26160  # Input might be given as Windows format, start by converting to
26161  # unix format.
26162  new_path=`$CYGPATH -u "$path"`
26163
26164  # Now try to locate executable using which
26165  new_path=`$WHICH "$new_path" 2> /dev/null`
26166  # bat and cmd files are not always considered executable in cygwin causing which
26167  # to not find them
26168  if test "x$new_path" = x \
26169           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26170           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26171    new_path=`$CYGPATH -u "$path"`
26172  fi
26173  if test "x$new_path" = x; then
26174    # Oops. Which didn't find the executable.
26175    # The splitting of arguments from the executable at a space might have been incorrect,
26176    # since paths with space are more likely in Windows. Give it another try with the whole
26177    # argument.
26178    path="$complete"
26179    arguments="EOL"
26180    new_path=`$CYGPATH -u "$path"`
26181    new_path=`$WHICH "$new_path" 2> /dev/null`
26182    # bat and cmd files are not always considered executable in cygwin causing which
26183    # to not find them
26184    if test "x$new_path" = x \
26185             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26186             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26187      new_path=`$CYGPATH -u "$path"`
26188    fi
26189    if test "x$new_path" = x; then
26190      # It's still not found. Now this is an unrecoverable error.
26191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26192$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26193      has_space=`$ECHO "$complete" | $GREP " "`
26194      if test "x$has_space" != x; then
26195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26197      fi
26198      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26199    fi
26200  fi
26201
26202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26205  # "foo.exe" is OK but "foo" is an error.
26206  #
26207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26208  # It is also a way to make sure we got the proper file name for the real test later on.
26209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26210  if test "x$test_shortpath" = x; then
26211    # Short path failed, file does not exist as specified.
26212    # Try adding .exe or .cmd
26213    if test -f "${new_path}.exe"; then
26214       input_to_shortpath="${new_path}.exe"
26215    elif test -f "${new_path}.cmd"; then
26216       input_to_shortpath="${new_path}.cmd"
26217    else
26218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26219$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26220      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26221$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26222      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26223    fi
26224  else
26225    input_to_shortpath="$new_path"
26226  fi
26227
26228  # Call helper function which possibly converts this using DOS-style short mode.
26229  # If so, the updated path is stored in $new_path.
26230  new_path="$input_to_shortpath"
26231
26232  input_path="$input_to_shortpath"
26233  # Check if we need to convert this using DOS-style short mode. If the path
26234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26235  # take no chances and rewrite it.
26236  # Note: m4 eats our [], so we need to use [ and ] instead.
26237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26238  if test "x$has_forbidden_chars" != x; then
26239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26243      # Going to short mode and back again did indeed matter. Since short mode is
26244      # case insensitive, let's make it lowercase to improve readability.
26245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26246      # Now convert it back to Unix-stile (cygpath)
26247      input_path=`$CYGPATH -u "$shortmode_path"`
26248      new_path="$input_path"
26249    fi
26250  fi
26251
26252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26253  if test "x$test_cygdrive_prefix" = x; then
26254    # As a simple fix, exclude /usr/bin since it's not a real path.
26255    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26257      # a path prefixed by /cygdrive for fixpath to work.
26258      new_path="$CYGWIN_ROOT_PATH$input_path"
26259    fi
26260  fi
26261
26262  # remove trailing .exe if any
26263  new_path="${new_path/%.exe/}"
26264
26265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26266
26267  # First separate the path from the arguments. This will split at the first
26268  # space.
26269  complete="$STRIP"
26270  path="${complete%% *}"
26271  tmp="$complete EOL"
26272  arguments="${tmp#* }"
26273
26274  # Input might be given as Windows format, start by converting to
26275  # unix format.
26276  new_path="$path"
26277
26278  windows_path="$new_path"
26279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26280    unix_path=`$CYGPATH -u "$windows_path"`
26281    new_path="$unix_path"
26282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26284    new_path="$unix_path"
26285  fi
26286
26287
26288  # Now try to locate executable using which
26289  new_path=`$WHICH "$new_path" 2> /dev/null`
26290
26291  if test "x$new_path" = x; then
26292    # Oops. Which didn't find the executable.
26293    # The splitting of arguments from the executable at a space might have been incorrect,
26294    # since paths with space are more likely in Windows. Give it another try with the whole
26295    # argument.
26296    path="$complete"
26297    arguments="EOL"
26298    new_path="$path"
26299
26300  windows_path="$new_path"
26301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26302    unix_path=`$CYGPATH -u "$windows_path"`
26303    new_path="$unix_path"
26304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26306    new_path="$unix_path"
26307  fi
26308
26309
26310    new_path=`$WHICH "$new_path" 2> /dev/null`
26311
26312    if test "x$new_path" = x; then
26313      # It's still not found. Now this is an unrecoverable error.
26314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26315$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26316      has_space=`$ECHO "$complete" | $GREP " "`
26317      if test "x$has_space" != x; then
26318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26320      fi
26321      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26322    fi
26323  fi
26324
26325  # Now new_path has a complete unix path to the binary
26326  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26327    # Keep paths in /bin as-is, but remove trailing .exe if any
26328    new_path="${new_path/%.exe/}"
26329    # Do not save /bin paths to all_fixpath_prefixes!
26330  else
26331    # Not in mixed or Windows style, start by that.
26332    new_path=`cmd //c echo $new_path`
26333
26334  input_path="$new_path"
26335  # Check if we need to convert this using DOS-style short mode. If the path
26336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26337  # take no chances and rewrite it.
26338  # Note: m4 eats our [], so we need to use [ and ] instead.
26339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26340  if test "x$has_forbidden_chars" != x; then
26341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26343  fi
26344
26345    # Output is in $new_path
26346
26347  windows_path="$new_path"
26348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26349    unix_path=`$CYGPATH -u "$windows_path"`
26350    new_path="$unix_path"
26351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26353    new_path="$unix_path"
26354  fi
26355
26356    # remove trailing .exe if any
26357    new_path="${new_path/%.exe/}"
26358
26359    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26360    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26361  fi
26362
26363  else
26364    # We're on a posix platform. Hooray! :)
26365    # First separate the path from the arguments. This will split at the first
26366    # space.
26367    complete="$STRIP"
26368    path="${complete%% *}"
26369    tmp="$complete EOL"
26370    arguments="${tmp#* }"
26371
26372    # Cannot rely on the command "which" here since it doesn't always work.
26373    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26374    if test -z "$is_absolute_path"; then
26375      # Path to executable is not absolute. Find it.
26376      IFS_save="$IFS"
26377      IFS=:
26378      for p in $PATH; do
26379        if test -f "$p/$path" && test -x "$p/$path"; then
26380          new_path="$p/$path"
26381          break
26382        fi
26383      done
26384      IFS="$IFS_save"
26385    else
26386      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26387$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26388      new_path="$path"
26389    fi
26390
26391    if test "x$new_path" = x; then
26392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26393$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26394        has_space=`$ECHO "$complete" | $GREP " "`
26395        if test "x$has_space" != x; then
26396          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26397$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26398        fi
26399        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26400      fi
26401  fi
26402
26403      # Now join together the path and the arguments once again
26404      if test "x$arguments" != xEOL; then
26405        new_complete="$new_path ${arguments% *}"
26406      else
26407        new_complete="$new_path"
26408      fi
26409
26410  if test "x$complete" != "x$new_complete"; then
26411      STRIP="$new_complete"
26412      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26413$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26414    fi
26415
26416    # Extract the first word of "mcs", so it can be a program name with args.
26417set dummy mcs; ac_word=$2
26418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26419$as_echo_n "checking for $ac_word... " >&6; }
26420if test "${ac_cv_path_MCS+set}" = set; then :
26421  $as_echo_n "(cached) " >&6
26422else
26423  case $MCS in
26424  [\\/]* | ?:[\\/]*)
26425  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26426  ;;
26427  *)
26428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26429for as_dir in $PATH
26430do
26431  IFS=$as_save_IFS
26432  test -z "$as_dir" && as_dir=.
26433    for ac_exec_ext in '' $ac_executable_extensions; do
26434  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26435    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26437    break 2
26438  fi
26439done
26440  done
26441IFS=$as_save_IFS
26442
26443  ;;
26444esac
26445fi
26446MCS=$ac_cv_path_MCS
26447if test -n "$MCS"; then
26448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26449$as_echo "$MCS" >&6; }
26450else
26451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26452$as_echo "no" >&6; }
26453fi
26454
26455
26456
26457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26458
26459  # First separate the path from the arguments. This will split at the first
26460  # space.
26461  complete="$MCS"
26462  path="${complete%% *}"
26463  tmp="$complete EOL"
26464  arguments="${tmp#* }"
26465
26466  # Input might be given as Windows format, start by converting to
26467  # unix format.
26468  new_path=`$CYGPATH -u "$path"`
26469
26470  # Now try to locate executable using which
26471  new_path=`$WHICH "$new_path" 2> /dev/null`
26472  # bat and cmd files are not always considered executable in cygwin causing which
26473  # to not find them
26474  if test "x$new_path" = x \
26475           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26476           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26477    new_path=`$CYGPATH -u "$path"`
26478  fi
26479  if test "x$new_path" = x; then
26480    # Oops. Which didn't find the executable.
26481    # The splitting of arguments from the executable at a space might have been incorrect,
26482    # since paths with space are more likely in Windows. Give it another try with the whole
26483    # argument.
26484    path="$complete"
26485    arguments="EOL"
26486    new_path=`$CYGPATH -u "$path"`
26487    new_path=`$WHICH "$new_path" 2> /dev/null`
26488    # bat and cmd files are not always considered executable in cygwin causing which
26489    # to not find them
26490    if test "x$new_path" = x \
26491             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26492             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26493      new_path=`$CYGPATH -u "$path"`
26494    fi
26495    if test "x$new_path" = x; then
26496      # It's still not found. Now this is an unrecoverable error.
26497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26498$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26499      has_space=`$ECHO "$complete" | $GREP " "`
26500      if test "x$has_space" != x; then
26501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26503      fi
26504      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26505    fi
26506  fi
26507
26508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26511  # "foo.exe" is OK but "foo" is an error.
26512  #
26513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26514  # It is also a way to make sure we got the proper file name for the real test later on.
26515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26516  if test "x$test_shortpath" = x; then
26517    # Short path failed, file does not exist as specified.
26518    # Try adding .exe or .cmd
26519    if test -f "${new_path}.exe"; then
26520       input_to_shortpath="${new_path}.exe"
26521    elif test -f "${new_path}.cmd"; then
26522       input_to_shortpath="${new_path}.cmd"
26523    else
26524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26525$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26526      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26527$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26528      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26529    fi
26530  else
26531    input_to_shortpath="$new_path"
26532  fi
26533
26534  # Call helper function which possibly converts this using DOS-style short mode.
26535  # If so, the updated path is stored in $new_path.
26536  new_path="$input_to_shortpath"
26537
26538  input_path="$input_to_shortpath"
26539  # Check if we need to convert this using DOS-style short mode. If the path
26540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26541  # take no chances and rewrite it.
26542  # Note: m4 eats our [], so we need to use [ and ] instead.
26543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26544  if test "x$has_forbidden_chars" != x; then
26545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26549      # Going to short mode and back again did indeed matter. Since short mode is
26550      # case insensitive, let's make it lowercase to improve readability.
26551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26552      # Now convert it back to Unix-stile (cygpath)
26553      input_path=`$CYGPATH -u "$shortmode_path"`
26554      new_path="$input_path"
26555    fi
26556  fi
26557
26558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26559  if test "x$test_cygdrive_prefix" = x; then
26560    # As a simple fix, exclude /usr/bin since it's not a real path.
26561    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26563      # a path prefixed by /cygdrive for fixpath to work.
26564      new_path="$CYGWIN_ROOT_PATH$input_path"
26565    fi
26566  fi
26567
26568  # remove trailing .exe if any
26569  new_path="${new_path/%.exe/}"
26570
26571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26572
26573  # First separate the path from the arguments. This will split at the first
26574  # space.
26575  complete="$MCS"
26576  path="${complete%% *}"
26577  tmp="$complete EOL"
26578  arguments="${tmp#* }"
26579
26580  # Input might be given as Windows format, start by converting to
26581  # unix format.
26582  new_path="$path"
26583
26584  windows_path="$new_path"
26585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26586    unix_path=`$CYGPATH -u "$windows_path"`
26587    new_path="$unix_path"
26588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26590    new_path="$unix_path"
26591  fi
26592
26593
26594  # Now try to locate executable using which
26595  new_path=`$WHICH "$new_path" 2> /dev/null`
26596
26597  if test "x$new_path" = x; then
26598    # Oops. Which didn't find the executable.
26599    # The splitting of arguments from the executable at a space might have been incorrect,
26600    # since paths with space are more likely in Windows. Give it another try with the whole
26601    # argument.
26602    path="$complete"
26603    arguments="EOL"
26604    new_path="$path"
26605
26606  windows_path="$new_path"
26607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26608    unix_path=`$CYGPATH -u "$windows_path"`
26609    new_path="$unix_path"
26610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26612    new_path="$unix_path"
26613  fi
26614
26615
26616    new_path=`$WHICH "$new_path" 2> /dev/null`
26617
26618    if test "x$new_path" = x; then
26619      # It's still not found. Now this is an unrecoverable error.
26620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26621$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26622      has_space=`$ECHO "$complete" | $GREP " "`
26623      if test "x$has_space" != x; then
26624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26626      fi
26627      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26628    fi
26629  fi
26630
26631  # Now new_path has a complete unix path to the binary
26632  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26633    # Keep paths in /bin as-is, but remove trailing .exe if any
26634    new_path="${new_path/%.exe/}"
26635    # Do not save /bin paths to all_fixpath_prefixes!
26636  else
26637    # Not in mixed or Windows style, start by that.
26638    new_path=`cmd //c echo $new_path`
26639
26640  input_path="$new_path"
26641  # Check if we need to convert this using DOS-style short mode. If the path
26642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26643  # take no chances and rewrite it.
26644  # Note: m4 eats our [], so we need to use [ and ] instead.
26645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26646  if test "x$has_forbidden_chars" != x; then
26647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26649  fi
26650
26651    # Output is in $new_path
26652
26653  windows_path="$new_path"
26654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26655    unix_path=`$CYGPATH -u "$windows_path"`
26656    new_path="$unix_path"
26657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26659    new_path="$unix_path"
26660  fi
26661
26662    # remove trailing .exe if any
26663    new_path="${new_path/%.exe/}"
26664
26665    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26666    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26667  fi
26668
26669  else
26670    # We're on a posix platform. Hooray! :)
26671    # First separate the path from the arguments. This will split at the first
26672    # space.
26673    complete="$MCS"
26674    path="${complete%% *}"
26675    tmp="$complete EOL"
26676    arguments="${tmp#* }"
26677
26678    # Cannot rely on the command "which" here since it doesn't always work.
26679    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26680    if test -z "$is_absolute_path"; then
26681      # Path to executable is not absolute. Find it.
26682      IFS_save="$IFS"
26683      IFS=:
26684      for p in $PATH; do
26685        if test -f "$p/$path" && test -x "$p/$path"; then
26686          new_path="$p/$path"
26687          break
26688        fi
26689      done
26690      IFS="$IFS_save"
26691    else
26692      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26693$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26694      new_path="$path"
26695    fi
26696
26697    if test "x$new_path" = x; then
26698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26699$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26700        has_space=`$ECHO "$complete" | $GREP " "`
26701        if test "x$has_space" != x; then
26702          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26703$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26704        fi
26705        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26706      fi
26707  fi
26708
26709      # Now join together the path and the arguments once again
26710      if test "x$arguments" != xEOL; then
26711        new_complete="$new_path ${arguments% *}"
26712      else
26713        new_complete="$new_path"
26714      fi
26715
26716  if test "x$complete" != "x$new_complete"; then
26717      MCS="$new_complete"
26718      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26719$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26720    fi
26721
26722elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26723    if test -n "$ac_tool_prefix"; then
26724  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26725set dummy ${ac_tool_prefix}nm; ac_word=$2
26726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26727$as_echo_n "checking for $ac_word... " >&6; }
26728if test "${ac_cv_prog_NM+set}" = set; then :
26729  $as_echo_n "(cached) " >&6
26730else
26731  if test -n "$NM"; then
26732  ac_cv_prog_NM="$NM" # Let the user override the test.
26733else
26734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26735for as_dir in $PATH
26736do
26737  IFS=$as_save_IFS
26738  test -z "$as_dir" && as_dir=.
26739    for ac_exec_ext in '' $ac_executable_extensions; do
26740  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26741    ac_cv_prog_NM="${ac_tool_prefix}nm"
26742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26743    break 2
26744  fi
26745done
26746  done
26747IFS=$as_save_IFS
26748
26749fi
26750fi
26751NM=$ac_cv_prog_NM
26752if test -n "$NM"; then
26753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26754$as_echo "$NM" >&6; }
26755else
26756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26757$as_echo "no" >&6; }
26758fi
26759
26760
26761fi
26762if test -z "$ac_cv_prog_NM"; then
26763  ac_ct_NM=$NM
26764  # Extract the first word of "nm", so it can be a program name with args.
26765set dummy nm; ac_word=$2
26766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26767$as_echo_n "checking for $ac_word... " >&6; }
26768if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26769  $as_echo_n "(cached) " >&6
26770else
26771  if test -n "$ac_ct_NM"; then
26772  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26773else
26774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26775for as_dir in $PATH
26776do
26777  IFS=$as_save_IFS
26778  test -z "$as_dir" && as_dir=.
26779    for ac_exec_ext in '' $ac_executable_extensions; do
26780  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26781    ac_cv_prog_ac_ct_NM="nm"
26782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26783    break 2
26784  fi
26785done
26786  done
26787IFS=$as_save_IFS
26788
26789fi
26790fi
26791ac_ct_NM=$ac_cv_prog_ac_ct_NM
26792if test -n "$ac_ct_NM"; then
26793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26794$as_echo "$ac_ct_NM" >&6; }
26795else
26796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26797$as_echo "no" >&6; }
26798fi
26799
26800  if test "x$ac_ct_NM" = x; then
26801    NM=""
26802  else
26803    case $cross_compiling:$ac_tool_warned in
26804yes:)
26805{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26806$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26807ac_tool_warned=yes ;;
26808esac
26809    NM=$ac_ct_NM
26810  fi
26811else
26812  NM="$ac_cv_prog_NM"
26813fi
26814
26815
26816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26817
26818  # First separate the path from the arguments. This will split at the first
26819  # space.
26820  complete="$NM"
26821  path="${complete%% *}"
26822  tmp="$complete EOL"
26823  arguments="${tmp#* }"
26824
26825  # Input might be given as Windows format, start by converting to
26826  # unix format.
26827  new_path=`$CYGPATH -u "$path"`
26828
26829  # Now try to locate executable using which
26830  new_path=`$WHICH "$new_path" 2> /dev/null`
26831  # bat and cmd files are not always considered executable in cygwin causing which
26832  # to not find them
26833  if test "x$new_path" = x \
26834           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26835           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26836    new_path=`$CYGPATH -u "$path"`
26837  fi
26838  if test "x$new_path" = x; then
26839    # Oops. Which didn't find the executable.
26840    # The splitting of arguments from the executable at a space might have been incorrect,
26841    # since paths with space are more likely in Windows. Give it another try with the whole
26842    # argument.
26843    path="$complete"
26844    arguments="EOL"
26845    new_path=`$CYGPATH -u "$path"`
26846    new_path=`$WHICH "$new_path" 2> /dev/null`
26847    # bat and cmd files are not always considered executable in cygwin causing which
26848    # to not find them
26849    if test "x$new_path" = x \
26850             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26851             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26852      new_path=`$CYGPATH -u "$path"`
26853    fi
26854    if test "x$new_path" = x; then
26855      # It's still not found. Now this is an unrecoverable error.
26856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26857$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26858      has_space=`$ECHO "$complete" | $GREP " "`
26859      if test "x$has_space" != x; then
26860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26862      fi
26863      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26864    fi
26865  fi
26866
26867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26870  # "foo.exe" is OK but "foo" is an error.
26871  #
26872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26873  # It is also a way to make sure we got the proper file name for the real test later on.
26874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26875  if test "x$test_shortpath" = x; then
26876    # Short path failed, file does not exist as specified.
26877    # Try adding .exe or .cmd
26878    if test -f "${new_path}.exe"; then
26879       input_to_shortpath="${new_path}.exe"
26880    elif test -f "${new_path}.cmd"; then
26881       input_to_shortpath="${new_path}.cmd"
26882    else
26883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26884$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26885      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26886$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26887      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26888    fi
26889  else
26890    input_to_shortpath="$new_path"
26891  fi
26892
26893  # Call helper function which possibly converts this using DOS-style short mode.
26894  # If so, the updated path is stored in $new_path.
26895  new_path="$input_to_shortpath"
26896
26897  input_path="$input_to_shortpath"
26898  # Check if we need to convert this using DOS-style short mode. If the path
26899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26900  # take no chances and rewrite it.
26901  # Note: m4 eats our [], so we need to use [ and ] instead.
26902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26903  if test "x$has_forbidden_chars" != x; then
26904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26908      # Going to short mode and back again did indeed matter. Since short mode is
26909      # case insensitive, let's make it lowercase to improve readability.
26910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26911      # Now convert it back to Unix-stile (cygpath)
26912      input_path=`$CYGPATH -u "$shortmode_path"`
26913      new_path="$input_path"
26914    fi
26915  fi
26916
26917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26918  if test "x$test_cygdrive_prefix" = x; then
26919    # As a simple fix, exclude /usr/bin since it's not a real path.
26920    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26922      # a path prefixed by /cygdrive for fixpath to work.
26923      new_path="$CYGWIN_ROOT_PATH$input_path"
26924    fi
26925  fi
26926
26927  # remove trailing .exe if any
26928  new_path="${new_path/%.exe/}"
26929
26930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26931
26932  # First separate the path from the arguments. This will split at the first
26933  # space.
26934  complete="$NM"
26935  path="${complete%% *}"
26936  tmp="$complete EOL"
26937  arguments="${tmp#* }"
26938
26939  # Input might be given as Windows format, start by converting to
26940  # unix format.
26941  new_path="$path"
26942
26943  windows_path="$new_path"
26944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26945    unix_path=`$CYGPATH -u "$windows_path"`
26946    new_path="$unix_path"
26947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26949    new_path="$unix_path"
26950  fi
26951
26952
26953  # Now try to locate executable using which
26954  new_path=`$WHICH "$new_path" 2> /dev/null`
26955
26956  if test "x$new_path" = x; then
26957    # Oops. Which didn't find the executable.
26958    # The splitting of arguments from the executable at a space might have been incorrect,
26959    # since paths with space are more likely in Windows. Give it another try with the whole
26960    # argument.
26961    path="$complete"
26962    arguments="EOL"
26963    new_path="$path"
26964
26965  windows_path="$new_path"
26966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26967    unix_path=`$CYGPATH -u "$windows_path"`
26968    new_path="$unix_path"
26969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26971    new_path="$unix_path"
26972  fi
26973
26974
26975    new_path=`$WHICH "$new_path" 2> /dev/null`
26976
26977    if test "x$new_path" = x; then
26978      # It's still not found. Now this is an unrecoverable error.
26979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26980$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26981      has_space=`$ECHO "$complete" | $GREP " "`
26982      if test "x$has_space" != x; then
26983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26985      fi
26986      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26987    fi
26988  fi
26989
26990  # Now new_path has a complete unix path to the binary
26991  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26992    # Keep paths in /bin as-is, but remove trailing .exe if any
26993    new_path="${new_path/%.exe/}"
26994    # Do not save /bin paths to all_fixpath_prefixes!
26995  else
26996    # Not in mixed or Windows style, start by that.
26997    new_path=`cmd //c echo $new_path`
26998
26999  input_path="$new_path"
27000  # Check if we need to convert this using DOS-style short mode. If the path
27001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27002  # take no chances and rewrite it.
27003  # Note: m4 eats our [], so we need to use [ and ] instead.
27004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27005  if test "x$has_forbidden_chars" != x; then
27006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27008  fi
27009
27010    # Output is in $new_path
27011
27012  windows_path="$new_path"
27013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27014    unix_path=`$CYGPATH -u "$windows_path"`
27015    new_path="$unix_path"
27016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27018    new_path="$unix_path"
27019  fi
27020
27021    # remove trailing .exe if any
27022    new_path="${new_path/%.exe/}"
27023
27024    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27025    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27026  fi
27027
27028  else
27029    # We're on a posix platform. Hooray! :)
27030    # First separate the path from the arguments. This will split at the first
27031    # space.
27032    complete="$NM"
27033    path="${complete%% *}"
27034    tmp="$complete EOL"
27035    arguments="${tmp#* }"
27036
27037    # Cannot rely on the command "which" here since it doesn't always work.
27038    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27039    if test -z "$is_absolute_path"; then
27040      # Path to executable is not absolute. Find it.
27041      IFS_save="$IFS"
27042      IFS=:
27043      for p in $PATH; do
27044        if test -f "$p/$path" && test -x "$p/$path"; then
27045          new_path="$p/$path"
27046          break
27047        fi
27048      done
27049      IFS="$IFS_save"
27050    else
27051      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27052$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27053      new_path="$path"
27054    fi
27055
27056    if test "x$new_path" = x; then
27057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27058$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27059        has_space=`$ECHO "$complete" | $GREP " "`
27060        if test "x$has_space" != x; then
27061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27063        fi
27064        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27065      fi
27066  fi
27067
27068      # Now join together the path and the arguments once again
27069      if test "x$arguments" != xEOL; then
27070        new_complete="$new_path ${arguments% *}"
27071      else
27072        new_complete="$new_path"
27073      fi
27074
27075  if test "x$complete" != "x$new_complete"; then
27076      NM="$new_complete"
27077      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27078$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27079    fi
27080
27081    GNM="$NM"
27082
27083    if test -n "$ac_tool_prefix"; then
27084  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27085set dummy ${ac_tool_prefix}strip; ac_word=$2
27086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27087$as_echo_n "checking for $ac_word... " >&6; }
27088if test "${ac_cv_prog_STRIP+set}" = set; then :
27089  $as_echo_n "(cached) " >&6
27090else
27091  if test -n "$STRIP"; then
27092  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27093else
27094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27095for as_dir in $PATH
27096do
27097  IFS=$as_save_IFS
27098  test -z "$as_dir" && as_dir=.
27099    for ac_exec_ext in '' $ac_executable_extensions; do
27100  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27101    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27103    break 2
27104  fi
27105done
27106  done
27107IFS=$as_save_IFS
27108
27109fi
27110fi
27111STRIP=$ac_cv_prog_STRIP
27112if test -n "$STRIP"; then
27113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27114$as_echo "$STRIP" >&6; }
27115else
27116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27117$as_echo "no" >&6; }
27118fi
27119
27120
27121fi
27122if test -z "$ac_cv_prog_STRIP"; then
27123  ac_ct_STRIP=$STRIP
27124  # Extract the first word of "strip", so it can be a program name with args.
27125set dummy strip; ac_word=$2
27126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27127$as_echo_n "checking for $ac_word... " >&6; }
27128if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27129  $as_echo_n "(cached) " >&6
27130else
27131  if test -n "$ac_ct_STRIP"; then
27132  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27133else
27134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27135for as_dir in $PATH
27136do
27137  IFS=$as_save_IFS
27138  test -z "$as_dir" && as_dir=.
27139    for ac_exec_ext in '' $ac_executable_extensions; do
27140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27141    ac_cv_prog_ac_ct_STRIP="strip"
27142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27143    break 2
27144  fi
27145done
27146  done
27147IFS=$as_save_IFS
27148
27149fi
27150fi
27151ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27152if test -n "$ac_ct_STRIP"; then
27153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27154$as_echo "$ac_ct_STRIP" >&6; }
27155else
27156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27157$as_echo "no" >&6; }
27158fi
27159
27160  if test "x$ac_ct_STRIP" = x; then
27161    STRIP=""
27162  else
27163    case $cross_compiling:$ac_tool_warned in
27164yes:)
27165{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27166$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27167ac_tool_warned=yes ;;
27168esac
27169    STRIP=$ac_ct_STRIP
27170  fi
27171else
27172  STRIP="$ac_cv_prog_STRIP"
27173fi
27174
27175
27176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27177
27178  # First separate the path from the arguments. This will split at the first
27179  # space.
27180  complete="$STRIP"
27181  path="${complete%% *}"
27182  tmp="$complete EOL"
27183  arguments="${tmp#* }"
27184
27185  # Input might be given as Windows format, start by converting to
27186  # unix format.
27187  new_path=`$CYGPATH -u "$path"`
27188
27189  # Now try to locate executable using which
27190  new_path=`$WHICH "$new_path" 2> /dev/null`
27191  # bat and cmd files are not always considered executable in cygwin causing which
27192  # to not find them
27193  if test "x$new_path" = x \
27194           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27195           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27196    new_path=`$CYGPATH -u "$path"`
27197  fi
27198  if test "x$new_path" = x; then
27199    # Oops. Which didn't find the executable.
27200    # The splitting of arguments from the executable at a space might have been incorrect,
27201    # since paths with space are more likely in Windows. Give it another try with the whole
27202    # argument.
27203    path="$complete"
27204    arguments="EOL"
27205    new_path=`$CYGPATH -u "$path"`
27206    new_path=`$WHICH "$new_path" 2> /dev/null`
27207    # bat and cmd files are not always considered executable in cygwin causing which
27208    # to not find them
27209    if test "x$new_path" = x \
27210             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27211             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27212      new_path=`$CYGPATH -u "$path"`
27213    fi
27214    if test "x$new_path" = x; then
27215      # It's still not found. Now this is an unrecoverable error.
27216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27217$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27218      has_space=`$ECHO "$complete" | $GREP " "`
27219      if test "x$has_space" != x; then
27220        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27221$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27222      fi
27223      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27224    fi
27225  fi
27226
27227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27230  # "foo.exe" is OK but "foo" is an error.
27231  #
27232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27233  # It is also a way to make sure we got the proper file name for the real test later on.
27234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27235  if test "x$test_shortpath" = x; then
27236    # Short path failed, file does not exist as specified.
27237    # Try adding .exe or .cmd
27238    if test -f "${new_path}.exe"; then
27239       input_to_shortpath="${new_path}.exe"
27240    elif test -f "${new_path}.cmd"; then
27241       input_to_shortpath="${new_path}.cmd"
27242    else
27243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27244$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27245      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27246$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27247      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27248    fi
27249  else
27250    input_to_shortpath="$new_path"
27251  fi
27252
27253  # Call helper function which possibly converts this using DOS-style short mode.
27254  # If so, the updated path is stored in $new_path.
27255  new_path="$input_to_shortpath"
27256
27257  input_path="$input_to_shortpath"
27258  # Check if we need to convert this using DOS-style short mode. If the path
27259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27260  # take no chances and rewrite it.
27261  # Note: m4 eats our [], so we need to use [ and ] instead.
27262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27263  if test "x$has_forbidden_chars" != x; then
27264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27268      # Going to short mode and back again did indeed matter. Since short mode is
27269      # case insensitive, let's make it lowercase to improve readability.
27270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27271      # Now convert it back to Unix-stile (cygpath)
27272      input_path=`$CYGPATH -u "$shortmode_path"`
27273      new_path="$input_path"
27274    fi
27275  fi
27276
27277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27278  if test "x$test_cygdrive_prefix" = x; then
27279    # As a simple fix, exclude /usr/bin since it's not a real path.
27280    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27282      # a path prefixed by /cygdrive for fixpath to work.
27283      new_path="$CYGWIN_ROOT_PATH$input_path"
27284    fi
27285  fi
27286
27287  # remove trailing .exe if any
27288  new_path="${new_path/%.exe/}"
27289
27290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27291
27292  # First separate the path from the arguments. This will split at the first
27293  # space.
27294  complete="$STRIP"
27295  path="${complete%% *}"
27296  tmp="$complete EOL"
27297  arguments="${tmp#* }"
27298
27299  # Input might be given as Windows format, start by converting to
27300  # unix format.
27301  new_path="$path"
27302
27303  windows_path="$new_path"
27304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27305    unix_path=`$CYGPATH -u "$windows_path"`
27306    new_path="$unix_path"
27307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27309    new_path="$unix_path"
27310  fi
27311
27312
27313  # Now try to locate executable using which
27314  new_path=`$WHICH "$new_path" 2> /dev/null`
27315
27316  if test "x$new_path" = x; then
27317    # Oops. Which didn't find the executable.
27318    # The splitting of arguments from the executable at a space might have been incorrect,
27319    # since paths with space are more likely in Windows. Give it another try with the whole
27320    # argument.
27321    path="$complete"
27322    arguments="EOL"
27323    new_path="$path"
27324
27325  windows_path="$new_path"
27326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27327    unix_path=`$CYGPATH -u "$windows_path"`
27328    new_path="$unix_path"
27329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27331    new_path="$unix_path"
27332  fi
27333
27334
27335    new_path=`$WHICH "$new_path" 2> /dev/null`
27336
27337    if test "x$new_path" = x; then
27338      # It's still not found. Now this is an unrecoverable error.
27339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27340$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27341      has_space=`$ECHO "$complete" | $GREP " "`
27342      if test "x$has_space" != x; then
27343        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27344$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27345      fi
27346      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27347    fi
27348  fi
27349
27350  # Now new_path has a complete unix path to the binary
27351  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27352    # Keep paths in /bin as-is, but remove trailing .exe if any
27353    new_path="${new_path/%.exe/}"
27354    # Do not save /bin paths to all_fixpath_prefixes!
27355  else
27356    # Not in mixed or Windows style, start by that.
27357    new_path=`cmd //c echo $new_path`
27358
27359  input_path="$new_path"
27360  # Check if we need to convert this using DOS-style short mode. If the path
27361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27362  # take no chances and rewrite it.
27363  # Note: m4 eats our [], so we need to use [ and ] instead.
27364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27365  if test "x$has_forbidden_chars" != x; then
27366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27368  fi
27369
27370    # Output is in $new_path
27371
27372  windows_path="$new_path"
27373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27374    unix_path=`$CYGPATH -u "$windows_path"`
27375    new_path="$unix_path"
27376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27378    new_path="$unix_path"
27379  fi
27380
27381    # remove trailing .exe if any
27382    new_path="${new_path/%.exe/}"
27383
27384    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27385    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27386  fi
27387
27388  else
27389    # We're on a posix platform. Hooray! :)
27390    # First separate the path from the arguments. This will split at the first
27391    # space.
27392    complete="$STRIP"
27393    path="${complete%% *}"
27394    tmp="$complete EOL"
27395    arguments="${tmp#* }"
27396
27397    # Cannot rely on the command "which" here since it doesn't always work.
27398    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27399    if test -z "$is_absolute_path"; then
27400      # Path to executable is not absolute. Find it.
27401      IFS_save="$IFS"
27402      IFS=:
27403      for p in $PATH; do
27404        if test -f "$p/$path" && test -x "$p/$path"; then
27405          new_path="$p/$path"
27406          break
27407        fi
27408      done
27409      IFS="$IFS_save"
27410    else
27411      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27412$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27413      new_path="$path"
27414    fi
27415
27416    if test "x$new_path" = x; then
27417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27418$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27419        has_space=`$ECHO "$complete" | $GREP " "`
27420        if test "x$has_space" != x; then
27421          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27422$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27423        fi
27424        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27425      fi
27426  fi
27427
27428      # Now join together the path and the arguments once again
27429      if test "x$arguments" != xEOL; then
27430        new_complete="$new_path ${arguments% *}"
27431      else
27432        new_complete="$new_path"
27433      fi
27434
27435  if test "x$complete" != "x$new_complete"; then
27436      STRIP="$new_complete"
27437      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27438$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27439    fi
27440
27441fi
27442
27443# objcopy is used for moving debug symbols to separate files when
27444# full debug symbols are enabled.
27445if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27446    if test -n "$ac_tool_prefix"; then
27447  for ac_prog in gobjcopy objcopy
27448  do
27449    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27450set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27452$as_echo_n "checking for $ac_word... " >&6; }
27453if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27454  $as_echo_n "(cached) " >&6
27455else
27456  if test -n "$OBJCOPY"; then
27457  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27458else
27459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27460for as_dir in $PATH
27461do
27462  IFS=$as_save_IFS
27463  test -z "$as_dir" && as_dir=.
27464    for ac_exec_ext in '' $ac_executable_extensions; do
27465  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27466    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27468    break 2
27469  fi
27470done
27471  done
27472IFS=$as_save_IFS
27473
27474fi
27475fi
27476OBJCOPY=$ac_cv_prog_OBJCOPY
27477if test -n "$OBJCOPY"; then
27478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27479$as_echo "$OBJCOPY" >&6; }
27480else
27481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27482$as_echo "no" >&6; }
27483fi
27484
27485
27486    test -n "$OBJCOPY" && break
27487  done
27488fi
27489if test -z "$OBJCOPY"; then
27490  ac_ct_OBJCOPY=$OBJCOPY
27491  for ac_prog in gobjcopy objcopy
27492do
27493  # Extract the first word of "$ac_prog", so it can be a program name with args.
27494set dummy $ac_prog; ac_word=$2
27495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27496$as_echo_n "checking for $ac_word... " >&6; }
27497if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27498  $as_echo_n "(cached) " >&6
27499else
27500  if test -n "$ac_ct_OBJCOPY"; then
27501  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27502else
27503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27504for as_dir in $PATH
27505do
27506  IFS=$as_save_IFS
27507  test -z "$as_dir" && as_dir=.
27508    for ac_exec_ext in '' $ac_executable_extensions; do
27509  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27510    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27512    break 2
27513  fi
27514done
27515  done
27516IFS=$as_save_IFS
27517
27518fi
27519fi
27520ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27521if test -n "$ac_ct_OBJCOPY"; then
27522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27523$as_echo "$ac_ct_OBJCOPY" >&6; }
27524else
27525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27526$as_echo "no" >&6; }
27527fi
27528
27529
27530  test -n "$ac_ct_OBJCOPY" && break
27531done
27532
27533  if test "x$ac_ct_OBJCOPY" = x; then
27534    OBJCOPY=""
27535  else
27536    case $cross_compiling:$ac_tool_warned in
27537yes:)
27538{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27539$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27540ac_tool_warned=yes ;;
27541esac
27542    OBJCOPY=$ac_ct_OBJCOPY
27543  fi
27544fi
27545
27546    # Only call fixup if objcopy was found.
27547    if test -n "$OBJCOPY"; then
27548
27549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27550
27551  # First separate the path from the arguments. This will split at the first
27552  # space.
27553  complete="$OBJCOPY"
27554  path="${complete%% *}"
27555  tmp="$complete EOL"
27556  arguments="${tmp#* }"
27557
27558  # Input might be given as Windows format, start by converting to
27559  # unix format.
27560  new_path=`$CYGPATH -u "$path"`
27561
27562  # Now try to locate executable using which
27563  new_path=`$WHICH "$new_path" 2> /dev/null`
27564  # bat and cmd files are not always considered executable in cygwin causing which
27565  # to not find them
27566  if test "x$new_path" = x \
27567           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27568           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27569    new_path=`$CYGPATH -u "$path"`
27570  fi
27571  if test "x$new_path" = x; then
27572    # Oops. Which didn't find the executable.
27573    # The splitting of arguments from the executable at a space might have been incorrect,
27574    # since paths with space are more likely in Windows. Give it another try with the whole
27575    # argument.
27576    path="$complete"
27577    arguments="EOL"
27578    new_path=`$CYGPATH -u "$path"`
27579    new_path=`$WHICH "$new_path" 2> /dev/null`
27580    # bat and cmd files are not always considered executable in cygwin causing which
27581    # to not find them
27582    if test "x$new_path" = x \
27583             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27584             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27585      new_path=`$CYGPATH -u "$path"`
27586    fi
27587    if test "x$new_path" = x; then
27588      # It's still not found. Now this is an unrecoverable error.
27589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27590$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27591      has_space=`$ECHO "$complete" | $GREP " "`
27592      if test "x$has_space" != x; then
27593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27595      fi
27596      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27597    fi
27598  fi
27599
27600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27603  # "foo.exe" is OK but "foo" is an error.
27604  #
27605  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27606  # It is also a way to make sure we got the proper file name for the real test later on.
27607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27608  if test "x$test_shortpath" = x; then
27609    # Short path failed, file does not exist as specified.
27610    # Try adding .exe or .cmd
27611    if test -f "${new_path}.exe"; then
27612       input_to_shortpath="${new_path}.exe"
27613    elif test -f "${new_path}.cmd"; then
27614       input_to_shortpath="${new_path}.cmd"
27615    else
27616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27617$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27618      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27619$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27620      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27621    fi
27622  else
27623    input_to_shortpath="$new_path"
27624  fi
27625
27626  # Call helper function which possibly converts this using DOS-style short mode.
27627  # If so, the updated path is stored in $new_path.
27628  new_path="$input_to_shortpath"
27629
27630  input_path="$input_to_shortpath"
27631  # Check if we need to convert this using DOS-style short mode. If the path
27632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27633  # take no chances and rewrite it.
27634  # Note: m4 eats our [], so we need to use [ and ] instead.
27635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27636  if test "x$has_forbidden_chars" != x; then
27637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27641      # Going to short mode and back again did indeed matter. Since short mode is
27642      # case insensitive, let's make it lowercase to improve readability.
27643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27644      # Now convert it back to Unix-stile (cygpath)
27645      input_path=`$CYGPATH -u "$shortmode_path"`
27646      new_path="$input_path"
27647    fi
27648  fi
27649
27650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27651  if test "x$test_cygdrive_prefix" = x; then
27652    # As a simple fix, exclude /usr/bin since it's not a real path.
27653    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27655      # a path prefixed by /cygdrive for fixpath to work.
27656      new_path="$CYGWIN_ROOT_PATH$input_path"
27657    fi
27658  fi
27659
27660  # remove trailing .exe if any
27661  new_path="${new_path/%.exe/}"
27662
27663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27664
27665  # First separate the path from the arguments. This will split at the first
27666  # space.
27667  complete="$OBJCOPY"
27668  path="${complete%% *}"
27669  tmp="$complete EOL"
27670  arguments="${tmp#* }"
27671
27672  # Input might be given as Windows format, start by converting to
27673  # unix format.
27674  new_path="$path"
27675
27676  windows_path="$new_path"
27677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27678    unix_path=`$CYGPATH -u "$windows_path"`
27679    new_path="$unix_path"
27680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27682    new_path="$unix_path"
27683  fi
27684
27685
27686  # Now try to locate executable using which
27687  new_path=`$WHICH "$new_path" 2> /dev/null`
27688
27689  if test "x$new_path" = x; then
27690    # Oops. Which didn't find the executable.
27691    # The splitting of arguments from the executable at a space might have been incorrect,
27692    # since paths with space are more likely in Windows. Give it another try with the whole
27693    # argument.
27694    path="$complete"
27695    arguments="EOL"
27696    new_path="$path"
27697
27698  windows_path="$new_path"
27699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27700    unix_path=`$CYGPATH -u "$windows_path"`
27701    new_path="$unix_path"
27702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27704    new_path="$unix_path"
27705  fi
27706
27707
27708    new_path=`$WHICH "$new_path" 2> /dev/null`
27709
27710    if test "x$new_path" = x; then
27711      # It's still not found. Now this is an unrecoverable error.
27712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27713$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27714      has_space=`$ECHO "$complete" | $GREP " "`
27715      if test "x$has_space" != x; then
27716        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27717$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27718      fi
27719      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27720    fi
27721  fi
27722
27723  # Now new_path has a complete unix path to the binary
27724  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27725    # Keep paths in /bin as-is, but remove trailing .exe if any
27726    new_path="${new_path/%.exe/}"
27727    # Do not save /bin paths to all_fixpath_prefixes!
27728  else
27729    # Not in mixed or Windows style, start by that.
27730    new_path=`cmd //c echo $new_path`
27731
27732  input_path="$new_path"
27733  # Check if we need to convert this using DOS-style short mode. If the path
27734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27735  # take no chances and rewrite it.
27736  # Note: m4 eats our [], so we need to use [ and ] instead.
27737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27738  if test "x$has_forbidden_chars" != x; then
27739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27741  fi
27742
27743    # Output is in $new_path
27744
27745  windows_path="$new_path"
27746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27747    unix_path=`$CYGPATH -u "$windows_path"`
27748    new_path="$unix_path"
27749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27751    new_path="$unix_path"
27752  fi
27753
27754    # remove trailing .exe if any
27755    new_path="${new_path/%.exe/}"
27756
27757    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27758    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27759  fi
27760
27761  else
27762    # We're on a posix platform. Hooray! :)
27763    # First separate the path from the arguments. This will split at the first
27764    # space.
27765    complete="$OBJCOPY"
27766    path="${complete%% *}"
27767    tmp="$complete EOL"
27768    arguments="${tmp#* }"
27769
27770    # Cannot rely on the command "which" here since it doesn't always work.
27771    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27772    if test -z "$is_absolute_path"; then
27773      # Path to executable is not absolute. Find it.
27774      IFS_save="$IFS"
27775      IFS=:
27776      for p in $PATH; do
27777        if test -f "$p/$path" && test -x "$p/$path"; then
27778          new_path="$p/$path"
27779          break
27780        fi
27781      done
27782      IFS="$IFS_save"
27783    else
27784      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27785$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27786      new_path="$path"
27787    fi
27788
27789    if test "x$new_path" = x; then
27790        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27791$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27792        has_space=`$ECHO "$complete" | $GREP " "`
27793        if test "x$has_space" != x; then
27794          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27795$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27796        fi
27797        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27798      fi
27799  fi
27800
27801      # Now join together the path and the arguments once again
27802      if test "x$arguments" != xEOL; then
27803        new_complete="$new_path ${arguments% *}"
27804      else
27805        new_complete="$new_path"
27806      fi
27807
27808  if test "x$complete" != "x$new_complete"; then
27809      OBJCOPY="$new_complete"
27810      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27811$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27812    fi
27813
27814    fi
27815fi
27816
27817if test -n "$ac_tool_prefix"; then
27818  for ac_prog in gobjdump objdump
27819  do
27820    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27821set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27823$as_echo_n "checking for $ac_word... " >&6; }
27824if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27825  $as_echo_n "(cached) " >&6
27826else
27827  if test -n "$OBJDUMP"; then
27828  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27829else
27830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27831for as_dir in $PATH
27832do
27833  IFS=$as_save_IFS
27834  test -z "$as_dir" && as_dir=.
27835    for ac_exec_ext in '' $ac_executable_extensions; do
27836  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27837    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27839    break 2
27840  fi
27841done
27842  done
27843IFS=$as_save_IFS
27844
27845fi
27846fi
27847OBJDUMP=$ac_cv_prog_OBJDUMP
27848if test -n "$OBJDUMP"; then
27849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27850$as_echo "$OBJDUMP" >&6; }
27851else
27852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27853$as_echo "no" >&6; }
27854fi
27855
27856
27857    test -n "$OBJDUMP" && break
27858  done
27859fi
27860if test -z "$OBJDUMP"; then
27861  ac_ct_OBJDUMP=$OBJDUMP
27862  for ac_prog in gobjdump objdump
27863do
27864  # Extract the first word of "$ac_prog", so it can be a program name with args.
27865set dummy $ac_prog; ac_word=$2
27866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27867$as_echo_n "checking for $ac_word... " >&6; }
27868if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27869  $as_echo_n "(cached) " >&6
27870else
27871  if test -n "$ac_ct_OBJDUMP"; then
27872  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27873else
27874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27875for as_dir in $PATH
27876do
27877  IFS=$as_save_IFS
27878  test -z "$as_dir" && as_dir=.
27879    for ac_exec_ext in '' $ac_executable_extensions; do
27880  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27881    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27883    break 2
27884  fi
27885done
27886  done
27887IFS=$as_save_IFS
27888
27889fi
27890fi
27891ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27892if test -n "$ac_ct_OBJDUMP"; then
27893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27894$as_echo "$ac_ct_OBJDUMP" >&6; }
27895else
27896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27897$as_echo "no" >&6; }
27898fi
27899
27900
27901  test -n "$ac_ct_OBJDUMP" && break
27902done
27903
27904  if test "x$ac_ct_OBJDUMP" = x; then
27905    OBJDUMP=""
27906  else
27907    case $cross_compiling:$ac_tool_warned in
27908yes:)
27909{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27910$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27911ac_tool_warned=yes ;;
27912esac
27913    OBJDUMP=$ac_ct_OBJDUMP
27914  fi
27915fi
27916
27917if test "x$OBJDUMP" != x; then
27918  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27919
27920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27921
27922  # First separate the path from the arguments. This will split at the first
27923  # space.
27924  complete="$OBJDUMP"
27925  path="${complete%% *}"
27926  tmp="$complete EOL"
27927  arguments="${tmp#* }"
27928
27929  # Input might be given as Windows format, start by converting to
27930  # unix format.
27931  new_path=`$CYGPATH -u "$path"`
27932
27933  # Now try to locate executable using which
27934  new_path=`$WHICH "$new_path" 2> /dev/null`
27935  # bat and cmd files are not always considered executable in cygwin causing which
27936  # to not find them
27937  if test "x$new_path" = x \
27938           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27939           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27940    new_path=`$CYGPATH -u "$path"`
27941  fi
27942  if test "x$new_path" = x; then
27943    # Oops. Which didn't find the executable.
27944    # The splitting of arguments from the executable at a space might have been incorrect,
27945    # since paths with space are more likely in Windows. Give it another try with the whole
27946    # argument.
27947    path="$complete"
27948    arguments="EOL"
27949    new_path=`$CYGPATH -u "$path"`
27950    new_path=`$WHICH "$new_path" 2> /dev/null`
27951    # bat and cmd files are not always considered executable in cygwin causing which
27952    # to not find them
27953    if test "x$new_path" = x \
27954             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27955             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27956      new_path=`$CYGPATH -u "$path"`
27957    fi
27958    if test "x$new_path" = x; then
27959      # It's still not found. Now this is an unrecoverable error.
27960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27961$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27962      has_space=`$ECHO "$complete" | $GREP " "`
27963      if test "x$has_space" != x; then
27964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27966      fi
27967      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27968    fi
27969  fi
27970
27971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27974  # "foo.exe" is OK but "foo" is an error.
27975  #
27976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27977  # It is also a way to make sure we got the proper file name for the real test later on.
27978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27979  if test "x$test_shortpath" = x; then
27980    # Short path failed, file does not exist as specified.
27981    # Try adding .exe or .cmd
27982    if test -f "${new_path}.exe"; then
27983       input_to_shortpath="${new_path}.exe"
27984    elif test -f "${new_path}.cmd"; then
27985       input_to_shortpath="${new_path}.cmd"
27986    else
27987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27988$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27989      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27990$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27991      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27992    fi
27993  else
27994    input_to_shortpath="$new_path"
27995  fi
27996
27997  # Call helper function which possibly converts this using DOS-style short mode.
27998  # If so, the updated path is stored in $new_path.
27999  new_path="$input_to_shortpath"
28000
28001  input_path="$input_to_shortpath"
28002  # Check if we need to convert this using DOS-style short mode. If the path
28003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28004  # take no chances and rewrite it.
28005  # Note: m4 eats our [], so we need to use [ and ] instead.
28006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28007  if test "x$has_forbidden_chars" != x; then
28008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28012      # Going to short mode and back again did indeed matter. Since short mode is
28013      # case insensitive, let's make it lowercase to improve readability.
28014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28015      # Now convert it back to Unix-stile (cygpath)
28016      input_path=`$CYGPATH -u "$shortmode_path"`
28017      new_path="$input_path"
28018    fi
28019  fi
28020
28021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28022  if test "x$test_cygdrive_prefix" = x; then
28023    # As a simple fix, exclude /usr/bin since it's not a real path.
28024    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28026      # a path prefixed by /cygdrive for fixpath to work.
28027      new_path="$CYGWIN_ROOT_PATH$input_path"
28028    fi
28029  fi
28030
28031  # remove trailing .exe if any
28032  new_path="${new_path/%.exe/}"
28033
28034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28035
28036  # First separate the path from the arguments. This will split at the first
28037  # space.
28038  complete="$OBJDUMP"
28039  path="${complete%% *}"
28040  tmp="$complete EOL"
28041  arguments="${tmp#* }"
28042
28043  # Input might be given as Windows format, start by converting to
28044  # unix format.
28045  new_path="$path"
28046
28047  windows_path="$new_path"
28048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28049    unix_path=`$CYGPATH -u "$windows_path"`
28050    new_path="$unix_path"
28051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28053    new_path="$unix_path"
28054  fi
28055
28056
28057  # Now try to locate executable using which
28058  new_path=`$WHICH "$new_path" 2> /dev/null`
28059
28060  if test "x$new_path" = x; then
28061    # Oops. Which didn't find the executable.
28062    # The splitting of arguments from the executable at a space might have been incorrect,
28063    # since paths with space are more likely in Windows. Give it another try with the whole
28064    # argument.
28065    path="$complete"
28066    arguments="EOL"
28067    new_path="$path"
28068
28069  windows_path="$new_path"
28070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28071    unix_path=`$CYGPATH -u "$windows_path"`
28072    new_path="$unix_path"
28073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28075    new_path="$unix_path"
28076  fi
28077
28078
28079    new_path=`$WHICH "$new_path" 2> /dev/null`
28080
28081    if test "x$new_path" = x; then
28082      # It's still not found. Now this is an unrecoverable error.
28083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28084$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28085      has_space=`$ECHO "$complete" | $GREP " "`
28086      if test "x$has_space" != x; then
28087        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28088$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28089      fi
28090      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28091    fi
28092  fi
28093
28094  # Now new_path has a complete unix path to the binary
28095  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28096    # Keep paths in /bin as-is, but remove trailing .exe if any
28097    new_path="${new_path/%.exe/}"
28098    # Do not save /bin paths to all_fixpath_prefixes!
28099  else
28100    # Not in mixed or Windows style, start by that.
28101    new_path=`cmd //c echo $new_path`
28102
28103  input_path="$new_path"
28104  # Check if we need to convert this using DOS-style short mode. If the path
28105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28106  # take no chances and rewrite it.
28107  # Note: m4 eats our [], so we need to use [ and ] instead.
28108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28109  if test "x$has_forbidden_chars" != x; then
28110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28112  fi
28113
28114    # Output is in $new_path
28115
28116  windows_path="$new_path"
28117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28118    unix_path=`$CYGPATH -u "$windows_path"`
28119    new_path="$unix_path"
28120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28122    new_path="$unix_path"
28123  fi
28124
28125    # remove trailing .exe if any
28126    new_path="${new_path/%.exe/}"
28127
28128    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28129    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28130  fi
28131
28132  else
28133    # We're on a posix platform. Hooray! :)
28134    # First separate the path from the arguments. This will split at the first
28135    # space.
28136    complete="$OBJDUMP"
28137    path="${complete%% *}"
28138    tmp="$complete EOL"
28139    arguments="${tmp#* }"
28140
28141    # Cannot rely on the command "which" here since it doesn't always work.
28142    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28143    if test -z "$is_absolute_path"; then
28144      # Path to executable is not absolute. Find it.
28145      IFS_save="$IFS"
28146      IFS=:
28147      for p in $PATH; do
28148        if test -f "$p/$path" && test -x "$p/$path"; then
28149          new_path="$p/$path"
28150          break
28151        fi
28152      done
28153      IFS="$IFS_save"
28154    else
28155      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28156$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28157      new_path="$path"
28158    fi
28159
28160    if test "x$new_path" = x; then
28161        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28162$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28163        has_space=`$ECHO "$complete" | $GREP " "`
28164        if test "x$has_space" != x; then
28165          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28166$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28167        fi
28168        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28169      fi
28170  fi
28171
28172      # Now join together the path and the arguments once again
28173      if test "x$arguments" != xEOL; then
28174        new_complete="$new_path ${arguments% *}"
28175      else
28176        new_complete="$new_path"
28177      fi
28178
28179  if test "x$complete" != "x$new_complete"; then
28180      OBJDUMP="$new_complete"
28181      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28182$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28183    fi
28184
28185fi
28186
28187if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28188   # Extract the first word of "lipo", so it can be a program name with args.
28189set dummy lipo; ac_word=$2
28190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28191$as_echo_n "checking for $ac_word... " >&6; }
28192if test "${ac_cv_path_LIPO+set}" = set; then :
28193  $as_echo_n "(cached) " >&6
28194else
28195  case $LIPO in
28196  [\\/]* | ?:[\\/]*)
28197  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28198  ;;
28199  *)
28200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28201for as_dir in $PATH
28202do
28203  IFS=$as_save_IFS
28204  test -z "$as_dir" && as_dir=.
28205    for ac_exec_ext in '' $ac_executable_extensions; do
28206  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28207    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28209    break 2
28210  fi
28211done
28212  done
28213IFS=$as_save_IFS
28214
28215  ;;
28216esac
28217fi
28218LIPO=$ac_cv_path_LIPO
28219if test -n "$LIPO"; then
28220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28221$as_echo "$LIPO" >&6; }
28222else
28223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28224$as_echo "no" >&6; }
28225fi
28226
28227
28228
28229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28230
28231  # First separate the path from the arguments. This will split at the first
28232  # space.
28233  complete="$LIPO"
28234  path="${complete%% *}"
28235  tmp="$complete EOL"
28236  arguments="${tmp#* }"
28237
28238  # Input might be given as Windows format, start by converting to
28239  # unix format.
28240  new_path=`$CYGPATH -u "$path"`
28241
28242  # Now try to locate executable using which
28243  new_path=`$WHICH "$new_path" 2> /dev/null`
28244  # bat and cmd files are not always considered executable in cygwin causing which
28245  # to not find them
28246  if test "x$new_path" = x \
28247           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28248           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28249    new_path=`$CYGPATH -u "$path"`
28250  fi
28251  if test "x$new_path" = x; then
28252    # Oops. Which didn't find the executable.
28253    # The splitting of arguments from the executable at a space might have been incorrect,
28254    # since paths with space are more likely in Windows. Give it another try with the whole
28255    # argument.
28256    path="$complete"
28257    arguments="EOL"
28258    new_path=`$CYGPATH -u "$path"`
28259    new_path=`$WHICH "$new_path" 2> /dev/null`
28260    # bat and cmd files are not always considered executable in cygwin causing which
28261    # to not find them
28262    if test "x$new_path" = x \
28263             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28264             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28265      new_path=`$CYGPATH -u "$path"`
28266    fi
28267    if test "x$new_path" = x; then
28268      # It's still not found. Now this is an unrecoverable error.
28269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28270$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28271      has_space=`$ECHO "$complete" | $GREP " "`
28272      if test "x$has_space" != x; then
28273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28275      fi
28276      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28277    fi
28278  fi
28279
28280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28283  # "foo.exe" is OK but "foo" is an error.
28284  #
28285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28286  # It is also a way to make sure we got the proper file name for the real test later on.
28287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28288  if test "x$test_shortpath" = x; then
28289    # Short path failed, file does not exist as specified.
28290    # Try adding .exe or .cmd
28291    if test -f "${new_path}.exe"; then
28292       input_to_shortpath="${new_path}.exe"
28293    elif test -f "${new_path}.cmd"; then
28294       input_to_shortpath="${new_path}.cmd"
28295    else
28296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28297$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28298      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28299$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28300      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28301    fi
28302  else
28303    input_to_shortpath="$new_path"
28304  fi
28305
28306  # Call helper function which possibly converts this using DOS-style short mode.
28307  # If so, the updated path is stored in $new_path.
28308  new_path="$input_to_shortpath"
28309
28310  input_path="$input_to_shortpath"
28311  # Check if we need to convert this using DOS-style short mode. If the path
28312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28313  # take no chances and rewrite it.
28314  # Note: m4 eats our [], so we need to use [ and ] instead.
28315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28316  if test "x$has_forbidden_chars" != x; then
28317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28321      # Going to short mode and back again did indeed matter. Since short mode is
28322      # case insensitive, let's make it lowercase to improve readability.
28323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28324      # Now convert it back to Unix-stile (cygpath)
28325      input_path=`$CYGPATH -u "$shortmode_path"`
28326      new_path="$input_path"
28327    fi
28328  fi
28329
28330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28331  if test "x$test_cygdrive_prefix" = x; then
28332    # As a simple fix, exclude /usr/bin since it's not a real path.
28333    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28335      # a path prefixed by /cygdrive for fixpath to work.
28336      new_path="$CYGWIN_ROOT_PATH$input_path"
28337    fi
28338  fi
28339
28340  # remove trailing .exe if any
28341  new_path="${new_path/%.exe/}"
28342
28343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28344
28345  # First separate the path from the arguments. This will split at the first
28346  # space.
28347  complete="$LIPO"
28348  path="${complete%% *}"
28349  tmp="$complete EOL"
28350  arguments="${tmp#* }"
28351
28352  # Input might be given as Windows format, start by converting to
28353  # unix format.
28354  new_path="$path"
28355
28356  windows_path="$new_path"
28357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28358    unix_path=`$CYGPATH -u "$windows_path"`
28359    new_path="$unix_path"
28360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28362    new_path="$unix_path"
28363  fi
28364
28365
28366  # Now try to locate executable using which
28367  new_path=`$WHICH "$new_path" 2> /dev/null`
28368
28369  if test "x$new_path" = x; then
28370    # Oops. Which didn't find the executable.
28371    # The splitting of arguments from the executable at a space might have been incorrect,
28372    # since paths with space are more likely in Windows. Give it another try with the whole
28373    # argument.
28374    path="$complete"
28375    arguments="EOL"
28376    new_path="$path"
28377
28378  windows_path="$new_path"
28379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28380    unix_path=`$CYGPATH -u "$windows_path"`
28381    new_path="$unix_path"
28382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28384    new_path="$unix_path"
28385  fi
28386
28387
28388    new_path=`$WHICH "$new_path" 2> /dev/null`
28389
28390    if test "x$new_path" = x; then
28391      # It's still not found. Now this is an unrecoverable error.
28392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28393$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28394      has_space=`$ECHO "$complete" | $GREP " "`
28395      if test "x$has_space" != x; then
28396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28398      fi
28399      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28400    fi
28401  fi
28402
28403  # Now new_path has a complete unix path to the binary
28404  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28405    # Keep paths in /bin as-is, but remove trailing .exe if any
28406    new_path="${new_path/%.exe/}"
28407    # Do not save /bin paths to all_fixpath_prefixes!
28408  else
28409    # Not in mixed or Windows style, start by that.
28410    new_path=`cmd //c echo $new_path`
28411
28412  input_path="$new_path"
28413  # Check if we need to convert this using DOS-style short mode. If the path
28414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28415  # take no chances and rewrite it.
28416  # Note: m4 eats our [], so we need to use [ and ] instead.
28417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28418  if test "x$has_forbidden_chars" != x; then
28419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28421  fi
28422
28423    # Output is in $new_path
28424
28425  windows_path="$new_path"
28426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28427    unix_path=`$CYGPATH -u "$windows_path"`
28428    new_path="$unix_path"
28429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28431    new_path="$unix_path"
28432  fi
28433
28434    # remove trailing .exe if any
28435    new_path="${new_path/%.exe/}"
28436
28437    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28438    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28439  fi
28440
28441  else
28442    # We're on a posix platform. Hooray! :)
28443    # First separate the path from the arguments. This will split at the first
28444    # space.
28445    complete="$LIPO"
28446    path="${complete%% *}"
28447    tmp="$complete EOL"
28448    arguments="${tmp#* }"
28449
28450    # Cannot rely on the command "which" here since it doesn't always work.
28451    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28452    if test -z "$is_absolute_path"; then
28453      # Path to executable is not absolute. Find it.
28454      IFS_save="$IFS"
28455      IFS=:
28456      for p in $PATH; do
28457        if test -f "$p/$path" && test -x "$p/$path"; then
28458          new_path="$p/$path"
28459          break
28460        fi
28461      done
28462      IFS="$IFS_save"
28463    else
28464      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28465$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28466      new_path="$path"
28467    fi
28468
28469    if test "x$new_path" = x; then
28470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28471$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28472        has_space=`$ECHO "$complete" | $GREP " "`
28473        if test "x$has_space" != x; then
28474          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28475$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28476        fi
28477        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28478      fi
28479  fi
28480
28481      # Now join together the path and the arguments once again
28482      if test "x$arguments" != xEOL; then
28483        new_complete="$new_path ${arguments% *}"
28484      else
28485        new_complete="$new_path"
28486      fi
28487
28488  if test "x$complete" != "x$new_complete"; then
28489      LIPO="$new_complete"
28490      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28491$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28492    fi
28493
28494fi
28495
28496
28497
28498# Restore old path without tools dir
28499PATH="$OLD_PATH"
28500
28501
28502# FIXME: Currently we must test this after paths but before flags. Fix!
28503
28504# And we can test some aspects on the target using configure macros.
28505
28506
28507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28508$as_echo_n "checking for ANSI C header files... " >&6; }
28509if test "${ac_cv_header_stdc+set}" = set; then :
28510  $as_echo_n "(cached) " >&6
28511else
28512  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28513/* end confdefs.h.  */
28514#include <stdlib.h>
28515#include <stdarg.h>
28516#include <string.h>
28517#include <float.h>
28518
28519int
28520main ()
28521{
28522
28523  ;
28524  return 0;
28525}
28526_ACEOF
28527if ac_fn_cxx_try_compile "$LINENO"; then :
28528  ac_cv_header_stdc=yes
28529else
28530  ac_cv_header_stdc=no
28531fi
28532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28533
28534if test $ac_cv_header_stdc = yes; then
28535  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28536  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28537/* end confdefs.h.  */
28538#include <string.h>
28539
28540_ACEOF
28541if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28542  $EGREP "memchr" >/dev/null 2>&1; then :
28543
28544else
28545  ac_cv_header_stdc=no
28546fi
28547rm -f conftest*
28548
28549fi
28550
28551if test $ac_cv_header_stdc = yes; then
28552  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28554/* end confdefs.h.  */
28555#include <stdlib.h>
28556
28557_ACEOF
28558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28559  $EGREP "free" >/dev/null 2>&1; then :
28560
28561else
28562  ac_cv_header_stdc=no
28563fi
28564rm -f conftest*
28565
28566fi
28567
28568if test $ac_cv_header_stdc = yes; then
28569  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28570  if test "$cross_compiling" = yes; then :
28571  :
28572else
28573  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28574/* end confdefs.h.  */
28575#include <ctype.h>
28576#include <stdlib.h>
28577#if ((' ' & 0x0FF) == 0x020)
28578# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28579# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28580#else
28581# define ISLOWER(c) \
28582		   (('a' <= (c) && (c) <= 'i') \
28583		     || ('j' <= (c) && (c) <= 'r') \
28584		     || ('s' <= (c) && (c) <= 'z'))
28585# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28586#endif
28587
28588#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28589int
28590main ()
28591{
28592  int i;
28593  for (i = 0; i < 256; i++)
28594    if (XOR (islower (i), ISLOWER (i))
28595	|| toupper (i) != TOUPPER (i))
28596      return 2;
28597  return 0;
28598}
28599_ACEOF
28600if ac_fn_cxx_try_run "$LINENO"; then :
28601
28602else
28603  ac_cv_header_stdc=no
28604fi
28605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28606  conftest.$ac_objext conftest.beam conftest.$ac_ext
28607fi
28608
28609fi
28610fi
28611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28612$as_echo "$ac_cv_header_stdc" >&6; }
28613if test $ac_cv_header_stdc = yes; then
28614
28615$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28616
28617fi
28618
28619# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28620for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28621		  inttypes.h stdint.h unistd.h
28622do :
28623  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28624ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28625"
28626if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28627  cat >>confdefs.h <<_ACEOF
28628#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28629_ACEOF
28630
28631fi
28632
28633done
28634
28635
28636
28637###############################################################################
28638#
28639# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28640# (The JVM can use 32 or 64 bit Java pointers but that decision
28641# is made at runtime.)
28642#
28643
28644if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28645  # Always specify -m flags on Solaris
28646
28647  # keep track of c/cxx flags that we added outselves...
28648  #   to prevent emitting warning...
28649  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28650  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28651  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28652
28653  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28654  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28655  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28656
28657  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28658  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28659  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28660
28661elif test "x$COMPILE_TYPE" = xreduced; then
28662  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28663    # Specify -m if running reduced on other Posix platforms
28664
28665  # keep track of c/cxx flags that we added outselves...
28666  #   to prevent emitting warning...
28667  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28668  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28669  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28670
28671  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28672  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28673  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28674
28675  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28676  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28677  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28678
28679  fi
28680fi
28681
28682# Make compilation sanity check
28683for ac_header in stdio.h
28684do :
28685  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28686if test "x$ac_cv_header_stdio_h" = x""yes; then :
28687  cat >>confdefs.h <<_ACEOF
28688#define HAVE_STDIO_H 1
28689_ACEOF
28690
28691else
28692
28693  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28694$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28695  if test "x$COMPILE_TYPE" = xreduced; then
28696    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28697$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28698  elif test "x$COMPILE_TYPE" = xcross; then
28699    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28700$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28701  fi
28702  as_fn_error $? "Cannot continue." "$LINENO" 5
28703
28704fi
28705
28706done
28707
28708
28709# The cast to long int works around a bug in the HP C Compiler
28710# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28711# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28712# This bug is HP SR number 8606223364.
28713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28714$as_echo_n "checking size of int *... " >&6; }
28715if test "${ac_cv_sizeof_int_p+set}" = set; then :
28716  $as_echo_n "(cached) " >&6
28717else
28718  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28719
28720else
28721  if test "$ac_cv_type_int_p" = yes; then
28722     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28723$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28724as_fn_error 77 "cannot compute sizeof (int *)
28725See \`config.log' for more details" "$LINENO" 5 ; }
28726   else
28727     ac_cv_sizeof_int_p=0
28728   fi
28729fi
28730
28731fi
28732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28733$as_echo "$ac_cv_sizeof_int_p" >&6; }
28734
28735
28736
28737cat >>confdefs.h <<_ACEOF
28738#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28739_ACEOF
28740
28741
28742
28743if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28744  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28745  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28746fi
28747
28748if test "x$SIZEOF_INT_P" = x; then
28749    # The test failed, lets stick to the assumed value.
28750    { $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
28751$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28752else
28753    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28754
28755    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28756        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
28757    fi
28758fi
28759
28760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28761$as_echo_n "checking for target address size... " >&6; }
28762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28763$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28764
28765
28766###############################################################################
28767#
28768# Is the target little of big endian?
28769#
28770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28771$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28772if test "${ac_cv_c_bigendian+set}" = set; then :
28773  $as_echo_n "(cached) " >&6
28774else
28775  ac_cv_c_bigendian=unknown
28776    # See if we're dealing with a universal compiler.
28777    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28778/* end confdefs.h.  */
28779#ifndef __APPLE_CC__
28780	       not a universal capable compiler
28781	     #endif
28782	     typedef int dummy;
28783
28784_ACEOF
28785if ac_fn_cxx_try_compile "$LINENO"; then :
28786
28787	# Check for potential -arch flags.  It is not universal unless
28788	# there are at least two -arch flags with different values.
28789	ac_arch=
28790	ac_prev=
28791	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28792	 if test -n "$ac_prev"; then
28793	   case $ac_word in
28794	     i?86 | x86_64 | ppc | ppc64)
28795	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28796		 ac_arch=$ac_word
28797	       else
28798		 ac_cv_c_bigendian=universal
28799		 break
28800	       fi
28801	       ;;
28802	   esac
28803	   ac_prev=
28804	 elif test "x$ac_word" = "x-arch"; then
28805	   ac_prev=arch
28806	 fi
28807       done
28808fi
28809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28810    if test $ac_cv_c_bigendian = unknown; then
28811      # See if sys/param.h defines the BYTE_ORDER macro.
28812      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28813/* end confdefs.h.  */
28814#include <sys/types.h>
28815	     #include <sys/param.h>
28816
28817int
28818main ()
28819{
28820#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28821		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28822		     && LITTLE_ENDIAN)
28823	      bogus endian macros
28824	     #endif
28825
28826  ;
28827  return 0;
28828}
28829_ACEOF
28830if ac_fn_cxx_try_compile "$LINENO"; then :
28831  # It does; now see whether it defined to BIG_ENDIAN or not.
28832	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28833/* end confdefs.h.  */
28834#include <sys/types.h>
28835		#include <sys/param.h>
28836
28837int
28838main ()
28839{
28840#if BYTE_ORDER != BIG_ENDIAN
28841		 not big endian
28842		#endif
28843
28844  ;
28845  return 0;
28846}
28847_ACEOF
28848if ac_fn_cxx_try_compile "$LINENO"; then :
28849  ac_cv_c_bigendian=yes
28850else
28851  ac_cv_c_bigendian=no
28852fi
28853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28854fi
28855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28856    fi
28857    if test $ac_cv_c_bigendian = unknown; then
28858      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28859      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28860/* end confdefs.h.  */
28861#include <limits.h>
28862
28863int
28864main ()
28865{
28866#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28867	      bogus endian macros
28868	     #endif
28869
28870  ;
28871  return 0;
28872}
28873_ACEOF
28874if ac_fn_cxx_try_compile "$LINENO"; then :
28875  # It does; now see whether it defined to _BIG_ENDIAN or not.
28876	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28877/* end confdefs.h.  */
28878#include <limits.h>
28879
28880int
28881main ()
28882{
28883#ifndef _BIG_ENDIAN
28884		 not big endian
28885		#endif
28886
28887  ;
28888  return 0;
28889}
28890_ACEOF
28891if ac_fn_cxx_try_compile "$LINENO"; then :
28892  ac_cv_c_bigendian=yes
28893else
28894  ac_cv_c_bigendian=no
28895fi
28896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28897fi
28898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28899    fi
28900    if test $ac_cv_c_bigendian = unknown; then
28901      # Compile a test program.
28902      if test "$cross_compiling" = yes; then :
28903  # Try to guess by grepping values from an object file.
28904	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28905/* end confdefs.h.  */
28906short int ascii_mm[] =
28907		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28908		short int ascii_ii[] =
28909		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28910		int use_ascii (int i) {
28911		  return ascii_mm[i] + ascii_ii[i];
28912		}
28913		short int ebcdic_ii[] =
28914		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28915		short int ebcdic_mm[] =
28916		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28917		int use_ebcdic (int i) {
28918		  return ebcdic_mm[i] + ebcdic_ii[i];
28919		}
28920		extern int foo;
28921
28922int
28923main ()
28924{
28925return use_ascii (foo) == use_ebcdic (foo);
28926  ;
28927  return 0;
28928}
28929_ACEOF
28930if ac_fn_cxx_try_compile "$LINENO"; then :
28931  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28932	      ac_cv_c_bigendian=yes
28933	    fi
28934	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28935	      if test "$ac_cv_c_bigendian" = unknown; then
28936		ac_cv_c_bigendian=no
28937	      else
28938		# finding both strings is unlikely to happen, but who knows?
28939		ac_cv_c_bigendian=unknown
28940	      fi
28941	    fi
28942fi
28943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28944else
28945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28946/* end confdefs.h.  */
28947$ac_includes_default
28948int
28949main ()
28950{
28951
28952	     /* Are we little or big endian?  From Harbison&Steele.  */
28953	     union
28954	     {
28955	       long int l;
28956	       char c[sizeof (long int)];
28957	     } u;
28958	     u.l = 1;
28959	     return u.c[sizeof (long int) - 1] == 1;
28960
28961  ;
28962  return 0;
28963}
28964_ACEOF
28965if ac_fn_cxx_try_run "$LINENO"; then :
28966  ac_cv_c_bigendian=no
28967else
28968  ac_cv_c_bigendian=yes
28969fi
28970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28971  conftest.$ac_objext conftest.beam conftest.$ac_ext
28972fi
28973
28974    fi
28975fi
28976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28977$as_echo "$ac_cv_c_bigendian" >&6; }
28978 case $ac_cv_c_bigendian in #(
28979   yes)
28980     ENDIAN="big";; #(
28981   no)
28982     ENDIAN="little" ;; #(
28983   universal)
28984     ENDIAN="universal_endianness"
28985     ;; #(
28986   *)
28987     ENDIAN="unknown" ;;
28988 esac
28989
28990
28991if test "x$ENDIAN" = xuniversal_endianness; then
28992    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28993fi
28994if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28995    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
28996fi
28997
28998
28999# Configure flags for the tools
29000
29001
29002###############################################################################
29003#
29004# How to compile shared libraries.
29005#
29006
29007if test "x$GCC" = xyes; then
29008    COMPILER_NAME=gcc
29009    PICFLAG="-fPIC"
29010    LIBRARY_PREFIX=lib
29011    SHARED_LIBRARY='lib$1.so'
29012    STATIC_LIBRARY='lib$1.a'
29013    SHARED_LIBRARY_FLAGS="-shared"
29014    SHARED_LIBRARY_SUFFIX='.so'
29015    STATIC_LIBRARY_SUFFIX='.a'
29016    OBJ_SUFFIX='.o'
29017    EXE_SUFFIX=''
29018    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29019    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29020    C_FLAG_REORDER=''
29021    CXX_FLAG_REORDER=''
29022    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29023    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29024    LD="$CC"
29025    LDEXE="$CC"
29026    LDCXX="$CXX"
29027    LDEXECXX="$CXX"
29028    POST_STRIP_CMD="$STRIP -g"
29029
29030    # Linking is different on MacOSX
29031    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29032        # Might change in the future to clang.
29033        COMPILER_NAME=gcc
29034        SHARED_LIBRARY='lib$1.dylib'
29035        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29036        SHARED_LIBRARY_SUFFIX='.dylib'
29037        EXE_SUFFIX=''
29038        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29039        SET_SHARED_LIBRARY_MAPFILE=''
29040        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29041        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29042        POST_STRIP_CMD="$STRIP -S"
29043    fi
29044else
29045    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29046        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29047        COMPILER_NAME=ossc
29048        PICFLAG="-KPIC"
29049        LIBRARY_PREFIX=lib
29050        SHARED_LIBRARY='lib$1.so'
29051        STATIC_LIBRARY='lib$1.a'
29052        SHARED_LIBRARY_FLAGS="-G"
29053        SHARED_LIBRARY_SUFFIX='.so'
29054        STATIC_LIBRARY_SUFFIX='.a'
29055        OBJ_SUFFIX='.o'
29056        EXE_SUFFIX=''
29057        SET_SHARED_LIBRARY_NAME=''
29058        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29059	C_FLAG_REORDER='-xF'
29060	CXX_FLAG_REORDER='-xF'
29061        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29062        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29063        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29064        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29065        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29066        POST_STRIP_CMD="$STRIP -x"
29067        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29068    fi
29069    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29070        # If it is not gcc, then assume it is the MS Visual Studio compiler
29071        COMPILER_NAME=cl
29072        PICFLAG=""
29073        LIBRARY_PREFIX=
29074        SHARED_LIBRARY='$1.dll'
29075        STATIC_LIBRARY='$1.lib'
29076        SHARED_LIBRARY_FLAGS="-LD"
29077        SHARED_LIBRARY_SUFFIX='.dll'
29078        STATIC_LIBRARY_SUFFIX='.lib'
29079        OBJ_SUFFIX='.obj'
29080        EXE_SUFFIX='.exe'
29081        SET_SHARED_LIBRARY_NAME=''
29082        SET_SHARED_LIBRARY_MAPFILE=''
29083        SET_SHARED_LIBRARY_ORIGIN=''
29084        SET_EXECUTABLE_ORIGIN=''
29085    fi
29086fi
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106# The (cross) compiler is now configured, we can now test capabilities
29107# of the target platform.
29108
29109
29110
29111###############################################################################
29112#
29113# Setup the opt flags for different compilers
29114# and different operating systems.
29115#
29116
29117#
29118# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29119#
29120if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29121    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29122    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29123    CFLAGS="$CFLAGS -mstackrealign"
29124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29125$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29126    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29127/* end confdefs.h.  */
29128int main() { return 0; }
29129_ACEOF
29130if ac_fn_cxx_try_link "$LINENO"; then :
29131
29132		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29133$as_echo "yes" >&6; }
29134
29135else
29136
29137		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29138$as_echo "no" >&6; }
29139	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29140
29141fi
29142rm -f core conftest.err conftest.$ac_objext \
29143    conftest$ac_exeext conftest.$ac_ext
29144fi
29145
29146C_FLAG_DEPS="-MMD -MF"
29147CXX_FLAG_DEPS="-MMD -MF"
29148
29149case $COMPILER_TYPE in
29150  CC )
29151    case $COMPILER_NAME in
29152      gcc )
29153      	case $OPENJDK_TARGET_OS in
29154	  macosx )
29155	    # On MacOSX we optimize for size, something
29156	    # we should do for all platforms?
29157	    C_O_FLAG_HI="-Os"
29158	    C_O_FLAG_NORM="-Os"
29159	    C_O_FLAG_NONE=""
29160	    ;;
29161	  *)
29162	    C_O_FLAG_HI="-O3"
29163	    C_O_FLAG_NORM="-O2"
29164	    C_O_FLAG_NONE="-O0"
29165	    ;;
29166	esac
29167        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29168        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29169        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29170        CFLAGS_DEBUG_SYMBOLS="-g"
29171        CXXFLAGS_DEBUG_SYMBOLS="-g"
29172        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29173            CFLAGS_DEBUG_SYMBOLS="-g1"
29174            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29175        fi
29176        ;;
29177      ossc )
29178        #
29179        # Forte has different names for this with their C++ compiler...
29180        #
29181        C_FLAG_DEPS="-xMMD -xMF"
29182        CXX_FLAG_DEPS="-xMMD -xMF"
29183
29184        # Extra options used with HIGHEST
29185        #
29186        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29187        #          done with care, there are some assumptions below that need to
29188        #          be understood about the use of pointers, and IEEE behavior.
29189        #
29190        # Use non-standard floating point mode (not IEEE 754)
29191        CC_HIGHEST="$CC_HIGHEST -fns"
29192        # Do some simplification of floating point arithmetic (not IEEE 754)
29193        CC_HIGHEST="$CC_HIGHEST -fsimple"
29194        # Use single precision floating point with 'float'
29195        CC_HIGHEST="$CC_HIGHEST -fsingle"
29196        # Assume memory references via basic pointer types do not alias
29197        #   (Source with excessing pointer casting and data access with mixed
29198        #    pointer types are not recommended)
29199        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29200        # Use intrinsic or inline versions for math/std functions
29201        #   (If you expect perfect errno behavior, do not use this)
29202        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29203        # Loop data dependency optimizations (need -xO3 or higher)
29204        CC_HIGHEST="$CC_HIGHEST -xdepend"
29205        # Pointer parameters to functions do not overlap
29206        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29207        #    If you pass in multiple pointers to the same data, do not use this)
29208        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29209        # Inline some library routines
29210        #   (If you expect perfect errno behavior, do not use this)
29211        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29212        # Use optimized math routines
29213        #   (If you expect perfect errno behavior, do not use this)
29214        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29215        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29216
29217        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29218          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29219          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29220        fi
29221
29222        case $OPENJDK_TARGET_CPU_ARCH in
29223          x86)
29224            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29225            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29226            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29227            C_O_FLAG_NONE="-xregs=no%frameptr"
29228            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29229            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29230            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29231            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29232            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29233               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29234               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29235            fi
29236            ;;
29237          sparc)
29238            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29239            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29240            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29241            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29242            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29243            C_O_FLAG_NONE=""
29244            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29245            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29246            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29247            CXX_O_FLAG_NONE=""
29248            ;;
29249        esac
29250
29251    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29252    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29253    esac
29254    ;;
29255  CL )
29256    C_O_FLAG_HIGHEST="-O2"
29257    C_O_FLAG_HI="-O1"
29258    C_O_FLAG_NORM="-O1"
29259    C_O_FLAG_NONE="-Od"
29260    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29261    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29262    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29263    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29264    ;;
29265esac
29266
29267if test -z "$C_O_FLAG_HIGHEST"; then
29268   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29269fi
29270
29271if test -z "$CXX_O_FLAG_HIGHEST"; then
29272   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29273fi
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29289   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29290$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29291fi
29292
29293if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29294   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29295$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29296fi
29297
29298if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29299   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29300$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29301fi
29302
29303
29304# Check whether --with-extra-cflags was given.
29305if test "${with_extra_cflags+set}" = set; then :
29306  withval=$with_extra_cflags;
29307fi
29308
29309
29310
29311# Check whether --with-extra-cxxflags was given.
29312if test "${with_extra_cxxflags+set}" = set; then :
29313  withval=$with_extra_cxxflags;
29314fi
29315
29316
29317
29318# Check whether --with-extra-ldflags was given.
29319if test "${with_extra_ldflags+set}" = set; then :
29320  withval=$with_extra_ldflags;
29321fi
29322
29323
29324CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29325CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29326LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29327
29328# Hotspot needs these set in their legacy form
29329LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29330LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29331LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29332
29333
29334
29335
29336
29337###############################################################################
29338#
29339# Now setup the CFLAGS and LDFLAGS for the JDK build.
29340# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29341#
29342case $COMPILER_NAME in
29343      gcc )
29344      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29345                          -pipe \
29346                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29347	  case $OPENJDK_TARGET_CPU_ARCH in
29348	  arm )
29349            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29350	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29351	  ;;
29352	  ppc )
29353            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29354	  ;;
29355	  * )
29356	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29357	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29358          ;;
29359	  esac
29360          ;;
29361      ossc )
29362          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29363          case $OPENJDK_TARGET_CPU_ARCH in
29364          x86 )
29365            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29366       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29367          ;;
29368          esac
29369
29370      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29371      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29372
29373          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29374          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29375          ;;
29376      cl )
29377          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29378               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29379	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29380	       -DWIN32 -DIAL"
29381          case $OPENJDK_TARGET_CPU in
29382              x86 )
29383                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29384                  ;;
29385              x86_64 )
29386                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29387                  ;;
29388          esac
29389          ;;
29390esac
29391
29392###############################################################################
29393
29394# Adjust flags according to debug level.
29395case $DEBUG_LEVEL in
29396      fastdebug )
29397              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29398              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29399	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29400	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29401	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29402	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29403              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29404              ;;
29405      slowdebug )
29406              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29407              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29408	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29409	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29410	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29411	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29412              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29413              ;;
29414esac
29415
29416CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29417
29418# The package path is used only on macosx?
29419PACKAGE_PATH=/opt/local
29420
29421
29422if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29423    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29424    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29425    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29426    #   Note: -Dmacro         is the same as    #define macro 1
29427    #         -Dmacro=	    is the same as    #define macro
29428    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29429        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29430    else
29431        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29432    fi
29433else
29434    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29435fi
29436if test "x$OPENJDK_TARGET_OS" = xlinux; then
29437    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29438fi
29439if test "x$OPENJDK_TARGET_OS" = xwindows; then
29440    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29441fi
29442if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29443    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29444fi
29445if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29446    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29447    # Setting these parameters makes it an error to link to macosx APIs that are
29448    # newer than the given OS version and makes the linked binaries compatible even
29449    # if built on a newer version of the OS.
29450    # The expected format is X.Y.Z
29451    MACOSX_VERSION_MIN=10.7.0
29452
29453    # The macro takes the version with no dots, ex: 1070
29454    # Let the flags variables get resolved in make for easier override on make
29455    # command line.
29456    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29457    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29458fi
29459if test "x$OPENJDK_TARGET_OS" = xbsd; then
29460    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29461fi
29462if test "x$DEBUG_LEVEL" = xrelease; then
29463    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29464    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29465        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29466    fi
29467else
29468    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29469fi
29470
29471CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29472CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29473
29474CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29475        -I${JDK_OUTPUTDIR}/include \
29476        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29477        -I${JDK_TOPDIR}/src/share/javavm/export \
29478        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29479        -I${JDK_TOPDIR}/src/share/native/common \
29480        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29481
29482# The shared libraries are compiled using the picflag.
29483CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29484CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29485
29486# Executable flags
29487CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29488CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29489
29490# Now this is odd. The JDK native libraries have to link against libjvm.so
29491# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29492# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29493# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29494# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29495# libraries will link to whatever is in memory. Yuck.
29496#
29497# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29498if test "x$COMPILER_NAME" = xcl; then
29499    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29500    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29501        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29502    fi
29503    # TODO: make -debug optional "--disable-full-debug-symbols"
29504    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29505    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29506    LDFLAGS_JDKLIB_SUFFIX=""
29507    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29508        LDFLAGS_STACK_SIZE=1048576
29509    else
29510        LDFLAGS_STACK_SIZE=327680
29511    fi
29512    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29513else
29514    if test "x$COMPILER_NAME" = xgcc; then
29515        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29516        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29517        if test -n "$HAS_GNU_HASH"; then
29518            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29519        fi
29520        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29521          # And since we now know that the linker is gnu, then add -z defs, to forbid
29522          # undefined symbols in object files.
29523          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29524          if test "x$DEBUG_LEVEL" = "xrelease"; then
29525              # When building release libraries, tell the linker optimize them.
29526              # Should this be supplied to the OSS linker as well?
29527              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29528          fi
29529        fi
29530    fi
29531    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29532                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29533
29534    # On some platforms (mac) the linker warns about non existing -L dirs.
29535    # Add server first if available. Linking aginst client does not always produce the same results.
29536    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29537    # Default to server for other variants.
29538    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29539        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29540    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29541        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29542    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29543        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29544    else
29545        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29546    fi
29547
29548    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29549    if test "x$COMPILER_NAME" = xossc; then
29550        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29551    fi
29552
29553    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29554    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29555        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29556    fi
29557fi
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573  # Some Zero and Shark settings.
29574  # ZERO_ARCHFLAG tells the compiler which mode to build for
29575  case "${OPENJDK_TARGET_CPU}" in
29576    s390)
29577      ZERO_ARCHFLAG="-m31"
29578      ;;
29579    *)
29580      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29581  esac
29582
29583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29584$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29585  supports=yes
29586
29587  saved_cflags="$CFLAGS"
29588  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29589  ac_ext=c
29590ac_cpp='$CPP $CPPFLAGS'
29591ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29592ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29593ac_compiler_gnu=$ac_cv_c_compiler_gnu
29594
29595  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29596/* end confdefs.h.  */
29597
29598    int i;
29599
29600_ACEOF
29601if ac_fn_c_try_compile "$LINENO"; then :
29602
29603else
29604  supports=no
29605fi
29606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29607  ac_ext=cpp
29608ac_cpp='$CXXCPP $CPPFLAGS'
29609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29612
29613  CFLAGS="$saved_cflags"
29614
29615  saved_cxxflags="$CXXFLAGS"
29616  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29617  ac_ext=cpp
29618ac_cpp='$CXXCPP $CPPFLAGS'
29619ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29620ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29621ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29622
29623  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29624/* end confdefs.h.  */
29625
29626    int i;
29627
29628_ACEOF
29629if ac_fn_cxx_try_compile "$LINENO"; then :
29630
29631else
29632  supports=no
29633fi
29634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29635  ac_ext=cpp
29636ac_cpp='$CXXCPP $CPPFLAGS'
29637ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29638ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29639ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29640
29641  CXXFLAGS="$saved_cxxflags"
29642
29643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29644$as_echo "$supports" >&6; }
29645  if test "x$supports" = "xyes" ; then
29646    :
29647  else
29648    ZERO_ARCHFLAG=""
29649  fi
29650
29651
29652
29653  # Check that the compiler supports -mX flags
29654  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29655
29656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29657$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29658  supports=yes
29659
29660  saved_cflags="$CFLAGS"
29661  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29662  ac_ext=c
29663ac_cpp='$CPP $CPPFLAGS'
29664ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29665ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29666ac_compiler_gnu=$ac_cv_c_compiler_gnu
29667
29668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29669/* end confdefs.h.  */
29670
29671    int i;
29672
29673_ACEOF
29674if ac_fn_c_try_compile "$LINENO"; then :
29675
29676else
29677  supports=no
29678fi
29679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29680  ac_ext=cpp
29681ac_cpp='$CXXCPP $CPPFLAGS'
29682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29685
29686  CFLAGS="$saved_cflags"
29687
29688  saved_cxxflags="$CXXFLAGS"
29689  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29690  ac_ext=cpp
29691ac_cpp='$CXXCPP $CPPFLAGS'
29692ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29693ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29694ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29695
29696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29697/* end confdefs.h.  */
29698
29699    int i;
29700
29701_ACEOF
29702if ac_fn_cxx_try_compile "$LINENO"; then :
29703
29704else
29705  supports=no
29706fi
29707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29708  ac_ext=cpp
29709ac_cpp='$CXXCPP $CPPFLAGS'
29710ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29711ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29712ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29713
29714  CXXFLAGS="$saved_cxxflags"
29715
29716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29717$as_echo "$supports" >&6; }
29718  if test "x$supports" = "xyes" ; then
29719    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29720  else
29721    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29722  fi
29723
29724
29725
29726
29727# Setup debug symbols (need objcopy from the toolchain for that)
29728
29729#
29730# ENABLE_DEBUG_SYMBOLS
29731# This must be done after the toolchain is setup, since we're looking at objcopy.
29732#
29733# Check whether --enable-debug-symbols was given.
29734if test "${enable_debug_symbols+set}" = set; then :
29735  enableval=$enable_debug_symbols;
29736fi
29737
29738
29739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29740$as_echo_n "checking if we should generate debug symbols... " >&6; }
29741
29742if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29743   # explicit enabling of enable-debug-symbols and can't find objcopy
29744   #   this is an error
29745   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29746fi
29747
29748if test "x$enable_debug_symbols" = "xyes"; then
29749  ENABLE_DEBUG_SYMBOLS=true
29750elif test "x$enable_debug_symbols" = "xno"; then
29751  ENABLE_DEBUG_SYMBOLS=false
29752else
29753  # default on macosx is false
29754  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29755    ENABLE_DEBUG_SYMBOLS=false
29756  # Default is on if objcopy is found, otherwise off
29757  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29758    ENABLE_DEBUG_SYMBOLS=true
29759  else
29760    ENABLE_DEBUG_SYMBOLS=false
29761  fi
29762fi
29763
29764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29765$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29766
29767#
29768# ZIP_DEBUGINFO_FILES
29769#
29770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29771$as_echo_n "checking if we should zip debug-info files... " >&6; }
29772# Check whether --enable-zip-debug-info was given.
29773if test "${enable_zip_debug_info+set}" = set; then :
29774  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29775else
29776  enable_zip_debug_info="yes"
29777fi
29778
29779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29780$as_echo "${enable_zip_debug_info}" >&6; }
29781
29782if test "x${enable_zip_debug_info}" = "xno"; then
29783   ZIP_DEBUGINFO_FILES=false
29784else
29785   ZIP_DEBUGINFO_FILES=true
29786fi
29787
29788
29789
29790
29791
29792
29793
29794###############################################################################
29795#
29796# Check dependencies for external and internal libraries.
29797#
29798###############################################################################
29799
29800
29801
29802###############################################################################
29803#
29804# OS specific settings that we never will need to probe.
29805#
29806if test "x$OPENJDK_TARGET_OS" = xlinux; then
29807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29808$as_echo_n "checking what is not needed on Linux?... " >&6; }
29809    PULSE_NOT_NEEDED=yes
29810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29811$as_echo "pulse" >&6; }
29812fi
29813
29814if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29815    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29816$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29817    ALSA_NOT_NEEDED=yes
29818    PULSE_NOT_NEEDED=yes
29819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29820$as_echo "alsa pulse" >&6; }
29821fi
29822
29823if test "x$OPENJDK_TARGET_OS" = xwindows; then
29824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29825$as_echo_n "checking what is not needed on Windows?... " >&6; }
29826    CUPS_NOT_NEEDED=yes
29827    ALSA_NOT_NEEDED=yes
29828    PULSE_NOT_NEEDED=yes
29829    X11_NOT_NEEDED=yes
29830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29831$as_echo "alsa cups pulse x11" >&6; }
29832fi
29833
29834if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29836$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29837    ALSA_NOT_NEEDED=yes
29838    PULSE_NOT_NEEDED=yes
29839    X11_NOT_NEEDED=yes
29840    FREETYPE2_NOT_NEEDED=yes
29841    # If the java runtime framework is disabled, then we need X11.
29842    # This will be adjusted below.
29843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29844$as_echo "alsa pulse x11" >&6; }
29845fi
29846
29847if test "x$OPENJDK_TARGET_OS" = xbsd; then
29848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29849$as_echo_n "checking what is not needed on bsd?... " >&6; }
29850    ALSA_NOT_NEEDED=yes
29851    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29852$as_echo "alsa" >&6; }
29853fi
29854
29855if test "x$OPENJDK" = "xfalse"; then
29856    FREETYPE2_NOT_NEEDED=yes
29857fi
29858
29859if test "x$SUPPORT_HEADFUL" = xno; then
29860    X11_NOT_NEEDED=yes
29861fi
29862
29863###############################################################################
29864#
29865# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29866# that uses this API.
29867#
29868# Check whether --enable-macosx-runtime-support was given.
29869if test "${enable_macosx_runtime_support+set}" = set; then :
29870  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29871else
29872  MACOSX_RUNTIME_SUPPORT="no"
29873fi
29874
29875
29876USE_MACOSX_RUNTIME_SUPPORT=no
29877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29878$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29879if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29880    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29881        MACOSX_RUNTIME_SUPPORT=yes
29882        USE_MACOSX_RUNTIME_SUPPORT=yes
29883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29884$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29885    else
29886        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29887$as_echo "yes, but explicitly disabled." >&6; }
29888    fi
29889else
29890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29891$as_echo "no" >&6; }
29892fi
29893
29894if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29896$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29897    X11_NOT_NEEDED=
29898    FREETYPE2_NOT_NEEDED=
29899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29900$as_echo "alsa pulse" >&6; }
29901fi
29902
29903
29904
29905###############################################################################
29906#
29907# Check for X Windows
29908#
29909
29910# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29911# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29912# --x-libraries for the sysroot, if that seems to be correct.
29913if test "x$SYS_ROOT" != "x/"; then
29914  if test "x$x_includes" = xNONE; then
29915    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29916      x_includes="$SYS_ROOT/usr/X11R6/include"
29917    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29918      x_includes="$SYS_ROOT/usr/include"
29919    fi
29920  fi
29921  if test "x$x_libraries" = xNONE; then
29922    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29923      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29924    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
29925      x_libraries="$SYS_ROOT/usr/lib64"
29926    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
29927      x_libraries="$SYS_ROOT/usr/lib"
29928    fi
29929  fi
29930fi
29931
29932# Now let autoconf do it's magic
29933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29934$as_echo_n "checking for X... " >&6; }
29935
29936
29937# Check whether --with-x was given.
29938if test "${with_x+set}" = set; then :
29939  withval=$with_x;
29940fi
29941
29942# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29943if test "x$with_x" = xno; then
29944  # The user explicitly disabled X.
29945  have_x=disabled
29946else
29947  case $x_includes,$x_libraries in #(
29948    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
29949    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29950  $as_echo_n "(cached) " >&6
29951else
29952  # One or both of the vars are not set, and there is no cached value.
29953ac_x_includes=no ac_x_libraries=no
29954rm -f -r conftest.dir
29955if mkdir conftest.dir; then
29956  cd conftest.dir
29957  cat >Imakefile <<'_ACEOF'
29958incroot:
29959	@echo incroot='${INCROOT}'
29960usrlibdir:
29961	@echo usrlibdir='${USRLIBDIR}'
29962libdir:
29963	@echo libdir='${LIBDIR}'
29964_ACEOF
29965  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29966    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29967    for ac_var in incroot usrlibdir libdir; do
29968      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29969    done
29970    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29971    for ac_extension in a so sl dylib la dll; do
29972      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29973	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29974	ac_im_usrlibdir=$ac_im_libdir; break
29975      fi
29976    done
29977    # Screen out bogus values from the imake configuration.  They are
29978    # bogus both because they are the default anyway, and because
29979    # using them would break gcc on systems where it needs fixed includes.
29980    case $ac_im_incroot in
29981	/usr/include) ac_x_includes= ;;
29982	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29983    esac
29984    case $ac_im_usrlibdir in
29985	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29986	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29987    esac
29988  fi
29989  cd ..
29990  rm -f -r conftest.dir
29991fi
29992
29993# Standard set of common directories for X headers.
29994# Check X11 before X11Rn because it is often a symlink to the current release.
29995ac_x_header_dirs='
29996/usr/X11/include
29997/usr/X11R7/include
29998/usr/X11R6/include
29999/usr/X11R5/include
30000/usr/X11R4/include
30001
30002/usr/include/X11
30003/usr/include/X11R7
30004/usr/include/X11R6
30005/usr/include/X11R5
30006/usr/include/X11R4
30007
30008/usr/local/X11/include
30009/usr/local/X11R7/include
30010/usr/local/X11R6/include
30011/usr/local/X11R5/include
30012/usr/local/X11R4/include
30013
30014/usr/local/include/X11
30015/usr/local/include/X11R7
30016/usr/local/include/X11R6
30017/usr/local/include/X11R5
30018/usr/local/include/X11R4
30019
30020/usr/X386/include
30021/usr/x386/include
30022/usr/XFree86/include/X11
30023
30024/usr/include
30025/usr/local/include
30026/usr/unsupported/include
30027/usr/athena/include
30028/usr/local/x11r5/include
30029/usr/lpp/Xamples/include
30030
30031/usr/openwin/include
30032/usr/openwin/share/include'
30033
30034if test "$ac_x_includes" = no; then
30035  # Guess where to find include files, by looking for Xlib.h.
30036  # First, try using that file with no special directory specified.
30037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30038/* end confdefs.h.  */
30039#include <X11/Xlib.h>
30040_ACEOF
30041if ac_fn_cxx_try_cpp "$LINENO"; then :
30042  # We can compile using X headers with no special include directory.
30043ac_x_includes=
30044else
30045  for ac_dir in $ac_x_header_dirs; do
30046  if test -r "$ac_dir/X11/Xlib.h"; then
30047    ac_x_includes=$ac_dir
30048    break
30049  fi
30050done
30051fi
30052rm -f conftest.err conftest.i conftest.$ac_ext
30053fi # $ac_x_includes = no
30054
30055if test "$ac_x_libraries" = no; then
30056  # Check for the libraries.
30057  # See if we find them without any special options.
30058  # Don't add to $LIBS permanently.
30059  ac_save_LIBS=$LIBS
30060  LIBS="-lX11 $LIBS"
30061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30062/* end confdefs.h.  */
30063#include <X11/Xlib.h>
30064int
30065main ()
30066{
30067XrmInitialize ()
30068  ;
30069  return 0;
30070}
30071_ACEOF
30072if ac_fn_cxx_try_link "$LINENO"; then :
30073  LIBS=$ac_save_LIBS
30074# We can link X programs with no special library path.
30075ac_x_libraries=
30076else
30077  LIBS=$ac_save_LIBS
30078for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30079do
30080  # Don't even attempt the hair of trying to link an X program!
30081  for ac_extension in a so sl dylib la dll; do
30082    if test -r "$ac_dir/libX11.$ac_extension"; then
30083      ac_x_libraries=$ac_dir
30084      break 2
30085    fi
30086  done
30087done
30088fi
30089rm -f core conftest.err conftest.$ac_objext \
30090    conftest$ac_exeext conftest.$ac_ext
30091fi # $ac_x_libraries = no
30092
30093case $ac_x_includes,$ac_x_libraries in #(
30094  no,* | *,no | *\'*)
30095    # Didn't find X, or a directory has "'" in its name.
30096    ac_cv_have_x="have_x=no";; #(
30097  *)
30098    # Record where we found X for the cache.
30099    ac_cv_have_x="have_x=yes\
30100	ac_x_includes='$ac_x_includes'\
30101	ac_x_libraries='$ac_x_libraries'"
30102esac
30103fi
30104;; #(
30105    *) have_x=yes;;
30106  esac
30107  eval "$ac_cv_have_x"
30108fi # $with_x != no
30109
30110if test "$have_x" != yes; then
30111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30112$as_echo "$have_x" >&6; }
30113  no_x=yes
30114else
30115  # If each of the values was on the command line, it overrides each guess.
30116  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30117  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30118  # Update the cache value to reflect the command line values.
30119  ac_cv_have_x="have_x=yes\
30120	ac_x_includes='$x_includes'\
30121	ac_x_libraries='$x_libraries'"
30122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30123$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30124fi
30125
30126if test "$no_x" = yes; then
30127  # Not all programs may use this symbol, but it does not hurt to define it.
30128
30129$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30130
30131  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30132else
30133  if test -n "$x_includes"; then
30134    X_CFLAGS="$X_CFLAGS -I$x_includes"
30135  fi
30136
30137  # It would also be nice to do this for all -L options, not just this one.
30138  if test -n "$x_libraries"; then
30139    X_LIBS="$X_LIBS -L$x_libraries"
30140    # For Solaris; some versions of Sun CC require a space after -R and
30141    # others require no space.  Words are not sufficient . . . .
30142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30143$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30144    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30145    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30146    ac_cxx_werror_flag=yes
30147    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30148/* end confdefs.h.  */
30149
30150int
30151main ()
30152{
30153
30154  ;
30155  return 0;
30156}
30157_ACEOF
30158if ac_fn_cxx_try_link "$LINENO"; then :
30159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30160$as_echo "no" >&6; }
30161       X_LIBS="$X_LIBS -R$x_libraries"
30162else
30163  LIBS="$ac_xsave_LIBS -R $x_libraries"
30164       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30165/* end confdefs.h.  */
30166
30167int
30168main ()
30169{
30170
30171  ;
30172  return 0;
30173}
30174_ACEOF
30175if ac_fn_cxx_try_link "$LINENO"; then :
30176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30177$as_echo "yes" >&6; }
30178	  X_LIBS="$X_LIBS -R $x_libraries"
30179else
30180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30181$as_echo "neither works" >&6; }
30182fi
30183rm -f core conftest.err conftest.$ac_objext \
30184    conftest$ac_exeext conftest.$ac_ext
30185fi
30186rm -f core conftest.err conftest.$ac_objext \
30187    conftest$ac_exeext conftest.$ac_ext
30188    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30189    LIBS=$ac_xsave_LIBS
30190  fi
30191
30192  # Check for system-dependent libraries X programs must link with.
30193  # Do this before checking for the system-independent R6 libraries
30194  # (-lICE), since we may need -lsocket or whatever for X linking.
30195
30196  if test "$ISC" = yes; then
30197    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30198  else
30199    # Martyn Johnson says this is needed for Ultrix, if the X
30200    # libraries were built with DECnet support.  And Karl Berry says
30201    # the Alpha needs dnet_stub (dnet does not exist).
30202    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30203    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30204/* end confdefs.h.  */
30205
30206/* Override any GCC internal prototype to avoid an error.
30207   Use char because int might match the return type of a GCC
30208   builtin and then its argument prototype would still apply.  */
30209#ifdef __cplusplus
30210extern "C"
30211#endif
30212char XOpenDisplay ();
30213int
30214main ()
30215{
30216return XOpenDisplay ();
30217  ;
30218  return 0;
30219}
30220_ACEOF
30221if ac_fn_cxx_try_link "$LINENO"; then :
30222
30223else
30224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30225$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30226if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30227  $as_echo_n "(cached) " >&6
30228else
30229  ac_check_lib_save_LIBS=$LIBS
30230LIBS="-ldnet  $LIBS"
30231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30232/* end confdefs.h.  */
30233
30234/* Override any GCC internal prototype to avoid an error.
30235   Use char because int might match the return type of a GCC
30236   builtin and then its argument prototype would still apply.  */
30237#ifdef __cplusplus
30238extern "C"
30239#endif
30240char dnet_ntoa ();
30241int
30242main ()
30243{
30244return dnet_ntoa ();
30245  ;
30246  return 0;
30247}
30248_ACEOF
30249if ac_fn_cxx_try_link "$LINENO"; then :
30250  ac_cv_lib_dnet_dnet_ntoa=yes
30251else
30252  ac_cv_lib_dnet_dnet_ntoa=no
30253fi
30254rm -f core conftest.err conftest.$ac_objext \
30255    conftest$ac_exeext conftest.$ac_ext
30256LIBS=$ac_check_lib_save_LIBS
30257fi
30258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30259$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30260if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30261  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30262fi
30263
30264    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30265      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30266$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30267if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30268  $as_echo_n "(cached) " >&6
30269else
30270  ac_check_lib_save_LIBS=$LIBS
30271LIBS="-ldnet_stub  $LIBS"
30272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30273/* end confdefs.h.  */
30274
30275/* Override any GCC internal prototype to avoid an error.
30276   Use char because int might match the return type of a GCC
30277   builtin and then its argument prototype would still apply.  */
30278#ifdef __cplusplus
30279extern "C"
30280#endif
30281char dnet_ntoa ();
30282int
30283main ()
30284{
30285return dnet_ntoa ();
30286  ;
30287  return 0;
30288}
30289_ACEOF
30290if ac_fn_cxx_try_link "$LINENO"; then :
30291  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30292else
30293  ac_cv_lib_dnet_stub_dnet_ntoa=no
30294fi
30295rm -f core conftest.err conftest.$ac_objext \
30296    conftest$ac_exeext conftest.$ac_ext
30297LIBS=$ac_check_lib_save_LIBS
30298fi
30299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30300$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30301if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30302  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30303fi
30304
30305    fi
30306fi
30307rm -f core conftest.err conftest.$ac_objext \
30308    conftest$ac_exeext conftest.$ac_ext
30309    LIBS="$ac_xsave_LIBS"
30310
30311    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30312    # to get the SysV transport functions.
30313    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30314    # needs -lnsl.
30315    # The nsl library prevents programs from opening the X display
30316    # on Irix 5.2, according to T.E. Dickey.
30317    # The functions gethostbyname, getservbyname, and inet_addr are
30318    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30319    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30320if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30321
30322fi
30323
30324    if test $ac_cv_func_gethostbyname = no; then
30325      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30326$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30327if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30328  $as_echo_n "(cached) " >&6
30329else
30330  ac_check_lib_save_LIBS=$LIBS
30331LIBS="-lnsl  $LIBS"
30332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30333/* end confdefs.h.  */
30334
30335/* Override any GCC internal prototype to avoid an error.
30336   Use char because int might match the return type of a GCC
30337   builtin and then its argument prototype would still apply.  */
30338#ifdef __cplusplus
30339extern "C"
30340#endif
30341char gethostbyname ();
30342int
30343main ()
30344{
30345return gethostbyname ();
30346  ;
30347  return 0;
30348}
30349_ACEOF
30350if ac_fn_cxx_try_link "$LINENO"; then :
30351  ac_cv_lib_nsl_gethostbyname=yes
30352else
30353  ac_cv_lib_nsl_gethostbyname=no
30354fi
30355rm -f core conftest.err conftest.$ac_objext \
30356    conftest$ac_exeext conftest.$ac_ext
30357LIBS=$ac_check_lib_save_LIBS
30358fi
30359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30360$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30361if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30362  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30363fi
30364
30365      if test $ac_cv_lib_nsl_gethostbyname = no; then
30366	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30367$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30368if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30369  $as_echo_n "(cached) " >&6
30370else
30371  ac_check_lib_save_LIBS=$LIBS
30372LIBS="-lbsd  $LIBS"
30373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30374/* end confdefs.h.  */
30375
30376/* Override any GCC internal prototype to avoid an error.
30377   Use char because int might match the return type of a GCC
30378   builtin and then its argument prototype would still apply.  */
30379#ifdef __cplusplus
30380extern "C"
30381#endif
30382char gethostbyname ();
30383int
30384main ()
30385{
30386return gethostbyname ();
30387  ;
30388  return 0;
30389}
30390_ACEOF
30391if ac_fn_cxx_try_link "$LINENO"; then :
30392  ac_cv_lib_bsd_gethostbyname=yes
30393else
30394  ac_cv_lib_bsd_gethostbyname=no
30395fi
30396rm -f core conftest.err conftest.$ac_objext \
30397    conftest$ac_exeext conftest.$ac_ext
30398LIBS=$ac_check_lib_save_LIBS
30399fi
30400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30401$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30402if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30403  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30404fi
30405
30406      fi
30407    fi
30408
30409    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30410    # socket/setsockopt and other routines are undefined under SCO ODT
30411    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30412    # on later versions), says Simon Leinen: it contains gethostby*
30413    # variants that don't use the name server (or something).  -lsocket
30414    # must be given before -lnsl if both are needed.  We assume that
30415    # if connect needs -lnsl, so does gethostbyname.
30416    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30417if test "x$ac_cv_func_connect" = x""yes; then :
30418
30419fi
30420
30421    if test $ac_cv_func_connect = no; then
30422      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30423$as_echo_n "checking for connect in -lsocket... " >&6; }
30424if test "${ac_cv_lib_socket_connect+set}" = set; then :
30425  $as_echo_n "(cached) " >&6
30426else
30427  ac_check_lib_save_LIBS=$LIBS
30428LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30430/* end confdefs.h.  */
30431
30432/* Override any GCC internal prototype to avoid an error.
30433   Use char because int might match the return type of a GCC
30434   builtin and then its argument prototype would still apply.  */
30435#ifdef __cplusplus
30436extern "C"
30437#endif
30438char connect ();
30439int
30440main ()
30441{
30442return connect ();
30443  ;
30444  return 0;
30445}
30446_ACEOF
30447if ac_fn_cxx_try_link "$LINENO"; then :
30448  ac_cv_lib_socket_connect=yes
30449else
30450  ac_cv_lib_socket_connect=no
30451fi
30452rm -f core conftest.err conftest.$ac_objext \
30453    conftest$ac_exeext conftest.$ac_ext
30454LIBS=$ac_check_lib_save_LIBS
30455fi
30456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30457$as_echo "$ac_cv_lib_socket_connect" >&6; }
30458if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30459  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30460fi
30461
30462    fi
30463
30464    # Guillermo Gomez says -lposix is necessary on A/UX.
30465    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30466if test "x$ac_cv_func_remove" = x""yes; then :
30467
30468fi
30469
30470    if test $ac_cv_func_remove = no; then
30471      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30472$as_echo_n "checking for remove in -lposix... " >&6; }
30473if test "${ac_cv_lib_posix_remove+set}" = set; then :
30474  $as_echo_n "(cached) " >&6
30475else
30476  ac_check_lib_save_LIBS=$LIBS
30477LIBS="-lposix  $LIBS"
30478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30479/* end confdefs.h.  */
30480
30481/* Override any GCC internal prototype to avoid an error.
30482   Use char because int might match the return type of a GCC
30483   builtin and then its argument prototype would still apply.  */
30484#ifdef __cplusplus
30485extern "C"
30486#endif
30487char remove ();
30488int
30489main ()
30490{
30491return remove ();
30492  ;
30493  return 0;
30494}
30495_ACEOF
30496if ac_fn_cxx_try_link "$LINENO"; then :
30497  ac_cv_lib_posix_remove=yes
30498else
30499  ac_cv_lib_posix_remove=no
30500fi
30501rm -f core conftest.err conftest.$ac_objext \
30502    conftest$ac_exeext conftest.$ac_ext
30503LIBS=$ac_check_lib_save_LIBS
30504fi
30505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30506$as_echo "$ac_cv_lib_posix_remove" >&6; }
30507if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30508  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30509fi
30510
30511    fi
30512
30513    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30514    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30515if test "x$ac_cv_func_shmat" = x""yes; then :
30516
30517fi
30518
30519    if test $ac_cv_func_shmat = no; then
30520      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30521$as_echo_n "checking for shmat in -lipc... " >&6; }
30522if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30523  $as_echo_n "(cached) " >&6
30524else
30525  ac_check_lib_save_LIBS=$LIBS
30526LIBS="-lipc  $LIBS"
30527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30528/* end confdefs.h.  */
30529
30530/* Override any GCC internal prototype to avoid an error.
30531   Use char because int might match the return type of a GCC
30532   builtin and then its argument prototype would still apply.  */
30533#ifdef __cplusplus
30534extern "C"
30535#endif
30536char shmat ();
30537int
30538main ()
30539{
30540return shmat ();
30541  ;
30542  return 0;
30543}
30544_ACEOF
30545if ac_fn_cxx_try_link "$LINENO"; then :
30546  ac_cv_lib_ipc_shmat=yes
30547else
30548  ac_cv_lib_ipc_shmat=no
30549fi
30550rm -f core conftest.err conftest.$ac_objext \
30551    conftest$ac_exeext conftest.$ac_ext
30552LIBS=$ac_check_lib_save_LIBS
30553fi
30554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30555$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30556if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30557  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30558fi
30559
30560    fi
30561  fi
30562
30563  # Check for libraries that X11R6 Xt/Xaw programs need.
30564  ac_save_LDFLAGS=$LDFLAGS
30565  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30566  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30567  # check for ICE first), but we must link in the order -lSM -lICE or
30568  # we get undefined symbols.  So assume we have SM if we have ICE.
30569  # These have to be linked with before -lX11, unlike the other
30570  # libraries we check for below, so use a different variable.
30571  # John Interrante, Karl Berry
30572  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30573$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30574if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30575  $as_echo_n "(cached) " >&6
30576else
30577  ac_check_lib_save_LIBS=$LIBS
30578LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30580/* end confdefs.h.  */
30581
30582/* Override any GCC internal prototype to avoid an error.
30583   Use char because int might match the return type of a GCC
30584   builtin and then its argument prototype would still apply.  */
30585#ifdef __cplusplus
30586extern "C"
30587#endif
30588char IceConnectionNumber ();
30589int
30590main ()
30591{
30592return IceConnectionNumber ();
30593  ;
30594  return 0;
30595}
30596_ACEOF
30597if ac_fn_cxx_try_link "$LINENO"; then :
30598  ac_cv_lib_ICE_IceConnectionNumber=yes
30599else
30600  ac_cv_lib_ICE_IceConnectionNumber=no
30601fi
30602rm -f core conftest.err conftest.$ac_objext \
30603    conftest$ac_exeext conftest.$ac_ext
30604LIBS=$ac_check_lib_save_LIBS
30605fi
30606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30607$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30608if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30609  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30610fi
30611
30612  LDFLAGS=$ac_save_LDFLAGS
30613
30614fi
30615
30616
30617# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30618# this doesn't make sense so we remove it.
30619if test "x$COMPILE_TYPE" = xcross; then
30620  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30621fi
30622
30623if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30624
30625    # Print a helpful message on how to acquire the necessary build dependency.
30626    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30627    MISSING_DEPENDENCY=x11
30628    PKGHANDLER_COMMAND=
30629
30630    case $PKGHANDLER in
30631	apt-get)
30632                apt_help     $MISSING_DEPENDENCY ;;
30633    yum)
30634                yum_help     $MISSING_DEPENDENCY ;;
30635	port)
30636                port_help    $MISSING_DEPENDENCY ;;
30637	pkgutil)
30638                pkgutil_help $MISSING_DEPENDENCY ;;
30639	pkgadd)
30640                pkgadd_help  $MISSING_DEPENDENCY ;;
30641    * )
30642      break ;;
30643    esac
30644
30645    if test "x$PKGHANDLER_COMMAND" != x; then
30646        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30647    fi
30648
30649    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30650fi
30651
30652# Some of the old makefiles require a setting of OPENWIN_HOME
30653# Since the X11R6 directory has disappeared on later Linuxes,
30654# we need to probe for it.
30655if test "x$OPENJDK_TARGET_OS" = xlinux; then
30656    if test -d "$SYS_ROOT/usr/X11R6"; then
30657        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30658    elif test -d "$SYS_ROOT/usr/include/X11"; then
30659        OPENWIN_HOME="$SYS_ROOT/usr"
30660    fi
30661fi
30662if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30663    OPENWIN_HOME="/usr/openwin"
30664fi
30665
30666
30667
30668#
30669# Weird Sol10 something check...TODO change to try compile
30670#
30671if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30672  if test "`uname -r`" = "5.10"; then
30673     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30674     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30675     fi
30676  fi
30677fi
30678
30679ac_ext=c
30680ac_cpp='$CPP $CPPFLAGS'
30681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30683ac_compiler_gnu=$ac_cv_c_compiler_gnu
30684
30685OLD_CFLAGS="$CFLAGS"
30686CFLAGS="$CFLAGS $X_CFLAGS"
30687
30688# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30689for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30690do :
30691  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30692ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30693                   # include <X11/Xutil.h>
30694
30695"
30696if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30697  cat >>confdefs.h <<_ACEOF
30698#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30699_ACEOF
30700 X11_A_OK=yes
30701else
30702  X11_A_OK=no; break
30703fi
30704
30705done
30706
30707
30708CFLAGS="$OLD_CFLAGS"
30709ac_ext=cpp
30710ac_cpp='$CXXCPP $CPPFLAGS'
30711ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30712ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30713ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30714
30715
30716if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30717
30718    # Print a helpful message on how to acquire the necessary build dependency.
30719    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30720    MISSING_DEPENDENCY=x11
30721    PKGHANDLER_COMMAND=
30722
30723    case $PKGHANDLER in
30724	apt-get)
30725                apt_help     $MISSING_DEPENDENCY ;;
30726    yum)
30727                yum_help     $MISSING_DEPENDENCY ;;
30728	port)
30729                port_help    $MISSING_DEPENDENCY ;;
30730	pkgutil)
30731                pkgutil_help $MISSING_DEPENDENCY ;;
30732	pkgadd)
30733                pkgadd_help  $MISSING_DEPENDENCY ;;
30734    * )
30735      break ;;
30736    esac
30737
30738    if test "x$PKGHANDLER_COMMAND" != x; then
30739        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30740    fi
30741
30742    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30743fi
30744
30745
30746
30747
30748
30749
30750###############################################################################
30751#
30752# The common unix printing system cups is used to print from java.
30753#
30754
30755# Check whether --with-cups was given.
30756if test "${with_cups+set}" = set; then :
30757  withval=$with_cups;
30758fi
30759
30760
30761# Check whether --with-cups-include was given.
30762if test "${with_cups_include+set}" = set; then :
30763  withval=$with_cups_include;
30764fi
30765
30766
30767if test "x$CUPS_NOT_NEEDED" = xyes; then
30768	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30769		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30770$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30771	fi
30772	CUPS_CFLAGS=
30773else
30774	CUPS_FOUND=no
30775
30776	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30777	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30778	fi
30779
30780	if test "x${with_cups}" != x; then
30781	    CUPS_CFLAGS="-I${with_cups}/include"
30782	    CUPS_FOUND=yes
30783	fi
30784	if test "x${with_cups_include}" != x; then
30785	    CUPS_CFLAGS="-I${with_cups_include}"
30786	    CUPS_FOUND=yes
30787	fi
30788	if test "x$CUPS_FOUND" = xno; then
30789
30790
30791    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30792        # Source the builddeps file again, to make sure it uses the latest variables!
30793        . $builddepsfile
30794        # Look for a target and build machine specific resource!
30795        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30796        if test "x$resource" = x; then
30797            # Ok, lets instead look for a target specific resource
30798            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30799        fi
30800        if test "x$resource" = x; then
30801            # Ok, lets instead look for a build specific resource
30802            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30803        fi
30804        if test "x$resource" = x; then
30805            # Ok, lets instead look for a generic resource
30806            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30807            resource=${builddep_cups}
30808        fi
30809        if test "x$resource" != x; then
30810            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30811$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30812	    # If the resource in the builddeps.conf file is an existing directory,
30813	    # for example /java/linux/cups
30814	    if test -d ${resource}; then
30815	       depdir=${resource}
30816	    else
30817
30818# cups is for example mymodule
30819# $resource is for example libs/general/libmymod_1_2_3.zip
30820# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30821# $with_builddeps_dir is for example /localhome/builddeps
30822# depdir is the name of the variable into which we store the depdir, eg MYMOD
30823# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30824# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30825    filename=`basename $resource`
30826    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30827    filebase=${filename%%.*}
30828    extension=${filename#*.}
30829    installdir=$with_builddeps_dir/$filebase
30830    if test ! -f $installdir/$filename.unpacked; then
30831        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30832$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30833        if test ! -d $installdir; then
30834            mkdir -p $installdir
30835        fi
30836        if test ! -d $installdir; then
30837            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30838        fi
30839        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30840        touch $tmpfile
30841        if test ! -f $tmpfile; then
30842            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30843        fi
30844
30845    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30846    # $tmpfile is the local file name for the downloaded file.
30847    VALID_TOOL=no
30848    if test "x$BDEPS_FTP" = xwget; then
30849       VALID_TOOL=yes
30850       wget -O $tmpfile $with_builddeps_server/$resource
30851    fi
30852    if test "x$BDEPS_FTP" = xlftp; then
30853       VALID_TOOL=yes
30854       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30855    fi
30856    if test "x$BDEPS_FTP" = xftp; then
30857        VALID_TOOL=yes
30858        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30859        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30860        FTPUSERPWD=${FTPSERVER%%@*}
30861        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30862            FTPUSER=${userpwd%%:*}
30863            FTPPWD=${userpwd#*@}
30864            FTPSERVER=${FTPSERVER#*@}
30865        else
30866            FTPUSER=ftp
30867            FTPPWD=ftp
30868        fi
30869        # the "pass" command does not work on some
30870        # ftp clients (read ftp.exe) but if it works,
30871        # passive mode is better!
30872        (\
30873            echo "user $FTPUSER $FTPPWD"        ;\
30874            echo "pass"                         ;\
30875            echo "bin"                          ;\
30876            echo "get $FTPPATH $tmpfile"              ;\
30877        ) | ftp -in $FTPSERVER
30878    fi
30879    if test "x$VALID_TOOL" != xyes; then
30880       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30881    fi
30882
30883        mv $tmpfile $installdir/$filename
30884        if test ! -s $installdir/$filename; then
30885            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30886        fi
30887        case "$extension" in
30888            zip)  echo "Unzipping $installdir/$filename..."
30889               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30890            ;;
30891            tar.gz) echo "Untaring $installdir/$filename..."
30892               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30893            ;;
30894            tgz) echo "Untaring $installdir/$filename..."
30895               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30896            ;;
30897            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30898            ;;
30899        esac
30900    fi
30901    if test -f $installdir/$filename.unpacked; then
30902        depdir=$installdir
30903    fi
30904
30905	    fi
30906            # Source the builddeps file again, because in the previous command, the depdir
30907            # was updated to point at the current build dependency install directory.
30908            . $builddepsfile
30909            # Now extract variables from the builddeps.conf files.
30910            theroot=${builddep_cups_ROOT}
30911            thecflags=${builddep_cups_CFLAGS}
30912            thelibs=${builddep_cups_LIBS}
30913            if test "x$depdir" = x; then
30914                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30915            fi
30916            CUPS=$depdir
30917            if test "x$theroot" != x; then
30918               CUPS="$theroot"
30919            fi
30920            if test "x$thecflags" != x; then
30921               CUPS_CFLAGS="$thecflags"
30922            fi
30923            if test "x$thelibs" != x; then
30924               CUPS_LIBS="$thelibs"
30925            fi
30926            CUPS_FOUND=yes
30927
30928        fi
30929
30930    fi
30931
30932	fi
30933	if test "x$CUPS_FOUND" = xno; then
30934	    # Are the cups headers installed in the default /usr/include location?
30935	    for ac_header in cups/cups.h cups/ppd.h
30936do :
30937  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30938ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30939if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30940  cat >>confdefs.h <<_ACEOF
30941#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30942_ACEOF
30943 CUPS_FOUND=yes
30944	                      CUPS_CFLAGS=
30945	                      DEFAULT_CUPS=yes
30946fi
30947
30948done
30949
30950	fi
30951	if test "x$CUPS_FOUND" = xno; then
30952	    # Getting nervous now? Lets poke around for standard Solaris third-party
30953	    # package installation locations.
30954	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30955$as_echo_n "checking for cups headers... " >&6; }
30956	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30957	       # An SFW package seems to be installed!
30958	       CUPS_FOUND=yes
30959	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30960	    elif test -s /opt/csw/include/cups/cups.h; then
30961	       # A CSW package seems to be installed!
30962	       CUPS_FOUND=yes
30963	       CUPS_CFLAGS="-I/opt/csw/include"
30964	    fi
30965	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30966$as_echo "$CUPS_FOUND" >&6; }
30967	fi
30968	if test "x$CUPS_FOUND" = xno; then
30969
30970    # Print a helpful message on how to acquire the necessary build dependency.
30971    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30972    MISSING_DEPENDENCY=cups
30973    PKGHANDLER_COMMAND=
30974
30975    case $PKGHANDLER in
30976	apt-get)
30977                apt_help     $MISSING_DEPENDENCY ;;
30978    yum)
30979                yum_help     $MISSING_DEPENDENCY ;;
30980	port)
30981                port_help    $MISSING_DEPENDENCY ;;
30982	pkgutil)
30983                pkgutil_help $MISSING_DEPENDENCY ;;
30984	pkgadd)
30985                pkgadd_help  $MISSING_DEPENDENCY ;;
30986    * )
30987      break ;;
30988    esac
30989
30990    if test "x$PKGHANDLER_COMMAND" != x; then
30991        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30992    fi
30993
30994	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30995	fi
30996fi
30997
30998
30999
31000
31001
31002
31003###############################################################################
31004#
31005# The ubiquitous freetype2 library is used to render fonts.
31006#
31007
31008# Check whether --with-freetype was given.
31009if test "${with_freetype+set}" = set; then :
31010  withval=$with_freetype;
31011fi
31012
31013
31014# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31015USING_SYSTEM_FT_LIB=false
31016
31017if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31018	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31019		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31020$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31021	fi
31022	FREETYPE2_CFLAGS=
31023	FREETYPE2_LIBS=
31024        FREETYPE2_LIB_PATH=
31025else
31026	FREETYPE2_FOUND=no
31027
31028	if test "x$with_freetype" != x; then
31029
31030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31031
31032  # Input might be given as Windows format, start by converting to
31033  # unix format.
31034  path="$with_freetype"
31035  new_path=`$CYGPATH -u "$path"`
31036
31037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31040  # "foo.exe" is OK but "foo" is an error.
31041  #
31042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31043  # It is also a way to make sure we got the proper file name for the real test later on.
31044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31045  if test "x$test_shortpath" = x; then
31046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31047$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31048    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31049  fi
31050
31051  # Call helper function which possibly converts this using DOS-style short mode.
31052  # If so, the updated path is stored in $new_path.
31053
31054  input_path="$new_path"
31055  # Check if we need to convert this using DOS-style short mode. If the path
31056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31057  # take no chances and rewrite it.
31058  # Note: m4 eats our [], so we need to use [ and ] instead.
31059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31060  if test "x$has_forbidden_chars" != x; then
31061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31065      # Going to short mode and back again did indeed matter. Since short mode is
31066      # case insensitive, let's make it lowercase to improve readability.
31067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31068      # Now convert it back to Unix-stile (cygpath)
31069      input_path=`$CYGPATH -u "$shortmode_path"`
31070      new_path="$input_path"
31071    fi
31072  fi
31073
31074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31075  if test "x$test_cygdrive_prefix" = x; then
31076    # As a simple fix, exclude /usr/bin since it's not a real path.
31077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31079      # a path prefixed by /cygdrive for fixpath to work.
31080      new_path="$CYGWIN_ROOT_PATH$input_path"
31081    fi
31082  fi
31083
31084
31085  if test "x$path" != "x$new_path"; then
31086    with_freetype="$new_path"
31087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31088$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31089  fi
31090
31091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31092
31093  path="$with_freetype"
31094  has_colon=`$ECHO $path | $GREP ^.:`
31095  new_path="$path"
31096  if test "x$has_colon" = x; then
31097    # Not in mixed or Windows style, start by that.
31098    new_path=`cmd //c echo $path`
31099  fi
31100
31101
31102  input_path="$new_path"
31103  # Check if we need to convert this using DOS-style short mode. If the path
31104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31105  # take no chances and rewrite it.
31106  # Note: m4 eats our [], so we need to use [ and ] instead.
31107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31108  if test "x$has_forbidden_chars" != x; then
31109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31111  fi
31112
31113
31114  windows_path="$new_path"
31115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31116    unix_path=`$CYGPATH -u "$windows_path"`
31117    new_path="$unix_path"
31118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31120    new_path="$unix_path"
31121  fi
31122
31123  if test "x$path" != "x$new_path"; then
31124    with_freetype="$new_path"
31125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31126$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31127  fi
31128
31129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31131
31132  else
31133    # We're on a posix platform. Hooray! :)
31134    path="$with_freetype"
31135    has_space=`$ECHO "$path" | $GREP " "`
31136    if test "x$has_space" != x; then
31137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31138$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31139      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31140    fi
31141
31142    # Use eval to expand a potential ~
31143    eval path="$path"
31144    if test ! -f "$path" && test ! -d "$path"; then
31145      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31146    fi
31147
31148    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31149  fi
31150
31151	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31152            FREETYPE2_LIB_PATH="$with_freetype/lib"
31153            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31154                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31155                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31156            fi
31157            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31158                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31159            fi
31160	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31161            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31162                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31163            fi
31164 	    FREETYPE2_FOUND=yes
31165   	    if test "x$FREETYPE2_FOUND" = xyes; then
31166	        # Verify that the directories exist
31167                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31168		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31169		fi
31170	        # List the contents of the lib.
31171		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31172                if test "x$FREETYPELIB" = x; then
31173		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31174		fi
31175	        # Check one h-file
31176                if ! test -s "$with_freetype/include/ft2build.h"; then
31177		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31178		fi
31179            fi
31180        fi
31181	if test "x$FREETYPE2_FOUND" = xno; then
31182
31183
31184    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31185        # Source the builddeps file again, to make sure it uses the latest variables!
31186        . $builddepsfile
31187        # Look for a target and build machine specific resource!
31188        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31189        if test "x$resource" = x; then
31190            # Ok, lets instead look for a target specific resource
31191            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31192        fi
31193        if test "x$resource" = x; then
31194            # Ok, lets instead look for a build specific resource
31195            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31196        fi
31197        if test "x$resource" = x; then
31198            # Ok, lets instead look for a generic resource
31199            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31200            resource=${builddep_freetype2}
31201        fi
31202        if test "x$resource" != x; then
31203            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31204$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31205	    # If the resource in the builddeps.conf file is an existing directory,
31206	    # for example /java/linux/cups
31207	    if test -d ${resource}; then
31208	       depdir=${resource}
31209	    else
31210
31211# freetype2 is for example mymodule
31212# $resource is for example libs/general/libmymod_1_2_3.zip
31213# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31214# $with_builddeps_dir is for example /localhome/builddeps
31215# depdir is the name of the variable into which we store the depdir, eg MYMOD
31216# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31217# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31218    filename=`basename $resource`
31219    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31220    filebase=${filename%%.*}
31221    extension=${filename#*.}
31222    installdir=$with_builddeps_dir/$filebase
31223    if test ! -f $installdir/$filename.unpacked; then
31224        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31225$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31226        if test ! -d $installdir; then
31227            mkdir -p $installdir
31228        fi
31229        if test ! -d $installdir; then
31230            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31231        fi
31232        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31233        touch $tmpfile
31234        if test ! -f $tmpfile; then
31235            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31236        fi
31237
31238    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31239    # $tmpfile is the local file name for the downloaded file.
31240    VALID_TOOL=no
31241    if test "x$BDEPS_FTP" = xwget; then
31242       VALID_TOOL=yes
31243       wget -O $tmpfile $with_builddeps_server/$resource
31244    fi
31245    if test "x$BDEPS_FTP" = xlftp; then
31246       VALID_TOOL=yes
31247       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31248    fi
31249    if test "x$BDEPS_FTP" = xftp; then
31250        VALID_TOOL=yes
31251        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31252        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31253        FTPUSERPWD=${FTPSERVER%%@*}
31254        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31255            FTPUSER=${userpwd%%:*}
31256            FTPPWD=${userpwd#*@}
31257            FTPSERVER=${FTPSERVER#*@}
31258        else
31259            FTPUSER=ftp
31260            FTPPWD=ftp
31261        fi
31262        # the "pass" command does not work on some
31263        # ftp clients (read ftp.exe) but if it works,
31264        # passive mode is better!
31265        (\
31266            echo "user $FTPUSER $FTPPWD"        ;\
31267            echo "pass"                         ;\
31268            echo "bin"                          ;\
31269            echo "get $FTPPATH $tmpfile"              ;\
31270        ) | ftp -in $FTPSERVER
31271    fi
31272    if test "x$VALID_TOOL" != xyes; then
31273       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31274    fi
31275
31276        mv $tmpfile $installdir/$filename
31277        if test ! -s $installdir/$filename; then
31278            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31279        fi
31280        case "$extension" in
31281            zip)  echo "Unzipping $installdir/$filename..."
31282               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31283            ;;
31284            tar.gz) echo "Untaring $installdir/$filename..."
31285               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31286            ;;
31287            tgz) echo "Untaring $installdir/$filename..."
31288               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31289            ;;
31290            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31291            ;;
31292        esac
31293    fi
31294    if test -f $installdir/$filename.unpacked; then
31295        depdir=$installdir
31296    fi
31297
31298	    fi
31299            # Source the builddeps file again, because in the previous command, the depdir
31300            # was updated to point at the current build dependency install directory.
31301            . $builddepsfile
31302            # Now extract variables from the builddeps.conf files.
31303            theroot=${builddep_freetype2_ROOT}
31304            thecflags=${builddep_freetype2_CFLAGS}
31305            thelibs=${builddep_freetype2_LIBS}
31306            if test "x$depdir" = x; then
31307                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31308            fi
31309            FREETYPE2=$depdir
31310            if test "x$theroot" != x; then
31311               FREETYPE2="$theroot"
31312            fi
31313            if test "x$thecflags" != x; then
31314               FREETYPE2_CFLAGS="$thecflags"
31315            fi
31316            if test "x$thelibs" != x; then
31317               FREETYPE2_LIBS="$thelibs"
31318            fi
31319            FREETYPE2_FOUND=yes
31320            else FREETYPE2_FOUND=no
31321
31322        fi
31323        else FREETYPE2_FOUND=no
31324
31325    fi
31326
31327            USING_SYSTEM_FT_LIB=true
31328	fi
31329	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31330            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31331
31332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31333
31334  # Input might be given as Windows format, start by converting to
31335  # unix format.
31336  path="$FREETYPELOCATION"
31337  new_path=`$CYGPATH -u "$path"`
31338
31339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31342  # "foo.exe" is OK but "foo" is an error.
31343  #
31344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31345  # It is also a way to make sure we got the proper file name for the real test later on.
31346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31347  if test "x$test_shortpath" = x; then
31348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31349$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31350    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31351  fi
31352
31353  # Call helper function which possibly converts this using DOS-style short mode.
31354  # If so, the updated path is stored in $new_path.
31355
31356  input_path="$new_path"
31357  # Check if we need to convert this using DOS-style short mode. If the path
31358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31359  # take no chances and rewrite it.
31360  # Note: m4 eats our [], so we need to use [ and ] instead.
31361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31362  if test "x$has_forbidden_chars" != x; then
31363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31367      # Going to short mode and back again did indeed matter. Since short mode is
31368      # case insensitive, let's make it lowercase to improve readability.
31369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31370      # Now convert it back to Unix-stile (cygpath)
31371      input_path=`$CYGPATH -u "$shortmode_path"`
31372      new_path="$input_path"
31373    fi
31374  fi
31375
31376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31377  if test "x$test_cygdrive_prefix" = x; then
31378    # As a simple fix, exclude /usr/bin since it's not a real path.
31379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31381      # a path prefixed by /cygdrive for fixpath to work.
31382      new_path="$CYGWIN_ROOT_PATH$input_path"
31383    fi
31384  fi
31385
31386
31387  if test "x$path" != "x$new_path"; then
31388    FREETYPELOCATION="$new_path"
31389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31390$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31391  fi
31392
31393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31394
31395  path="$FREETYPELOCATION"
31396  has_colon=`$ECHO $path | $GREP ^.:`
31397  new_path="$path"
31398  if test "x$has_colon" = x; then
31399    # Not in mixed or Windows style, start by that.
31400    new_path=`cmd //c echo $path`
31401  fi
31402
31403
31404  input_path="$new_path"
31405  # Check if we need to convert this using DOS-style short mode. If the path
31406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31407  # take no chances and rewrite it.
31408  # Note: m4 eats our [], so we need to use [ and ] instead.
31409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31410  if test "x$has_forbidden_chars" != x; then
31411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31413  fi
31414
31415
31416  windows_path="$new_path"
31417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31418    unix_path=`$CYGPATH -u "$windows_path"`
31419    new_path="$unix_path"
31420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31422    new_path="$unix_path"
31423  fi
31424
31425  if test "x$path" != "x$new_path"; then
31426    FREETYPELOCATION="$new_path"
31427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31428$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31429  fi
31430
31431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31433
31434  else
31435    # We're on a posix platform. Hooray! :)
31436    path="$FREETYPELOCATION"
31437    has_space=`$ECHO "$path" | $GREP " "`
31438    if test "x$has_space" != x; then
31439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31440$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31441      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31442    fi
31443
31444    # Use eval to expand a potential ~
31445    eval path="$path"
31446    if test ! -f "$path" && test ! -d "$path"; then
31447      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31448    fi
31449
31450    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31451  fi
31452
31453	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31454$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31455	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31456	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31457	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31458 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31459                if ! test -s "$FREETYPE2_LIBS"; then
31460		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31461		fi
31462                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31463		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31464		fi
31465                USING_SYSTEM_FT_LIB=true
31466                FREETYPE2_FOUND=yes
31467	    fi
31468	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31469$as_echo "$FREETYPE2_FOUND" >&6; }
31470        fi
31471	if test "x$FREETYPE2_FOUND" = xno; then
31472
31473pkg_failed=no
31474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31475$as_echo_n "checking for FREETYPE2... " >&6; }
31476
31477if test -n "$FREETYPE2_CFLAGS"; then
31478    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31479 elif test -n "$PKG_CONFIG"; then
31480    if test -n "$PKG_CONFIG" && \
31481    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31482  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31483  ac_status=$?
31484  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31485  test $ac_status = 0; }; then
31486  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31487else
31488  pkg_failed=yes
31489fi
31490 else
31491    pkg_failed=untried
31492fi
31493if test -n "$FREETYPE2_LIBS"; then
31494    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31495 elif test -n "$PKG_CONFIG"; then
31496    if test -n "$PKG_CONFIG" && \
31497    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31498  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31499  ac_status=$?
31500  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31501  test $ac_status = 0; }; then
31502  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31503else
31504  pkg_failed=yes
31505fi
31506 else
31507    pkg_failed=untried
31508fi
31509
31510
31511
31512if test $pkg_failed = yes; then
31513
31514if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31515        _pkg_short_errors_supported=yes
31516else
31517        _pkg_short_errors_supported=no
31518fi
31519        if test $_pkg_short_errors_supported = yes; then
31520	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31521        else
31522	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31523        fi
31524	# Put the nasty error message in config.log where it belongs
31525	echo "$FREETYPE2_PKG_ERRORS" >&5
31526
31527	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31528$as_echo "no" >&6; }
31529                FREETYPE2_FOUND=no
31530elif test $pkg_failed = untried; then
31531	FREETYPE2_FOUND=no
31532else
31533	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31534	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31536$as_echo "yes" >&6; }
31537	FREETYPE2_FOUND=yes
31538fi
31539            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31540            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31541            USING_SYSTEM_FT_LIB=true
31542            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31543            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31544              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31545            fi
31546	fi
31547	if test "x$FREETYPE2_FOUND" = xno; then
31548	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31549$as_echo_n "checking for freetype in some standard locations... " >&6; }
31550
31551	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31552	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31553	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31554	    fi
31555	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31556	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31557	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31558	    fi
31559
31560	    PREV_CXXCFLAGS="$CXXFLAGS"
31561	    PREV_LDFLAGS="$LDFLAGS"
31562	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31563	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31564	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31565/* end confdefs.h.  */
31566#include<ft2build.h>
31567	                    #include FT_FREETYPE_H
31568	                   int main() { return 0; }
31569
31570_ACEOF
31571if ac_fn_cxx_try_link "$LINENO"; then :
31572
31573	                      # Yes, the default cflags and libs did the trick.
31574	                      FREETYPE2_FOUND=yes
31575	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31576	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31577
31578else
31579
31580	                      FREETYPE2_FOUND=no
31581
31582fi
31583rm -f core conftest.err conftest.$ac_objext \
31584    conftest$ac_exeext conftest.$ac_ext
31585            CXXCFLAGS="$PREV_CXXFLAGS"
31586	    LDFLAGS="$PREV_LDFLAGS"
31587	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31588$as_echo "$FREETYPE2_FOUND" >&6; }
31589            USING_SYSTEM_FT_LIB=true
31590	fi
31591	if test "x$FREETYPE2_FOUND" = xno; then
31592
31593    # Print a helpful message on how to acquire the necessary build dependency.
31594    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31595    MISSING_DEPENDENCY=freetype2
31596    PKGHANDLER_COMMAND=
31597
31598    case $PKGHANDLER in
31599	apt-get)
31600                apt_help     $MISSING_DEPENDENCY ;;
31601    yum)
31602                yum_help     $MISSING_DEPENDENCY ;;
31603	port)
31604                port_help    $MISSING_DEPENDENCY ;;
31605	pkgutil)
31606                pkgutil_help $MISSING_DEPENDENCY ;;
31607	pkgadd)
31608                pkgadd_help  $MISSING_DEPENDENCY ;;
31609    * )
31610      break ;;
31611    esac
31612
31613    if test "x$PKGHANDLER_COMMAND" != x; then
31614        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31615    fi
31616
31617		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31618	fi
31619
31620        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31621            # AC_CHECK_LIB does not support use of cl.exe
31622            PREV_LDFLAGS="$LDFLAGS"
31623            LDFLAGS="$FREETYPE2_LIBS"
31624            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31625$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31626if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31627  $as_echo_n "(cached) " >&6
31628else
31629  ac_check_lib_save_LIBS=$LIBS
31630LIBS="-lfreetype  $LIBS"
31631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31632/* end confdefs.h.  */
31633
31634/* Override any GCC internal prototype to avoid an error.
31635   Use char because int might match the return type of a GCC
31636   builtin and then its argument prototype would still apply.  */
31637#ifdef __cplusplus
31638extern "C"
31639#endif
31640char FT_Init_FreeType ();
31641int
31642main ()
31643{
31644return FT_Init_FreeType ();
31645  ;
31646  return 0;
31647}
31648_ACEOF
31649if ac_fn_cxx_try_link "$LINENO"; then :
31650  ac_cv_lib_freetype_FT_Init_FreeType=yes
31651else
31652  ac_cv_lib_freetype_FT_Init_FreeType=no
31653fi
31654rm -f core conftest.err conftest.$ac_objext \
31655    conftest$ac_exeext conftest.$ac_ext
31656LIBS=$ac_check_lib_save_LIBS
31657fi
31658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31659$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31660if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31661  FREETYPE2_FOUND=true
31662else
31663  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31664fi
31665
31666            LDFLAGS="$PREV_LDFLAGS"
31667        fi
31668fi
31669
31670
31671
31672
31673
31674
31675
31676
31677
31678###############################################################################
31679#
31680# Check for alsa headers and libraries. Used on Linux/GNU systems.
31681#
31682
31683# Check whether --with-alsa was given.
31684if test "${with_alsa+set}" = set; then :
31685  withval=$with_alsa;
31686fi
31687
31688
31689# Check whether --with-alsa-include was given.
31690if test "${with_alsa_include+set}" = set; then :
31691  withval=$with_alsa_include;
31692fi
31693
31694
31695# Check whether --with-alsa-lib was given.
31696if test "${with_alsa_lib+set}" = set; then :
31697  withval=$with_alsa_lib;
31698fi
31699
31700
31701if test "x$ALSA_NOT_NEEDED" = xyes; then
31702	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31703		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31704$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31705	fi
31706	ALSA_CFLAGS=
31707	ALSA_LIBS=
31708else
31709	ALSA_FOUND=no
31710
31711	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31712	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31713	fi
31714
31715	if test "x${with_alsa}" != x; then
31716	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31717	    ALSA_CFLAGS="-I${with_alsa}/include"
31718	    ALSA_FOUND=yes
31719	fi
31720	if test "x${with_alsa_include}" != x; then
31721	    ALSA_CFLAGS="-I${with_alsa_include}"
31722	    ALSA_FOUND=yes
31723	fi
31724	if test "x${with_alsa_lib}" != x; then
31725	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31726	    ALSA_FOUND=yes
31727	fi
31728	if test "x$ALSA_FOUND" = xno; then
31729
31730
31731    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31732        # Source the builddeps file again, to make sure it uses the latest variables!
31733        . $builddepsfile
31734        # Look for a target and build machine specific resource!
31735        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31736        if test "x$resource" = x; then
31737            # Ok, lets instead look for a target specific resource
31738            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31739        fi
31740        if test "x$resource" = x; then
31741            # Ok, lets instead look for a build specific resource
31742            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31743        fi
31744        if test "x$resource" = x; then
31745            # Ok, lets instead look for a generic resource
31746            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31747            resource=${builddep_alsa}
31748        fi
31749        if test "x$resource" != x; then
31750            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31751$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31752	    # If the resource in the builddeps.conf file is an existing directory,
31753	    # for example /java/linux/cups
31754	    if test -d ${resource}; then
31755	       depdir=${resource}
31756	    else
31757
31758# alsa is for example mymodule
31759# $resource is for example libs/general/libmymod_1_2_3.zip
31760# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31761# $with_builddeps_dir is for example /localhome/builddeps
31762# depdir is the name of the variable into which we store the depdir, eg MYMOD
31763# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31764# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31765    filename=`basename $resource`
31766    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31767    filebase=${filename%%.*}
31768    extension=${filename#*.}
31769    installdir=$with_builddeps_dir/$filebase
31770    if test ! -f $installdir/$filename.unpacked; then
31771        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31772$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31773        if test ! -d $installdir; then
31774            mkdir -p $installdir
31775        fi
31776        if test ! -d $installdir; then
31777            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31778        fi
31779        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31780        touch $tmpfile
31781        if test ! -f $tmpfile; then
31782            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31783        fi
31784
31785    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31786    # $tmpfile is the local file name for the downloaded file.
31787    VALID_TOOL=no
31788    if test "x$BDEPS_FTP" = xwget; then
31789       VALID_TOOL=yes
31790       wget -O $tmpfile $with_builddeps_server/$resource
31791    fi
31792    if test "x$BDEPS_FTP" = xlftp; then
31793       VALID_TOOL=yes
31794       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31795    fi
31796    if test "x$BDEPS_FTP" = xftp; then
31797        VALID_TOOL=yes
31798        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31799        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31800        FTPUSERPWD=${FTPSERVER%%@*}
31801        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31802            FTPUSER=${userpwd%%:*}
31803            FTPPWD=${userpwd#*@}
31804            FTPSERVER=${FTPSERVER#*@}
31805        else
31806            FTPUSER=ftp
31807            FTPPWD=ftp
31808        fi
31809        # the "pass" command does not work on some
31810        # ftp clients (read ftp.exe) but if it works,
31811        # passive mode is better!
31812        (\
31813            echo "user $FTPUSER $FTPPWD"        ;\
31814            echo "pass"                         ;\
31815            echo "bin"                          ;\
31816            echo "get $FTPPATH $tmpfile"              ;\
31817        ) | ftp -in $FTPSERVER
31818    fi
31819    if test "x$VALID_TOOL" != xyes; then
31820       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31821    fi
31822
31823        mv $tmpfile $installdir/$filename
31824        if test ! -s $installdir/$filename; then
31825            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31826        fi
31827        case "$extension" in
31828            zip)  echo "Unzipping $installdir/$filename..."
31829               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31830            ;;
31831            tar.gz) echo "Untaring $installdir/$filename..."
31832               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31833            ;;
31834            tgz) echo "Untaring $installdir/$filename..."
31835               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31836            ;;
31837            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31838            ;;
31839        esac
31840    fi
31841    if test -f $installdir/$filename.unpacked; then
31842        depdir=$installdir
31843    fi
31844
31845	    fi
31846            # Source the builddeps file again, because in the previous command, the depdir
31847            # was updated to point at the current build dependency install directory.
31848            . $builddepsfile
31849            # Now extract variables from the builddeps.conf files.
31850            theroot=${builddep_alsa_ROOT}
31851            thecflags=${builddep_alsa_CFLAGS}
31852            thelibs=${builddep_alsa_LIBS}
31853            if test "x$depdir" = x; then
31854                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31855            fi
31856            ALSA=$depdir
31857            if test "x$theroot" != x; then
31858               ALSA="$theroot"
31859            fi
31860            if test "x$thecflags" != x; then
31861               ALSA_CFLAGS="$thecflags"
31862            fi
31863            if test "x$thelibs" != x; then
31864               ALSA_LIBS="$thelibs"
31865            fi
31866            ALSA_FOUND=yes
31867            else ALSA_FOUND=no
31868
31869        fi
31870        else ALSA_FOUND=no
31871
31872    fi
31873
31874	fi
31875	if test "x$ALSA_FOUND" = xno; then
31876
31877pkg_failed=no
31878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31879$as_echo_n "checking for ALSA... " >&6; }
31880
31881if test -n "$ALSA_CFLAGS"; then
31882    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31883 elif test -n "$PKG_CONFIG"; then
31884    if test -n "$PKG_CONFIG" && \
31885    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31886  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31887  ac_status=$?
31888  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31889  test $ac_status = 0; }; then
31890  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31891else
31892  pkg_failed=yes
31893fi
31894 else
31895    pkg_failed=untried
31896fi
31897if test -n "$ALSA_LIBS"; then
31898    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31899 elif test -n "$PKG_CONFIG"; then
31900    if test -n "$PKG_CONFIG" && \
31901    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31902  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31903  ac_status=$?
31904  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31905  test $ac_status = 0; }; then
31906  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31907else
31908  pkg_failed=yes
31909fi
31910 else
31911    pkg_failed=untried
31912fi
31913
31914
31915
31916if test $pkg_failed = yes; then
31917
31918if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31919        _pkg_short_errors_supported=yes
31920else
31921        _pkg_short_errors_supported=no
31922fi
31923        if test $_pkg_short_errors_supported = yes; then
31924	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31925        else
31926	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31927        fi
31928	# Put the nasty error message in config.log where it belongs
31929	echo "$ALSA_PKG_ERRORS" >&5
31930
31931	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31932$as_echo "no" >&6; }
31933                ALSA_FOUND=no
31934elif test $pkg_failed = untried; then
31935	ALSA_FOUND=no
31936else
31937	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31938	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31940$as_echo "yes" >&6; }
31941	ALSA_FOUND=yes
31942fi
31943	fi
31944	if test "x$ALSA_FOUND" = xno; then
31945	    for ac_header in alsa/asoundlib.h
31946do :
31947  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31948if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31949  cat >>confdefs.h <<_ACEOF
31950#define HAVE_ALSA_ASOUNDLIB_H 1
31951_ACEOF
31952 ALSA_FOUND=yes
31953	                      ALSA_CFLAGS=-Iignoreme
31954	                      ALSA_LIBS=-lasound
31955	                      DEFAULT_ALSA=yes
31956else
31957  ALSA_FOUND=no
31958fi
31959
31960done
31961
31962	fi
31963	if test "x$ALSA_FOUND" = xno; then
31964
31965    # Print a helpful message on how to acquire the necessary build dependency.
31966    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31967    MISSING_DEPENDENCY=alsa
31968    PKGHANDLER_COMMAND=
31969
31970    case $PKGHANDLER in
31971	apt-get)
31972                apt_help     $MISSING_DEPENDENCY ;;
31973    yum)
31974                yum_help     $MISSING_DEPENDENCY ;;
31975	port)
31976                port_help    $MISSING_DEPENDENCY ;;
31977	pkgutil)
31978                pkgutil_help $MISSING_DEPENDENCY ;;
31979	pkgadd)
31980                pkgadd_help  $MISSING_DEPENDENCY ;;
31981    * )
31982      break ;;
31983    esac
31984
31985    if test "x$PKGHANDLER_COMMAND" != x; then
31986        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31987    fi
31988
31989	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31990	fi
31991fi
31992
31993
31994
31995
31996
31997
31998
31999###############################################################################
32000#
32001# Check for the jpeg library
32002#
32003
32004USE_EXTERNAL_LIBJPEG=true
32005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32006$as_echo_n "checking for main in -ljpeg... " >&6; }
32007if test "${ac_cv_lib_jpeg_main+set}" = set; then :
32008  $as_echo_n "(cached) " >&6
32009else
32010  ac_check_lib_save_LIBS=$LIBS
32011LIBS="-ljpeg  $LIBS"
32012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32013/* end confdefs.h.  */
32014
32015
32016int
32017main ()
32018{
32019return main ();
32020  ;
32021  return 0;
32022}
32023_ACEOF
32024if ac_fn_cxx_try_link "$LINENO"; then :
32025  ac_cv_lib_jpeg_main=yes
32026else
32027  ac_cv_lib_jpeg_main=no
32028fi
32029rm -f core conftest.err conftest.$ac_objext \
32030    conftest$ac_exeext conftest.$ac_ext
32031LIBS=$ac_check_lib_save_LIBS
32032fi
32033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32034$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32035if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
32036  cat >>confdefs.h <<_ACEOF
32037#define HAVE_LIBJPEG 1
32038_ACEOF
32039
32040  LIBS="-ljpeg $LIBS"
32041
32042else
32043   USE_EXTERNAL_LIBJPEG=false
32044               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32045$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32046
32047fi
32048
32049
32050
32051###############################################################################
32052#
32053# Check for the gif library
32054#
32055
32056
32057# Check whether --with-giflib was given.
32058if test "${with_giflib+set}" = set; then :
32059  withval=$with_giflib;
32060fi
32061
32062
32063
32064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32065$as_echo_n "checking for which giflib to use... " >&6; }
32066
32067# default is bundled
32068DEFAULT_GIFLIB=bundled
32069
32070#
32071# if user didn't specify, use DEFAULT_GIFLIB
32072#
32073if test "x${with_giflib}" = "x"; then
32074    with_giflib=${DEFAULT_GIFLIB}
32075fi
32076
32077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32078$as_echo "${with_giflib}" >&6; }
32079
32080if test "x${with_giflib}" = "xbundled"; then
32081    USE_EXTERNAL_LIBGIF=false
32082elif test "x${with_giflib}" = "xsystem"; then
32083    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32084if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
32085
32086else
32087   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32088fi
32089
32090
32091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32092$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32093if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
32094  $as_echo_n "(cached) " >&6
32095else
32096  ac_check_lib_save_LIBS=$LIBS
32097LIBS="-lgif  $LIBS"
32098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32099/* end confdefs.h.  */
32100
32101/* Override any GCC internal prototype to avoid an error.
32102   Use char because int might match the return type of a GCC
32103   builtin and then its argument prototype would still apply.  */
32104#ifdef __cplusplus
32105extern "C"
32106#endif
32107char DGifGetCode ();
32108int
32109main ()
32110{
32111return DGifGetCode ();
32112  ;
32113  return 0;
32114}
32115_ACEOF
32116if ac_fn_cxx_try_link "$LINENO"; then :
32117  ac_cv_lib_gif_DGifGetCode=yes
32118else
32119  ac_cv_lib_gif_DGifGetCode=no
32120fi
32121rm -f core conftest.err conftest.$ac_objext \
32122    conftest$ac_exeext conftest.$ac_ext
32123LIBS=$ac_check_lib_save_LIBS
32124fi
32125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32126$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32127if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32128  cat >>confdefs.h <<_ACEOF
32129#define HAVE_LIBGIF 1
32130_ACEOF
32131
32132  LIBS="-lgif $LIBS"
32133
32134else
32135   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32136fi
32137
32138
32139    USE_EXTERNAL_LIBGIF=true
32140else
32141    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32142fi
32143
32144
32145###############################################################################
32146#
32147# Check for the zlib library
32148#
32149
32150
32151# Check whether --with-zlib was given.
32152if test "${with_zlib+set}" = set; then :
32153  withval=$with_zlib;
32154fi
32155
32156
32157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32158$as_echo_n "checking for compress in -lz... " >&6; }
32159if test "${ac_cv_lib_z_compress+set}" = set; then :
32160  $as_echo_n "(cached) " >&6
32161else
32162  ac_check_lib_save_LIBS=$LIBS
32163LIBS="-lz  $LIBS"
32164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32165/* end confdefs.h.  */
32166
32167/* Override any GCC internal prototype to avoid an error.
32168   Use char because int might match the return type of a GCC
32169   builtin and then its argument prototype would still apply.  */
32170#ifdef __cplusplus
32171extern "C"
32172#endif
32173char compress ();
32174int
32175main ()
32176{
32177return compress ();
32178  ;
32179  return 0;
32180}
32181_ACEOF
32182if ac_fn_cxx_try_link "$LINENO"; then :
32183  ac_cv_lib_z_compress=yes
32184else
32185  ac_cv_lib_z_compress=no
32186fi
32187rm -f core conftest.err conftest.$ac_objext \
32188    conftest$ac_exeext conftest.$ac_ext
32189LIBS=$ac_check_lib_save_LIBS
32190fi
32191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32192$as_echo "$ac_cv_lib_z_compress" >&6; }
32193if test "x$ac_cv_lib_z_compress" = x""yes; then :
32194   ZLIB_FOUND=yes
32195else
32196   ZLIB_FOUND=no
32197fi
32198
32199
32200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32201$as_echo_n "checking for which zlib to use... " >&6; }
32202
32203DEFAULT_ZLIB=bundled
32204if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32205#
32206# On macosx default is system...on others default is
32207#
32208    DEFAULT_ZLIB=system
32209fi
32210
32211if test "x${ZLIB_FOUND}" != "xyes"; then
32212#
32213# If we don't find any system...set default to bundled
32214#
32215    DEFAULT_ZLIB=bundled
32216fi
32217
32218#
32219# If user didn't specify, use DEFAULT_ZLIB
32220#
32221if test "x${with_zlib}" = "x"; then
32222    with_zlib=${DEFAULT_ZLIB}
32223fi
32224
32225if test "x${with_zlib}" = "xbundled"; then
32226    USE_EXTERNAL_LIBZ=false
32227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32228$as_echo "bundled" >&6; }
32229elif test "x${with_zlib}" = "xsystem"; then
32230    if test "x${ZLIB_FOUND}" = "xyes"; then
32231        USE_EXTERNAL_LIBZ=true
32232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32233$as_echo "system" >&6; }
32234    else
32235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32236$as_echo "system not found" >&6; }
32237        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32238    fi
32239else
32240    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32241fi
32242
32243
32244
32245###############################################################################
32246LIBZIP_CAN_USE_MMAP=true
32247
32248
32249
32250###############################################################################
32251#
32252# Check if altzone exists in time.h
32253#
32254
32255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32256/* end confdefs.h.  */
32257#include <time.h>
32258int
32259main ()
32260{
32261return (int)altzone;
32262  ;
32263  return 0;
32264}
32265_ACEOF
32266if ac_fn_cxx_try_link "$LINENO"; then :
32267  has_altzone=yes
32268else
32269  has_altzone=no
32270fi
32271rm -f core conftest.err conftest.$ac_objext \
32272    conftest$ac_exeext conftest.$ac_ext
32273if test "x$has_altzone" = xyes; then
32274
32275$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32276
32277fi
32278
32279###############################################################################
32280#
32281# Check the maths library
32282#
32283
32284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32285$as_echo_n "checking for cos in -lm... " >&6; }
32286if test "${ac_cv_lib_m_cos+set}" = set; then :
32287  $as_echo_n "(cached) " >&6
32288else
32289  ac_check_lib_save_LIBS=$LIBS
32290LIBS="-lm  $LIBS"
32291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32292/* end confdefs.h.  */
32293
32294/* Override any GCC internal prototype to avoid an error.
32295   Use char because int might match the return type of a GCC
32296   builtin and then its argument prototype would still apply.  */
32297#ifdef __cplusplus
32298extern "C"
32299#endif
32300char cos ();
32301int
32302main ()
32303{
32304return cos ();
32305  ;
32306  return 0;
32307}
32308_ACEOF
32309if ac_fn_cxx_try_link "$LINENO"; then :
32310  ac_cv_lib_m_cos=yes
32311else
32312  ac_cv_lib_m_cos=no
32313fi
32314rm -f core conftest.err conftest.$ac_objext \
32315    conftest$ac_exeext conftest.$ac_ext
32316LIBS=$ac_check_lib_save_LIBS
32317fi
32318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32319$as_echo "$ac_cv_lib_m_cos" >&6; }
32320if test "x$ac_cv_lib_m_cos" = x""yes; then :
32321  cat >>confdefs.h <<_ACEOF
32322#define HAVE_LIBM 1
32323_ACEOF
32324
32325  LIBS="-lm $LIBS"
32326
32327else
32328
32329                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32330$as_echo "$as_me: Maths library was not found" >&6;}
32331
32332fi
32333
32334
32335
32336###############################################################################
32337#
32338# Check for libdl.so
32339
32340save_LIBS="$LIBS"
32341LIBS=""
32342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32343$as_echo_n "checking for dlopen in -ldl... " >&6; }
32344if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32345  $as_echo_n "(cached) " >&6
32346else
32347  ac_check_lib_save_LIBS=$LIBS
32348LIBS="-ldl  $LIBS"
32349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32350/* end confdefs.h.  */
32351
32352/* Override any GCC internal prototype to avoid an error.
32353   Use char because int might match the return type of a GCC
32354   builtin and then its argument prototype would still apply.  */
32355#ifdef __cplusplus
32356extern "C"
32357#endif
32358char dlopen ();
32359int
32360main ()
32361{
32362return dlopen ();
32363  ;
32364  return 0;
32365}
32366_ACEOF
32367if ac_fn_cxx_try_link "$LINENO"; then :
32368  ac_cv_lib_dl_dlopen=yes
32369else
32370  ac_cv_lib_dl_dlopen=no
32371fi
32372rm -f core conftest.err conftest.$ac_objext \
32373    conftest$ac_exeext conftest.$ac_ext
32374LIBS=$ac_check_lib_save_LIBS
32375fi
32376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32377$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32378if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32379  cat >>confdefs.h <<_ACEOF
32380#define HAVE_LIBDL 1
32381_ACEOF
32382
32383  LIBS="-ldl $LIBS"
32384
32385fi
32386
32387LIBDL="$LIBS"
32388
32389LIBS="$save_LIBS"
32390
32391
32392
32393###############################################################################
32394#
32395# statically link libstdc++ before C++ ABI is stablized on Linux unless
32396# dynamic build is configured on command line.
32397#
32398
32399# Check whether --with-stdc++lib was given.
32400if test "${with_stdc__lib+set}" = set; then :
32401  withval=$with_stdc__lib;
32402    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32403        && test "x$with_stdc__lib" != xdefault; then
32404      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32405    fi
32406
32407else
32408  with_stdc__lib=default
32409
32410fi
32411
32412
32413if test "x$OPENJDK_TARGET_OS" = xlinux; then
32414    # Test if -lstdc++ works.
32415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32416$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32417    ac_ext=cpp
32418ac_cpp='$CXXCPP $CPPFLAGS'
32419ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32420ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32421ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32422
32423    OLD_CXXFLAGS="$CXXFLAGS"
32424    CXXFLAGS="$CXXFLAGS -lstdc++"
32425    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32426/* end confdefs.h.  */
32427
32428int
32429main ()
32430{
32431return 0;
32432  ;
32433  return 0;
32434}
32435_ACEOF
32436if ac_fn_cxx_try_link "$LINENO"; then :
32437  has_dynamic_libstdcxx=yes
32438else
32439  has_dynamic_libstdcxx=no
32440fi
32441rm -f core conftest.err conftest.$ac_objext \
32442    conftest$ac_exeext conftest.$ac_ext
32443    CXXFLAGS="$OLD_CXXFLAGS"
32444    ac_ext=cpp
32445ac_cpp='$CXXCPP $CPPFLAGS'
32446ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32447ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32448ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32449
32450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32451$as_echo "$has_dynamic_libstdcxx" >&6; }
32452
32453    # Test if stdc++ can be linked statically.
32454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32455$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32456    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32457    ac_ext=cpp
32458ac_cpp='$CXXCPP $CPPFLAGS'
32459ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32460ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32461ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32462
32463    OLD_LIBS="$LIBS"
32464    OLD_CXX="$CXX"
32465    LIBS="$STATIC_STDCXX_FLAGS"
32466    CXX="$CC"
32467    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32468/* end confdefs.h.  */
32469
32470int
32471main ()
32472{
32473return 0;
32474  ;
32475  return 0;
32476}
32477_ACEOF
32478if ac_fn_cxx_try_link "$LINENO"; then :
32479  has_static_libstdcxx=yes
32480else
32481  has_static_libstdcxx=no
32482fi
32483rm -f core conftest.err conftest.$ac_objext \
32484    conftest$ac_exeext conftest.$ac_ext
32485    LIBS="$OLD_LIBS"
32486    CXX="$OLD_CXX"
32487    ac_ext=cpp
32488ac_cpp='$CXXCPP $CPPFLAGS'
32489ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32490ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32491ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32492
32493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32494$as_echo "$has_static_libstdcxx" >&6; }
32495
32496    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32497        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32498    fi
32499
32500    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32501        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32502    fi
32503
32504    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32505        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32506    fi
32507
32508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32509$as_echo_n "checking how to link with libstdc++... " >&6; }
32510    # If dynamic was requested, it's available since it would fail above otherwise.
32511    # If dynamic wasn't requested, go with static unless it isn't available.
32512    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32513        LIBCXX="$LIBCXX -lstdc++"
32514        LDCXX="$CXX"
32515        STATIC_CXX_SETTING="STATIC_CXX=false"
32516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32517$as_echo "dynamic" >&6; }
32518    else
32519        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32520        LDCXX="$CC"
32521        STATIC_CXX_SETTING="STATIC_CXX=true"
32522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32523$as_echo "static" >&6; }
32524    fi
32525fi
32526
32527
32528if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32529    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32530
32531pkg_failed=no
32532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32533$as_echo_n "checking for LIBFFI... " >&6; }
32534
32535if test -n "$LIBFFI_CFLAGS"; then
32536    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32537 elif test -n "$PKG_CONFIG"; then
32538    if test -n "$PKG_CONFIG" && \
32539    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32540  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32541  ac_status=$?
32542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32543  test $ac_status = 0; }; then
32544  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32545else
32546  pkg_failed=yes
32547fi
32548 else
32549    pkg_failed=untried
32550fi
32551if test -n "$LIBFFI_LIBS"; then
32552    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32553 elif test -n "$PKG_CONFIG"; then
32554    if test -n "$PKG_CONFIG" && \
32555    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32556  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32557  ac_status=$?
32558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32559  test $ac_status = 0; }; then
32560  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32561else
32562  pkg_failed=yes
32563fi
32564 else
32565    pkg_failed=untried
32566fi
32567
32568
32569
32570if test $pkg_failed = yes; then
32571
32572if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32573        _pkg_short_errors_supported=yes
32574else
32575        _pkg_short_errors_supported=no
32576fi
32577        if test $_pkg_short_errors_supported = yes; then
32578	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32579        else
32580	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32581        fi
32582	# Put the nasty error message in config.log where it belongs
32583	echo "$LIBFFI_PKG_ERRORS" >&5
32584
32585	as_fn_error $? "Package requirements (libffi) were not met:
32586
32587$LIBFFI_PKG_ERRORS
32588
32589Consider adjusting the PKG_CONFIG_PATH environment variable if you
32590installed software in a non-standard prefix.
32591
32592Alternatively, you may set the environment variables LIBFFI_CFLAGS
32593and LIBFFI_LIBS to avoid the need to call pkg-config.
32594See the pkg-config man page for more details.
32595" "$LINENO" 5
32596elif test $pkg_failed = untried; then
32597	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32599as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32600is in your PATH or set the PKG_CONFIG environment variable to the full
32601path to pkg-config.
32602
32603Alternatively, you may set the environment variables LIBFFI_CFLAGS
32604and LIBFFI_LIBS to avoid the need to call pkg-config.
32605See the pkg-config man page for more details.
32606
32607To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32608See \`config.log' for more details" "$LINENO" 5 ; }
32609else
32610	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32611	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32613$as_echo "yes" >&6; }
32614	:
32615fi
32616
32617fi
32618
32619if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32620    # Extract the first word of "llvm-config", so it can be a program name with args.
32621set dummy llvm-config; ac_word=$2
32622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32623$as_echo_n "checking for $ac_word... " >&6; }
32624if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32625  $as_echo_n "(cached) " >&6
32626else
32627  if test -n "$LLVM_CONFIG"; then
32628  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32629else
32630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32631for as_dir in $PATH
32632do
32633  IFS=$as_save_IFS
32634  test -z "$as_dir" && as_dir=.
32635    for ac_exec_ext in '' $ac_executable_extensions; do
32636  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32637    ac_cv_prog_LLVM_CONFIG="llvm-config"
32638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32639    break 2
32640  fi
32641done
32642  done
32643IFS=$as_save_IFS
32644
32645fi
32646fi
32647LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32648if test -n "$LLVM_CONFIG"; then
32649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32650$as_echo "$LLVM_CONFIG" >&6; }
32651else
32652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32653$as_echo "no" >&6; }
32654fi
32655
32656
32657
32658    if test "x$LLVM_CONFIG" != xllvm-config; then
32659        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32660    fi
32661
32662    llvm_components="jit mcjit engine nativecodegen native"
32663    unset LLVM_CFLAGS
32664    for flag in $("$LLVM_CONFIG" --cxxflags); do
32665      if echo "${flag}" | grep -q '^-[ID]'; then
32666        if test "${flag}" != "-D_DEBUG" ; then
32667          if test "${LLVM_CFLAGS}" != "" ; then
32668            LLVM_CFLAGS="${LLVM_CFLAGS} "
32669          fi
32670          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32671        fi
32672      fi
32673    done
32674    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32675    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32676
32677    unset LLVM_LDFLAGS
32678    for flag in $("${LLVM_CONFIG}" --ldflags); do
32679      if echo "${flag}" | grep -q '^-L'; then
32680        if test "${LLVM_LDFLAGS}" != ""; then
32681          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32682        fi
32683        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32684      fi
32685    done
32686
32687    unset LLVM_LIBS
32688    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32689      if echo "${flag}" | grep -q '^-l'; then
32690        if test "${LLVM_LIBS}" != ""; then
32691          LLVM_LIBS="${LLVM_LIBS} "
32692        fi
32693        LLVM_LIBS="${LLVM_LIBS}${flag}"
32694      fi
32695    done
32696
32697
32698
32699
32700fi
32701
32702# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32703if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32704    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32705fi
32706
32707# TODO better (platform agnostic) test
32708if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32709    LIBCXX="-lstdc++"
32710fi
32711
32712
32713
32714
32715
32716# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32717
32718# When using cygwin or msys, we need a wrapper binary that renames
32719# /cygdrive/c/ arguments into c:/ arguments and peeks into
32720# @files and rewrites these too! This wrapper binary is
32721# called fixpath.
32722FIXPATH=
32723if test "x$OPENJDK_BUILD_OS" = xwindows; then
32724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32725$as_echo_n "checking if fixpath can be created... " >&6; }
32726    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32727    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32728    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32729      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32730      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32731      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32732      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32733    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32734      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32735      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32736
32737      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32738      # @ was chosen as separator to minimize risk of other tools messing around with it
32739      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32740      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32741
32742      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32743    fi
32744    rm -f $OUTPUT_ROOT/fixpath*
32745    cd $OUTPUT_ROOT
32746    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32747    cd $CURDIR
32748
32749    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32751$as_echo "no" >&6; }
32752        cat $OUTPUT_ROOT/fixpath1.log
32753        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32754    fi
32755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32756$as_echo "yes" >&6; }
32757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32758$as_echo_n "checking if fixpath.exe works... " >&6; }
32759    cd $OUTPUT_ROOT
32760    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32761    cd $CURDIR
32762    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32764$as_echo "no" >&6; }
32765        cat $OUTPUT_ROOT/fixpath2.log
32766        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32767    fi
32768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32769$as_echo "yes" >&6; }
32770    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32771fi
32772
32773
32774
32775
32776###############################################################################
32777#
32778# We need to do some final tweaking, when everything else is done.
32779#
32780###############################################################################
32781
32782
32783HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32784
32785
32786# The name of the Service Agent jar.
32787SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32788if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32789  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32790fi
32791
32792
32793
32794
32795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32796$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32797
32798if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32799    ENABLE_INTREE_EC=yes
32800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32801$as_echo "yes" >&6; }
32802else
32803    ENABLE_INTREE_EC=no
32804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32805$as_echo "no" >&6; }
32806fi
32807
32808
32809
32810
32811###############################################################################
32812#
32813# Configure parts of the build that only affect the build performance,
32814# not the result.
32815#
32816###############################################################################
32817
32818
32819  # How many cores do we have on this build system?
32820
32821# Check whether --with-num-cores was given.
32822if test "${with_num_cores+set}" = set; then :
32823  withval=$with_num_cores;
32824fi
32825
32826  if test "x$with_num_cores" = x; then
32827    # The number of cores were not specified, try to probe them.
32828
32829    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32830$as_echo_n "checking for number of cores... " >&6; }
32831    NUM_CORES=1
32832    FOUND_CORES=no
32833
32834    if test -f /proc/cpuinfo; then
32835        # Looks like a Linux (or cygwin) system
32836        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32837        FOUND_CORES=yes
32838    elif test -x /usr/sbin/psrinfo; then
32839        # Looks like a Solaris system
32840        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32841        FOUND_CORES=yes
32842    elif test -x /usr/sbin/system_profiler; then
32843        # Looks like a MacOSX system
32844        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32845        FOUND_CORES=yes
32846    elif test -n "$NUMBER_OF_PROCESSORS"; then
32847        # On windows, look in the env
32848        NUM_CORES=$NUMBER_OF_PROCESSORS
32849        FOUND_CORES=yes
32850    fi
32851
32852    if test "x$FOUND_CORES" = xyes; then
32853        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32854$as_echo "$NUM_CORES" >&6; }
32855    else
32856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32857$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32858        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32859$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32860    fi
32861
32862
32863  else
32864    NUM_CORES=$with_num_cores
32865  fi
32866
32867
32868
32869  # How much memory do we have on this build system?
32870
32871# Check whether --with-memory-size was given.
32872if test "${with_memory_size+set}" = set; then :
32873  withval=$with_memory_size;
32874fi
32875
32876  if test "x$with_memory_size" = x; then
32877    # The memory size was not specified, try to probe it.
32878
32879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32880$as_echo_n "checking for memory size... " >&6; }
32881    # Default to 1024 MB
32882    MEMORY_SIZE=1024
32883    FOUND_MEM=no
32884
32885    if test -f /proc/meminfo; then
32886        # Looks like a Linux (or cygwin) system
32887        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32888        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32889        FOUND_MEM=yes
32890    elif test -x /usr/sbin/prtconf; then
32891        # Looks like a Solaris system
32892        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32893        FOUND_MEM=yes
32894    elif test -x /usr/sbin/system_profiler; then
32895        # Looks like a MacOSX system
32896        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32897        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32898        FOUND_MEM=yes
32899    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32900        # Windows, but without cygwin
32901        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32902        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32903        FOUND_MEM=yes
32904    fi
32905
32906    if test "x$FOUND_MEM" = xyes; then
32907        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32908$as_echo "$MEMORY_SIZE MB" >&6; }
32909    else
32910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32911$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32912        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32913$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32914    fi
32915
32916  else
32917    MEMORY_SIZE=$with_memory_size
32918  fi
32919
32920
32921
32922  # Provide a decent default number of parallel jobs for make depending on
32923  # number of cores, amount of memory and machine architecture.
32924
32925# Check whether --with-jobs was given.
32926if test "${with_jobs+set}" = set; then :
32927  withval=$with_jobs;
32928fi
32929
32930  if test "x$with_jobs" = x; then
32931    # Number of jobs was not specified, calculate.
32932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32933$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32934    # Approximate memory in GB, rounding up a bit.
32935    memory_gb=`expr $MEMORY_SIZE / 1100`
32936    # Pick the lowest of memory in gb and number of cores.
32937    if test "$memory_gb" -lt "$NUM_CORES"; then
32938      JOBS="$memory_gb"
32939    else
32940      JOBS="$NUM_CORES"
32941      # On bigger machines, leave some room for other processes to run
32942      if test "$JOBS" -gt "4"; then
32943        JOBS=`expr $JOBS '*' 90 / 100`
32944      fi
32945    fi
32946    # Cap number of jobs to 16
32947    if test "$JOBS" -gt "16"; then
32948      JOBS=16
32949    fi
32950    if test "$JOBS" -eq "0"; then
32951      JOBS=1
32952    fi
32953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32954$as_echo "$JOBS" >&6; }
32955  else
32956    JOBS=$with_jobs
32957  fi
32958
32959
32960
32961# Setup smart javac (after cores and memory have been setup)
32962
32963
32964# Check whether --with-sjavac-server-java was given.
32965if test "${with_sjavac_server_java+set}" = set; then :
32966  withval=$with_sjavac_server_java;
32967fi
32968
32969
32970if test "x$with_sjavac_server_java" != x; then
32971    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32972    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32973    if test "x$FOUND_VERSION" = x; then
32974        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32975    fi
32976else
32977    SJAVAC_SERVER_JAVA=""
32978    # Hotspot specific options.
32979
32980    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32981    $ECHO "Command: $JAVA -verbosegc -version" >&5
32982    OUTPUT=`$JAVA -verbosegc -version 2>&1`
32983    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32984    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32985    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32986        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32987	JVM_ARG_OK=true
32988    else
32989	$ECHO "Arg failed:" >&5
32990	$ECHO "$OUTPUT" >&5
32991	JVM_ARG_OK=false
32992    fi
32993
32994    # JRockit specific options.
32995
32996    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32997    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32998    OUTPUT=`$JAVA -Xverbose:gc -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 -Xverbose:gc"
33003	JVM_ARG_OK=true
33004    else
33005	$ECHO "Arg failed:" >&5
33006	$ECHO "$OUTPUT" >&5
33007	JVM_ARG_OK=false
33008    fi
33009
33010    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33011fi
33012
33013
33014if test "$MEMORY_SIZE" -gt "2500"; then
33015
33016    $ECHO "Check if jvm arg is ok: -d64" >&5
33017    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33018    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33019    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33020    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33021    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33022        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33023	JVM_ARG_OK=true
33024    else
33025	$ECHO "Arg failed:" >&5
33026	$ECHO "$OUTPUT" >&5
33027	JVM_ARG_OK=false
33028    fi
33029
33030    if test "$JVM_ARG_OK" = true; then
33031        JVM_64BIT=true
33032	JVM_ARG_OK=false
33033    fi
33034    fi
33035
33036if test "$JVM_64BIT" = true; then
33037    if test "$MEMORY_SIZE" -gt "17000"; then
33038
33039    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33040    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33041    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33042    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33043    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33044    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33045        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33046	JVM_ARG_OK=true
33047    else
33048	$ECHO "Arg failed:" >&5
33049	$ECHO "$OUTPUT" >&5
33050	JVM_ARG_OK=false
33051    fi
33052
33053    fi
33054    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33055
33056    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33057    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33058    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33059    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33060    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33061    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33062        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33063	JVM_ARG_OK=true
33064    else
33065	$ECHO "Arg failed:" >&5
33066	$ECHO "$OUTPUT" >&5
33067	JVM_ARG_OK=false
33068    fi
33069
33070    fi
33071    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33072
33073    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33074    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33075    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33076    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33077    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33078    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33079        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33080	JVM_ARG_OK=true
33081    else
33082	$ECHO "Arg failed:" >&5
33083	$ECHO "$OUTPUT" >&5
33084	JVM_ARG_OK=false
33085    fi
33086
33087    fi
33088    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33089
33090    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33091    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33092    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33093    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33094    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33095    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33096        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33097	JVM_ARG_OK=true
33098    else
33099	$ECHO "Arg failed:" >&5
33100	$ECHO "$OUTPUT" >&5
33101	JVM_ARG_OK=false
33102    fi
33103
33104    fi
33105fi
33106if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33107
33108    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33109    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33110    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33111    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33112    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33113    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33114        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33115	JVM_ARG_OK=true
33116    else
33117	$ECHO "Arg failed:" >&5
33118	$ECHO "$OUTPUT" >&5
33119	JVM_ARG_OK=false
33120    fi
33121
33122fi
33123if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33124
33125    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33126    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33127    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33128    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33129    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33130    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33131        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33132	JVM_ARG_OK=true
33133    else
33134	$ECHO "Arg failed:" >&5
33135	$ECHO "$OUTPUT" >&5
33136	JVM_ARG_OK=false
33137    fi
33138
33139fi
33140if test "$JVM_ARG_OK" = false; then
33141
33142    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33143    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33144    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33145    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33146    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33147    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33148        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33149	JVM_ARG_OK=true
33150    else
33151	$ECHO "Arg failed:" >&5
33152	$ECHO "$OUTPUT" >&5
33153	JVM_ARG_OK=false
33154    fi
33155
33156fi
33157
33158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33159$as_echo_n "checking whether to use sjavac... " >&6; }
33160# Check whether --enable-sjavac was given.
33161if test "${enable_sjavac+set}" = set; then :
33162  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33163else
33164  ENABLE_SJAVAC='no'
33165fi
33166
33167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33168$as_echo "$ENABLE_SJAVAC" >&6; }
33169
33170
33171if test "x$ENABLE_SJAVAC" = xyes; then
33172    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33173else
33174    SJAVAC_SERVER_DIR=
33175fi
33176
33177
33178
33179
33180# Can the C/C++ compiler use precompiled headers?
33181
33182
33183###############################################################################
33184#
33185# Can the C/C++ compiler use precompiled headers?
33186#
33187# Check whether --enable-precompiled-headers was given.
33188if test "${enable_precompiled_headers+set}" = set; then :
33189  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33190else
33191  ENABLE_PRECOMPH=yes
33192fi
33193
33194
33195USE_PRECOMPILED_HEADER=1
33196if test "x$ENABLE_PRECOMPH" = xno; then
33197    USE_PRECOMPILED_HEADER=0
33198fi
33199
33200if test "x$ENABLE_PRECOMPH" = xyes; then
33201    # Check that the compiler actually supports precomp headers.
33202    if test "x$GCC" = xyes; then
33203         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33204$as_echo_n "checking that precompiled headers work... " >&6; }
33205         echo "int alfa();" > conftest.h
33206         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33207         if test ! -f conftest.hpp.gch; then
33208             USE_PRECOMPILED_HEADER=0
33209             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33210$as_echo "no" >&6; }
33211         else
33212             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33213$as_echo "yes" >&6; }
33214         fi
33215         rm -f conftest.h conftest.hpp.gch
33216    fi
33217fi
33218
33219
33220
33221
33222# Setup use of ccache, if available
33223
33224    # Check whether --enable-ccache was given.
33225if test "${enable_ccache+set}" = set; then :
33226  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33227else
33228  ENABLE_CCACHE=yes
33229fi
33230
33231    if test "x$ENABLE_CCACHE" = xyes; then
33232        OLD_PATH="$PATH"
33233        if test "x$TOOLS_DIR" != x; then
33234          PATH=$TOOLS_DIR:$PATH
33235        fi
33236        # Extract the first word of "ccache", so it can be a program name with args.
33237set dummy ccache; ac_word=$2
33238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33239$as_echo_n "checking for $ac_word... " >&6; }
33240if test "${ac_cv_path_CCACHE+set}" = set; then :
33241  $as_echo_n "(cached) " >&6
33242else
33243  case $CCACHE in
33244  [\\/]* | ?:[\\/]*)
33245  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33246  ;;
33247  *)
33248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33249for as_dir in $PATH
33250do
33251  IFS=$as_save_IFS
33252  test -z "$as_dir" && as_dir=.
33253    for ac_exec_ext in '' $ac_executable_extensions; do
33254  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33255    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33257    break 2
33258  fi
33259done
33260  done
33261IFS=$as_save_IFS
33262
33263  ;;
33264esac
33265fi
33266CCACHE=$ac_cv_path_CCACHE
33267if test -n "$CCACHE"; then
33268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33269$as_echo "$CCACHE" >&6; }
33270else
33271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33272$as_echo "no" >&6; }
33273fi
33274
33275
33276        PATH="$OLD_PATH"
33277    else
33278        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33279$as_echo_n "checking for ccache... " >&6; }
33280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33281$as_echo "explicitly disabled" >&6; }
33282        CCACHE=
33283    fi
33284
33285
33286
33287# Check whether --with-ccache-dir was given.
33288if test "${with_ccache_dir+set}" = set; then :
33289  withval=$with_ccache_dir;
33290fi
33291
33292
33293    if test "x$with_ccache_dir" != x; then
33294        # When using a non home ccache directory, assume the use is to share ccache files
33295        # with other users. Thus change the umask.
33296        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33297    fi
33298    CCACHE_FOUND=""
33299    if test "x$CCACHE" != x; then
33300
33301    if test "x$CCACHE" != x; then
33302        CCACHE_FOUND="true"
33303        # Only use ccache if it is 3.1.4 or later, which supports
33304        # precompiled headers.
33305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33306$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33307        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33308        if test "x$HAS_GOOD_CCACHE" = x; then
33309            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33310$as_echo "no, disabling ccache" >&6; }
33311            CCACHE=
33312        else
33313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33314$as_echo "yes" >&6; }
33315            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33316$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33317            PUSHED_FLAGS="$CXXFLAGS"
33318            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33319            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33320/* end confdefs.h.  */
33321
33322int
33323main ()
33324{
33325
33326  ;
33327  return 0;
33328}
33329_ACEOF
33330if ac_fn_cxx_try_compile "$LINENO"; then :
33331  CC_KNOWS_CCACHE_TRICK=yes
33332else
33333  CC_KNOWS_CCACHE_TRICK=no
33334fi
33335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33336            CXXFLAGS="$PUSHED_FLAGS"
33337            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33338                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33339$as_echo "yes" >&6; }
33340            else
33341                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33342$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33343                CCACHE=
33344            fi
33345        fi
33346    fi
33347
33348    if test "x$CCACHE" != x; then
33349        CCACHE_SLOPPINESS=time_macros
33350        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33351        CCACHE_FLAGS=-fpch-preprocess
33352
33353        if test "x$SET_CCACHE_DIR" != x; then
33354            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33355	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33356        fi
33357    fi
33358
33359    fi
33360
33361
33362###############################################################################
33363#
33364# And now the finish...
33365#
33366###############################################################################
33367
33368# Check for some common pitfalls
33369
33370  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33371    file_to_test="$SRC_ROOT/LICENSE"
33372    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33373      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
33374    fi
33375  fi
33376
33377
33378
33379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33380$as_echo_n "checking if build directory is on local disk... " >&6; }
33381
33382	# df -l lists only local disks; if the given directory is not found then
33383	# a non-zero exit code is given
33384  if test "x$DF" = x; then
33385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33386      # msys does not have df; use Windows "net use" instead.
33387      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33388      if test "x$IS_NETWORK_DISK" = x; then
33389        OUTPUT_DIR_IS_LOCAL="yes"
33390      else
33391        OUTPUT_DIR_IS_LOCAL="no"
33392      fi
33393    else
33394      # No df here, say it's local
33395      OUTPUT_DIR_IS_LOCAL="yes"
33396    fi
33397  else
33398    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33399      OUTPUT_DIR_IS_LOCAL="yes"
33400    else
33401      OUTPUT_DIR_IS_LOCAL="no"
33402    fi
33403  fi
33404
33405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33406$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33407
33408
33409
33410# Check if the user has any old-style ALT_ variables set.
33411FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33412
33413# Before generating output files, test if they exist. If they do, this is a reconfigure.
33414# Since we can't properly handle the dependencies for this, warn the user about the situation
33415if test -e $OUTPUT_ROOT/spec.gmk; then
33416  IS_RECONFIGURE=yes
33417else
33418  IS_RECONFIGURE=no
33419fi
33420
33421if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33422  HIDE_PERFORMANCE_HINTS=yes
33423else
33424  HIDE_PERFORMANCE_HINTS=no
33425  # Hide it the next time around...
33426  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33427fi
33428
33429
33430
33431# At the end, call the custom hook. (Dummy macro if no custom sources available)
33432
33433
33434# We're messing a bit with internal autoconf variables to put the config.status
33435# in the output directory instead of the current directory.
33436CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33437# Create the actual output files. Now the main work of configure is done.
33438cat >confcache <<\_ACEOF
33439# This file is a shell script that caches the results of configure
33440# tests run on this system so they can be shared between configure
33441# scripts and configure runs, see configure's option --config-cache.
33442# It is not useful on other systems.  If it contains results you don't
33443# want to keep, you may remove or edit it.
33444#
33445# config.status only pays attention to the cache file if you give it
33446# the --recheck option to rerun configure.
33447#
33448# `ac_cv_env_foo' variables (set or unset) will be overridden when
33449# loading this file, other *unset* `ac_cv_foo' will be assigned the
33450# following values.
33451
33452_ACEOF
33453
33454# The following way of writing the cache mishandles newlines in values,
33455# but we know of no workaround that is simple, portable, and efficient.
33456# So, we kill variables containing newlines.
33457# Ultrix sh set writes to stderr and can't be redirected directly,
33458# and sets the high bit in the cache file unless we assign to the vars.
33459(
33460  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33461    eval ac_val=\$$ac_var
33462    case $ac_val in #(
33463    *${as_nl}*)
33464      case $ac_var in #(
33465      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33467      esac
33468      case $ac_var in #(
33469      _ | IFS | as_nl) ;; #(
33470      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33471      *) { eval $ac_var=; unset $ac_var;} ;;
33472      esac ;;
33473    esac
33474  done
33475
33476  (set) 2>&1 |
33477    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33478    *${as_nl}ac_space=\ *)
33479      # `set' does not quote correctly, so add quotes: double-quote
33480      # substitution turns \\\\ into \\, and sed turns \\ into \.
33481      sed -n \
33482	"s/'/'\\\\''/g;
33483	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33484      ;; #(
33485    *)
33486      # `set' quotes correctly as required by POSIX, so do not add quotes.
33487      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33488      ;;
33489    esac |
33490    sort
33491) |
33492  sed '
33493     /^ac_cv_env_/b end
33494     t clear
33495     :clear
33496     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33497     t end
33498     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33499     :end' >>confcache
33500if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33501  if test -w "$cache_file"; then
33502    test "x$cache_file" != "x/dev/null" &&
33503      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33504$as_echo "$as_me: updating cache $cache_file" >&6;}
33505    cat confcache >$cache_file
33506  else
33507    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33508$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33509  fi
33510fi
33511rm -f confcache
33512
33513test "x$prefix" = xNONE && prefix=$ac_default_prefix
33514# Let make expand exec_prefix.
33515test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33516
33517DEFS=-DHAVE_CONFIG_H
33518
33519ac_libobjs=
33520ac_ltlibobjs=
33521U=
33522for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33523  # 1. Remove the extension, and $U if already installed.
33524  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33525  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33526  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33527  #    will be set to the directory where LIBOBJS objects are built.
33528  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33529  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33530done
33531LIBOBJS=$ac_libobjs
33532
33533LTLIBOBJS=$ac_ltlibobjs
33534
33535
33536
33537: ${CONFIG_STATUS=./config.status}
33538ac_write_fail=0
33539ac_clean_files_save=$ac_clean_files
33540ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33541{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33542$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33543as_write_fail=0
33544cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33545#! $SHELL
33546# Generated by $as_me.
33547# Run this file to recreate the current configuration.
33548# Compiler output produced by configure, useful for debugging
33549# configure, is in config.log if it exists.
33550
33551debug=false
33552ac_cs_recheck=false
33553ac_cs_silent=false
33554
33555SHELL=\${CONFIG_SHELL-$SHELL}
33556export SHELL
33557_ASEOF
33558cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33559## -------------------- ##
33560## M4sh Initialization. ##
33561## -------------------- ##
33562
33563# Be more Bourne compatible
33564DUALCASE=1; export DUALCASE # for MKS sh
33565if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33566  emulate sh
33567  NULLCMD=:
33568  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33569  # is contrary to our usage.  Disable this feature.
33570  alias -g '${1+"$@"}'='"$@"'
33571  setopt NO_GLOB_SUBST
33572else
33573  case `(set -o) 2>/dev/null` in #(
33574  *posix*) :
33575    set -o posix ;; #(
33576  *) :
33577     ;;
33578esac
33579fi
33580
33581
33582as_nl='
33583'
33584export as_nl
33585# Printing a long string crashes Solaris 7 /usr/bin/printf.
33586as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33587as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33588as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33589# Prefer a ksh shell builtin over an external printf program on Solaris,
33590# but without wasting forks for bash or zsh.
33591if test -z "$BASH_VERSION$ZSH_VERSION" \
33592    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33593  as_echo='print -r --'
33594  as_echo_n='print -rn --'
33595elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33596  as_echo='printf %s\n'
33597  as_echo_n='printf %s'
33598else
33599  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33600    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33601    as_echo_n='/usr/ucb/echo -n'
33602  else
33603    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33604    as_echo_n_body='eval
33605      arg=$1;
33606      case $arg in #(
33607      *"$as_nl"*)
33608	expr "X$arg" : "X\\(.*\\)$as_nl";
33609	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33610      esac;
33611      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33612    '
33613    export as_echo_n_body
33614    as_echo_n='sh -c $as_echo_n_body as_echo'
33615  fi
33616  export as_echo_body
33617  as_echo='sh -c $as_echo_body as_echo'
33618fi
33619
33620# The user is always right.
33621if test "${PATH_SEPARATOR+set}" != set; then
33622  PATH_SEPARATOR=:
33623  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33624    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33625      PATH_SEPARATOR=';'
33626  }
33627fi
33628
33629
33630# IFS
33631# We need space, tab and new line, in precisely that order.  Quoting is
33632# there to prevent editors from complaining about space-tab.
33633# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33634# splitting by setting IFS to empty value.)
33635IFS=" ""	$as_nl"
33636
33637# Find who we are.  Look in the path if we contain no directory separator.
33638case $0 in #((
33639  *[\\/]* ) as_myself=$0 ;;
33640  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33641for as_dir in $PATH
33642do
33643  IFS=$as_save_IFS
33644  test -z "$as_dir" && as_dir=.
33645    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33646  done
33647IFS=$as_save_IFS
33648
33649     ;;
33650esac
33651# We did not find ourselves, most probably we were run as `sh COMMAND'
33652# in which case we are not to be found in the path.
33653if test "x$as_myself" = x; then
33654  as_myself=$0
33655fi
33656if test ! -f "$as_myself"; then
33657  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33658  exit 1
33659fi
33660
33661# Unset variables that we do not need and which cause bugs (e.g. in
33662# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33663# suppresses any "Segmentation fault" message there.  '((' could
33664# trigger a bug in pdksh 5.2.14.
33665for as_var in BASH_ENV ENV MAIL MAILPATH
33666do eval test x\${$as_var+set} = xset \
33667  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33668done
33669PS1='$ '
33670PS2='> '
33671PS4='+ '
33672
33673# NLS nuisances.
33674LC_ALL=C
33675export LC_ALL
33676LANGUAGE=C
33677export LANGUAGE
33678
33679# CDPATH.
33680(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33681
33682
33683# as_fn_error STATUS ERROR [LINENO LOG_FD]
33684# ----------------------------------------
33685# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33686# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33687# script with STATUS, using 1 if that was 0.
33688as_fn_error ()
33689{
33690  as_status=$1; test $as_status -eq 0 && as_status=1
33691  if test "$4"; then
33692    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33693    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33694  fi
33695  $as_echo "$as_me: error: $2" >&2
33696  as_fn_exit $as_status
33697} # as_fn_error
33698
33699
33700# as_fn_set_status STATUS
33701# -----------------------
33702# Set $? to STATUS, without forking.
33703as_fn_set_status ()
33704{
33705  return $1
33706} # as_fn_set_status
33707
33708# as_fn_exit STATUS
33709# -----------------
33710# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33711as_fn_exit ()
33712{
33713  set +e
33714  as_fn_set_status $1
33715  exit $1
33716} # as_fn_exit
33717
33718# as_fn_unset VAR
33719# ---------------
33720# Portably unset VAR.
33721as_fn_unset ()
33722{
33723  { eval $1=; unset $1;}
33724}
33725as_unset=as_fn_unset
33726# as_fn_append VAR VALUE
33727# ----------------------
33728# Append the text in VALUE to the end of the definition contained in VAR. Take
33729# advantage of any shell optimizations that allow amortized linear growth over
33730# repeated appends, instead of the typical quadratic growth present in naive
33731# implementations.
33732if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33733  eval 'as_fn_append ()
33734  {
33735    eval $1+=\$2
33736  }'
33737else
33738  as_fn_append ()
33739  {
33740    eval $1=\$$1\$2
33741  }
33742fi # as_fn_append
33743
33744# as_fn_arith ARG...
33745# ------------------
33746# Perform arithmetic evaluation on the ARGs, and store the result in the
33747# global $as_val. Take advantage of shells that can avoid forks. The arguments
33748# must be portable across $(()) and expr.
33749if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33750  eval 'as_fn_arith ()
33751  {
33752    as_val=$(( $* ))
33753  }'
33754else
33755  as_fn_arith ()
33756  {
33757    as_val=`expr "$@" || test $? -eq 1`
33758  }
33759fi # as_fn_arith
33760
33761
33762if expr a : '\(a\)' >/dev/null 2>&1 &&
33763   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33764  as_expr=expr
33765else
33766  as_expr=false
33767fi
33768
33769if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33770  as_basename=basename
33771else
33772  as_basename=false
33773fi
33774
33775if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33776  as_dirname=dirname
33777else
33778  as_dirname=false
33779fi
33780
33781as_me=`$as_basename -- "$0" ||
33782$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33783	 X"$0" : 'X\(//\)$' \| \
33784	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33785$as_echo X/"$0" |
33786    sed '/^.*\/\([^/][^/]*\)\/*$/{
33787	    s//\1/
33788	    q
33789	  }
33790	  /^X\/\(\/\/\)$/{
33791	    s//\1/
33792	    q
33793	  }
33794	  /^X\/\(\/\).*/{
33795	    s//\1/
33796	    q
33797	  }
33798	  s/.*/./; q'`
33799
33800# Avoid depending upon Character Ranges.
33801as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33802as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33803as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33804as_cr_digits='0123456789'
33805as_cr_alnum=$as_cr_Letters$as_cr_digits
33806
33807ECHO_C= ECHO_N= ECHO_T=
33808case `echo -n x` in #(((((
33809-n*)
33810  case `echo 'xy\c'` in
33811  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33812  xy)  ECHO_C='\c';;
33813  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33814       ECHO_T='	';;
33815  esac;;
33816*)
33817  ECHO_N='-n';;
33818esac
33819
33820rm -f conf$$ conf$$.exe conf$$.file
33821if test -d conf$$.dir; then
33822  rm -f conf$$.dir/conf$$.file
33823else
33824  rm -f conf$$.dir
33825  mkdir conf$$.dir 2>/dev/null
33826fi
33827if (echo >conf$$.file) 2>/dev/null; then
33828  if ln -s conf$$.file conf$$ 2>/dev/null; then
33829    as_ln_s='ln -s'
33830    # ... but there are two gotchas:
33831    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33832    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33833    # In both cases, we have to default to `cp -p'.
33834    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33835      as_ln_s='cp -p'
33836  elif ln conf$$.file conf$$ 2>/dev/null; then
33837    as_ln_s=ln
33838  else
33839    as_ln_s='cp -p'
33840  fi
33841else
33842  as_ln_s='cp -p'
33843fi
33844rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33845rmdir conf$$.dir 2>/dev/null
33846
33847
33848# as_fn_mkdir_p
33849# -------------
33850# Create "$as_dir" as a directory, including parents if necessary.
33851as_fn_mkdir_p ()
33852{
33853
33854  case $as_dir in #(
33855  -*) as_dir=./$as_dir;;
33856  esac
33857  test -d "$as_dir" || eval $as_mkdir_p || {
33858    as_dirs=
33859    while :; do
33860      case $as_dir in #(
33861      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33862      *) as_qdir=$as_dir;;
33863      esac
33864      as_dirs="'$as_qdir' $as_dirs"
33865      as_dir=`$as_dirname -- "$as_dir" ||
33866$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33867	 X"$as_dir" : 'X\(//\)[^/]' \| \
33868	 X"$as_dir" : 'X\(//\)$' \| \
33869	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33870$as_echo X"$as_dir" |
33871    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33872	    s//\1/
33873	    q
33874	  }
33875	  /^X\(\/\/\)[^/].*/{
33876	    s//\1/
33877	    q
33878	  }
33879	  /^X\(\/\/\)$/{
33880	    s//\1/
33881	    q
33882	  }
33883	  /^X\(\/\).*/{
33884	    s//\1/
33885	    q
33886	  }
33887	  s/.*/./; q'`
33888      test -d "$as_dir" && break
33889    done
33890    test -z "$as_dirs" || eval "mkdir $as_dirs"
33891  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33892
33893
33894} # as_fn_mkdir_p
33895if mkdir -p . 2>/dev/null; then
33896  as_mkdir_p='mkdir -p "$as_dir"'
33897else
33898  test -d ./-p && rmdir ./-p
33899  as_mkdir_p=false
33900fi
33901
33902if test -x / >/dev/null 2>&1; then
33903  as_test_x='test -x'
33904else
33905  if ls -dL / >/dev/null 2>&1; then
33906    as_ls_L_option=L
33907  else
33908    as_ls_L_option=
33909  fi
33910  as_test_x='
33911    eval sh -c '\''
33912      if test -d "$1"; then
33913	test -d "$1/.";
33914      else
33915	case $1 in #(
33916	-*)set "./$1";;
33917	esac;
33918	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
33919	???[sx]*):;;*)false;;esac;fi
33920    '\'' sh
33921  '
33922fi
33923as_executable_p=$as_test_x
33924
33925# Sed expression to map a string onto a valid CPP name.
33926as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33927
33928# Sed expression to map a string onto a valid variable name.
33929as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33930
33931
33932exec 6>&1
33933## ----------------------------------- ##
33934## Main body of $CONFIG_STATUS script. ##
33935## ----------------------------------- ##
33936_ASEOF
33937test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33938
33939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33940# Save the log message, to keep $0 and so on meaningful, and to
33941# report actual input values of CONFIG_FILES etc. instead of their
33942# values after options handling.
33943ac_log="
33944This file was extended by OpenJDK $as_me jdk8, which was
33945generated by GNU Autoconf 2.67.  Invocation command line was
33946
33947  CONFIG_FILES    = $CONFIG_FILES
33948  CONFIG_HEADERS  = $CONFIG_HEADERS
33949  CONFIG_LINKS    = $CONFIG_LINKS
33950  CONFIG_COMMANDS = $CONFIG_COMMANDS
33951  $ $0 $@
33952
33953on `(hostname || uname -n) 2>/dev/null | sed 1q`
33954"
33955
33956_ACEOF
33957
33958case $ac_config_files in *"
33959"*) set x $ac_config_files; shift; ac_config_files=$*;;
33960esac
33961
33962case $ac_config_headers in *"
33963"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33964esac
33965
33966
33967cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33968# Files that config.status was made for.
33969config_files="$ac_config_files"
33970config_headers="$ac_config_headers"
33971
33972_ACEOF
33973
33974cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33975ac_cs_usage="\
33976\`$as_me' instantiates files and other configuration actions
33977from templates according to the current configuration.  Unless the files
33978and actions are specified as TAGs, all are instantiated by default.
33979
33980Usage: $0 [OPTION]... [TAG]...
33981
33982  -h, --help       print this help, then exit
33983  -V, --version    print version number and configuration settings, then exit
33984      --config     print configuration, then exit
33985  -q, --quiet, --silent
33986                   do not print progress messages
33987  -d, --debug      don't remove temporary files
33988      --recheck    update $as_me by reconfiguring in the same conditions
33989      --file=FILE[:TEMPLATE]
33990                   instantiate the configuration file FILE
33991      --header=FILE[:TEMPLATE]
33992                   instantiate the configuration header FILE
33993
33994Configuration files:
33995$config_files
33996
33997Configuration headers:
33998$config_headers
33999
34000Report bugs to <build-dev@openjdk.java.net>.
34001OpenJDK home page: <http://openjdk.java.net>."
34002
34003_ACEOF
34004cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34005ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34006ac_cs_version="\\
34007OpenJDK config.status jdk8
34008configured by $0, generated by GNU Autoconf 2.67,
34009  with options \\"\$ac_cs_config\\"
34010
34011Copyright (C) 2010 Free Software Foundation, Inc.
34012This config.status script is free software; the Free Software Foundation
34013gives unlimited permission to copy, distribute and modify it."
34014
34015ac_pwd='$ac_pwd'
34016srcdir='$srcdir'
34017AWK='$AWK'
34018test -n "\$AWK" || AWK=awk
34019_ACEOF
34020
34021cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34022# The default lists apply if the user does not specify any file.
34023ac_need_defaults=:
34024while test $# != 0
34025do
34026  case $1 in
34027  --*=?*)
34028    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34029    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34030    ac_shift=:
34031    ;;
34032  --*=)
34033    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34034    ac_optarg=
34035    ac_shift=:
34036    ;;
34037  *)
34038    ac_option=$1
34039    ac_optarg=$2
34040    ac_shift=shift
34041    ;;
34042  esac
34043
34044  case $ac_option in
34045  # Handling of the options.
34046  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34047    ac_cs_recheck=: ;;
34048  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34049    $as_echo "$ac_cs_version"; exit ;;
34050  --config | --confi | --conf | --con | --co | --c )
34051    $as_echo "$ac_cs_config"; exit ;;
34052  --debug | --debu | --deb | --de | --d | -d )
34053    debug=: ;;
34054  --file | --fil | --fi | --f )
34055    $ac_shift
34056    case $ac_optarg in
34057    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34058    '') as_fn_error $? "missing file argument" ;;
34059    esac
34060    as_fn_append CONFIG_FILES " '$ac_optarg'"
34061    ac_need_defaults=false;;
34062  --header | --heade | --head | --hea )
34063    $ac_shift
34064    case $ac_optarg in
34065    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34066    esac
34067    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34068    ac_need_defaults=false;;
34069  --he | --h)
34070    # Conflict between --help and --header
34071    as_fn_error $? "ambiguous option: \`$1'
34072Try \`$0 --help' for more information.";;
34073  --help | --hel | -h )
34074    $as_echo "$ac_cs_usage"; exit ;;
34075  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34076  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34077    ac_cs_silent=: ;;
34078
34079  # This is an error.
34080  -*) as_fn_error $? "unrecognized option: \`$1'
34081Try \`$0 --help' for more information." ;;
34082
34083  *) as_fn_append ac_config_targets " $1"
34084     ac_need_defaults=false ;;
34085
34086  esac
34087  shift
34088done
34089
34090ac_configure_extra_args=
34091
34092if $ac_cs_silent; then
34093  exec 6>/dev/null
34094  ac_configure_extra_args="$ac_configure_extra_args --silent"
34095fi
34096
34097_ACEOF
34098cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34099if \$ac_cs_recheck; then
34100  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34101  shift
34102  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34103  CONFIG_SHELL='$SHELL'
34104  export CONFIG_SHELL
34105  exec "\$@"
34106fi
34107
34108_ACEOF
34109cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34110exec 5>>config.log
34111{
34112  echo
34113  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34114## Running $as_me. ##
34115_ASBOX
34116  $as_echo "$ac_log"
34117} >&5
34118
34119_ACEOF
34120cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34121_ACEOF
34122
34123cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34124
34125# Handling of arguments.
34126for ac_config_target in $ac_config_targets
34127do
34128  case $ac_config_target in
34129    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34130    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34131    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34132    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34133    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34134    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34135    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34136
34137  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
34138  esac
34139done
34140
34141
34142# If the user did not use the arguments to specify the items to instantiate,
34143# then the envvar interface is used.  Set only those that are not.
34144# We use the long form for the default assignment because of an extremely
34145# bizarre bug on SunOS 4.1.3.
34146if $ac_need_defaults; then
34147  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34148  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34149fi
34150
34151# Have a temporary directory for convenience.  Make it in the build tree
34152# simply because there is no reason against having it here, and in addition,
34153# creating and moving files from /tmp can sometimes cause problems.
34154# Hook for its removal unless debugging.
34155# Note that there is a small window in which the directory will not be cleaned:
34156# after its creation but before its name has been assigned to `$tmp'.
34157$debug ||
34158{
34159  tmp=
34160  trap 'exit_status=$?
34161  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34162' 0
34163  trap 'as_fn_exit 1' 1 2 13 15
34164}
34165# Create a (secure) tmp directory for tmp files.
34166
34167{
34168  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34169  test -n "$tmp" && test -d "$tmp"
34170}  ||
34171{
34172  tmp=./conf$$-$RANDOM
34173  (umask 077 && mkdir "$tmp")
34174} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34175
34176# Set up the scripts for CONFIG_FILES section.
34177# No need to generate them if there are no CONFIG_FILES.
34178# This happens for instance with `./config.status config.h'.
34179if test -n "$CONFIG_FILES"; then
34180
34181
34182ac_cr=`echo X | tr X '\015'`
34183# On cygwin, bash can eat \r inside `` if the user requested igncr.
34184# But we know of no other shell where ac_cr would be empty at this
34185# point, so we can use a bashism as a fallback.
34186if test "x$ac_cr" = x; then
34187  eval ac_cr=\$\'\\r\'
34188fi
34189ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34190if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34191  ac_cs_awk_cr='\\r'
34192else
34193  ac_cs_awk_cr=$ac_cr
34194fi
34195
34196echo 'BEGIN {' >"$tmp/subs1.awk" &&
34197_ACEOF
34198
34199
34200{
34201  echo "cat >conf$$subs.awk <<_ACEOF" &&
34202  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34203  echo "_ACEOF"
34204} >conf$$subs.sh ||
34205  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34206ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34207ac_delim='%!_!# '
34208for ac_last_try in false false false false false :; do
34209  . ./conf$$subs.sh ||
34210    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34211
34212  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34213  if test $ac_delim_n = $ac_delim_num; then
34214    break
34215  elif $ac_last_try; then
34216    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34217  else
34218    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34219  fi
34220done
34221rm -f conf$$subs.sh
34222
34223cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34224cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34225_ACEOF
34226sed -n '
34227h
34228s/^/S["/; s/!.*/"]=/
34229p
34230g
34231s/^[^!]*!//
34232:repl
34233t repl
34234s/'"$ac_delim"'$//
34235t delim
34236:nl
34237h
34238s/\(.\{148\}\)..*/\1/
34239t more1
34240s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34241p
34242n
34243b repl
34244:more1
34245s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34246p
34247g
34248s/.\{148\}//
34249t nl
34250:delim
34251h
34252s/\(.\{148\}\)..*/\1/
34253t more2
34254s/["\\]/\\&/g; s/^/"/; s/$/"/
34255p
34256b
34257:more2
34258s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34259p
34260g
34261s/.\{148\}//
34262t delim
34263' <conf$$subs.awk | sed '
34264/^[^""]/{
34265  N
34266  s/\n//
34267}
34268' >>$CONFIG_STATUS || ac_write_fail=1
34269rm -f conf$$subs.awk
34270cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34271_ACAWK
34272cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34273  for (key in S) S_is_set[key] = 1
34274  FS = ""
34275
34276}
34277{
34278  line = $ 0
34279  nfields = split(line, field, "@")
34280  substed = 0
34281  len = length(field[1])
34282  for (i = 2; i < nfields; i++) {
34283    key = field[i]
34284    keylen = length(key)
34285    if (S_is_set[key]) {
34286      value = S[key]
34287      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34288      len += length(value) + length(field[++i])
34289      substed = 1
34290    } else
34291      len += 1 + keylen
34292  }
34293
34294  print line
34295}
34296
34297_ACAWK
34298_ACEOF
34299cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34300if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34301  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34302else
34303  cat
34304fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34305  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34306_ACEOF
34307
34308# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34309# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34310# trailing colons and then remove the whole line if VPATH becomes empty
34311# (actually we leave an empty line to preserve line numbers).
34312if test "x$srcdir" = x.; then
34313  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34314h
34315s///
34316s/^/:/
34317s/[	 ]*$/:/
34318s/:\$(srcdir):/:/g
34319s/:\${srcdir}:/:/g
34320s/:@srcdir@:/:/g
34321s/^:*//
34322s/:*$//
34323x
34324s/\(=[	 ]*\).*/\1/
34325G
34326s/\n//
34327s/^[^=]*=[	 ]*$//
34328}'
34329fi
34330
34331cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34332fi # test -n "$CONFIG_FILES"
34333
34334# Set up the scripts for CONFIG_HEADERS section.
34335# No need to generate them if there are no CONFIG_HEADERS.
34336# This happens for instance with `./config.status Makefile'.
34337if test -n "$CONFIG_HEADERS"; then
34338cat >"$tmp/defines.awk" <<\_ACAWK ||
34339BEGIN {
34340_ACEOF
34341
34342# Transform confdefs.h into an awk script `defines.awk', embedded as
34343# here-document in config.status, that substitutes the proper values into
34344# config.h.in to produce config.h.
34345
34346# Create a delimiter string that does not exist in confdefs.h, to ease
34347# handling of long lines.
34348ac_delim='%!_!# '
34349for ac_last_try in false false :; do
34350  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34351  if test -z "$ac_t"; then
34352    break
34353  elif $ac_last_try; then
34354    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34355  else
34356    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34357  fi
34358done
34359
34360# For the awk script, D is an array of macro values keyed by name,
34361# likewise P contains macro parameters if any.  Preserve backslash
34362# newline sequences.
34363
34364ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34365sed -n '
34366s/.\{148\}/&'"$ac_delim"'/g
34367t rset
34368:rset
34369s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34370t def
34371d
34372:def
34373s/\\$//
34374t bsnl
34375s/["\\]/\\&/g
34376s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34377D["\1"]=" \3"/p
34378s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34379d
34380:bsnl
34381s/["\\]/\\&/g
34382s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34383D["\1"]=" \3\\\\\\n"\\/p
34384t cont
34385s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34386t cont
34387d
34388:cont
34389n
34390s/.\{148\}/&'"$ac_delim"'/g
34391t clear
34392:clear
34393s/\\$//
34394t bsnlc
34395s/["\\]/\\&/g; s/^/"/; s/$/"/p
34396d
34397:bsnlc
34398s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34399b cont
34400' <confdefs.h | sed '
34401s/'"$ac_delim"'/"\\\
34402"/g' >>$CONFIG_STATUS || ac_write_fail=1
34403
34404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34405  for (key in D) D_is_set[key] = 1
34406  FS = ""
34407}
34408/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34409  line = \$ 0
34410  split(line, arg, " ")
34411  if (arg[1] == "#") {
34412    defundef = arg[2]
34413    mac1 = arg[3]
34414  } else {
34415    defundef = substr(arg[1], 2)
34416    mac1 = arg[2]
34417  }
34418  split(mac1, mac2, "(") #)
34419  macro = mac2[1]
34420  prefix = substr(line, 1, index(line, defundef) - 1)
34421  if (D_is_set[macro]) {
34422    # Preserve the white space surrounding the "#".
34423    print prefix "define", macro P[macro] D[macro]
34424    next
34425  } else {
34426    # Replace #undef with comments.  This is necessary, for example,
34427    # in the case of _POSIX_SOURCE, which is predefined and required
34428    # on some systems where configure will not decide to define it.
34429    if (defundef == "undef") {
34430      print "/*", prefix defundef, macro, "*/"
34431      next
34432    }
34433  }
34434}
34435{ print }
34436_ACAWK
34437_ACEOF
34438cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34439  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34440fi # test -n "$CONFIG_HEADERS"
34441
34442
34443eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34444shift
34445for ac_tag
34446do
34447  case $ac_tag in
34448  :[FHLC]) ac_mode=$ac_tag; continue;;
34449  esac
34450  case $ac_mode$ac_tag in
34451  :[FHL]*:*);;
34452  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34453  :[FH]-) ac_tag=-:-;;
34454  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34455  esac
34456  ac_save_IFS=$IFS
34457  IFS=:
34458  set x $ac_tag
34459  IFS=$ac_save_IFS
34460  shift
34461  ac_file=$1
34462  shift
34463
34464  case $ac_mode in
34465  :L) ac_source=$1;;
34466  :[FH])
34467    ac_file_inputs=
34468    for ac_f
34469    do
34470      case $ac_f in
34471      -) ac_f="$tmp/stdin";;
34472      *) # Look for the file first in the build tree, then in the source tree
34473	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34474	 # because $ac_f cannot contain `:'.
34475	 test -f "$ac_f" ||
34476	   case $ac_f in
34477	   [\\/$]*) false;;
34478	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34479	   esac ||
34480	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34481      esac
34482      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34483      as_fn_append ac_file_inputs " '$ac_f'"
34484    done
34485
34486    # Let's still pretend it is `configure' which instantiates (i.e., don't
34487    # use $as_me), people would be surprised to read:
34488    #    /* config.h.  Generated by config.status.  */
34489    configure_input='Generated from '`
34490	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34491	`' by configure.'
34492    if test x"$ac_file" != x-; then
34493      configure_input="$ac_file.  $configure_input"
34494      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34495$as_echo "$as_me: creating $ac_file" >&6;}
34496    fi
34497    # Neutralize special characters interpreted by sed in replacement strings.
34498    case $configure_input in #(
34499    *\&* | *\|* | *\\* )
34500       ac_sed_conf_input=`$as_echo "$configure_input" |
34501       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34502    *) ac_sed_conf_input=$configure_input;;
34503    esac
34504
34505    case $ac_tag in
34506    *:-:* | *:-) cat >"$tmp/stdin" \
34507      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34508    esac
34509    ;;
34510  esac
34511
34512  ac_dir=`$as_dirname -- "$ac_file" ||
34513$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34514	 X"$ac_file" : 'X\(//\)[^/]' \| \
34515	 X"$ac_file" : 'X\(//\)$' \| \
34516	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34517$as_echo X"$ac_file" |
34518    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34519	    s//\1/
34520	    q
34521	  }
34522	  /^X\(\/\/\)[^/].*/{
34523	    s//\1/
34524	    q
34525	  }
34526	  /^X\(\/\/\)$/{
34527	    s//\1/
34528	    q
34529	  }
34530	  /^X\(\/\).*/{
34531	    s//\1/
34532	    q
34533	  }
34534	  s/.*/./; q'`
34535  as_dir="$ac_dir"; as_fn_mkdir_p
34536  ac_builddir=.
34537
34538case "$ac_dir" in
34539.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34540*)
34541  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34542  # A ".." for each directory in $ac_dir_suffix.
34543  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34544  case $ac_top_builddir_sub in
34545  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34546  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34547  esac ;;
34548esac
34549ac_abs_top_builddir=$ac_pwd
34550ac_abs_builddir=$ac_pwd$ac_dir_suffix
34551# for backward compatibility:
34552ac_top_builddir=$ac_top_build_prefix
34553
34554case $srcdir in
34555  .)  # We are building in place.
34556    ac_srcdir=.
34557    ac_top_srcdir=$ac_top_builddir_sub
34558    ac_abs_top_srcdir=$ac_pwd ;;
34559  [\\/]* | ?:[\\/]* )  # Absolute name.
34560    ac_srcdir=$srcdir$ac_dir_suffix;
34561    ac_top_srcdir=$srcdir
34562    ac_abs_top_srcdir=$srcdir ;;
34563  *) # Relative name.
34564    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34565    ac_top_srcdir=$ac_top_build_prefix$srcdir
34566    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34567esac
34568ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34569
34570
34571  case $ac_mode in
34572  :F)
34573  #
34574  # CONFIG_FILE
34575  #
34576
34577_ACEOF
34578
34579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34580# If the template does not know about datarootdir, expand it.
34581# FIXME: This hack should be removed a few years after 2.60.
34582ac_datarootdir_hack=; ac_datarootdir_seen=
34583ac_sed_dataroot='
34584/datarootdir/ {
34585  p
34586  q
34587}
34588/@datadir@/p
34589/@docdir@/p
34590/@infodir@/p
34591/@localedir@/p
34592/@mandir@/p'
34593case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34594*datarootdir*) ac_datarootdir_seen=yes;;
34595*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34596  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34597$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34598_ACEOF
34599cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34600  ac_datarootdir_hack='
34601  s&@datadir@&$datadir&g
34602  s&@docdir@&$docdir&g
34603  s&@infodir@&$infodir&g
34604  s&@localedir@&$localedir&g
34605  s&@mandir@&$mandir&g
34606  s&\\\${datarootdir}&$datarootdir&g' ;;
34607esac
34608_ACEOF
34609
34610# Neutralize VPATH when `$srcdir' = `.'.
34611# Shell code in configure.ac might set extrasub.
34612# FIXME: do we really want to maintain this feature?
34613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34614ac_sed_extra="$ac_vpsub
34615$extrasub
34616_ACEOF
34617cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34618:t
34619/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34620s|@configure_input@|$ac_sed_conf_input|;t t
34621s&@top_builddir@&$ac_top_builddir_sub&;t t
34622s&@top_build_prefix@&$ac_top_build_prefix&;t t
34623s&@srcdir@&$ac_srcdir&;t t
34624s&@abs_srcdir@&$ac_abs_srcdir&;t t
34625s&@top_srcdir@&$ac_top_srcdir&;t t
34626s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34627s&@builddir@&$ac_builddir&;t t
34628s&@abs_builddir@&$ac_abs_builddir&;t t
34629s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34630$ac_datarootdir_hack
34631"
34632eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34633  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34634
34635test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34636  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34637  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34638  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34639which seems to be undefined.  Please make sure it is defined" >&5
34640$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34641which seems to be undefined.  Please make sure it is defined" >&2;}
34642
34643  rm -f "$tmp/stdin"
34644  case $ac_file in
34645  -) cat "$tmp/out" && rm -f "$tmp/out";;
34646  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34647  esac \
34648  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34649 ;;
34650  :H)
34651  #
34652  # CONFIG_HEADER
34653  #
34654  if test x"$ac_file" != x-; then
34655    {
34656      $as_echo "/* $configure_input  */" \
34657      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34658    } >"$tmp/config.h" \
34659      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34660    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34661      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34662$as_echo "$as_me: $ac_file is unchanged" >&6;}
34663    else
34664      rm -f "$ac_file"
34665      mv "$tmp/config.h" "$ac_file" \
34666	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34667    fi
34668  else
34669    $as_echo "/* $configure_input  */" \
34670      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34671      || as_fn_error $? "could not create -" "$LINENO" 5
34672  fi
34673 ;;
34674
34675
34676  esac
34677
34678done # for ac_tag
34679
34680
34681as_fn_exit 0
34682_ACEOF
34683ac_clean_files=$ac_clean_files_save
34684
34685test $ac_write_fail = 0 ||
34686  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34687
34688
34689# configure is writing to config.log, and then calls config.status.
34690# config.status does its own redirection, appending to config.log.
34691# Unfortunately, on DOS this fails, as config.log is still kept open
34692# by configure, so config.status won't be able to write to it; its
34693# output is simply discarded.  So we exec the FD to /dev/null,
34694# effectively closing config.log, so it can be properly (re)opened and
34695# appended to by config.status.  When coming back to configure, we
34696# need to make the FD available again.
34697if test "$no_create" != yes; then
34698  ac_cs_success=:
34699  ac_config_status_args=
34700  test "$silent" = yes &&
34701    ac_config_status_args="$ac_config_status_args --quiet"
34702  exec 5>/dev/null
34703  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34704  exec 5>>config.log
34705  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34706  # would make configure fail if this is the last instruction.
34707  $ac_cs_success || as_fn_exit 1
34708fi
34709if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34710  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34711$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34712fi
34713
34714
34715# Make the compare script executable
34716$CHMOD +x $OUTPUT_ROOT/compare.sh
34717
34718# Finally output some useful information to the user
34719
34720# Finally output some useful information to the user
34721
34722if test "x$CCACHE_FOUND" != x; then
34723	if  test "x$HAS_GOOD_CCACHE" = x; then
34724		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34725		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34726	else
34727		CCACHE_STATUS="installed and in use"
34728	fi
34729else
34730	if test "x$GCC" = xyes; then
34731		CCACHE_STATUS="not installed (consider installing)"
34732		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34733	else
34734		CCACHE_STATUS="not available for your system"
34735	fi
34736fi
34737
34738printf "\n"
34739printf "====================================================\n"
34740printf "A new configuration has been successfully created in\n"
34741printf "$OUTPUT_ROOT\n"
34742if test "x$CONFIGURE_COMMAND_LINE" != x; then
34743	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34744else
34745	printf "using default settings.\n"
34746fi
34747
34748printf "\n"
34749printf "Configuration summary:\n"
34750printf "* Debug level:    $DEBUG_LEVEL\n"
34751printf "* JDK variant:    $JDK_VARIANT\n"
34752printf "* JVM variants:   $with_jvm_variants\n"
34753printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34754
34755printf "\n"
34756printf "Tools summary:\n"
34757if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34758  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34759fi
34760printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34761printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34762printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34763
34764printf "\n"
34765printf "Build performance summary:\n"
34766printf "* Cores to use:   $JOBS\n"
34767printf "* Memory limit:   $MEMORY_SIZE MB\n"
34768printf "* ccache status:  $CCACHE_STATUS\n"
34769printf "\n"
34770
34771if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34772	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34773	printf "$CCACHE_HELP_MSG\n"
34774
34775    # Print a helpful message on how to acquire the necessary build dependency.
34776    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34777    MISSING_DEPENDENCY=ccache
34778    PKGHANDLER_COMMAND=
34779
34780    case $PKGHANDLER in
34781	apt-get)
34782                apt_help     $MISSING_DEPENDENCY ;;
34783    yum)
34784                yum_help     $MISSING_DEPENDENCY ;;
34785	port)
34786                port_help    $MISSING_DEPENDENCY ;;
34787	pkgutil)
34788                pkgutil_help $MISSING_DEPENDENCY ;;
34789	pkgadd)
34790                pkgadd_help  $MISSING_DEPENDENCY ;;
34791    * )
34792      break ;;
34793    esac
34794
34795    if test "x$PKGHANDLER_COMMAND" != x; then
34796        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34797    fi
34798
34799	printf "$HELP_MSG\n"
34800	printf "\n"
34801fi
34802
34803if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34804	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34805	printf "will result in longer build times.\n"
34806	printf "\n"
34807fi
34808
34809if test "x$FOUND_ALT_VARIABLES" != "x"; then
34810	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34811	printf "These are not respected, and will be ignored. It is recommended\n"
34812	printf "that you clean your environment. The following variables are set:\n"
34813	printf "$FOUND_ALT_VARIABLES\n"
34814	printf "\n"
34815fi
34816
34817if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34818	printf "WARNING: Your build output directory is not on a local disk.\n"
34819	printf "This will severely degrade build performance!\n"
34820	printf "It is recommended that you create an output directory on a local disk,\n"
34821	printf "and run the configure script again from that directory.\n"
34822	printf "\n"
34823fi
34824
34825if test "x$IS_RECONFIGURE" = "xyes"; then
34826	printf "WARNING: The result of this configuration has overridden an older\n"
34827	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34828	printf "proper build. Failure to do so might result in strange build problems.\n"
34829	printf "\n"
34830fi
34831
34832