generated-configure.sh revision 940:81632308f60d
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
641USING_BROKEN_SUSE_LD
642COMPILER_SUPPORTS_TARGET_BITS_FLAG
643ZERO_ARCHFLAG
644LDFLAGS_CXX_JDK
645LDFLAGS_JDKEXE_SUFFIX
646LDFLAGS_JDKLIB_SUFFIX
647LDFLAGS_JDKEXE
648LDFLAGS_JDKLIB
649CXXFLAGS_JDKEXE
650CXXFLAGS_JDKLIB
651CFLAGS_JDKEXE
652CFLAGS_JDKLIB
653MACOSX_VERSION_MIN
654PACKAGE_PATH
655LEGACY_EXTRA_LDFLAGS
656LEGACY_EXTRA_CXXFLAGS
657LEGACY_EXTRA_CFLAGS
658CXX_FLAG_DEPS
659C_FLAG_DEPS
660CXX_O_FLAG_NONE
661CXX_O_FLAG_NORM
662CXX_O_FLAG_HI
663CXX_O_FLAG_HIGHEST
664C_O_FLAG_NONE
665C_O_FLAG_NORM
666C_O_FLAG_HI
667C_O_FLAG_HIGHEST
668POST_MCS_CMD
669POST_STRIP_CMD
670SET_EXECUTABLE_ORIGIN
671SET_SHARED_LIBRARY_ORIGIN
672CXX_FLAG_REORDER
673C_FLAG_REORDER
674SET_SHARED_LIBRARY_MAPFILE
675SET_SHARED_LIBRARY_NAME
676SHARED_LIBRARY_FLAGS
677EXE_SUFFIX
678STATIC_LIBRARY_SUFFIX
679SHARED_LIBRARY_SUFFIX
680LIBRARY_PREFIX
681STATIC_LIBRARY
682SHARED_LIBRARY
683OBJ_SUFFIX
684COMPILER_NAME
685JT_HOME
686JTREGEXE
687LIPO
688ac_ct_OBJDUMP
689OBJDUMP
690ac_ct_OBJCOPY
691OBJCOPY
692MCS
693STRIP
694GNM
695NM
696AS
697CXXCPP
698CPP
699COMPILER_TYPE
700RC_FLAGS
701DUMPBIN
702WINAR
703HOTSPOT_RC
704HOTSPOT_MT
705RC
706MT
707WINLD
708HOTSPOT_LD
709HOTSPOT_CXX
710ARFLAGS
711AR
712LDEXECXX
713LDCXX
714LDEXE
715LD
716ac_ct_OBJC
717OBJCFLAGS
718OBJC
719ac_ct_CXX
720CXXFLAGS
721CXX
722ac_ct_PROPER_COMPILER_CXX
723PROPER_COMPILER_CXX
724POTENTIAL_CXX
725TOOLS_DIR_CXX
726OBJEXT
727EXEEXT
728ac_ct_CC
729CPPFLAGS
730LDFLAGS
731CFLAGS
732CC
733ac_ct_PROPER_COMPILER_CC
734PROPER_COMPILER_CC
735POTENTIAL_CC
736TOOLS_DIR_CC
737BUILD_LD
738BUILD_CXX
739BUILD_CC
740MSVCR_DLL
741DXSDK_INCLUDE_PATH
742DXSDK_LIB_PATH
743VS_PATH
744VS_LIB
745VS_INCLUDE
746CYGWIN_LINK
747AR_OUT_OPTION
748LD_OUT_OPTION
749EXE_OUT_OPTION
750CC_OUT_OPTION
751BUILD_HOTSPOT
752HOTSPOT_DIST
753BUILD_OUTPUT
754OVERRIDE_SRC_ROOT
755ADD_SRC_ROOT
756JDK_TOPDIR
757NASHORN_TOPDIR
758HOTSPOT_TOPDIR
759JAXWS_TOPDIR
760JAXP_TOPDIR
761CORBA_TOPDIR
762LANGTOOLS_TOPDIR
763BOOT_JDK_JVMARGS
764JAVAC_FLAGS
765BOOT_JDK_SOURCETARGET
766BOOT_JDK
767BOOT_TOOLSJAR
768BOOT_RTJAR
769JAVA_CHECK
770JAVAC_CHECK
771COOKED_BUILD_NUMBER
772JDK_VERSION
773COPYRIGHT_YEAR
774MACOSX_BUNDLE_ID_BASE
775MACOSX_BUNDLE_NAME_BASE
776COMPANY_NAME
777JDK_RC_PLATFORM_NAME
778PRODUCT_SUFFIX
779PRODUCT_NAME
780LAUNCHER_NAME
781MILESTONE
782JDK_BUILD_NUMBER
783JDK_UPDATE_VERSION
784JDK_MICRO_VERSION
785JDK_MINOR_VERSION
786JDK_MAJOR_VERSION
787USER_RELEASE_SUFFIX
788COMPRESS_JARS
789UNLIMITED_CRYPTO
790CACERTS_FILE
791TEST_IN_BUILD
792BUILD_HEADLESS
793SUPPORT_HEADFUL
794SUPPORT_HEADLESS
795BDEPS_FTP
796BDEPS_UNZIP
797OS_VERSION_MICRO
798OS_VERSION_MINOR
799OS_VERSION_MAJOR
800PKG_CONFIG
801CODESIGN
802XATTR
803IS_GNU_TIME
804TIME
805STAT
806HG
807READELF
808OTOOL
809LDD
810ZIP
811UNZIP
812FIND_DELETE
813MAKE
814CHECK_TOOLSDIR_MAKE
815CHECK_TOOLSDIR_GMAKE
816CHECK_MAKE
817CHECK_GMAKE
818PKGHANDLER
819OUTPUT_ROOT
820CONF_NAME
821SPEC
822BUILD_VARIANT_RELEASE
823DEBUG_CLASSFILES
824FASTDEBUG
825VARIANT
826DEBUG_LEVEL
827MACOSX_UNIVERSAL
828INCLUDE_SA
829JVM_VARIANT_CORE
830JVM_VARIANT_ZEROSHARK
831JVM_VARIANT_ZERO
832JVM_VARIANT_KERNEL
833JVM_VARIANT_MINIMAL1
834JVM_VARIANT_CLIENT
835JVM_VARIANT_SERVER
836JVM_VARIANTS
837JVM_INTERPRETER
838JDK_VARIANT
839SET_OPENJDK
840BUILD_LOG_WRAPPER
841BUILD_LOG_PREVIOUS
842BUILD_LOG
843SYS_ROOT
844PATH_SEP
845SRC_ROOT
846ZERO_ARCHDEF
847DEFINE_CROSS_COMPILE_ARCH
848LP64
849OPENJDK_TARGET_OS_API_DIR
850OPENJDK_TARGET_CPU_JLI_CFLAGS
851OPENJDK_TARGET_CPU_OSARCH
852OPENJDK_TARGET_CPU_ISADIR
853OPENJDK_TARGET_CPU_LIBDIR
854OPENJDK_TARGET_CPU_LEGACY_LIB
855OPENJDK_TARGET_CPU_LEGACY
856REQUIRED_OS_VERSION
857REQUIRED_OS_NAME
858COMPILE_TYPE
859OPENJDK_TARGET_CPU_ENDIAN
860OPENJDK_TARGET_CPU_BITS
861OPENJDK_TARGET_CPU_ARCH
862OPENJDK_TARGET_CPU
863OPENJDK_TARGET_OS_API
864OPENJDK_TARGET_OS
865OPENJDK_BUILD_CPU_ENDIAN
866OPENJDK_BUILD_CPU_BITS
867OPENJDK_BUILD_CPU_ARCH
868OPENJDK_BUILD_CPU
869OPENJDK_BUILD_OS_API
870OPENJDK_BUILD_OS
871OPENJDK_BUILD_AUTOCONF_NAME
872OPENJDK_TARGET_AUTOCONF_NAME
873target_os
874target_vendor
875target_cpu
876target
877host_os
878host_vendor
879host_cpu
880host
881build_os
882build_vendor
883build_cpu
884build
885SETFILE
886DF
887READLINK
888CYGPATH
889NAWK
890SED
891FGREP
892EGREP
893GREP
894AWK
895XARGS
896WHICH
897WC
898UNIQ
899UNAME
900TR
901TOUCH
902TEE
903TAR
904TAIL
905SORT
906SH
907RM
908PRINTF
909MV
910MKTEMP
911MKDIR
912LS
913LN
914HEAD
915FIND
916FILE
917EXPR
918ECHO
919DIRNAME
920DIFF
921DATE
922CUT
923CPIO
924CP
925COMM
926CMP
927CHMOD
928CAT
929BASH
930BASENAME
931DATE_WHEN_CONFIGURED
932CONFIGURE_COMMAND_LINE
933CUSTOM_MAKE_DIR
934target_alias
935host_alias
936build_alias
937LIBS
938ECHO_T
939ECHO_N
940ECHO_C
941DEFS
942mandir
943localedir
944libdir
945psdir
946pdfdir
947dvidir
948htmldir
949infodir
950docdir
951oldincludedir
952includedir
953localstatedir
954sharedstatedir
955sysconfdir
956datadir
957datarootdir
958libexecdir
959sbindir
960bindir
961program_transform_name
962prefix
963exec_prefix
964PACKAGE_URL
965PACKAGE_BUGREPORT
966PACKAGE_STRING
967PACKAGE_VERSION
968PACKAGE_TARNAME
969PACKAGE_NAME
970PATH_SEPARATOR
971SHELL'
972ac_subst_files=''
973ac_user_opts='
974enable_option_checking
975with_custom_make_dir
976with_target_bits
977with_sys_root
978with_tools_dir
979with_devkit
980enable_openjdk_only
981with_jdk_variant
982with_jvm_interpreter
983with_jvm_variants
984enable_debug
985with_debug_level
986with_conf_name
987with_builddeps_conf
988with_builddeps_server
989with_builddeps_dir
990with_builddeps_group
991enable_headful
992enable_hotspot_test_in_build
993with_cacerts_file
994enable_unlimited_crypto
995with_milestone
996with_update_version
997with_build_number
998with_user_release_suffix
999with_boot_jdk
1000with_boot_jdk_jvmargs
1001with_add_source_root
1002with_override_source_root
1003with_adds_and_overrides
1004with_override_langtools
1005with_override_corba
1006with_override_jaxp
1007with_override_jaxws
1008with_override_hotspot
1009with_override_jdk
1010with_import_hotspot
1011with_msvcr_dll
1012with_dxsdk
1013with_dxsdk_lib
1014with_dxsdk_include
1015with_jtreg
1016with_extra_cflags
1017with_extra_cxxflags
1018with_extra_ldflags
1019enable_debug_symbols
1020enable_zip_debug_info
1021enable_macosx_runtime_support
1022with_x
1023with_cups
1024with_cups_include
1025with_freetype
1026with_alsa
1027with_alsa_include
1028with_alsa_lib
1029with_giflib
1030with_zlib
1031with_stdc__lib
1032with_num_cores
1033with_memory_size
1034with_jobs
1035with_sjavac_server_java
1036enable_sjavac
1037enable_precompiled_headers
1038enable_ccache
1039with_ccache_dir
1040'
1041      ac_precious_vars='build_alias
1042host_alias
1043target_alias
1044PKG_CONFIG
1045CC
1046CFLAGS
1047LDFLAGS
1048LIBS
1049CPPFLAGS
1050CXX
1051CXXFLAGS
1052CCC
1053OBJC
1054OBJCFLAGS
1055CPP
1056CXXCPP
1057XMKMF
1058FREETYPE2_CFLAGS
1059FREETYPE2_LIBS
1060ALSA_CFLAGS
1061ALSA_LIBS
1062LIBFFI_CFLAGS
1063LIBFFI_LIBS'
1064
1065
1066# Initialize some variables set by options.
1067ac_init_help=
1068ac_init_version=false
1069ac_unrecognized_opts=
1070ac_unrecognized_sep=
1071# The variables have the same names as the options, with
1072# dashes changed to underlines.
1073cache_file=/dev/null
1074exec_prefix=NONE
1075no_create=
1076no_recursion=
1077prefix=NONE
1078program_prefix=NONE
1079program_suffix=NONE
1080program_transform_name=s,x,x,
1081silent=
1082site=
1083srcdir=
1084verbose=
1085x_includes=NONE
1086x_libraries=NONE
1087
1088# Installation directory options.
1089# These are left unexpanded so users can "make install exec_prefix=/foo"
1090# and all the variables that are supposed to be based on exec_prefix
1091# by default will actually change.
1092# Use braces instead of parens because sh, perl, etc. also accept them.
1093# (The list follows the same order as the GNU Coding Standards.)
1094bindir='${exec_prefix}/bin'
1095sbindir='${exec_prefix}/sbin'
1096libexecdir='${exec_prefix}/libexec'
1097datarootdir='${prefix}/share'
1098datadir='${datarootdir}'
1099sysconfdir='${prefix}/etc'
1100sharedstatedir='${prefix}/com'
1101localstatedir='${prefix}/var'
1102includedir='${prefix}/include'
1103oldincludedir='/usr/include'
1104docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1105infodir='${datarootdir}/info'
1106htmldir='${docdir}'
1107dvidir='${docdir}'
1108pdfdir='${docdir}'
1109psdir='${docdir}'
1110libdir='${exec_prefix}/lib'
1111localedir='${datarootdir}/locale'
1112mandir='${datarootdir}/man'
1113
1114ac_prev=
1115ac_dashdash=
1116for ac_option
1117do
1118  # If the previous option needs an argument, assign it.
1119  if test -n "$ac_prev"; then
1120    eval $ac_prev=\$ac_option
1121    ac_prev=
1122    continue
1123  fi
1124
1125  case $ac_option in
1126  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1127  *=)   ac_optarg= ;;
1128  *)    ac_optarg=yes ;;
1129  esac
1130
1131  # Accept the important Cygnus configure options, so we can diagnose typos.
1132
1133  case $ac_dashdash$ac_option in
1134  --)
1135    ac_dashdash=yes ;;
1136
1137  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1138    ac_prev=bindir ;;
1139  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1140    bindir=$ac_optarg ;;
1141
1142  -build | --build | --buil | --bui | --bu)
1143    ac_prev=build_alias ;;
1144  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1145    build_alias=$ac_optarg ;;
1146
1147  -cache-file | --cache-file | --cache-fil | --cache-fi \
1148  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1149    ac_prev=cache_file ;;
1150  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1151  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1152    cache_file=$ac_optarg ;;
1153
1154  --config-cache | -C)
1155    cache_file=config.cache ;;
1156
1157  -datadir | --datadir | --datadi | --datad)
1158    ac_prev=datadir ;;
1159  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1160    datadir=$ac_optarg ;;
1161
1162  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1163  | --dataroo | --dataro | --datar)
1164    ac_prev=datarootdir ;;
1165  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1166  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1167    datarootdir=$ac_optarg ;;
1168
1169  -disable-* | --disable-*)
1170    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1171    # Reject names that are not valid shell variable names.
1172    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1173      as_fn_error $? "invalid feature name: $ac_useropt"
1174    ac_useropt_orig=$ac_useropt
1175    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1176    case $ac_user_opts in
1177      *"
1178"enable_$ac_useropt"
1179"*) ;;
1180      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1181	 ac_unrecognized_sep=', ';;
1182    esac
1183    eval enable_$ac_useropt=no ;;
1184
1185  -docdir | --docdir | --docdi | --doc | --do)
1186    ac_prev=docdir ;;
1187  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1188    docdir=$ac_optarg ;;
1189
1190  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1191    ac_prev=dvidir ;;
1192  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1193    dvidir=$ac_optarg ;;
1194
1195  -enable-* | --enable-*)
1196    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1197    # Reject names that are not valid shell variable names.
1198    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1199      as_fn_error $? "invalid feature name: $ac_useropt"
1200    ac_useropt_orig=$ac_useropt
1201    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202    case $ac_user_opts in
1203      *"
1204"enable_$ac_useropt"
1205"*) ;;
1206      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1207	 ac_unrecognized_sep=', ';;
1208    esac
1209    eval enable_$ac_useropt=\$ac_optarg ;;
1210
1211  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1212  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1213  | --exec | --exe | --ex)
1214    ac_prev=exec_prefix ;;
1215  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1216  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1217  | --exec=* | --exe=* | --ex=*)
1218    exec_prefix=$ac_optarg ;;
1219
1220  -gas | --gas | --ga | --g)
1221    # Obsolete; use --with-gas.
1222    with_gas=yes ;;
1223
1224  -help | --help | --hel | --he | -h)
1225    ac_init_help=long ;;
1226  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1227    ac_init_help=recursive ;;
1228  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1229    ac_init_help=short ;;
1230
1231  -host | --host | --hos | --ho)
1232    ac_prev=host_alias ;;
1233  -host=* | --host=* | --hos=* | --ho=*)
1234    host_alias=$ac_optarg ;;
1235
1236  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1237    ac_prev=htmldir ;;
1238  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1239  | --ht=*)
1240    htmldir=$ac_optarg ;;
1241
1242  -includedir | --includedir | --includedi | --included | --include \
1243  | --includ | --inclu | --incl | --inc)
1244    ac_prev=includedir ;;
1245  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1246  | --includ=* | --inclu=* | --incl=* | --inc=*)
1247    includedir=$ac_optarg ;;
1248
1249  -infodir | --infodir | --infodi | --infod | --info | --inf)
1250    ac_prev=infodir ;;
1251  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1252    infodir=$ac_optarg ;;
1253
1254  -libdir | --libdir | --libdi | --libd)
1255    ac_prev=libdir ;;
1256  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1257    libdir=$ac_optarg ;;
1258
1259  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1260  | --libexe | --libex | --libe)
1261    ac_prev=libexecdir ;;
1262  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1263  | --libexe=* | --libex=* | --libe=*)
1264    libexecdir=$ac_optarg ;;
1265
1266  -localedir | --localedir | --localedi | --localed | --locale)
1267    ac_prev=localedir ;;
1268  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1269    localedir=$ac_optarg ;;
1270
1271  -localstatedir | --localstatedir | --localstatedi | --localstated \
1272  | --localstate | --localstat | --localsta | --localst | --locals)
1273    ac_prev=localstatedir ;;
1274  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1275  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1276    localstatedir=$ac_optarg ;;
1277
1278  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1279    ac_prev=mandir ;;
1280  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1281    mandir=$ac_optarg ;;
1282
1283  -nfp | --nfp | --nf)
1284    # Obsolete; use --without-fp.
1285    with_fp=no ;;
1286
1287  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1288  | --no-cr | --no-c | -n)
1289    no_create=yes ;;
1290
1291  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1292  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1293    no_recursion=yes ;;
1294
1295  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1296  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1297  | --oldin | --oldi | --old | --ol | --o)
1298    ac_prev=oldincludedir ;;
1299  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1300  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1301  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1302    oldincludedir=$ac_optarg ;;
1303
1304  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1305    ac_prev=prefix ;;
1306  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1307    prefix=$ac_optarg ;;
1308
1309  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1310  | --program-pre | --program-pr | --program-p)
1311    ac_prev=program_prefix ;;
1312  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1313  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1314    program_prefix=$ac_optarg ;;
1315
1316  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1317  | --program-suf | --program-su | --program-s)
1318    ac_prev=program_suffix ;;
1319  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1320  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1321    program_suffix=$ac_optarg ;;
1322
1323  -program-transform-name | --program-transform-name \
1324  | --program-transform-nam | --program-transform-na \
1325  | --program-transform-n | --program-transform- \
1326  | --program-transform | --program-transfor \
1327  | --program-transfo | --program-transf \
1328  | --program-trans | --program-tran \
1329  | --progr-tra | --program-tr | --program-t)
1330    ac_prev=program_transform_name ;;
1331  -program-transform-name=* | --program-transform-name=* \
1332  | --program-transform-nam=* | --program-transform-na=* \
1333  | --program-transform-n=* | --program-transform-=* \
1334  | --program-transform=* | --program-transfor=* \
1335  | --program-transfo=* | --program-transf=* \
1336  | --program-trans=* | --program-tran=* \
1337  | --progr-tra=* | --program-tr=* | --program-t=*)
1338    program_transform_name=$ac_optarg ;;
1339
1340  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1341    ac_prev=pdfdir ;;
1342  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1343    pdfdir=$ac_optarg ;;
1344
1345  -psdir | --psdir | --psdi | --psd | --ps)
1346    ac_prev=psdir ;;
1347  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1348    psdir=$ac_optarg ;;
1349
1350  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1351  | -silent | --silent | --silen | --sile | --sil)
1352    silent=yes ;;
1353
1354  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1355    ac_prev=sbindir ;;
1356  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1357  | --sbi=* | --sb=*)
1358    sbindir=$ac_optarg ;;
1359
1360  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1361  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1362  | --sharedst | --shareds | --shared | --share | --shar \
1363  | --sha | --sh)
1364    ac_prev=sharedstatedir ;;
1365  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1366  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1367  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1368  | --sha=* | --sh=*)
1369    sharedstatedir=$ac_optarg ;;
1370
1371  -site | --site | --sit)
1372    ac_prev=site ;;
1373  -site=* | --site=* | --sit=*)
1374    site=$ac_optarg ;;
1375
1376  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1377    ac_prev=srcdir ;;
1378  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1379    srcdir=$ac_optarg ;;
1380
1381  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1382  | --syscon | --sysco | --sysc | --sys | --sy)
1383    ac_prev=sysconfdir ;;
1384  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1385  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1386    sysconfdir=$ac_optarg ;;
1387
1388  -target | --target | --targe | --targ | --tar | --ta | --t)
1389    ac_prev=target_alias ;;
1390  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1391    target_alias=$ac_optarg ;;
1392
1393  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1394    verbose=yes ;;
1395
1396  -version | --version | --versio | --versi | --vers | -V)
1397    ac_init_version=: ;;
1398
1399  -with-* | --with-*)
1400    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1401    # Reject names that are not valid shell variable names.
1402    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1403      as_fn_error $? "invalid package name: $ac_useropt"
1404    ac_useropt_orig=$ac_useropt
1405    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1406    case $ac_user_opts in
1407      *"
1408"with_$ac_useropt"
1409"*) ;;
1410      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1411	 ac_unrecognized_sep=', ';;
1412    esac
1413    eval with_$ac_useropt=\$ac_optarg ;;
1414
1415  -without-* | --without-*)
1416    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1417    # Reject names that are not valid shell variable names.
1418    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1419      as_fn_error $? "invalid package name: $ac_useropt"
1420    ac_useropt_orig=$ac_useropt
1421    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1422    case $ac_user_opts in
1423      *"
1424"with_$ac_useropt"
1425"*) ;;
1426      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1427	 ac_unrecognized_sep=', ';;
1428    esac
1429    eval with_$ac_useropt=no ;;
1430
1431  --x)
1432    # Obsolete; use --with-x.
1433    with_x=yes ;;
1434
1435  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1436  | --x-incl | --x-inc | --x-in | --x-i)
1437    ac_prev=x_includes ;;
1438  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1439  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1440    x_includes=$ac_optarg ;;
1441
1442  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1443  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1444    ac_prev=x_libraries ;;
1445  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1446  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1447    x_libraries=$ac_optarg ;;
1448
1449  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1450Try \`$0 --help' for more information"
1451    ;;
1452
1453  *=*)
1454    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1455    # Reject names that are not valid shell variable names.
1456    case $ac_envvar in #(
1457      '' | [0-9]* | *[!_$as_cr_alnum]* )
1458      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1459    esac
1460    eval $ac_envvar=\$ac_optarg
1461    export $ac_envvar ;;
1462
1463  *)
1464    # FIXME: should be removed in autoconf 3.0.
1465    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1466    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1467      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1468    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1469    ;;
1470
1471  esac
1472done
1473
1474if test -n "$ac_prev"; then
1475  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1476  as_fn_error $? "missing argument to $ac_option"
1477fi
1478
1479if test -n "$ac_unrecognized_opts"; then
1480  case $enable_option_checking in
1481    no) ;;
1482    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1483    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1484  esac
1485fi
1486
1487# Check all directory arguments for consistency.
1488for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1489		datadir sysconfdir sharedstatedir localstatedir includedir \
1490		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1491		libdir localedir mandir
1492do
1493  eval ac_val=\$$ac_var
1494  # Remove trailing slashes.
1495  case $ac_val in
1496    */ )
1497      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1498      eval $ac_var=\$ac_val;;
1499  esac
1500  # Be sure to have absolute directory names.
1501  case $ac_val in
1502    [\\/$]* | ?:[\\/]* )  continue;;
1503    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1504  esac
1505  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1506done
1507
1508# There might be people who depend on the old broken behavior: `$host'
1509# used to hold the argument of --host etc.
1510# FIXME: To remove some day.
1511build=$build_alias
1512host=$host_alias
1513target=$target_alias
1514
1515# FIXME: To remove some day.
1516if test "x$host_alias" != x; then
1517  if test "x$build_alias" = x; then
1518    cross_compiling=maybe
1519    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1520    If a cross compiler is detected then cross compile mode will be used" >&2
1521  elif test "x$build_alias" != "x$host_alias"; then
1522    cross_compiling=yes
1523  fi
1524fi
1525
1526ac_tool_prefix=
1527test -n "$host_alias" && ac_tool_prefix=$host_alias-
1528
1529test "$silent" = yes && exec 6>/dev/null
1530
1531
1532ac_pwd=`pwd` && test -n "$ac_pwd" &&
1533ac_ls_di=`ls -di .` &&
1534ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1535  as_fn_error $? "working directory cannot be determined"
1536test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1537  as_fn_error $? "pwd does not report name of working directory"
1538
1539
1540# Find the source files, if location was not specified.
1541if test -z "$srcdir"; then
1542  ac_srcdir_defaulted=yes
1543  # Try the directory containing this script, then the parent directory.
1544  ac_confdir=`$as_dirname -- "$as_myself" ||
1545$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1546	 X"$as_myself" : 'X\(//\)[^/]' \| \
1547	 X"$as_myself" : 'X\(//\)$' \| \
1548	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1549$as_echo X"$as_myself" |
1550    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1551	    s//\1/
1552	    q
1553	  }
1554	  /^X\(\/\/\)[^/].*/{
1555	    s//\1/
1556	    q
1557	  }
1558	  /^X\(\/\/\)$/{
1559	    s//\1/
1560	    q
1561	  }
1562	  /^X\(\/\).*/{
1563	    s//\1/
1564	    q
1565	  }
1566	  s/.*/./; q'`
1567  srcdir=$ac_confdir
1568  if test ! -r "$srcdir/$ac_unique_file"; then
1569    srcdir=..
1570  fi
1571else
1572  ac_srcdir_defaulted=no
1573fi
1574if test ! -r "$srcdir/$ac_unique_file"; then
1575  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1576  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1577fi
1578ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1579ac_abs_confdir=`(
1580	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1581	pwd)`
1582# When building in place, set srcdir=.
1583if test "$ac_abs_confdir" = "$ac_pwd"; then
1584  srcdir=.
1585fi
1586# Remove unnecessary trailing slashes from srcdir.
1587# Double slashes in file names in object file debugging info
1588# mess up M-x gdb in Emacs.
1589case $srcdir in
1590*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1591esac
1592for ac_var in $ac_precious_vars; do
1593  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1594  eval ac_env_${ac_var}_value=\$${ac_var}
1595  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1596  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1597done
1598
1599#
1600# Report the --help message.
1601#
1602if test "$ac_init_help" = "long"; then
1603  # Omit some internal or obsolete options to make the list less imposing.
1604  # This message is too long to be a string in the A/UX 3.1 sh.
1605  cat <<_ACEOF
1606\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1607
1608Usage: $0 [OPTION]... [VAR=VALUE]...
1609
1610To assign environment variables (e.g., CC, CFLAGS...), specify them as
1611VAR=VALUE.  See below for descriptions of some of the useful variables.
1612
1613Defaults for the options are specified in brackets.
1614
1615Configuration:
1616  -h, --help              display this help and exit
1617      --help=short        display options specific to this package
1618      --help=recursive    display the short help of all the included packages
1619  -V, --version           display version information and exit
1620  -q, --quiet, --silent   do not print \`checking ...' messages
1621      --cache-file=FILE   cache test results in FILE [disabled]
1622  -C, --config-cache      alias for \`--cache-file=config.cache'
1623  -n, --no-create         do not create output files
1624      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1625
1626Installation directories:
1627  --prefix=PREFIX         install architecture-independent files in PREFIX
1628                          [$ac_default_prefix]
1629  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1630                          [PREFIX]
1631
1632By default, \`make install' will install all the files in
1633\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1634an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1635for instance \`--prefix=\$HOME'.
1636
1637For better control, use the options below.
1638
1639Fine tuning of the installation directories:
1640  --bindir=DIR            user executables [EPREFIX/bin]
1641  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1642  --libexecdir=DIR        program executables [EPREFIX/libexec]
1643  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1644  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1645  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1646  --libdir=DIR            object code libraries [EPREFIX/lib]
1647  --includedir=DIR        C header files [PREFIX/include]
1648  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1649  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1650  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1651  --infodir=DIR           info documentation [DATAROOTDIR/info]
1652  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1653  --mandir=DIR            man documentation [DATAROOTDIR/man]
1654  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1655  --htmldir=DIR           html documentation [DOCDIR]
1656  --dvidir=DIR            dvi documentation [DOCDIR]
1657  --pdfdir=DIR            pdf documentation [DOCDIR]
1658  --psdir=DIR             ps documentation [DOCDIR]
1659_ACEOF
1660
1661  cat <<\_ACEOF
1662
1663X features:
1664  --x-includes=DIR    X include files are in DIR
1665  --x-libraries=DIR   X library files are in DIR
1666
1667System types:
1668  --build=BUILD     configure for building on BUILD [guessed]
1669  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1670  --target=TARGET   configure for building compilers for TARGET [HOST]
1671_ACEOF
1672fi
1673
1674if test -n "$ac_init_help"; then
1675  case $ac_init_help in
1676     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1677   esac
1678  cat <<\_ACEOF
1679
1680Optional Features:
1681  --disable-option-checking  ignore unrecognized --enable/--with options
1682  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1683  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1684  --enable-openjdk-only   suppress building custom source even if present
1685                          [disabled]
1686  --enable-debug          set the debug level to fastdebug (shorthand for
1687                          --with-debug-level=fastdebug) [disabled]
1688  --disable-headful       disable building headful support (graphical UI
1689                          support) [enabled]
1690  --enable-hotspot-test-in-build
1691                          run the Queens test after Hotspot build [disabled]
1692  --enable-unlimited-crypto
1693                          Enable unlimited crypto policy [disabled]
1694  --disable-debug-symbols disable generation of debug symbols [enabled]
1695  --disable-zip-debug-info
1696                          disable zipping of debug-info files [enabled]
1697  --disable-macosx-runtime-support
1698                          disable the use of MacOSX Java runtime support
1699                          framework [enabled]
1700  --enable-sjavac         use sjavac to do fast incremental compiles
1701                          [disabled]
1702  --disable-precompiled-headers
1703                          disable using precompiled headers when compiling C++
1704                          [enabled]
1705  --disable-ccache        disable using ccache to speed up recompilations
1706                          [enabled]
1707
1708Optional Packages:
1709  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1710  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1711  --with-custom-make-dir  use this directory for custom build/make files
1712  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1713                          support it), e.g. --with-target-bits=32 [guessed]
1714  --with-sys-root         pass this sys-root to the compilers and tools (for
1715                          cross-compiling)
1716  --with-tools-dir        search this directory for compilers and tools (for
1717                          cross-compiling)
1718  --with-devkit           use this directory as base for tools-dir and
1719                          sys-root (for cross-compiling)
1720  --with-jdk-variant      JDK variant to build (normal) [normal]
1721  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1722  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1723                          client, minimal1, kernel, zero, zeroshark, core)
1724                          [server]
1725  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1726                          [release]
1727  --with-conf-name        use this as the name of the configuration [generated
1728                          from important configuration options]
1729  --with-builddeps-conf   use this configuration file for the builddeps
1730  --with-builddeps-server download and use build dependencies from this server
1731                          url
1732  --with-builddeps-dir    store downloaded build dependencies here
1733                          [/localhome/builddeps]
1734  --with-builddeps-group  chgrp the downloaded build dependencies to this
1735                          group
1736  --with-cacerts-file     specify alternative cacerts file
1737  --with-milestone        Set milestone value for build [internal]
1738  --with-update-version   Set update version value for build [b00]
1739  --with-build-number     Set build number value for build [b00]
1740  --with-user-release-suffix
1741                          Add a custom string to the version string if build
1742                          number isn't set.[username_builddateb00]
1743  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1744  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1745                          invocations of the Boot JDK, overriding the default
1746                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1747                          -enableassertions"
1748  --with-add-source-root  for each and every source directory, look in this
1749                          additional source root for the same directory; if it
1750                          exists and have files in it, include it in the build
1751  --with-override-source-root
1752                          for each and every source directory, look in this
1753                          override source root for the same directory; if it
1754                          exists, use that directory instead and ignore the
1755                          directory in the original source root
1756  --with-adds-and-overrides
1757                          use the subdirs 'adds' and 'overrides' in the
1758                          specified directory as add-source-root and
1759                          override-source-root
1760  --with-override-langtools
1761                          use this langtools dir for the build
1762  --with-override-corba   use this corba dir for the build
1763  --with-override-jaxp    use this jaxp dir for the build
1764  --with-override-jaxws   use this jaxws dir for the build
1765  --with-override-hotspot use this hotspot dir for the build
1766  --with-override-jdk     use this jdk dir for the build
1767  --with-import-hotspot   import hotspot binaries from this jdk image or
1768                          hotspot build dist dir instead of building from
1769                          source
1770  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1771                          only) [probed]
1772  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1773  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1774                          [probed]
1775  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1776                          [probed]
1777  --with-jtreg            Regression Test Harness [probed]
1778  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1779  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1780  --with-extra-ldflags    extra flags to be used when linking jdk
1781  --with-x                use the X Window System
1782  --with-cups             specify prefix directory for the cups package
1783                          (expecting the headers under PATH/include)
1784  --with-cups-include     specify directory for the cups include files
1785  --with-freetype         specify prefix directory for the freetype2 package
1786                          (expecting the libraries under PATH/lib and the
1787                          headers under PATH/include)
1788  --with-alsa             specify prefix directory for the alsa package
1789                          (expecting the libraries under PATH/lib and the
1790                          headers under PATH/include)
1791  --with-alsa-include     specify directory for the alsa include files
1792  --with-alsa-lib         specify directory for the alsa library
1793  --with-giflib           use giflib from build system or OpenJDK source
1794                          (system, bundled) [bundled]
1795  --with-zlib             use zlib from build system or OpenJDK source
1796                          (system, bundled) [bundled]
1797  --with-stdc++lib=<static>,<dynamic>,<default>
1798                          force linking of the C++ runtime on Linux to either
1799                          static or dynamic, default is static with dynamic as
1800                          fallback
1801  --with-num-cores        number of cores in the build system, e.g.
1802                          --with-num-cores=8 [probed]
1803  --with-memory-size      memory (in MB) available in the build system, e.g.
1804                          --with-memory-size=1024 [probed]
1805  --with-jobs             number of parallel jobs to let make run [calculated
1806                          based on cores and memory]
1807  --with-sjavac-server-java
1808                          use this java binary for running the sjavac
1809                          background server [Boot JDK java]
1810  --with-ccache-dir       where to store ccache files [~/.ccache]
1811
1812Some influential environment variables:
1813  PKG_CONFIG  path to pkg-config utility
1814  CC          C compiler command
1815  CFLAGS      C compiler flags
1816  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1817              nonstandard directory <lib dir>
1818  LIBS        libraries to pass to the linker, e.g. -l<library>
1819  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1820              you have headers in a nonstandard directory <include dir>
1821  CXX         C++ compiler command
1822  CXXFLAGS    C++ compiler flags
1823  OBJC        Objective C compiler command
1824  OBJCFLAGS   Objective C compiler flags
1825  CPP         C preprocessor
1826  CXXCPP      C++ preprocessor
1827  XMKMF       Path to xmkmf, Makefile generator for X Window System
1828  FREETYPE2_CFLAGS
1829              C compiler flags for FREETYPE2, overriding pkg-config
1830  FREETYPE2_LIBS
1831              linker flags for FREETYPE2, overriding pkg-config
1832  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1833  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1834  LIBFFI_CFLAGS
1835              C compiler flags for LIBFFI, overriding pkg-config
1836  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1837
1838Use these variables to override the choices made by `configure' or to help
1839it to find libraries and programs with nonstandard names/locations.
1840
1841Report bugs to <build-dev@openjdk.java.net>.
1842OpenJDK home page: <http://openjdk.java.net>.
1843_ACEOF
1844ac_status=$?
1845fi
1846
1847if test "$ac_init_help" = "recursive"; then
1848  # If there are subdirs, report their specific --help.
1849  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1850    test -d "$ac_dir" ||
1851      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1852      continue
1853    ac_builddir=.
1854
1855case "$ac_dir" in
1856.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1857*)
1858  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1859  # A ".." for each directory in $ac_dir_suffix.
1860  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1861  case $ac_top_builddir_sub in
1862  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1863  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1864  esac ;;
1865esac
1866ac_abs_top_builddir=$ac_pwd
1867ac_abs_builddir=$ac_pwd$ac_dir_suffix
1868# for backward compatibility:
1869ac_top_builddir=$ac_top_build_prefix
1870
1871case $srcdir in
1872  .)  # We are building in place.
1873    ac_srcdir=.
1874    ac_top_srcdir=$ac_top_builddir_sub
1875    ac_abs_top_srcdir=$ac_pwd ;;
1876  [\\/]* | ?:[\\/]* )  # Absolute name.
1877    ac_srcdir=$srcdir$ac_dir_suffix;
1878    ac_top_srcdir=$srcdir
1879    ac_abs_top_srcdir=$srcdir ;;
1880  *) # Relative name.
1881    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1882    ac_top_srcdir=$ac_top_build_prefix$srcdir
1883    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1884esac
1885ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1886
1887    cd "$ac_dir" || { ac_status=$?; continue; }
1888    # Check for guested configure.
1889    if test -f "$ac_srcdir/configure.gnu"; then
1890      echo &&
1891      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1892    elif test -f "$ac_srcdir/configure"; then
1893      echo &&
1894      $SHELL "$ac_srcdir/configure" --help=recursive
1895    else
1896      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1897    fi || ac_status=$?
1898    cd "$ac_pwd" || { ac_status=$?; break; }
1899  done
1900fi
1901
1902test -n "$ac_init_help" && exit $ac_status
1903if $ac_init_version; then
1904  cat <<\_ACEOF
1905OpenJDK configure jdk8
1906generated by GNU Autoconf 2.67
1907
1908Copyright (C) 2010 Free Software Foundation, Inc.
1909This configure script is free software; the Free Software Foundation
1910gives unlimited permission to copy, distribute and modify it.
1911_ACEOF
1912  exit
1913fi
1914
1915## ------------------------ ##
1916## Autoconf initialization. ##
1917## ------------------------ ##
1918
1919# ac_fn_c_try_compile LINENO
1920# --------------------------
1921# Try to compile conftest.$ac_ext, and return whether this succeeded.
1922ac_fn_c_try_compile ()
1923{
1924  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1925  rm -f conftest.$ac_objext
1926  if { { ac_try="$ac_compile"
1927case "(($ac_try" in
1928  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1929  *) ac_try_echo=$ac_try;;
1930esac
1931eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1932$as_echo "$ac_try_echo"; } >&5
1933  (eval "$ac_compile") 2>conftest.err
1934  ac_status=$?
1935  if test -s conftest.err; then
1936    grep -v '^ *+' conftest.err >conftest.er1
1937    cat conftest.er1 >&5
1938    mv -f conftest.er1 conftest.err
1939  fi
1940  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1941  test $ac_status = 0; } && {
1942	 test -z "$ac_c_werror_flag" ||
1943	 test ! -s conftest.err
1944       } && test -s conftest.$ac_objext; then :
1945  ac_retval=0
1946else
1947  $as_echo "$as_me: failed program was:" >&5
1948sed 's/^/| /' conftest.$ac_ext >&5
1949
1950	ac_retval=1
1951fi
1952  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1953  as_fn_set_status $ac_retval
1954
1955} # ac_fn_c_try_compile
1956
1957# ac_fn_cxx_try_compile LINENO
1958# ----------------------------
1959# Try to compile conftest.$ac_ext, and return whether this succeeded.
1960ac_fn_cxx_try_compile ()
1961{
1962  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963  rm -f conftest.$ac_objext
1964  if { { ac_try="$ac_compile"
1965case "(($ac_try" in
1966  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967  *) ac_try_echo=$ac_try;;
1968esac
1969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970$as_echo "$ac_try_echo"; } >&5
1971  (eval "$ac_compile") 2>conftest.err
1972  ac_status=$?
1973  if test -s conftest.err; then
1974    grep -v '^ *+' conftest.err >conftest.er1
1975    cat conftest.er1 >&5
1976    mv -f conftest.er1 conftest.err
1977  fi
1978  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979  test $ac_status = 0; } && {
1980	 test -z "$ac_cxx_werror_flag" ||
1981	 test ! -s conftest.err
1982       } && test -s conftest.$ac_objext; then :
1983  ac_retval=0
1984else
1985  $as_echo "$as_me: failed program was:" >&5
1986sed 's/^/| /' conftest.$ac_ext >&5
1987
1988	ac_retval=1
1989fi
1990  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1991  as_fn_set_status $ac_retval
1992
1993} # ac_fn_cxx_try_compile
1994
1995# ac_fn_objc_try_compile LINENO
1996# -----------------------------
1997# Try to compile conftest.$ac_ext, and return whether this succeeded.
1998ac_fn_objc_try_compile ()
1999{
2000  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001  rm -f conftest.$ac_objext
2002  if { { ac_try="$ac_compile"
2003case "(($ac_try" in
2004  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2005  *) ac_try_echo=$ac_try;;
2006esac
2007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2008$as_echo "$ac_try_echo"; } >&5
2009  (eval "$ac_compile") 2>conftest.err
2010  ac_status=$?
2011  if test -s conftest.err; then
2012    grep -v '^ *+' conftest.err >conftest.er1
2013    cat conftest.er1 >&5
2014    mv -f conftest.er1 conftest.err
2015  fi
2016  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2017  test $ac_status = 0; } && {
2018	 test -z "$ac_objc_werror_flag" ||
2019	 test ! -s conftest.err
2020       } && test -s conftest.$ac_objext; then :
2021  ac_retval=0
2022else
2023  $as_echo "$as_me: failed program was:" >&5
2024sed 's/^/| /' conftest.$ac_ext >&5
2025
2026	ac_retval=1
2027fi
2028  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2029  as_fn_set_status $ac_retval
2030
2031} # ac_fn_objc_try_compile
2032
2033# ac_fn_c_try_cpp LINENO
2034# ----------------------
2035# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2036ac_fn_c_try_cpp ()
2037{
2038  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039  if { { ac_try="$ac_cpp conftest.$ac_ext"
2040case "(($ac_try" in
2041  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2042  *) ac_try_echo=$ac_try;;
2043esac
2044eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2045$as_echo "$ac_try_echo"; } >&5
2046  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2047  ac_status=$?
2048  if test -s conftest.err; then
2049    grep -v '^ *+' conftest.err >conftest.er1
2050    cat conftest.er1 >&5
2051    mv -f conftest.er1 conftest.err
2052  fi
2053  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2054  test $ac_status = 0; } > conftest.i && {
2055	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2056	 test ! -s conftest.err
2057       }; then :
2058  ac_retval=0
2059else
2060  $as_echo "$as_me: failed program was:" >&5
2061sed 's/^/| /' conftest.$ac_ext >&5
2062
2063    ac_retval=1
2064fi
2065  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2066  as_fn_set_status $ac_retval
2067
2068} # ac_fn_c_try_cpp
2069
2070# ac_fn_cxx_try_cpp LINENO
2071# ------------------------
2072# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2073ac_fn_cxx_try_cpp ()
2074{
2075  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2076  if { { ac_try="$ac_cpp conftest.$ac_ext"
2077case "(($ac_try" in
2078  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2079  *) ac_try_echo=$ac_try;;
2080esac
2081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2082$as_echo "$ac_try_echo"; } >&5
2083  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2084  ac_status=$?
2085  if test -s conftest.err; then
2086    grep -v '^ *+' conftest.err >conftest.er1
2087    cat conftest.er1 >&5
2088    mv -f conftest.er1 conftest.err
2089  fi
2090  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2091  test $ac_status = 0; } > conftest.i && {
2092	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2093	 test ! -s conftest.err
2094       }; then :
2095  ac_retval=0
2096else
2097  $as_echo "$as_me: failed program was:" >&5
2098sed 's/^/| /' conftest.$ac_ext >&5
2099
2100    ac_retval=1
2101fi
2102  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2103  as_fn_set_status $ac_retval
2104
2105} # ac_fn_cxx_try_cpp
2106
2107# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2108# ---------------------------------------------------------
2109# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2110# the include files in INCLUDES and setting the cache variable VAR
2111# accordingly.
2112ac_fn_cxx_check_header_mongrel ()
2113{
2114  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2115  if eval "test \"\${$3+set}\"" = set; then :
2116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2117$as_echo_n "checking for $2... " >&6; }
2118if eval "test \"\${$3+set}\"" = set; then :
2119  $as_echo_n "(cached) " >&6
2120fi
2121eval ac_res=\$$3
2122	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2123$as_echo "$ac_res" >&6; }
2124else
2125  # Is the header compilable?
2126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2127$as_echo_n "checking $2 usability... " >&6; }
2128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129/* end confdefs.h.  */
2130$4
2131#include <$2>
2132_ACEOF
2133if ac_fn_cxx_try_compile "$LINENO"; then :
2134  ac_header_compiler=yes
2135else
2136  ac_header_compiler=no
2137fi
2138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2140$as_echo "$ac_header_compiler" >&6; }
2141
2142# Is the header present?
2143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2144$as_echo_n "checking $2 presence... " >&6; }
2145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146/* end confdefs.h.  */
2147#include <$2>
2148_ACEOF
2149if ac_fn_cxx_try_cpp "$LINENO"; then :
2150  ac_header_preproc=yes
2151else
2152  ac_header_preproc=no
2153fi
2154rm -f conftest.err conftest.i conftest.$ac_ext
2155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2156$as_echo "$ac_header_preproc" >&6; }
2157
2158# So?  What about this header?
2159case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2160  yes:no: )
2161    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2162$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2163    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2164$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2165    ;;
2166  no:yes:* )
2167    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2168$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2169    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2170$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2171    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2172$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2173    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2174$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2175    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2176$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2177( $as_echo "## ----------------------------------------- ##
2178## Report this to build-dev@openjdk.java.net ##
2179## ----------------------------------------- ##"
2180     ) | sed "s/^/$as_me: WARNING:     /" >&2
2181    ;;
2182esac
2183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2184$as_echo_n "checking for $2... " >&6; }
2185if eval "test \"\${$3+set}\"" = set; then :
2186  $as_echo_n "(cached) " >&6
2187else
2188  eval "$3=\$ac_header_compiler"
2189fi
2190eval ac_res=\$$3
2191	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2192$as_echo "$ac_res" >&6; }
2193fi
2194  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2195
2196} # ac_fn_cxx_check_header_mongrel
2197
2198# ac_fn_cxx_try_run LINENO
2199# ------------------------
2200# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2201# that executables *can* be run.
2202ac_fn_cxx_try_run ()
2203{
2204  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2205  if { { ac_try="$ac_link"
2206case "(($ac_try" in
2207  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2208  *) ac_try_echo=$ac_try;;
2209esac
2210eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2211$as_echo "$ac_try_echo"; } >&5
2212  (eval "$ac_link") 2>&5
2213  ac_status=$?
2214  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2215  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2216  { { case "(($ac_try" in
2217  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2218  *) ac_try_echo=$ac_try;;
2219esac
2220eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2221$as_echo "$ac_try_echo"; } >&5
2222  (eval "$ac_try") 2>&5
2223  ac_status=$?
2224  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2225  test $ac_status = 0; }; }; then :
2226  ac_retval=0
2227else
2228  $as_echo "$as_me: program exited with status $ac_status" >&5
2229       $as_echo "$as_me: failed program was:" >&5
2230sed 's/^/| /' conftest.$ac_ext >&5
2231
2232       ac_retval=$ac_status
2233fi
2234  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2235  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2236  as_fn_set_status $ac_retval
2237
2238} # ac_fn_cxx_try_run
2239
2240# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2241# ---------------------------------------------------------
2242# Tests whether HEADER exists and can be compiled using the include files in
2243# INCLUDES, setting the cache variable VAR accordingly.
2244ac_fn_cxx_check_header_compile ()
2245{
2246  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2248$as_echo_n "checking for $2... " >&6; }
2249if eval "test \"\${$3+set}\"" = set; then :
2250  $as_echo_n "(cached) " >&6
2251else
2252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h.  */
2254$4
2255#include <$2>
2256_ACEOF
2257if ac_fn_cxx_try_compile "$LINENO"; then :
2258  eval "$3=yes"
2259else
2260  eval "$3=no"
2261fi
2262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2263fi
2264eval ac_res=\$$3
2265	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2266$as_echo "$ac_res" >&6; }
2267  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2268
2269} # ac_fn_cxx_check_header_compile
2270
2271# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2272# ----------------------------------------------
2273# Tries to find the compile-time value of EXPR in a program that includes
2274# INCLUDES, setting VAR accordingly. Returns whether the value could be
2275# computed
2276ac_fn_cxx_compute_int ()
2277{
2278  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2279  if test "$cross_compiling" = yes; then
2280    # Depending upon the size, compute the lo and hi bounds.
2281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282/* end confdefs.h.  */
2283$4
2284int
2285main ()
2286{
2287static int test_array [1 - 2 * !(($2) >= 0)];
2288test_array [0] = 0
2289
2290  ;
2291  return 0;
2292}
2293_ACEOF
2294if ac_fn_cxx_try_compile "$LINENO"; then :
2295  ac_lo=0 ac_mid=0
2296  while :; do
2297    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2298/* end confdefs.h.  */
2299$4
2300int
2301main ()
2302{
2303static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2304test_array [0] = 0
2305
2306  ;
2307  return 0;
2308}
2309_ACEOF
2310if ac_fn_cxx_try_compile "$LINENO"; then :
2311  ac_hi=$ac_mid; break
2312else
2313  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2314			if test $ac_lo -le $ac_mid; then
2315			  ac_lo= ac_hi=
2316			  break
2317			fi
2318			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321  done
2322else
2323  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2324/* end confdefs.h.  */
2325$4
2326int
2327main ()
2328{
2329static int test_array [1 - 2 * !(($2) < 0)];
2330test_array [0] = 0
2331
2332  ;
2333  return 0;
2334}
2335_ACEOF
2336if ac_fn_cxx_try_compile "$LINENO"; then :
2337  ac_hi=-1 ac_mid=-1
2338  while :; do
2339    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2340/* end confdefs.h.  */
2341$4
2342int
2343main ()
2344{
2345static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2346test_array [0] = 0
2347
2348  ;
2349  return 0;
2350}
2351_ACEOF
2352if ac_fn_cxx_try_compile "$LINENO"; then :
2353  ac_lo=$ac_mid; break
2354else
2355  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2356			if test $ac_mid -le $ac_hi; then
2357			  ac_lo= ac_hi=
2358			  break
2359			fi
2360			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363  done
2364else
2365  ac_lo= ac_hi=
2366fi
2367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2368fi
2369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2370# Binary search between lo and hi bounds.
2371while test "x$ac_lo" != "x$ac_hi"; do
2372  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2373  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h.  */
2375$4
2376int
2377main ()
2378{
2379static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2380test_array [0] = 0
2381
2382  ;
2383  return 0;
2384}
2385_ACEOF
2386if ac_fn_cxx_try_compile "$LINENO"; then :
2387  ac_hi=$ac_mid
2388else
2389  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2390fi
2391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2392done
2393case $ac_lo in #((
2394?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2395'') ac_retval=1 ;;
2396esac
2397  else
2398    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2399/* end confdefs.h.  */
2400$4
2401static long int longval () { return $2; }
2402static unsigned long int ulongval () { return $2; }
2403#include <stdio.h>
2404#include <stdlib.h>
2405int
2406main ()
2407{
2408
2409  FILE *f = fopen ("conftest.val", "w");
2410  if (! f)
2411    return 1;
2412  if (($2) < 0)
2413    {
2414      long int i = longval ();
2415      if (i != ($2))
2416	return 1;
2417      fprintf (f, "%ld", i);
2418    }
2419  else
2420    {
2421      unsigned long int i = ulongval ();
2422      if (i != ($2))
2423	return 1;
2424      fprintf (f, "%lu", i);
2425    }
2426  /* Do not output a trailing newline, as this causes \r\n confusion
2427     on some platforms.  */
2428  return ferror (f) || fclose (f) != 0;
2429
2430  ;
2431  return 0;
2432}
2433_ACEOF
2434if ac_fn_cxx_try_run "$LINENO"; then :
2435  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2436else
2437  ac_retval=1
2438fi
2439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2440  conftest.$ac_objext conftest.beam conftest.$ac_ext
2441rm -f conftest.val
2442
2443  fi
2444  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2445  as_fn_set_status $ac_retval
2446
2447} # ac_fn_cxx_compute_int
2448
2449# ac_fn_cxx_try_link LINENO
2450# -------------------------
2451# Try to link conftest.$ac_ext, and return whether this succeeded.
2452ac_fn_cxx_try_link ()
2453{
2454  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2455  rm -f conftest.$ac_objext conftest$ac_exeext
2456  if { { ac_try="$ac_link"
2457case "(($ac_try" in
2458  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2459  *) ac_try_echo=$ac_try;;
2460esac
2461eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2462$as_echo "$ac_try_echo"; } >&5
2463  (eval "$ac_link") 2>conftest.err
2464  ac_status=$?
2465  if test -s conftest.err; then
2466    grep -v '^ *+' conftest.err >conftest.er1
2467    cat conftest.er1 >&5
2468    mv -f conftest.er1 conftest.err
2469  fi
2470  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2471  test $ac_status = 0; } && {
2472	 test -z "$ac_cxx_werror_flag" ||
2473	 test ! -s conftest.err
2474       } && test -s conftest$ac_exeext && {
2475	 test "$cross_compiling" = yes ||
2476	 $as_test_x conftest$ac_exeext
2477       }; then :
2478  ac_retval=0
2479else
2480  $as_echo "$as_me: failed program was:" >&5
2481sed 's/^/| /' conftest.$ac_ext >&5
2482
2483	ac_retval=1
2484fi
2485  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2486  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2487  # interfere with the next link command; also delete a directory that is
2488  # left behind by Apple's compiler.  We do this before executing the actions.
2489  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2490  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2491  as_fn_set_status $ac_retval
2492
2493} # ac_fn_cxx_try_link
2494
2495# ac_fn_cxx_check_func LINENO FUNC VAR
2496# ------------------------------------
2497# Tests whether FUNC exists, setting the cache variable VAR accordingly
2498ac_fn_cxx_check_func ()
2499{
2500  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2502$as_echo_n "checking for $2... " >&6; }
2503if eval "test \"\${$3+set}\"" = set; then :
2504  $as_echo_n "(cached) " >&6
2505else
2506  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2507/* end confdefs.h.  */
2508/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2509   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2510#define $2 innocuous_$2
2511
2512/* System header to define __stub macros and hopefully few prototypes,
2513    which can conflict with char $2 (); below.
2514    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2515    <limits.h> exists even on freestanding compilers.  */
2516
2517#ifdef __STDC__
2518# include <limits.h>
2519#else
2520# include <assert.h>
2521#endif
2522
2523#undef $2
2524
2525/* Override any GCC internal prototype to avoid an error.
2526   Use char because int might match the return type of a GCC
2527   builtin and then its argument prototype would still apply.  */
2528#ifdef __cplusplus
2529extern "C"
2530#endif
2531char $2 ();
2532/* The GNU C library defines this for functions which it implements
2533    to always fail with ENOSYS.  Some functions are actually named
2534    something starting with __ and the normal name is an alias.  */
2535#if defined __stub_$2 || defined __stub___$2
2536choke me
2537#endif
2538
2539int
2540main ()
2541{
2542return $2 ();
2543  ;
2544  return 0;
2545}
2546_ACEOF
2547if ac_fn_cxx_try_link "$LINENO"; then :
2548  eval "$3=yes"
2549else
2550  eval "$3=no"
2551fi
2552rm -f core conftest.err conftest.$ac_objext \
2553    conftest$ac_exeext conftest.$ac_ext
2554fi
2555eval ac_res=\$$3
2556	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2557$as_echo "$ac_res" >&6; }
2558  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2559
2560} # ac_fn_cxx_check_func
2561
2562# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2563# -------------------------------------------------------
2564# Tests whether HEADER exists and can be compiled using the include files in
2565# INCLUDES, setting the cache variable VAR accordingly.
2566ac_fn_c_check_header_compile ()
2567{
2568  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2570$as_echo_n "checking for $2... " >&6; }
2571if eval "test \"\${$3+set}\"" = set; then :
2572  $as_echo_n "(cached) " >&6
2573else
2574  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2575/* end confdefs.h.  */
2576$4
2577#include <$2>
2578_ACEOF
2579if ac_fn_c_try_compile "$LINENO"; then :
2580  eval "$3=yes"
2581else
2582  eval "$3=no"
2583fi
2584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2585fi
2586eval ac_res=\$$3
2587	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2588$as_echo "$ac_res" >&6; }
2589  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2590
2591} # ac_fn_c_check_header_compile
2592cat >config.log <<_ACEOF
2593This file contains any messages produced by compilers while
2594running configure, to aid debugging if configure makes a mistake.
2595
2596It was created by OpenJDK $as_me jdk8, which was
2597generated by GNU Autoconf 2.67.  Invocation command line was
2598
2599  $ $0 $@
2600
2601_ACEOF
2602exec 5>>config.log
2603{
2604cat <<_ASUNAME
2605## --------- ##
2606## Platform. ##
2607## --------- ##
2608
2609hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2610uname -m = `(uname -m) 2>/dev/null || echo unknown`
2611uname -r = `(uname -r) 2>/dev/null || echo unknown`
2612uname -s = `(uname -s) 2>/dev/null || echo unknown`
2613uname -v = `(uname -v) 2>/dev/null || echo unknown`
2614
2615/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2616/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2617
2618/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2619/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2620/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2621/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2622/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2623/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2624/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2625
2626_ASUNAME
2627
2628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2629for as_dir in $PATH
2630do
2631  IFS=$as_save_IFS
2632  test -z "$as_dir" && as_dir=.
2633    $as_echo "PATH: $as_dir"
2634  done
2635IFS=$as_save_IFS
2636
2637} >&5
2638
2639cat >&5 <<_ACEOF
2640
2641
2642## ----------- ##
2643## Core tests. ##
2644## ----------- ##
2645
2646_ACEOF
2647
2648
2649# Keep a trace of the command line.
2650# Strip out --no-create and --no-recursion so they do not pile up.
2651# Strip out --silent because we don't want to record it for future runs.
2652# Also quote any args containing shell meta-characters.
2653# Make two passes to allow for proper duplicate-argument suppression.
2654ac_configure_args=
2655ac_configure_args0=
2656ac_configure_args1=
2657ac_must_keep_next=false
2658for ac_pass in 1 2
2659do
2660  for ac_arg
2661  do
2662    case $ac_arg in
2663    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2664    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2665    | -silent | --silent | --silen | --sile | --sil)
2666      continue ;;
2667    *\'*)
2668      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2669    esac
2670    case $ac_pass in
2671    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2672    2)
2673      as_fn_append ac_configure_args1 " '$ac_arg'"
2674      if test $ac_must_keep_next = true; then
2675	ac_must_keep_next=false # Got value, back to normal.
2676      else
2677	case $ac_arg in
2678	  *=* | --config-cache | -C | -disable-* | --disable-* \
2679	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2680	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2681	  | -with-* | --with-* | -without-* | --without-* | --x)
2682	    case "$ac_configure_args0 " in
2683	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2684	    esac
2685	    ;;
2686	  -* ) ac_must_keep_next=true ;;
2687	esac
2688      fi
2689      as_fn_append ac_configure_args " '$ac_arg'"
2690      ;;
2691    esac
2692  done
2693done
2694{ ac_configure_args0=; unset ac_configure_args0;}
2695{ ac_configure_args1=; unset ac_configure_args1;}
2696
2697# When interrupted or exit'd, cleanup temporary files, and complete
2698# config.log.  We remove comments because anyway the quotes in there
2699# would cause problems or look ugly.
2700# WARNING: Use '\'' to represent an apostrophe within the trap.
2701# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2702trap 'exit_status=$?
2703  # Save into config.log some information that might help in debugging.
2704  {
2705    echo
2706
2707    $as_echo "## ---------------- ##
2708## Cache variables. ##
2709## ---------------- ##"
2710    echo
2711    # The following way of writing the cache mishandles newlines in values,
2712(
2713  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2714    eval ac_val=\$$ac_var
2715    case $ac_val in #(
2716    *${as_nl}*)
2717      case $ac_var in #(
2718      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2719$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2720      esac
2721      case $ac_var in #(
2722      _ | IFS | as_nl) ;; #(
2723      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2724      *) { eval $ac_var=; unset $ac_var;} ;;
2725      esac ;;
2726    esac
2727  done
2728  (set) 2>&1 |
2729    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2730    *${as_nl}ac_space=\ *)
2731      sed -n \
2732	"s/'\''/'\''\\\\'\'''\''/g;
2733	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2734      ;; #(
2735    *)
2736      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2737      ;;
2738    esac |
2739    sort
2740)
2741    echo
2742
2743    $as_echo "## ----------------- ##
2744## Output variables. ##
2745## ----------------- ##"
2746    echo
2747    for ac_var in $ac_subst_vars
2748    do
2749      eval ac_val=\$$ac_var
2750      case $ac_val in
2751      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2752      esac
2753      $as_echo "$ac_var='\''$ac_val'\''"
2754    done | sort
2755    echo
2756
2757    if test -n "$ac_subst_files"; then
2758      $as_echo "## ------------------- ##
2759## File substitutions. ##
2760## ------------------- ##"
2761      echo
2762      for ac_var in $ac_subst_files
2763      do
2764	eval ac_val=\$$ac_var
2765	case $ac_val in
2766	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2767	esac
2768	$as_echo "$ac_var='\''$ac_val'\''"
2769      done | sort
2770      echo
2771    fi
2772
2773    if test -s confdefs.h; then
2774      $as_echo "## ----------- ##
2775## confdefs.h. ##
2776## ----------- ##"
2777      echo
2778      cat confdefs.h
2779      echo
2780    fi
2781    test "$ac_signal" != 0 &&
2782      $as_echo "$as_me: caught signal $ac_signal"
2783    $as_echo "$as_me: exit $exit_status"
2784  } >&5
2785  rm -f core *.core core.conftest.* &&
2786    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2787    exit $exit_status
2788' 0
2789for ac_signal in 1 2 13 15; do
2790  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2791done
2792ac_signal=0
2793
2794# confdefs.h avoids OS command line length limits that DEFS can exceed.
2795rm -f -r conftest* confdefs.h
2796
2797$as_echo "/* confdefs.h */" > confdefs.h
2798
2799# Predefined preprocessor variables.
2800
2801cat >>confdefs.h <<_ACEOF
2802#define PACKAGE_NAME "$PACKAGE_NAME"
2803_ACEOF
2804
2805cat >>confdefs.h <<_ACEOF
2806#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2807_ACEOF
2808
2809cat >>confdefs.h <<_ACEOF
2810#define PACKAGE_VERSION "$PACKAGE_VERSION"
2811_ACEOF
2812
2813cat >>confdefs.h <<_ACEOF
2814#define PACKAGE_STRING "$PACKAGE_STRING"
2815_ACEOF
2816
2817cat >>confdefs.h <<_ACEOF
2818#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2819_ACEOF
2820
2821cat >>confdefs.h <<_ACEOF
2822#define PACKAGE_URL "$PACKAGE_URL"
2823_ACEOF
2824
2825
2826# Let the site file select an alternate cache file if it wants to.
2827# Prefer an explicitly selected file to automatically selected ones.
2828ac_site_file1=NONE
2829ac_site_file2=NONE
2830if test -n "$CONFIG_SITE"; then
2831  # We do not want a PATH search for config.site.
2832  case $CONFIG_SITE in #((
2833    -*)  ac_site_file1=./$CONFIG_SITE;;
2834    */*) ac_site_file1=$CONFIG_SITE;;
2835    *)   ac_site_file1=./$CONFIG_SITE;;
2836  esac
2837elif test "x$prefix" != xNONE; then
2838  ac_site_file1=$prefix/share/config.site
2839  ac_site_file2=$prefix/etc/config.site
2840else
2841  ac_site_file1=$ac_default_prefix/share/config.site
2842  ac_site_file2=$ac_default_prefix/etc/config.site
2843fi
2844for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2845do
2846  test "x$ac_site_file" = xNONE && continue
2847  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2848    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2849$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2850    sed 's/^/| /' "$ac_site_file" >&5
2851    . "$ac_site_file" \
2852      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2854as_fn_error $? "failed to load site script $ac_site_file
2855See \`config.log' for more details" "$LINENO" 5; }
2856  fi
2857done
2858
2859if test -r "$cache_file"; then
2860  # Some versions of bash will fail to source /dev/null (special files
2861  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2862  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2863    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2864$as_echo "$as_me: loading cache $cache_file" >&6;}
2865    case $cache_file in
2866      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2867      *)                      . "./$cache_file";;
2868    esac
2869  fi
2870else
2871  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2872$as_echo "$as_me: creating cache $cache_file" >&6;}
2873  >$cache_file
2874fi
2875
2876# Check that the precious variables saved in the cache have kept the same
2877# value.
2878ac_cache_corrupted=false
2879for ac_var in $ac_precious_vars; do
2880  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2881  eval ac_new_set=\$ac_env_${ac_var}_set
2882  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2883  eval ac_new_val=\$ac_env_${ac_var}_value
2884  case $ac_old_set,$ac_new_set in
2885    set,)
2886      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2887$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2888      ac_cache_corrupted=: ;;
2889    ,set)
2890      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2891$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2892      ac_cache_corrupted=: ;;
2893    ,);;
2894    *)
2895      if test "x$ac_old_val" != "x$ac_new_val"; then
2896	# differences in whitespace do not lead to failure.
2897	ac_old_val_w=`echo x $ac_old_val`
2898	ac_new_val_w=`echo x $ac_new_val`
2899	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2900	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2901$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2902	  ac_cache_corrupted=:
2903	else
2904	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2905$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2906	  eval $ac_var=\$ac_old_val
2907	fi
2908	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2909$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2910	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2911$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2912      fi;;
2913  esac
2914  # Pass precious variables to config.status.
2915  if test "$ac_new_set" = set; then
2916    case $ac_new_val in
2917    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2918    *) ac_arg=$ac_var=$ac_new_val ;;
2919    esac
2920    case " $ac_configure_args " in
2921      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2922      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2923    esac
2924  fi
2925done
2926if $ac_cache_corrupted; then
2927  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2929  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2930$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2931  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2932fi
2933## -------------------- ##
2934## Main body of script. ##
2935## -------------------- ##
2936
2937ac_ext=c
2938ac_cpp='$CPP $CPPFLAGS'
2939ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2940ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2941ac_compiler_gnu=$ac_cv_c_compiler_gnu
2942
2943
2944
2945ac_aux_dir=
2946for ac_dir in build-aux "$srcdir"/build-aux; do
2947  if test -f "$ac_dir/install-sh"; then
2948    ac_aux_dir=$ac_dir
2949    ac_install_sh="$ac_aux_dir/install-sh -c"
2950    break
2951  elif test -f "$ac_dir/install.sh"; then
2952    ac_aux_dir=$ac_dir
2953    ac_install_sh="$ac_aux_dir/install.sh -c"
2954    break
2955  elif test -f "$ac_dir/shtool"; then
2956    ac_aux_dir=$ac_dir
2957    ac_install_sh="$ac_aux_dir/shtool install -c"
2958    break
2959  fi
2960done
2961if test -z "$ac_aux_dir"; then
2962  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2963fi
2964
2965# These three variables are undocumented and unsupported,
2966# and are intended to be withdrawn in a future Autoconf release.
2967# They can cause serious problems if a builder's source tree is in a directory
2968# whose full name contains unusual characters.
2969ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2970ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2971ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2972
2973
2974# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2975
2976#
2977# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2978# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2979#
2980# This code is free software; you can redistribute it and/or modify it
2981# under the terms of the GNU General Public License version 2 only, as
2982# published by the Free Software Foundation.  Oracle designates this
2983# particular file as subject to the "Classpath" exception as provided
2984# by Oracle in the LICENSE file that accompanied this code.
2985#
2986# This code is distributed in the hope that it will be useful, but WITHOUT
2987# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2988# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2989# version 2 for more details (a copy is included in the LICENSE file that
2990# accompanied this code).
2991#
2992# You should have received a copy of the GNU General Public License version
2993# 2 along with this work; if not, write to the Free Software Foundation,
2994# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2995#
2996# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2997# or visit www.oracle.com if you need additional information or have any
2998# questions.
2999#
3000
3001#
3002# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3003#
3004# This program is free software; you can redistribute it and/or modify
3005# it under the terms of the GNU General Public License as published by
3006# the Free Software Foundation; either version 2 of the License, or
3007# (at your option) any later version.
3008#
3009# This program is distributed in the hope that it will be useful, but
3010# WITHOUT ANY WARRANTY; without even the implied warranty of
3011# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3012# General Public License for more details.
3013#
3014# You should have received a copy of the GNU General Public License
3015# along with this program; if not, write to the Free Software
3016# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3017#
3018# As a special exception to the GNU General Public License, if you
3019# distribute this file as part of a program that contains a
3020# configuration script generated by Autoconf, you may include it under
3021# the same distribution terms that you use for the rest of that program.
3022
3023# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3024# ----------------------------------
3025# PKG_PROG_PKG_CONFIG
3026
3027# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3028#
3029# Check to see whether a particular set of modules exists.  Similar
3030# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3031#
3032#
3033# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3034# this or PKG_CHECK_MODULES is called, or make sure to call
3035# PKG_CHECK_EXISTS manually
3036# --------------------------------------------------------------
3037
3038
3039
3040# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3041# ---------------------------------------------
3042# _PKG_CONFIG
3043
3044# _PKG_SHORT_ERRORS_SUPPORTED
3045# -----------------------------
3046# _PKG_SHORT_ERRORS_SUPPORTED
3047
3048
3049# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3050# [ACTION-IF-NOT-FOUND])
3051#
3052#
3053# Note that if there is a possibility the first call to
3054# PKG_CHECK_MODULES might not happen, you should be sure to include an
3055# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3056#
3057#
3058# --------------------------------------------------------------
3059# PKG_CHECK_MODULES
3060
3061
3062# Include these first...
3063#
3064# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3065# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3066#
3067# This code is free software; you can redistribute it and/or modify it
3068# under the terms of the GNU General Public License version 2 only, as
3069# published by the Free Software Foundation.  Oracle designates this
3070# particular file as subject to the "Classpath" exception as provided
3071# by Oracle in the LICENSE file that accompanied this code.
3072#
3073# This code is distributed in the hope that it will be useful, but WITHOUT
3074# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3075# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3076# version 2 for more details (a copy is included in the LICENSE file that
3077# accompanied this code).
3078#
3079# You should have received a copy of the GNU General Public License version
3080# 2 along with this work; if not, write to the Free Software Foundation,
3081# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3082#
3083# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3084# or visit www.oracle.com if you need additional information or have any
3085# questions.
3086#
3087
3088# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3089# If so, then append $1 to $2\
3090# Also set JVM_ARG_OK to true/false depending on outcome.
3091
3092
3093# Appends a string to a path variable, only adding the : when needed.
3094
3095
3096# This will make sure the given variable points to a full and proper
3097# 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# $1: The name of the variable to fix
3104
3105
3106# This will make sure the given variable points to a executable
3107# with a full and proper path. This means:
3108# 1) There will be no spaces in the path. On posix platforms,
3109#    spaces in the path will result in an error. On Windows,
3110#    the path will be rewritten using short-style to be space-free.
3111# 2) The path will be absolute, and it will be in unix-style (on
3112#     cygwin).
3113# Any arguments given to the executable is preserved.
3114# If the input variable does not have a directory specification, then
3115# it need to be in the PATH.
3116# $1: The name of the variable to fix
3117
3118
3119
3120
3121
3122
3123# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3124# $1: variable to check
3125# $2: executable name to print in warning (optional)
3126
3127
3128# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3129# Arguments as AC_PATH_PROG:
3130# $1: variable to set
3131# $2: executable name to look for
3132
3133
3134# Setup the most fundamental tools that relies on not much else to set up,
3135# but is used by much of the early bootstrap code.
3136
3137
3138# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3139
3140
3141
3142
3143
3144
3145
3146#%%% Simple tools %%%
3147
3148# Check if we have found a usable version of make
3149# $1: the path to a potential make binary (or empty)
3150# $2: the description on how we found this
3151
3152
3153# Goes looking for a usable version of GNU make.
3154
3155
3156
3157
3158
3159
3160# Check if build directory is on local disk. If not possible to determine,
3161# we prefer to claim it's local.
3162# Argument 1: directory to test
3163# Argument 2: what to do if it is on local disk
3164# Argument 3: what to do otherwise (remote disk or failure)
3165
3166
3167# Check that source files have basic read permissions set. This might
3168# not be the case in cygwin in certain conditions.
3169
3170
3171
3172
3173#
3174# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3175# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3176#
3177# This code is free software; you can redistribute it and/or modify it
3178# under the terms of the GNU General Public License version 2 only, as
3179# published by the Free Software Foundation.  Oracle designates this
3180# particular file as subject to the "Classpath" exception as provided
3181# by Oracle in the LICENSE file that accompanied this code.
3182#
3183# This code is distributed in the hope that it will be useful, but WITHOUT
3184# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3185# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3186# version 2 for more details (a copy is included in the LICENSE file that
3187# accompanied this code).
3188#
3189# You should have received a copy of the GNU General Public License version
3190# 2 along with this work; if not, write to the Free Software Foundation,
3191# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3192#
3193# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3194# or visit www.oracle.com if you need additional information or have any
3195# questions.
3196#
3197
3198
3199
3200
3201
3202# Helper function which possibly converts a path using DOS-style short mode.
3203# If so, the updated path is stored in $new_path.
3204# $1: The path to check
3205
3206
3207# Helper function which possibly converts a path using DOS-style short mode.
3208# If so, the updated path is stored in $new_path.
3209# $1: The path to check
3210
3211
3212# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3213# and could probably be heavily simplified. However, all changes in this
3214# area tend to need lot of testing in different scenarios, and in lack of
3215# proper unit testing, cleaning this up has not been deemed worth the effort
3216# at the moment.
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3227
3228
3229
3230
3231#
3232# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3233# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3234#
3235# This code is free software; you can redistribute it and/or modify it
3236# under the terms of the GNU General Public License version 2 only, as
3237# published by the Free Software Foundation.  Oracle designates this
3238# particular file as subject to the "Classpath" exception as provided
3239# by Oracle in the LICENSE file that accompanied this code.
3240#
3241# This code is distributed in the hope that it will be useful, but WITHOUT
3242# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3243# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3244# version 2 for more details (a copy is included in the LICENSE file that
3245# accompanied this code).
3246#
3247# You should have received a copy of the GNU General Public License version
3248# 2 along with this work; if not, write to the Free Software Foundation,
3249# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3250#
3251# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3252# or visit www.oracle.com if you need additional information or have any
3253# questions.
3254#
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266# ... then the rest
3267#
3268# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3269# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3270#
3271# This code is free software; you can redistribute it and/or modify it
3272# under the terms of the GNU General Public License version 2 only, as
3273# published by the Free Software Foundation.  Oracle designates this
3274# particular file as subject to the "Classpath" exception as provided
3275# by Oracle in the LICENSE file that accompanied this code.
3276#
3277# This code is distributed in the hope that it will be useful, but WITHOUT
3278# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3279# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3280# version 2 for more details (a copy is included in the LICENSE file that
3281# accompanied this code).
3282#
3283# You should have received a copy of the GNU General Public License version
3284# 2 along with this work; if not, write to the Free Software Foundation,
3285# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3286#
3287# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3288# or visit www.oracle.com if you need additional information or have any
3289# questions.
3290#
3291
3292# Execute the check given as argument, and verify the result
3293# If the Boot JDK was previously found, do nothing
3294# $1 A command line (typically autoconf macro) to execute
3295
3296
3297# Test: Is bootjdk explicitely set by command line arguments?
3298
3299
3300# Test: Is bootjdk available from builddeps?
3301
3302
3303# Test: Is $JAVA_HOME set?
3304
3305
3306# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3307
3308
3309# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3310
3311
3312# Look for a jdk in the given path. If there are multiple, try to select the newest.
3313# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3314# $1 = Path to directory containing jdk installations.
3315# $2 = String to append to the found JDK directory to get the proper JDK home
3316
3317
3318# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3319# environmental variable as base for where to look.
3320# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3321
3322
3323# Test: Is there a JDK installed in default, well-known locations?
3324
3325
3326# Check that a command-line tool in the Boot JDK is correct
3327# $1 = name of variable to assign
3328# $2 = name of binary
3329
3330
3331###############################################################################
3332#
3333# We need a Boot JDK to bootstrap the build.
3334#
3335
3336
3337
3338
3339
3340#
3341# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3342# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3343#
3344# This code is free software; you can redistribute it and/or modify it
3345# under the terms of the GNU General Public License version 2 only, as
3346# published by the Free Software Foundation.  Oracle designates this
3347# particular file as subject to the "Classpath" exception as provided
3348# by Oracle in the LICENSE file that accompanied this code.
3349#
3350# This code is distributed in the hope that it will be useful, but WITHOUT
3351# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3352# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3353# version 2 for more details (a copy is included in the LICENSE file that
3354# accompanied this code).
3355#
3356# You should have received a copy of the GNU General Public License version
3357# 2 along with this work; if not, write to the Free Software Foundation,
3358# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3359#
3360# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3361# or visit www.oracle.com if you need additional information or have any
3362# questions.
3363#
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384#
3385# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3386# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3387#
3388# This code is free software; you can redistribute it and/or modify it
3389# under the terms of the GNU General Public License version 2 only, as
3390# published by the Free Software Foundation.  Oracle designates this
3391# particular file as subject to the "Classpath" exception as provided
3392# by Oracle in the LICENSE file that accompanied this code.
3393#
3394# This code is distributed in the hope that it will be useful, but WITHOUT
3395# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3396# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3397# version 2 for more details (a copy is included in the LICENSE file that
3398# accompanied this code).
3399#
3400# You should have received a copy of the GNU General Public License version
3401# 2 along with this work; if not, write to the Free Software Foundation,
3402# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3403#
3404# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3405# or visit www.oracle.com if you need additional information or have any
3406# questions.
3407#
3408
3409
3410
3411
3412
3413cygwin_help() {
3414    case $1 in
3415    unzip)
3416        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3417    zip)
3418        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3419    make)
3420        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3421    * )
3422       break ;;
3423    esac
3424}
3425
3426apt_help() {
3427    case $1 in
3428    devkit)
3429        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3430    openjdk)
3431        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3432    alsa)
3433        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3434    cups)
3435        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3436    freetype2)
3437        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3438    pulse)
3439        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3440    x11)
3441        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3442    ccache)
3443        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3444    * )
3445       break ;;
3446    esac
3447}
3448
3449yum_help() {
3450    case $1 in
3451    devkit)
3452        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3453    openjdk)
3454        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3455    alsa)
3456        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3457    cups)
3458        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3459    freetype2)
3460        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3461    pulse)
3462        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3463    x11)
3464        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3465    ccache)
3466        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3467    * )
3468       break ;;
3469    esac
3470}
3471
3472port_help() {
3473    PKGHANDLER_COMMAND=""
3474}
3475
3476pkgutil_help() {
3477    PKGHANDLER_COMMAND=""
3478}
3479
3480pkgadd_help() {
3481    PKGHANDLER_COMMAND=""
3482}
3483
3484
3485
3486#
3487# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3488# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3489#
3490# This code is free software; you can redistribute it and/or modify it
3491# under the terms of the GNU General Public License version 2 only, as
3492# published by the Free Software Foundation.  Oracle designates this
3493# particular file as subject to the "Classpath" exception as provided
3494# by Oracle in the LICENSE file that accompanied this code.
3495#
3496# This code is distributed in the hope that it will be useful, but WITHOUT
3497# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3498# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3499# version 2 for more details (a copy is included in the LICENSE file that
3500# accompanied this code).
3501#
3502# You should have received a copy of the GNU General Public License version
3503# 2 along with this work; if not, write to the Free Software Foundation,
3504# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3505#
3506# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3507# or visit www.oracle.com if you need additional information or have any
3508# questions.
3509#
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520###############################################################################
3521#
3522# Should we build only OpenJDK even if closed sources are present?
3523#
3524
3525
3526
3527
3528###############################################################################
3529#
3530# Setup version numbers
3531#
3532
3533
3534
3535
3536
3537
3538# Support for customization of the build process. Some build files
3539# will include counterparts from this location, if they exist. This allows
3540# for a degree of customization of the build targets and the rules/recipes
3541# to create them
3542
3543# Check whether --with-custom-make-dir was given.
3544if test "${with_custom_make_dir+set}" = set; then :
3545  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3546fi
3547
3548
3549
3550#
3551# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3552# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3553#
3554# This code is free software; you can redistribute it and/or modify it
3555# under the terms of the GNU General Public License version 2 only, as
3556# published by the Free Software Foundation.  Oracle designates this
3557# particular file as subject to the "Classpath" exception as provided
3558# by Oracle in the LICENSE file that accompanied this code.
3559#
3560# This code is distributed in the hope that it will be useful, but WITHOUT
3561# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3562# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3563# version 2 for more details (a copy is included in the LICENSE file that
3564# accompanied this code).
3565#
3566# You should have received a copy of the GNU General Public License version
3567# 2 along with this work; if not, write to the Free Software Foundation,
3568# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3569#
3570# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3571# or visit www.oracle.com if you need additional information or have any
3572# questions.
3573#
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589#
3590# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3591# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3592#
3593# This code is free software; you can redistribute it and/or modify it
3594# under the terms of the GNU General Public License version 2 only, as
3595# published by the Free Software Foundation.  Oracle designates this
3596# particular file as subject to the "Classpath" exception as provided
3597# by Oracle in the LICENSE file that accompanied this code.
3598#
3599# This code is distributed in the hope that it will be useful, but WITHOUT
3600# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3601# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3602# version 2 for more details (a copy is included in the LICENSE file that
3603# accompanied this code).
3604#
3605# You should have received a copy of the GNU General Public License version
3606# 2 along with this work; if not, write to the Free Software Foundation,
3607# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3608#
3609# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3610# or visit www.oracle.com if you need additional information or have any
3611# questions.
3612#
3613
3614# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3615# Converts autoconf style CPU name to OpenJDK style, into
3616# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3617
3618
3619# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3620# Converts autoconf style OS name to OpenJDK style, into
3621# VAR_OS and VAR_OS_API.
3622
3623
3624# Expects $host_os $host_cpu $build_os and $build_cpu
3625# and $with_target_bits to have been setup!
3626#
3627# Translate the standard triplet(quadruplet) definition
3628# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3629# OPENJDK_BUILD_OS, etc.
3630
3631
3632# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3633# accordingly. Must be done after setting up build and target system, but before
3634# doing anything else with these values.
3635
3636
3637    # Setup the legacy variables, for controlling the old makefiles.
3638    #
3639
3640
3641
3642
3643#%%% Build and target systems %%%
3644
3645
3646
3647
3648# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3649# Add -mX to various FLAGS variables.
3650
3651
3652
3653
3654
3655
3656#
3657# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3658# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3659#
3660# This code is free software; you can redistribute it and/or modify it
3661# under the terms of the GNU General Public License version 2 only, as
3662# published by the Free Software Foundation.  Oracle designates this
3663# particular file as subject to the "Classpath" exception as provided
3664# by Oracle in the LICENSE file that accompanied this code.
3665#
3666# This code is distributed in the hope that it will be useful, but WITHOUT
3667# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3668# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3669# version 2 for more details (a copy is included in the LICENSE file that
3670# accompanied this code).
3671#
3672# You should have received a copy of the GNU General Public License version
3673# 2 along with this work; if not, write to the Free Software Foundation,
3674# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3675#
3676# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3677# or visit www.oracle.com if you need additional information or have any
3678# questions.
3679#
3680
3681
3682
3683
3684
3685
3686
3687
3688#
3689# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3690# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3691#
3692# This code is free software; you can redistribute it and/or modify it
3693# under the terms of the GNU General Public License version 2 only, as
3694# published by the Free Software Foundation.  Oracle designates this
3695# particular file as subject to the "Classpath" exception as provided
3696# by Oracle in the LICENSE file that accompanied this code.
3697#
3698# This code is distributed in the hope that it will be useful, but WITHOUT
3699# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3700# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3701# version 2 for more details (a copy is included in the LICENSE file that
3702# accompanied this code).
3703#
3704# You should have received a copy of the GNU General Public License version
3705# 2 along with this work; if not, write to the Free Software Foundation,
3706# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3707#
3708# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3709# or visit www.oracle.com if you need additional information or have any
3710# questions.
3711#
3712
3713# $1 = compiler to test (CC or CXX)
3714# $2 = human readable name of compiler (C or C++)
3715
3716
3717
3718
3719
3720# $1 = compiler to test (CC or CXX)
3721# $2 = human readable name of compiler (C or C++)
3722# $3 = list of compiler names to search for
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3737#                                   [RUN-IF-FALSE])
3738# ------------------------------------------------------------
3739# Check that the c and c++ compilers support an argument
3740
3741
3742
3743
3744# Setup the JTREG paths
3745
3746
3747#
3748# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3749# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3750#
3751# This code is free software; you can redistribute it and/or modify it
3752# under the terms of the GNU General Public License version 2 only, as
3753# published by the Free Software Foundation.  Oracle designates this
3754# particular file as subject to the "Classpath" exception as provided
3755# by Oracle in the LICENSE file that accompanied this code.
3756#
3757# This code is distributed in the hope that it will be useful, but WITHOUT
3758# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3759# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3760# version 2 for more details (a copy is included in the LICENSE file that
3761# accompanied this code).
3762#
3763# You should have received a copy of the GNU General Public License version
3764# 2 along with this work; if not, write to the Free Software Foundation,
3765# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3766#
3767# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3768# or visit www.oracle.com if you need additional information or have any
3769# questions.
3770#
3771
3772
3773
3774
3775
3776
3777
3778# Check if the VS env variables were setup prior to running configure.
3779# If not, then find vcvarsall.bat and run it automatically, and integrate
3780# the set env variables into the spec file.
3781
3782
3783
3784# Setup the DXSDK paths
3785
3786
3787
3788
3789
3790
3791# This line needs to be here, verbatim, after all includes and the dummy hook
3792# definitions. It is replaced with custom functionality when building
3793# custom sources.
3794#CUSTOM_AUTOCONF_INCLUDE
3795
3796# Do not change or remove the following line, it is needed for consistency checks:
3797DATE_WHEN_GENERATED=1373572212
3798
3799###############################################################################
3800#
3801# Initialization / Boot-strapping
3802#
3803# The bootstrapping process needs to solve the "chicken or the egg" problem,
3804# thus it jumps back and forth, each time gaining something needed later on.
3805#
3806###############################################################################
3807
3808# Basic initialization that must happen first of all
3809
3810# Save the original command line. This is passed to us by the wrapper configure script.
3811
3812DATE_WHEN_CONFIGURED=`LANG=C date`
3813
3814{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3815$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3816{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3817$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3818
3819
3820
3821# Start with tools that do not need have cross compilation support
3822# and can be expected to be found in the default PATH. These tools are
3823# used by configure. Nor are these tools expected to be found in the
3824# devkit from the builddeps server either, since they are
3825# needed to download the devkit.
3826
3827# First are all the simple required tools.
3828
3829    for ac_prog in basename
3830do
3831  # Extract the first word of "$ac_prog", so it can be a program name with args.
3832set dummy $ac_prog; ac_word=$2
3833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3834$as_echo_n "checking for $ac_word... " >&6; }
3835if test "${ac_cv_path_BASENAME+set}" = set; then :
3836  $as_echo_n "(cached) " >&6
3837else
3838  case $BASENAME in
3839  [\\/]* | ?:[\\/]*)
3840  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3841  ;;
3842  *)
3843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3844for as_dir in $PATH
3845do
3846  IFS=$as_save_IFS
3847  test -z "$as_dir" && as_dir=.
3848    for ac_exec_ext in '' $ac_executable_extensions; do
3849  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3850    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3852    break 2
3853  fi
3854done
3855  done
3856IFS=$as_save_IFS
3857
3858  ;;
3859esac
3860fi
3861BASENAME=$ac_cv_path_BASENAME
3862if test -n "$BASENAME"; then
3863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3864$as_echo "$BASENAME" >&6; }
3865else
3866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3867$as_echo "no" >&6; }
3868fi
3869
3870
3871  test -n "$BASENAME" && break
3872done
3873
3874
3875    if test "x$BASENAME" = x; then
3876        if test "xbasename" = x; then
3877          PROG_NAME=basename
3878        else
3879          PROG_NAME=basename
3880        fi
3881        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3882$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3883        as_fn_error $? "Cannot continue" "$LINENO" 5
3884    fi
3885
3886
3887
3888    for ac_prog in bash
3889do
3890  # Extract the first word of "$ac_prog", so it can be a program name with args.
3891set dummy $ac_prog; ac_word=$2
3892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3893$as_echo_n "checking for $ac_word... " >&6; }
3894if test "${ac_cv_path_BASH+set}" = set; then :
3895  $as_echo_n "(cached) " >&6
3896else
3897  case $BASH in
3898  [\\/]* | ?:[\\/]*)
3899  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3900  ;;
3901  *)
3902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3903for as_dir in $PATH
3904do
3905  IFS=$as_save_IFS
3906  test -z "$as_dir" && as_dir=.
3907    for ac_exec_ext in '' $ac_executable_extensions; do
3908  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3909    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3911    break 2
3912  fi
3913done
3914  done
3915IFS=$as_save_IFS
3916
3917  ;;
3918esac
3919fi
3920BASH=$ac_cv_path_BASH
3921if test -n "$BASH"; then
3922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3923$as_echo "$BASH" >&6; }
3924else
3925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3926$as_echo "no" >&6; }
3927fi
3928
3929
3930  test -n "$BASH" && break
3931done
3932
3933
3934    if test "x$BASH" = x; then
3935        if test "xbash" = x; then
3936          PROG_NAME=bash
3937        else
3938          PROG_NAME=bash
3939        fi
3940        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3941$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3942        as_fn_error $? "Cannot continue" "$LINENO" 5
3943    fi
3944
3945
3946
3947    for ac_prog in cat
3948do
3949  # Extract the first word of "$ac_prog", so it can be a program name with args.
3950set dummy $ac_prog; ac_word=$2
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3952$as_echo_n "checking for $ac_word... " >&6; }
3953if test "${ac_cv_path_CAT+set}" = set; then :
3954  $as_echo_n "(cached) " >&6
3955else
3956  case $CAT in
3957  [\\/]* | ?:[\\/]*)
3958  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3959  ;;
3960  *)
3961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3962for as_dir in $PATH
3963do
3964  IFS=$as_save_IFS
3965  test -z "$as_dir" && as_dir=.
3966    for ac_exec_ext in '' $ac_executable_extensions; do
3967  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3968    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3970    break 2
3971  fi
3972done
3973  done
3974IFS=$as_save_IFS
3975
3976  ;;
3977esac
3978fi
3979CAT=$ac_cv_path_CAT
3980if test -n "$CAT"; then
3981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3982$as_echo "$CAT" >&6; }
3983else
3984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3985$as_echo "no" >&6; }
3986fi
3987
3988
3989  test -n "$CAT" && break
3990done
3991
3992
3993    if test "x$CAT" = x; then
3994        if test "xcat" = x; then
3995          PROG_NAME=cat
3996        else
3997          PROG_NAME=cat
3998        fi
3999        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4000$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4001        as_fn_error $? "Cannot continue" "$LINENO" 5
4002    fi
4003
4004
4005
4006    for ac_prog in chmod
4007do
4008  # Extract the first word of "$ac_prog", so it can be a program name with args.
4009set dummy $ac_prog; ac_word=$2
4010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4011$as_echo_n "checking for $ac_word... " >&6; }
4012if test "${ac_cv_path_CHMOD+set}" = set; then :
4013  $as_echo_n "(cached) " >&6
4014else
4015  case $CHMOD in
4016  [\\/]* | ?:[\\/]*)
4017  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4018  ;;
4019  *)
4020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4021for as_dir in $PATH
4022do
4023  IFS=$as_save_IFS
4024  test -z "$as_dir" && as_dir=.
4025    for ac_exec_ext in '' $ac_executable_extensions; do
4026  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4027    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4029    break 2
4030  fi
4031done
4032  done
4033IFS=$as_save_IFS
4034
4035  ;;
4036esac
4037fi
4038CHMOD=$ac_cv_path_CHMOD
4039if test -n "$CHMOD"; then
4040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4041$as_echo "$CHMOD" >&6; }
4042else
4043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4044$as_echo "no" >&6; }
4045fi
4046
4047
4048  test -n "$CHMOD" && break
4049done
4050
4051
4052    if test "x$CHMOD" = x; then
4053        if test "xchmod" = x; then
4054          PROG_NAME=chmod
4055        else
4056          PROG_NAME=chmod
4057        fi
4058        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4059$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4060        as_fn_error $? "Cannot continue" "$LINENO" 5
4061    fi
4062
4063
4064
4065    for ac_prog in cmp
4066do
4067  # Extract the first word of "$ac_prog", so it can be a program name with args.
4068set dummy $ac_prog; ac_word=$2
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4070$as_echo_n "checking for $ac_word... " >&6; }
4071if test "${ac_cv_path_CMP+set}" = set; then :
4072  $as_echo_n "(cached) " >&6
4073else
4074  case $CMP in
4075  [\\/]* | ?:[\\/]*)
4076  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4077  ;;
4078  *)
4079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4080for as_dir in $PATH
4081do
4082  IFS=$as_save_IFS
4083  test -z "$as_dir" && as_dir=.
4084    for ac_exec_ext in '' $ac_executable_extensions; do
4085  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4086    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4088    break 2
4089  fi
4090done
4091  done
4092IFS=$as_save_IFS
4093
4094  ;;
4095esac
4096fi
4097CMP=$ac_cv_path_CMP
4098if test -n "$CMP"; then
4099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4100$as_echo "$CMP" >&6; }
4101else
4102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4103$as_echo "no" >&6; }
4104fi
4105
4106
4107  test -n "$CMP" && break
4108done
4109
4110
4111    if test "x$CMP" = x; then
4112        if test "xcmp" = x; then
4113          PROG_NAME=cmp
4114        else
4115          PROG_NAME=cmp
4116        fi
4117        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4118$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4119        as_fn_error $? "Cannot continue" "$LINENO" 5
4120    fi
4121
4122
4123
4124    for ac_prog in comm
4125do
4126  # Extract the first word of "$ac_prog", so it can be a program name with args.
4127set dummy $ac_prog; ac_word=$2
4128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4129$as_echo_n "checking for $ac_word... " >&6; }
4130if test "${ac_cv_path_COMM+set}" = set; then :
4131  $as_echo_n "(cached) " >&6
4132else
4133  case $COMM in
4134  [\\/]* | ?:[\\/]*)
4135  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4136  ;;
4137  *)
4138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4139for as_dir in $PATH
4140do
4141  IFS=$as_save_IFS
4142  test -z "$as_dir" && as_dir=.
4143    for ac_exec_ext in '' $ac_executable_extensions; do
4144  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4145    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4147    break 2
4148  fi
4149done
4150  done
4151IFS=$as_save_IFS
4152
4153  ;;
4154esac
4155fi
4156COMM=$ac_cv_path_COMM
4157if test -n "$COMM"; then
4158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4159$as_echo "$COMM" >&6; }
4160else
4161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4162$as_echo "no" >&6; }
4163fi
4164
4165
4166  test -n "$COMM" && break
4167done
4168
4169
4170    if test "x$COMM" = x; then
4171        if test "xcomm" = x; then
4172          PROG_NAME=comm
4173        else
4174          PROG_NAME=comm
4175        fi
4176        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4177$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4178        as_fn_error $? "Cannot continue" "$LINENO" 5
4179    fi
4180
4181
4182
4183    for ac_prog in cp
4184do
4185  # Extract the first word of "$ac_prog", so it can be a program name with args.
4186set dummy $ac_prog; ac_word=$2
4187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4188$as_echo_n "checking for $ac_word... " >&6; }
4189if test "${ac_cv_path_CP+set}" = set; then :
4190  $as_echo_n "(cached) " >&6
4191else
4192  case $CP in
4193  [\\/]* | ?:[\\/]*)
4194  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4195  ;;
4196  *)
4197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4198for as_dir in $PATH
4199do
4200  IFS=$as_save_IFS
4201  test -z "$as_dir" && as_dir=.
4202    for ac_exec_ext in '' $ac_executable_extensions; do
4203  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4204    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4206    break 2
4207  fi
4208done
4209  done
4210IFS=$as_save_IFS
4211
4212  ;;
4213esac
4214fi
4215CP=$ac_cv_path_CP
4216if test -n "$CP"; then
4217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4218$as_echo "$CP" >&6; }
4219else
4220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4221$as_echo "no" >&6; }
4222fi
4223
4224
4225  test -n "$CP" && break
4226done
4227
4228
4229    if test "x$CP" = x; then
4230        if test "xcp" = x; then
4231          PROG_NAME=cp
4232        else
4233          PROG_NAME=cp
4234        fi
4235        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4236$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4237        as_fn_error $? "Cannot continue" "$LINENO" 5
4238    fi
4239
4240
4241
4242    for ac_prog in cpio
4243do
4244  # Extract the first word of "$ac_prog", so it can be a program name with args.
4245set dummy $ac_prog; ac_word=$2
4246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4247$as_echo_n "checking for $ac_word... " >&6; }
4248if test "${ac_cv_path_CPIO+set}" = set; then :
4249  $as_echo_n "(cached) " >&6
4250else
4251  case $CPIO in
4252  [\\/]* | ?:[\\/]*)
4253  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4254  ;;
4255  *)
4256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4257for as_dir in $PATH
4258do
4259  IFS=$as_save_IFS
4260  test -z "$as_dir" && as_dir=.
4261    for ac_exec_ext in '' $ac_executable_extensions; do
4262  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4263    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4265    break 2
4266  fi
4267done
4268  done
4269IFS=$as_save_IFS
4270
4271  ;;
4272esac
4273fi
4274CPIO=$ac_cv_path_CPIO
4275if test -n "$CPIO"; then
4276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4277$as_echo "$CPIO" >&6; }
4278else
4279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4280$as_echo "no" >&6; }
4281fi
4282
4283
4284  test -n "$CPIO" && break
4285done
4286
4287
4288    if test "x$CPIO" = x; then
4289        if test "xcpio" = x; then
4290          PROG_NAME=cpio
4291        else
4292          PROG_NAME=cpio
4293        fi
4294        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4295$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4296        as_fn_error $? "Cannot continue" "$LINENO" 5
4297    fi
4298
4299
4300
4301    for ac_prog in cut
4302do
4303  # Extract the first word of "$ac_prog", so it can be a program name with args.
4304set dummy $ac_prog; ac_word=$2
4305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4306$as_echo_n "checking for $ac_word... " >&6; }
4307if test "${ac_cv_path_CUT+set}" = set; then :
4308  $as_echo_n "(cached) " >&6
4309else
4310  case $CUT in
4311  [\\/]* | ?:[\\/]*)
4312  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4313  ;;
4314  *)
4315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4316for as_dir in $PATH
4317do
4318  IFS=$as_save_IFS
4319  test -z "$as_dir" && as_dir=.
4320    for ac_exec_ext in '' $ac_executable_extensions; do
4321  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4322    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4324    break 2
4325  fi
4326done
4327  done
4328IFS=$as_save_IFS
4329
4330  ;;
4331esac
4332fi
4333CUT=$ac_cv_path_CUT
4334if test -n "$CUT"; then
4335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4336$as_echo "$CUT" >&6; }
4337else
4338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4339$as_echo "no" >&6; }
4340fi
4341
4342
4343  test -n "$CUT" && break
4344done
4345
4346
4347    if test "x$CUT" = x; then
4348        if test "xcut" = x; then
4349          PROG_NAME=cut
4350        else
4351          PROG_NAME=cut
4352        fi
4353        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4354$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4355        as_fn_error $? "Cannot continue" "$LINENO" 5
4356    fi
4357
4358
4359
4360    for ac_prog in date
4361do
4362  # Extract the first word of "$ac_prog", so it can be a program name with args.
4363set dummy $ac_prog; ac_word=$2
4364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4365$as_echo_n "checking for $ac_word... " >&6; }
4366if test "${ac_cv_path_DATE+set}" = set; then :
4367  $as_echo_n "(cached) " >&6
4368else
4369  case $DATE in
4370  [\\/]* | ?:[\\/]*)
4371  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4372  ;;
4373  *)
4374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4375for as_dir in $PATH
4376do
4377  IFS=$as_save_IFS
4378  test -z "$as_dir" && as_dir=.
4379    for ac_exec_ext in '' $ac_executable_extensions; do
4380  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4381    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4383    break 2
4384  fi
4385done
4386  done
4387IFS=$as_save_IFS
4388
4389  ;;
4390esac
4391fi
4392DATE=$ac_cv_path_DATE
4393if test -n "$DATE"; then
4394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4395$as_echo "$DATE" >&6; }
4396else
4397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4398$as_echo "no" >&6; }
4399fi
4400
4401
4402  test -n "$DATE" && break
4403done
4404
4405
4406    if test "x$DATE" = x; then
4407        if test "xdate" = x; then
4408          PROG_NAME=date
4409        else
4410          PROG_NAME=date
4411        fi
4412        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4413$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4414        as_fn_error $? "Cannot continue" "$LINENO" 5
4415    fi
4416
4417
4418
4419    for ac_prog in gdiff diff
4420do
4421  # Extract the first word of "$ac_prog", so it can be a program name with args.
4422set dummy $ac_prog; ac_word=$2
4423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4424$as_echo_n "checking for $ac_word... " >&6; }
4425if test "${ac_cv_path_DIFF+set}" = set; then :
4426  $as_echo_n "(cached) " >&6
4427else
4428  case $DIFF in
4429  [\\/]* | ?:[\\/]*)
4430  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4431  ;;
4432  *)
4433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4434for as_dir in $PATH
4435do
4436  IFS=$as_save_IFS
4437  test -z "$as_dir" && as_dir=.
4438    for ac_exec_ext in '' $ac_executable_extensions; do
4439  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4440    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4442    break 2
4443  fi
4444done
4445  done
4446IFS=$as_save_IFS
4447
4448  ;;
4449esac
4450fi
4451DIFF=$ac_cv_path_DIFF
4452if test -n "$DIFF"; then
4453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4454$as_echo "$DIFF" >&6; }
4455else
4456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4457$as_echo "no" >&6; }
4458fi
4459
4460
4461  test -n "$DIFF" && break
4462done
4463
4464
4465    if test "x$DIFF" = x; then
4466        if test "xgdiff diff" = x; then
4467          PROG_NAME=diff
4468        else
4469          PROG_NAME=gdiff diff
4470        fi
4471        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4472$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4473        as_fn_error $? "Cannot continue" "$LINENO" 5
4474    fi
4475
4476
4477
4478    for ac_prog in dirname
4479do
4480  # Extract the first word of "$ac_prog", so it can be a program name with args.
4481set dummy $ac_prog; ac_word=$2
4482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4483$as_echo_n "checking for $ac_word... " >&6; }
4484if test "${ac_cv_path_DIRNAME+set}" = set; then :
4485  $as_echo_n "(cached) " >&6
4486else
4487  case $DIRNAME in
4488  [\\/]* | ?:[\\/]*)
4489  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4490  ;;
4491  *)
4492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4493for as_dir in $PATH
4494do
4495  IFS=$as_save_IFS
4496  test -z "$as_dir" && as_dir=.
4497    for ac_exec_ext in '' $ac_executable_extensions; do
4498  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4499    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4501    break 2
4502  fi
4503done
4504  done
4505IFS=$as_save_IFS
4506
4507  ;;
4508esac
4509fi
4510DIRNAME=$ac_cv_path_DIRNAME
4511if test -n "$DIRNAME"; then
4512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4513$as_echo "$DIRNAME" >&6; }
4514else
4515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4516$as_echo "no" >&6; }
4517fi
4518
4519
4520  test -n "$DIRNAME" && break
4521done
4522
4523
4524    if test "x$DIRNAME" = x; then
4525        if test "xdirname" = x; then
4526          PROG_NAME=dirname
4527        else
4528          PROG_NAME=dirname
4529        fi
4530        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4531$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4532        as_fn_error $? "Cannot continue" "$LINENO" 5
4533    fi
4534
4535
4536
4537    for ac_prog in echo
4538do
4539  # Extract the first word of "$ac_prog", so it can be a program name with args.
4540set dummy $ac_prog; ac_word=$2
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4542$as_echo_n "checking for $ac_word... " >&6; }
4543if test "${ac_cv_path_ECHO+set}" = set; then :
4544  $as_echo_n "(cached) " >&6
4545else
4546  case $ECHO in
4547  [\\/]* | ?:[\\/]*)
4548  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4549  ;;
4550  *)
4551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4552for as_dir in $PATH
4553do
4554  IFS=$as_save_IFS
4555  test -z "$as_dir" && as_dir=.
4556    for ac_exec_ext in '' $ac_executable_extensions; do
4557  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4558    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4560    break 2
4561  fi
4562done
4563  done
4564IFS=$as_save_IFS
4565
4566  ;;
4567esac
4568fi
4569ECHO=$ac_cv_path_ECHO
4570if test -n "$ECHO"; then
4571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4572$as_echo "$ECHO" >&6; }
4573else
4574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4575$as_echo "no" >&6; }
4576fi
4577
4578
4579  test -n "$ECHO" && break
4580done
4581
4582
4583    if test "x$ECHO" = x; then
4584        if test "xecho" = x; then
4585          PROG_NAME=echo
4586        else
4587          PROG_NAME=echo
4588        fi
4589        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4590$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4591        as_fn_error $? "Cannot continue" "$LINENO" 5
4592    fi
4593
4594
4595
4596    for ac_prog in expr
4597do
4598  # Extract the first word of "$ac_prog", so it can be a program name with args.
4599set dummy $ac_prog; ac_word=$2
4600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4601$as_echo_n "checking for $ac_word... " >&6; }
4602if test "${ac_cv_path_EXPR+set}" = set; then :
4603  $as_echo_n "(cached) " >&6
4604else
4605  case $EXPR in
4606  [\\/]* | ?:[\\/]*)
4607  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4608  ;;
4609  *)
4610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4611for as_dir in $PATH
4612do
4613  IFS=$as_save_IFS
4614  test -z "$as_dir" && as_dir=.
4615    for ac_exec_ext in '' $ac_executable_extensions; do
4616  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4617    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4619    break 2
4620  fi
4621done
4622  done
4623IFS=$as_save_IFS
4624
4625  ;;
4626esac
4627fi
4628EXPR=$ac_cv_path_EXPR
4629if test -n "$EXPR"; then
4630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4631$as_echo "$EXPR" >&6; }
4632else
4633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4634$as_echo "no" >&6; }
4635fi
4636
4637
4638  test -n "$EXPR" && break
4639done
4640
4641
4642    if test "x$EXPR" = x; then
4643        if test "xexpr" = x; then
4644          PROG_NAME=expr
4645        else
4646          PROG_NAME=expr
4647        fi
4648        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4649$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4650        as_fn_error $? "Cannot continue" "$LINENO" 5
4651    fi
4652
4653
4654
4655    for ac_prog in file
4656do
4657  # Extract the first word of "$ac_prog", so it can be a program name with args.
4658set dummy $ac_prog; ac_word=$2
4659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4660$as_echo_n "checking for $ac_word... " >&6; }
4661if test "${ac_cv_path_FILE+set}" = set; then :
4662  $as_echo_n "(cached) " >&6
4663else
4664  case $FILE in
4665  [\\/]* | ?:[\\/]*)
4666  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4667  ;;
4668  *)
4669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4670for as_dir in $PATH
4671do
4672  IFS=$as_save_IFS
4673  test -z "$as_dir" && as_dir=.
4674    for ac_exec_ext in '' $ac_executable_extensions; do
4675  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4676    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4678    break 2
4679  fi
4680done
4681  done
4682IFS=$as_save_IFS
4683
4684  ;;
4685esac
4686fi
4687FILE=$ac_cv_path_FILE
4688if test -n "$FILE"; then
4689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4690$as_echo "$FILE" >&6; }
4691else
4692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4693$as_echo "no" >&6; }
4694fi
4695
4696
4697  test -n "$FILE" && break
4698done
4699
4700
4701    if test "x$FILE" = x; then
4702        if test "xfile" = x; then
4703          PROG_NAME=file
4704        else
4705          PROG_NAME=file
4706        fi
4707        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4708$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4709        as_fn_error $? "Cannot continue" "$LINENO" 5
4710    fi
4711
4712
4713
4714    for ac_prog in find
4715do
4716  # Extract the first word of "$ac_prog", so it can be a program name with args.
4717set dummy $ac_prog; ac_word=$2
4718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4719$as_echo_n "checking for $ac_word... " >&6; }
4720if test "${ac_cv_path_FIND+set}" = set; then :
4721  $as_echo_n "(cached) " >&6
4722else
4723  case $FIND in
4724  [\\/]* | ?:[\\/]*)
4725  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4726  ;;
4727  *)
4728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4729for as_dir in $PATH
4730do
4731  IFS=$as_save_IFS
4732  test -z "$as_dir" && as_dir=.
4733    for ac_exec_ext in '' $ac_executable_extensions; do
4734  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4735    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4737    break 2
4738  fi
4739done
4740  done
4741IFS=$as_save_IFS
4742
4743  ;;
4744esac
4745fi
4746FIND=$ac_cv_path_FIND
4747if test -n "$FIND"; then
4748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4749$as_echo "$FIND" >&6; }
4750else
4751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4752$as_echo "no" >&6; }
4753fi
4754
4755
4756  test -n "$FIND" && break
4757done
4758
4759
4760    if test "x$FIND" = x; then
4761        if test "xfind" = x; then
4762          PROG_NAME=find
4763        else
4764          PROG_NAME=find
4765        fi
4766        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4767$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4768        as_fn_error $? "Cannot continue" "$LINENO" 5
4769    fi
4770
4771
4772
4773    for ac_prog in head
4774do
4775  # Extract the first word of "$ac_prog", so it can be a program name with args.
4776set dummy $ac_prog; ac_word=$2
4777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4778$as_echo_n "checking for $ac_word... " >&6; }
4779if test "${ac_cv_path_HEAD+set}" = set; then :
4780  $as_echo_n "(cached) " >&6
4781else
4782  case $HEAD in
4783  [\\/]* | ?:[\\/]*)
4784  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4785  ;;
4786  *)
4787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in $PATH
4789do
4790  IFS=$as_save_IFS
4791  test -z "$as_dir" && as_dir=.
4792    for ac_exec_ext in '' $ac_executable_extensions; do
4793  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4794    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4796    break 2
4797  fi
4798done
4799  done
4800IFS=$as_save_IFS
4801
4802  ;;
4803esac
4804fi
4805HEAD=$ac_cv_path_HEAD
4806if test -n "$HEAD"; then
4807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4808$as_echo "$HEAD" >&6; }
4809else
4810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4811$as_echo "no" >&6; }
4812fi
4813
4814
4815  test -n "$HEAD" && break
4816done
4817
4818
4819    if test "x$HEAD" = x; then
4820        if test "xhead" = x; then
4821          PROG_NAME=head
4822        else
4823          PROG_NAME=head
4824        fi
4825        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4826$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4827        as_fn_error $? "Cannot continue" "$LINENO" 5
4828    fi
4829
4830
4831
4832    for ac_prog in ln
4833do
4834  # Extract the first word of "$ac_prog", so it can be a program name with args.
4835set dummy $ac_prog; ac_word=$2
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4837$as_echo_n "checking for $ac_word... " >&6; }
4838if test "${ac_cv_path_LN+set}" = set; then :
4839  $as_echo_n "(cached) " >&6
4840else
4841  case $LN in
4842  [\\/]* | ?:[\\/]*)
4843  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4844  ;;
4845  *)
4846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4847for as_dir in $PATH
4848do
4849  IFS=$as_save_IFS
4850  test -z "$as_dir" && as_dir=.
4851    for ac_exec_ext in '' $ac_executable_extensions; do
4852  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4853    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4855    break 2
4856  fi
4857done
4858  done
4859IFS=$as_save_IFS
4860
4861  ;;
4862esac
4863fi
4864LN=$ac_cv_path_LN
4865if test -n "$LN"; then
4866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4867$as_echo "$LN" >&6; }
4868else
4869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870$as_echo "no" >&6; }
4871fi
4872
4873
4874  test -n "$LN" && break
4875done
4876
4877
4878    if test "x$LN" = x; then
4879        if test "xln" = x; then
4880          PROG_NAME=ln
4881        else
4882          PROG_NAME=ln
4883        fi
4884        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4885$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4886        as_fn_error $? "Cannot continue" "$LINENO" 5
4887    fi
4888
4889
4890
4891    for ac_prog in ls
4892do
4893  # Extract the first word of "$ac_prog", so it can be a program name with args.
4894set dummy $ac_prog; ac_word=$2
4895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4896$as_echo_n "checking for $ac_word... " >&6; }
4897if test "${ac_cv_path_LS+set}" = set; then :
4898  $as_echo_n "(cached) " >&6
4899else
4900  case $LS in
4901  [\\/]* | ?:[\\/]*)
4902  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4903  ;;
4904  *)
4905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4906for as_dir in $PATH
4907do
4908  IFS=$as_save_IFS
4909  test -z "$as_dir" && as_dir=.
4910    for ac_exec_ext in '' $ac_executable_extensions; do
4911  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4912    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4914    break 2
4915  fi
4916done
4917  done
4918IFS=$as_save_IFS
4919
4920  ;;
4921esac
4922fi
4923LS=$ac_cv_path_LS
4924if test -n "$LS"; then
4925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4926$as_echo "$LS" >&6; }
4927else
4928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4929$as_echo "no" >&6; }
4930fi
4931
4932
4933  test -n "$LS" && break
4934done
4935
4936
4937    if test "x$LS" = x; then
4938        if test "xls" = x; then
4939          PROG_NAME=ls
4940        else
4941          PROG_NAME=ls
4942        fi
4943        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4944$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4945        as_fn_error $? "Cannot continue" "$LINENO" 5
4946    fi
4947
4948
4949
4950    for ac_prog in mkdir
4951do
4952  # Extract the first word of "$ac_prog", so it can be a program name with args.
4953set dummy $ac_prog; ac_word=$2
4954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4955$as_echo_n "checking for $ac_word... " >&6; }
4956if test "${ac_cv_path_MKDIR+set}" = set; then :
4957  $as_echo_n "(cached) " >&6
4958else
4959  case $MKDIR in
4960  [\\/]* | ?:[\\/]*)
4961  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4962  ;;
4963  *)
4964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4965for as_dir in $PATH
4966do
4967  IFS=$as_save_IFS
4968  test -z "$as_dir" && as_dir=.
4969    for ac_exec_ext in '' $ac_executable_extensions; do
4970  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4971    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4973    break 2
4974  fi
4975done
4976  done
4977IFS=$as_save_IFS
4978
4979  ;;
4980esac
4981fi
4982MKDIR=$ac_cv_path_MKDIR
4983if test -n "$MKDIR"; then
4984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4985$as_echo "$MKDIR" >&6; }
4986else
4987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4988$as_echo "no" >&6; }
4989fi
4990
4991
4992  test -n "$MKDIR" && break
4993done
4994
4995
4996    if test "x$MKDIR" = x; then
4997        if test "xmkdir" = x; then
4998          PROG_NAME=mkdir
4999        else
5000          PROG_NAME=mkdir
5001        fi
5002        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5003$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5004        as_fn_error $? "Cannot continue" "$LINENO" 5
5005    fi
5006
5007
5008
5009    for ac_prog in mktemp
5010do
5011  # Extract the first word of "$ac_prog", so it can be a program name with args.
5012set dummy $ac_prog; ac_word=$2
5013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5014$as_echo_n "checking for $ac_word... " >&6; }
5015if test "${ac_cv_path_MKTEMP+set}" = set; then :
5016  $as_echo_n "(cached) " >&6
5017else
5018  case $MKTEMP in
5019  [\\/]* | ?:[\\/]*)
5020  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5021  ;;
5022  *)
5023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024for as_dir in $PATH
5025do
5026  IFS=$as_save_IFS
5027  test -z "$as_dir" && as_dir=.
5028    for ac_exec_ext in '' $ac_executable_extensions; do
5029  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5030    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5032    break 2
5033  fi
5034done
5035  done
5036IFS=$as_save_IFS
5037
5038  ;;
5039esac
5040fi
5041MKTEMP=$ac_cv_path_MKTEMP
5042if test -n "$MKTEMP"; then
5043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5044$as_echo "$MKTEMP" >&6; }
5045else
5046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5047$as_echo "no" >&6; }
5048fi
5049
5050
5051  test -n "$MKTEMP" && break
5052done
5053
5054
5055    if test "x$MKTEMP" = x; then
5056        if test "xmktemp" = x; then
5057          PROG_NAME=mktemp
5058        else
5059          PROG_NAME=mktemp
5060        fi
5061        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5062$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5063        as_fn_error $? "Cannot continue" "$LINENO" 5
5064    fi
5065
5066
5067
5068    for ac_prog in mv
5069do
5070  # Extract the first word of "$ac_prog", so it can be a program name with args.
5071set dummy $ac_prog; ac_word=$2
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
5074if test "${ac_cv_path_MV+set}" = set; then :
5075  $as_echo_n "(cached) " >&6
5076else
5077  case $MV in
5078  [\\/]* | ?:[\\/]*)
5079  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5080  ;;
5081  *)
5082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5083for as_dir in $PATH
5084do
5085  IFS=$as_save_IFS
5086  test -z "$as_dir" && as_dir=.
5087    for ac_exec_ext in '' $ac_executable_extensions; do
5088  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5089    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5091    break 2
5092  fi
5093done
5094  done
5095IFS=$as_save_IFS
5096
5097  ;;
5098esac
5099fi
5100MV=$ac_cv_path_MV
5101if test -n "$MV"; then
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5103$as_echo "$MV" >&6; }
5104else
5105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106$as_echo "no" >&6; }
5107fi
5108
5109
5110  test -n "$MV" && break
5111done
5112
5113
5114    if test "x$MV" = x; then
5115        if test "xmv" = x; then
5116          PROG_NAME=mv
5117        else
5118          PROG_NAME=mv
5119        fi
5120        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5121$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5122        as_fn_error $? "Cannot continue" "$LINENO" 5
5123    fi
5124
5125
5126
5127    for ac_prog in printf
5128do
5129  # Extract the first word of "$ac_prog", so it can be a program name with args.
5130set dummy $ac_prog; ac_word=$2
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5132$as_echo_n "checking for $ac_word... " >&6; }
5133if test "${ac_cv_path_PRINTF+set}" = set; then :
5134  $as_echo_n "(cached) " >&6
5135else
5136  case $PRINTF in
5137  [\\/]* | ?:[\\/]*)
5138  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5139  ;;
5140  *)
5141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5142for as_dir in $PATH
5143do
5144  IFS=$as_save_IFS
5145  test -z "$as_dir" && as_dir=.
5146    for ac_exec_ext in '' $ac_executable_extensions; do
5147  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5148    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5150    break 2
5151  fi
5152done
5153  done
5154IFS=$as_save_IFS
5155
5156  ;;
5157esac
5158fi
5159PRINTF=$ac_cv_path_PRINTF
5160if test -n "$PRINTF"; then
5161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5162$as_echo "$PRINTF" >&6; }
5163else
5164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5165$as_echo "no" >&6; }
5166fi
5167
5168
5169  test -n "$PRINTF" && break
5170done
5171
5172
5173    if test "x$PRINTF" = x; then
5174        if test "xprintf" = x; then
5175          PROG_NAME=printf
5176        else
5177          PROG_NAME=printf
5178        fi
5179        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5180$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5181        as_fn_error $? "Cannot continue" "$LINENO" 5
5182    fi
5183
5184
5185
5186    for ac_prog in rm
5187do
5188  # Extract the first word of "$ac_prog", so it can be a program name with args.
5189set dummy $ac_prog; ac_word=$2
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5191$as_echo_n "checking for $ac_word... " >&6; }
5192if test "${ac_cv_path_RM+set}" = set; then :
5193  $as_echo_n "(cached) " >&6
5194else
5195  case $RM in
5196  [\\/]* | ?:[\\/]*)
5197  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5198  ;;
5199  *)
5200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5201for as_dir in $PATH
5202do
5203  IFS=$as_save_IFS
5204  test -z "$as_dir" && as_dir=.
5205    for ac_exec_ext in '' $ac_executable_extensions; do
5206  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5207    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5209    break 2
5210  fi
5211done
5212  done
5213IFS=$as_save_IFS
5214
5215  ;;
5216esac
5217fi
5218RM=$ac_cv_path_RM
5219if test -n "$RM"; then
5220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5221$as_echo "$RM" >&6; }
5222else
5223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5224$as_echo "no" >&6; }
5225fi
5226
5227
5228  test -n "$RM" && break
5229done
5230
5231
5232    if test "x$RM" = x; then
5233        if test "xrm" = x; then
5234          PROG_NAME=rm
5235        else
5236          PROG_NAME=rm
5237        fi
5238        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5239$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5240        as_fn_error $? "Cannot continue" "$LINENO" 5
5241    fi
5242
5243
5244
5245    for ac_prog in sh
5246do
5247  # Extract the first word of "$ac_prog", so it can be a program name with args.
5248set dummy $ac_prog; ac_word=$2
5249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5250$as_echo_n "checking for $ac_word... " >&6; }
5251if test "${ac_cv_path_SH+set}" = set; then :
5252  $as_echo_n "(cached) " >&6
5253else
5254  case $SH in
5255  [\\/]* | ?:[\\/]*)
5256  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5257  ;;
5258  *)
5259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5260for as_dir in $PATH
5261do
5262  IFS=$as_save_IFS
5263  test -z "$as_dir" && as_dir=.
5264    for ac_exec_ext in '' $ac_executable_extensions; do
5265  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5266    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5268    break 2
5269  fi
5270done
5271  done
5272IFS=$as_save_IFS
5273
5274  ;;
5275esac
5276fi
5277SH=$ac_cv_path_SH
5278if test -n "$SH"; then
5279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5280$as_echo "$SH" >&6; }
5281else
5282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283$as_echo "no" >&6; }
5284fi
5285
5286
5287  test -n "$SH" && break
5288done
5289
5290
5291    if test "x$SH" = x; then
5292        if test "xsh" = x; then
5293          PROG_NAME=sh
5294        else
5295          PROG_NAME=sh
5296        fi
5297        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5298$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5299        as_fn_error $? "Cannot continue" "$LINENO" 5
5300    fi
5301
5302
5303
5304    for ac_prog in sort
5305do
5306  # Extract the first word of "$ac_prog", so it can be a program name with args.
5307set dummy $ac_prog; ac_word=$2
5308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5309$as_echo_n "checking for $ac_word... " >&6; }
5310if test "${ac_cv_path_SORT+set}" = set; then :
5311  $as_echo_n "(cached) " >&6
5312else
5313  case $SORT in
5314  [\\/]* | ?:[\\/]*)
5315  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5316  ;;
5317  *)
5318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5319for as_dir in $PATH
5320do
5321  IFS=$as_save_IFS
5322  test -z "$as_dir" && as_dir=.
5323    for ac_exec_ext in '' $ac_executable_extensions; do
5324  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5325    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5327    break 2
5328  fi
5329done
5330  done
5331IFS=$as_save_IFS
5332
5333  ;;
5334esac
5335fi
5336SORT=$ac_cv_path_SORT
5337if test -n "$SORT"; then
5338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5339$as_echo "$SORT" >&6; }
5340else
5341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5342$as_echo "no" >&6; }
5343fi
5344
5345
5346  test -n "$SORT" && break
5347done
5348
5349
5350    if test "x$SORT" = x; then
5351        if test "xsort" = x; then
5352          PROG_NAME=sort
5353        else
5354          PROG_NAME=sort
5355        fi
5356        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5357$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5358        as_fn_error $? "Cannot continue" "$LINENO" 5
5359    fi
5360
5361
5362
5363    for ac_prog in tail
5364do
5365  # Extract the first word of "$ac_prog", so it can be a program name with args.
5366set dummy $ac_prog; ac_word=$2
5367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5368$as_echo_n "checking for $ac_word... " >&6; }
5369if test "${ac_cv_path_TAIL+set}" = set; then :
5370  $as_echo_n "(cached) " >&6
5371else
5372  case $TAIL in
5373  [\\/]* | ?:[\\/]*)
5374  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5375  ;;
5376  *)
5377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5378for as_dir in $PATH
5379do
5380  IFS=$as_save_IFS
5381  test -z "$as_dir" && as_dir=.
5382    for ac_exec_ext in '' $ac_executable_extensions; do
5383  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5384    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5386    break 2
5387  fi
5388done
5389  done
5390IFS=$as_save_IFS
5391
5392  ;;
5393esac
5394fi
5395TAIL=$ac_cv_path_TAIL
5396if test -n "$TAIL"; then
5397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5398$as_echo "$TAIL" >&6; }
5399else
5400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5401$as_echo "no" >&6; }
5402fi
5403
5404
5405  test -n "$TAIL" && break
5406done
5407
5408
5409    if test "x$TAIL" = x; then
5410        if test "xtail" = x; then
5411          PROG_NAME=tail
5412        else
5413          PROG_NAME=tail
5414        fi
5415        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5416$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5417        as_fn_error $? "Cannot continue" "$LINENO" 5
5418    fi
5419
5420
5421
5422    for ac_prog in tar
5423do
5424  # Extract the first word of "$ac_prog", so it can be a program name with args.
5425set dummy $ac_prog; ac_word=$2
5426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5427$as_echo_n "checking for $ac_word... " >&6; }
5428if test "${ac_cv_path_TAR+set}" = set; then :
5429  $as_echo_n "(cached) " >&6
5430else
5431  case $TAR in
5432  [\\/]* | ?:[\\/]*)
5433  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5434  ;;
5435  *)
5436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5437for as_dir in $PATH
5438do
5439  IFS=$as_save_IFS
5440  test -z "$as_dir" && as_dir=.
5441    for ac_exec_ext in '' $ac_executable_extensions; do
5442  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5443    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5445    break 2
5446  fi
5447done
5448  done
5449IFS=$as_save_IFS
5450
5451  ;;
5452esac
5453fi
5454TAR=$ac_cv_path_TAR
5455if test -n "$TAR"; then
5456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5457$as_echo "$TAR" >&6; }
5458else
5459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5460$as_echo "no" >&6; }
5461fi
5462
5463
5464  test -n "$TAR" && break
5465done
5466
5467
5468    if test "x$TAR" = x; then
5469        if test "xtar" = x; then
5470          PROG_NAME=tar
5471        else
5472          PROG_NAME=tar
5473        fi
5474        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5475$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5476        as_fn_error $? "Cannot continue" "$LINENO" 5
5477    fi
5478
5479
5480
5481    for ac_prog in tee
5482do
5483  # Extract the first word of "$ac_prog", so it can be a program name with args.
5484set dummy $ac_prog; ac_word=$2
5485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5486$as_echo_n "checking for $ac_word... " >&6; }
5487if test "${ac_cv_path_TEE+set}" = set; then :
5488  $as_echo_n "(cached) " >&6
5489else
5490  case $TEE in
5491  [\\/]* | ?:[\\/]*)
5492  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5493  ;;
5494  *)
5495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5496for as_dir in $PATH
5497do
5498  IFS=$as_save_IFS
5499  test -z "$as_dir" && as_dir=.
5500    for ac_exec_ext in '' $ac_executable_extensions; do
5501  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5502    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5504    break 2
5505  fi
5506done
5507  done
5508IFS=$as_save_IFS
5509
5510  ;;
5511esac
5512fi
5513TEE=$ac_cv_path_TEE
5514if test -n "$TEE"; then
5515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5516$as_echo "$TEE" >&6; }
5517else
5518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5519$as_echo "no" >&6; }
5520fi
5521
5522
5523  test -n "$TEE" && break
5524done
5525
5526
5527    if test "x$TEE" = x; then
5528        if test "xtee" = x; then
5529          PROG_NAME=tee
5530        else
5531          PROG_NAME=tee
5532        fi
5533        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5534$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5535        as_fn_error $? "Cannot continue" "$LINENO" 5
5536    fi
5537
5538
5539
5540    for ac_prog in touch
5541do
5542  # Extract the first word of "$ac_prog", so it can be a program name with args.
5543set dummy $ac_prog; ac_word=$2
5544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5545$as_echo_n "checking for $ac_word... " >&6; }
5546if test "${ac_cv_path_TOUCH+set}" = set; then :
5547  $as_echo_n "(cached) " >&6
5548else
5549  case $TOUCH in
5550  [\\/]* | ?:[\\/]*)
5551  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5552  ;;
5553  *)
5554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5555for as_dir in $PATH
5556do
5557  IFS=$as_save_IFS
5558  test -z "$as_dir" && as_dir=.
5559    for ac_exec_ext in '' $ac_executable_extensions; do
5560  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5561    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5563    break 2
5564  fi
5565done
5566  done
5567IFS=$as_save_IFS
5568
5569  ;;
5570esac
5571fi
5572TOUCH=$ac_cv_path_TOUCH
5573if test -n "$TOUCH"; then
5574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5575$as_echo "$TOUCH" >&6; }
5576else
5577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5578$as_echo "no" >&6; }
5579fi
5580
5581
5582  test -n "$TOUCH" && break
5583done
5584
5585
5586    if test "x$TOUCH" = x; then
5587        if test "xtouch" = x; then
5588          PROG_NAME=touch
5589        else
5590          PROG_NAME=touch
5591        fi
5592        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5593$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5594        as_fn_error $? "Cannot continue" "$LINENO" 5
5595    fi
5596
5597
5598
5599    for ac_prog in tr
5600do
5601  # Extract the first word of "$ac_prog", so it can be a program name with args.
5602set dummy $ac_prog; ac_word=$2
5603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5604$as_echo_n "checking for $ac_word... " >&6; }
5605if test "${ac_cv_path_TR+set}" = set; then :
5606  $as_echo_n "(cached) " >&6
5607else
5608  case $TR in
5609  [\\/]* | ?:[\\/]*)
5610  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5611  ;;
5612  *)
5613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5614for as_dir in $PATH
5615do
5616  IFS=$as_save_IFS
5617  test -z "$as_dir" && as_dir=.
5618    for ac_exec_ext in '' $ac_executable_extensions; do
5619  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5620    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5622    break 2
5623  fi
5624done
5625  done
5626IFS=$as_save_IFS
5627
5628  ;;
5629esac
5630fi
5631TR=$ac_cv_path_TR
5632if test -n "$TR"; then
5633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5634$as_echo "$TR" >&6; }
5635else
5636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5637$as_echo "no" >&6; }
5638fi
5639
5640
5641  test -n "$TR" && break
5642done
5643
5644
5645    if test "x$TR" = x; then
5646        if test "xtr" = x; then
5647          PROG_NAME=tr
5648        else
5649          PROG_NAME=tr
5650        fi
5651        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5652$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5653        as_fn_error $? "Cannot continue" "$LINENO" 5
5654    fi
5655
5656
5657
5658    for ac_prog in uname
5659do
5660  # Extract the first word of "$ac_prog", so it can be a program name with args.
5661set dummy $ac_prog; ac_word=$2
5662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663$as_echo_n "checking for $ac_word... " >&6; }
5664if test "${ac_cv_path_UNAME+set}" = set; then :
5665  $as_echo_n "(cached) " >&6
5666else
5667  case $UNAME in
5668  [\\/]* | ?:[\\/]*)
5669  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5670  ;;
5671  *)
5672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673for as_dir in $PATH
5674do
5675  IFS=$as_save_IFS
5676  test -z "$as_dir" && as_dir=.
5677    for ac_exec_ext in '' $ac_executable_extensions; do
5678  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5679    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5681    break 2
5682  fi
5683done
5684  done
5685IFS=$as_save_IFS
5686
5687  ;;
5688esac
5689fi
5690UNAME=$ac_cv_path_UNAME
5691if test -n "$UNAME"; then
5692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5693$as_echo "$UNAME" >&6; }
5694else
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696$as_echo "no" >&6; }
5697fi
5698
5699
5700  test -n "$UNAME" && break
5701done
5702
5703
5704    if test "x$UNAME" = x; then
5705        if test "xuname" = x; then
5706          PROG_NAME=uname
5707        else
5708          PROG_NAME=uname
5709        fi
5710        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5711$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5712        as_fn_error $? "Cannot continue" "$LINENO" 5
5713    fi
5714
5715
5716
5717    for ac_prog in uniq
5718do
5719  # Extract the first word of "$ac_prog", so it can be a program name with args.
5720set dummy $ac_prog; ac_word=$2
5721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5722$as_echo_n "checking for $ac_word... " >&6; }
5723if test "${ac_cv_path_UNIQ+set}" = set; then :
5724  $as_echo_n "(cached) " >&6
5725else
5726  case $UNIQ in
5727  [\\/]* | ?:[\\/]*)
5728  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5729  ;;
5730  *)
5731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5732for as_dir in $PATH
5733do
5734  IFS=$as_save_IFS
5735  test -z "$as_dir" && as_dir=.
5736    for ac_exec_ext in '' $ac_executable_extensions; do
5737  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5738    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5740    break 2
5741  fi
5742done
5743  done
5744IFS=$as_save_IFS
5745
5746  ;;
5747esac
5748fi
5749UNIQ=$ac_cv_path_UNIQ
5750if test -n "$UNIQ"; then
5751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5752$as_echo "$UNIQ" >&6; }
5753else
5754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5755$as_echo "no" >&6; }
5756fi
5757
5758
5759  test -n "$UNIQ" && break
5760done
5761
5762
5763    if test "x$UNIQ" = x; then
5764        if test "xuniq" = x; then
5765          PROG_NAME=uniq
5766        else
5767          PROG_NAME=uniq
5768        fi
5769        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5770$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5771        as_fn_error $? "Cannot continue" "$LINENO" 5
5772    fi
5773
5774
5775
5776    for ac_prog in wc
5777do
5778  # Extract the first word of "$ac_prog", so it can be a program name with args.
5779set dummy $ac_prog; ac_word=$2
5780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781$as_echo_n "checking for $ac_word... " >&6; }
5782if test "${ac_cv_path_WC+set}" = set; then :
5783  $as_echo_n "(cached) " >&6
5784else
5785  case $WC in
5786  [\\/]* | ?:[\\/]*)
5787  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5788  ;;
5789  *)
5790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793  IFS=$as_save_IFS
5794  test -z "$as_dir" && as_dir=.
5795    for ac_exec_ext in '' $ac_executable_extensions; do
5796  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5797    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799    break 2
5800  fi
5801done
5802  done
5803IFS=$as_save_IFS
5804
5805  ;;
5806esac
5807fi
5808WC=$ac_cv_path_WC
5809if test -n "$WC"; then
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5811$as_echo "$WC" >&6; }
5812else
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814$as_echo "no" >&6; }
5815fi
5816
5817
5818  test -n "$WC" && break
5819done
5820
5821
5822    if test "x$WC" = x; then
5823        if test "xwc" = x; then
5824          PROG_NAME=wc
5825        else
5826          PROG_NAME=wc
5827        fi
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5829$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5830        as_fn_error $? "Cannot continue" "$LINENO" 5
5831    fi
5832
5833
5834
5835    for ac_prog in which
5836do
5837  # Extract the first word of "$ac_prog", so it can be a program name with args.
5838set dummy $ac_prog; ac_word=$2
5839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5840$as_echo_n "checking for $ac_word... " >&6; }
5841if test "${ac_cv_path_WHICH+set}" = set; then :
5842  $as_echo_n "(cached) " >&6
5843else
5844  case $WHICH in
5845  [\\/]* | ?:[\\/]*)
5846  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5847  ;;
5848  *)
5849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5850for as_dir in $PATH
5851do
5852  IFS=$as_save_IFS
5853  test -z "$as_dir" && as_dir=.
5854    for ac_exec_ext in '' $ac_executable_extensions; do
5855  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5856    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5858    break 2
5859  fi
5860done
5861  done
5862IFS=$as_save_IFS
5863
5864  ;;
5865esac
5866fi
5867WHICH=$ac_cv_path_WHICH
5868if test -n "$WHICH"; then
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5870$as_echo "$WHICH" >&6; }
5871else
5872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873$as_echo "no" >&6; }
5874fi
5875
5876
5877  test -n "$WHICH" && break
5878done
5879
5880
5881    if test "x$WHICH" = x; then
5882        if test "xwhich" = x; then
5883          PROG_NAME=which
5884        else
5885          PROG_NAME=which
5886        fi
5887        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5888$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5889        as_fn_error $? "Cannot continue" "$LINENO" 5
5890    fi
5891
5892
5893
5894    for ac_prog in xargs
5895do
5896  # Extract the first word of "$ac_prog", so it can be a program name with args.
5897set dummy $ac_prog; ac_word=$2
5898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5899$as_echo_n "checking for $ac_word... " >&6; }
5900if test "${ac_cv_path_XARGS+set}" = set; then :
5901  $as_echo_n "(cached) " >&6
5902else
5903  case $XARGS in
5904  [\\/]* | ?:[\\/]*)
5905  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5906  ;;
5907  *)
5908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911  IFS=$as_save_IFS
5912  test -z "$as_dir" && as_dir=.
5913    for ac_exec_ext in '' $ac_executable_extensions; do
5914  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5915    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917    break 2
5918  fi
5919done
5920  done
5921IFS=$as_save_IFS
5922
5923  ;;
5924esac
5925fi
5926XARGS=$ac_cv_path_XARGS
5927if test -n "$XARGS"; then
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5929$as_echo "$XARGS" >&6; }
5930else
5931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933fi
5934
5935
5936  test -n "$XARGS" && break
5937done
5938
5939
5940    if test "x$XARGS" = x; then
5941        if test "xxargs" = x; then
5942          PROG_NAME=xargs
5943        else
5944          PROG_NAME=xargs
5945        fi
5946        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5947$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5948        as_fn_error $? "Cannot continue" "$LINENO" 5
5949    fi
5950
5951
5952
5953# Then required tools that require some special treatment.
5954for ac_prog in gawk mawk nawk awk
5955do
5956  # Extract the first word of "$ac_prog", so it can be a program name with args.
5957set dummy $ac_prog; ac_word=$2
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
5960if test "${ac_cv_prog_AWK+set}" = set; then :
5961  $as_echo_n "(cached) " >&6
5962else
5963  if test -n "$AWK"; then
5964  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5965else
5966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967for as_dir in $PATH
5968do
5969  IFS=$as_save_IFS
5970  test -z "$as_dir" && as_dir=.
5971    for ac_exec_ext in '' $ac_executable_extensions; do
5972  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5973    ac_cv_prog_AWK="$ac_prog"
5974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5975    break 2
5976  fi
5977done
5978  done
5979IFS=$as_save_IFS
5980
5981fi
5982fi
5983AWK=$ac_cv_prog_AWK
5984if test -n "$AWK"; then
5985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5986$as_echo "$AWK" >&6; }
5987else
5988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
5990fi
5991
5992
5993  test -n "$AWK" && break
5994done
5995
5996
5997    if test "x$AWK" = x; then
5998        if test "x" = x; then
5999          PROG_NAME=awk
6000        else
6001          PROG_NAME=
6002        fi
6003        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6004$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6005        as_fn_error $? "Cannot continue" "$LINENO" 5
6006    fi
6007
6008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6009$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6010if test "${ac_cv_path_GREP+set}" = set; then :
6011  $as_echo_n "(cached) " >&6
6012else
6013  if test -z "$GREP"; then
6014  ac_path_GREP_found=false
6015  # Loop through the user's path and test for each of PROGNAME-LIST
6016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6017for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6018do
6019  IFS=$as_save_IFS
6020  test -z "$as_dir" && as_dir=.
6021    for ac_prog in grep ggrep; do
6022    for ac_exec_ext in '' $ac_executable_extensions; do
6023      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6024      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6025# Check for GNU ac_path_GREP and select it if it is found.
6026  # Check for GNU $ac_path_GREP
6027case `"$ac_path_GREP" --version 2>&1` in
6028*GNU*)
6029  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6030*)
6031  ac_count=0
6032  $as_echo_n 0123456789 >"conftest.in"
6033  while :
6034  do
6035    cat "conftest.in" "conftest.in" >"conftest.tmp"
6036    mv "conftest.tmp" "conftest.in"
6037    cp "conftest.in" "conftest.nl"
6038    $as_echo 'GREP' >> "conftest.nl"
6039    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6040    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6041    as_fn_arith $ac_count + 1 && ac_count=$as_val
6042    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6043      # Best one so far, save it but keep looking for a better one
6044      ac_cv_path_GREP="$ac_path_GREP"
6045      ac_path_GREP_max=$ac_count
6046    fi
6047    # 10*(2^10) chars as input seems more than enough
6048    test $ac_count -gt 10 && break
6049  done
6050  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6051esac
6052
6053      $ac_path_GREP_found && break 3
6054    done
6055  done
6056  done
6057IFS=$as_save_IFS
6058  if test -z "$ac_cv_path_GREP"; then
6059    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6060  fi
6061else
6062  ac_cv_path_GREP=$GREP
6063fi
6064
6065fi
6066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6067$as_echo "$ac_cv_path_GREP" >&6; }
6068 GREP="$ac_cv_path_GREP"
6069
6070
6071
6072    if test "x$GREP" = x; then
6073        if test "x" = x; then
6074          PROG_NAME=grep
6075        else
6076          PROG_NAME=
6077        fi
6078        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6079$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6080        as_fn_error $? "Cannot continue" "$LINENO" 5
6081    fi
6082
6083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6084$as_echo_n "checking for egrep... " >&6; }
6085if test "${ac_cv_path_EGREP+set}" = set; then :
6086  $as_echo_n "(cached) " >&6
6087else
6088  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6089   then ac_cv_path_EGREP="$GREP -E"
6090   else
6091     if test -z "$EGREP"; then
6092  ac_path_EGREP_found=false
6093  # Loop through the user's path and test for each of PROGNAME-LIST
6094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6095for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6096do
6097  IFS=$as_save_IFS
6098  test -z "$as_dir" && as_dir=.
6099    for ac_prog in egrep; do
6100    for ac_exec_ext in '' $ac_executable_extensions; do
6101      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6102      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6103# Check for GNU ac_path_EGREP and select it if it is found.
6104  # Check for GNU $ac_path_EGREP
6105case `"$ac_path_EGREP" --version 2>&1` in
6106*GNU*)
6107  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6108*)
6109  ac_count=0
6110  $as_echo_n 0123456789 >"conftest.in"
6111  while :
6112  do
6113    cat "conftest.in" "conftest.in" >"conftest.tmp"
6114    mv "conftest.tmp" "conftest.in"
6115    cp "conftest.in" "conftest.nl"
6116    $as_echo 'EGREP' >> "conftest.nl"
6117    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6118    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6119    as_fn_arith $ac_count + 1 && ac_count=$as_val
6120    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6121      # Best one so far, save it but keep looking for a better one
6122      ac_cv_path_EGREP="$ac_path_EGREP"
6123      ac_path_EGREP_max=$ac_count
6124    fi
6125    # 10*(2^10) chars as input seems more than enough
6126    test $ac_count -gt 10 && break
6127  done
6128  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6129esac
6130
6131      $ac_path_EGREP_found && break 3
6132    done
6133  done
6134  done
6135IFS=$as_save_IFS
6136  if test -z "$ac_cv_path_EGREP"; then
6137    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6138  fi
6139else
6140  ac_cv_path_EGREP=$EGREP
6141fi
6142
6143   fi
6144fi
6145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6146$as_echo "$ac_cv_path_EGREP" >&6; }
6147 EGREP="$ac_cv_path_EGREP"
6148
6149
6150
6151    if test "x$EGREP" = x; then
6152        if test "x" = x; then
6153          PROG_NAME=egrep
6154        else
6155          PROG_NAME=
6156        fi
6157        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6158$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6159        as_fn_error $? "Cannot continue" "$LINENO" 5
6160    fi
6161
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6163$as_echo_n "checking for fgrep... " >&6; }
6164if test "${ac_cv_path_FGREP+set}" = set; then :
6165  $as_echo_n "(cached) " >&6
6166else
6167  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6168   then ac_cv_path_FGREP="$GREP -F"
6169   else
6170     if test -z "$FGREP"; then
6171  ac_path_FGREP_found=false
6172  # Loop through the user's path and test for each of PROGNAME-LIST
6173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6175do
6176  IFS=$as_save_IFS
6177  test -z "$as_dir" && as_dir=.
6178    for ac_prog in fgrep; do
6179    for ac_exec_ext in '' $ac_executable_extensions; do
6180      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6181      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6182# Check for GNU ac_path_FGREP and select it if it is found.
6183  # Check for GNU $ac_path_FGREP
6184case `"$ac_path_FGREP" --version 2>&1` in
6185*GNU*)
6186  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6187*)
6188  ac_count=0
6189  $as_echo_n 0123456789 >"conftest.in"
6190  while :
6191  do
6192    cat "conftest.in" "conftest.in" >"conftest.tmp"
6193    mv "conftest.tmp" "conftest.in"
6194    cp "conftest.in" "conftest.nl"
6195    $as_echo 'FGREP' >> "conftest.nl"
6196    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6197    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6198    as_fn_arith $ac_count + 1 && ac_count=$as_val
6199    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6200      # Best one so far, save it but keep looking for a better one
6201      ac_cv_path_FGREP="$ac_path_FGREP"
6202      ac_path_FGREP_max=$ac_count
6203    fi
6204    # 10*(2^10) chars as input seems more than enough
6205    test $ac_count -gt 10 && break
6206  done
6207  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6208esac
6209
6210      $ac_path_FGREP_found && break 3
6211    done
6212  done
6213  done
6214IFS=$as_save_IFS
6215  if test -z "$ac_cv_path_FGREP"; then
6216    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6217  fi
6218else
6219  ac_cv_path_FGREP=$FGREP
6220fi
6221
6222   fi
6223fi
6224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6225$as_echo "$ac_cv_path_FGREP" >&6; }
6226 FGREP="$ac_cv_path_FGREP"
6227
6228
6229
6230    if test "x$FGREP" = x; then
6231        if test "x" = x; then
6232          PROG_NAME=fgrep
6233        else
6234          PROG_NAME=
6235        fi
6236        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6237$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6238        as_fn_error $? "Cannot continue" "$LINENO" 5
6239    fi
6240
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6242$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6243if test "${ac_cv_path_SED+set}" = set; then :
6244  $as_echo_n "(cached) " >&6
6245else
6246            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6247     for ac_i in 1 2 3 4 5 6 7; do
6248       ac_script="$ac_script$as_nl$ac_script"
6249     done
6250     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6251     { ac_script=; unset ac_script;}
6252     if test -z "$SED"; then
6253  ac_path_SED_found=false
6254  # Loop through the user's path and test for each of PROGNAME-LIST
6255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6256for as_dir in $PATH
6257do
6258  IFS=$as_save_IFS
6259  test -z "$as_dir" && as_dir=.
6260    for ac_prog in sed gsed; do
6261    for ac_exec_ext in '' $ac_executable_extensions; do
6262      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6263      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6264# Check for GNU ac_path_SED and select it if it is found.
6265  # Check for GNU $ac_path_SED
6266case `"$ac_path_SED" --version 2>&1` in
6267*GNU*)
6268  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6269*)
6270  ac_count=0
6271  $as_echo_n 0123456789 >"conftest.in"
6272  while :
6273  do
6274    cat "conftest.in" "conftest.in" >"conftest.tmp"
6275    mv "conftest.tmp" "conftest.in"
6276    cp "conftest.in" "conftest.nl"
6277    $as_echo '' >> "conftest.nl"
6278    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6279    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6280    as_fn_arith $ac_count + 1 && ac_count=$as_val
6281    if test $ac_count -gt ${ac_path_SED_max-0}; then
6282      # Best one so far, save it but keep looking for a better one
6283      ac_cv_path_SED="$ac_path_SED"
6284      ac_path_SED_max=$ac_count
6285    fi
6286    # 10*(2^10) chars as input seems more than enough
6287    test $ac_count -gt 10 && break
6288  done
6289  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6290esac
6291
6292      $ac_path_SED_found && break 3
6293    done
6294  done
6295  done
6296IFS=$as_save_IFS
6297  if test -z "$ac_cv_path_SED"; then
6298    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6299  fi
6300else
6301  ac_cv_path_SED=$SED
6302fi
6303
6304fi
6305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6306$as_echo "$ac_cv_path_SED" >&6; }
6307 SED="$ac_cv_path_SED"
6308  rm -f conftest.sed
6309
6310
6311    if test "x$SED" = x; then
6312        if test "x" = x; then
6313          PROG_NAME=sed
6314        else
6315          PROG_NAME=
6316        fi
6317        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6318$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6319        as_fn_error $? "Cannot continue" "$LINENO" 5
6320    fi
6321
6322
6323for ac_prog in nawk gawk awk
6324do
6325  # Extract the first word of "$ac_prog", so it can be a program name with args.
6326set dummy $ac_prog; ac_word=$2
6327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6328$as_echo_n "checking for $ac_word... " >&6; }
6329if test "${ac_cv_path_NAWK+set}" = set; then :
6330  $as_echo_n "(cached) " >&6
6331else
6332  case $NAWK in
6333  [\\/]* | ?:[\\/]*)
6334  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6335  ;;
6336  *)
6337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6338for as_dir in $PATH
6339do
6340  IFS=$as_save_IFS
6341  test -z "$as_dir" && as_dir=.
6342    for ac_exec_ext in '' $ac_executable_extensions; do
6343  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6344    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6346    break 2
6347  fi
6348done
6349  done
6350IFS=$as_save_IFS
6351
6352  ;;
6353esac
6354fi
6355NAWK=$ac_cv_path_NAWK
6356if test -n "$NAWK"; then
6357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6358$as_echo "$NAWK" >&6; }
6359else
6360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6361$as_echo "no" >&6; }
6362fi
6363
6364
6365  test -n "$NAWK" && break
6366done
6367
6368
6369    if test "x$NAWK" = x; then
6370        if test "x" = x; then
6371          PROG_NAME=nawk
6372        else
6373          PROG_NAME=
6374        fi
6375        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6376$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6377        as_fn_error $? "Cannot continue" "$LINENO" 5
6378    fi
6379
6380
6381# Always force rm.
6382RM="$RM -f"
6383
6384# pwd behaves differently on various platforms and some don't support the -L flag.
6385# Always use the bash builtin pwd to get uniform behavior.
6386THEPWDCMD=pwd
6387
6388# These are not required on all platforms
6389# Extract the first word of "cygpath", so it can be a program name with args.
6390set dummy cygpath; ac_word=$2
6391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6392$as_echo_n "checking for $ac_word... " >&6; }
6393if test "${ac_cv_path_CYGPATH+set}" = set; then :
6394  $as_echo_n "(cached) " >&6
6395else
6396  case $CYGPATH in
6397  [\\/]* | ?:[\\/]*)
6398  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6399  ;;
6400  *)
6401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6402for as_dir in $PATH
6403do
6404  IFS=$as_save_IFS
6405  test -z "$as_dir" && as_dir=.
6406    for ac_exec_ext in '' $ac_executable_extensions; do
6407  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6408    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6410    break 2
6411  fi
6412done
6413  done
6414IFS=$as_save_IFS
6415
6416  ;;
6417esac
6418fi
6419CYGPATH=$ac_cv_path_CYGPATH
6420if test -n "$CYGPATH"; then
6421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6422$as_echo "$CYGPATH" >&6; }
6423else
6424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6425$as_echo "no" >&6; }
6426fi
6427
6428
6429# Extract the first word of "readlink", so it can be a program name with args.
6430set dummy readlink; ac_word=$2
6431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6432$as_echo_n "checking for $ac_word... " >&6; }
6433if test "${ac_cv_path_READLINK+set}" = set; then :
6434  $as_echo_n "(cached) " >&6
6435else
6436  case $READLINK in
6437  [\\/]* | ?:[\\/]*)
6438  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6439  ;;
6440  *)
6441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6442for as_dir in $PATH
6443do
6444  IFS=$as_save_IFS
6445  test -z "$as_dir" && as_dir=.
6446    for ac_exec_ext in '' $ac_executable_extensions; do
6447  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6448    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6450    break 2
6451  fi
6452done
6453  done
6454IFS=$as_save_IFS
6455
6456  ;;
6457esac
6458fi
6459READLINK=$ac_cv_path_READLINK
6460if test -n "$READLINK"; then
6461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6462$as_echo "$READLINK" >&6; }
6463else
6464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6465$as_echo "no" >&6; }
6466fi
6467
6468
6469# Extract the first word of "df", so it can be a program name with args.
6470set dummy df; ac_word=$2
6471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6472$as_echo_n "checking for $ac_word... " >&6; }
6473if test "${ac_cv_path_DF+set}" = set; then :
6474  $as_echo_n "(cached) " >&6
6475else
6476  case $DF in
6477  [\\/]* | ?:[\\/]*)
6478  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6479  ;;
6480  *)
6481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6482for as_dir in $PATH
6483do
6484  IFS=$as_save_IFS
6485  test -z "$as_dir" && as_dir=.
6486    for ac_exec_ext in '' $ac_executable_extensions; do
6487  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6488    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6490    break 2
6491  fi
6492done
6493  done
6494IFS=$as_save_IFS
6495
6496  ;;
6497esac
6498fi
6499DF=$ac_cv_path_DF
6500if test -n "$DF"; then
6501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6502$as_echo "$DF" >&6; }
6503else
6504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6505$as_echo "no" >&6; }
6506fi
6507
6508
6509# Extract the first word of "SetFile", so it can be a program name with args.
6510set dummy SetFile; ac_word=$2
6511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6512$as_echo_n "checking for $ac_word... " >&6; }
6513if test "${ac_cv_path_SETFILE+set}" = set; then :
6514  $as_echo_n "(cached) " >&6
6515else
6516  case $SETFILE in
6517  [\\/]* | ?:[\\/]*)
6518  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6519  ;;
6520  *)
6521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6522for as_dir in $PATH
6523do
6524  IFS=$as_save_IFS
6525  test -z "$as_dir" && as_dir=.
6526    for ac_exec_ext in '' $ac_executable_extensions; do
6527  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6528    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6530    break 2
6531  fi
6532done
6533  done
6534IFS=$as_save_IFS
6535
6536  ;;
6537esac
6538fi
6539SETFILE=$ac_cv_path_SETFILE
6540if test -n "$SETFILE"; then
6541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6542$as_echo "$SETFILE" >&6; }
6543else
6544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6545$as_echo "no" >&6; }
6546fi
6547
6548
6549
6550
6551# Now we can determine OpenJDK build and target platforms. This is required to
6552# have early on.
6553# Make sure we can run config.sub.
6554$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6555  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6556
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6558$as_echo_n "checking build system type... " >&6; }
6559if test "${ac_cv_build+set}" = set; then :
6560  $as_echo_n "(cached) " >&6
6561else
6562  ac_build_alias=$build_alias
6563test "x$ac_build_alias" = x &&
6564  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6565test "x$ac_build_alias" = x &&
6566  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6567ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6568  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6569
6570fi
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6572$as_echo "$ac_cv_build" >&6; }
6573case $ac_cv_build in
6574*-*-*) ;;
6575*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6576esac
6577build=$ac_cv_build
6578ac_save_IFS=$IFS; IFS='-'
6579set x $ac_cv_build
6580shift
6581build_cpu=$1
6582build_vendor=$2
6583shift; shift
6584# Remember, the first character of IFS is used to create $*,
6585# except with old shells:
6586build_os=$*
6587IFS=$ac_save_IFS
6588case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6589
6590
6591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6592$as_echo_n "checking host system type... " >&6; }
6593if test "${ac_cv_host+set}" = set; then :
6594  $as_echo_n "(cached) " >&6
6595else
6596  if test "x$host_alias" = x; then
6597  ac_cv_host=$ac_cv_build
6598else
6599  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6600    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6601fi
6602
6603fi
6604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6605$as_echo "$ac_cv_host" >&6; }
6606case $ac_cv_host in
6607*-*-*) ;;
6608*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6609esac
6610host=$ac_cv_host
6611ac_save_IFS=$IFS; IFS='-'
6612set x $ac_cv_host
6613shift
6614host_cpu=$1
6615host_vendor=$2
6616shift; shift
6617# Remember, the first character of IFS is used to create $*,
6618# except with old shells:
6619host_os=$*
6620IFS=$ac_save_IFS
6621case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6622
6623
6624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6625$as_echo_n "checking target system type... " >&6; }
6626if test "${ac_cv_target+set}" = set; then :
6627  $as_echo_n "(cached) " >&6
6628else
6629  if test "x$target_alias" = x; then
6630  ac_cv_target=$ac_cv_host
6631else
6632  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6633    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6634fi
6635
6636fi
6637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6638$as_echo "$ac_cv_target" >&6; }
6639case $ac_cv_target in
6640*-*-*) ;;
6641*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6642esac
6643target=$ac_cv_target
6644ac_save_IFS=$IFS; IFS='-'
6645set x $ac_cv_target
6646shift
6647target_cpu=$1
6648target_vendor=$2
6649shift; shift
6650# Remember, the first character of IFS is used to create $*,
6651# except with old shells:
6652target_os=$*
6653IFS=$ac_save_IFS
6654case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6655
6656
6657# The aliases save the names the user supplied, while $host etc.
6658# will get canonicalized.
6659test -n "$target_alias" &&
6660  test "$program_prefix$program_suffix$program_transform_name" = \
6661    NONENONEs,x,x, &&
6662  program_prefix=${target_alias}-
6663
6664# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6665# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6666# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6667# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6668# to use the configure naming style.
6669
6670
6671
6672
6673
6674    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6675    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6676    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6677    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6678    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6679    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6680
6681
6682
6683    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6684
6685  case "$build_os" in
6686    *linux*)
6687      VAR_OS=linux
6688      VAR_OS_API=posix
6689      VAR_OS_ENV=linux
6690      ;;
6691    *solaris*)
6692      VAR_OS=solaris
6693      VAR_OS_API=posix
6694      VAR_OS_ENV=solaris
6695      ;;
6696    *darwin*)
6697      VAR_OS=macosx
6698      VAR_OS_API=posix
6699      VAR_OS_ENV=macosx
6700      ;;
6701    *bsd*)
6702      VAR_OS=bsd
6703      VAR_OS_API=posix
6704      VAR_OS_ENV=bsd
6705      ;;
6706    *cygwin*)
6707      VAR_OS=windows
6708      VAR_OS_API=winapi
6709      VAR_OS_ENV=windows.cygwin
6710      ;;
6711    *mingw*)
6712      VAR_OS=windows
6713      VAR_OS_API=winapi
6714      VAR_OS_ENV=windows.msys
6715      ;;
6716    *)
6717      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6718      ;;
6719  esac
6720
6721
6722  # First argument is the cpu name from the trip/quad
6723  case "$build_cpu" in
6724    x86_64)
6725      VAR_CPU=x86_64
6726      VAR_CPU_ARCH=x86
6727      VAR_CPU_BITS=64
6728      VAR_CPU_ENDIAN=little
6729      ;;
6730    i?86)
6731      VAR_CPU=x86
6732      VAR_CPU_ARCH=x86
6733      VAR_CPU_BITS=32
6734      VAR_CPU_ENDIAN=little
6735      ;;
6736    arm*)
6737      VAR_CPU=arm
6738      VAR_CPU_ARCH=arm
6739      VAR_CPU_BITS=32
6740      VAR_CPU_ENDIAN=little
6741      ;;
6742    powerpc)
6743      VAR_CPU=ppc
6744      VAR_CPU_ARCH=ppc
6745      VAR_CPU_BITS=32
6746      VAR_CPU_ENDIAN=big
6747       ;;
6748    powerpc64)
6749      VAR_CPU=ppc64
6750      VAR_CPU_ARCH=ppc
6751      VAR_CPU_BITS=64
6752      VAR_CPU_ENDIAN=big
6753       ;;
6754    sparc)
6755      VAR_CPU=sparc
6756      VAR_CPU_ARCH=sparc
6757      VAR_CPU_BITS=32
6758      VAR_CPU_ENDIAN=big
6759       ;;
6760    sparcv9)
6761      VAR_CPU=sparcv9
6762      VAR_CPU_ARCH=sparc
6763      VAR_CPU_BITS=64
6764      VAR_CPU_ENDIAN=big
6765       ;;
6766    *)
6767      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6768      ;;
6769  esac
6770
6771    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6772    OPENJDK_BUILD_OS="$VAR_OS"
6773    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6774    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6775    OPENJDK_BUILD_CPU="$VAR_CPU"
6776    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6777    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6778    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6779
6780
6781
6782
6783
6784
6785
6786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6787$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6789$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6790
6791    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6792
6793  case "$host_os" in
6794    *linux*)
6795      VAR_OS=linux
6796      VAR_OS_API=posix
6797      VAR_OS_ENV=linux
6798      ;;
6799    *solaris*)
6800      VAR_OS=solaris
6801      VAR_OS_API=posix
6802      VAR_OS_ENV=solaris
6803      ;;
6804    *darwin*)
6805      VAR_OS=macosx
6806      VAR_OS_API=posix
6807      VAR_OS_ENV=macosx
6808      ;;
6809    *bsd*)
6810      VAR_OS=bsd
6811      VAR_OS_API=posix
6812      VAR_OS_ENV=bsd
6813      ;;
6814    *cygwin*)
6815      VAR_OS=windows
6816      VAR_OS_API=winapi
6817      VAR_OS_ENV=windows.cygwin
6818      ;;
6819    *mingw*)
6820      VAR_OS=windows
6821      VAR_OS_API=winapi
6822      VAR_OS_ENV=windows.msys
6823      ;;
6824    *)
6825      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6826      ;;
6827  esac
6828
6829
6830  # First argument is the cpu name from the trip/quad
6831  case "$host_cpu" in
6832    x86_64)
6833      VAR_CPU=x86_64
6834      VAR_CPU_ARCH=x86
6835      VAR_CPU_BITS=64
6836      VAR_CPU_ENDIAN=little
6837      ;;
6838    i?86)
6839      VAR_CPU=x86
6840      VAR_CPU_ARCH=x86
6841      VAR_CPU_BITS=32
6842      VAR_CPU_ENDIAN=little
6843      ;;
6844    arm*)
6845      VAR_CPU=arm
6846      VAR_CPU_ARCH=arm
6847      VAR_CPU_BITS=32
6848      VAR_CPU_ENDIAN=little
6849      ;;
6850    powerpc)
6851      VAR_CPU=ppc
6852      VAR_CPU_ARCH=ppc
6853      VAR_CPU_BITS=32
6854      VAR_CPU_ENDIAN=big
6855       ;;
6856    powerpc64)
6857      VAR_CPU=ppc64
6858      VAR_CPU_ARCH=ppc
6859      VAR_CPU_BITS=64
6860      VAR_CPU_ENDIAN=big
6861       ;;
6862    sparc)
6863      VAR_CPU=sparc
6864      VAR_CPU_ARCH=sparc
6865      VAR_CPU_BITS=32
6866      VAR_CPU_ENDIAN=big
6867       ;;
6868    sparcv9)
6869      VAR_CPU=sparcv9
6870      VAR_CPU_ARCH=sparc
6871      VAR_CPU_BITS=64
6872      VAR_CPU_ENDIAN=big
6873       ;;
6874    *)
6875      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6876      ;;
6877  esac
6878
6879    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6880    OPENJDK_TARGET_OS="$VAR_OS"
6881    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6882    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6883    OPENJDK_TARGET_CPU="$VAR_CPU"
6884    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6885    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6886    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6887
6888
6889
6890
6891
6892
6893
6894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6895$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6897$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6898
6899
6900
6901# Check whether --with-target-bits was given.
6902if test "${with_target_bits+set}" = set; then :
6903  withval=$with_target_bits;
6904fi
6905
6906
6907  # We have three types of compiles:
6908  # native  == normal compilation, target system == build system
6909  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6910  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6911  #
6912  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6913    # We're doing a proper cross-compilation
6914    COMPILE_TYPE="cross"
6915  else
6916    COMPILE_TYPE="native"
6917  fi
6918
6919  if test "x$with_target_bits" != x; then
6920    if test "x$COMPILE_TYPE" = "xcross"; then
6921      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6922    fi
6923
6924    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6925      # A reduced build is requested
6926      COMPILE_TYPE="reduced"
6927      OPENJDK_TARGET_CPU_BITS=32
6928      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6929        OPENJDK_TARGET_CPU=x86
6930      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6931        OPENJDK_TARGET_CPU=sparc
6932      else
6933        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6934      fi
6935    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6936      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
6937    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6938      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6939$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6940    else
6941      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6942    fi
6943  fi
6944
6945
6946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6947$as_echo_n "checking compilation type... " >&6; }
6948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6949$as_echo "$COMPILE_TYPE" >&6; }
6950
6951
6952    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6953       REQUIRED_OS_NAME=SunOS
6954       REQUIRED_OS_VERSION=5.10
6955    fi
6956    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6957       REQUIRED_OS_NAME=Linux
6958       REQUIRED_OS_VERSION=2.6
6959    fi
6960    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6961        REQUIRED_OS_NAME=Windows
6962        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6963            REQUIRED_OS_VERSION=5.2
6964        else
6965            REQUIRED_OS_VERSION=5.1
6966        fi
6967    fi
6968    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6969        REQUIRED_OS_NAME=Darwin
6970        REQUIRED_OS_VERSION=11.2
6971    fi
6972
6973
6974
6975
6976
6977    # Also store the legacy naming of the cpu.
6978    # Ie i586 and amd64 instead of x86 and x86_64
6979    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6980    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6981      OPENJDK_TARGET_CPU_LEGACY="i586"
6982    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6983      # On all platforms except MacOSX replace x86_64 with amd64.
6984      OPENJDK_TARGET_CPU_LEGACY="amd64"
6985    fi
6986
6987
6988    # And the second legacy naming of the cpu.
6989    # Ie i386 and amd64 instead of x86 and x86_64.
6990    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6991    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6992      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6993    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6994      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6995    fi
6996
6997
6998    # This is the name of the cpu (but using i386 and amd64 instead of
6999    # x86 and x86_64, respectively), preceeded by a /, to be used when
7000    # locating libraries. On macosx, it's empty, though.
7001    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7002    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7003        OPENJDK_TARGET_CPU_LIBDIR=""
7004    fi
7005
7006
7007    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7008    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7009    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7010    OPENJDK_TARGET_CPU_ISADIR=""
7011    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7012      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7013          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7014      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7015          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7016      fi
7017    fi
7018
7019
7020    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7021    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7022    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7023      # On linux only, we replace x86 with i386.
7024      OPENJDK_TARGET_CPU_OSARCH="i386"
7025    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7026      # On all platforms except macosx, we replace x86_64 with amd64.
7027      OPENJDK_TARGET_CPU_OSARCH="amd64"
7028    fi
7029
7030
7031    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7032    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7033      OPENJDK_TARGET_CPU_JLI="i386"
7034    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7035      # On all platforms except macosx, we replace x86_64 with amd64.
7036      OPENJDK_TARGET_CPU_JLI="amd64"
7037    fi
7038    # Now setup the -D flags for building libjli.
7039    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7040    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7041      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7042        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7043      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7044        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7045      fi
7046    fi
7047
7048
7049    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7050    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7051        OPENJDK_TARGET_OS_API_DIR="solaris"
7052    fi
7053    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7054        OPENJDK_TARGET_OS_API_DIR="windows"
7055    fi
7056
7057
7058    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7059        A_LP64="LP64:="
7060        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7061        # unpack200.exe
7062        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7063            ADD_LP64="-D_LP64=1"
7064        fi
7065    fi
7066    LP64=$A_LP64
7067
7068
7069    if test "x$COMPILE_TYPE" = "xcross"; then
7070      # FIXME: ... or should this include reduced builds..?
7071      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7072    else
7073      DEFINE_CROSS_COMPILE_ARCH=""
7074    fi
7075
7076
7077    # ZERO_ARCHDEF is used to enable architecture-specific code
7078    case "${OPENJDK_TARGET_CPU}" in
7079      ppc*)    ZERO_ARCHDEF=PPC   ;;
7080      s390*)   ZERO_ARCHDEF=S390  ;;
7081      sparc*)  ZERO_ARCHDEF=SPARC ;;
7082      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7083      x86)     ZERO_ARCHDEF=IA32  ;;
7084      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7085    esac
7086
7087
7088
7089
7090
7091# Continue setting up basic stuff. Most remaining code require fundamental tools.
7092
7093# Locate the directory of this script.
7094SCRIPT="$0"
7095AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7096
7097# Where is the source? It is located two levels above the configure script.
7098CURDIR="$PWD"
7099cd "$AUTOCONF_DIR/../.."
7100SRC_ROOT="`$THEPWDCMD -L`"
7101
7102if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7103  PATH_SEP=";"
7104
7105  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7106  if test $SRC_ROOT_LENGTH -gt 100; then
7107      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7108  fi
7109
7110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7112$as_echo_n "checking cygwin release... " >&6; }
7113    CYGWIN_VERSION=`$UNAME -r`
7114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7115$as_echo "$CYGWIN_VERSION" >&6; }
7116    WINDOWS_ENV_VENDOR='cygwin'
7117    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7118
7119    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7120    if test "x$CYGWIN_VERSION_OK" = x; then
7121      { $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
7122$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;}
7123      as_fn_error $? "Cannot continue" "$LINENO" 5
7124    fi
7125    if test "x$CYGPATH" = x; then
7126        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7127    fi
7128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7129$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7130    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7131    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7132    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7133    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7135$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7136    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7137    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7138    if test "x$test_cygdrive_prefix" = x; then
7139        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7140    fi
7141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7143$as_echo_n "checking msys release... " >&6; }
7144    MSYS_VERSION=`$UNAME -r`
7145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7146$as_echo "$MSYS_VERSION" >&6; }
7147
7148    WINDOWS_ENV_VENDOR='msys'
7149    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7150
7151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7152$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7153    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7154    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7155
7156  windows_path="$MSYS_ROOT_PATH"
7157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7158    unix_path=`$CYGPATH -u "$windows_path"`
7159    MSYS_ROOT_PATH="$unix_path"
7160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7162    MSYS_ROOT_PATH="$unix_path"
7163  fi
7164
7165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7166$as_echo "$MSYS_ROOT_PATH" >&6; }
7167    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7168  else
7169    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7170  fi
7171
7172  # Test if windows or unix (cygwin/msys) find is first in path.
7173  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7174$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7175  FIND_BINARY_OUTPUT=`find --version 2>&1`
7176  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7178$as_echo "unix style" >&6; }
7179  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7181$as_echo "Windows" >&6; }
7182    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7183$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7184    { $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
7185$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7186    as_fn_error $? "Cannot continue" "$LINENO" 5
7187  else
7188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7189$as_echo "unknown" >&6; }
7190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7191$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7192  fi
7193
7194else
7195  PATH_SEP=":"
7196fi
7197
7198
7199
7200cd "$CURDIR"
7201
7202
7203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7204
7205  # Input might be given as Windows format, start by converting to
7206  # unix format.
7207  path="$SRC_ROOT"
7208  new_path=`$CYGPATH -u "$path"`
7209
7210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7213  # "foo.exe" is OK but "foo" is an error.
7214  #
7215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7216  # It is also a way to make sure we got the proper file name for the real test later on.
7217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7218  if test "x$test_shortpath" = x; then
7219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7220$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7221    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7222  fi
7223
7224  # Call helper function which possibly converts this using DOS-style short mode.
7225  # If so, the updated path is stored in $new_path.
7226
7227  input_path="$new_path"
7228  # Check if we need to convert this using DOS-style short mode. If the path
7229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7230  # take no chances and rewrite it.
7231  # Note: m4 eats our [], so we need to use [ and ] instead.
7232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7233  if test "x$has_forbidden_chars" != x; then
7234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7238      # Going to short mode and back again did indeed matter. Since short mode is
7239      # case insensitive, let's make it lowercase to improve readability.
7240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7241      # Now convert it back to Unix-stile (cygpath)
7242      input_path=`$CYGPATH -u "$shortmode_path"`
7243      new_path="$input_path"
7244    fi
7245  fi
7246
7247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7248  if test "x$test_cygdrive_prefix" = x; then
7249    # As a simple fix, exclude /usr/bin since it's not a real path.
7250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7252      # a path prefixed by /cygdrive for fixpath to work.
7253      new_path="$CYGWIN_ROOT_PATH$input_path"
7254    fi
7255  fi
7256
7257
7258  if test "x$path" != "x$new_path"; then
7259    SRC_ROOT="$new_path"
7260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7261$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7262  fi
7263
7264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7265
7266  path="$SRC_ROOT"
7267  has_colon=`$ECHO $path | $GREP ^.:`
7268  new_path="$path"
7269  if test "x$has_colon" = x; then
7270    # Not in mixed or Windows style, start by that.
7271    new_path=`cmd //c echo $path`
7272  fi
7273
7274
7275  input_path="$new_path"
7276  # Check if we need to convert this using DOS-style short mode. If the path
7277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7278  # take no chances and rewrite it.
7279  # Note: m4 eats our [], so we need to use [ and ] instead.
7280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7281  if test "x$has_forbidden_chars" != x; then
7282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7284  fi
7285
7286
7287  windows_path="$new_path"
7288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7289    unix_path=`$CYGPATH -u "$windows_path"`
7290    new_path="$unix_path"
7291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7293    new_path="$unix_path"
7294  fi
7295
7296  if test "x$path" != "x$new_path"; then
7297    SRC_ROOT="$new_path"
7298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7299$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7300  fi
7301
7302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7304
7305  else
7306    # We're on a posix platform. Hooray! :)
7307    path="$SRC_ROOT"
7308    has_space=`$ECHO "$path" | $GREP " "`
7309    if test "x$has_space" != x; then
7310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7311$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7312      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7313    fi
7314
7315    # Use eval to expand a potential ~
7316    eval path="$path"
7317    if test ! -f "$path" && test ! -d "$path"; then
7318      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7319    fi
7320
7321    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7322  fi
7323
7324
7325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7326
7327  # Input might be given as Windows format, start by converting to
7328  # unix format.
7329  path="$CURDIR"
7330  new_path=`$CYGPATH -u "$path"`
7331
7332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7335  # "foo.exe" is OK but "foo" is an error.
7336  #
7337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7338  # It is also a way to make sure we got the proper file name for the real test later on.
7339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7340  if test "x$test_shortpath" = x; then
7341    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7342$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7343    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7344  fi
7345
7346  # Call helper function which possibly converts this using DOS-style short mode.
7347  # If so, the updated path is stored in $new_path.
7348
7349  input_path="$new_path"
7350  # Check if we need to convert this using DOS-style short mode. If the path
7351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7352  # take no chances and rewrite it.
7353  # Note: m4 eats our [], so we need to use [ and ] instead.
7354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7355  if test "x$has_forbidden_chars" != x; then
7356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7360      # Going to short mode and back again did indeed matter. Since short mode is
7361      # case insensitive, let's make it lowercase to improve readability.
7362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7363      # Now convert it back to Unix-stile (cygpath)
7364      input_path=`$CYGPATH -u "$shortmode_path"`
7365      new_path="$input_path"
7366    fi
7367  fi
7368
7369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7370  if test "x$test_cygdrive_prefix" = x; then
7371    # As a simple fix, exclude /usr/bin since it's not a real path.
7372    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7374      # a path prefixed by /cygdrive for fixpath to work.
7375      new_path="$CYGWIN_ROOT_PATH$input_path"
7376    fi
7377  fi
7378
7379
7380  if test "x$path" != "x$new_path"; then
7381    CURDIR="$new_path"
7382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7383$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7384  fi
7385
7386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7387
7388  path="$CURDIR"
7389  has_colon=`$ECHO $path | $GREP ^.:`
7390  new_path="$path"
7391  if test "x$has_colon" = x; then
7392    # Not in mixed or Windows style, start by that.
7393    new_path=`cmd //c echo $path`
7394  fi
7395
7396
7397  input_path="$new_path"
7398  # Check if we need to convert this using DOS-style short mode. If the path
7399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7400  # take no chances and rewrite it.
7401  # Note: m4 eats our [], so we need to use [ and ] instead.
7402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7403  if test "x$has_forbidden_chars" != x; then
7404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7406  fi
7407
7408
7409  windows_path="$new_path"
7410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7411    unix_path=`$CYGPATH -u "$windows_path"`
7412    new_path="$unix_path"
7413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7415    new_path="$unix_path"
7416  fi
7417
7418  if test "x$path" != "x$new_path"; then
7419    CURDIR="$new_path"
7420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7421$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7422  fi
7423
7424  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7425  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7426
7427  else
7428    # We're on a posix platform. Hooray! :)
7429    path="$CURDIR"
7430    has_space=`$ECHO "$path" | $GREP " "`
7431    if test "x$has_space" != x; then
7432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7433$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7434      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7435    fi
7436
7437    # Use eval to expand a potential ~
7438    eval path="$path"
7439    if test ! -f "$path" && test ! -d "$path"; then
7440      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7441    fi
7442
7443    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7444  fi
7445
7446
7447if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7448    # Add extra search paths on solaris for utilities like ar and as etc...
7449    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7450fi
7451
7452# You can force the sys-root if the sys-root encoded into the cross compiler tools
7453# is not correct.
7454
7455# Check whether --with-sys-root was given.
7456if test "${with_sys_root+set}" = set; then :
7457  withval=$with_sys_root;
7458fi
7459
7460
7461if test "x$with_sys_root" != x; then
7462  SYS_ROOT=$with_sys_root
7463else
7464  SYS_ROOT=/
7465fi
7466
7467
7468
7469# Check whether --with-tools-dir was given.
7470if test "${with_tools_dir+set}" = set; then :
7471  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7472
7473fi
7474
7475
7476
7477# Check whether --with-devkit was given.
7478if test "${with_devkit+set}" = set; then :
7479  withval=$with_devkit;
7480    if test "x$with_sys_root" != x; then
7481      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7482    fi
7483
7484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7485
7486  # Input might be given as Windows format, start by converting to
7487  # unix format.
7488  path="$with_devkit"
7489  new_path=`$CYGPATH -u "$path"`
7490
7491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7494  # "foo.exe" is OK but "foo" is an error.
7495  #
7496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7497  # It is also a way to make sure we got the proper file name for the real test later on.
7498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7499  if test "x$test_shortpath" = x; then
7500    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7501$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7502    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7503  fi
7504
7505  # Call helper function which possibly converts this using DOS-style short mode.
7506  # If so, the updated path is stored in $new_path.
7507
7508  input_path="$new_path"
7509  # Check if we need to convert this using DOS-style short mode. If the path
7510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7511  # take no chances and rewrite it.
7512  # Note: m4 eats our [], so we need to use [ and ] instead.
7513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7514  if test "x$has_forbidden_chars" != x; then
7515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7519      # Going to short mode and back again did indeed matter. Since short mode is
7520      # case insensitive, let's make it lowercase to improve readability.
7521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7522      # Now convert it back to Unix-stile (cygpath)
7523      input_path=`$CYGPATH -u "$shortmode_path"`
7524      new_path="$input_path"
7525    fi
7526  fi
7527
7528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7529  if test "x$test_cygdrive_prefix" = x; then
7530    # As a simple fix, exclude /usr/bin since it's not a real path.
7531    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7533      # a path prefixed by /cygdrive for fixpath to work.
7534      new_path="$CYGWIN_ROOT_PATH$input_path"
7535    fi
7536  fi
7537
7538
7539  if test "x$path" != "x$new_path"; then
7540    with_devkit="$new_path"
7541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7542$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7543  fi
7544
7545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7546
7547  path="$with_devkit"
7548  has_colon=`$ECHO $path | $GREP ^.:`
7549  new_path="$path"
7550  if test "x$has_colon" = x; then
7551    # Not in mixed or Windows style, start by that.
7552    new_path=`cmd //c echo $path`
7553  fi
7554
7555
7556  input_path="$new_path"
7557  # Check if we need to convert this using DOS-style short mode. If the path
7558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7559  # take no chances and rewrite it.
7560  # Note: m4 eats our [], so we need to use [ and ] instead.
7561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7562  if test "x$has_forbidden_chars" != x; then
7563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7565  fi
7566
7567
7568  windows_path="$new_path"
7569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7570    unix_path=`$CYGPATH -u "$windows_path"`
7571    new_path="$unix_path"
7572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7574    new_path="$unix_path"
7575  fi
7576
7577  if test "x$path" != "x$new_path"; then
7578    with_devkit="$new_path"
7579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7580$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7581  fi
7582
7583  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7584  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7585
7586  else
7587    # We're on a posix platform. Hooray! :)
7588    path="$with_devkit"
7589    has_space=`$ECHO "$path" | $GREP " "`
7590    if test "x$has_space" != x; then
7591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7592$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7593      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7594    fi
7595
7596    # Use eval to expand a potential ~
7597    eval path="$path"
7598    if test ! -f "$path" && test ! -d "$path"; then
7599      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7600    fi
7601
7602    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7603  fi
7604
7605
7606  if test "x$TOOLS_DIR" = x; then
7607    TOOLS_DIR="$with_devkit/bin"
7608  else
7609    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7610  fi
7611
7612    if test -d "$with_devkit/$host_alias/libc"; then
7613      SYS_ROOT=$with_devkit/$host_alias/libc
7614    elif test -d "$with_devkit/$host/sys-root"; then
7615      SYS_ROOT=$with_devkit/$host/sys-root
7616    fi
7617
7618fi
7619
7620
7621
7622# Setup default logging of stdout and stderr to build.log in the output root.
7623BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7624BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7625BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7626
7627
7628
7629
7630
7631# Check if it's a pure open build or if custom sources are to be used.
7632
7633  # Check whether --enable-openjdk-only was given.
7634if test "${enable_openjdk_only+set}" = set; then :
7635  enableval=$enable_openjdk_only;
7636else
7637  enable_openjdk_only="no"
7638fi
7639
7640
7641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7642$as_echo_n "checking for presence of closed sources... " >&6; }
7643  if test -d "$SRC_ROOT/jdk/src/closed"; then
7644    CLOSED_SOURCE_PRESENT=yes
7645  else
7646    CLOSED_SOURCE_PRESENT=no
7647  fi
7648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7649$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7650
7651  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7652$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7653  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7655$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7656
7657  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7658    OPENJDK=true
7659    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7660      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7661$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7662    fi
7663  else
7664    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7665      OPENJDK=true
7666    else
7667      OPENJDK=false
7668    fi
7669  fi
7670
7671  if test "x$OPENJDK" = "xtrue"; then
7672    SET_OPENJDK="OPENJDK=true"
7673  fi
7674
7675
7676
7677
7678# These are needed to be able to create a configuration name (and thus the output directory)
7679
7680###############################################################################
7681#
7682# Check which variant of the JDK that we want to build.
7683# Currently we have:
7684#    normal:   standard edition
7685# but the custom make system may add other variants
7686#
7687# Effectively the JDK variant gives a name to a specific set of
7688# modules to compile into the JDK. In the future, these modules
7689# might even be Jigsaw modules.
7690#
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7692$as_echo_n "checking which variant of the JDK to build... " >&6; }
7693
7694# Check whether --with-jdk-variant was given.
7695if test "${with_jdk_variant+set}" = set; then :
7696  withval=$with_jdk_variant;
7697fi
7698
7699
7700if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7701    JDK_VARIANT="normal"
7702else
7703    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7704fi
7705
7706
7707
7708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7709$as_echo "$JDK_VARIANT" >&6; }
7710
7711
7712###############################################################################
7713#
7714# Check which interpreter of the JVM we want to build.
7715# Currently we have:
7716#    template: Template interpreter (the default)
7717#    cpp     : C++ interpreter
7718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7719$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7720
7721# Check whether --with-jvm-interpreter was given.
7722if test "${with_jvm_interpreter+set}" = set; then :
7723  withval=$with_jvm_interpreter;
7724fi
7725
7726
7727if test "x$with_jvm_interpreter" = x; then
7728     with_jvm_interpreter="template"
7729fi
7730
7731JVM_INTERPRETER="$with_jvm_interpreter"
7732
7733if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7734   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7735fi
7736
7737
7738
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7740$as_echo "$with_jvm_interpreter" >&6; }
7741
7742
7743
7744###############################################################################
7745#
7746# Check which variants of the JVM that we want to build.
7747# Currently we have:
7748#    server: normal interpreter and a tiered C1/C2 compiler
7749#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7750#    minimal1: reduced form of client with optional VM services and features stripped out
7751#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7752#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7753#    zero: no machine code interpreter, no compiler
7754#    zeroshark: zero interpreter and shark/llvm compiler backend
7755#    core: interpreter only, no compiler (only works on some platforms)
7756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7757$as_echo_n "checking which variants of the JVM to build... " >&6; }
7758
7759# Check whether --with-jvm-variants was given.
7760if test "${with_jvm_variants+set}" = set; then :
7761  withval=$with_jvm_variants;
7762fi
7763
7764
7765if test "x$with_jvm_variants" = x; then
7766     with_jvm_variants="server"
7767fi
7768
7769JVM_VARIANTS=",$with_jvm_variants,"
7770TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
7771
7772if test "x$TEST_VARIANTS" != "x,"; then
7773   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7774fi
7775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7776$as_echo "$with_jvm_variants" >&6; }
7777
7778JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7779JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7780JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7781JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7782JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7783JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7784JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7785
7786if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7787    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7788        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7789    fi
7790fi
7791if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7792    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7793        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7794    fi
7795fi
7796if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7797    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7798        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7799    fi
7800fi
7801
7802# Replace the commas with AND for use in the build directory name.
7803ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7804COUNT_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/' -e 's/core,/1/'`
7805if test "x$COUNT_VARIANTS" != "x,1"; then
7806    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7807else
7808    BUILDING_MULTIPLE_JVM_VARIANTS=no
7809fi
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820INCLUDE_SA=true
7821if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7822    INCLUDE_SA=false
7823fi
7824if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7825    INCLUDE_SA=false
7826fi
7827if test "x$VAR_CPU" = xppc64 ; then
7828    INCLUDE_SA=false
7829fi
7830
7831
7832if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7833   MACOSX_UNIVERSAL="true"
7834fi
7835
7836
7837
7838
7839
7840###############################################################################
7841#
7842# Set the debug level
7843#    release: no debug information, all optimizations, no asserts.
7844#    fastdebug: debug information (-g), all optimizations, all asserts
7845#    slowdebug: debug information (-g), no optimizations, all asserts
7846#
7847DEBUG_LEVEL="release"
7848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7849$as_echo_n "checking which debug level to use... " >&6; }
7850# Check whether --enable-debug was given.
7851if test "${enable_debug+set}" = set; then :
7852  enableval=$enable_debug;
7853        ENABLE_DEBUG="${enableval}"
7854        DEBUG_LEVEL="fastdebug"
7855
7856else
7857  ENABLE_DEBUG="no"
7858fi
7859
7860
7861
7862# Check whether --with-debug-level was given.
7863if test "${with_debug_level+set}" = set; then :
7864  withval=$with_debug_level;
7865        DEBUG_LEVEL="${withval}"
7866        if test "x$ENABLE_DEBUG" = xyes; then
7867			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7868        fi
7869
7870fi
7871
7872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7873$as_echo "$DEBUG_LEVEL" >&6; }
7874
7875if test "x$DEBUG_LEVEL" != xrelease && \
7876   test "x$DEBUG_LEVEL" != xfastdebug && \
7877   test "x$DEBUG_LEVEL" != xslowdebug; then
7878   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7879fi
7880
7881
7882###############################################################################
7883#
7884# Setup legacy vars/targets and new vars to deal with different debug levels.
7885#
7886
7887case $DEBUG_LEVEL in
7888      release )
7889          VARIANT="OPT"
7890          FASTDEBUG="false"
7891          DEBUG_CLASSFILES="false"
7892          BUILD_VARIANT_RELEASE=""
7893          HOTSPOT_DEBUG_LEVEL="product"
7894          HOTSPOT_EXPORT="product"
7895           ;;
7896      fastdebug )
7897          VARIANT="DBG"
7898          FASTDEBUG="true"
7899          DEBUG_CLASSFILES="true"
7900          BUILD_VARIANT_RELEASE="-fastdebug"
7901          HOTSPOT_DEBUG_LEVEL="fastdebug"
7902          HOTSPOT_EXPORT="fastdebug"
7903           ;;
7904      slowdebug )
7905          VARIANT="DBG"
7906          FASTDEBUG="false"
7907          DEBUG_CLASSFILES="true"
7908          BUILD_VARIANT_RELEASE="-debug"
7909          HOTSPOT_DEBUG_LEVEL="jvmg"
7910          HOTSPOT_EXPORT="debug"
7911           ;;
7912esac
7913
7914#####
7915# Generate the legacy makefile targets for hotspot.
7916# The hotspot api for selecting the build artifacts, really, needs to be improved.
7917# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7918# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7919# But until then ...
7920HOTSPOT_TARGET=""
7921
7922if test "x$JVM_VARIANT_SERVER" = xtrue; then
7923    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7924fi
7925
7926if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7927    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7928fi
7929
7930if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7931    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7932fi
7933
7934if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7935    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7936fi
7937
7938if test "x$JVM_VARIANT_ZERO" = xtrue; then
7939    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7940fi
7941
7942if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7943    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7944fi
7945
7946if test "x$JVM_VARIANT_CORE" = xtrue; then
7947    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
7948fi
7949
7950HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7951
7952# On Macosx universal binaries are produced, but they only contain
7953# 64 bit intel. This invalidates control of which jvms are built
7954# from configure, but only server is valid anyway. Fix this
7955# when hotspot makefiles are rewritten.
7956if test "x$MACOSX_UNIVERSAL" = xtrue; then
7957    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7958fi
7959
7960#####
7961
7962
7963
7964
7965
7966
7967
7968
7969# With basic setup done, call the custom early hook.
7970
7971
7972# To properly create a configuration name, we need to have the OpenJDK target
7973# and options (variants and debug level) parsed.
7974
7975
7976
7977# Check whether --with-conf-name was given.
7978if test "${with_conf_name+set}" = set; then :
7979  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7980fi
7981
7982
7983# Test from where we are running configure, in or outside of src root.
7984if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7985        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7986        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7987    # We are running configure from the src root.
7988    # Create a default ./build/target-variant-debuglevel output root.
7989    if test "x${CONF_NAME}" = x; then
7990        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7991    fi
7992    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7993    $MKDIR -p "$OUTPUT_ROOT"
7994    if test ! -d "$OUTPUT_ROOT"; then
7995        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7996    fi
7997else
7998    # We are running configure from outside of the src dir.
7999    # Then use the current directory as output dir!
8000    # If configuration is situated in normal build directory, just use the build
8001    # directory name as configuration name, otherwise use the complete path.
8002    if test "x${CONF_NAME}" = x; then
8003        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8004    fi
8005    OUTPUT_ROOT="$CURDIR"
8006
8007    # WARNING: This might be a bad thing to do. You need to be sure you want to
8008    # have a configuration in this directory. Do some sanity checks!
8009
8010    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8011      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8012      # other files
8013      files_present=`$LS $OUTPUT_ROOT`
8014      # Configure has already touched config.log and confdefs.h in the current dir when this check
8015      # is performed.
8016      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8017                                             | $TR -d '\n'`
8018      if test "x$filtered_files" != x; then
8019        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8020$as_echo "$as_me: Current directory is $CURDIR." >&6;}
8021        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8022$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8023        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8024$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8025        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8026$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8027        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8028$as_echo "$as_me: seriously mess up just about everything." >&6;}
8029        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8030$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8031        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8032$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8033        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8034      fi
8035    fi
8036fi
8037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8038$as_echo_n "checking what configuration name to use... " >&6; }
8039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8040$as_echo "$CONF_NAME" >&6; }
8041
8042
8043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8044
8045  # Input might be given as Windows format, start by converting to
8046  # unix format.
8047  path="$OUTPUT_ROOT"
8048  new_path=`$CYGPATH -u "$path"`
8049
8050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8053  # "foo.exe" is OK but "foo" is an error.
8054  #
8055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8056  # It is also a way to make sure we got the proper file name for the real test later on.
8057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8058  if test "x$test_shortpath" = x; then
8059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8060$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8061    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8062  fi
8063
8064  # Call helper function which possibly converts this using DOS-style short mode.
8065  # If so, the updated path is stored in $new_path.
8066
8067  input_path="$new_path"
8068  # Check if we need to convert this using DOS-style short mode. If the path
8069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8070  # take no chances and rewrite it.
8071  # Note: m4 eats our [], so we need to use [ and ] instead.
8072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8073  if test "x$has_forbidden_chars" != x; then
8074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8078      # Going to short mode and back again did indeed matter. Since short mode is
8079      # case insensitive, let's make it lowercase to improve readability.
8080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8081      # Now convert it back to Unix-stile (cygpath)
8082      input_path=`$CYGPATH -u "$shortmode_path"`
8083      new_path="$input_path"
8084    fi
8085  fi
8086
8087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8088  if test "x$test_cygdrive_prefix" = x; then
8089    # As a simple fix, exclude /usr/bin since it's not a real path.
8090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8092      # a path prefixed by /cygdrive for fixpath to work.
8093      new_path="$CYGWIN_ROOT_PATH$input_path"
8094    fi
8095  fi
8096
8097
8098  if test "x$path" != "x$new_path"; then
8099    OUTPUT_ROOT="$new_path"
8100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8101$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8102  fi
8103
8104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8105
8106  path="$OUTPUT_ROOT"
8107  has_colon=`$ECHO $path | $GREP ^.:`
8108  new_path="$path"
8109  if test "x$has_colon" = x; then
8110    # Not in mixed or Windows style, start by that.
8111    new_path=`cmd //c echo $path`
8112  fi
8113
8114
8115  input_path="$new_path"
8116  # Check if we need to convert this using DOS-style short mode. If the path
8117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8118  # take no chances and rewrite it.
8119  # Note: m4 eats our [], so we need to use [ and ] instead.
8120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8121  if test "x$has_forbidden_chars" != x; then
8122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8124  fi
8125
8126
8127  windows_path="$new_path"
8128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8129    unix_path=`$CYGPATH -u "$windows_path"`
8130    new_path="$unix_path"
8131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8133    new_path="$unix_path"
8134  fi
8135
8136  if test "x$path" != "x$new_path"; then
8137    OUTPUT_ROOT="$new_path"
8138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8139$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8140  fi
8141
8142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8144
8145  else
8146    # We're on a posix platform. Hooray! :)
8147    path="$OUTPUT_ROOT"
8148    has_space=`$ECHO "$path" | $GREP " "`
8149    if test "x$has_space" != x; then
8150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8151$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8152      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8153    fi
8154
8155    # Use eval to expand a potential ~
8156    eval path="$path"
8157    if test ! -f "$path" && test ! -d "$path"; then
8158      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8159    fi
8160
8161    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8162  fi
8163
8164
8165SPEC=$OUTPUT_ROOT/spec.gmk
8166
8167CONF_NAME=$CONF_NAME
8168
8169OUTPUT_ROOT=$OUTPUT_ROOT
8170
8171
8172# Most of the probed defines are put into config.h
8173ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8174
8175# The spec.gmk file contains all variables for the make system.
8176ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8177
8178# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8179ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8180
8181# The bootcycle-spec.gmk file contains support for boot cycle builds.
8182ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8183
8184# The compare.sh is used to compare the build output to other builds.
8185ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8186
8187# Spec.sh is currently used by compare-objects.sh
8188ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8189
8190# The generated Makefile knows where the spec.gmk is and where the source is.
8191# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8192# which will look for generated configurations
8193ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8194
8195
8196# Save the arguments given to us
8197echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8198
8199
8200# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8201
8202    for ac_prog in apt-get yum port pkgutil pkgadd
8203do
8204  # Extract the first word of "$ac_prog", so it can be a program name with args.
8205set dummy $ac_prog; ac_word=$2
8206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8207$as_echo_n "checking for $ac_word... " >&6; }
8208if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8209  $as_echo_n "(cached) " >&6
8210else
8211  if test -n "$PKGHANDLER"; then
8212  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8213else
8214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8215for as_dir in $PATH
8216do
8217  IFS=$as_save_IFS
8218  test -z "$as_dir" && as_dir=.
8219    for ac_exec_ext in '' $ac_executable_extensions; do
8220  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8221    ac_cv_prog_PKGHANDLER="$ac_prog"
8222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8223    break 2
8224  fi
8225done
8226  done
8227IFS=$as_save_IFS
8228
8229fi
8230fi
8231PKGHANDLER=$ac_cv_prog_PKGHANDLER
8232if test -n "$PKGHANDLER"; then
8233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8234$as_echo "$PKGHANDLER" >&6; }
8235else
8236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8237$as_echo "no" >&6; }
8238fi
8239
8240
8241  test -n "$PKGHANDLER" && break
8242done
8243
8244
8245
8246# Setup tools that requires more complex handling, or that is not needed by the configure script.
8247
8248
8249  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8250  if test "x$MAKE" != x; then
8251    # User has supplied a make, test it.
8252    if test ! -f "$MAKE"; then
8253      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8254    fi
8255
8256  MAKE_CANDIDATE=""$MAKE""
8257  DESCRIPTION="user supplied MAKE=$MAKE"
8258  if test "x$MAKE_CANDIDATE" != x; then
8259    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8260$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8261    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8262    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8263    if test "x$IS_GNU_MAKE" = x; then
8264      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8265$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8266    else
8267      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8268      if test "x$IS_MODERN_MAKE" = x; then
8269        { $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
8270$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;}
8271      else
8272        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8273          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8274            MAKE_EXPECTED_ENV='cygwin'
8275          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8276            MAKE_EXPECTED_ENV='msys'
8277          else
8278            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8279          fi
8280          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8281          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8282        else
8283          # Not relevant for non-Windows
8284          IS_MAKE_CORRECT_ENV=true
8285        fi
8286        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8287          { $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
8288$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;}
8289        else
8290          FOUND_MAKE=$MAKE_CANDIDATE
8291
8292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8293
8294  # First separate the path from the arguments. This will split at the first
8295  # space.
8296  complete="$FOUND_MAKE"
8297  path="${complete%% *}"
8298  tmp="$complete EOL"
8299  arguments="${tmp#* }"
8300
8301  # Input might be given as Windows format, start by converting to
8302  # unix format.
8303  new_path=`$CYGPATH -u "$path"`
8304
8305  # Now try to locate executable using which
8306  new_path=`$WHICH "$new_path" 2> /dev/null`
8307  # bat and cmd files are not always considered executable in cygwin causing which
8308  # to not find them
8309  if test "x$new_path" = x \
8310           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8311           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8312    new_path=`$CYGPATH -u "$path"`
8313  fi
8314  if test "x$new_path" = x; then
8315    # Oops. Which didn't find the executable.
8316    # The splitting of arguments from the executable at a space might have been incorrect,
8317    # since paths with space are more likely in Windows. Give it another try with the whole
8318    # argument.
8319    path="$complete"
8320    arguments="EOL"
8321    new_path=`$CYGPATH -u "$path"`
8322    new_path=`$WHICH "$new_path" 2> /dev/null`
8323    # bat and cmd files are not always considered executable in cygwin causing which
8324    # to not find them
8325    if test "x$new_path" = x \
8326             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8327             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8328      new_path=`$CYGPATH -u "$path"`
8329    fi
8330    if test "x$new_path" = x; then
8331      # It's still not found. Now this is an unrecoverable error.
8332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8333$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8334      has_space=`$ECHO "$complete" | $GREP " "`
8335      if test "x$has_space" != x; then
8336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8338      fi
8339      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8340    fi
8341  fi
8342
8343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8346  # "foo.exe" is OK but "foo" is an error.
8347  #
8348  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8349  # It is also a way to make sure we got the proper file name for the real test later on.
8350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8351  if test "x$test_shortpath" = x; then
8352    # Short path failed, file does not exist as specified.
8353    # Try adding .exe or .cmd
8354    if test -f "${new_path}.exe"; then
8355       input_to_shortpath="${new_path}.exe"
8356    elif test -f "${new_path}.cmd"; then
8357       input_to_shortpath="${new_path}.cmd"
8358    else
8359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8360$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8361      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8362$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8363      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8364    fi
8365  else
8366    input_to_shortpath="$new_path"
8367  fi
8368
8369  # Call helper function which possibly converts this using DOS-style short mode.
8370  # If so, the updated path is stored in $new_path.
8371  new_path="$input_to_shortpath"
8372
8373  input_path="$input_to_shortpath"
8374  # Check if we need to convert this using DOS-style short mode. If the path
8375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8376  # take no chances and rewrite it.
8377  # Note: m4 eats our [], so we need to use [ and ] instead.
8378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8379  if test "x$has_forbidden_chars" != x; then
8380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8384      # Going to short mode and back again did indeed matter. Since short mode is
8385      # case insensitive, let's make it lowercase to improve readability.
8386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8387      # Now convert it back to Unix-stile (cygpath)
8388      input_path=`$CYGPATH -u "$shortmode_path"`
8389      new_path="$input_path"
8390    fi
8391  fi
8392
8393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8394  if test "x$test_cygdrive_prefix" = x; then
8395    # As a simple fix, exclude /usr/bin since it's not a real path.
8396    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8398      # a path prefixed by /cygdrive for fixpath to work.
8399      new_path="$CYGWIN_ROOT_PATH$input_path"
8400    fi
8401  fi
8402
8403  # remove trailing .exe if any
8404  new_path="${new_path/%.exe/}"
8405
8406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8407
8408  # First separate the path from the arguments. This will split at the first
8409  # space.
8410  complete="$FOUND_MAKE"
8411  path="${complete%% *}"
8412  tmp="$complete EOL"
8413  arguments="${tmp#* }"
8414
8415  # Input might be given as Windows format, start by converting to
8416  # unix format.
8417  new_path="$path"
8418
8419  windows_path="$new_path"
8420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8421    unix_path=`$CYGPATH -u "$windows_path"`
8422    new_path="$unix_path"
8423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8425    new_path="$unix_path"
8426  fi
8427
8428
8429  # Now try to locate executable using which
8430  new_path=`$WHICH "$new_path" 2> /dev/null`
8431
8432  if test "x$new_path" = x; then
8433    # Oops. Which didn't find the executable.
8434    # The splitting of arguments from the executable at a space might have been incorrect,
8435    # since paths with space are more likely in Windows. Give it another try with the whole
8436    # argument.
8437    path="$complete"
8438    arguments="EOL"
8439    new_path="$path"
8440
8441  windows_path="$new_path"
8442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8443    unix_path=`$CYGPATH -u "$windows_path"`
8444    new_path="$unix_path"
8445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8447    new_path="$unix_path"
8448  fi
8449
8450
8451    new_path=`$WHICH "$new_path" 2> /dev/null`
8452
8453    if test "x$new_path" = x; then
8454      # It's still not found. Now this is an unrecoverable error.
8455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8456$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8457      has_space=`$ECHO "$complete" | $GREP " "`
8458      if test "x$has_space" != x; then
8459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8461      fi
8462      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8463    fi
8464  fi
8465
8466  # Now new_path has a complete unix path to the binary
8467  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8468    # Keep paths in /bin as-is, but remove trailing .exe if any
8469    new_path="${new_path/%.exe/}"
8470    # Do not save /bin paths to all_fixpath_prefixes!
8471  else
8472    # Not in mixed or Windows style, start by that.
8473    new_path=`cmd //c echo $new_path`
8474
8475  input_path="$new_path"
8476  # Check if we need to convert this using DOS-style short mode. If the path
8477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8478  # take no chances and rewrite it.
8479  # Note: m4 eats our [], so we need to use [ and ] instead.
8480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8481  if test "x$has_forbidden_chars" != x; then
8482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8484  fi
8485
8486    # Output is in $new_path
8487
8488  windows_path="$new_path"
8489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8490    unix_path=`$CYGPATH -u "$windows_path"`
8491    new_path="$unix_path"
8492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8494    new_path="$unix_path"
8495  fi
8496
8497    # remove trailing .exe if any
8498    new_path="${new_path/%.exe/}"
8499
8500    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8501    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8502  fi
8503
8504  else
8505    # We're on a posix platform. Hooray! :)
8506    # First separate the path from the arguments. This will split at the first
8507    # space.
8508    complete="$FOUND_MAKE"
8509    path="${complete%% *}"
8510    tmp="$complete EOL"
8511    arguments="${tmp#* }"
8512
8513    # Cannot rely on the command "which" here since it doesn't always work.
8514    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8515    if test -z "$is_absolute_path"; then
8516      # Path to executable is not absolute. Find it.
8517      IFS_save="$IFS"
8518      IFS=:
8519      for p in $PATH; do
8520        if test -f "$p/$path" && test -x "$p/$path"; then
8521          new_path="$p/$path"
8522          break
8523        fi
8524      done
8525      IFS="$IFS_save"
8526    else
8527      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8528$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8529      new_path="$path"
8530    fi
8531
8532    if test "x$new_path" = x; then
8533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8534$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8535        has_space=`$ECHO "$complete" | $GREP " "`
8536        if test "x$has_space" != x; then
8537          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8538$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8539        fi
8540        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8541      fi
8542  fi
8543
8544      # Now join together the path and the arguments once again
8545      if test "x$arguments" != xEOL; then
8546        new_complete="$new_path ${arguments% *}"
8547      else
8548        new_complete="$new_path"
8549      fi
8550
8551  if test "x$complete" != "x$new_complete"; then
8552      FOUND_MAKE="$new_complete"
8553      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8554$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8555    fi
8556
8557        fi
8558      fi
8559    fi
8560  fi
8561
8562    if test "x$FOUND_MAKE" = x; then
8563      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8564    fi
8565  else
8566    # Try our hardest to locate a correct version of GNU make
8567    for ac_prog in gmake
8568do
8569  # Extract the first word of "$ac_prog", so it can be a program name with args.
8570set dummy $ac_prog; ac_word=$2
8571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8572$as_echo_n "checking for $ac_word... " >&6; }
8573if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8574  $as_echo_n "(cached) " >&6
8575else
8576  case $CHECK_GMAKE in
8577  [\\/]* | ?:[\\/]*)
8578  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8579  ;;
8580  *)
8581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8582for as_dir in $PATH
8583do
8584  IFS=$as_save_IFS
8585  test -z "$as_dir" && as_dir=.
8586    for ac_exec_ext in '' $ac_executable_extensions; do
8587  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8588    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8590    break 2
8591  fi
8592done
8593  done
8594IFS=$as_save_IFS
8595
8596  ;;
8597esac
8598fi
8599CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8600if test -n "$CHECK_GMAKE"; then
8601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8602$as_echo "$CHECK_GMAKE" >&6; }
8603else
8604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8605$as_echo "no" >&6; }
8606fi
8607
8608
8609  test -n "$CHECK_GMAKE" && break
8610done
8611
8612
8613  MAKE_CANDIDATE=""$CHECK_GMAKE""
8614  DESCRIPTION="gmake in PATH"
8615  if test "x$MAKE_CANDIDATE" != x; then
8616    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8617$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8618    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8619    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8620    if test "x$IS_GNU_MAKE" = x; then
8621      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8622$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8623    else
8624      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8625      if test "x$IS_MODERN_MAKE" = x; then
8626        { $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
8627$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;}
8628      else
8629        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8630          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8631            MAKE_EXPECTED_ENV='cygwin'
8632          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8633            MAKE_EXPECTED_ENV='msys'
8634          else
8635            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8636          fi
8637          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8638          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8639        else
8640          # Not relevant for non-Windows
8641          IS_MAKE_CORRECT_ENV=true
8642        fi
8643        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8644          { $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
8645$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;}
8646        else
8647          FOUND_MAKE=$MAKE_CANDIDATE
8648
8649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8650
8651  # First separate the path from the arguments. This will split at the first
8652  # space.
8653  complete="$FOUND_MAKE"
8654  path="${complete%% *}"
8655  tmp="$complete EOL"
8656  arguments="${tmp#* }"
8657
8658  # Input might be given as Windows format, start by converting to
8659  # unix format.
8660  new_path=`$CYGPATH -u "$path"`
8661
8662  # Now try to locate executable using which
8663  new_path=`$WHICH "$new_path" 2> /dev/null`
8664  # bat and cmd files are not always considered executable in cygwin causing which
8665  # to not find them
8666  if test "x$new_path" = x \
8667           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8668           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8669    new_path=`$CYGPATH -u "$path"`
8670  fi
8671  if test "x$new_path" = x; then
8672    # Oops. Which didn't find the executable.
8673    # The splitting of arguments from the executable at a space might have been incorrect,
8674    # since paths with space are more likely in Windows. Give it another try with the whole
8675    # argument.
8676    path="$complete"
8677    arguments="EOL"
8678    new_path=`$CYGPATH -u "$path"`
8679    new_path=`$WHICH "$new_path" 2> /dev/null`
8680    # bat and cmd files are not always considered executable in cygwin causing which
8681    # to not find them
8682    if test "x$new_path" = x \
8683             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8684             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8685      new_path=`$CYGPATH -u "$path"`
8686    fi
8687    if test "x$new_path" = x; then
8688      # It's still not found. Now this is an unrecoverable error.
8689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8690$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8691      has_space=`$ECHO "$complete" | $GREP " "`
8692      if test "x$has_space" != x; then
8693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8695      fi
8696      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8697    fi
8698  fi
8699
8700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8703  # "foo.exe" is OK but "foo" is an error.
8704  #
8705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8706  # It is also a way to make sure we got the proper file name for the real test later on.
8707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8708  if test "x$test_shortpath" = x; then
8709    # Short path failed, file does not exist as specified.
8710    # Try adding .exe or .cmd
8711    if test -f "${new_path}.exe"; then
8712       input_to_shortpath="${new_path}.exe"
8713    elif test -f "${new_path}.cmd"; then
8714       input_to_shortpath="${new_path}.cmd"
8715    else
8716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8717$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8718      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8719$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8720      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8721    fi
8722  else
8723    input_to_shortpath="$new_path"
8724  fi
8725
8726  # Call helper function which possibly converts this using DOS-style short mode.
8727  # If so, the updated path is stored in $new_path.
8728  new_path="$input_to_shortpath"
8729
8730  input_path="$input_to_shortpath"
8731  # Check if we need to convert this using DOS-style short mode. If the path
8732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8733  # take no chances and rewrite it.
8734  # Note: m4 eats our [], so we need to use [ and ] instead.
8735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8736  if test "x$has_forbidden_chars" != x; then
8737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8741      # Going to short mode and back again did indeed matter. Since short mode is
8742      # case insensitive, let's make it lowercase to improve readability.
8743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8744      # Now convert it back to Unix-stile (cygpath)
8745      input_path=`$CYGPATH -u "$shortmode_path"`
8746      new_path="$input_path"
8747    fi
8748  fi
8749
8750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8751  if test "x$test_cygdrive_prefix" = x; then
8752    # As a simple fix, exclude /usr/bin since it's not a real path.
8753    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8755      # a path prefixed by /cygdrive for fixpath to work.
8756      new_path="$CYGWIN_ROOT_PATH$input_path"
8757    fi
8758  fi
8759
8760  # remove trailing .exe if any
8761  new_path="${new_path/%.exe/}"
8762
8763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8764
8765  # First separate the path from the arguments. This will split at the first
8766  # space.
8767  complete="$FOUND_MAKE"
8768  path="${complete%% *}"
8769  tmp="$complete EOL"
8770  arguments="${tmp#* }"
8771
8772  # Input might be given as Windows format, start by converting to
8773  # unix format.
8774  new_path="$path"
8775
8776  windows_path="$new_path"
8777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8778    unix_path=`$CYGPATH -u "$windows_path"`
8779    new_path="$unix_path"
8780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8782    new_path="$unix_path"
8783  fi
8784
8785
8786  # Now try to locate executable using which
8787  new_path=`$WHICH "$new_path" 2> /dev/null`
8788
8789  if test "x$new_path" = x; then
8790    # Oops. Which didn't find the executable.
8791    # The splitting of arguments from the executable at a space might have been incorrect,
8792    # since paths with space are more likely in Windows. Give it another try with the whole
8793    # argument.
8794    path="$complete"
8795    arguments="EOL"
8796    new_path="$path"
8797
8798  windows_path="$new_path"
8799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8800    unix_path=`$CYGPATH -u "$windows_path"`
8801    new_path="$unix_path"
8802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8804    new_path="$unix_path"
8805  fi
8806
8807
8808    new_path=`$WHICH "$new_path" 2> /dev/null`
8809
8810    if test "x$new_path" = x; then
8811      # It's still not found. Now this is an unrecoverable error.
8812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8813$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8814      has_space=`$ECHO "$complete" | $GREP " "`
8815      if test "x$has_space" != x; then
8816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8818      fi
8819      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8820    fi
8821  fi
8822
8823  # Now new_path has a complete unix path to the binary
8824  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8825    # Keep paths in /bin as-is, but remove trailing .exe if any
8826    new_path="${new_path/%.exe/}"
8827    # Do not save /bin paths to all_fixpath_prefixes!
8828  else
8829    # Not in mixed or Windows style, start by that.
8830    new_path=`cmd //c echo $new_path`
8831
8832  input_path="$new_path"
8833  # Check if we need to convert this using DOS-style short mode. If the path
8834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8835  # take no chances and rewrite it.
8836  # Note: m4 eats our [], so we need to use [ and ] instead.
8837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8838  if test "x$has_forbidden_chars" != x; then
8839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8841  fi
8842
8843    # Output is in $new_path
8844
8845  windows_path="$new_path"
8846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8847    unix_path=`$CYGPATH -u "$windows_path"`
8848    new_path="$unix_path"
8849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8851    new_path="$unix_path"
8852  fi
8853
8854    # remove trailing .exe if any
8855    new_path="${new_path/%.exe/}"
8856
8857    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8858    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8859  fi
8860
8861  else
8862    # We're on a posix platform. Hooray! :)
8863    # First separate the path from the arguments. This will split at the first
8864    # space.
8865    complete="$FOUND_MAKE"
8866    path="${complete%% *}"
8867    tmp="$complete EOL"
8868    arguments="${tmp#* }"
8869
8870    # Cannot rely on the command "which" here since it doesn't always work.
8871    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8872    if test -z "$is_absolute_path"; then
8873      # Path to executable is not absolute. Find it.
8874      IFS_save="$IFS"
8875      IFS=:
8876      for p in $PATH; do
8877        if test -f "$p/$path" && test -x "$p/$path"; then
8878          new_path="$p/$path"
8879          break
8880        fi
8881      done
8882      IFS="$IFS_save"
8883    else
8884      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8885$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8886      new_path="$path"
8887    fi
8888
8889    if test "x$new_path" = x; then
8890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8891$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8892        has_space=`$ECHO "$complete" | $GREP " "`
8893        if test "x$has_space" != x; then
8894          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8896        fi
8897        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8898      fi
8899  fi
8900
8901      # Now join together the path and the arguments once again
8902      if test "x$arguments" != xEOL; then
8903        new_complete="$new_path ${arguments% *}"
8904      else
8905        new_complete="$new_path"
8906      fi
8907
8908  if test "x$complete" != "x$new_complete"; then
8909      FOUND_MAKE="$new_complete"
8910      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8911$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8912    fi
8913
8914        fi
8915      fi
8916    fi
8917  fi
8918
8919
8920    if test "x$FOUND_MAKE" = x; then
8921      for ac_prog in make
8922do
8923  # Extract the first word of "$ac_prog", so it can be a program name with args.
8924set dummy $ac_prog; ac_word=$2
8925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8926$as_echo_n "checking for $ac_word... " >&6; }
8927if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8928  $as_echo_n "(cached) " >&6
8929else
8930  case $CHECK_MAKE in
8931  [\\/]* | ?:[\\/]*)
8932  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8933  ;;
8934  *)
8935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8936for as_dir in $PATH
8937do
8938  IFS=$as_save_IFS
8939  test -z "$as_dir" && as_dir=.
8940    for ac_exec_ext in '' $ac_executable_extensions; do
8941  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8942    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8944    break 2
8945  fi
8946done
8947  done
8948IFS=$as_save_IFS
8949
8950  ;;
8951esac
8952fi
8953CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8954if test -n "$CHECK_MAKE"; then
8955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8956$as_echo "$CHECK_MAKE" >&6; }
8957else
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8959$as_echo "no" >&6; }
8960fi
8961
8962
8963  test -n "$CHECK_MAKE" && break
8964done
8965
8966
8967  MAKE_CANDIDATE=""$CHECK_MAKE""
8968  DESCRIPTION="make in PATH"
8969  if test "x$MAKE_CANDIDATE" != x; then
8970    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8971$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8972    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8973    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8974    if test "x$IS_GNU_MAKE" = x; then
8975      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8976$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8977    else
8978      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8979      if test "x$IS_MODERN_MAKE" = x; then
8980        { $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
8981$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;}
8982      else
8983        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8984          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8985            MAKE_EXPECTED_ENV='cygwin'
8986          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8987            MAKE_EXPECTED_ENV='msys'
8988          else
8989            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8990          fi
8991          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8992          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8993        else
8994          # Not relevant for non-Windows
8995          IS_MAKE_CORRECT_ENV=true
8996        fi
8997        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8998          { $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
8999$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;}
9000        else
9001          FOUND_MAKE=$MAKE_CANDIDATE
9002
9003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9004
9005  # First separate the path from the arguments. This will split at the first
9006  # space.
9007  complete="$FOUND_MAKE"
9008  path="${complete%% *}"
9009  tmp="$complete EOL"
9010  arguments="${tmp#* }"
9011
9012  # Input might be given as Windows format, start by converting to
9013  # unix format.
9014  new_path=`$CYGPATH -u "$path"`
9015
9016  # Now try to locate executable using which
9017  new_path=`$WHICH "$new_path" 2> /dev/null`
9018  # bat and cmd files are not always considered executable in cygwin causing which
9019  # to not find them
9020  if test "x$new_path" = x \
9021           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9022           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9023    new_path=`$CYGPATH -u "$path"`
9024  fi
9025  if test "x$new_path" = x; then
9026    # Oops. Which didn't find the executable.
9027    # The splitting of arguments from the executable at a space might have been incorrect,
9028    # since paths with space are more likely in Windows. Give it another try with the whole
9029    # argument.
9030    path="$complete"
9031    arguments="EOL"
9032    new_path=`$CYGPATH -u "$path"`
9033    new_path=`$WHICH "$new_path" 2> /dev/null`
9034    # bat and cmd files are not always considered executable in cygwin causing which
9035    # to not find them
9036    if test "x$new_path" = x \
9037             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9038             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9039      new_path=`$CYGPATH -u "$path"`
9040    fi
9041    if test "x$new_path" = x; then
9042      # It's still not found. Now this is an unrecoverable error.
9043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9044$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9045      has_space=`$ECHO "$complete" | $GREP " "`
9046      if test "x$has_space" != x; then
9047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9049      fi
9050      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9051    fi
9052  fi
9053
9054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9057  # "foo.exe" is OK but "foo" is an error.
9058  #
9059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9060  # It is also a way to make sure we got the proper file name for the real test later on.
9061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9062  if test "x$test_shortpath" = x; then
9063    # Short path failed, file does not exist as specified.
9064    # Try adding .exe or .cmd
9065    if test -f "${new_path}.exe"; then
9066       input_to_shortpath="${new_path}.exe"
9067    elif test -f "${new_path}.cmd"; then
9068       input_to_shortpath="${new_path}.cmd"
9069    else
9070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9071$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9072      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9073$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9074      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9075    fi
9076  else
9077    input_to_shortpath="$new_path"
9078  fi
9079
9080  # Call helper function which possibly converts this using DOS-style short mode.
9081  # If so, the updated path is stored in $new_path.
9082  new_path="$input_to_shortpath"
9083
9084  input_path="$input_to_shortpath"
9085  # Check if we need to convert this using DOS-style short mode. If the path
9086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9087  # take no chances and rewrite it.
9088  # Note: m4 eats our [], so we need to use [ and ] instead.
9089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9090  if test "x$has_forbidden_chars" != x; then
9091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9095      # Going to short mode and back again did indeed matter. Since short mode is
9096      # case insensitive, let's make it lowercase to improve readability.
9097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9098      # Now convert it back to Unix-stile (cygpath)
9099      input_path=`$CYGPATH -u "$shortmode_path"`
9100      new_path="$input_path"
9101    fi
9102  fi
9103
9104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9105  if test "x$test_cygdrive_prefix" = x; then
9106    # As a simple fix, exclude /usr/bin since it's not a real path.
9107    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9109      # a path prefixed by /cygdrive for fixpath to work.
9110      new_path="$CYGWIN_ROOT_PATH$input_path"
9111    fi
9112  fi
9113
9114  # remove trailing .exe if any
9115  new_path="${new_path/%.exe/}"
9116
9117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9118
9119  # First separate the path from the arguments. This will split at the first
9120  # space.
9121  complete="$FOUND_MAKE"
9122  path="${complete%% *}"
9123  tmp="$complete EOL"
9124  arguments="${tmp#* }"
9125
9126  # Input might be given as Windows format, start by converting to
9127  # unix format.
9128  new_path="$path"
9129
9130  windows_path="$new_path"
9131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9132    unix_path=`$CYGPATH -u "$windows_path"`
9133    new_path="$unix_path"
9134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9136    new_path="$unix_path"
9137  fi
9138
9139
9140  # Now try to locate executable using which
9141  new_path=`$WHICH "$new_path" 2> /dev/null`
9142
9143  if test "x$new_path" = x; then
9144    # Oops. Which didn't find the executable.
9145    # The splitting of arguments from the executable at a space might have been incorrect,
9146    # since paths with space are more likely in Windows. Give it another try with the whole
9147    # argument.
9148    path="$complete"
9149    arguments="EOL"
9150    new_path="$path"
9151
9152  windows_path="$new_path"
9153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9154    unix_path=`$CYGPATH -u "$windows_path"`
9155    new_path="$unix_path"
9156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9158    new_path="$unix_path"
9159  fi
9160
9161
9162    new_path=`$WHICH "$new_path" 2> /dev/null`
9163
9164    if test "x$new_path" = x; then
9165      # It's still not found. Now this is an unrecoverable error.
9166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9167$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9168      has_space=`$ECHO "$complete" | $GREP " "`
9169      if test "x$has_space" != x; then
9170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9172      fi
9173      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9174    fi
9175  fi
9176
9177  # Now new_path has a complete unix path to the binary
9178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9179    # Keep paths in /bin as-is, but remove trailing .exe if any
9180    new_path="${new_path/%.exe/}"
9181    # Do not save /bin paths to all_fixpath_prefixes!
9182  else
9183    # Not in mixed or Windows style, start by that.
9184    new_path=`cmd //c echo $new_path`
9185
9186  input_path="$new_path"
9187  # Check if we need to convert this using DOS-style short mode. If the path
9188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9189  # take no chances and rewrite it.
9190  # Note: m4 eats our [], so we need to use [ and ] instead.
9191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9192  if test "x$has_forbidden_chars" != x; then
9193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9195  fi
9196
9197    # Output is in $new_path
9198
9199  windows_path="$new_path"
9200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9201    unix_path=`$CYGPATH -u "$windows_path"`
9202    new_path="$unix_path"
9203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9205    new_path="$unix_path"
9206  fi
9207
9208    # remove trailing .exe if any
9209    new_path="${new_path/%.exe/}"
9210
9211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9213  fi
9214
9215  else
9216    # We're on a posix platform. Hooray! :)
9217    # First separate the path from the arguments. This will split at the first
9218    # space.
9219    complete="$FOUND_MAKE"
9220    path="${complete%% *}"
9221    tmp="$complete EOL"
9222    arguments="${tmp#* }"
9223
9224    # Cannot rely on the command "which" here since it doesn't always work.
9225    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9226    if test -z "$is_absolute_path"; then
9227      # Path to executable is not absolute. Find it.
9228      IFS_save="$IFS"
9229      IFS=:
9230      for p in $PATH; do
9231        if test -f "$p/$path" && test -x "$p/$path"; then
9232          new_path="$p/$path"
9233          break
9234        fi
9235      done
9236      IFS="$IFS_save"
9237    else
9238      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9239$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9240      new_path="$path"
9241    fi
9242
9243    if test "x$new_path" = x; then
9244        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9245$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9246        has_space=`$ECHO "$complete" | $GREP " "`
9247        if test "x$has_space" != x; then
9248          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9249$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9250        fi
9251        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9252      fi
9253  fi
9254
9255      # Now join together the path and the arguments once again
9256      if test "x$arguments" != xEOL; then
9257        new_complete="$new_path ${arguments% *}"
9258      else
9259        new_complete="$new_path"
9260      fi
9261
9262  if test "x$complete" != "x$new_complete"; then
9263      FOUND_MAKE="$new_complete"
9264      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9265$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9266    fi
9267
9268        fi
9269      fi
9270    fi
9271  fi
9272
9273    fi
9274
9275    if test "x$FOUND_MAKE" = x; then
9276      if test "x$TOOLS_DIR" != x; then
9277        # We have a tools-dir, check that as well before giving up.
9278        OLD_PATH=$PATH
9279        PATH=$TOOLS_DIR:$PATH
9280        for ac_prog in gmake
9281do
9282  # Extract the first word of "$ac_prog", so it can be a program name with args.
9283set dummy $ac_prog; ac_word=$2
9284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9285$as_echo_n "checking for $ac_word... " >&6; }
9286if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9287  $as_echo_n "(cached) " >&6
9288else
9289  case $CHECK_TOOLSDIR_GMAKE in
9290  [\\/]* | ?:[\\/]*)
9291  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9292  ;;
9293  *)
9294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9295for as_dir in $PATH
9296do
9297  IFS=$as_save_IFS
9298  test -z "$as_dir" && as_dir=.
9299    for ac_exec_ext in '' $ac_executable_extensions; do
9300  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9301    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9303    break 2
9304  fi
9305done
9306  done
9307IFS=$as_save_IFS
9308
9309  ;;
9310esac
9311fi
9312CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9313if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9315$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9316else
9317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9318$as_echo "no" >&6; }
9319fi
9320
9321
9322  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9323done
9324
9325
9326  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9327  DESCRIPTION="gmake in tools-dir"
9328  if test "x$MAKE_CANDIDATE" != x; then
9329    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9330$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9331    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9332    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9333    if test "x$IS_GNU_MAKE" = x; then
9334      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9335$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9336    else
9337      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9338      if test "x$IS_MODERN_MAKE" = x; then
9339        { $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
9340$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;}
9341      else
9342        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9343          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9344            MAKE_EXPECTED_ENV='cygwin'
9345          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9346            MAKE_EXPECTED_ENV='msys'
9347          else
9348            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9349          fi
9350          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9351          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9352        else
9353          # Not relevant for non-Windows
9354          IS_MAKE_CORRECT_ENV=true
9355        fi
9356        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9357          { $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
9358$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;}
9359        else
9360          FOUND_MAKE=$MAKE_CANDIDATE
9361
9362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9363
9364  # First separate the path from the arguments. This will split at the first
9365  # space.
9366  complete="$FOUND_MAKE"
9367  path="${complete%% *}"
9368  tmp="$complete EOL"
9369  arguments="${tmp#* }"
9370
9371  # Input might be given as Windows format, start by converting to
9372  # unix format.
9373  new_path=`$CYGPATH -u "$path"`
9374
9375  # Now try to locate executable using which
9376  new_path=`$WHICH "$new_path" 2> /dev/null`
9377  # bat and cmd files are not always considered executable in cygwin causing which
9378  # to not find them
9379  if test "x$new_path" = x \
9380           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9381           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9382    new_path=`$CYGPATH -u "$path"`
9383  fi
9384  if test "x$new_path" = x; then
9385    # Oops. Which didn't find the executable.
9386    # The splitting of arguments from the executable at a space might have been incorrect,
9387    # since paths with space are more likely in Windows. Give it another try with the whole
9388    # argument.
9389    path="$complete"
9390    arguments="EOL"
9391    new_path=`$CYGPATH -u "$path"`
9392    new_path=`$WHICH "$new_path" 2> /dev/null`
9393    # bat and cmd files are not always considered executable in cygwin causing which
9394    # to not find them
9395    if test "x$new_path" = x \
9396             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9397             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9398      new_path=`$CYGPATH -u "$path"`
9399    fi
9400    if test "x$new_path" = x; then
9401      # It's still not found. Now this is an unrecoverable error.
9402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9403$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9404      has_space=`$ECHO "$complete" | $GREP " "`
9405      if test "x$has_space" != x; then
9406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9408      fi
9409      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9410    fi
9411  fi
9412
9413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9416  # "foo.exe" is OK but "foo" is an error.
9417  #
9418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9419  # It is also a way to make sure we got the proper file name for the real test later on.
9420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9421  if test "x$test_shortpath" = x; then
9422    # Short path failed, file does not exist as specified.
9423    # Try adding .exe or .cmd
9424    if test -f "${new_path}.exe"; then
9425       input_to_shortpath="${new_path}.exe"
9426    elif test -f "${new_path}.cmd"; then
9427       input_to_shortpath="${new_path}.cmd"
9428    else
9429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9430$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9431      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9432$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9433      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9434    fi
9435  else
9436    input_to_shortpath="$new_path"
9437  fi
9438
9439  # Call helper function which possibly converts this using DOS-style short mode.
9440  # If so, the updated path is stored in $new_path.
9441  new_path="$input_to_shortpath"
9442
9443  input_path="$input_to_shortpath"
9444  # Check if we need to convert this using DOS-style short mode. If the path
9445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9446  # take no chances and rewrite it.
9447  # Note: m4 eats our [], so we need to use [ and ] instead.
9448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9449  if test "x$has_forbidden_chars" != x; then
9450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9454      # Going to short mode and back again did indeed matter. Since short mode is
9455      # case insensitive, let's make it lowercase to improve readability.
9456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9457      # Now convert it back to Unix-stile (cygpath)
9458      input_path=`$CYGPATH -u "$shortmode_path"`
9459      new_path="$input_path"
9460    fi
9461  fi
9462
9463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9464  if test "x$test_cygdrive_prefix" = x; then
9465    # As a simple fix, exclude /usr/bin since it's not a real path.
9466    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9468      # a path prefixed by /cygdrive for fixpath to work.
9469      new_path="$CYGWIN_ROOT_PATH$input_path"
9470    fi
9471  fi
9472
9473  # remove trailing .exe if any
9474  new_path="${new_path/%.exe/}"
9475
9476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9477
9478  # First separate the path from the arguments. This will split at the first
9479  # space.
9480  complete="$FOUND_MAKE"
9481  path="${complete%% *}"
9482  tmp="$complete EOL"
9483  arguments="${tmp#* }"
9484
9485  # Input might be given as Windows format, start by converting to
9486  # unix format.
9487  new_path="$path"
9488
9489  windows_path="$new_path"
9490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9491    unix_path=`$CYGPATH -u "$windows_path"`
9492    new_path="$unix_path"
9493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9495    new_path="$unix_path"
9496  fi
9497
9498
9499  # Now try to locate executable using which
9500  new_path=`$WHICH "$new_path" 2> /dev/null`
9501
9502  if test "x$new_path" = x; then
9503    # Oops. Which didn't find the executable.
9504    # The splitting of arguments from the executable at a space might have been incorrect,
9505    # since paths with space are more likely in Windows. Give it another try with the whole
9506    # argument.
9507    path="$complete"
9508    arguments="EOL"
9509    new_path="$path"
9510
9511  windows_path="$new_path"
9512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9513    unix_path=`$CYGPATH -u "$windows_path"`
9514    new_path="$unix_path"
9515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9517    new_path="$unix_path"
9518  fi
9519
9520
9521    new_path=`$WHICH "$new_path" 2> /dev/null`
9522
9523    if test "x$new_path" = x; then
9524      # It's still not found. Now this is an unrecoverable error.
9525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9526$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9527      has_space=`$ECHO "$complete" | $GREP " "`
9528      if test "x$has_space" != x; then
9529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9531      fi
9532      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9533    fi
9534  fi
9535
9536  # Now new_path has a complete unix path to the binary
9537  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9538    # Keep paths in /bin as-is, but remove trailing .exe if any
9539    new_path="${new_path/%.exe/}"
9540    # Do not save /bin paths to all_fixpath_prefixes!
9541  else
9542    # Not in mixed or Windows style, start by that.
9543    new_path=`cmd //c echo $new_path`
9544
9545  input_path="$new_path"
9546  # Check if we need to convert this using DOS-style short mode. If the path
9547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9548  # take no chances and rewrite it.
9549  # Note: m4 eats our [], so we need to use [ and ] instead.
9550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9551  if test "x$has_forbidden_chars" != x; then
9552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9554  fi
9555
9556    # Output is in $new_path
9557
9558  windows_path="$new_path"
9559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9560    unix_path=`$CYGPATH -u "$windows_path"`
9561    new_path="$unix_path"
9562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9564    new_path="$unix_path"
9565  fi
9566
9567    # remove trailing .exe if any
9568    new_path="${new_path/%.exe/}"
9569
9570    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9571    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9572  fi
9573
9574  else
9575    # We're on a posix platform. Hooray! :)
9576    # First separate the path from the arguments. This will split at the first
9577    # space.
9578    complete="$FOUND_MAKE"
9579    path="${complete%% *}"
9580    tmp="$complete EOL"
9581    arguments="${tmp#* }"
9582
9583    # Cannot rely on the command "which" here since it doesn't always work.
9584    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9585    if test -z "$is_absolute_path"; then
9586      # Path to executable is not absolute. Find it.
9587      IFS_save="$IFS"
9588      IFS=:
9589      for p in $PATH; do
9590        if test -f "$p/$path" && test -x "$p/$path"; then
9591          new_path="$p/$path"
9592          break
9593        fi
9594      done
9595      IFS="$IFS_save"
9596    else
9597      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9598$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9599      new_path="$path"
9600    fi
9601
9602    if test "x$new_path" = x; then
9603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9604$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9605        has_space=`$ECHO "$complete" | $GREP " "`
9606        if test "x$has_space" != x; then
9607          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9608$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9609        fi
9610        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9611      fi
9612  fi
9613
9614      # Now join together the path and the arguments once again
9615      if test "x$arguments" != xEOL; then
9616        new_complete="$new_path ${arguments% *}"
9617      else
9618        new_complete="$new_path"
9619      fi
9620
9621  if test "x$complete" != "x$new_complete"; then
9622      FOUND_MAKE="$new_complete"
9623      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9624$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9625    fi
9626
9627        fi
9628      fi
9629    fi
9630  fi
9631
9632        if test "x$FOUND_MAKE" = x; then
9633          for ac_prog in make
9634do
9635  # Extract the first word of "$ac_prog", so it can be a program name with args.
9636set dummy $ac_prog; ac_word=$2
9637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9638$as_echo_n "checking for $ac_word... " >&6; }
9639if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9640  $as_echo_n "(cached) " >&6
9641else
9642  case $CHECK_TOOLSDIR_MAKE in
9643  [\\/]* | ?:[\\/]*)
9644  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9645  ;;
9646  *)
9647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9648for as_dir in $PATH
9649do
9650  IFS=$as_save_IFS
9651  test -z "$as_dir" && as_dir=.
9652    for ac_exec_ext in '' $ac_executable_extensions; do
9653  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9654    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9656    break 2
9657  fi
9658done
9659  done
9660IFS=$as_save_IFS
9661
9662  ;;
9663esac
9664fi
9665CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9666if test -n "$CHECK_TOOLSDIR_MAKE"; then
9667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9668$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9669else
9670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9671$as_echo "no" >&6; }
9672fi
9673
9674
9675  test -n "$CHECK_TOOLSDIR_MAKE" && break
9676done
9677
9678
9679  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9680  DESCRIPTION="make in tools-dir"
9681  if test "x$MAKE_CANDIDATE" != x; then
9682    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9683$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9684    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9685    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9686    if test "x$IS_GNU_MAKE" = x; then
9687      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9688$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9689    else
9690      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9691      if test "x$IS_MODERN_MAKE" = x; then
9692        { $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
9693$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;}
9694      else
9695        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9696          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9697            MAKE_EXPECTED_ENV='cygwin'
9698          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9699            MAKE_EXPECTED_ENV='msys'
9700          else
9701            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9702          fi
9703          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9704          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9705        else
9706          # Not relevant for non-Windows
9707          IS_MAKE_CORRECT_ENV=true
9708        fi
9709        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9710          { $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
9711$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;}
9712        else
9713          FOUND_MAKE=$MAKE_CANDIDATE
9714
9715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9716
9717  # First separate the path from the arguments. This will split at the first
9718  # space.
9719  complete="$FOUND_MAKE"
9720  path="${complete%% *}"
9721  tmp="$complete EOL"
9722  arguments="${tmp#* }"
9723
9724  # Input might be given as Windows format, start by converting to
9725  # unix format.
9726  new_path=`$CYGPATH -u "$path"`
9727
9728  # Now try to locate executable using which
9729  new_path=`$WHICH "$new_path" 2> /dev/null`
9730  # bat and cmd files are not always considered executable in cygwin causing which
9731  # to not find them
9732  if test "x$new_path" = x \
9733           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9734           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9735    new_path=`$CYGPATH -u "$path"`
9736  fi
9737  if test "x$new_path" = x; then
9738    # Oops. Which didn't find the executable.
9739    # The splitting of arguments from the executable at a space might have been incorrect,
9740    # since paths with space are more likely in Windows. Give it another try with the whole
9741    # argument.
9742    path="$complete"
9743    arguments="EOL"
9744    new_path=`$CYGPATH -u "$path"`
9745    new_path=`$WHICH "$new_path" 2> /dev/null`
9746    # bat and cmd files are not always considered executable in cygwin causing which
9747    # to not find them
9748    if test "x$new_path" = x \
9749             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9750             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9751      new_path=`$CYGPATH -u "$path"`
9752    fi
9753    if test "x$new_path" = x; then
9754      # It's still not found. Now this is an unrecoverable error.
9755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9756$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9757      has_space=`$ECHO "$complete" | $GREP " "`
9758      if test "x$has_space" != x; then
9759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9761      fi
9762      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9763    fi
9764  fi
9765
9766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9769  # "foo.exe" is OK but "foo" is an error.
9770  #
9771  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9772  # It is also a way to make sure we got the proper file name for the real test later on.
9773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9774  if test "x$test_shortpath" = x; then
9775    # Short path failed, file does not exist as specified.
9776    # Try adding .exe or .cmd
9777    if test -f "${new_path}.exe"; then
9778       input_to_shortpath="${new_path}.exe"
9779    elif test -f "${new_path}.cmd"; then
9780       input_to_shortpath="${new_path}.cmd"
9781    else
9782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9783$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9784      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9785$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9786      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9787    fi
9788  else
9789    input_to_shortpath="$new_path"
9790  fi
9791
9792  # Call helper function which possibly converts this using DOS-style short mode.
9793  # If so, the updated path is stored in $new_path.
9794  new_path="$input_to_shortpath"
9795
9796  input_path="$input_to_shortpath"
9797  # Check if we need to convert this using DOS-style short mode. If the path
9798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9799  # take no chances and rewrite it.
9800  # Note: m4 eats our [], so we need to use [ and ] instead.
9801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9802  if test "x$has_forbidden_chars" != x; then
9803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9807      # Going to short mode and back again did indeed matter. Since short mode is
9808      # case insensitive, let's make it lowercase to improve readability.
9809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9810      # Now convert it back to Unix-stile (cygpath)
9811      input_path=`$CYGPATH -u "$shortmode_path"`
9812      new_path="$input_path"
9813    fi
9814  fi
9815
9816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9817  if test "x$test_cygdrive_prefix" = x; then
9818    # As a simple fix, exclude /usr/bin since it's not a real path.
9819    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9821      # a path prefixed by /cygdrive for fixpath to work.
9822      new_path="$CYGWIN_ROOT_PATH$input_path"
9823    fi
9824  fi
9825
9826  # remove trailing .exe if any
9827  new_path="${new_path/%.exe/}"
9828
9829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9830
9831  # First separate the path from the arguments. This will split at the first
9832  # space.
9833  complete="$FOUND_MAKE"
9834  path="${complete%% *}"
9835  tmp="$complete EOL"
9836  arguments="${tmp#* }"
9837
9838  # Input might be given as Windows format, start by converting to
9839  # unix format.
9840  new_path="$path"
9841
9842  windows_path="$new_path"
9843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9844    unix_path=`$CYGPATH -u "$windows_path"`
9845    new_path="$unix_path"
9846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9848    new_path="$unix_path"
9849  fi
9850
9851
9852  # Now try to locate executable using which
9853  new_path=`$WHICH "$new_path" 2> /dev/null`
9854
9855  if test "x$new_path" = x; then
9856    # Oops. Which didn't find the executable.
9857    # The splitting of arguments from the executable at a space might have been incorrect,
9858    # since paths with space are more likely in Windows. Give it another try with the whole
9859    # argument.
9860    path="$complete"
9861    arguments="EOL"
9862    new_path="$path"
9863
9864  windows_path="$new_path"
9865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9866    unix_path=`$CYGPATH -u "$windows_path"`
9867    new_path="$unix_path"
9868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9870    new_path="$unix_path"
9871  fi
9872
9873
9874    new_path=`$WHICH "$new_path" 2> /dev/null`
9875
9876    if test "x$new_path" = x; then
9877      # It's still not found. Now this is an unrecoverable error.
9878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9879$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9880      has_space=`$ECHO "$complete" | $GREP " "`
9881      if test "x$has_space" != x; then
9882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9884      fi
9885      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9886    fi
9887  fi
9888
9889  # Now new_path has a complete unix path to the binary
9890  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9891    # Keep paths in /bin as-is, but remove trailing .exe if any
9892    new_path="${new_path/%.exe/}"
9893    # Do not save /bin paths to all_fixpath_prefixes!
9894  else
9895    # Not in mixed or Windows style, start by that.
9896    new_path=`cmd //c echo $new_path`
9897
9898  input_path="$new_path"
9899  # Check if we need to convert this using DOS-style short mode. If the path
9900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9901  # take no chances and rewrite it.
9902  # Note: m4 eats our [], so we need to use [ and ] instead.
9903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9904  if test "x$has_forbidden_chars" != x; then
9905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9907  fi
9908
9909    # Output is in $new_path
9910
9911  windows_path="$new_path"
9912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9913    unix_path=`$CYGPATH -u "$windows_path"`
9914    new_path="$unix_path"
9915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9917    new_path="$unix_path"
9918  fi
9919
9920    # remove trailing .exe if any
9921    new_path="${new_path/%.exe/}"
9922
9923    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9924    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9925  fi
9926
9927  else
9928    # We're on a posix platform. Hooray! :)
9929    # First separate the path from the arguments. This will split at the first
9930    # space.
9931    complete="$FOUND_MAKE"
9932    path="${complete%% *}"
9933    tmp="$complete EOL"
9934    arguments="${tmp#* }"
9935
9936    # Cannot rely on the command "which" here since it doesn't always work.
9937    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9938    if test -z "$is_absolute_path"; then
9939      # Path to executable is not absolute. Find it.
9940      IFS_save="$IFS"
9941      IFS=:
9942      for p in $PATH; do
9943        if test -f "$p/$path" && test -x "$p/$path"; then
9944          new_path="$p/$path"
9945          break
9946        fi
9947      done
9948      IFS="$IFS_save"
9949    else
9950      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9951$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9952      new_path="$path"
9953    fi
9954
9955    if test "x$new_path" = x; then
9956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9957$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9958        has_space=`$ECHO "$complete" | $GREP " "`
9959        if test "x$has_space" != x; then
9960          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9961$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9962        fi
9963        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9964      fi
9965  fi
9966
9967      # Now join together the path and the arguments once again
9968      if test "x$arguments" != xEOL; then
9969        new_complete="$new_path ${arguments% *}"
9970      else
9971        new_complete="$new_path"
9972      fi
9973
9974  if test "x$complete" != "x$new_complete"; then
9975      FOUND_MAKE="$new_complete"
9976      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9977$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9978    fi
9979
9980        fi
9981      fi
9982    fi
9983  fi
9984
9985        fi
9986        PATH=$OLD_PATH
9987      fi
9988    fi
9989
9990    if test "x$FOUND_MAKE" = x; then
9991      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
9992    fi
9993  fi
9994
9995  MAKE=$FOUND_MAKE
9996
9997  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9998$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9999
10000
10001
10002    # Test if find supports -delete
10003    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10004$as_echo_n "checking if find supports -delete... " >&6; }
10005    FIND_DELETE="-delete"
10006
10007    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10008
10009    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10010
10011    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10012    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10013        # No, it does not.
10014        rm $DELETEDIR/TestIfFindSupportsDelete
10015        FIND_DELETE="-exec rm \{\} \+"
10016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10017$as_echo "no" >&6; }
10018    else
10019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10020$as_echo "yes" >&6; }
10021    fi
10022    rmdir $DELETEDIR
10023
10024
10025
10026# These tools might not be installed by default,
10027# need hint on how to install them.
10028
10029    for ac_prog in unzip
10030do
10031  # Extract the first word of "$ac_prog", so it can be a program name with args.
10032set dummy $ac_prog; ac_word=$2
10033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10034$as_echo_n "checking for $ac_word... " >&6; }
10035if test "${ac_cv_path_UNZIP+set}" = set; then :
10036  $as_echo_n "(cached) " >&6
10037else
10038  case $UNZIP in
10039  [\\/]* | ?:[\\/]*)
10040  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10041  ;;
10042  *)
10043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10044for as_dir in $PATH
10045do
10046  IFS=$as_save_IFS
10047  test -z "$as_dir" && as_dir=.
10048    for ac_exec_ext in '' $ac_executable_extensions; do
10049  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10050    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10052    break 2
10053  fi
10054done
10055  done
10056IFS=$as_save_IFS
10057
10058  ;;
10059esac
10060fi
10061UNZIP=$ac_cv_path_UNZIP
10062if test -n "$UNZIP"; then
10063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10064$as_echo "$UNZIP" >&6; }
10065else
10066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10067$as_echo "no" >&6; }
10068fi
10069
10070
10071  test -n "$UNZIP" && break
10072done
10073
10074
10075    if test "x$UNZIP" = x; then
10076        if test "xunzip" = x; then
10077          PROG_NAME=unzip
10078        else
10079          PROG_NAME=unzip
10080        fi
10081        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10082$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10083        as_fn_error $? "Cannot continue" "$LINENO" 5
10084    fi
10085
10086
10087
10088    for ac_prog in zip
10089do
10090  # Extract the first word of "$ac_prog", so it can be a program name with args.
10091set dummy $ac_prog; ac_word=$2
10092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10093$as_echo_n "checking for $ac_word... " >&6; }
10094if test "${ac_cv_path_ZIP+set}" = set; then :
10095  $as_echo_n "(cached) " >&6
10096else
10097  case $ZIP in
10098  [\\/]* | ?:[\\/]*)
10099  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10100  ;;
10101  *)
10102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10103for as_dir in $PATH
10104do
10105  IFS=$as_save_IFS
10106  test -z "$as_dir" && as_dir=.
10107    for ac_exec_ext in '' $ac_executable_extensions; do
10108  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10109    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10111    break 2
10112  fi
10113done
10114  done
10115IFS=$as_save_IFS
10116
10117  ;;
10118esac
10119fi
10120ZIP=$ac_cv_path_ZIP
10121if test -n "$ZIP"; then
10122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10123$as_echo "$ZIP" >&6; }
10124else
10125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10126$as_echo "no" >&6; }
10127fi
10128
10129
10130  test -n "$ZIP" && break
10131done
10132
10133
10134    if test "x$ZIP" = x; then
10135        if test "xzip" = x; then
10136          PROG_NAME=zip
10137        else
10138          PROG_NAME=zip
10139        fi
10140        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10141$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10142        as_fn_error $? "Cannot continue" "$LINENO" 5
10143    fi
10144
10145
10146
10147# Non-required basic tools
10148
10149# Extract the first word of "ldd", so it can be a program name with args.
10150set dummy ldd; ac_word=$2
10151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10152$as_echo_n "checking for $ac_word... " >&6; }
10153if test "${ac_cv_path_LDD+set}" = set; then :
10154  $as_echo_n "(cached) " >&6
10155else
10156  case $LDD in
10157  [\\/]* | ?:[\\/]*)
10158  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10159  ;;
10160  *)
10161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10162for as_dir in $PATH
10163do
10164  IFS=$as_save_IFS
10165  test -z "$as_dir" && as_dir=.
10166    for ac_exec_ext in '' $ac_executable_extensions; do
10167  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10168    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10170    break 2
10171  fi
10172done
10173  done
10174IFS=$as_save_IFS
10175
10176  ;;
10177esac
10178fi
10179LDD=$ac_cv_path_LDD
10180if test -n "$LDD"; then
10181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10182$as_echo "$LDD" >&6; }
10183else
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10185$as_echo "no" >&6; }
10186fi
10187
10188
10189if test "x$LDD" = "x"; then
10190    # List shared lib dependencies is used for
10191    # debug output and checking for forbidden dependencies.
10192    # We can build without it.
10193    LDD="true"
10194fi
10195# Extract the first word of "otool", so it can be a program name with args.
10196set dummy otool; ac_word=$2
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10198$as_echo_n "checking for $ac_word... " >&6; }
10199if test "${ac_cv_path_OTOOL+set}" = set; then :
10200  $as_echo_n "(cached) " >&6
10201else
10202  case $OTOOL in
10203  [\\/]* | ?:[\\/]*)
10204  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10205  ;;
10206  *)
10207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10208for as_dir in $PATH
10209do
10210  IFS=$as_save_IFS
10211  test -z "$as_dir" && as_dir=.
10212    for ac_exec_ext in '' $ac_executable_extensions; do
10213  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10214    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10216    break 2
10217  fi
10218done
10219  done
10220IFS=$as_save_IFS
10221
10222  ;;
10223esac
10224fi
10225OTOOL=$ac_cv_path_OTOOL
10226if test -n "$OTOOL"; then
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10228$as_echo "$OTOOL" >&6; }
10229else
10230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231$as_echo "no" >&6; }
10232fi
10233
10234
10235if test "x$OTOOL" = "x"; then
10236   OTOOL="true"
10237fi
10238for ac_prog in readelf greadelf
10239do
10240  # Extract the first word of "$ac_prog", so it can be a program name with args.
10241set dummy $ac_prog; ac_word=$2
10242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10243$as_echo_n "checking for $ac_word... " >&6; }
10244if test "${ac_cv_path_READELF+set}" = set; then :
10245  $as_echo_n "(cached) " >&6
10246else
10247  case $READELF in
10248  [\\/]* | ?:[\\/]*)
10249  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10250  ;;
10251  *)
10252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10253for as_dir in $PATH
10254do
10255  IFS=$as_save_IFS
10256  test -z "$as_dir" && as_dir=.
10257    for ac_exec_ext in '' $ac_executable_extensions; do
10258  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10259    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10261    break 2
10262  fi
10263done
10264  done
10265IFS=$as_save_IFS
10266
10267  ;;
10268esac
10269fi
10270READELF=$ac_cv_path_READELF
10271if test -n "$READELF"; then
10272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10273$as_echo "$READELF" >&6; }
10274else
10275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276$as_echo "no" >&6; }
10277fi
10278
10279
10280  test -n "$READELF" && break
10281done
10282
10283# Extract the first word of "hg", so it can be a program name with args.
10284set dummy hg; ac_word=$2
10285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10286$as_echo_n "checking for $ac_word... " >&6; }
10287if test "${ac_cv_path_HG+set}" = set; then :
10288  $as_echo_n "(cached) " >&6
10289else
10290  case $HG in
10291  [\\/]* | ?:[\\/]*)
10292  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10293  ;;
10294  *)
10295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10296for as_dir in $PATH
10297do
10298  IFS=$as_save_IFS
10299  test -z "$as_dir" && as_dir=.
10300    for ac_exec_ext in '' $ac_executable_extensions; do
10301  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10302    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10304    break 2
10305  fi
10306done
10307  done
10308IFS=$as_save_IFS
10309
10310  ;;
10311esac
10312fi
10313HG=$ac_cv_path_HG
10314if test -n "$HG"; then
10315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10316$as_echo "$HG" >&6; }
10317else
10318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10319$as_echo "no" >&6; }
10320fi
10321
10322
10323# Extract the first word of "stat", so it can be a program name with args.
10324set dummy stat; ac_word=$2
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10326$as_echo_n "checking for $ac_word... " >&6; }
10327if test "${ac_cv_path_STAT+set}" = set; then :
10328  $as_echo_n "(cached) " >&6
10329else
10330  case $STAT in
10331  [\\/]* | ?:[\\/]*)
10332  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10333  ;;
10334  *)
10335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10336for as_dir in $PATH
10337do
10338  IFS=$as_save_IFS
10339  test -z "$as_dir" && as_dir=.
10340    for ac_exec_ext in '' $ac_executable_extensions; do
10341  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10342    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10344    break 2
10345  fi
10346done
10347  done
10348IFS=$as_save_IFS
10349
10350  ;;
10351esac
10352fi
10353STAT=$ac_cv_path_STAT
10354if test -n "$STAT"; then
10355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10356$as_echo "$STAT" >&6; }
10357else
10358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359$as_echo "no" >&6; }
10360fi
10361
10362
10363# Extract the first word of "time", so it can be a program name with args.
10364set dummy time; ac_word=$2
10365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10366$as_echo_n "checking for $ac_word... " >&6; }
10367if test "${ac_cv_path_TIME+set}" = set; then :
10368  $as_echo_n "(cached) " >&6
10369else
10370  case $TIME in
10371  [\\/]* | ?:[\\/]*)
10372  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10373  ;;
10374  *)
10375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10376for as_dir in $PATH
10377do
10378  IFS=$as_save_IFS
10379  test -z "$as_dir" && as_dir=.
10380    for ac_exec_ext in '' $ac_executable_extensions; do
10381  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10382    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10384    break 2
10385  fi
10386done
10387  done
10388IFS=$as_save_IFS
10389
10390  ;;
10391esac
10392fi
10393TIME=$ac_cv_path_TIME
10394if test -n "$TIME"; then
10395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10396$as_echo "$TIME" >&6; }
10397else
10398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399$as_echo "no" >&6; }
10400fi
10401
10402
10403# Check if it's GNU time
10404IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10405if test "x$IS_GNU_TIME" != x; then
10406  IS_GNU_TIME=yes
10407else
10408  IS_GNU_TIME=no
10409fi
10410
10411
10412if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10413
10414    for ac_prog in comm
10415do
10416  # Extract the first word of "$ac_prog", so it can be a program name with args.
10417set dummy $ac_prog; ac_word=$2
10418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10419$as_echo_n "checking for $ac_word... " >&6; }
10420if test "${ac_cv_path_COMM+set}" = set; then :
10421  $as_echo_n "(cached) " >&6
10422else
10423  case $COMM in
10424  [\\/]* | ?:[\\/]*)
10425  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10426  ;;
10427  *)
10428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10429for as_dir in $PATH
10430do
10431  IFS=$as_save_IFS
10432  test -z "$as_dir" && as_dir=.
10433    for ac_exec_ext in '' $ac_executable_extensions; do
10434  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10435    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10437    break 2
10438  fi
10439done
10440  done
10441IFS=$as_save_IFS
10442
10443  ;;
10444esac
10445fi
10446COMM=$ac_cv_path_COMM
10447if test -n "$COMM"; then
10448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10449$as_echo "$COMM" >&6; }
10450else
10451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10452$as_echo "no" >&6; }
10453fi
10454
10455
10456  test -n "$COMM" && break
10457done
10458
10459
10460    if test "x$COMM" = x; then
10461        if test "xcomm" = x; then
10462          PROG_NAME=comm
10463        else
10464          PROG_NAME=comm
10465        fi
10466        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10467$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10468        as_fn_error $? "Cannot continue" "$LINENO" 5
10469    fi
10470
10471
10472fi
10473
10474if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10475
10476    for ac_prog in xattr
10477do
10478  # Extract the first word of "$ac_prog", so it can be a program name with args.
10479set dummy $ac_prog; ac_word=$2
10480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10481$as_echo_n "checking for $ac_word... " >&6; }
10482if test "${ac_cv_path_XATTR+set}" = set; then :
10483  $as_echo_n "(cached) " >&6
10484else
10485  case $XATTR in
10486  [\\/]* | ?:[\\/]*)
10487  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10488  ;;
10489  *)
10490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10491for as_dir in $PATH
10492do
10493  IFS=$as_save_IFS
10494  test -z "$as_dir" && as_dir=.
10495    for ac_exec_ext in '' $ac_executable_extensions; do
10496  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10497    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10499    break 2
10500  fi
10501done
10502  done
10503IFS=$as_save_IFS
10504
10505  ;;
10506esac
10507fi
10508XATTR=$ac_cv_path_XATTR
10509if test -n "$XATTR"; then
10510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10511$as_echo "$XATTR" >&6; }
10512else
10513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10514$as_echo "no" >&6; }
10515fi
10516
10517
10518  test -n "$XATTR" && break
10519done
10520
10521
10522    if test "x$XATTR" = x; then
10523        if test "xxattr" = x; then
10524          PROG_NAME=xattr
10525        else
10526          PROG_NAME=xattr
10527        fi
10528        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10529$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10530        as_fn_error $? "Cannot continue" "$LINENO" 5
10531    fi
10532
10533
10534  # Extract the first word of "codesign", so it can be a program name with args.
10535set dummy codesign; ac_word=$2
10536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10537$as_echo_n "checking for $ac_word... " >&6; }
10538if test "${ac_cv_path_CODESIGN+set}" = set; then :
10539  $as_echo_n "(cached) " >&6
10540else
10541  case $CODESIGN in
10542  [\\/]* | ?:[\\/]*)
10543  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10544  ;;
10545  *)
10546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10547for as_dir in $PATH
10548do
10549  IFS=$as_save_IFS
10550  test -z "$as_dir" && as_dir=.
10551    for ac_exec_ext in '' $ac_executable_extensions; do
10552  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10553    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10555    break 2
10556  fi
10557done
10558  done
10559IFS=$as_save_IFS
10560
10561  ;;
10562esac
10563fi
10564CODESIGN=$ac_cv_path_CODESIGN
10565if test -n "$CODESIGN"; then
10566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10567$as_echo "$CODESIGN" >&6; }
10568else
10569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10570$as_echo "no" >&6; }
10571fi
10572
10573
10574  if test "x$CODESIGN" != "x"; then
10575    # Verify that the openjdk_codesign certificate is present
10576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10577$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10578    rm -f codesign-testfile
10579    touch codesign-testfile
10580    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10581    rm -f codesign-testfile
10582    if test "x$CODESIGN" = x; then
10583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10584$as_echo "no" >&6; }
10585    else
10586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10587$as_echo "yes" >&6; }
10588    fi
10589  fi
10590fi
10591
10592
10593# Check if pkg-config is available.
10594
10595
10596if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10597	if test -n "$ac_tool_prefix"; then
10598  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10599set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10601$as_echo_n "checking for $ac_word... " >&6; }
10602if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10603  $as_echo_n "(cached) " >&6
10604else
10605  case $PKG_CONFIG in
10606  [\\/]* | ?:[\\/]*)
10607  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10608  ;;
10609  *)
10610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10611for as_dir in $PATH
10612do
10613  IFS=$as_save_IFS
10614  test -z "$as_dir" && as_dir=.
10615    for ac_exec_ext in '' $ac_executable_extensions; do
10616  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10617    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10619    break 2
10620  fi
10621done
10622  done
10623IFS=$as_save_IFS
10624
10625  ;;
10626esac
10627fi
10628PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10629if test -n "$PKG_CONFIG"; then
10630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10631$as_echo "$PKG_CONFIG" >&6; }
10632else
10633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10634$as_echo "no" >&6; }
10635fi
10636
10637
10638fi
10639if test -z "$ac_cv_path_PKG_CONFIG"; then
10640  ac_pt_PKG_CONFIG=$PKG_CONFIG
10641  # Extract the first word of "pkg-config", so it can be a program name with args.
10642set dummy pkg-config; ac_word=$2
10643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10644$as_echo_n "checking for $ac_word... " >&6; }
10645if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10646  $as_echo_n "(cached) " >&6
10647else
10648  case $ac_pt_PKG_CONFIG in
10649  [\\/]* | ?:[\\/]*)
10650  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10651  ;;
10652  *)
10653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10654for as_dir in $PATH
10655do
10656  IFS=$as_save_IFS
10657  test -z "$as_dir" && as_dir=.
10658    for ac_exec_ext in '' $ac_executable_extensions; do
10659  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10660    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10662    break 2
10663  fi
10664done
10665  done
10666IFS=$as_save_IFS
10667
10668  ;;
10669esac
10670fi
10671ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10672if test -n "$ac_pt_PKG_CONFIG"; then
10673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10674$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10675else
10676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10677$as_echo "no" >&6; }
10678fi
10679
10680  if test "x$ac_pt_PKG_CONFIG" = x; then
10681    PKG_CONFIG=""
10682  else
10683    case $cross_compiling:$ac_tool_warned in
10684yes:)
10685{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10686$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10687ac_tool_warned=yes ;;
10688esac
10689    PKG_CONFIG=$ac_pt_PKG_CONFIG
10690  fi
10691else
10692  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10693fi
10694
10695fi
10696if test -n "$PKG_CONFIG"; then
10697	_pkg_min_version=0.9.0
10698	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10699$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10700	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10701		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10702$as_echo "yes" >&6; }
10703	else
10704		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10705$as_echo "no" >&6; }
10706		PKG_CONFIG=""
10707	fi
10708
10709fi
10710
10711# After basic tools have been setup, we can check build os specific details.
10712
10713###############################################################################
10714
10715# Note that this is the build platform OS version!
10716
10717OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10718OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10719OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10720OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10721
10722
10723
10724
10725
10726# Setup builddeps, for automatic downloading of tools we need.
10727# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10728# boot-jdk setup, but we need to have basic tools setup first.
10729
10730
10731# Check whether --with-builddeps-conf was given.
10732if test "${with_builddeps_conf+set}" = set; then :
10733  withval=$with_builddeps_conf;
10734fi
10735
10736
10737
10738# Check whether --with-builddeps-server was given.
10739if test "${with_builddeps_server+set}" = set; then :
10740  withval=$with_builddeps_server;
10741fi
10742
10743
10744
10745# Check whether --with-builddeps-dir was given.
10746if test "${with_builddeps_dir+set}" = set; then :
10747  withval=$with_builddeps_dir;
10748else
10749  with_builddeps_dir=/localhome/builddeps
10750fi
10751
10752
10753
10754# Check whether --with-builddeps-group was given.
10755if test "${with_builddeps_group+set}" = set; then :
10756  withval=$with_builddeps_group;
10757fi
10758
10759
10760
10761
10762    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10763        if test "x$with_builddeps_conf" != x; then
10764            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10765$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10766            builddepsfile=$with_builddeps_conf
10767            if test -s $builddepsfile; then
10768                . $builddepsfile
10769                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10770$as_echo "loaded!" >&6; }
10771            else
10772               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10773           fi
10774        else
10775            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10776$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10777            builddepsfile=`mktemp`
10778            touch $builddepsfile
10779            # Put all found confs into a single file.
10780            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10781            # Source the file to acquire the variables
10782            if test -s $builddepsfile; then
10783                . $builddepsfile
10784                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10785$as_echo "found at least one!" >&6; }
10786            else
10787               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10788           fi
10789        fi
10790        # Create build and target names that use _ instead of "-" and ".".
10791        # This is necessary to use them in variable names.
10792        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10793        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10794        # Extract rewrite information for build and target
10795        eval rewritten_build=\${REWRITE_${build_var}}
10796        if test "x$rewritten_build" = x; then
10797            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10798            echo Build stays the same $rewritten_build
10799        else
10800            echo Rewriting build for builddeps into $rewritten_build
10801        fi
10802        eval rewritten_target=\${REWRITE_${target_var}}
10803        if test "x$rewritten_target" = x; then
10804            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10805            echo Target stays the same $rewritten_target
10806        else
10807            echo Rewriting target for builddeps into $rewritten_target
10808        fi
10809        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10810        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10811    fi
10812    for ac_prog in 7z unzip
10813do
10814  # Extract the first word of "$ac_prog", so it can be a program name with args.
10815set dummy $ac_prog; ac_word=$2
10816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10817$as_echo_n "checking for $ac_word... " >&6; }
10818if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10819  $as_echo_n "(cached) " >&6
10820else
10821  if test -n "$BDEPS_UNZIP"; then
10822  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10823else
10824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10825for as_dir in $PATH
10826do
10827  IFS=$as_save_IFS
10828  test -z "$as_dir" && as_dir=.
10829    for ac_exec_ext in '' $ac_executable_extensions; do
10830  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10831    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10833    break 2
10834  fi
10835done
10836  done
10837IFS=$as_save_IFS
10838
10839fi
10840fi
10841BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10842if test -n "$BDEPS_UNZIP"; then
10843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10844$as_echo "$BDEPS_UNZIP" >&6; }
10845else
10846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10847$as_echo "no" >&6; }
10848fi
10849
10850
10851  test -n "$BDEPS_UNZIP" && break
10852done
10853
10854    if test "x$BDEPS_UNZIP" = x7z; then
10855        BDEPS_UNZIP="7z x"
10856    fi
10857
10858    for ac_prog in wget lftp ftp
10859do
10860  # Extract the first word of "$ac_prog", so it can be a program name with args.
10861set dummy $ac_prog; ac_word=$2
10862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10863$as_echo_n "checking for $ac_word... " >&6; }
10864if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10865  $as_echo_n "(cached) " >&6
10866else
10867  if test -n "$BDEPS_FTP"; then
10868  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10869else
10870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10871for as_dir in $PATH
10872do
10873  IFS=$as_save_IFS
10874  test -z "$as_dir" && as_dir=.
10875    for ac_exec_ext in '' $ac_executable_extensions; do
10876  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10877    ac_cv_prog_BDEPS_FTP="$ac_prog"
10878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10879    break 2
10880  fi
10881done
10882  done
10883IFS=$as_save_IFS
10884
10885fi
10886fi
10887BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10888if test -n "$BDEPS_FTP"; then
10889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10890$as_echo "$BDEPS_FTP" >&6; }
10891else
10892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10893$as_echo "no" >&6; }
10894fi
10895
10896
10897  test -n "$BDEPS_FTP" && break
10898done
10899
10900
10901
10902###############################################################################
10903#
10904# Determine OpenJDK variants, options and version numbers.
10905#
10906###############################################################################
10907
10908# We need build & target for this.
10909
10910
10911###############################################################################
10912#
10913# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10914# We always build headless support.
10915#
10916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10917$as_echo_n "checking headful support... " >&6; }
10918# Check whether --enable-headful was given.
10919if test "${enable_headful+set}" = set; then :
10920  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10921else
10922  SUPPORT_HEADFUL=yes
10923fi
10924
10925
10926SUPPORT_HEADLESS=yes
10927BUILD_HEADLESS="BUILD_HEADLESS:=true"
10928
10929if test "x$SUPPORT_HEADFUL" = xyes; then
10930    # We are building both headful and headless.
10931    headful_msg="inlude support for both headful and headless"
10932fi
10933
10934if test "x$SUPPORT_HEADFUL" = xno; then
10935    # Thus we are building headless only.
10936    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10937    headful_msg="headless only"
10938fi
10939
10940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10941$as_echo "$headful_msg" >&6; }
10942
10943
10944
10945
10946
10947# Control wether Hotspot runs Queens test after build.
10948# Check whether --enable-hotspot-test-in-build was given.
10949if test "${enable_hotspot_test_in_build+set}" = set; then :
10950  enableval=$enable_hotspot_test_in_build;
10951else
10952  enable_hotspot_test_in_build=no
10953fi
10954
10955if test "x$enable_hotspot_test_in_build" = "xyes"; then
10956    TEST_IN_BUILD=true
10957else
10958    TEST_IN_BUILD=false
10959fi
10960
10961
10962###############################################################################
10963#
10964# Choose cacerts source file
10965#
10966
10967# Check whether --with-cacerts-file was given.
10968if test "${with_cacerts_file+set}" = set; then :
10969  withval=$with_cacerts_file;
10970fi
10971
10972if test "x$with_cacerts_file" != x; then
10973    CACERTS_FILE=$with_cacerts_file
10974else
10975    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10976fi
10977
10978
10979###############################################################################
10980#
10981# Enable or disable unlimited crypto
10982#
10983# Check whether --enable-unlimited-crypto was given.
10984if test "${enable_unlimited_crypto+set}" = set; then :
10985  enableval=$enable_unlimited_crypto;
10986else
10987  enable_unlimited_crypto=no
10988fi
10989
10990if test "x$enable_unlimited_crypto" = "xyes"; then
10991    UNLIMITED_CRYPTO=true
10992else
10993    UNLIMITED_CRYPTO=false
10994fi
10995
10996
10997###############################################################################
10998#
10999# Enable or disable the elliptic curve crypto implementation
11000#
11001
11002
11003###############################################################################
11004#
11005# Compress jars
11006#
11007COMPRESS_JARS=false
11008
11009
11010
11011
11012# Source the version numbers
11013. $AUTOCONF_DIR/version-numbers
11014
11015# Get the settings from parameters
11016
11017# Check whether --with-milestone was given.
11018if test "${with_milestone+set}" = set; then :
11019  withval=$with_milestone;
11020fi
11021
11022if test "x$with_milestone" = xyes; then
11023  as_fn_error $? "Milestone must have a value" "$LINENO" 5
11024elif test "x$with_milestone" != x; then
11025    MILESTONE="$with_milestone"
11026fi
11027if test "x$MILESTONE" = x; then
11028  MILESTONE=internal
11029fi
11030
11031
11032# Check whether --with-update-version was given.
11033if test "${with_update_version+set}" = set; then :
11034  withval=$with_update_version;
11035fi
11036
11037if test "x$with_update_version" = xyes; then
11038  as_fn_error $? "Update version must have a value" "$LINENO" 5
11039elif test "x$with_update_version" != x; then
11040  JDK_UPDATE_VERSION="$with_update_version"
11041fi
11042
11043
11044# Check whether --with-build-number was given.
11045if test "${with_build_number+set}" = set; then :
11046  withval=$with_build_number;
11047fi
11048
11049if test "x$with_build_number" = xyes; then
11050  as_fn_error $? "Build number must have a value" "$LINENO" 5
11051elif test "x$with_build_number" != x; then
11052  JDK_BUILD_NUMBER="$with_build_number"
11053fi
11054if test "x$JDK_BUILD_NUMBER" = x; then
11055  JDK_BUILD_NUMBER=b00
11056fi
11057
11058
11059# Check whether --with-user-release-suffix was given.
11060if test "${with_user_release_suffix+set}" = set; then :
11061  withval=$with_user_release_suffix;
11062fi
11063
11064if test "x$with_user_release_suffix" = xyes; then
11065  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11066elif test "x$with_user_release_suffix" != x; then
11067  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11068else
11069  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11070  # Avoid [:alnum:] since it depends on the locale.
11071  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11072  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11073fi
11074
11075
11076# Now set the JDK version, milestone, build number etc.
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091COPYRIGHT_YEAR=`date +'%Y'`
11092
11093
11094if test "x$JDK_UPDATE_VERSION" != x; then
11095  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11096else
11097  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11098fi
11099
11100
11101COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11102
11103
11104
11105###############################################################################
11106#
11107# Setup BootJDK, used to bootstrap the build.
11108#
11109###############################################################################
11110
11111
11112BOOT_JDK_FOUND=no
11113
11114# Check whether --with-boot-jdk was given.
11115if test "${with_boot_jdk+set}" = set; then :
11116  withval=$with_boot_jdk;
11117fi
11118
11119
11120# We look for the Boot JDK through various means, going from more certain to
11121# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11122# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11123# must check if this is indeed valid; otherwise we'll continue looking.
11124
11125# Test: Is bootjdk explicitely set by command line arguments?
11126
11127  if test "x$BOOT_JDK_FOUND" = xno; then
11128    # Now execute the test
11129
11130if test "x$with_boot_jdk" != x; then
11131    BOOT_JDK=$with_boot_jdk
11132    BOOT_JDK_FOUND=maybe
11133    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11134$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11135fi
11136
11137
11138    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11139    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11140      # Do we have a bin/java?
11141      if test ! -x "$BOOT_JDK/bin/java"; then
11142        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11144        BOOT_JDK_FOUND=no
11145      else
11146        # Do we have a bin/javac?
11147        if test ! -x "$BOOT_JDK/bin/javac"; then
11148          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11149$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11150          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11151$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11152          BOOT_JDK_FOUND=no
11153        else
11154          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11155          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11156            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11158            BOOT_JDK_FOUND=no
11159          else
11160            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11161            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11162
11163            # Extra M4 quote needed to protect [] in grep expression.
11164            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11165            if test "x$FOUND_VERSION_78" = x; then
11166              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11168              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11169$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11170              BOOT_JDK_FOUND=no
11171            else
11172              # We're done! :-)
11173              BOOT_JDK_FOUND=yes
11174
11175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11176
11177  # Input might be given as Windows format, start by converting to
11178  # unix format.
11179  path="$BOOT_JDK"
11180  new_path=`$CYGPATH -u "$path"`
11181
11182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11185  # "foo.exe" is OK but "foo" is an error.
11186  #
11187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11188  # It is also a way to make sure we got the proper file name for the real test later on.
11189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11190  if test "x$test_shortpath" = x; then
11191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11193    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11194  fi
11195
11196  # Call helper function which possibly converts this using DOS-style short mode.
11197  # If so, the updated path is stored in $new_path.
11198
11199  input_path="$new_path"
11200  # Check if we need to convert this using DOS-style short mode. If the path
11201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11202  # take no chances and rewrite it.
11203  # Note: m4 eats our [], so we need to use [ and ] instead.
11204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11205  if test "x$has_forbidden_chars" != x; then
11206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11210      # Going to short mode and back again did indeed matter. Since short mode is
11211      # case insensitive, let's make it lowercase to improve readability.
11212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11213      # Now convert it back to Unix-stile (cygpath)
11214      input_path=`$CYGPATH -u "$shortmode_path"`
11215      new_path="$input_path"
11216    fi
11217  fi
11218
11219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11220  if test "x$test_cygdrive_prefix" = x; then
11221    # As a simple fix, exclude /usr/bin since it's not a real path.
11222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11224      # a path prefixed by /cygdrive for fixpath to work.
11225      new_path="$CYGWIN_ROOT_PATH$input_path"
11226    fi
11227  fi
11228
11229
11230  if test "x$path" != "x$new_path"; then
11231    BOOT_JDK="$new_path"
11232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11233$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11234  fi
11235
11236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11237
11238  path="$BOOT_JDK"
11239  has_colon=`$ECHO $path | $GREP ^.:`
11240  new_path="$path"
11241  if test "x$has_colon" = x; then
11242    # Not in mixed or Windows style, start by that.
11243    new_path=`cmd //c echo $path`
11244  fi
11245
11246
11247  input_path="$new_path"
11248  # Check if we need to convert this using DOS-style short mode. If the path
11249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11250  # take no chances and rewrite it.
11251  # Note: m4 eats our [], so we need to use [ and ] instead.
11252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11253  if test "x$has_forbidden_chars" != x; then
11254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11256  fi
11257
11258
11259  windows_path="$new_path"
11260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11261    unix_path=`$CYGPATH -u "$windows_path"`
11262    new_path="$unix_path"
11263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11265    new_path="$unix_path"
11266  fi
11267
11268  if test "x$path" != "x$new_path"; then
11269    BOOT_JDK="$new_path"
11270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11272  fi
11273
11274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11276
11277  else
11278    # We're on a posix platform. Hooray! :)
11279    path="$BOOT_JDK"
11280    has_space=`$ECHO "$path" | $GREP " "`
11281    if test "x$has_space" != x; then
11282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11283$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11284      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11285    fi
11286
11287    # Use eval to expand a potential ~
11288    eval path="$path"
11289    if test ! -f "$path" && test ! -d "$path"; then
11290      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11291    fi
11292
11293    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11294  fi
11295
11296              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11297$as_echo_n "checking for Boot JDK... " >&6; }
11298              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11299$as_echo "$BOOT_JDK" >&6; }
11300              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11301$as_echo_n "checking Boot JDK version... " >&6; }
11302              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11303              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11304$as_echo "$BOOT_JDK_VERSION" >&6; }
11305            fi # end check jdk version
11306          fi # end check rt.jar
11307        fi # end check javac
11308      fi # end check java
11309    fi # end check boot jdk found
11310  fi
11311
11312if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11313  # Having specified an argument which is incorrect will produce an instant failure;
11314  # we should not go on looking
11315  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11316fi
11317
11318# Test: Is bootjdk available from builddeps?
11319
11320  if test "x$BOOT_JDK_FOUND" = xno; then
11321    # Now execute the test
11322
11323
11324
11325    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11326        # Source the builddeps file again, to make sure it uses the latest variables!
11327        . $builddepsfile
11328        # Look for a target and build machine specific resource!
11329        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11330        if test "x$resource" = x; then
11331            # Ok, lets instead look for a target specific resource
11332            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11333        fi
11334        if test "x$resource" = x; then
11335            # Ok, lets instead look for a build specific resource
11336            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11337        fi
11338        if test "x$resource" = x; then
11339            # Ok, lets instead look for a generic resource
11340            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11341            resource=${builddep_bootjdk}
11342        fi
11343        if test "x$resource" != x; then
11344            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11345$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11346	    # If the resource in the builddeps.conf file is an existing directory,
11347	    # for example /java/linux/cups
11348	    if test -d ${resource}; then
11349	       depdir=${resource}
11350	    else
11351
11352# bootjdk is for example mymodule
11353# $resource is for example libs/general/libmymod_1_2_3.zip
11354# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11355# $with_builddeps_dir is for example /localhome/builddeps
11356# depdir is the name of the variable into which we store the depdir, eg MYMOD
11357# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11358# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11359    filename=`basename $resource`
11360    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11361    filebase=${filename%%.*}
11362    extension=${filename#*.}
11363    installdir=$with_builddeps_dir/$filebase
11364    if test ! -f $installdir/$filename.unpacked; then
11365        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11366$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11367        if test ! -d $installdir; then
11368            mkdir -p $installdir
11369        fi
11370        if test ! -d $installdir; then
11371            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11372        fi
11373        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11374        touch $tmpfile
11375        if test ! -f $tmpfile; then
11376            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11377        fi
11378
11379    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11380    # $tmpfile is the local file name for the downloaded file.
11381    VALID_TOOL=no
11382    if test "x$BDEPS_FTP" = xwget; then
11383       VALID_TOOL=yes
11384       wget -O $tmpfile $with_builddeps_server/$resource
11385    fi
11386    if test "x$BDEPS_FTP" = xlftp; then
11387       VALID_TOOL=yes
11388       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11389    fi
11390    if test "x$BDEPS_FTP" = xftp; then
11391        VALID_TOOL=yes
11392        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11393        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11394        FTPUSERPWD=${FTPSERVER%%@*}
11395        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11396            FTPUSER=${userpwd%%:*}
11397            FTPPWD=${userpwd#*@}
11398            FTPSERVER=${FTPSERVER#*@}
11399        else
11400            FTPUSER=ftp
11401            FTPPWD=ftp
11402        fi
11403        # the "pass" command does not work on some
11404        # ftp clients (read ftp.exe) but if it works,
11405        # passive mode is better!
11406        (\
11407            echo "user $FTPUSER $FTPPWD"        ;\
11408            echo "pass"                         ;\
11409            echo "bin"                          ;\
11410            echo "get $FTPPATH $tmpfile"              ;\
11411        ) | ftp -in $FTPSERVER
11412    fi
11413    if test "x$VALID_TOOL" != xyes; then
11414       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11415    fi
11416
11417        mv $tmpfile $installdir/$filename
11418        if test ! -s $installdir/$filename; then
11419            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11420        fi
11421        case "$extension" in
11422            zip)  echo "Unzipping $installdir/$filename..."
11423               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11424            ;;
11425            tar.gz) echo "Untaring $installdir/$filename..."
11426               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11427            ;;
11428            tgz) echo "Untaring $installdir/$filename..."
11429               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11430            ;;
11431            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11432            ;;
11433        esac
11434    fi
11435    if test -f $installdir/$filename.unpacked; then
11436        depdir=$installdir
11437    fi
11438
11439	    fi
11440            # Source the builddeps file again, because in the previous command, the depdir
11441            # was updated to point at the current build dependency install directory.
11442            . $builddepsfile
11443            # Now extract variables from the builddeps.conf files.
11444            theroot=${builddep_bootjdk_ROOT}
11445            thecflags=${builddep_bootjdk_CFLAGS}
11446            thelibs=${builddep_bootjdk_LIBS}
11447            if test "x$depdir" = x; then
11448                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11449            fi
11450            BOOT_JDK=$depdir
11451            if test "x$theroot" != x; then
11452               BOOT_JDK="$theroot"
11453            fi
11454            if test "x$thecflags" != x; then
11455               BOOT_JDK_CFLAGS="$thecflags"
11456            fi
11457            if test "x$thelibs" != x; then
11458               BOOT_JDK_LIBS="$thelibs"
11459            fi
11460            BOOT_JDK_FOUND=maybe
11461            else BOOT_JDK_FOUND=no
11462
11463        fi
11464        else BOOT_JDK_FOUND=no
11465
11466    fi
11467
11468
11469
11470    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11471    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11472      # Do we have a bin/java?
11473      if test ! -x "$BOOT_JDK/bin/java"; then
11474        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11476        BOOT_JDK_FOUND=no
11477      else
11478        # Do we have a bin/javac?
11479        if test ! -x "$BOOT_JDK/bin/javac"; then
11480          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11482          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11483$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11484          BOOT_JDK_FOUND=no
11485        else
11486          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11487          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11488            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11490            BOOT_JDK_FOUND=no
11491          else
11492            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11493            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11494
11495            # Extra M4 quote needed to protect [] in grep expression.
11496            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11497            if test "x$FOUND_VERSION_78" = x; then
11498              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11500              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11501$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11502              BOOT_JDK_FOUND=no
11503            else
11504              # We're done! :-)
11505              BOOT_JDK_FOUND=yes
11506
11507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11508
11509  # Input might be given as Windows format, start by converting to
11510  # unix format.
11511  path="$BOOT_JDK"
11512  new_path=`$CYGPATH -u "$path"`
11513
11514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11517  # "foo.exe" is OK but "foo" is an error.
11518  #
11519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11520  # It is also a way to make sure we got the proper file name for the real test later on.
11521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11522  if test "x$test_shortpath" = x; then
11523    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11524$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11525    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11526  fi
11527
11528  # Call helper function which possibly converts this using DOS-style short mode.
11529  # If so, the updated path is stored in $new_path.
11530
11531  input_path="$new_path"
11532  # Check if we need to convert this using DOS-style short mode. If the path
11533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11534  # take no chances and rewrite it.
11535  # Note: m4 eats our [], so we need to use [ and ] instead.
11536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11537  if test "x$has_forbidden_chars" != x; then
11538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11542      # Going to short mode and back again did indeed matter. Since short mode is
11543      # case insensitive, let's make it lowercase to improve readability.
11544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11545      # Now convert it back to Unix-stile (cygpath)
11546      input_path=`$CYGPATH -u "$shortmode_path"`
11547      new_path="$input_path"
11548    fi
11549  fi
11550
11551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11552  if test "x$test_cygdrive_prefix" = x; then
11553    # As a simple fix, exclude /usr/bin since it's not a real path.
11554    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11556      # a path prefixed by /cygdrive for fixpath to work.
11557      new_path="$CYGWIN_ROOT_PATH$input_path"
11558    fi
11559  fi
11560
11561
11562  if test "x$path" != "x$new_path"; then
11563    BOOT_JDK="$new_path"
11564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11566  fi
11567
11568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11569
11570  path="$BOOT_JDK"
11571  has_colon=`$ECHO $path | $GREP ^.:`
11572  new_path="$path"
11573  if test "x$has_colon" = x; then
11574    # Not in mixed or Windows style, start by that.
11575    new_path=`cmd //c echo $path`
11576  fi
11577
11578
11579  input_path="$new_path"
11580  # Check if we need to convert this using DOS-style short mode. If the path
11581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11582  # take no chances and rewrite it.
11583  # Note: m4 eats our [], so we need to use [ and ] instead.
11584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11585  if test "x$has_forbidden_chars" != x; then
11586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11588  fi
11589
11590
11591  windows_path="$new_path"
11592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11593    unix_path=`$CYGPATH -u "$windows_path"`
11594    new_path="$unix_path"
11595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11597    new_path="$unix_path"
11598  fi
11599
11600  if test "x$path" != "x$new_path"; then
11601    BOOT_JDK="$new_path"
11602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11603$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11604  fi
11605
11606  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11607  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11608
11609  else
11610    # We're on a posix platform. Hooray! :)
11611    path="$BOOT_JDK"
11612    has_space=`$ECHO "$path" | $GREP " "`
11613    if test "x$has_space" != x; then
11614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11615$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11616      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11617    fi
11618
11619    # Use eval to expand a potential ~
11620    eval path="$path"
11621    if test ! -f "$path" && test ! -d "$path"; then
11622      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11623    fi
11624
11625    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11626  fi
11627
11628              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11629$as_echo_n "checking for Boot JDK... " >&6; }
11630              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11631$as_echo "$BOOT_JDK" >&6; }
11632              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11633$as_echo_n "checking Boot JDK version... " >&6; }
11634              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11635              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11636$as_echo "$BOOT_JDK_VERSION" >&6; }
11637            fi # end check jdk version
11638          fi # end check rt.jar
11639        fi # end check javac
11640      fi # end check java
11641    fi # end check boot jdk found
11642  fi
11643
11644
11645# Test: Is $JAVA_HOME set?
11646
11647  if test "x$BOOT_JDK_FOUND" = xno; then
11648    # Now execute the test
11649
11650    if test "x$JAVA_HOME" != x; then
11651        JAVA_HOME_PROCESSED="$JAVA_HOME"
11652
11653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11654
11655  # Input might be given as Windows format, start by converting to
11656  # unix format.
11657  path="$JAVA_HOME_PROCESSED"
11658  new_path=`$CYGPATH -u "$path"`
11659
11660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11663  # "foo.exe" is OK but "foo" is an error.
11664  #
11665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11666  # It is also a way to make sure we got the proper file name for the real test later on.
11667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11668  if test "x$test_shortpath" = x; then
11669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11670$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11671    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11672  fi
11673
11674  # Call helper function which possibly converts this using DOS-style short mode.
11675  # If so, the updated path is stored in $new_path.
11676
11677  input_path="$new_path"
11678  # Check if we need to convert this using DOS-style short mode. If the path
11679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11680  # take no chances and rewrite it.
11681  # Note: m4 eats our [], so we need to use [ and ] instead.
11682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11683  if test "x$has_forbidden_chars" != x; then
11684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11688      # Going to short mode and back again did indeed matter. Since short mode is
11689      # case insensitive, let's make it lowercase to improve readability.
11690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11691      # Now convert it back to Unix-stile (cygpath)
11692      input_path=`$CYGPATH -u "$shortmode_path"`
11693      new_path="$input_path"
11694    fi
11695  fi
11696
11697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11698  if test "x$test_cygdrive_prefix" = x; then
11699    # As a simple fix, exclude /usr/bin since it's not a real path.
11700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11702      # a path prefixed by /cygdrive for fixpath to work.
11703      new_path="$CYGWIN_ROOT_PATH$input_path"
11704    fi
11705  fi
11706
11707
11708  if test "x$path" != "x$new_path"; then
11709    JAVA_HOME_PROCESSED="$new_path"
11710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11711$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11712  fi
11713
11714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11715
11716  path="$JAVA_HOME_PROCESSED"
11717  has_colon=`$ECHO $path | $GREP ^.:`
11718  new_path="$path"
11719  if test "x$has_colon" = x; then
11720    # Not in mixed or Windows style, start by that.
11721    new_path=`cmd //c echo $path`
11722  fi
11723
11724
11725  input_path="$new_path"
11726  # Check if we need to convert this using DOS-style short mode. If the path
11727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11728  # take no chances and rewrite it.
11729  # Note: m4 eats our [], so we need to use [ and ] instead.
11730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11731  if test "x$has_forbidden_chars" != x; then
11732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11734  fi
11735
11736
11737  windows_path="$new_path"
11738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11739    unix_path=`$CYGPATH -u "$windows_path"`
11740    new_path="$unix_path"
11741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11743    new_path="$unix_path"
11744  fi
11745
11746  if test "x$path" != "x$new_path"; then
11747    JAVA_HOME_PROCESSED="$new_path"
11748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11749$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11750  fi
11751
11752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11754
11755  else
11756    # We're on a posix platform. Hooray! :)
11757    path="$JAVA_HOME_PROCESSED"
11758    has_space=`$ECHO "$path" | $GREP " "`
11759    if test "x$has_space" != x; then
11760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11761$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11762      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11763    fi
11764
11765    # Use eval to expand a potential ~
11766    eval path="$path"
11767    if test ! -f "$path" && test ! -d "$path"; then
11768      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11769    fi
11770
11771    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11772  fi
11773
11774        if test ! -d "$JAVA_HOME_PROCESSED"; then
11775            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11776$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11777        else
11778          # Aha, the user has set a JAVA_HOME
11779          # let us use that as the Boot JDK.
11780          BOOT_JDK="$JAVA_HOME_PROCESSED"
11781          BOOT_JDK_FOUND=maybe
11782          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11783$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11784        fi
11785    fi
11786
11787
11788    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11789    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11790      # Do we have a bin/java?
11791      if test ! -x "$BOOT_JDK/bin/java"; then
11792        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11794        BOOT_JDK_FOUND=no
11795      else
11796        # Do we have a bin/javac?
11797        if test ! -x "$BOOT_JDK/bin/javac"; then
11798          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11800          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11801$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11802          BOOT_JDK_FOUND=no
11803        else
11804          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11805          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11806            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11808            BOOT_JDK_FOUND=no
11809          else
11810            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11811            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11812
11813            # Extra M4 quote needed to protect [] in grep expression.
11814            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11815            if test "x$FOUND_VERSION_78" = x; then
11816              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11818              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11819$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11820              BOOT_JDK_FOUND=no
11821            else
11822              # We're done! :-)
11823              BOOT_JDK_FOUND=yes
11824
11825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11826
11827  # Input might be given as Windows format, start by converting to
11828  # unix format.
11829  path="$BOOT_JDK"
11830  new_path=`$CYGPATH -u "$path"`
11831
11832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11835  # "foo.exe" is OK but "foo" is an error.
11836  #
11837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11838  # It is also a way to make sure we got the proper file name for the real test later on.
11839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11840  if test "x$test_shortpath" = x; then
11841    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11842$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11843    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11844  fi
11845
11846  # Call helper function which possibly converts this using DOS-style short mode.
11847  # If so, the updated path is stored in $new_path.
11848
11849  input_path="$new_path"
11850  # Check if we need to convert this using DOS-style short mode. If the path
11851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11852  # take no chances and rewrite it.
11853  # Note: m4 eats our [], so we need to use [ and ] instead.
11854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11855  if test "x$has_forbidden_chars" != x; then
11856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11860      # Going to short mode and back again did indeed matter. Since short mode is
11861      # case insensitive, let's make it lowercase to improve readability.
11862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11863      # Now convert it back to Unix-stile (cygpath)
11864      input_path=`$CYGPATH -u "$shortmode_path"`
11865      new_path="$input_path"
11866    fi
11867  fi
11868
11869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11870  if test "x$test_cygdrive_prefix" = x; then
11871    # As a simple fix, exclude /usr/bin since it's not a real path.
11872    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11874      # a path prefixed by /cygdrive for fixpath to work.
11875      new_path="$CYGWIN_ROOT_PATH$input_path"
11876    fi
11877  fi
11878
11879
11880  if test "x$path" != "x$new_path"; then
11881    BOOT_JDK="$new_path"
11882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11883$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11884  fi
11885
11886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11887
11888  path="$BOOT_JDK"
11889  has_colon=`$ECHO $path | $GREP ^.:`
11890  new_path="$path"
11891  if test "x$has_colon" = x; then
11892    # Not in mixed or Windows style, start by that.
11893    new_path=`cmd //c echo $path`
11894  fi
11895
11896
11897  input_path="$new_path"
11898  # Check if we need to convert this using DOS-style short mode. If the path
11899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11900  # take no chances and rewrite it.
11901  # Note: m4 eats our [], so we need to use [ and ] instead.
11902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11903  if test "x$has_forbidden_chars" != x; then
11904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11906  fi
11907
11908
11909  windows_path="$new_path"
11910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11911    unix_path=`$CYGPATH -u "$windows_path"`
11912    new_path="$unix_path"
11913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11915    new_path="$unix_path"
11916  fi
11917
11918  if test "x$path" != "x$new_path"; then
11919    BOOT_JDK="$new_path"
11920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11921$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11922  fi
11923
11924  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11925  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11926
11927  else
11928    # We're on a posix platform. Hooray! :)
11929    path="$BOOT_JDK"
11930    has_space=`$ECHO "$path" | $GREP " "`
11931    if test "x$has_space" != x; then
11932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11933$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11934      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11935    fi
11936
11937    # Use eval to expand a potential ~
11938    eval path="$path"
11939    if test ! -f "$path" && test ! -d "$path"; then
11940      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11941    fi
11942
11943    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11944  fi
11945
11946              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11947$as_echo_n "checking for Boot JDK... " >&6; }
11948              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11949$as_echo "$BOOT_JDK" >&6; }
11950              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11951$as_echo_n "checking Boot JDK version... " >&6; }
11952              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11953              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11954$as_echo "$BOOT_JDK_VERSION" >&6; }
11955            fi # end check jdk version
11956          fi # end check rt.jar
11957        fi # end check javac
11958      fi # end check java
11959    fi # end check boot jdk found
11960  fi
11961
11962
11963# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11964
11965  if test "x$BOOT_JDK_FOUND" = xno; then
11966    # Now execute the test
11967
11968    if test -x /usr/libexec/java_home; then
11969        BOOT_JDK=`/usr/libexec/java_home`
11970        BOOT_JDK_FOUND=maybe
11971        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11972$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11973    fi
11974
11975
11976    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11977    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11978      # Do we have a bin/java?
11979      if test ! -x "$BOOT_JDK/bin/java"; then
11980        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11982        BOOT_JDK_FOUND=no
11983      else
11984        # Do we have a bin/javac?
11985        if test ! -x "$BOOT_JDK/bin/javac"; then
11986          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11988          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11989$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11990          BOOT_JDK_FOUND=no
11991        else
11992          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11993          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11994            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11996            BOOT_JDK_FOUND=no
11997          else
11998            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11999            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12000
12001            # Extra M4 quote needed to protect [] in grep expression.
12002            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12003            if test "x$FOUND_VERSION_78" = x; then
12004              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12006              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12007$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12008              BOOT_JDK_FOUND=no
12009            else
12010              # We're done! :-)
12011              BOOT_JDK_FOUND=yes
12012
12013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12014
12015  # Input might be given as Windows format, start by converting to
12016  # unix format.
12017  path="$BOOT_JDK"
12018  new_path=`$CYGPATH -u "$path"`
12019
12020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12023  # "foo.exe" is OK but "foo" is an error.
12024  #
12025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12026  # It is also a way to make sure we got the proper file name for the real test later on.
12027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12028  if test "x$test_shortpath" = x; then
12029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12030$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12031    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12032  fi
12033
12034  # Call helper function which possibly converts this using DOS-style short mode.
12035  # If so, the updated path is stored in $new_path.
12036
12037  input_path="$new_path"
12038  # Check if we need to convert this using DOS-style short mode. If the path
12039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12040  # take no chances and rewrite it.
12041  # Note: m4 eats our [], so we need to use [ and ] instead.
12042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12043  if test "x$has_forbidden_chars" != x; then
12044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12048      # Going to short mode and back again did indeed matter. Since short mode is
12049      # case insensitive, let's make it lowercase to improve readability.
12050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12051      # Now convert it back to Unix-stile (cygpath)
12052      input_path=`$CYGPATH -u "$shortmode_path"`
12053      new_path="$input_path"
12054    fi
12055  fi
12056
12057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12058  if test "x$test_cygdrive_prefix" = x; then
12059    # As a simple fix, exclude /usr/bin since it's not a real path.
12060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12062      # a path prefixed by /cygdrive for fixpath to work.
12063      new_path="$CYGWIN_ROOT_PATH$input_path"
12064    fi
12065  fi
12066
12067
12068  if test "x$path" != "x$new_path"; then
12069    BOOT_JDK="$new_path"
12070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12072  fi
12073
12074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12075
12076  path="$BOOT_JDK"
12077  has_colon=`$ECHO $path | $GREP ^.:`
12078  new_path="$path"
12079  if test "x$has_colon" = x; then
12080    # Not in mixed or Windows style, start by that.
12081    new_path=`cmd //c echo $path`
12082  fi
12083
12084
12085  input_path="$new_path"
12086  # Check if we need to convert this using DOS-style short mode. If the path
12087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12088  # take no chances and rewrite it.
12089  # Note: m4 eats our [], so we need to use [ and ] instead.
12090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12091  if test "x$has_forbidden_chars" != x; then
12092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12094  fi
12095
12096
12097  windows_path="$new_path"
12098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12099    unix_path=`$CYGPATH -u "$windows_path"`
12100    new_path="$unix_path"
12101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12103    new_path="$unix_path"
12104  fi
12105
12106  if test "x$path" != "x$new_path"; then
12107    BOOT_JDK="$new_path"
12108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12109$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12110  fi
12111
12112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12114
12115  else
12116    # We're on a posix platform. Hooray! :)
12117    path="$BOOT_JDK"
12118    has_space=`$ECHO "$path" | $GREP " "`
12119    if test "x$has_space" != x; then
12120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12122      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12123    fi
12124
12125    # Use eval to expand a potential ~
12126    eval path="$path"
12127    if test ! -f "$path" && test ! -d "$path"; then
12128      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12129    fi
12130
12131    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12132  fi
12133
12134              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12135$as_echo_n "checking for Boot JDK... " >&6; }
12136              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12137$as_echo "$BOOT_JDK" >&6; }
12138              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12139$as_echo_n "checking Boot JDK version... " >&6; }
12140              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12141              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12142$as_echo "$BOOT_JDK_VERSION" >&6; }
12143            fi # end check jdk version
12144          fi # end check rt.jar
12145        fi # end check javac
12146      fi # end check java
12147    fi # end check boot jdk found
12148  fi
12149
12150
12151# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12152
12153  if test "x$BOOT_JDK_FOUND" = xno; then
12154    # Now execute the test
12155
12156    # Extract the first word of "javac", so it can be a program name with args.
12157set dummy javac; ac_word=$2
12158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12159$as_echo_n "checking for $ac_word... " >&6; }
12160if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12161  $as_echo_n "(cached) " >&6
12162else
12163  case $JAVAC_CHECK in
12164  [\\/]* | ?:[\\/]*)
12165  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12166  ;;
12167  *)
12168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12169for as_dir in $PATH
12170do
12171  IFS=$as_save_IFS
12172  test -z "$as_dir" && as_dir=.
12173    for ac_exec_ext in '' $ac_executable_extensions; do
12174  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12175    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12177    break 2
12178  fi
12179done
12180  done
12181IFS=$as_save_IFS
12182
12183  ;;
12184esac
12185fi
12186JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12187if test -n "$JAVAC_CHECK"; then
12188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12189$as_echo "$JAVAC_CHECK" >&6; }
12190else
12191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12192$as_echo "no" >&6; }
12193fi
12194
12195
12196    # Extract the first word of "java", so it can be a program name with args.
12197set dummy java; ac_word=$2
12198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12199$as_echo_n "checking for $ac_word... " >&6; }
12200if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12201  $as_echo_n "(cached) " >&6
12202else
12203  case $JAVA_CHECK in
12204  [\\/]* | ?:[\\/]*)
12205  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12206  ;;
12207  *)
12208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12209for as_dir in $PATH
12210do
12211  IFS=$as_save_IFS
12212  test -z "$as_dir" && as_dir=.
12213    for ac_exec_ext in '' $ac_executable_extensions; do
12214  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12215    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12217    break 2
12218  fi
12219done
12220  done
12221IFS=$as_save_IFS
12222
12223  ;;
12224esac
12225fi
12226JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12227if test -n "$JAVA_CHECK"; then
12228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12229$as_echo "$JAVA_CHECK" >&6; }
12230else
12231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12232$as_echo "no" >&6; }
12233fi
12234
12235
12236    BINARY="$JAVAC_CHECK"
12237    if test "x$JAVAC_CHECK" = x; then
12238        BINARY="$JAVA_CHECK"
12239    fi
12240    if test "x$BINARY" != x; then
12241        # So there is a java(c) binary, it might be part of a JDK.
12242        # Lets find the JDK/JRE directory by following symbolic links.
12243        # Linux/GNU systems often have links from /usr/bin/java to
12244        # /etc/alternatives/java to the real JDK binary.
12245
12246    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12247        # Follow a chain of symbolic links. Use readlink
12248        # where it exists, else fall back to horribly
12249        # complicated shell code.
12250        if test "x$READLINK_TESTED" != yes; then
12251            # On MacOSX there is a readlink tool with a different
12252            # purpose than the GNU readlink tool. Check the found readlink.
12253            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12254            if test "x$ISGNU" = x; then
12255                 # A readlink that we do not know how to use.
12256                 # Are there other non-GNU readlinks out there?
12257                 READLINK_TESTED=yes
12258                 READLINK=
12259            fi
12260        fi
12261
12262        if test "x$READLINK" != x; then
12263            BINARY=`$READLINK -f $BINARY`
12264        else
12265            # Save the current directory for restoring afterwards
12266            STARTDIR=$PWD
12267            COUNTER=0
12268            sym_link_dir=`$DIRNAME $BINARY`
12269            sym_link_file=`$BASENAME $BINARY`
12270            cd $sym_link_dir
12271            # Use -P flag to resolve symlinks in directories.
12272            cd `$THEPWDCMD -P`
12273            sym_link_dir=`$THEPWDCMD -P`
12274            # Resolve file symlinks
12275            while test $COUNTER -lt 20; do
12276                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12277                if test "x$ISLINK" == x; then
12278                    # This is not a symbolic link! We are done!
12279                    break
12280                fi
12281                # Again resolve directory symlinks since the target of the just found
12282                # link could be in a different directory
12283                cd `$DIRNAME $ISLINK`
12284                sym_link_dir=`$THEPWDCMD -P`
12285                sym_link_file=`$BASENAME $ISLINK`
12286                let COUNTER=COUNTER+1
12287            done
12288            cd $STARTDIR
12289            BINARY=$sym_link_dir/$sym_link_file
12290        fi
12291    fi
12292
12293        BOOT_JDK=`dirname "$BINARY"`
12294        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12295        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12296            # Looks like we found ourselves an JDK
12297            BOOT_JDK_FOUND=maybe
12298            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12299$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12300        fi
12301    fi
12302
12303
12304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12306      # Do we have a bin/java?
12307      if test ! -x "$BOOT_JDK/bin/java"; then
12308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12310        BOOT_JDK_FOUND=no
12311      else
12312        # Do we have a bin/javac?
12313        if test ! -x "$BOOT_JDK/bin/javac"; then
12314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12318          BOOT_JDK_FOUND=no
12319        else
12320          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12321          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12324            BOOT_JDK_FOUND=no
12325          else
12326            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12328
12329            # Extra M4 quote needed to protect [] in grep expression.
12330            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12331            if test "x$FOUND_VERSION_78" = x; then
12332              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12334              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12335$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12336              BOOT_JDK_FOUND=no
12337            else
12338              # We're done! :-)
12339              BOOT_JDK_FOUND=yes
12340
12341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12342
12343  # Input might be given as Windows format, start by converting to
12344  # unix format.
12345  path="$BOOT_JDK"
12346  new_path=`$CYGPATH -u "$path"`
12347
12348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12351  # "foo.exe" is OK but "foo" is an error.
12352  #
12353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12354  # It is also a way to make sure we got the proper file name for the real test later on.
12355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12356  if test "x$test_shortpath" = x; then
12357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12358$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12359    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12360  fi
12361
12362  # Call helper function which possibly converts this using DOS-style short mode.
12363  # If so, the updated path is stored in $new_path.
12364
12365  input_path="$new_path"
12366  # Check if we need to convert this using DOS-style short mode. If the path
12367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12368  # take no chances and rewrite it.
12369  # Note: m4 eats our [], so we need to use [ and ] instead.
12370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12371  if test "x$has_forbidden_chars" != x; then
12372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12376      # Going to short mode and back again did indeed matter. Since short mode is
12377      # case insensitive, let's make it lowercase to improve readability.
12378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12379      # Now convert it back to Unix-stile (cygpath)
12380      input_path=`$CYGPATH -u "$shortmode_path"`
12381      new_path="$input_path"
12382    fi
12383  fi
12384
12385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12386  if test "x$test_cygdrive_prefix" = x; then
12387    # As a simple fix, exclude /usr/bin since it's not a real path.
12388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12390      # a path prefixed by /cygdrive for fixpath to work.
12391      new_path="$CYGWIN_ROOT_PATH$input_path"
12392    fi
12393  fi
12394
12395
12396  if test "x$path" != "x$new_path"; then
12397    BOOT_JDK="$new_path"
12398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12400  fi
12401
12402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12403
12404  path="$BOOT_JDK"
12405  has_colon=`$ECHO $path | $GREP ^.:`
12406  new_path="$path"
12407  if test "x$has_colon" = x; then
12408    # Not in mixed or Windows style, start by that.
12409    new_path=`cmd //c echo $path`
12410  fi
12411
12412
12413  input_path="$new_path"
12414  # Check if we need to convert this using DOS-style short mode. If the path
12415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12416  # take no chances and rewrite it.
12417  # Note: m4 eats our [], so we need to use [ and ] instead.
12418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12419  if test "x$has_forbidden_chars" != x; then
12420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12422  fi
12423
12424
12425  windows_path="$new_path"
12426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12427    unix_path=`$CYGPATH -u "$windows_path"`
12428    new_path="$unix_path"
12429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12431    new_path="$unix_path"
12432  fi
12433
12434  if test "x$path" != "x$new_path"; then
12435    BOOT_JDK="$new_path"
12436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12438  fi
12439
12440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12442
12443  else
12444    # We're on a posix platform. Hooray! :)
12445    path="$BOOT_JDK"
12446    has_space=`$ECHO "$path" | $GREP " "`
12447    if test "x$has_space" != x; then
12448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12450      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12451    fi
12452
12453    # Use eval to expand a potential ~
12454    eval path="$path"
12455    if test ! -f "$path" && test ! -d "$path"; then
12456      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12457    fi
12458
12459    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12460  fi
12461
12462              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12463$as_echo_n "checking for Boot JDK... " >&6; }
12464              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12465$as_echo "$BOOT_JDK" >&6; }
12466              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12467$as_echo_n "checking Boot JDK version... " >&6; }
12468              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12469              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12470$as_echo "$BOOT_JDK_VERSION" >&6; }
12471            fi # end check jdk version
12472          fi # end check rt.jar
12473        fi # end check javac
12474      fi # end check java
12475    fi # end check boot jdk found
12476  fi
12477
12478
12479# Test: Is there a JDK installed in default, well-known locations?
12480
12481  if test "x$BOOT_JDK_FOUND" = xno; then
12482    # Now execute the test
12483
12484  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12485
12486  if test "x$BOOT_JDK_FOUND" = xno; then
12487    # Now execute the test
12488
12489  if test "x$ProgramW6432" != x; then
12490    VIRTUAL_DIR="$ProgramW6432/Java"
12491
12492  windows_path="$VIRTUAL_DIR"
12493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12494    unix_path=`$CYGPATH -u "$windows_path"`
12495    VIRTUAL_DIR="$unix_path"
12496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12498    VIRTUAL_DIR="$unix_path"
12499  fi
12500
12501
12502  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12503  BOOT_JDK_SUFFIX=""
12504  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12505  if test "x$ALL_JDKS_FOUND" != x; then
12506    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12507
12508  if test "x$BOOT_JDK_FOUND" = xno; then
12509    # Now execute the test
12510
12511        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12512        if test -d "$BOOT_JDK"; then
12513          BOOT_JDK_FOUND=maybe
12514          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12515$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12516        fi
12517
12518
12519    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12520    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12521      # Do we have a bin/java?
12522      if test ! -x "$BOOT_JDK/bin/java"; then
12523        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12525        BOOT_JDK_FOUND=no
12526      else
12527        # Do we have a bin/javac?
12528        if test ! -x "$BOOT_JDK/bin/javac"; then
12529          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12531          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12532$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12533          BOOT_JDK_FOUND=no
12534        else
12535          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12536          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12537            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12539            BOOT_JDK_FOUND=no
12540          else
12541            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12542            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12543
12544            # Extra M4 quote needed to protect [] in grep expression.
12545            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12546            if test "x$FOUND_VERSION_78" = x; then
12547              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12549              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12550$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12551              BOOT_JDK_FOUND=no
12552            else
12553              # We're done! :-)
12554              BOOT_JDK_FOUND=yes
12555
12556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12557
12558  # Input might be given as Windows format, start by converting to
12559  # unix format.
12560  path="$BOOT_JDK"
12561  new_path=`$CYGPATH -u "$path"`
12562
12563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12566  # "foo.exe" is OK but "foo" is an error.
12567  #
12568  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12569  # It is also a way to make sure we got the proper file name for the real test later on.
12570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12571  if test "x$test_shortpath" = x; then
12572    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12573$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12574    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12575  fi
12576
12577  # Call helper function which possibly converts this using DOS-style short mode.
12578  # If so, the updated path is stored in $new_path.
12579
12580  input_path="$new_path"
12581  # Check if we need to convert this using DOS-style short mode. If the path
12582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12583  # take no chances and rewrite it.
12584  # Note: m4 eats our [], so we need to use [ and ] instead.
12585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12586  if test "x$has_forbidden_chars" != x; then
12587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12588    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12589    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12590    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12591      # Going to short mode and back again did indeed matter. Since short mode is
12592      # case insensitive, let's make it lowercase to improve readability.
12593      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12594      # Now convert it back to Unix-stile (cygpath)
12595      input_path=`$CYGPATH -u "$shortmode_path"`
12596      new_path="$input_path"
12597    fi
12598  fi
12599
12600  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12601  if test "x$test_cygdrive_prefix" = x; then
12602    # As a simple fix, exclude /usr/bin since it's not a real path.
12603    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12604      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12605      # a path prefixed by /cygdrive for fixpath to work.
12606      new_path="$CYGWIN_ROOT_PATH$input_path"
12607    fi
12608  fi
12609
12610
12611  if test "x$path" != "x$new_path"; then
12612    BOOT_JDK="$new_path"
12613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12614$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12615  fi
12616
12617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12618
12619  path="$BOOT_JDK"
12620  has_colon=`$ECHO $path | $GREP ^.:`
12621  new_path="$path"
12622  if test "x$has_colon" = x; then
12623    # Not in mixed or Windows style, start by that.
12624    new_path=`cmd //c echo $path`
12625  fi
12626
12627
12628  input_path="$new_path"
12629  # Check if we need to convert this using DOS-style short mode. If the path
12630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12631  # take no chances and rewrite it.
12632  # Note: m4 eats our [], so we need to use [ and ] instead.
12633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12634  if test "x$has_forbidden_chars" != x; then
12635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12637  fi
12638
12639
12640  windows_path="$new_path"
12641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12642    unix_path=`$CYGPATH -u "$windows_path"`
12643    new_path="$unix_path"
12644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12646    new_path="$unix_path"
12647  fi
12648
12649  if test "x$path" != "x$new_path"; then
12650    BOOT_JDK="$new_path"
12651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12652$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12653  fi
12654
12655  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12656  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12657
12658  else
12659    # We're on a posix platform. Hooray! :)
12660    path="$BOOT_JDK"
12661    has_space=`$ECHO "$path" | $GREP " "`
12662    if test "x$has_space" != x; then
12663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12665      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12666    fi
12667
12668    # Use eval to expand a potential ~
12669    eval path="$path"
12670    if test ! -f "$path" && test ! -d "$path"; then
12671      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12672    fi
12673
12674    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12675  fi
12676
12677              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12678$as_echo_n "checking for Boot JDK... " >&6; }
12679              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12680$as_echo "$BOOT_JDK" >&6; }
12681              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12682$as_echo_n "checking Boot JDK version... " >&6; }
12683              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12684              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12685$as_echo "$BOOT_JDK_VERSION" >&6; }
12686            fi # end check jdk version
12687          fi # end check rt.jar
12688        fi # end check javac
12689      fi # end check java
12690    fi # end check boot jdk found
12691  fi
12692
12693    done
12694  fi
12695
12696  fi
12697
12698
12699    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12700    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12701      # Do we have a bin/java?
12702      if test ! -x "$BOOT_JDK/bin/java"; then
12703        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12705        BOOT_JDK_FOUND=no
12706      else
12707        # Do we have a bin/javac?
12708        if test ! -x "$BOOT_JDK/bin/javac"; then
12709          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12711          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12712$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12713          BOOT_JDK_FOUND=no
12714        else
12715          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12716          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12717            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12719            BOOT_JDK_FOUND=no
12720          else
12721            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12722            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12723
12724            # Extra M4 quote needed to protect [] in grep expression.
12725            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12726            if test "x$FOUND_VERSION_78" = x; then
12727              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12729              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12730$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12731              BOOT_JDK_FOUND=no
12732            else
12733              # We're done! :-)
12734              BOOT_JDK_FOUND=yes
12735
12736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12737
12738  # Input might be given as Windows format, start by converting to
12739  # unix format.
12740  path="$BOOT_JDK"
12741  new_path=`$CYGPATH -u "$path"`
12742
12743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12746  # "foo.exe" is OK but "foo" is an error.
12747  #
12748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12749  # It is also a way to make sure we got the proper file name for the real test later on.
12750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12751  if test "x$test_shortpath" = x; then
12752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12753$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12754    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12755  fi
12756
12757  # Call helper function which possibly converts this using DOS-style short mode.
12758  # If so, the updated path is stored in $new_path.
12759
12760  input_path="$new_path"
12761  # Check if we need to convert this using DOS-style short mode. If the path
12762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12763  # take no chances and rewrite it.
12764  # Note: m4 eats our [], so we need to use [ and ] instead.
12765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12766  if test "x$has_forbidden_chars" != x; then
12767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12771      # Going to short mode and back again did indeed matter. Since short mode is
12772      # case insensitive, let's make it lowercase to improve readability.
12773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12774      # Now convert it back to Unix-stile (cygpath)
12775      input_path=`$CYGPATH -u "$shortmode_path"`
12776      new_path="$input_path"
12777    fi
12778  fi
12779
12780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12781  if test "x$test_cygdrive_prefix" = x; then
12782    # As a simple fix, exclude /usr/bin since it's not a real path.
12783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12785      # a path prefixed by /cygdrive for fixpath to work.
12786      new_path="$CYGWIN_ROOT_PATH$input_path"
12787    fi
12788  fi
12789
12790
12791  if test "x$path" != "x$new_path"; then
12792    BOOT_JDK="$new_path"
12793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12794$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12795  fi
12796
12797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12798
12799  path="$BOOT_JDK"
12800  has_colon=`$ECHO $path | $GREP ^.:`
12801  new_path="$path"
12802  if test "x$has_colon" = x; then
12803    # Not in mixed or Windows style, start by that.
12804    new_path=`cmd //c echo $path`
12805  fi
12806
12807
12808  input_path="$new_path"
12809  # Check if we need to convert this using DOS-style short mode. If the path
12810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12811  # take no chances and rewrite it.
12812  # Note: m4 eats our [], so we need to use [ and ] instead.
12813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12814  if test "x$has_forbidden_chars" != x; then
12815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12817  fi
12818
12819
12820  windows_path="$new_path"
12821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12822    unix_path=`$CYGPATH -u "$windows_path"`
12823    new_path="$unix_path"
12824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12826    new_path="$unix_path"
12827  fi
12828
12829  if test "x$path" != "x$new_path"; then
12830    BOOT_JDK="$new_path"
12831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12832$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12833  fi
12834
12835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12837
12838  else
12839    # We're on a posix platform. Hooray! :)
12840    path="$BOOT_JDK"
12841    has_space=`$ECHO "$path" | $GREP " "`
12842    if test "x$has_space" != x; then
12843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12845      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12846    fi
12847
12848    # Use eval to expand a potential ~
12849    eval path="$path"
12850    if test ! -f "$path" && test ! -d "$path"; then
12851      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12852    fi
12853
12854    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12855  fi
12856
12857              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12858$as_echo_n "checking for Boot JDK... " >&6; }
12859              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12860$as_echo "$BOOT_JDK" >&6; }
12861              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12862$as_echo_n "checking Boot JDK version... " >&6; }
12863              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12864              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12865$as_echo "$BOOT_JDK_VERSION" >&6; }
12866            fi # end check jdk version
12867          fi # end check rt.jar
12868        fi # end check javac
12869      fi # end check java
12870    fi # end check boot jdk found
12871  fi
12872
12873
12874  if test "x$BOOT_JDK_FOUND" = xno; then
12875    # Now execute the test
12876
12877  if test "x$PROGRAMW6432" != x; then
12878    VIRTUAL_DIR="$PROGRAMW6432/Java"
12879
12880  windows_path="$VIRTUAL_DIR"
12881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12882    unix_path=`$CYGPATH -u "$windows_path"`
12883    VIRTUAL_DIR="$unix_path"
12884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12886    VIRTUAL_DIR="$unix_path"
12887  fi
12888
12889
12890  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12891  BOOT_JDK_SUFFIX=""
12892  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12893  if test "x$ALL_JDKS_FOUND" != x; then
12894    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12895
12896  if test "x$BOOT_JDK_FOUND" = xno; then
12897    # Now execute the test
12898
12899        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12900        if test -d "$BOOT_JDK"; then
12901          BOOT_JDK_FOUND=maybe
12902          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12903$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12904        fi
12905
12906
12907    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12908    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12909      # Do we have a bin/java?
12910      if test ! -x "$BOOT_JDK/bin/java"; then
12911        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12913        BOOT_JDK_FOUND=no
12914      else
12915        # Do we have a bin/javac?
12916        if test ! -x "$BOOT_JDK/bin/javac"; then
12917          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12919          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12920$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12921          BOOT_JDK_FOUND=no
12922        else
12923          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12924          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12925            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12926$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12927            BOOT_JDK_FOUND=no
12928          else
12929            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12930            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12931
12932            # Extra M4 quote needed to protect [] in grep expression.
12933            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12934            if test "x$FOUND_VERSION_78" = x; then
12935              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12937              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12938$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12939              BOOT_JDK_FOUND=no
12940            else
12941              # We're done! :-)
12942              BOOT_JDK_FOUND=yes
12943
12944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12945
12946  # Input might be given as Windows format, start by converting to
12947  # unix format.
12948  path="$BOOT_JDK"
12949  new_path=`$CYGPATH -u "$path"`
12950
12951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12954  # "foo.exe" is OK but "foo" is an error.
12955  #
12956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12957  # It is also a way to make sure we got the proper file name for the real test later on.
12958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12959  if test "x$test_shortpath" = x; then
12960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12961$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12962    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12963  fi
12964
12965  # Call helper function which possibly converts this using DOS-style short mode.
12966  # If so, the updated path is stored in $new_path.
12967
12968  input_path="$new_path"
12969  # Check if we need to convert this using DOS-style short mode. If the path
12970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12971  # take no chances and rewrite it.
12972  # Note: m4 eats our [], so we need to use [ and ] instead.
12973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12974  if test "x$has_forbidden_chars" != x; then
12975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12979      # Going to short mode and back again did indeed matter. Since short mode is
12980      # case insensitive, let's make it lowercase to improve readability.
12981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12982      # Now convert it back to Unix-stile (cygpath)
12983      input_path=`$CYGPATH -u "$shortmode_path"`
12984      new_path="$input_path"
12985    fi
12986  fi
12987
12988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12989  if test "x$test_cygdrive_prefix" = x; then
12990    # As a simple fix, exclude /usr/bin since it's not a real path.
12991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12993      # a path prefixed by /cygdrive for fixpath to work.
12994      new_path="$CYGWIN_ROOT_PATH$input_path"
12995    fi
12996  fi
12997
12998
12999  if test "x$path" != "x$new_path"; then
13000    BOOT_JDK="$new_path"
13001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13002$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13003  fi
13004
13005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13006
13007  path="$BOOT_JDK"
13008  has_colon=`$ECHO $path | $GREP ^.:`
13009  new_path="$path"
13010  if test "x$has_colon" = x; then
13011    # Not in mixed or Windows style, start by that.
13012    new_path=`cmd //c echo $path`
13013  fi
13014
13015
13016  input_path="$new_path"
13017  # Check if we need to convert this using DOS-style short mode. If the path
13018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13019  # take no chances and rewrite it.
13020  # Note: m4 eats our [], so we need to use [ and ] instead.
13021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13022  if test "x$has_forbidden_chars" != x; then
13023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13025  fi
13026
13027
13028  windows_path="$new_path"
13029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13030    unix_path=`$CYGPATH -u "$windows_path"`
13031    new_path="$unix_path"
13032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13034    new_path="$unix_path"
13035  fi
13036
13037  if test "x$path" != "x$new_path"; then
13038    BOOT_JDK="$new_path"
13039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13040$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13041  fi
13042
13043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13045
13046  else
13047    # We're on a posix platform. Hooray! :)
13048    path="$BOOT_JDK"
13049    has_space=`$ECHO "$path" | $GREP " "`
13050    if test "x$has_space" != x; then
13051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13052$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13053      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13054    fi
13055
13056    # Use eval to expand a potential ~
13057    eval path="$path"
13058    if test ! -f "$path" && test ! -d "$path"; then
13059      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13060    fi
13061
13062    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13063  fi
13064
13065              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13066$as_echo_n "checking for Boot JDK... " >&6; }
13067              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13068$as_echo "$BOOT_JDK" >&6; }
13069              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13070$as_echo_n "checking Boot JDK version... " >&6; }
13071              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13072              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13073$as_echo "$BOOT_JDK_VERSION" >&6; }
13074            fi # end check jdk version
13075          fi # end check rt.jar
13076        fi # end check javac
13077      fi # end check java
13078    fi # end check boot jdk found
13079  fi
13080
13081    done
13082  fi
13083
13084  fi
13085
13086
13087    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13088    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13089      # Do we have a bin/java?
13090      if test ! -x "$BOOT_JDK/bin/java"; then
13091        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13093        BOOT_JDK_FOUND=no
13094      else
13095        # Do we have a bin/javac?
13096        if test ! -x "$BOOT_JDK/bin/javac"; then
13097          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13099          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13100$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13101          BOOT_JDK_FOUND=no
13102        else
13103          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13104          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13105            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13107            BOOT_JDK_FOUND=no
13108          else
13109            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13110            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13111
13112            # Extra M4 quote needed to protect [] in grep expression.
13113            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13114            if test "x$FOUND_VERSION_78" = x; then
13115              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13117              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13118$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13119              BOOT_JDK_FOUND=no
13120            else
13121              # We're done! :-)
13122              BOOT_JDK_FOUND=yes
13123
13124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13125
13126  # Input might be given as Windows format, start by converting to
13127  # unix format.
13128  path="$BOOT_JDK"
13129  new_path=`$CYGPATH -u "$path"`
13130
13131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13134  # "foo.exe" is OK but "foo" is an error.
13135  #
13136  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13137  # It is also a way to make sure we got the proper file name for the real test later on.
13138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13139  if test "x$test_shortpath" = x; then
13140    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13141$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13142    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13143  fi
13144
13145  # Call helper function which possibly converts this using DOS-style short mode.
13146  # If so, the updated path is stored in $new_path.
13147
13148  input_path="$new_path"
13149  # Check if we need to convert this using DOS-style short mode. If the path
13150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13151  # take no chances and rewrite it.
13152  # Note: m4 eats our [], so we need to use [ and ] instead.
13153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13154  if test "x$has_forbidden_chars" != x; then
13155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13159      # Going to short mode and back again did indeed matter. Since short mode is
13160      # case insensitive, let's make it lowercase to improve readability.
13161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13162      # Now convert it back to Unix-stile (cygpath)
13163      input_path=`$CYGPATH -u "$shortmode_path"`
13164      new_path="$input_path"
13165    fi
13166  fi
13167
13168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13169  if test "x$test_cygdrive_prefix" = x; then
13170    # As a simple fix, exclude /usr/bin since it's not a real path.
13171    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13173      # a path prefixed by /cygdrive for fixpath to work.
13174      new_path="$CYGWIN_ROOT_PATH$input_path"
13175    fi
13176  fi
13177
13178
13179  if test "x$path" != "x$new_path"; then
13180    BOOT_JDK="$new_path"
13181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13182$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13183  fi
13184
13185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13186
13187  path="$BOOT_JDK"
13188  has_colon=`$ECHO $path | $GREP ^.:`
13189  new_path="$path"
13190  if test "x$has_colon" = x; then
13191    # Not in mixed or Windows style, start by that.
13192    new_path=`cmd //c echo $path`
13193  fi
13194
13195
13196  input_path="$new_path"
13197  # Check if we need to convert this using DOS-style short mode. If the path
13198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13199  # take no chances and rewrite it.
13200  # Note: m4 eats our [], so we need to use [ and ] instead.
13201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13202  if test "x$has_forbidden_chars" != x; then
13203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13205  fi
13206
13207
13208  windows_path="$new_path"
13209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13210    unix_path=`$CYGPATH -u "$windows_path"`
13211    new_path="$unix_path"
13212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13214    new_path="$unix_path"
13215  fi
13216
13217  if test "x$path" != "x$new_path"; then
13218    BOOT_JDK="$new_path"
13219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13220$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13221  fi
13222
13223  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13224  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13225
13226  else
13227    # We're on a posix platform. Hooray! :)
13228    path="$BOOT_JDK"
13229    has_space=`$ECHO "$path" | $GREP " "`
13230    if test "x$has_space" != x; then
13231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13233      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13234    fi
13235
13236    # Use eval to expand a potential ~
13237    eval path="$path"
13238    if test ! -f "$path" && test ! -d "$path"; then
13239      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13240    fi
13241
13242    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13243  fi
13244
13245              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13246$as_echo_n "checking for Boot JDK... " >&6; }
13247              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13248$as_echo "$BOOT_JDK" >&6; }
13249              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13250$as_echo_n "checking Boot JDK version... " >&6; }
13251              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13252              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13253$as_echo "$BOOT_JDK_VERSION" >&6; }
13254            fi # end check jdk version
13255          fi # end check rt.jar
13256        fi # end check javac
13257      fi # end check java
13258    fi # end check boot jdk found
13259  fi
13260
13261
13262  if test "x$BOOT_JDK_FOUND" = xno; then
13263    # Now execute the test
13264
13265  if test "x$PROGRAMFILES" != x; then
13266    VIRTUAL_DIR="$PROGRAMFILES/Java"
13267
13268  windows_path="$VIRTUAL_DIR"
13269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13270    unix_path=`$CYGPATH -u "$windows_path"`
13271    VIRTUAL_DIR="$unix_path"
13272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13274    VIRTUAL_DIR="$unix_path"
13275  fi
13276
13277
13278  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13279  BOOT_JDK_SUFFIX=""
13280  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13281  if test "x$ALL_JDKS_FOUND" != x; then
13282    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13283
13284  if test "x$BOOT_JDK_FOUND" = xno; then
13285    # Now execute the test
13286
13287        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13288        if test -d "$BOOT_JDK"; then
13289          BOOT_JDK_FOUND=maybe
13290          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13291$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13292        fi
13293
13294
13295    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13296    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13297      # Do we have a bin/java?
13298      if test ! -x "$BOOT_JDK/bin/java"; then
13299        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13301        BOOT_JDK_FOUND=no
13302      else
13303        # Do we have a bin/javac?
13304        if test ! -x "$BOOT_JDK/bin/javac"; then
13305          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13306$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13307          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13308$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13309          BOOT_JDK_FOUND=no
13310        else
13311          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13312          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13313            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13315            BOOT_JDK_FOUND=no
13316          else
13317            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13318            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13319
13320            # Extra M4 quote needed to protect [] in grep expression.
13321            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13322            if test "x$FOUND_VERSION_78" = x; then
13323              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13325              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13326$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13327              BOOT_JDK_FOUND=no
13328            else
13329              # We're done! :-)
13330              BOOT_JDK_FOUND=yes
13331
13332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13333
13334  # Input might be given as Windows format, start by converting to
13335  # unix format.
13336  path="$BOOT_JDK"
13337  new_path=`$CYGPATH -u "$path"`
13338
13339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13342  # "foo.exe" is OK but "foo" is an error.
13343  #
13344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13345  # It is also a way to make sure we got the proper file name for the real test later on.
13346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13347  if test "x$test_shortpath" = x; then
13348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13349$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13350    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13351  fi
13352
13353  # Call helper function which possibly converts this using DOS-style short mode.
13354  # If so, the updated path is stored in $new_path.
13355
13356  input_path="$new_path"
13357  # Check if we need to convert this using DOS-style short mode. If the path
13358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13359  # take no chances and rewrite it.
13360  # Note: m4 eats our [], so we need to use [ and ] instead.
13361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13362  if test "x$has_forbidden_chars" != x; then
13363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13367      # Going to short mode and back again did indeed matter. Since short mode is
13368      # case insensitive, let's make it lowercase to improve readability.
13369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13370      # Now convert it back to Unix-stile (cygpath)
13371      input_path=`$CYGPATH -u "$shortmode_path"`
13372      new_path="$input_path"
13373    fi
13374  fi
13375
13376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13377  if test "x$test_cygdrive_prefix" = x; then
13378    # As a simple fix, exclude /usr/bin since it's not a real path.
13379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13381      # a path prefixed by /cygdrive for fixpath to work.
13382      new_path="$CYGWIN_ROOT_PATH$input_path"
13383    fi
13384  fi
13385
13386
13387  if test "x$path" != "x$new_path"; then
13388    BOOT_JDK="$new_path"
13389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13390$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13391  fi
13392
13393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13394
13395  path="$BOOT_JDK"
13396  has_colon=`$ECHO $path | $GREP ^.:`
13397  new_path="$path"
13398  if test "x$has_colon" = x; then
13399    # Not in mixed or Windows style, start by that.
13400    new_path=`cmd //c echo $path`
13401  fi
13402
13403
13404  input_path="$new_path"
13405  # Check if we need to convert this using DOS-style short mode. If the path
13406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13407  # take no chances and rewrite it.
13408  # Note: m4 eats our [], so we need to use [ and ] instead.
13409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13410  if test "x$has_forbidden_chars" != x; then
13411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13413  fi
13414
13415
13416  windows_path="$new_path"
13417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13418    unix_path=`$CYGPATH -u "$windows_path"`
13419    new_path="$unix_path"
13420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13422    new_path="$unix_path"
13423  fi
13424
13425  if test "x$path" != "x$new_path"; then
13426    BOOT_JDK="$new_path"
13427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13429  fi
13430
13431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13433
13434  else
13435    # We're on a posix platform. Hooray! :)
13436    path="$BOOT_JDK"
13437    has_space=`$ECHO "$path" | $GREP " "`
13438    if test "x$has_space" != x; then
13439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13440$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13441      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13442    fi
13443
13444    # Use eval to expand a potential ~
13445    eval path="$path"
13446    if test ! -f "$path" && test ! -d "$path"; then
13447      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13448    fi
13449
13450    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13451  fi
13452
13453              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13454$as_echo_n "checking for Boot JDK... " >&6; }
13455              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13456$as_echo "$BOOT_JDK" >&6; }
13457              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13458$as_echo_n "checking Boot JDK version... " >&6; }
13459              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13460              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13461$as_echo "$BOOT_JDK_VERSION" >&6; }
13462            fi # end check jdk version
13463          fi # end check rt.jar
13464        fi # end check javac
13465      fi # end check java
13466    fi # end check boot jdk found
13467  fi
13468
13469    done
13470  fi
13471
13472  fi
13473
13474
13475    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13476    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13477      # Do we have a bin/java?
13478      if test ! -x "$BOOT_JDK/bin/java"; then
13479        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13481        BOOT_JDK_FOUND=no
13482      else
13483        # Do we have a bin/javac?
13484        if test ! -x "$BOOT_JDK/bin/javac"; then
13485          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13487          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13488$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13489          BOOT_JDK_FOUND=no
13490        else
13491          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13492          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13493            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13495            BOOT_JDK_FOUND=no
13496          else
13497            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13498            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13499
13500            # Extra M4 quote needed to protect [] in grep expression.
13501            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13502            if test "x$FOUND_VERSION_78" = x; then
13503              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13505              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13506$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13507              BOOT_JDK_FOUND=no
13508            else
13509              # We're done! :-)
13510              BOOT_JDK_FOUND=yes
13511
13512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13513
13514  # Input might be given as Windows format, start by converting to
13515  # unix format.
13516  path="$BOOT_JDK"
13517  new_path=`$CYGPATH -u "$path"`
13518
13519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13522  # "foo.exe" is OK but "foo" is an error.
13523  #
13524  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13525  # It is also a way to make sure we got the proper file name for the real test later on.
13526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13527  if test "x$test_shortpath" = x; then
13528    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13529$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13530    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13531  fi
13532
13533  # Call helper function which possibly converts this using DOS-style short mode.
13534  # If so, the updated path is stored in $new_path.
13535
13536  input_path="$new_path"
13537  # Check if we need to convert this using DOS-style short mode. If the path
13538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13539  # take no chances and rewrite it.
13540  # Note: m4 eats our [], so we need to use [ and ] instead.
13541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13542  if test "x$has_forbidden_chars" != x; then
13543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13547      # Going to short mode and back again did indeed matter. Since short mode is
13548      # case insensitive, let's make it lowercase to improve readability.
13549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13550      # Now convert it back to Unix-stile (cygpath)
13551      input_path=`$CYGPATH -u "$shortmode_path"`
13552      new_path="$input_path"
13553    fi
13554  fi
13555
13556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13557  if test "x$test_cygdrive_prefix" = x; then
13558    # As a simple fix, exclude /usr/bin since it's not a real path.
13559    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13561      # a path prefixed by /cygdrive for fixpath to work.
13562      new_path="$CYGWIN_ROOT_PATH$input_path"
13563    fi
13564  fi
13565
13566
13567  if test "x$path" != "x$new_path"; then
13568    BOOT_JDK="$new_path"
13569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13570$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13571  fi
13572
13573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13574
13575  path="$BOOT_JDK"
13576  has_colon=`$ECHO $path | $GREP ^.:`
13577  new_path="$path"
13578  if test "x$has_colon" = x; then
13579    # Not in mixed or Windows style, start by that.
13580    new_path=`cmd //c echo $path`
13581  fi
13582
13583
13584  input_path="$new_path"
13585  # Check if we need to convert this using DOS-style short mode. If the path
13586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13587  # take no chances and rewrite it.
13588  # Note: m4 eats our [], so we need to use [ and ] instead.
13589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13590  if test "x$has_forbidden_chars" != x; then
13591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13593  fi
13594
13595
13596  windows_path="$new_path"
13597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13598    unix_path=`$CYGPATH -u "$windows_path"`
13599    new_path="$unix_path"
13600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13602    new_path="$unix_path"
13603  fi
13604
13605  if test "x$path" != "x$new_path"; then
13606    BOOT_JDK="$new_path"
13607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13608$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13609  fi
13610
13611  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13612  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13613
13614  else
13615    # We're on a posix platform. Hooray! :)
13616    path="$BOOT_JDK"
13617    has_space=`$ECHO "$path" | $GREP " "`
13618    if test "x$has_space" != x; then
13619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13620$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13621      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13622    fi
13623
13624    # Use eval to expand a potential ~
13625    eval path="$path"
13626    if test ! -f "$path" && test ! -d "$path"; then
13627      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13628    fi
13629
13630    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13631  fi
13632
13633              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13634$as_echo_n "checking for Boot JDK... " >&6; }
13635              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13636$as_echo "$BOOT_JDK" >&6; }
13637              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13638$as_echo_n "checking Boot JDK version... " >&6; }
13639              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13640              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13641$as_echo "$BOOT_JDK_VERSION" >&6; }
13642            fi # end check jdk version
13643          fi # end check rt.jar
13644        fi # end check javac
13645      fi # end check java
13646    fi # end check boot jdk found
13647  fi
13648
13649
13650  if test "x$BOOT_JDK_FOUND" = xno; then
13651    # Now execute the test
13652
13653  if test "x$ProgramFiles" != x; then
13654    VIRTUAL_DIR="$ProgramFiles/Java"
13655
13656  windows_path="$VIRTUAL_DIR"
13657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13658    unix_path=`$CYGPATH -u "$windows_path"`
13659    VIRTUAL_DIR="$unix_path"
13660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13662    VIRTUAL_DIR="$unix_path"
13663  fi
13664
13665
13666  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13667  BOOT_JDK_SUFFIX=""
13668  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13669  if test "x$ALL_JDKS_FOUND" != x; then
13670    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13671
13672  if test "x$BOOT_JDK_FOUND" = xno; then
13673    # Now execute the test
13674
13675        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13676        if test -d "$BOOT_JDK"; then
13677          BOOT_JDK_FOUND=maybe
13678          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13679$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13680        fi
13681
13682
13683    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13684    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13685      # Do we have a bin/java?
13686      if test ! -x "$BOOT_JDK/bin/java"; then
13687        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13689        BOOT_JDK_FOUND=no
13690      else
13691        # Do we have a bin/javac?
13692        if test ! -x "$BOOT_JDK/bin/javac"; then
13693          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13695          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13696$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13697          BOOT_JDK_FOUND=no
13698        else
13699          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13700          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13701            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13703            BOOT_JDK_FOUND=no
13704          else
13705            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13706            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13707
13708            # Extra M4 quote needed to protect [] in grep expression.
13709            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13710            if test "x$FOUND_VERSION_78" = x; then
13711              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13713              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13714$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13715              BOOT_JDK_FOUND=no
13716            else
13717              # We're done! :-)
13718              BOOT_JDK_FOUND=yes
13719
13720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13721
13722  # Input might be given as Windows format, start by converting to
13723  # unix format.
13724  path="$BOOT_JDK"
13725  new_path=`$CYGPATH -u "$path"`
13726
13727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13730  # "foo.exe" is OK but "foo" is an error.
13731  #
13732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13733  # It is also a way to make sure we got the proper file name for the real test later on.
13734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13735  if test "x$test_shortpath" = x; then
13736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13738    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13739  fi
13740
13741  # Call helper function which possibly converts this using DOS-style short mode.
13742  # If so, the updated path is stored in $new_path.
13743
13744  input_path="$new_path"
13745  # Check if we need to convert this using DOS-style short mode. If the path
13746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13747  # take no chances and rewrite it.
13748  # Note: m4 eats our [], so we need to use [ and ] instead.
13749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13750  if test "x$has_forbidden_chars" != x; then
13751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13755      # Going to short mode and back again did indeed matter. Since short mode is
13756      # case insensitive, let's make it lowercase to improve readability.
13757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13758      # Now convert it back to Unix-stile (cygpath)
13759      input_path=`$CYGPATH -u "$shortmode_path"`
13760      new_path="$input_path"
13761    fi
13762  fi
13763
13764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13765  if test "x$test_cygdrive_prefix" = x; then
13766    # As a simple fix, exclude /usr/bin since it's not a real path.
13767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13769      # a path prefixed by /cygdrive for fixpath to work.
13770      new_path="$CYGWIN_ROOT_PATH$input_path"
13771    fi
13772  fi
13773
13774
13775  if test "x$path" != "x$new_path"; then
13776    BOOT_JDK="$new_path"
13777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13779  fi
13780
13781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13782
13783  path="$BOOT_JDK"
13784  has_colon=`$ECHO $path | $GREP ^.:`
13785  new_path="$path"
13786  if test "x$has_colon" = x; then
13787    # Not in mixed or Windows style, start by that.
13788    new_path=`cmd //c echo $path`
13789  fi
13790
13791
13792  input_path="$new_path"
13793  # Check if we need to convert this using DOS-style short mode. If the path
13794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13795  # take no chances and rewrite it.
13796  # Note: m4 eats our [], so we need to use [ and ] instead.
13797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13798  if test "x$has_forbidden_chars" != x; then
13799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13801  fi
13802
13803
13804  windows_path="$new_path"
13805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13806    unix_path=`$CYGPATH -u "$windows_path"`
13807    new_path="$unix_path"
13808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13810    new_path="$unix_path"
13811  fi
13812
13813  if test "x$path" != "x$new_path"; then
13814    BOOT_JDK="$new_path"
13815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13817  fi
13818
13819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13821
13822  else
13823    # We're on a posix platform. Hooray! :)
13824    path="$BOOT_JDK"
13825    has_space=`$ECHO "$path" | $GREP " "`
13826    if test "x$has_space" != x; then
13827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13829      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13830    fi
13831
13832    # Use eval to expand a potential ~
13833    eval path="$path"
13834    if test ! -f "$path" && test ! -d "$path"; then
13835      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13836    fi
13837
13838    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13839  fi
13840
13841              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13842$as_echo_n "checking for Boot JDK... " >&6; }
13843              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13844$as_echo "$BOOT_JDK" >&6; }
13845              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13846$as_echo_n "checking Boot JDK version... " >&6; }
13847              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13848              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13849$as_echo "$BOOT_JDK_VERSION" >&6; }
13850            fi # end check jdk version
13851          fi # end check rt.jar
13852        fi # end check javac
13853      fi # end check java
13854    fi # end check boot jdk found
13855  fi
13856
13857    done
13858  fi
13859
13860  fi
13861
13862
13863    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13864    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13865      # Do we have a bin/java?
13866      if test ! -x "$BOOT_JDK/bin/java"; then
13867        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13869        BOOT_JDK_FOUND=no
13870      else
13871        # Do we have a bin/javac?
13872        if test ! -x "$BOOT_JDK/bin/javac"; then
13873          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13875          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13876$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13877          BOOT_JDK_FOUND=no
13878        else
13879          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13880          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13881            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13883            BOOT_JDK_FOUND=no
13884          else
13885            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13886            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13887
13888            # Extra M4 quote needed to protect [] in grep expression.
13889            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13890            if test "x$FOUND_VERSION_78" = x; then
13891              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13893              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13894$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13895              BOOT_JDK_FOUND=no
13896            else
13897              # We're done! :-)
13898              BOOT_JDK_FOUND=yes
13899
13900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13901
13902  # Input might be given as Windows format, start by converting to
13903  # unix format.
13904  path="$BOOT_JDK"
13905  new_path=`$CYGPATH -u "$path"`
13906
13907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13910  # "foo.exe" is OK but "foo" is an error.
13911  #
13912  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13913  # It is also a way to make sure we got the proper file name for the real test later on.
13914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13915  if test "x$test_shortpath" = x; then
13916    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13918    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13919  fi
13920
13921  # Call helper function which possibly converts this using DOS-style short mode.
13922  # If so, the updated path is stored in $new_path.
13923
13924  input_path="$new_path"
13925  # Check if we need to convert this using DOS-style short mode. If the path
13926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13927  # take no chances and rewrite it.
13928  # Note: m4 eats our [], so we need to use [ and ] instead.
13929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13930  if test "x$has_forbidden_chars" != x; then
13931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13935      # Going to short mode and back again did indeed matter. Since short mode is
13936      # case insensitive, let's make it lowercase to improve readability.
13937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13938      # Now convert it back to Unix-stile (cygpath)
13939      input_path=`$CYGPATH -u "$shortmode_path"`
13940      new_path="$input_path"
13941    fi
13942  fi
13943
13944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13945  if test "x$test_cygdrive_prefix" = x; then
13946    # As a simple fix, exclude /usr/bin since it's not a real path.
13947    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13949      # a path prefixed by /cygdrive for fixpath to work.
13950      new_path="$CYGWIN_ROOT_PATH$input_path"
13951    fi
13952  fi
13953
13954
13955  if test "x$path" != "x$new_path"; then
13956    BOOT_JDK="$new_path"
13957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13959  fi
13960
13961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13962
13963  path="$BOOT_JDK"
13964  has_colon=`$ECHO $path | $GREP ^.:`
13965  new_path="$path"
13966  if test "x$has_colon" = x; then
13967    # Not in mixed or Windows style, start by that.
13968    new_path=`cmd //c echo $path`
13969  fi
13970
13971
13972  input_path="$new_path"
13973  # Check if we need to convert this using DOS-style short mode. If the path
13974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13975  # take no chances and rewrite it.
13976  # Note: m4 eats our [], so we need to use [ and ] instead.
13977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13978  if test "x$has_forbidden_chars" != x; then
13979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13981  fi
13982
13983
13984  windows_path="$new_path"
13985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13986    unix_path=`$CYGPATH -u "$windows_path"`
13987    new_path="$unix_path"
13988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13990    new_path="$unix_path"
13991  fi
13992
13993  if test "x$path" != "x$new_path"; then
13994    BOOT_JDK="$new_path"
13995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13997  fi
13998
13999  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14000  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14001
14002  else
14003    # We're on a posix platform. Hooray! :)
14004    path="$BOOT_JDK"
14005    has_space=`$ECHO "$path" | $GREP " "`
14006    if test "x$has_space" != x; then
14007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14008$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14009      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14010    fi
14011
14012    # Use eval to expand a potential ~
14013    eval path="$path"
14014    if test ! -f "$path" && test ! -d "$path"; then
14015      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14016    fi
14017
14018    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14019  fi
14020
14021              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14022$as_echo_n "checking for Boot JDK... " >&6; }
14023              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14024$as_echo "$BOOT_JDK" >&6; }
14025              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14026$as_echo_n "checking Boot JDK version... " >&6; }
14027              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14028              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14029$as_echo "$BOOT_JDK_VERSION" >&6; }
14030            fi # end check jdk version
14031          fi # end check rt.jar
14032        fi # end check javac
14033      fi # end check java
14034    fi # end check boot jdk found
14035  fi
14036
14037
14038  if test "x$BOOT_JDK_FOUND" = xno; then
14039    # Now execute the test
14040
14041  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14042  BOOT_JDK_SUFFIX=""
14043  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14044  if test "x$ALL_JDKS_FOUND" != x; then
14045    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14046
14047  if test "x$BOOT_JDK_FOUND" = xno; then
14048    # Now execute the test
14049
14050        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14051        if test -d "$BOOT_JDK"; then
14052          BOOT_JDK_FOUND=maybe
14053          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14054$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14055        fi
14056
14057
14058    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14059    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14060      # Do we have a bin/java?
14061      if test ! -x "$BOOT_JDK/bin/java"; then
14062        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14064        BOOT_JDK_FOUND=no
14065      else
14066        # Do we have a bin/javac?
14067        if test ! -x "$BOOT_JDK/bin/javac"; then
14068          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14070          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14071$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14072          BOOT_JDK_FOUND=no
14073        else
14074          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14075          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14076            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14078            BOOT_JDK_FOUND=no
14079          else
14080            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14081            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14082
14083            # Extra M4 quote needed to protect [] in grep expression.
14084            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14085            if test "x$FOUND_VERSION_78" = x; then
14086              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14088              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14089$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14090              BOOT_JDK_FOUND=no
14091            else
14092              # We're done! :-)
14093              BOOT_JDK_FOUND=yes
14094
14095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14096
14097  # Input might be given as Windows format, start by converting to
14098  # unix format.
14099  path="$BOOT_JDK"
14100  new_path=`$CYGPATH -u "$path"`
14101
14102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14105  # "foo.exe" is OK but "foo" is an error.
14106  #
14107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14108  # It is also a way to make sure we got the proper file name for the real test later on.
14109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14110  if test "x$test_shortpath" = x; then
14111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14112$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14113    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14114  fi
14115
14116  # Call helper function which possibly converts this using DOS-style short mode.
14117  # If so, the updated path is stored in $new_path.
14118
14119  input_path="$new_path"
14120  # Check if we need to convert this using DOS-style short mode. If the path
14121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14122  # take no chances and rewrite it.
14123  # Note: m4 eats our [], so we need to use [ and ] instead.
14124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14125  if test "x$has_forbidden_chars" != x; then
14126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14130      # Going to short mode and back again did indeed matter. Since short mode is
14131      # case insensitive, let's make it lowercase to improve readability.
14132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14133      # Now convert it back to Unix-stile (cygpath)
14134      input_path=`$CYGPATH -u "$shortmode_path"`
14135      new_path="$input_path"
14136    fi
14137  fi
14138
14139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14140  if test "x$test_cygdrive_prefix" = x; then
14141    # As a simple fix, exclude /usr/bin since it's not a real path.
14142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14144      # a path prefixed by /cygdrive for fixpath to work.
14145      new_path="$CYGWIN_ROOT_PATH$input_path"
14146    fi
14147  fi
14148
14149
14150  if test "x$path" != "x$new_path"; then
14151    BOOT_JDK="$new_path"
14152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14153$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14154  fi
14155
14156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14157
14158  path="$BOOT_JDK"
14159  has_colon=`$ECHO $path | $GREP ^.:`
14160  new_path="$path"
14161  if test "x$has_colon" = x; then
14162    # Not in mixed or Windows style, start by that.
14163    new_path=`cmd //c echo $path`
14164  fi
14165
14166
14167  input_path="$new_path"
14168  # Check if we need to convert this using DOS-style short mode. If the path
14169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14170  # take no chances and rewrite it.
14171  # Note: m4 eats our [], so we need to use [ and ] instead.
14172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14173  if test "x$has_forbidden_chars" != x; then
14174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14176  fi
14177
14178
14179  windows_path="$new_path"
14180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14181    unix_path=`$CYGPATH -u "$windows_path"`
14182    new_path="$unix_path"
14183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14185    new_path="$unix_path"
14186  fi
14187
14188  if test "x$path" != "x$new_path"; then
14189    BOOT_JDK="$new_path"
14190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14192  fi
14193
14194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14196
14197  else
14198    # We're on a posix platform. Hooray! :)
14199    path="$BOOT_JDK"
14200    has_space=`$ECHO "$path" | $GREP " "`
14201    if test "x$has_space" != x; then
14202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14203$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14204      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14205    fi
14206
14207    # Use eval to expand a potential ~
14208    eval path="$path"
14209    if test ! -f "$path" && test ! -d "$path"; then
14210      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14211    fi
14212
14213    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14214  fi
14215
14216              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14217$as_echo_n "checking for Boot JDK... " >&6; }
14218              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14219$as_echo "$BOOT_JDK" >&6; }
14220              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14221$as_echo_n "checking Boot JDK version... " >&6; }
14222              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14223              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14224$as_echo "$BOOT_JDK_VERSION" >&6; }
14225            fi # end check jdk version
14226          fi # end check rt.jar
14227        fi # end check javac
14228      fi # end check java
14229    fi # end check boot jdk found
14230  fi
14231
14232    done
14233  fi
14234
14235
14236    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14237    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14238      # Do we have a bin/java?
14239      if test ! -x "$BOOT_JDK/bin/java"; then
14240        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14242        BOOT_JDK_FOUND=no
14243      else
14244        # Do we have a bin/javac?
14245        if test ! -x "$BOOT_JDK/bin/javac"; then
14246          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14248          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14249$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14250          BOOT_JDK_FOUND=no
14251        else
14252          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14253          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14254            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14256            BOOT_JDK_FOUND=no
14257          else
14258            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14259            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14260
14261            # Extra M4 quote needed to protect [] in grep expression.
14262            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14263            if test "x$FOUND_VERSION_78" = x; then
14264              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14266              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14267$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14268              BOOT_JDK_FOUND=no
14269            else
14270              # We're done! :-)
14271              BOOT_JDK_FOUND=yes
14272
14273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14274
14275  # Input might be given as Windows format, start by converting to
14276  # unix format.
14277  path="$BOOT_JDK"
14278  new_path=`$CYGPATH -u "$path"`
14279
14280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14283  # "foo.exe" is OK but "foo" is an error.
14284  #
14285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14286  # It is also a way to make sure we got the proper file name for the real test later on.
14287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14288  if test "x$test_shortpath" = x; then
14289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14291    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14292  fi
14293
14294  # Call helper function which possibly converts this using DOS-style short mode.
14295  # If so, the updated path is stored in $new_path.
14296
14297  input_path="$new_path"
14298  # Check if we need to convert this using DOS-style short mode. If the path
14299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14300  # take no chances and rewrite it.
14301  # Note: m4 eats our [], so we need to use [ and ] instead.
14302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14303  if test "x$has_forbidden_chars" != x; then
14304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14308      # Going to short mode and back again did indeed matter. Since short mode is
14309      # case insensitive, let's make it lowercase to improve readability.
14310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14311      # Now convert it back to Unix-stile (cygpath)
14312      input_path=`$CYGPATH -u "$shortmode_path"`
14313      new_path="$input_path"
14314    fi
14315  fi
14316
14317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14318  if test "x$test_cygdrive_prefix" = x; then
14319    # As a simple fix, exclude /usr/bin since it's not a real path.
14320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14322      # a path prefixed by /cygdrive for fixpath to work.
14323      new_path="$CYGWIN_ROOT_PATH$input_path"
14324    fi
14325  fi
14326
14327
14328  if test "x$path" != "x$new_path"; then
14329    BOOT_JDK="$new_path"
14330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14331$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14332  fi
14333
14334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14335
14336  path="$BOOT_JDK"
14337  has_colon=`$ECHO $path | $GREP ^.:`
14338  new_path="$path"
14339  if test "x$has_colon" = x; then
14340    # Not in mixed or Windows style, start by that.
14341    new_path=`cmd //c echo $path`
14342  fi
14343
14344
14345  input_path="$new_path"
14346  # Check if we need to convert this using DOS-style short mode. If the path
14347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14348  # take no chances and rewrite it.
14349  # Note: m4 eats our [], so we need to use [ and ] instead.
14350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14351  if test "x$has_forbidden_chars" != x; then
14352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14354  fi
14355
14356
14357  windows_path="$new_path"
14358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14359    unix_path=`$CYGPATH -u "$windows_path"`
14360    new_path="$unix_path"
14361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14363    new_path="$unix_path"
14364  fi
14365
14366  if test "x$path" != "x$new_path"; then
14367    BOOT_JDK="$new_path"
14368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14369$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14370  fi
14371
14372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14374
14375  else
14376    # We're on a posix platform. Hooray! :)
14377    path="$BOOT_JDK"
14378    has_space=`$ECHO "$path" | $GREP " "`
14379    if test "x$has_space" != x; then
14380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14382      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14383    fi
14384
14385    # Use eval to expand a potential ~
14386    eval path="$path"
14387    if test ! -f "$path" && test ! -d "$path"; then
14388      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14389    fi
14390
14391    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14392  fi
14393
14394              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14395$as_echo_n "checking for Boot JDK... " >&6; }
14396              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14397$as_echo "$BOOT_JDK" >&6; }
14398              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14399$as_echo_n "checking Boot JDK version... " >&6; }
14400              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14401              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14402$as_echo "$BOOT_JDK_VERSION" >&6; }
14403            fi # end check jdk version
14404          fi # end check rt.jar
14405        fi # end check javac
14406      fi # end check java
14407    fi # end check boot jdk found
14408  fi
14409
14410  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14411
14412  if test "x$BOOT_JDK_FOUND" = xno; then
14413    # Now execute the test
14414
14415  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14416  BOOT_JDK_SUFFIX="/Contents/Home"
14417  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14418  if test "x$ALL_JDKS_FOUND" != x; then
14419    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14420
14421  if test "x$BOOT_JDK_FOUND" = xno; then
14422    # Now execute the test
14423
14424        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14425        if test -d "$BOOT_JDK"; then
14426          BOOT_JDK_FOUND=maybe
14427          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14428$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14429        fi
14430
14431
14432    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14433    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14434      # Do we have a bin/java?
14435      if test ! -x "$BOOT_JDK/bin/java"; then
14436        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14438        BOOT_JDK_FOUND=no
14439      else
14440        # Do we have a bin/javac?
14441        if test ! -x "$BOOT_JDK/bin/javac"; then
14442          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14444          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14445$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14446          BOOT_JDK_FOUND=no
14447        else
14448          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14449          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14450            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14452            BOOT_JDK_FOUND=no
14453          else
14454            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14455            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14456
14457            # Extra M4 quote needed to protect [] in grep expression.
14458            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14459            if test "x$FOUND_VERSION_78" = x; then
14460              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14462              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14463$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14464              BOOT_JDK_FOUND=no
14465            else
14466              # We're done! :-)
14467              BOOT_JDK_FOUND=yes
14468
14469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14470
14471  # Input might be given as Windows format, start by converting to
14472  # unix format.
14473  path="$BOOT_JDK"
14474  new_path=`$CYGPATH -u "$path"`
14475
14476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14479  # "foo.exe" is OK but "foo" is an error.
14480  #
14481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14482  # It is also a way to make sure we got the proper file name for the real test later on.
14483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14484  if test "x$test_shortpath" = x; then
14485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14487    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14488  fi
14489
14490  # Call helper function which possibly converts this using DOS-style short mode.
14491  # If so, the updated path is stored in $new_path.
14492
14493  input_path="$new_path"
14494  # Check if we need to convert this using DOS-style short mode. If the path
14495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14496  # take no chances and rewrite it.
14497  # Note: m4 eats our [], so we need to use [ and ] instead.
14498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14499  if test "x$has_forbidden_chars" != x; then
14500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14504      # Going to short mode and back again did indeed matter. Since short mode is
14505      # case insensitive, let's make it lowercase to improve readability.
14506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14507      # Now convert it back to Unix-stile (cygpath)
14508      input_path=`$CYGPATH -u "$shortmode_path"`
14509      new_path="$input_path"
14510    fi
14511  fi
14512
14513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14514  if test "x$test_cygdrive_prefix" = x; then
14515    # As a simple fix, exclude /usr/bin since it's not a real path.
14516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14518      # a path prefixed by /cygdrive for fixpath to work.
14519      new_path="$CYGWIN_ROOT_PATH$input_path"
14520    fi
14521  fi
14522
14523
14524  if test "x$path" != "x$new_path"; then
14525    BOOT_JDK="$new_path"
14526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14528  fi
14529
14530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14531
14532  path="$BOOT_JDK"
14533  has_colon=`$ECHO $path | $GREP ^.:`
14534  new_path="$path"
14535  if test "x$has_colon" = x; then
14536    # Not in mixed or Windows style, start by that.
14537    new_path=`cmd //c echo $path`
14538  fi
14539
14540
14541  input_path="$new_path"
14542  # Check if we need to convert this using DOS-style short mode. If the path
14543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14544  # take no chances and rewrite it.
14545  # Note: m4 eats our [], so we need to use [ and ] instead.
14546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14547  if test "x$has_forbidden_chars" != x; then
14548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14550  fi
14551
14552
14553  windows_path="$new_path"
14554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14555    unix_path=`$CYGPATH -u "$windows_path"`
14556    new_path="$unix_path"
14557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14559    new_path="$unix_path"
14560  fi
14561
14562  if test "x$path" != "x$new_path"; then
14563    BOOT_JDK="$new_path"
14564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14566  fi
14567
14568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14570
14571  else
14572    # We're on a posix platform. Hooray! :)
14573    path="$BOOT_JDK"
14574    has_space=`$ECHO "$path" | $GREP " "`
14575    if test "x$has_space" != x; then
14576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14578      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14579    fi
14580
14581    # Use eval to expand a potential ~
14582    eval path="$path"
14583    if test ! -f "$path" && test ! -d "$path"; then
14584      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14585    fi
14586
14587    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14588  fi
14589
14590              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14591$as_echo_n "checking for Boot JDK... " >&6; }
14592              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14593$as_echo "$BOOT_JDK" >&6; }
14594              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14595$as_echo_n "checking Boot JDK version... " >&6; }
14596              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14597              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14598$as_echo "$BOOT_JDK_VERSION" >&6; }
14599            fi # end check jdk version
14600          fi # end check rt.jar
14601        fi # end check javac
14602      fi # end check java
14603    fi # end check boot jdk found
14604  fi
14605
14606    done
14607  fi
14608
14609
14610    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14611    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14612      # Do we have a bin/java?
14613      if test ! -x "$BOOT_JDK/bin/java"; then
14614        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14616        BOOT_JDK_FOUND=no
14617      else
14618        # Do we have a bin/javac?
14619        if test ! -x "$BOOT_JDK/bin/javac"; then
14620          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14622          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14623$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14624          BOOT_JDK_FOUND=no
14625        else
14626          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14627          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14628            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14630            BOOT_JDK_FOUND=no
14631          else
14632            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14633            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14634
14635            # Extra M4 quote needed to protect [] in grep expression.
14636            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14637            if test "x$FOUND_VERSION_78" = x; then
14638              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14640              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14641$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14642              BOOT_JDK_FOUND=no
14643            else
14644              # We're done! :-)
14645              BOOT_JDK_FOUND=yes
14646
14647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14648
14649  # Input might be given as Windows format, start by converting to
14650  # unix format.
14651  path="$BOOT_JDK"
14652  new_path=`$CYGPATH -u "$path"`
14653
14654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14657  # "foo.exe" is OK but "foo" is an error.
14658  #
14659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14660  # It is also a way to make sure we got the proper file name for the real test later on.
14661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14662  if test "x$test_shortpath" = x; then
14663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14665    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14666  fi
14667
14668  # Call helper function which possibly converts this using DOS-style short mode.
14669  # If so, the updated path is stored in $new_path.
14670
14671  input_path="$new_path"
14672  # Check if we need to convert this using DOS-style short mode. If the path
14673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14674  # take no chances and rewrite it.
14675  # Note: m4 eats our [], so we need to use [ and ] instead.
14676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14677  if test "x$has_forbidden_chars" != x; then
14678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14682      # Going to short mode and back again did indeed matter. Since short mode is
14683      # case insensitive, let's make it lowercase to improve readability.
14684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14685      # Now convert it back to Unix-stile (cygpath)
14686      input_path=`$CYGPATH -u "$shortmode_path"`
14687      new_path="$input_path"
14688    fi
14689  fi
14690
14691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14692  if test "x$test_cygdrive_prefix" = x; then
14693    # As a simple fix, exclude /usr/bin since it's not a real path.
14694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14696      # a path prefixed by /cygdrive for fixpath to work.
14697      new_path="$CYGWIN_ROOT_PATH$input_path"
14698    fi
14699  fi
14700
14701
14702  if test "x$path" != "x$new_path"; then
14703    BOOT_JDK="$new_path"
14704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14706  fi
14707
14708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14709
14710  path="$BOOT_JDK"
14711  has_colon=`$ECHO $path | $GREP ^.:`
14712  new_path="$path"
14713  if test "x$has_colon" = x; then
14714    # Not in mixed or Windows style, start by that.
14715    new_path=`cmd //c echo $path`
14716  fi
14717
14718
14719  input_path="$new_path"
14720  # Check if we need to convert this using DOS-style short mode. If the path
14721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14722  # take no chances and rewrite it.
14723  # Note: m4 eats our [], so we need to use [ and ] instead.
14724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14725  if test "x$has_forbidden_chars" != x; then
14726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14728  fi
14729
14730
14731  windows_path="$new_path"
14732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14733    unix_path=`$CYGPATH -u "$windows_path"`
14734    new_path="$unix_path"
14735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14737    new_path="$unix_path"
14738  fi
14739
14740  if test "x$path" != "x$new_path"; then
14741    BOOT_JDK="$new_path"
14742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14744  fi
14745
14746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14748
14749  else
14750    # We're on a posix platform. Hooray! :)
14751    path="$BOOT_JDK"
14752    has_space=`$ECHO "$path" | $GREP " "`
14753    if test "x$has_space" != x; then
14754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14756      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14757    fi
14758
14759    # Use eval to expand a potential ~
14760    eval path="$path"
14761    if test ! -f "$path" && test ! -d "$path"; then
14762      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14763    fi
14764
14765    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14766  fi
14767
14768              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14769$as_echo_n "checking for Boot JDK... " >&6; }
14770              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14771$as_echo "$BOOT_JDK" >&6; }
14772              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14773$as_echo_n "checking Boot JDK version... " >&6; }
14774              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14775              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14776$as_echo "$BOOT_JDK_VERSION" >&6; }
14777            fi # end check jdk version
14778          fi # end check rt.jar
14779        fi # end check javac
14780      fi # end check java
14781    fi # end check boot jdk found
14782  fi
14783
14784
14785  if test "x$BOOT_JDK_FOUND" = xno; then
14786    # Now execute the test
14787
14788  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14789  BOOT_JDK_SUFFIX="/Contents/Home"
14790  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14791  if test "x$ALL_JDKS_FOUND" != x; then
14792    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14793
14794  if test "x$BOOT_JDK_FOUND" = xno; then
14795    # Now execute the test
14796
14797        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14798        if test -d "$BOOT_JDK"; then
14799          BOOT_JDK_FOUND=maybe
14800          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14801$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14802        fi
14803
14804
14805    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14806    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14807      # Do we have a bin/java?
14808      if test ! -x "$BOOT_JDK/bin/java"; then
14809        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14811        BOOT_JDK_FOUND=no
14812      else
14813        # Do we have a bin/javac?
14814        if test ! -x "$BOOT_JDK/bin/javac"; then
14815          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14817          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14818$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14819          BOOT_JDK_FOUND=no
14820        else
14821          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14822          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14823            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14825            BOOT_JDK_FOUND=no
14826          else
14827            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14828            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14829
14830            # Extra M4 quote needed to protect [] in grep expression.
14831            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14832            if test "x$FOUND_VERSION_78" = x; then
14833              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14834$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14835              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14836$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14837              BOOT_JDK_FOUND=no
14838            else
14839              # We're done! :-)
14840              BOOT_JDK_FOUND=yes
14841
14842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14843
14844  # Input might be given as Windows format, start by converting to
14845  # unix format.
14846  path="$BOOT_JDK"
14847  new_path=`$CYGPATH -u "$path"`
14848
14849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14852  # "foo.exe" is OK but "foo" is an error.
14853  #
14854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14855  # It is also a way to make sure we got the proper file name for the real test later on.
14856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14857  if test "x$test_shortpath" = x; then
14858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14859$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14860    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14861  fi
14862
14863  # Call helper function which possibly converts this using DOS-style short mode.
14864  # If so, the updated path is stored in $new_path.
14865
14866  input_path="$new_path"
14867  # Check if we need to convert this using DOS-style short mode. If the path
14868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14869  # take no chances and rewrite it.
14870  # Note: m4 eats our [], so we need to use [ and ] instead.
14871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14872  if test "x$has_forbidden_chars" != x; then
14873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14877      # Going to short mode and back again did indeed matter. Since short mode is
14878      # case insensitive, let's make it lowercase to improve readability.
14879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14880      # Now convert it back to Unix-stile (cygpath)
14881      input_path=`$CYGPATH -u "$shortmode_path"`
14882      new_path="$input_path"
14883    fi
14884  fi
14885
14886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14887  if test "x$test_cygdrive_prefix" = x; then
14888    # As a simple fix, exclude /usr/bin since it's not a real path.
14889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14891      # a path prefixed by /cygdrive for fixpath to work.
14892      new_path="$CYGWIN_ROOT_PATH$input_path"
14893    fi
14894  fi
14895
14896
14897  if test "x$path" != "x$new_path"; then
14898    BOOT_JDK="$new_path"
14899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14900$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14901  fi
14902
14903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14904
14905  path="$BOOT_JDK"
14906  has_colon=`$ECHO $path | $GREP ^.:`
14907  new_path="$path"
14908  if test "x$has_colon" = x; then
14909    # Not in mixed or Windows style, start by that.
14910    new_path=`cmd //c echo $path`
14911  fi
14912
14913
14914  input_path="$new_path"
14915  # Check if we need to convert this using DOS-style short mode. If the path
14916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14917  # take no chances and rewrite it.
14918  # Note: m4 eats our [], so we need to use [ and ] instead.
14919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14920  if test "x$has_forbidden_chars" != x; then
14921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14923  fi
14924
14925
14926  windows_path="$new_path"
14927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14928    unix_path=`$CYGPATH -u "$windows_path"`
14929    new_path="$unix_path"
14930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14932    new_path="$unix_path"
14933  fi
14934
14935  if test "x$path" != "x$new_path"; then
14936    BOOT_JDK="$new_path"
14937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14938$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14939  fi
14940
14941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14943
14944  else
14945    # We're on a posix platform. Hooray! :)
14946    path="$BOOT_JDK"
14947    has_space=`$ECHO "$path" | $GREP " "`
14948    if test "x$has_space" != x; then
14949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14950$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14951      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14952    fi
14953
14954    # Use eval to expand a potential ~
14955    eval path="$path"
14956    if test ! -f "$path" && test ! -d "$path"; then
14957      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14958    fi
14959
14960    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14961  fi
14962
14963              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14964$as_echo_n "checking for Boot JDK... " >&6; }
14965              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14966$as_echo "$BOOT_JDK" >&6; }
14967              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14968$as_echo_n "checking Boot JDK version... " >&6; }
14969              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14970              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14971$as_echo "$BOOT_JDK_VERSION" >&6; }
14972            fi # end check jdk version
14973          fi # end check rt.jar
14974        fi # end check javac
14975      fi # end check java
14976    fi # end check boot jdk found
14977  fi
14978
14979    done
14980  fi
14981
14982
14983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14985      # Do we have a bin/java?
14986      if test ! -x "$BOOT_JDK/bin/java"; then
14987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14989        BOOT_JDK_FOUND=no
14990      else
14991        # Do we have a bin/javac?
14992        if test ! -x "$BOOT_JDK/bin/javac"; then
14993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14997          BOOT_JDK_FOUND=no
14998        else
14999          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15000          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15003            BOOT_JDK_FOUND=no
15004          else
15005            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15006            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15007
15008            # Extra M4 quote needed to protect [] in grep expression.
15009            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15010            if test "x$FOUND_VERSION_78" = x; then
15011              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15013              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15014$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15015              BOOT_JDK_FOUND=no
15016            else
15017              # We're done! :-)
15018              BOOT_JDK_FOUND=yes
15019
15020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15021
15022  # Input might be given as Windows format, start by converting to
15023  # unix format.
15024  path="$BOOT_JDK"
15025  new_path=`$CYGPATH -u "$path"`
15026
15027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15030  # "foo.exe" is OK but "foo" is an error.
15031  #
15032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15033  # It is also a way to make sure we got the proper file name for the real test later on.
15034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15035  if test "x$test_shortpath" = x; then
15036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15038    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15039  fi
15040
15041  # Call helper function which possibly converts this using DOS-style short mode.
15042  # If so, the updated path is stored in $new_path.
15043
15044  input_path="$new_path"
15045  # Check if we need to convert this using DOS-style short mode. If the path
15046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15047  # take no chances and rewrite it.
15048  # Note: m4 eats our [], so we need to use [ and ] instead.
15049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15050  if test "x$has_forbidden_chars" != x; then
15051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15055      # Going to short mode and back again did indeed matter. Since short mode is
15056      # case insensitive, let's make it lowercase to improve readability.
15057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15058      # Now convert it back to Unix-stile (cygpath)
15059      input_path=`$CYGPATH -u "$shortmode_path"`
15060      new_path="$input_path"
15061    fi
15062  fi
15063
15064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15065  if test "x$test_cygdrive_prefix" = x; then
15066    # As a simple fix, exclude /usr/bin since it's not a real path.
15067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15069      # a path prefixed by /cygdrive for fixpath to work.
15070      new_path="$CYGWIN_ROOT_PATH$input_path"
15071    fi
15072  fi
15073
15074
15075  if test "x$path" != "x$new_path"; then
15076    BOOT_JDK="$new_path"
15077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15079  fi
15080
15081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15082
15083  path="$BOOT_JDK"
15084  has_colon=`$ECHO $path | $GREP ^.:`
15085  new_path="$path"
15086  if test "x$has_colon" = x; then
15087    # Not in mixed or Windows style, start by that.
15088    new_path=`cmd //c echo $path`
15089  fi
15090
15091
15092  input_path="$new_path"
15093  # Check if we need to convert this using DOS-style short mode. If the path
15094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15095  # take no chances and rewrite it.
15096  # Note: m4 eats our [], so we need to use [ and ] instead.
15097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15098  if test "x$has_forbidden_chars" != x; then
15099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15101  fi
15102
15103
15104  windows_path="$new_path"
15105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15106    unix_path=`$CYGPATH -u "$windows_path"`
15107    new_path="$unix_path"
15108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15110    new_path="$unix_path"
15111  fi
15112
15113  if test "x$path" != "x$new_path"; then
15114    BOOT_JDK="$new_path"
15115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15116$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15117  fi
15118
15119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15121
15122  else
15123    # We're on a posix platform. Hooray! :)
15124    path="$BOOT_JDK"
15125    has_space=`$ECHO "$path" | $GREP " "`
15126    if test "x$has_space" != x; then
15127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15128$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15129      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15130    fi
15131
15132    # Use eval to expand a potential ~
15133    eval path="$path"
15134    if test ! -f "$path" && test ! -d "$path"; then
15135      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15136    fi
15137
15138    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15139  fi
15140
15141              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15142$as_echo_n "checking for Boot JDK... " >&6; }
15143              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15144$as_echo "$BOOT_JDK" >&6; }
15145              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15146$as_echo_n "checking Boot JDK version... " >&6; }
15147              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15148              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15149$as_echo "$BOOT_JDK_VERSION" >&6; }
15150            fi # end check jdk version
15151          fi # end check rt.jar
15152        fi # end check javac
15153      fi # end check java
15154    fi # end check boot jdk found
15155  fi
15156
15157  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15158
15159  if test "x$BOOT_JDK_FOUND" = xno; then
15160    # Now execute the test
15161
15162  BOOT_JDK_PREFIX="/usr/lib/jvm"
15163  BOOT_JDK_SUFFIX=""
15164  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15165  if test "x$ALL_JDKS_FOUND" != x; then
15166    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15167
15168  if test "x$BOOT_JDK_FOUND" = xno; then
15169    # Now execute the test
15170
15171        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15172        if test -d "$BOOT_JDK"; then
15173          BOOT_JDK_FOUND=maybe
15174          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15175$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15176        fi
15177
15178
15179    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15180    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15181      # Do we have a bin/java?
15182      if test ! -x "$BOOT_JDK/bin/java"; then
15183        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15185        BOOT_JDK_FOUND=no
15186      else
15187        # Do we have a bin/javac?
15188        if test ! -x "$BOOT_JDK/bin/javac"; then
15189          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15191          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15192$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15193          BOOT_JDK_FOUND=no
15194        else
15195          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15196          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15197            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15199            BOOT_JDK_FOUND=no
15200          else
15201            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15202            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15203
15204            # Extra M4 quote needed to protect [] in grep expression.
15205            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15206            if test "x$FOUND_VERSION_78" = x; then
15207              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15209              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15210$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15211              BOOT_JDK_FOUND=no
15212            else
15213              # We're done! :-)
15214              BOOT_JDK_FOUND=yes
15215
15216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15217
15218  # Input might be given as Windows format, start by converting to
15219  # unix format.
15220  path="$BOOT_JDK"
15221  new_path=`$CYGPATH -u "$path"`
15222
15223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15226  # "foo.exe" is OK but "foo" is an error.
15227  #
15228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15229  # It is also a way to make sure we got the proper file name for the real test later on.
15230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15231  if test "x$test_shortpath" = x; then
15232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15233$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15234    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15235  fi
15236
15237  # Call helper function which possibly converts this using DOS-style short mode.
15238  # If so, the updated path is stored in $new_path.
15239
15240  input_path="$new_path"
15241  # Check if we need to convert this using DOS-style short mode. If the path
15242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15243  # take no chances and rewrite it.
15244  # Note: m4 eats our [], so we need to use [ and ] instead.
15245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15246  if test "x$has_forbidden_chars" != x; then
15247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15251      # Going to short mode and back again did indeed matter. Since short mode is
15252      # case insensitive, let's make it lowercase to improve readability.
15253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15254      # Now convert it back to Unix-stile (cygpath)
15255      input_path=`$CYGPATH -u "$shortmode_path"`
15256      new_path="$input_path"
15257    fi
15258  fi
15259
15260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15261  if test "x$test_cygdrive_prefix" = x; then
15262    # As a simple fix, exclude /usr/bin since it's not a real path.
15263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15265      # a path prefixed by /cygdrive for fixpath to work.
15266      new_path="$CYGWIN_ROOT_PATH$input_path"
15267    fi
15268  fi
15269
15270
15271  if test "x$path" != "x$new_path"; then
15272    BOOT_JDK="$new_path"
15273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15274$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15275  fi
15276
15277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15278
15279  path="$BOOT_JDK"
15280  has_colon=`$ECHO $path | $GREP ^.:`
15281  new_path="$path"
15282  if test "x$has_colon" = x; then
15283    # Not in mixed or Windows style, start by that.
15284    new_path=`cmd //c echo $path`
15285  fi
15286
15287
15288  input_path="$new_path"
15289  # Check if we need to convert this using DOS-style short mode. If the path
15290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15291  # take no chances and rewrite it.
15292  # Note: m4 eats our [], so we need to use [ and ] instead.
15293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15294  if test "x$has_forbidden_chars" != x; then
15295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15297  fi
15298
15299
15300  windows_path="$new_path"
15301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15302    unix_path=`$CYGPATH -u "$windows_path"`
15303    new_path="$unix_path"
15304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15306    new_path="$unix_path"
15307  fi
15308
15309  if test "x$path" != "x$new_path"; then
15310    BOOT_JDK="$new_path"
15311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15312$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15313  fi
15314
15315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15317
15318  else
15319    # We're on a posix platform. Hooray! :)
15320    path="$BOOT_JDK"
15321    has_space=`$ECHO "$path" | $GREP " "`
15322    if test "x$has_space" != x; then
15323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15325      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15326    fi
15327
15328    # Use eval to expand a potential ~
15329    eval path="$path"
15330    if test ! -f "$path" && test ! -d "$path"; then
15331      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15332    fi
15333
15334    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15335  fi
15336
15337              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15338$as_echo_n "checking for Boot JDK... " >&6; }
15339              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15340$as_echo "$BOOT_JDK" >&6; }
15341              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15342$as_echo_n "checking Boot JDK version... " >&6; }
15343              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15344              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15345$as_echo "$BOOT_JDK_VERSION" >&6; }
15346            fi # end check jdk version
15347          fi # end check rt.jar
15348        fi # end check javac
15349      fi # end check java
15350    fi # end check boot jdk found
15351  fi
15352
15353    done
15354  fi
15355
15356
15357    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15358    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15359      # Do we have a bin/java?
15360      if test ! -x "$BOOT_JDK/bin/java"; then
15361        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15363        BOOT_JDK_FOUND=no
15364      else
15365        # Do we have a bin/javac?
15366        if test ! -x "$BOOT_JDK/bin/javac"; then
15367          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15369          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15370$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15371          BOOT_JDK_FOUND=no
15372        else
15373          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15374          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15375            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15376$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15377            BOOT_JDK_FOUND=no
15378          else
15379            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15380            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15381
15382            # Extra M4 quote needed to protect [] in grep expression.
15383            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15384            if test "x$FOUND_VERSION_78" = x; then
15385              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15387              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15388$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15389              BOOT_JDK_FOUND=no
15390            else
15391              # We're done! :-)
15392              BOOT_JDK_FOUND=yes
15393
15394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15395
15396  # Input might be given as Windows format, start by converting to
15397  # unix format.
15398  path="$BOOT_JDK"
15399  new_path=`$CYGPATH -u "$path"`
15400
15401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15404  # "foo.exe" is OK but "foo" is an error.
15405  #
15406  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15407  # It is also a way to make sure we got the proper file name for the real test later on.
15408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15409  if test "x$test_shortpath" = x; then
15410    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15411$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15412    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15413  fi
15414
15415  # Call helper function which possibly converts this using DOS-style short mode.
15416  # If so, the updated path is stored in $new_path.
15417
15418  input_path="$new_path"
15419  # Check if we need to convert this using DOS-style short mode. If the path
15420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15421  # take no chances and rewrite it.
15422  # Note: m4 eats our [], so we need to use [ and ] instead.
15423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15424  if test "x$has_forbidden_chars" != x; then
15425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15429      # Going to short mode and back again did indeed matter. Since short mode is
15430      # case insensitive, let's make it lowercase to improve readability.
15431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15432      # Now convert it back to Unix-stile (cygpath)
15433      input_path=`$CYGPATH -u "$shortmode_path"`
15434      new_path="$input_path"
15435    fi
15436  fi
15437
15438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15439  if test "x$test_cygdrive_prefix" = x; then
15440    # As a simple fix, exclude /usr/bin since it's not a real path.
15441    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15443      # a path prefixed by /cygdrive for fixpath to work.
15444      new_path="$CYGWIN_ROOT_PATH$input_path"
15445    fi
15446  fi
15447
15448
15449  if test "x$path" != "x$new_path"; then
15450    BOOT_JDK="$new_path"
15451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15452$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15453  fi
15454
15455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15456
15457  path="$BOOT_JDK"
15458  has_colon=`$ECHO $path | $GREP ^.:`
15459  new_path="$path"
15460  if test "x$has_colon" = x; then
15461    # Not in mixed or Windows style, start by that.
15462    new_path=`cmd //c echo $path`
15463  fi
15464
15465
15466  input_path="$new_path"
15467  # Check if we need to convert this using DOS-style short mode. If the path
15468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15469  # take no chances and rewrite it.
15470  # Note: m4 eats our [], so we need to use [ and ] instead.
15471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15472  if test "x$has_forbidden_chars" != x; then
15473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15475  fi
15476
15477
15478  windows_path="$new_path"
15479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15480    unix_path=`$CYGPATH -u "$windows_path"`
15481    new_path="$unix_path"
15482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15484    new_path="$unix_path"
15485  fi
15486
15487  if test "x$path" != "x$new_path"; then
15488    BOOT_JDK="$new_path"
15489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15490$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15491  fi
15492
15493  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15494  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15495
15496  else
15497    # We're on a posix platform. Hooray! :)
15498    path="$BOOT_JDK"
15499    has_space=`$ECHO "$path" | $GREP " "`
15500    if test "x$has_space" != x; then
15501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15502$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15503      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15504    fi
15505
15506    # Use eval to expand a potential ~
15507    eval path="$path"
15508    if test ! -f "$path" && test ! -d "$path"; then
15509      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15510    fi
15511
15512    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15513  fi
15514
15515              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15516$as_echo_n "checking for Boot JDK... " >&6; }
15517              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15518$as_echo "$BOOT_JDK" >&6; }
15519              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15520$as_echo_n "checking Boot JDK version... " >&6; }
15521              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15522              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15523$as_echo "$BOOT_JDK_VERSION" >&6; }
15524            fi # end check jdk version
15525          fi # end check rt.jar
15526        fi # end check javac
15527      fi # end check java
15528    fi # end check boot jdk found
15529  fi
15530
15531  fi
15532
15533
15534    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15535    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15536      # Do we have a bin/java?
15537      if test ! -x "$BOOT_JDK/bin/java"; then
15538        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15540        BOOT_JDK_FOUND=no
15541      else
15542        # Do we have a bin/javac?
15543        if test ! -x "$BOOT_JDK/bin/javac"; then
15544          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15546          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15547$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15548          BOOT_JDK_FOUND=no
15549        else
15550          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15551          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15552            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15554            BOOT_JDK_FOUND=no
15555          else
15556            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15557            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15558
15559            # Extra M4 quote needed to protect [] in grep expression.
15560            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15561            if test "x$FOUND_VERSION_78" = x; then
15562              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15564              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15565$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15566              BOOT_JDK_FOUND=no
15567            else
15568              # We're done! :-)
15569              BOOT_JDK_FOUND=yes
15570
15571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15572
15573  # Input might be given as Windows format, start by converting to
15574  # unix format.
15575  path="$BOOT_JDK"
15576  new_path=`$CYGPATH -u "$path"`
15577
15578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15581  # "foo.exe" is OK but "foo" is an error.
15582  #
15583  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15584  # It is also a way to make sure we got the proper file name for the real test later on.
15585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15586  if test "x$test_shortpath" = x; then
15587    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15588$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15589    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15590  fi
15591
15592  # Call helper function which possibly converts this using DOS-style short mode.
15593  # If so, the updated path is stored in $new_path.
15594
15595  input_path="$new_path"
15596  # Check if we need to convert this using DOS-style short mode. If the path
15597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15598  # take no chances and rewrite it.
15599  # Note: m4 eats our [], so we need to use [ and ] instead.
15600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15601  if test "x$has_forbidden_chars" != x; then
15602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15603    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15604    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15605    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15606      # Going to short mode and back again did indeed matter. Since short mode is
15607      # case insensitive, let's make it lowercase to improve readability.
15608      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15609      # Now convert it back to Unix-stile (cygpath)
15610      input_path=`$CYGPATH -u "$shortmode_path"`
15611      new_path="$input_path"
15612    fi
15613  fi
15614
15615  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15616  if test "x$test_cygdrive_prefix" = x; then
15617    # As a simple fix, exclude /usr/bin since it's not a real path.
15618    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15619      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15620      # a path prefixed by /cygdrive for fixpath to work.
15621      new_path="$CYGWIN_ROOT_PATH$input_path"
15622    fi
15623  fi
15624
15625
15626  if test "x$path" != "x$new_path"; then
15627    BOOT_JDK="$new_path"
15628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15630  fi
15631
15632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15633
15634  path="$BOOT_JDK"
15635  has_colon=`$ECHO $path | $GREP ^.:`
15636  new_path="$path"
15637  if test "x$has_colon" = x; then
15638    # Not in mixed or Windows style, start by that.
15639    new_path=`cmd //c echo $path`
15640  fi
15641
15642
15643  input_path="$new_path"
15644  # Check if we need to convert this using DOS-style short mode. If the path
15645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15646  # take no chances and rewrite it.
15647  # Note: m4 eats our [], so we need to use [ and ] instead.
15648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15649  if test "x$has_forbidden_chars" != x; then
15650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15652  fi
15653
15654
15655  windows_path="$new_path"
15656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15657    unix_path=`$CYGPATH -u "$windows_path"`
15658    new_path="$unix_path"
15659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15661    new_path="$unix_path"
15662  fi
15663
15664  if test "x$path" != "x$new_path"; then
15665    BOOT_JDK="$new_path"
15666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15667$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15668  fi
15669
15670  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15671  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15672
15673  else
15674    # We're on a posix platform. Hooray! :)
15675    path="$BOOT_JDK"
15676    has_space=`$ECHO "$path" | $GREP " "`
15677    if test "x$has_space" != x; then
15678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15680      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15681    fi
15682
15683    # Use eval to expand a potential ~
15684    eval path="$path"
15685    if test ! -f "$path" && test ! -d "$path"; then
15686      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15687    fi
15688
15689    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15690  fi
15691
15692              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15693$as_echo_n "checking for Boot JDK... " >&6; }
15694              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15695$as_echo "$BOOT_JDK" >&6; }
15696              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15697$as_echo_n "checking Boot JDK version... " >&6; }
15698              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15699              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15700$as_echo "$BOOT_JDK_VERSION" >&6; }
15701            fi # end check jdk version
15702          fi # end check rt.jar
15703        fi # end check javac
15704      fi # end check java
15705    fi # end check boot jdk found
15706  fi
15707
15708
15709# If we haven't found anything yet, we've truly lost. Give up.
15710if test "x$BOOT_JDK_FOUND" = xno; then
15711
15712    # Print a helpful message on how to acquire the necessary build dependency.
15713    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15714    MISSING_DEPENDENCY=openjdk
15715    PKGHANDLER_COMMAND=
15716
15717    case $PKGHANDLER in
15718	apt-get)
15719                apt_help     $MISSING_DEPENDENCY ;;
15720    yum)
15721                yum_help     $MISSING_DEPENDENCY ;;
15722	port)
15723                port_help    $MISSING_DEPENDENCY ;;
15724	pkgutil)
15725                pkgutil_help $MISSING_DEPENDENCY ;;
15726	pkgadd)
15727                pkgadd_help  $MISSING_DEPENDENCY ;;
15728    * )
15729      break ;;
15730    esac
15731
15732    if test "x$PKGHANDLER_COMMAND" != x; then
15733        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15734    fi
15735
15736  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15737$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15738  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15739$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15740  as_fn_error $? "Cannot continue" "$LINENO" 5
15741fi
15742
15743# Setup proper paths for what we found
15744BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15745if test ! -f "$BOOT_RTJAR"; then
15746    # On MacOSX it is called classes.jar
15747    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15748    if test -f "$BOOT_RTJAR"; then
15749      # Remove the ..
15750      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15751    fi
15752fi
15753BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15754BOOT_JDK="$BOOT_JDK"
15755
15756
15757
15758
15759# Setup tools from the Boot JDK.
15760
15761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15762$as_echo_n "checking for java in Boot JDK... " >&6; }
15763  JAVA=$BOOT_JDK/bin/java
15764  if test ! -x $JAVA; then
15765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15766$as_echo "not found" >&6; }
15767      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15768$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15769      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15770  fi
15771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15772$as_echo "ok" >&6; }
15773
15774
15775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15776$as_echo_n "checking for javac in Boot JDK... " >&6; }
15777  JAVAC=$BOOT_JDK/bin/javac
15778  if test ! -x $JAVAC; then
15779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15780$as_echo "not found" >&6; }
15781      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15782$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15783      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15784  fi
15785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15786$as_echo "ok" >&6; }
15787
15788
15789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15790$as_echo_n "checking for javah in Boot JDK... " >&6; }
15791  JAVAH=$BOOT_JDK/bin/javah
15792  if test ! -x $JAVAH; then
15793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15794$as_echo "not found" >&6; }
15795      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15796$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15797      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15798  fi
15799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15800$as_echo "ok" >&6; }
15801
15802
15803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15804$as_echo_n "checking for javap in Boot JDK... " >&6; }
15805  JAVAP=$BOOT_JDK/bin/javap
15806  if test ! -x $JAVAP; then
15807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15808$as_echo "not found" >&6; }
15809      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15810$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15811      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15812  fi
15813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15814$as_echo "ok" >&6; }
15815
15816
15817  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15818$as_echo_n "checking for jar in Boot JDK... " >&6; }
15819  JAR=$BOOT_JDK/bin/jar
15820  if test ! -x $JAR; then
15821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15822$as_echo "not found" >&6; }
15823      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15824$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15825      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15826  fi
15827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15828$as_echo "ok" >&6; }
15829
15830
15831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15832$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15833  RMIC=$BOOT_JDK/bin/rmic
15834  if test ! -x $RMIC; then
15835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15836$as_echo "not found" >&6; }
15837      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15838$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15839      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15840  fi
15841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15842$as_echo "ok" >&6; }
15843
15844
15845  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15846$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15847  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15848  if test ! -x $NATIVE2ASCII; then
15849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15850$as_echo "not found" >&6; }
15851      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15852$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15853      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15854  fi
15855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15856$as_echo "ok" >&6; }
15857
15858
15859# Finally, set some other options...
15860
15861# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15862BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15863
15864
15865
15866
15867##############################################################################
15868#
15869# Specify options for anything that is run with the Boot JDK.
15870#
15871
15872# Check whether --with-boot-jdk-jvmargs was given.
15873if test "${with_boot_jdk_jvmargs+set}" = set; then :
15874  withval=$with_boot_jdk_jvmargs;
15875fi
15876
15877
15878if test "x$with_boot_jdk_jvmargs" = x; then
15879    # Not all JVM:s accept the same arguments on the command line.
15880    # OpenJDK specific increase in thread stack for JDK build,
15881    # well more specifically, when running javac.
15882    if test "x$BUILD_NUM_BITS" = x32; then
15883       STACK_SIZE=768
15884    else
15885       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15886       # since 64-bit pointers are pushed on the stach. Apparently, we need
15887       # to increase the stack space when javacing the JDK....
15888       STACK_SIZE=1536
15889    fi
15890
15891    # Minimum amount of heap memory.
15892
15893    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15894    $ECHO "Command: $JAVA -Xms64M -version" >&5
15895    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15896    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15897    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15898    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15899        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15900	JVM_ARG_OK=true
15901    else
15902	$ECHO "Arg failed:" >&5
15903	$ECHO "$OUTPUT" >&5
15904	JVM_ARG_OK=false
15905    fi
15906
15907    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
15908        # Why does macosx need more heap? Its the huge JDK batch.
15909
15910    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15911    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15912    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15913    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15914    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15915    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15916        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15917	JVM_ARG_OK=true
15918    else
15919	$ECHO "Arg failed:" >&5
15920	$ECHO "$OUTPUT" >&5
15921	JVM_ARG_OK=false
15922    fi
15923
15924    else
15925
15926    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15927    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15928    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15929    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15930    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15931    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15932        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15933	JVM_ARG_OK=true
15934    else
15935	$ECHO "Arg failed:" >&5
15936	$ECHO "$OUTPUT" >&5
15937	JVM_ARG_OK=false
15938    fi
15939
15940    fi
15941    # When is adding -client something that speeds up the JVM?
15942    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15943
15944    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15945    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15946    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15947    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15948    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15949    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15950        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15951	JVM_ARG_OK=true
15952    else
15953	$ECHO "Arg failed:" >&5
15954	$ECHO "$OUTPUT" >&5
15955	JVM_ARG_OK=false
15956    fi
15957
15958
15959    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15960    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15961    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15962    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15963    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15964    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15965        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15966	JVM_ARG_OK=true
15967    else
15968	$ECHO "Arg failed:" >&5
15969	$ECHO "$OUTPUT" >&5
15970	JVM_ARG_OK=false
15971    fi
15972
15973
15974    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15975    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15976    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15977    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15978    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15979    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15980        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15981	JVM_ARG_OK=true
15982    else
15983	$ECHO "Arg failed:" >&5
15984	$ECHO "$OUTPUT" >&5
15985	JVM_ARG_OK=false
15986    fi
15987
15988    # Disable special log output when a debug build is used as Boot JDK...
15989
15990    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15991    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15992    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15993    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15994    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15995    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15996        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15997	JVM_ARG_OK=true
15998    else
15999	$ECHO "Arg failed:" >&5
16000	$ECHO "$OUTPUT" >&5
16001	JVM_ARG_OK=false
16002    fi
16003
16004fi
16005
16006BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16007
16008
16009
16010###############################################################################
16011#
16012# Configure the sources to use. We can add or override individual directories.
16013#
16014###############################################################################
16015
16016
16017
16018# Where are the sources. Any of these can be overridden
16019# using --with-override-corba and the likes.
16020LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16021CORBA_TOPDIR="$SRC_ROOT/corba"
16022JAXP_TOPDIR="$SRC_ROOT/jaxp"
16023JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16024HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16025NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16026JDK_TOPDIR="$SRC_ROOT/jdk"
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037###############################################################################
16038#
16039# Pickup additional source for a component from outside of the source root
16040# or override source for a component.
16041#
16042
16043# Check whether --with-add-source-root was given.
16044if test "${with_add_source_root+set}" = set; then :
16045  withval=$with_add_source_root;
16046fi
16047
16048
16049
16050# Check whether --with-override-source-root was given.
16051if test "${with_override_source_root+set}" = set; then :
16052  withval=$with_override_source_root;
16053fi
16054
16055
16056
16057# Check whether --with-adds-and-overrides was given.
16058if test "${with_adds_and_overrides+set}" = set; then :
16059  withval=$with_adds_and_overrides;
16060fi
16061
16062
16063if test "x$with_adds_and_overrides" != x; then
16064    with_add_source_root="$with_adds_and_overrides/adds"
16065    with_override_source_root="$with_adds_and_overrides/overrides"
16066fi
16067
16068if test "x$with_add_source_root" != x; then
16069    if ! test -d $with_add_source_root; then
16070       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16071    fi
16072    CURDIR="$PWD"
16073    cd "$with_add_source_root"
16074    ADD_SRC_ROOT="`pwd`"
16075    cd "$CURDIR"
16076    # Verify that the addon source root does not have any root makefiles.
16077    # If it does, then it is usually an error, prevent this.
16078    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16079       test -f $with_add_source_root/langtools/make/Makefile; then
16080        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
16081    fi
16082    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16083       test -f $with_add_source_root/corba/make/Makefile; then
16084        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
16085    fi
16086    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16087       test -f $with_add_source_root/jaxp/make/Makefile; then
16088        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
16089    fi
16090    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16091       test -f $with_add_source_root/jaxws/make/Makefile; then
16092        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
16093    fi
16094    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16095       test -f $with_add_source_root/hotspot/make/Makefile; then
16096        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
16097    fi
16098    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16099       test -f $with_add_source_root/jdk/make/Makefile; then
16100        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
16101    fi
16102fi
16103
16104
16105if test "x$with_override_source_root" != x; then
16106    if ! test -d $with_override_source_root; then
16107       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16108    fi
16109    CURDIR="$PWD"
16110    cd "$with_override_source_root"
16111    OVERRIDE_SRC_ROOT="`pwd`"
16112    cd "$CURDIR"
16113    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16114       test -f $with_override_source_root/langtools/make/Makefile; then
16115        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
16116    fi
16117    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16118       test -f $with_override_source_root/corba/make/Makefile; then
16119        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
16120    fi
16121    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16122       test -f $with_override_source_root/jaxp/make/Makefile; then
16123        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
16124    fi
16125    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16126       test -f $with_override_source_root/jaxws/make/Makefile; then
16127        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
16128    fi
16129    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16130       test -f $with_override_source_root/hotspot/make/Makefile; then
16131        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
16132    fi
16133    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16134       test -f $with_override_source_root/jdk/make/Makefile; then
16135        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
16136    fi
16137fi
16138
16139
16140###############################################################################
16141#
16142# Override a repo completely, this is used for example when you have 3 small
16143# development sandboxes of the langtools sources and want to avoid having 3 full
16144# OpenJDK sources checked out on disk.
16145#
16146# Assuming that the 3 langtools sandboxes are located here:
16147# /home/fredrik/sandbox1/langtools
16148# /home/fredrik/sandbox2/langtools
16149# /home/fredrik/sandbox3/langtools
16150#
16151# From the source root you create build subdirs manually:
16152#     mkdir -p build1 build2 build3
16153# in each build directory run:
16154#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16155#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16156#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16157#
16158
16159
16160# Check whether --with-override-langtools was given.
16161if test "${with_override_langtools+set}" = set; then :
16162  withval=$with_override_langtools;
16163fi
16164
16165
16166
16167# Check whether --with-override-corba was given.
16168if test "${with_override_corba+set}" = set; then :
16169  withval=$with_override_corba;
16170fi
16171
16172
16173
16174# Check whether --with-override-jaxp was given.
16175if test "${with_override_jaxp+set}" = set; then :
16176  withval=$with_override_jaxp;
16177fi
16178
16179
16180
16181# Check whether --with-override-jaxws was given.
16182if test "${with_override_jaxws+set}" = set; then :
16183  withval=$with_override_jaxws;
16184fi
16185
16186
16187
16188# Check whether --with-override-hotspot was given.
16189if test "${with_override_hotspot+set}" = set; then :
16190  withval=$with_override_hotspot;
16191fi
16192
16193
16194
16195# Check whether --with-override-jdk was given.
16196if test "${with_override_jdk+set}" = set; then :
16197  withval=$with_override_jdk;
16198fi
16199
16200
16201if test "x$with_override_langtools" != x; then
16202    CURDIR="$PWD"
16203    cd "$with_override_langtools"
16204    LANGTOOLS_TOPDIR="`pwd`"
16205    cd "$CURDIR"
16206    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16207        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16208    fi
16209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16210$as_echo_n "checking if langtools should be overridden... " >&6; }
16211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16212$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16213fi
16214if test "x$with_override_corba" != x; then
16215    CURDIR="$PWD"
16216    cd "$with_override_corba"
16217    CORBA_TOPDIR="`pwd`"
16218    cd "$CURDIR"
16219    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16220        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16221    fi
16222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16223$as_echo_n "checking if corba should be overridden... " >&6; }
16224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16225$as_echo "yes with $CORBA_TOPDIR" >&6; }
16226fi
16227if test "x$with_override_jaxp" != x; then
16228    CURDIR="$PWD"
16229    cd "$with_override_jaxp"
16230    JAXP_TOPDIR="`pwd`"
16231    cd "$CURDIR"
16232    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16233        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16234    fi
16235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16236$as_echo_n "checking if jaxp should be overridden... " >&6; }
16237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16238$as_echo "yes with $JAXP_TOPDIR" >&6; }
16239fi
16240if test "x$with_override_jaxws" != x; then
16241    CURDIR="$PWD"
16242    cd "$with_override_jaxws"
16243    JAXWS_TOPDIR="`pwd`"
16244    cd "$CURDIR"
16245    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16246        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16247    fi
16248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16249$as_echo_n "checking if jaxws should be overridden... " >&6; }
16250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16251$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16252fi
16253if test "x$with_override_hotspot" != x; then
16254    CURDIR="$PWD"
16255    cd "$with_override_hotspot"
16256    HOTSPOT_TOPDIR="`pwd`"
16257    cd "$CURDIR"
16258    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16259       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16260        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16261    fi
16262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16263$as_echo_n "checking if hotspot should be overridden... " >&6; }
16264    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16265$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16266fi
16267if test "x$with_override_nashorn" != x; then
16268    CURDIR="$PWD"
16269    cd "$with_override_nashorn"
16270    NASHORN_TOPDIR="`pwd`"
16271    cd "$CURDIR"
16272    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16273        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16274    fi
16275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16276$as_echo_n "checking if nashorn should be overridden... " >&6; }
16277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16278$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16279fi
16280if test "x$with_override_jdk" != x; then
16281    CURDIR="$PWD"
16282    cd "$with_override_jdk"
16283    JDK_TOPDIR="`pwd`"
16284    cd "$CURDIR"
16285    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16286        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16287    fi
16288    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16289$as_echo_n "checking if JDK should be overridden... " >&6; }
16290    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16291$as_echo "yes with $JDK_TOPDIR" >&6; }
16292fi
16293
16294
16295
16296BUILD_OUTPUT="$OUTPUT_ROOT"
16297
16298
16299HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16300BUILD_HOTSPOT=true
16301
16302
16303
16304# Check whether --with-import-hotspot was given.
16305if test "${with_import_hotspot+set}" = set; then :
16306  withval=$with_import_hotspot;
16307fi
16308
16309if test "x$with_import_hotspot" != x; then
16310    CURDIR="$PWD"
16311    cd "$with_import_hotspot"
16312    HOTSPOT_DIST="`pwd`"
16313    cd "$CURDIR"
16314    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16315        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16316    fi
16317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16318$as_echo_n "checking if hotspot should be imported... " >&6; }
16319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16320$as_echo "yes from $HOTSPOT_DIST" >&6; }
16321    BUILD_HOTSPOT=false
16322fi
16323
16324JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16325
16326
16327###############################################################################
16328#
16329# Setup the toolchain (compilers etc), i.e. the tools that need to be
16330# cross-compilation aware.
16331#
16332###############################################################################
16333
16334
16335###############################################################################
16336#
16337# Configure the development tool paths and potential sysroot.
16338#
16339ac_ext=cpp
16340ac_cpp='$CXXCPP $CPPFLAGS'
16341ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16342ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16343ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16344
16345
16346# The option used to specify the target .o,.a or .so file.
16347# When compiling, how to specify the to be created object file.
16348CC_OUT_OPTION='-o$(SPACE)'
16349# When linking, how to specify the to be created executable.
16350EXE_OUT_OPTION='-o$(SPACE)'
16351# When linking, how to specify the to be created dynamically linkable library.
16352LD_OUT_OPTION='-o$(SPACE)'
16353# When archiving, how to specify the to be create static archive for object files.
16354AR_OUT_OPTION='rcs$(SPACE)'
16355
16356
16357
16358
16359
16360# Locate the actual tools
16361
16362
16363# Check whether --with-jtreg was given.
16364if test "${with_jtreg+set}" = set; then :
16365  withval=$with_jtreg;
16366else
16367  with_jtreg=no
16368fi
16369
16370
16371  if test "x$with_jtreg" = xno; then
16372    # jtreg disabled
16373    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16374$as_echo_n "checking for jtreg... " >&6; }
16375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16376$as_echo "no" >&6; }
16377  else
16378    if test "x$with_jtreg" != xyes; then
16379      # with path specified.
16380      JT_HOME="$with_jtreg"
16381    fi
16382
16383    if test "x$JT_HOME" != x; then
16384      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16385$as_echo_n "checking for jtreg... " >&6; }
16386
16387      # use JT_HOME enviroment var.
16388
16389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16390
16391  # Input might be given as Windows format, start by converting to
16392  # unix format.
16393  path="$JT_HOME"
16394  new_path=`$CYGPATH -u "$path"`
16395
16396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16399  # "foo.exe" is OK but "foo" is an error.
16400  #
16401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16402  # It is also a way to make sure we got the proper file name for the real test later on.
16403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16404  if test "x$test_shortpath" = x; then
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16406$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16407    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16408  fi
16409
16410  # Call helper function which possibly converts this using DOS-style short mode.
16411  # If so, the updated path is stored in $new_path.
16412
16413  input_path="$new_path"
16414  # Check if we need to convert this using DOS-style short mode. If the path
16415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16416  # take no chances and rewrite it.
16417  # Note: m4 eats our [], so we need to use [ and ] instead.
16418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16419  if test "x$has_forbidden_chars" != x; then
16420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16424      # Going to short mode and back again did indeed matter. Since short mode is
16425      # case insensitive, let's make it lowercase to improve readability.
16426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16427      # Now convert it back to Unix-stile (cygpath)
16428      input_path=`$CYGPATH -u "$shortmode_path"`
16429      new_path="$input_path"
16430    fi
16431  fi
16432
16433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16434  if test "x$test_cygdrive_prefix" = x; then
16435    # As a simple fix, exclude /usr/bin since it's not a real path.
16436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16438      # a path prefixed by /cygdrive for fixpath to work.
16439      new_path="$CYGWIN_ROOT_PATH$input_path"
16440    fi
16441  fi
16442
16443
16444  if test "x$path" != "x$new_path"; then
16445    JT_HOME="$new_path"
16446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16447$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16448  fi
16449
16450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16451
16452  path="$JT_HOME"
16453  has_colon=`$ECHO $path | $GREP ^.:`
16454  new_path="$path"
16455  if test "x$has_colon" = x; then
16456    # Not in mixed or Windows style, start by that.
16457    new_path=`cmd //c echo $path`
16458  fi
16459
16460
16461  input_path="$new_path"
16462  # Check if we need to convert this using DOS-style short mode. If the path
16463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16464  # take no chances and rewrite it.
16465  # Note: m4 eats our [], so we need to use [ and ] instead.
16466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16467  if test "x$has_forbidden_chars" != x; then
16468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16470  fi
16471
16472
16473  windows_path="$new_path"
16474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16475    unix_path=`$CYGPATH -u "$windows_path"`
16476    new_path="$unix_path"
16477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16479    new_path="$unix_path"
16480  fi
16481
16482  if test "x$path" != "x$new_path"; then
16483    JT_HOME="$new_path"
16484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16485$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16486  fi
16487
16488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16490
16491  else
16492    # We're on a posix platform. Hooray! :)
16493    path="$JT_HOME"
16494    has_space=`$ECHO "$path" | $GREP " "`
16495    if test "x$has_space" != x; then
16496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16497$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16498      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16499    fi
16500
16501    # Use eval to expand a potential ~
16502    eval path="$path"
16503    if test ! -f "$path" && test ! -d "$path"; then
16504      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16505    fi
16506
16507    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16508  fi
16509
16510
16511      # jtreg win32 script works for everybody
16512      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16513
16514      if test ! -f "$JTREGEXE"; then
16515        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16516      fi
16517
16518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16519$as_echo "$JTREGEXE" >&6; }
16520    else
16521      # try to find jtreg on path
16522
16523    for ac_prog in jtreg
16524do
16525  # Extract the first word of "$ac_prog", so it can be a program name with args.
16526set dummy $ac_prog; ac_word=$2
16527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16528$as_echo_n "checking for $ac_word... " >&6; }
16529if test "${ac_cv_path_JTREGEXE+set}" = set; then :
16530  $as_echo_n "(cached) " >&6
16531else
16532  case $JTREGEXE in
16533  [\\/]* | ?:[\\/]*)
16534  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16535  ;;
16536  *)
16537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16538for as_dir in $PATH
16539do
16540  IFS=$as_save_IFS
16541  test -z "$as_dir" && as_dir=.
16542    for ac_exec_ext in '' $ac_executable_extensions; do
16543  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16544    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16546    break 2
16547  fi
16548done
16549  done
16550IFS=$as_save_IFS
16551
16552  ;;
16553esac
16554fi
16555JTREGEXE=$ac_cv_path_JTREGEXE
16556if test -n "$JTREGEXE"; then
16557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16558$as_echo "$JTREGEXE" >&6; }
16559else
16560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16561$as_echo "no" >&6; }
16562fi
16563
16564
16565  test -n "$JTREGEXE" && break
16566done
16567
16568
16569    if test "x$JTREGEXE" = x; then
16570        if test "xjtreg" = x; then
16571          PROG_NAME=jtregexe
16572        else
16573          PROG_NAME=jtreg
16574        fi
16575        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16576$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16577        as_fn_error $? "Cannot continue" "$LINENO" 5
16578    fi
16579
16580
16581      JT_HOME="`$DIRNAME $JTREGEXE`"
16582    fi
16583  fi
16584
16585
16586
16587
16588
16589if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16590
16591  # Store path to cygwin link.exe to help excluding it when searching for
16592  # VS linker. This must be done before changing the PATH when looking for VS.
16593  # Extract the first word of "link", so it can be a program name with args.
16594set dummy link; ac_word=$2
16595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16596$as_echo_n "checking for $ac_word... " >&6; }
16597if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16598  $as_echo_n "(cached) " >&6
16599else
16600  case $CYGWIN_LINK in
16601  [\\/]* | ?:[\\/]*)
16602  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16603  ;;
16604  *)
16605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16606for as_dir in $PATH
16607do
16608  IFS=$as_save_IFS
16609  test -z "$as_dir" && as_dir=.
16610    for ac_exec_ext in '' $ac_executable_extensions; do
16611  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16612    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16614    break 2
16615  fi
16616done
16617  done
16618IFS=$as_save_IFS
16619
16620  ;;
16621esac
16622fi
16623CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16624if test -n "$CYGWIN_LINK"; then
16625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16626$as_echo "$CYGWIN_LINK" >&6; }
16627else
16628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16629$as_echo "no" >&6; }
16630fi
16631
16632
16633  if test "x$CYGWIN_LINK" != x; then
16634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16635$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16636    "$CYGWIN_LINK" --version > /dev/null
16637    if test $? -eq 0 ; then
16638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16639$as_echo "yes" >&6; }
16640    else
16641      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16642$as_echo "no" >&6; }
16643      # This might be the VS linker. Don't exclude it later on.
16644      CYGWIN_LINK=""
16645    fi
16646  fi
16647
16648  # First-hand choice is to locate and run the vsvars bat file.
16649
16650  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16651    VCVARSFILE="vc/bin/vcvars32.bat"
16652  else
16653    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16654  fi
16655
16656  VS_ENV_CMD=""
16657  VS_ENV_ARGS=""
16658  if test "x$with_toolsdir" != x; then
16659
16660  if test "x$VS_ENV_CMD" = x; then
16661    VS100BASE="$with_toolsdir/../.."
16662    METHOD="--with-tools-dir"
16663
16664  windows_path="$VS100BASE"
16665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16666    unix_path=`$CYGPATH -u "$windows_path"`
16667    VS100BASE="$unix_path"
16668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16670    VS100BASE="$unix_path"
16671  fi
16672
16673    if test -d "$VS100BASE"; then
16674      if test -f "$VS100BASE/$VCVARSFILE"; then
16675        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16676$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16677        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16678      else
16679        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16680$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16681        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16682$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16683      fi
16684    fi
16685  fi
16686
16687  fi
16688
16689  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16690    # Having specified an argument which is incorrect will produce an instant failure;
16691    # we should not go on looking
16692    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16693$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16694    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16695$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16696    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16697  fi
16698
16699  if test "x$VS100COMNTOOLS" != x; then
16700
16701  if test "x$VS_ENV_CMD" = x; then
16702    VS100BASE="$VS100COMNTOOLS/../.."
16703    METHOD="VS100COMNTOOLS variable"
16704
16705  windows_path="$VS100BASE"
16706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16707    unix_path=`$CYGPATH -u "$windows_path"`
16708    VS100BASE="$unix_path"
16709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16711    VS100BASE="$unix_path"
16712  fi
16713
16714    if test -d "$VS100BASE"; then
16715      if test -f "$VS100BASE/$VCVARSFILE"; then
16716        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16717$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16718        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16719      else
16720        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16721$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16722        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16723$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16724      fi
16725    fi
16726  fi
16727
16728  fi
16729  if test "x$PROGRAMFILES" != x; then
16730
16731  if test "x$VS_ENV_CMD" = x; then
16732    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16733    METHOD="well-known name"
16734
16735  windows_path="$VS100BASE"
16736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16737    unix_path=`$CYGPATH -u "$windows_path"`
16738    VS100BASE="$unix_path"
16739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16741    VS100BASE="$unix_path"
16742  fi
16743
16744    if test -d "$VS100BASE"; then
16745      if test -f "$VS100BASE/$VCVARSFILE"; then
16746        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16747$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16748        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16749      else
16750        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16751$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16752        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16753$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16754      fi
16755    fi
16756  fi
16757
16758  fi
16759
16760  if test "x$VS_ENV_CMD" = x; then
16761    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16762    METHOD="well-known name"
16763
16764  windows_path="$VS100BASE"
16765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16766    unix_path=`$CYGPATH -u "$windows_path"`
16767    VS100BASE="$unix_path"
16768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16770    VS100BASE="$unix_path"
16771  fi
16772
16773    if test -d "$VS100BASE"; then
16774      if test -f "$VS100BASE/$VCVARSFILE"; then
16775        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16776$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16777        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16778      else
16779        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16780$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16781        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16782$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16783      fi
16784    fi
16785  fi
16786
16787
16788  if test "x$VS_ENV_CMD" = x; then
16789    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16790    METHOD="well-known name"
16791
16792  windows_path="$VS100BASE"
16793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16794    unix_path=`$CYGPATH -u "$windows_path"`
16795    VS100BASE="$unix_path"
16796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16798    VS100BASE="$unix_path"
16799  fi
16800
16801    if test -d "$VS100BASE"; then
16802      if test -f "$VS100BASE/$VCVARSFILE"; then
16803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16804$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16805        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16806      else
16807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16808$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16809        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16810$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16811      fi
16812    fi
16813  fi
16814
16815
16816  if test "x$ProgramW6432" != x; then
16817
16818  if test "x$VS_ENV_CMD" = x; then
16819    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16820    METHOD="well-known name"
16821
16822  windows_path="$WIN_SDK_BASE"
16823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16824    unix_path=`$CYGPATH -u "$windows_path"`
16825    WIN_SDK_BASE="$unix_path"
16826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16828    WIN_SDK_BASE="$unix_path"
16829  fi
16830
16831    if test -d "$WIN_SDK_BASE"; then
16832      # There have been cases of partial or broken SDK installations. A missing
16833      # lib dir is not going to work.
16834      if test ! -d "$WIN_SDK_BASE/../lib"; then
16835        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16836$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16837        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16838$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16839      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16840        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16841$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16842        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16843        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16844          VS_ENV_ARGS="/x86"
16845        else
16846          VS_ENV_ARGS="/x64"
16847        fi
16848      else
16849        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16850$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16851        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16852$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16853      fi
16854    fi
16855  fi
16856
16857  fi
16858  if test "x$PROGRAMW6432" != x; then
16859
16860  if test "x$VS_ENV_CMD" = x; then
16861    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16862    METHOD="well-known name"
16863
16864  windows_path="$WIN_SDK_BASE"
16865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16866    unix_path=`$CYGPATH -u "$windows_path"`
16867    WIN_SDK_BASE="$unix_path"
16868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16870    WIN_SDK_BASE="$unix_path"
16871  fi
16872
16873    if test -d "$WIN_SDK_BASE"; then
16874      # There have been cases of partial or broken SDK installations. A missing
16875      # lib dir is not going to work.
16876      if test ! -d "$WIN_SDK_BASE/../lib"; then
16877        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16878$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16879        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16880$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16881      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16882        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16883$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16884        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16885        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16886          VS_ENV_ARGS="/x86"
16887        else
16888          VS_ENV_ARGS="/x64"
16889        fi
16890      else
16891        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16892$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16893        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16894$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16895      fi
16896    fi
16897  fi
16898
16899  fi
16900  if test "x$PROGRAMFILES" != x; then
16901
16902  if test "x$VS_ENV_CMD" = x; then
16903    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16904    METHOD="well-known name"
16905
16906  windows_path="$WIN_SDK_BASE"
16907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16908    unix_path=`$CYGPATH -u "$windows_path"`
16909    WIN_SDK_BASE="$unix_path"
16910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16912    WIN_SDK_BASE="$unix_path"
16913  fi
16914
16915    if test -d "$WIN_SDK_BASE"; then
16916      # There have been cases of partial or broken SDK installations. A missing
16917      # lib dir is not going to work.
16918      if test ! -d "$WIN_SDK_BASE/../lib"; then
16919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16920$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16921        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16922$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16923      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16924        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16925$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16926        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16927        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16928          VS_ENV_ARGS="/x86"
16929        else
16930          VS_ENV_ARGS="/x64"
16931        fi
16932      else
16933        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16934$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16935        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16936$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16937      fi
16938    fi
16939  fi
16940
16941  fi
16942
16943  if test "x$VS_ENV_CMD" = x; then
16944    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16945    METHOD="well-known name"
16946
16947  windows_path="$WIN_SDK_BASE"
16948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16949    unix_path=`$CYGPATH -u "$windows_path"`
16950    WIN_SDK_BASE="$unix_path"
16951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16953    WIN_SDK_BASE="$unix_path"
16954  fi
16955
16956    if test -d "$WIN_SDK_BASE"; then
16957      # There have been cases of partial or broken SDK installations. A missing
16958      # lib dir is not going to work.
16959      if test ! -d "$WIN_SDK_BASE/../lib"; then
16960        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16961$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16962        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16963$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16964      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16966$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16967        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16968        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16969          VS_ENV_ARGS="/x86"
16970        else
16971          VS_ENV_ARGS="/x64"
16972        fi
16973      else
16974        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16975$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16976        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16977$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16978      fi
16979    fi
16980  fi
16981
16982
16983  if test "x$VS_ENV_CMD" = x; then
16984    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16985    METHOD="well-known name"
16986
16987  windows_path="$WIN_SDK_BASE"
16988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16989    unix_path=`$CYGPATH -u "$windows_path"`
16990    WIN_SDK_BASE="$unix_path"
16991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16993    WIN_SDK_BASE="$unix_path"
16994  fi
16995
16996    if test -d "$WIN_SDK_BASE"; then
16997      # There have been cases of partial or broken SDK installations. A missing
16998      # lib dir is not going to work.
16999      if test ! -d "$WIN_SDK_BASE/../lib"; then
17000        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17001$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17002        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17003$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17004      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17005        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17006$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17007        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17008        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17009          VS_ENV_ARGS="/x86"
17010        else
17011          VS_ENV_ARGS="/x64"
17012        fi
17013      else
17014        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17015$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17016        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17017$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17018      fi
17019    fi
17020  fi
17021
17022
17023  if test "x$VS_ENV_CMD" != x; then
17024    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17025
17026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17027
17028  # First separate the path from the arguments. This will split at the first
17029  # space.
17030  complete="$VS_ENV_CMD"
17031  path="${complete%% *}"
17032  tmp="$complete EOL"
17033  arguments="${tmp#* }"
17034
17035  # Input might be given as Windows format, start by converting to
17036  # unix format.
17037  new_path=`$CYGPATH -u "$path"`
17038
17039  # Now try to locate executable using which
17040  new_path=`$WHICH "$new_path" 2> /dev/null`
17041  # bat and cmd files are not always considered executable in cygwin causing which
17042  # to not find them
17043  if test "x$new_path" = x \
17044           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17045           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17046    new_path=`$CYGPATH -u "$path"`
17047  fi
17048  if test "x$new_path" = x; then
17049    # Oops. Which didn't find the executable.
17050    # The splitting of arguments from the executable at a space might have been incorrect,
17051    # since paths with space are more likely in Windows. Give it another try with the whole
17052    # argument.
17053    path="$complete"
17054    arguments="EOL"
17055    new_path=`$CYGPATH -u "$path"`
17056    new_path=`$WHICH "$new_path" 2> /dev/null`
17057    # bat and cmd files are not always considered executable in cygwin causing which
17058    # to not find them
17059    if test "x$new_path" = x \
17060             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17061             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17062      new_path=`$CYGPATH -u "$path"`
17063    fi
17064    if test "x$new_path" = x; then
17065      # It's still not found. Now this is an unrecoverable error.
17066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17067$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17068      has_space=`$ECHO "$complete" | $GREP " "`
17069      if test "x$has_space" != x; then
17070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17072      fi
17073      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17074    fi
17075  fi
17076
17077  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17078  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17079  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17080  # "foo.exe" is OK but "foo" is an error.
17081  #
17082  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17083  # It is also a way to make sure we got the proper file name for the real test later on.
17084  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17085  if test "x$test_shortpath" = x; then
17086    # Short path failed, file does not exist as specified.
17087    # Try adding .exe or .cmd
17088    if test -f "${new_path}.exe"; then
17089       input_to_shortpath="${new_path}.exe"
17090    elif test -f "${new_path}.cmd"; then
17091       input_to_shortpath="${new_path}.cmd"
17092    else
17093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17094$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17095      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17096$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17097      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17098    fi
17099  else
17100    input_to_shortpath="$new_path"
17101  fi
17102
17103  # Call helper function which possibly converts this using DOS-style short mode.
17104  # If so, the updated path is stored in $new_path.
17105  new_path="$input_to_shortpath"
17106
17107  input_path="$input_to_shortpath"
17108  # Check if we need to convert this using DOS-style short mode. If the path
17109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17110  # take no chances and rewrite it.
17111  # Note: m4 eats our [], so we need to use [ and ] instead.
17112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17113  if test "x$has_forbidden_chars" != x; then
17114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17118      # Going to short mode and back again did indeed matter. Since short mode is
17119      # case insensitive, let's make it lowercase to improve readability.
17120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17121      # Now convert it back to Unix-stile (cygpath)
17122      input_path=`$CYGPATH -u "$shortmode_path"`
17123      new_path="$input_path"
17124    fi
17125  fi
17126
17127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17128  if test "x$test_cygdrive_prefix" = x; then
17129    # As a simple fix, exclude /usr/bin since it's not a real path.
17130    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17132      # a path prefixed by /cygdrive for fixpath to work.
17133      new_path="$CYGWIN_ROOT_PATH$input_path"
17134    fi
17135  fi
17136
17137  # remove trailing .exe if any
17138  new_path="${new_path/%.exe/}"
17139
17140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17141
17142  # First separate the path from the arguments. This will split at the first
17143  # space.
17144  complete="$VS_ENV_CMD"
17145  path="${complete%% *}"
17146  tmp="$complete EOL"
17147  arguments="${tmp#* }"
17148
17149  # Input might be given as Windows format, start by converting to
17150  # unix format.
17151  new_path="$path"
17152
17153  windows_path="$new_path"
17154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17155    unix_path=`$CYGPATH -u "$windows_path"`
17156    new_path="$unix_path"
17157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17159    new_path="$unix_path"
17160  fi
17161
17162
17163  # Now try to locate executable using which
17164  new_path=`$WHICH "$new_path" 2> /dev/null`
17165
17166  if test "x$new_path" = x; then
17167    # Oops. Which didn't find the executable.
17168    # The splitting of arguments from the executable at a space might have been incorrect,
17169    # since paths with space are more likely in Windows. Give it another try with the whole
17170    # argument.
17171    path="$complete"
17172    arguments="EOL"
17173    new_path="$path"
17174
17175  windows_path="$new_path"
17176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17177    unix_path=`$CYGPATH -u "$windows_path"`
17178    new_path="$unix_path"
17179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17181    new_path="$unix_path"
17182  fi
17183
17184
17185    new_path=`$WHICH "$new_path" 2> /dev/null`
17186
17187    if test "x$new_path" = x; then
17188      # It's still not found. Now this is an unrecoverable error.
17189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17190$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17191      has_space=`$ECHO "$complete" | $GREP " "`
17192      if test "x$has_space" != x; then
17193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17195      fi
17196      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17197    fi
17198  fi
17199
17200  # Now new_path has a complete unix path to the binary
17201  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17202    # Keep paths in /bin as-is, but remove trailing .exe if any
17203    new_path="${new_path/%.exe/}"
17204    # Do not save /bin paths to all_fixpath_prefixes!
17205  else
17206    # Not in mixed or Windows style, start by that.
17207    new_path=`cmd //c echo $new_path`
17208
17209  input_path="$new_path"
17210  # Check if we need to convert this using DOS-style short mode. If the path
17211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17212  # take no chances and rewrite it.
17213  # Note: m4 eats our [], so we need to use [ and ] instead.
17214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17215  if test "x$has_forbidden_chars" != x; then
17216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17218  fi
17219
17220    # Output is in $new_path
17221
17222  windows_path="$new_path"
17223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17224    unix_path=`$CYGPATH -u "$windows_path"`
17225    new_path="$unix_path"
17226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17228    new_path="$unix_path"
17229  fi
17230
17231    # remove trailing .exe if any
17232    new_path="${new_path/%.exe/}"
17233
17234    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17235    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17236  fi
17237
17238  else
17239    # We're on a posix platform. Hooray! :)
17240    # First separate the path from the arguments. This will split at the first
17241    # space.
17242    complete="$VS_ENV_CMD"
17243    path="${complete%% *}"
17244    tmp="$complete EOL"
17245    arguments="${tmp#* }"
17246
17247    # Cannot rely on the command "which" here since it doesn't always work.
17248    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17249    if test -z "$is_absolute_path"; then
17250      # Path to executable is not absolute. Find it.
17251      IFS_save="$IFS"
17252      IFS=:
17253      for p in $PATH; do
17254        if test -f "$p/$path" && test -x "$p/$path"; then
17255          new_path="$p/$path"
17256          break
17257        fi
17258      done
17259      IFS="$IFS_save"
17260    else
17261      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17262$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17263      new_path="$path"
17264    fi
17265
17266    if test "x$new_path" = x; then
17267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17268$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17269        has_space=`$ECHO "$complete" | $GREP " "`
17270        if test "x$has_space" != x; then
17271          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17272$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17273        fi
17274        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17275      fi
17276  fi
17277
17278      # Now join together the path and the arguments once again
17279      if test "x$arguments" != xEOL; then
17280        new_complete="$new_path ${arguments% *}"
17281      else
17282        new_complete="$new_path"
17283      fi
17284
17285  if test "x$complete" != "x$new_complete"; then
17286      VS_ENV_CMD="$new_complete"
17287      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17288$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17289    fi
17290
17291
17292    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17293    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17294$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17295    cd $OUTPUT_ROOT
17296    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17297    # to autoconf standards.
17298
17299    #----
17300
17301    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17302    # but calculate the difference in Cygwin environment before/after running it and then
17303    # apply the diff.
17304
17305    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17306      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17307      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17308      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17309    else
17310      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17311      _dosbash=`cmd //c echo \`which bash\``
17312    fi
17313
17314    # generate the set of exported vars before/after the vs10 setup
17315    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17316    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17317    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17318    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17319
17320    # Now execute the newly created bat file.
17321    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17322    cmd /c localdevenvtmp.bat | cat
17323
17324    # apply the diff (less some non-vs10 vars named by "!")
17325    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17326    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17327    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17328
17329    # cleanup
17330    $RM localdevenvtmp*
17331    #----
17332    cd $CURDIR
17333    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17335$as_echo "no" >&6; }
17336      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17337$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17338      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17339$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17340      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17341$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17342      as_fn_error $? "Cannot continue" "$LINENO" 5
17343    fi
17344
17345    # Now set all paths and other env variables. This will allow the rest of
17346    # the configure script to find and run the compiler in the proper way.
17347    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17348$as_echo "$as_me: Setting extracted environment variables" >&6;}
17349    . $OUTPUT_ROOT/localdevenv.sh
17350  else
17351    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17352    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17353$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17354  fi
17355
17356  # At this point, we should have corrent variables in the environment, or we can't continue.
17357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17358$as_echo_n "checking for Visual Studio variables... " >&6; }
17359
17360  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17361    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17362      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17363$as_echo "present but broken" >&6; }
17364      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17365    else
17366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17367$as_echo "ok" >&6; }
17368      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17369      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17370      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17371      # Remove any paths containing # (typically F#) as that messes up make
17372      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17373      VS_PATH="$PATH"
17374
17375
17376
17377    fi
17378  else
17379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17380$as_echo "not found" >&6; }
17381
17382    if test "x$VS_ENV_CMD" = x; then
17383      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17384$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17385      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17386$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17387    else
17388      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17389$as_echo "$as_me: Running the extraction script failed." >&6;}
17390    fi
17391    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17392$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17393    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17394$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17395    as_fn_error $? "Cannot continue" "$LINENO" 5
17396  fi
17397
17398  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17399$as_echo_n "checking for msvcr100.dll... " >&6; }
17400
17401# Check whether --with-msvcr-dll was given.
17402if test "${with_msvcr_dll+set}" = set; then :
17403  withval=$with_msvcr_dll;
17404fi
17405
17406  if test "x$with_msvcr_dll" != x; then
17407    MSVCR_DLL="$with_msvcr_dll"
17408  else
17409    if test "x$VCINSTALLDIR" != x; then
17410      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17411        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17412      else
17413        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17414        if test "x$MSVCR_DLL" = x; then
17415          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17416        fi
17417      fi
17418      if test "x$MSVCR_DLL" != x; then
17419        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17420$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17421      else
17422        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17423$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17424      fi
17425    fi
17426    # Try some fallback alternatives
17427    if test "x$MSVCR_DLL" = x; then
17428      # If visual studio express is installed, there is usually one with the debugger
17429      if test "x$VS100COMNTOOLS" != x; then
17430        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17431          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17432          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17433$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17434        fi
17435      fi
17436    fi
17437    if test "x$MSVCR_DLL" = x; then
17438      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17439        # Fallback for 32bit builds, look in the windows directory.
17440        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17441          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17442$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17443          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17444        fi
17445      fi
17446    fi
17447  fi
17448  if test "x$MSVCR_DLL" = x; then
17449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17450$as_echo "no" >&6; }
17451    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17452  fi
17453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17454$as_echo "$MSVCR_DLL" >&6; }
17455
17456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17457
17458  # Input might be given as Windows format, start by converting to
17459  # unix format.
17460  path="$MSVCR_DLL"
17461  new_path=`$CYGPATH -u "$path"`
17462
17463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17466  # "foo.exe" is OK but "foo" is an error.
17467  #
17468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17469  # It is also a way to make sure we got the proper file name for the real test later on.
17470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17471  if test "x$test_shortpath" = x; then
17472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17473$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17474    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17475  fi
17476
17477  # Call helper function which possibly converts this using DOS-style short mode.
17478  # If so, the updated path is stored in $new_path.
17479
17480  input_path="$new_path"
17481  # Check if we need to convert this using DOS-style short mode. If the path
17482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17483  # take no chances and rewrite it.
17484  # Note: m4 eats our [], so we need to use [ and ] instead.
17485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17486  if test "x$has_forbidden_chars" != x; then
17487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17491      # Going to short mode and back again did indeed matter. Since short mode is
17492      # case insensitive, let's make it lowercase to improve readability.
17493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17494      # Now convert it back to Unix-stile (cygpath)
17495      input_path=`$CYGPATH -u "$shortmode_path"`
17496      new_path="$input_path"
17497    fi
17498  fi
17499
17500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17501  if test "x$test_cygdrive_prefix" = x; then
17502    # As a simple fix, exclude /usr/bin since it's not a real path.
17503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17505      # a path prefixed by /cygdrive for fixpath to work.
17506      new_path="$CYGWIN_ROOT_PATH$input_path"
17507    fi
17508  fi
17509
17510
17511  if test "x$path" != "x$new_path"; then
17512    MSVCR_DLL="$new_path"
17513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17514$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17515  fi
17516
17517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17518
17519  path="$MSVCR_DLL"
17520  has_colon=`$ECHO $path | $GREP ^.:`
17521  new_path="$path"
17522  if test "x$has_colon" = x; then
17523    # Not in mixed or Windows style, start by that.
17524    new_path=`cmd //c echo $path`
17525  fi
17526
17527
17528  input_path="$new_path"
17529  # Check if we need to convert this using DOS-style short mode. If the path
17530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17531  # take no chances and rewrite it.
17532  # Note: m4 eats our [], so we need to use [ and ] instead.
17533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17534  if test "x$has_forbidden_chars" != x; then
17535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17537  fi
17538
17539
17540  windows_path="$new_path"
17541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17542    unix_path=`$CYGPATH -u "$windows_path"`
17543    new_path="$unix_path"
17544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17546    new_path="$unix_path"
17547  fi
17548
17549  if test "x$path" != "x$new_path"; then
17550    MSVCR_DLL="$new_path"
17551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17552$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17553  fi
17554
17555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17557
17558  else
17559    # We're on a posix platform. Hooray! :)
17560    path="$MSVCR_DLL"
17561    has_space=`$ECHO "$path" | $GREP " "`
17562    if test "x$has_space" != x; then
17563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17564$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17565      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17566    fi
17567
17568    # Use eval to expand a potential ~
17569    eval path="$path"
17570    if test ! -f "$path" && test ! -d "$path"; then
17571      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17572    fi
17573
17574    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17575  fi
17576
17577
17578
17579
17580# Check whether --with-dxsdk was given.
17581if test "${with_dxsdk+set}" = set; then :
17582  withval=$with_dxsdk;
17583fi
17584
17585
17586# Check whether --with-dxsdk-lib was given.
17587if test "${with_dxsdk_lib+set}" = set; then :
17588  withval=$with_dxsdk_lib;
17589fi
17590
17591
17592# Check whether --with-dxsdk-include was given.
17593if test "${with_dxsdk_include+set}" = set; then :
17594  withval=$with_dxsdk_include;
17595fi
17596
17597
17598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17599$as_echo_n "checking for DirectX SDK... " >&6; }
17600
17601  if test "x$with_dxsdk" != x; then
17602    dxsdk_path="$with_dxsdk"
17603  elif test "x$DXSDK_DIR" != x; then
17604    dxsdk_path="$DXSDK_DIR"
17605  elif test -d "C:/DXSDK"; then
17606    dxsdk_path="C:/DXSDK"
17607  else
17608    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17609  fi
17610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17611$as_echo "$dxsdk_path" >&6; }
17612
17613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17614
17615  # Input might be given as Windows format, start by converting to
17616  # unix format.
17617  path="$dxsdk_path"
17618  new_path=`$CYGPATH -u "$path"`
17619
17620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17623  # "foo.exe" is OK but "foo" is an error.
17624  #
17625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17626  # It is also a way to make sure we got the proper file name for the real test later on.
17627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17628  if test "x$test_shortpath" = x; then
17629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17630$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17631    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17632  fi
17633
17634  # Call helper function which possibly converts this using DOS-style short mode.
17635  # If so, the updated path is stored in $new_path.
17636
17637  input_path="$new_path"
17638  # Check if we need to convert this using DOS-style short mode. If the path
17639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17640  # take no chances and rewrite it.
17641  # Note: m4 eats our [], so we need to use [ and ] instead.
17642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17643  if test "x$has_forbidden_chars" != x; then
17644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17648      # Going to short mode and back again did indeed matter. Since short mode is
17649      # case insensitive, let's make it lowercase to improve readability.
17650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17651      # Now convert it back to Unix-stile (cygpath)
17652      input_path=`$CYGPATH -u "$shortmode_path"`
17653      new_path="$input_path"
17654    fi
17655  fi
17656
17657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17658  if test "x$test_cygdrive_prefix" = x; then
17659    # As a simple fix, exclude /usr/bin since it's not a real path.
17660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17662      # a path prefixed by /cygdrive for fixpath to work.
17663      new_path="$CYGWIN_ROOT_PATH$input_path"
17664    fi
17665  fi
17666
17667
17668  if test "x$path" != "x$new_path"; then
17669    dxsdk_path="$new_path"
17670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17671$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17672  fi
17673
17674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17675
17676  path="$dxsdk_path"
17677  has_colon=`$ECHO $path | $GREP ^.:`
17678  new_path="$path"
17679  if test "x$has_colon" = x; then
17680    # Not in mixed or Windows style, start by that.
17681    new_path=`cmd //c echo $path`
17682  fi
17683
17684
17685  input_path="$new_path"
17686  # Check if we need to convert this using DOS-style short mode. If the path
17687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17688  # take no chances and rewrite it.
17689  # Note: m4 eats our [], so we need to use [ and ] instead.
17690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17691  if test "x$has_forbidden_chars" != x; then
17692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17694  fi
17695
17696
17697  windows_path="$new_path"
17698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17699    unix_path=`$CYGPATH -u "$windows_path"`
17700    new_path="$unix_path"
17701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17703    new_path="$unix_path"
17704  fi
17705
17706  if test "x$path" != "x$new_path"; then
17707    dxsdk_path="$new_path"
17708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17709$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17710  fi
17711
17712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17714
17715  else
17716    # We're on a posix platform. Hooray! :)
17717    path="$dxsdk_path"
17718    has_space=`$ECHO "$path" | $GREP " "`
17719    if test "x$has_space" != x; then
17720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17721$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17722      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17723    fi
17724
17725    # Use eval to expand a potential ~
17726    eval path="$path"
17727    if test ! -f "$path" && test ! -d "$path"; then
17728      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17729    fi
17730
17731    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17732  fi
17733
17734
17735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17736$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17737  if test "x$with_dxsdk_lib" != x; then
17738    DXSDK_LIB_PATH="$with_dxsdk_lib"
17739  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17740    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17741  else
17742    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17743  fi
17744  # dsound.lib is linked to in jsoundds
17745  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17746    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17747  fi
17748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17749$as_echo "$DXSDK_LIB_PATH" >&6; }
17750
17751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17752
17753  # Input might be given as Windows format, start by converting to
17754  # unix format.
17755  path="$DXSDK_LIB_PATH"
17756  new_path=`$CYGPATH -u "$path"`
17757
17758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17761  # "foo.exe" is OK but "foo" is an error.
17762  #
17763  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17764  # It is also a way to make sure we got the proper file name for the real test later on.
17765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17766  if test "x$test_shortpath" = x; then
17767    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17768$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17769    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17770  fi
17771
17772  # Call helper function which possibly converts this using DOS-style short mode.
17773  # If so, the updated path is stored in $new_path.
17774
17775  input_path="$new_path"
17776  # Check if we need to convert this using DOS-style short mode. If the path
17777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17778  # take no chances and rewrite it.
17779  # Note: m4 eats our [], so we need to use [ and ] instead.
17780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17781  if test "x$has_forbidden_chars" != x; then
17782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17786      # Going to short mode and back again did indeed matter. Since short mode is
17787      # case insensitive, let's make it lowercase to improve readability.
17788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17789      # Now convert it back to Unix-stile (cygpath)
17790      input_path=`$CYGPATH -u "$shortmode_path"`
17791      new_path="$input_path"
17792    fi
17793  fi
17794
17795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17796  if test "x$test_cygdrive_prefix" = x; then
17797    # As a simple fix, exclude /usr/bin since it's not a real path.
17798    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17800      # a path prefixed by /cygdrive for fixpath to work.
17801      new_path="$CYGWIN_ROOT_PATH$input_path"
17802    fi
17803  fi
17804
17805
17806  if test "x$path" != "x$new_path"; then
17807    DXSDK_LIB_PATH="$new_path"
17808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17809$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17810  fi
17811
17812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17813
17814  path="$DXSDK_LIB_PATH"
17815  has_colon=`$ECHO $path | $GREP ^.:`
17816  new_path="$path"
17817  if test "x$has_colon" = x; then
17818    # Not in mixed or Windows style, start by that.
17819    new_path=`cmd //c echo $path`
17820  fi
17821
17822
17823  input_path="$new_path"
17824  # Check if we need to convert this using DOS-style short mode. If the path
17825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17826  # take no chances and rewrite it.
17827  # Note: m4 eats our [], so we need to use [ and ] instead.
17828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17829  if test "x$has_forbidden_chars" != x; then
17830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17832  fi
17833
17834
17835  windows_path="$new_path"
17836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17837    unix_path=`$CYGPATH -u "$windows_path"`
17838    new_path="$unix_path"
17839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17841    new_path="$unix_path"
17842  fi
17843
17844  if test "x$path" != "x$new_path"; then
17845    DXSDK_LIB_PATH="$new_path"
17846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17847$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17848  fi
17849
17850  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17851  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17852
17853  else
17854    # We're on a posix platform. Hooray! :)
17855    path="$DXSDK_LIB_PATH"
17856    has_space=`$ECHO "$path" | $GREP " "`
17857    if test "x$has_space" != x; then
17858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17859$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17860      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17861    fi
17862
17863    # Use eval to expand a potential ~
17864    eval path="$path"
17865    if test ! -f "$path" && test ! -d "$path"; then
17866      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17867    fi
17868
17869    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17870  fi
17871
17872
17873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17874$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17875  if test "x$with_dxsdk_include" != x; then
17876    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17877  else
17878    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17879  fi
17880  # dsound.h is included in jsoundds
17881  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17882    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17883  fi
17884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17885$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17886
17887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17888
17889  # Input might be given as Windows format, start by converting to
17890  # unix format.
17891  path="$DXSDK_INCLUDE_PATH"
17892  new_path=`$CYGPATH -u "$path"`
17893
17894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17897  # "foo.exe" is OK but "foo" is an error.
17898  #
17899  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17900  # It is also a way to make sure we got the proper file name for the real test later on.
17901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17902  if test "x$test_shortpath" = x; then
17903    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17904$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17905    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17906  fi
17907
17908  # Call helper function which possibly converts this using DOS-style short mode.
17909  # If so, the updated path is stored in $new_path.
17910
17911  input_path="$new_path"
17912  # Check if we need to convert this using DOS-style short mode. If the path
17913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17914  # take no chances and rewrite it.
17915  # Note: m4 eats our [], so we need to use [ and ] instead.
17916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17917  if test "x$has_forbidden_chars" != x; then
17918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17922      # Going to short mode and back again did indeed matter. Since short mode is
17923      # case insensitive, let's make it lowercase to improve readability.
17924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17925      # Now convert it back to Unix-stile (cygpath)
17926      input_path=`$CYGPATH -u "$shortmode_path"`
17927      new_path="$input_path"
17928    fi
17929  fi
17930
17931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17932  if test "x$test_cygdrive_prefix" = x; then
17933    # As a simple fix, exclude /usr/bin since it's not a real path.
17934    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17936      # a path prefixed by /cygdrive for fixpath to work.
17937      new_path="$CYGWIN_ROOT_PATH$input_path"
17938    fi
17939  fi
17940
17941
17942  if test "x$path" != "x$new_path"; then
17943    DXSDK_INCLUDE_PATH="$new_path"
17944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17945$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17946  fi
17947
17948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17949
17950  path="$DXSDK_INCLUDE_PATH"
17951  has_colon=`$ECHO $path | $GREP ^.:`
17952  new_path="$path"
17953  if test "x$has_colon" = x; then
17954    # Not in mixed or Windows style, start by that.
17955    new_path=`cmd //c echo $path`
17956  fi
17957
17958
17959  input_path="$new_path"
17960  # Check if we need to convert this using DOS-style short mode. If the path
17961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17962  # take no chances and rewrite it.
17963  # Note: m4 eats our [], so we need to use [ and ] instead.
17964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17965  if test "x$has_forbidden_chars" != x; then
17966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17968  fi
17969
17970
17971  windows_path="$new_path"
17972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17973    unix_path=`$CYGPATH -u "$windows_path"`
17974    new_path="$unix_path"
17975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17977    new_path="$unix_path"
17978  fi
17979
17980  if test "x$path" != "x$new_path"; then
17981    DXSDK_INCLUDE_PATH="$new_path"
17982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17983$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17984  fi
17985
17986  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17987  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17988
17989  else
17990    # We're on a posix platform. Hooray! :)
17991    path="$DXSDK_INCLUDE_PATH"
17992    has_space=`$ECHO "$path" | $GREP " "`
17993    if test "x$has_space" != x; then
17994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17995$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17996      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17997    fi
17998
17999    # Use eval to expand a potential ~
18000    eval path="$path"
18001    if test ! -f "$path" && test ! -d "$path"; then
18002      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
18003    fi
18004
18005    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
18006  fi
18007
18008
18009
18010
18011  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
18012
18013fi
18014
18015
18016
18017# If --build AND --host is set, then the configure script will find any
18018# cross compilation tools in the PATH. Cross compilation tools
18019# follows the cross compilation standard where they are prefixed with ${host}.
18020# For example the binary i686-sun-solaris2.10-gcc
18021# will cross compile for i686-sun-solaris2.10
18022# If neither of build and host is not set, then build=host and the
18023# default compiler found in the path will be used.
18024# Setting only --host, does not seem to be really supported.
18025# Please set both --build and --host if you want to cross compile.
18026
18027if test "x$COMPILE_TYPE" = "xcross"; then
18028    # Now we to find a C/C++ compiler that can build executables for the build
18029    # platform. We can't use the AC_PROG_CC macro, since it can only be used
18030    # once. Also, we need to do this before adding a tools dir to the path,
18031    # otherwise we might pick up cross-compilers which don't use standard naming.
18032    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18033    # to wait until they are properly discovered.
18034    for ac_prog in cl cc gcc
18035do
18036  # Extract the first word of "$ac_prog", so it can be a program name with args.
18037set dummy $ac_prog; ac_word=$2
18038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18039$as_echo_n "checking for $ac_word... " >&6; }
18040if test "${ac_cv_path_BUILD_CC+set}" = set; then :
18041  $as_echo_n "(cached) " >&6
18042else
18043  case $BUILD_CC in
18044  [\\/]* | ?:[\\/]*)
18045  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18046  ;;
18047  *)
18048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18049for as_dir in $PATH
18050do
18051  IFS=$as_save_IFS
18052  test -z "$as_dir" && as_dir=.
18053    for ac_exec_ext in '' $ac_executable_extensions; do
18054  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18055    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18057    break 2
18058  fi
18059done
18060  done
18061IFS=$as_save_IFS
18062
18063  ;;
18064esac
18065fi
18066BUILD_CC=$ac_cv_path_BUILD_CC
18067if test -n "$BUILD_CC"; then
18068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18069$as_echo "$BUILD_CC" >&6; }
18070else
18071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18072$as_echo "no" >&6; }
18073fi
18074
18075
18076  test -n "$BUILD_CC" && break
18077done
18078
18079
18080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18081
18082  # First separate the path from the arguments. This will split at the first
18083  # space.
18084  complete="$BUILD_CC"
18085  path="${complete%% *}"
18086  tmp="$complete EOL"
18087  arguments="${tmp#* }"
18088
18089  # Input might be given as Windows format, start by converting to
18090  # unix format.
18091  new_path=`$CYGPATH -u "$path"`
18092
18093  # Now try to locate executable using which
18094  new_path=`$WHICH "$new_path" 2> /dev/null`
18095  # bat and cmd files are not always considered executable in cygwin causing which
18096  # to not find them
18097  if test "x$new_path" = x \
18098           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18099           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18100    new_path=`$CYGPATH -u "$path"`
18101  fi
18102  if test "x$new_path" = x; then
18103    # Oops. Which didn't find the executable.
18104    # The splitting of arguments from the executable at a space might have been incorrect,
18105    # since paths with space are more likely in Windows. Give it another try with the whole
18106    # argument.
18107    path="$complete"
18108    arguments="EOL"
18109    new_path=`$CYGPATH -u "$path"`
18110    new_path=`$WHICH "$new_path" 2> /dev/null`
18111    # bat and cmd files are not always considered executable in cygwin causing which
18112    # to not find them
18113    if test "x$new_path" = x \
18114             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18115             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18116      new_path=`$CYGPATH -u "$path"`
18117    fi
18118    if test "x$new_path" = x; then
18119      # It's still not found. Now this is an unrecoverable error.
18120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18121$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18122      has_space=`$ECHO "$complete" | $GREP " "`
18123      if test "x$has_space" != x; then
18124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18126      fi
18127      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18128    fi
18129  fi
18130
18131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18134  # "foo.exe" is OK but "foo" is an error.
18135  #
18136  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18137  # It is also a way to make sure we got the proper file name for the real test later on.
18138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18139  if test "x$test_shortpath" = x; then
18140    # Short path failed, file does not exist as specified.
18141    # Try adding .exe or .cmd
18142    if test -f "${new_path}.exe"; then
18143       input_to_shortpath="${new_path}.exe"
18144    elif test -f "${new_path}.cmd"; then
18145       input_to_shortpath="${new_path}.cmd"
18146    else
18147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18148$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18149      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18150$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18151      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18152    fi
18153  else
18154    input_to_shortpath="$new_path"
18155  fi
18156
18157  # Call helper function which possibly converts this using DOS-style short mode.
18158  # If so, the updated path is stored in $new_path.
18159  new_path="$input_to_shortpath"
18160
18161  input_path="$input_to_shortpath"
18162  # Check if we need to convert this using DOS-style short mode. If the path
18163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18164  # take no chances and rewrite it.
18165  # Note: m4 eats our [], so we need to use [ and ] instead.
18166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18167  if test "x$has_forbidden_chars" != x; then
18168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18172      # Going to short mode and back again did indeed matter. Since short mode is
18173      # case insensitive, let's make it lowercase to improve readability.
18174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18175      # Now convert it back to Unix-stile (cygpath)
18176      input_path=`$CYGPATH -u "$shortmode_path"`
18177      new_path="$input_path"
18178    fi
18179  fi
18180
18181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18182  if test "x$test_cygdrive_prefix" = x; then
18183    # As a simple fix, exclude /usr/bin since it's not a real path.
18184    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18186      # a path prefixed by /cygdrive for fixpath to work.
18187      new_path="$CYGWIN_ROOT_PATH$input_path"
18188    fi
18189  fi
18190
18191  # remove trailing .exe if any
18192  new_path="${new_path/%.exe/}"
18193
18194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18195
18196  # First separate the path from the arguments. This will split at the first
18197  # space.
18198  complete="$BUILD_CC"
18199  path="${complete%% *}"
18200  tmp="$complete EOL"
18201  arguments="${tmp#* }"
18202
18203  # Input might be given as Windows format, start by converting to
18204  # unix format.
18205  new_path="$path"
18206
18207  windows_path="$new_path"
18208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18209    unix_path=`$CYGPATH -u "$windows_path"`
18210    new_path="$unix_path"
18211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18213    new_path="$unix_path"
18214  fi
18215
18216
18217  # Now try to locate executable using which
18218  new_path=`$WHICH "$new_path" 2> /dev/null`
18219
18220  if test "x$new_path" = x; then
18221    # Oops. Which didn't find the executable.
18222    # The splitting of arguments from the executable at a space might have been incorrect,
18223    # since paths with space are more likely in Windows. Give it another try with the whole
18224    # argument.
18225    path="$complete"
18226    arguments="EOL"
18227    new_path="$path"
18228
18229  windows_path="$new_path"
18230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18231    unix_path=`$CYGPATH -u "$windows_path"`
18232    new_path="$unix_path"
18233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18235    new_path="$unix_path"
18236  fi
18237
18238
18239    new_path=`$WHICH "$new_path" 2> /dev/null`
18240
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_CC, which resolves as \"$complete\", is not found." >&5
18244$as_echo "$as_me: The path of BUILD_CC, 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_CC" "$LINENO" 5
18251    fi
18252  fi
18253
18254  # Now new_path has a complete unix path to the binary
18255  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18256    # Keep paths in /bin as-is, but remove trailing .exe if any
18257    new_path="${new_path/%.exe/}"
18258    # Do not save /bin paths to all_fixpath_prefixes!
18259  else
18260    # Not in mixed or Windows style, start by that.
18261    new_path=`cmd //c echo $new_path`
18262
18263  input_path="$new_path"
18264  # Check if we need to convert this using DOS-style short mode. If the path
18265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18266  # take no chances and rewrite it.
18267  # Note: m4 eats our [], so we need to use [ and ] instead.
18268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18269  if test "x$has_forbidden_chars" != x; then
18270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18272  fi
18273
18274    # Output is in $new_path
18275
18276  windows_path="$new_path"
18277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18278    unix_path=`$CYGPATH -u "$windows_path"`
18279    new_path="$unix_path"
18280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18282    new_path="$unix_path"
18283  fi
18284
18285    # remove trailing .exe if any
18286    new_path="${new_path/%.exe/}"
18287
18288    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18289    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18290  fi
18291
18292  else
18293    # We're on a posix platform. Hooray! :)
18294    # First separate the path from the arguments. This will split at the first
18295    # space.
18296    complete="$BUILD_CC"
18297    path="${complete%% *}"
18298    tmp="$complete EOL"
18299    arguments="${tmp#* }"
18300
18301    # Cannot rely on the command "which" here since it doesn't always work.
18302    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18303    if test -z "$is_absolute_path"; then
18304      # Path to executable is not absolute. Find it.
18305      IFS_save="$IFS"
18306      IFS=:
18307      for p in $PATH; do
18308        if test -f "$p/$path" && test -x "$p/$path"; then
18309          new_path="$p/$path"
18310          break
18311        fi
18312      done
18313      IFS="$IFS_save"
18314    else
18315      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18316$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18317      new_path="$path"
18318    fi
18319
18320    if test "x$new_path" = x; then
18321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18322$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18323        has_space=`$ECHO "$complete" | $GREP " "`
18324        if test "x$has_space" != x; then
18325          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18326$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18327        fi
18328        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18329      fi
18330  fi
18331
18332      # Now join together the path and the arguments once again
18333      if test "x$arguments" != xEOL; then
18334        new_complete="$new_path ${arguments% *}"
18335      else
18336        new_complete="$new_path"
18337      fi
18338
18339  if test "x$complete" != "x$new_complete"; then
18340      BUILD_CC="$new_complete"
18341      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18342$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18343    fi
18344
18345    for ac_prog in cl CC g++
18346do
18347  # Extract the first word of "$ac_prog", so it can be a program name with args.
18348set dummy $ac_prog; ac_word=$2
18349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18350$as_echo_n "checking for $ac_word... " >&6; }
18351if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18352  $as_echo_n "(cached) " >&6
18353else
18354  case $BUILD_CXX in
18355  [\\/]* | ?:[\\/]*)
18356  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18357  ;;
18358  *)
18359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18360for as_dir in $PATH
18361do
18362  IFS=$as_save_IFS
18363  test -z "$as_dir" && as_dir=.
18364    for ac_exec_ext in '' $ac_executable_extensions; do
18365  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18366    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18368    break 2
18369  fi
18370done
18371  done
18372IFS=$as_save_IFS
18373
18374  ;;
18375esac
18376fi
18377BUILD_CXX=$ac_cv_path_BUILD_CXX
18378if test -n "$BUILD_CXX"; then
18379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18380$as_echo "$BUILD_CXX" >&6; }
18381else
18382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18383$as_echo "no" >&6; }
18384fi
18385
18386
18387  test -n "$BUILD_CXX" && break
18388done
18389
18390
18391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18392
18393  # First separate the path from the arguments. This will split at the first
18394  # space.
18395  complete="$BUILD_CXX"
18396  path="${complete%% *}"
18397  tmp="$complete EOL"
18398  arguments="${tmp#* }"
18399
18400  # Input might be given as Windows format, start by converting to
18401  # unix format.
18402  new_path=`$CYGPATH -u "$path"`
18403
18404  # Now try to locate executable using which
18405  new_path=`$WHICH "$new_path" 2> /dev/null`
18406  # bat and cmd files are not always considered executable in cygwin causing which
18407  # to not find them
18408  if test "x$new_path" = x \
18409           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18410           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18411    new_path=`$CYGPATH -u "$path"`
18412  fi
18413  if test "x$new_path" = x; then
18414    # Oops. Which didn't find the executable.
18415    # The splitting of arguments from the executable at a space might have been incorrect,
18416    # since paths with space are more likely in Windows. Give it another try with the whole
18417    # argument.
18418    path="$complete"
18419    arguments="EOL"
18420    new_path=`$CYGPATH -u "$path"`
18421    new_path=`$WHICH "$new_path" 2> /dev/null`
18422    # bat and cmd files are not always considered executable in cygwin causing which
18423    # to not find them
18424    if test "x$new_path" = x \
18425             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18426             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18427      new_path=`$CYGPATH -u "$path"`
18428    fi
18429    if test "x$new_path" = x; then
18430      # It's still not found. Now this is an unrecoverable error.
18431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18432$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18433      has_space=`$ECHO "$complete" | $GREP " "`
18434      if test "x$has_space" != x; then
18435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18437      fi
18438      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18439    fi
18440  fi
18441
18442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18445  # "foo.exe" is OK but "foo" is an error.
18446  #
18447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18448  # It is also a way to make sure we got the proper file name for the real test later on.
18449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18450  if test "x$test_shortpath" = x; then
18451    # Short path failed, file does not exist as specified.
18452    # Try adding .exe or .cmd
18453    if test -f "${new_path}.exe"; then
18454       input_to_shortpath="${new_path}.exe"
18455    elif test -f "${new_path}.cmd"; then
18456       input_to_shortpath="${new_path}.cmd"
18457    else
18458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18459$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18460      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18461$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18462      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18463    fi
18464  else
18465    input_to_shortpath="$new_path"
18466  fi
18467
18468  # Call helper function which possibly converts this using DOS-style short mode.
18469  # If so, the updated path is stored in $new_path.
18470  new_path="$input_to_shortpath"
18471
18472  input_path="$input_to_shortpath"
18473  # Check if we need to convert this using DOS-style short mode. If the path
18474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18475  # take no chances and rewrite it.
18476  # Note: m4 eats our [], so we need to use [ and ] instead.
18477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18478  if test "x$has_forbidden_chars" != x; then
18479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18480    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18481    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18482    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18483      # Going to short mode and back again did indeed matter. Since short mode is
18484      # case insensitive, let's make it lowercase to improve readability.
18485      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18486      # Now convert it back to Unix-stile (cygpath)
18487      input_path=`$CYGPATH -u "$shortmode_path"`
18488      new_path="$input_path"
18489    fi
18490  fi
18491
18492  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18493  if test "x$test_cygdrive_prefix" = x; then
18494    # As a simple fix, exclude /usr/bin since it's not a real path.
18495    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18496      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18497      # a path prefixed by /cygdrive for fixpath to work.
18498      new_path="$CYGWIN_ROOT_PATH$input_path"
18499    fi
18500  fi
18501
18502  # remove trailing .exe if any
18503  new_path="${new_path/%.exe/}"
18504
18505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18506
18507  # First separate the path from the arguments. This will split at the first
18508  # space.
18509  complete="$BUILD_CXX"
18510  path="${complete%% *}"
18511  tmp="$complete EOL"
18512  arguments="${tmp#* }"
18513
18514  # Input might be given as Windows format, start by converting to
18515  # unix format.
18516  new_path="$path"
18517
18518  windows_path="$new_path"
18519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18520    unix_path=`$CYGPATH -u "$windows_path"`
18521    new_path="$unix_path"
18522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18524    new_path="$unix_path"
18525  fi
18526
18527
18528  # Now try to locate executable using which
18529  new_path=`$WHICH "$new_path" 2> /dev/null`
18530
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="$path"
18539
18540  windows_path="$new_path"
18541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18542    unix_path=`$CYGPATH -u "$windows_path"`
18543    new_path="$unix_path"
18544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18546    new_path="$unix_path"
18547  fi
18548
18549
18550    new_path=`$WHICH "$new_path" 2> /dev/null`
18551
18552    if test "x$new_path" = x; then
18553      # It's still not found. Now this is an unrecoverable error.
18554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18555$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18556      has_space=`$ECHO "$complete" | $GREP " "`
18557      if test "x$has_space" != x; then
18558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18560      fi
18561      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18562    fi
18563  fi
18564
18565  # Now new_path has a complete unix path to the binary
18566  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18567    # Keep paths in /bin as-is, but remove trailing .exe if any
18568    new_path="${new_path/%.exe/}"
18569    # Do not save /bin paths to all_fixpath_prefixes!
18570  else
18571    # Not in mixed or Windows style, start by that.
18572    new_path=`cmd //c echo $new_path`
18573
18574  input_path="$new_path"
18575  # Check if we need to convert this using DOS-style short mode. If the path
18576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18577  # take no chances and rewrite it.
18578  # Note: m4 eats our [], so we need to use [ and ] instead.
18579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18580  if test "x$has_forbidden_chars" != x; then
18581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18583  fi
18584
18585    # Output is in $new_path
18586
18587  windows_path="$new_path"
18588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18589    unix_path=`$CYGPATH -u "$windows_path"`
18590    new_path="$unix_path"
18591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18593    new_path="$unix_path"
18594  fi
18595
18596    # remove trailing .exe if any
18597    new_path="${new_path/%.exe/}"
18598
18599    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18600    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18601  fi
18602
18603  else
18604    # We're on a posix platform. Hooray! :)
18605    # First separate the path from the arguments. This will split at the first
18606    # space.
18607    complete="$BUILD_CXX"
18608    path="${complete%% *}"
18609    tmp="$complete EOL"
18610    arguments="${tmp#* }"
18611
18612    # Cannot rely on the command "which" here since it doesn't always work.
18613    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18614    if test -z "$is_absolute_path"; then
18615      # Path to executable is not absolute. Find it.
18616      IFS_save="$IFS"
18617      IFS=:
18618      for p in $PATH; do
18619        if test -f "$p/$path" && test -x "$p/$path"; then
18620          new_path="$p/$path"
18621          break
18622        fi
18623      done
18624      IFS="$IFS_save"
18625    else
18626      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18627$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18628      new_path="$path"
18629    fi
18630
18631    if test "x$new_path" = x; then
18632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18633$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18634        has_space=`$ECHO "$complete" | $GREP " "`
18635        if test "x$has_space" != x; then
18636          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18637$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18638        fi
18639        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18640      fi
18641  fi
18642
18643      # Now join together the path and the arguments once again
18644      if test "x$arguments" != xEOL; then
18645        new_complete="$new_path ${arguments% *}"
18646      else
18647        new_complete="$new_path"
18648      fi
18649
18650  if test "x$complete" != "x$new_complete"; then
18651      BUILD_CXX="$new_complete"
18652      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18653$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18654    fi
18655
18656    # Extract the first word of "ld", so it can be a program name with args.
18657set dummy ld; ac_word=$2
18658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18659$as_echo_n "checking for $ac_word... " >&6; }
18660if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18661  $as_echo_n "(cached) " >&6
18662else
18663  case $BUILD_LD in
18664  [\\/]* | ?:[\\/]*)
18665  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18666  ;;
18667  *)
18668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18669for as_dir in $PATH
18670do
18671  IFS=$as_save_IFS
18672  test -z "$as_dir" && as_dir=.
18673    for ac_exec_ext in '' $ac_executable_extensions; do
18674  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18675    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18677    break 2
18678  fi
18679done
18680  done
18681IFS=$as_save_IFS
18682
18683  ;;
18684esac
18685fi
18686BUILD_LD=$ac_cv_path_BUILD_LD
18687if test -n "$BUILD_LD"; then
18688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18689$as_echo "$BUILD_LD" >&6; }
18690else
18691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18692$as_echo "no" >&6; }
18693fi
18694
18695
18696
18697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18698
18699  # First separate the path from the arguments. This will split at the first
18700  # space.
18701  complete="$BUILD_LD"
18702  path="${complete%% *}"
18703  tmp="$complete EOL"
18704  arguments="${tmp#* }"
18705
18706  # Input might be given as Windows format, start by converting to
18707  # unix format.
18708  new_path=`$CYGPATH -u "$path"`
18709
18710  # Now try to locate executable using which
18711  new_path=`$WHICH "$new_path" 2> /dev/null`
18712  # bat and cmd files are not always considered executable in cygwin causing which
18713  # to not find them
18714  if test "x$new_path" = x \
18715           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18716           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18717    new_path=`$CYGPATH -u "$path"`
18718  fi
18719  if test "x$new_path" = x; then
18720    # Oops. Which didn't find the executable.
18721    # The splitting of arguments from the executable at a space might have been incorrect,
18722    # since paths with space are more likely in Windows. Give it another try with the whole
18723    # argument.
18724    path="$complete"
18725    arguments="EOL"
18726    new_path=`$CYGPATH -u "$path"`
18727    new_path=`$WHICH "$new_path" 2> /dev/null`
18728    # bat and cmd files are not always considered executable in cygwin causing which
18729    # to not find them
18730    if test "x$new_path" = x \
18731             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18732             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18733      new_path=`$CYGPATH -u "$path"`
18734    fi
18735    if test "x$new_path" = x; then
18736      # It's still not found. Now this is an unrecoverable error.
18737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18738$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18739      has_space=`$ECHO "$complete" | $GREP " "`
18740      if test "x$has_space" != x; then
18741        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18742$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18743      fi
18744      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18745    fi
18746  fi
18747
18748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18751  # "foo.exe" is OK but "foo" is an error.
18752  #
18753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18754  # It is also a way to make sure we got the proper file name for the real test later on.
18755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18756  if test "x$test_shortpath" = x; then
18757    # Short path failed, file does not exist as specified.
18758    # Try adding .exe or .cmd
18759    if test -f "${new_path}.exe"; then
18760       input_to_shortpath="${new_path}.exe"
18761    elif test -f "${new_path}.cmd"; then
18762       input_to_shortpath="${new_path}.cmd"
18763    else
18764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18765$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18766      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18767$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18768      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18769    fi
18770  else
18771    input_to_shortpath="$new_path"
18772  fi
18773
18774  # Call helper function which possibly converts this using DOS-style short mode.
18775  # If so, the updated path is stored in $new_path.
18776  new_path="$input_to_shortpath"
18777
18778  input_path="$input_to_shortpath"
18779  # Check if we need to convert this using DOS-style short mode. If the path
18780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18781  # take no chances and rewrite it.
18782  # Note: m4 eats our [], so we need to use [ and ] instead.
18783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18784  if test "x$has_forbidden_chars" != x; then
18785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18789      # Going to short mode and back again did indeed matter. Since short mode is
18790      # case insensitive, let's make it lowercase to improve readability.
18791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18792      # Now convert it back to Unix-stile (cygpath)
18793      input_path=`$CYGPATH -u "$shortmode_path"`
18794      new_path="$input_path"
18795    fi
18796  fi
18797
18798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18799  if test "x$test_cygdrive_prefix" = x; then
18800    # As a simple fix, exclude /usr/bin since it's not a real path.
18801    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18803      # a path prefixed by /cygdrive for fixpath to work.
18804      new_path="$CYGWIN_ROOT_PATH$input_path"
18805    fi
18806  fi
18807
18808  # remove trailing .exe if any
18809  new_path="${new_path/%.exe/}"
18810
18811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18812
18813  # First separate the path from the arguments. This will split at the first
18814  # space.
18815  complete="$BUILD_LD"
18816  path="${complete%% *}"
18817  tmp="$complete EOL"
18818  arguments="${tmp#* }"
18819
18820  # Input might be given as Windows format, start by converting to
18821  # unix format.
18822  new_path="$path"
18823
18824  windows_path="$new_path"
18825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18826    unix_path=`$CYGPATH -u "$windows_path"`
18827    new_path="$unix_path"
18828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18830    new_path="$unix_path"
18831  fi
18832
18833
18834  # Now try to locate executable using which
18835  new_path=`$WHICH "$new_path" 2> /dev/null`
18836
18837  if test "x$new_path" = x; then
18838    # Oops. Which didn't find the executable.
18839    # The splitting of arguments from the executable at a space might have been incorrect,
18840    # since paths with space are more likely in Windows. Give it another try with the whole
18841    # argument.
18842    path="$complete"
18843    arguments="EOL"
18844    new_path="$path"
18845
18846  windows_path="$new_path"
18847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18848    unix_path=`$CYGPATH -u "$windows_path"`
18849    new_path="$unix_path"
18850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18852    new_path="$unix_path"
18853  fi
18854
18855
18856    new_path=`$WHICH "$new_path" 2> /dev/null`
18857
18858    if test "x$new_path" = x; then
18859      # It's still not found. Now this is an unrecoverable error.
18860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18861$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18862      has_space=`$ECHO "$complete" | $GREP " "`
18863      if test "x$has_space" != x; then
18864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18866      fi
18867      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18868    fi
18869  fi
18870
18871  # Now new_path has a complete unix path to the binary
18872  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18873    # Keep paths in /bin as-is, but remove trailing .exe if any
18874    new_path="${new_path/%.exe/}"
18875    # Do not save /bin paths to all_fixpath_prefixes!
18876  else
18877    # Not in mixed or Windows style, start by that.
18878    new_path=`cmd //c echo $new_path`
18879
18880  input_path="$new_path"
18881  # Check if we need to convert this using DOS-style short mode. If the path
18882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18883  # take no chances and rewrite it.
18884  # Note: m4 eats our [], so we need to use [ and ] instead.
18885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18886  if test "x$has_forbidden_chars" != x; then
18887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18889  fi
18890
18891    # Output is in $new_path
18892
18893  windows_path="$new_path"
18894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18895    unix_path=`$CYGPATH -u "$windows_path"`
18896    new_path="$unix_path"
18897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18899    new_path="$unix_path"
18900  fi
18901
18902    # remove trailing .exe if any
18903    new_path="${new_path/%.exe/}"
18904
18905    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18906    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18907  fi
18908
18909  else
18910    # We're on a posix platform. Hooray! :)
18911    # First separate the path from the arguments. This will split at the first
18912    # space.
18913    complete="$BUILD_LD"
18914    path="${complete%% *}"
18915    tmp="$complete EOL"
18916    arguments="${tmp#* }"
18917
18918    # Cannot rely on the command "which" here since it doesn't always work.
18919    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18920    if test -z "$is_absolute_path"; then
18921      # Path to executable is not absolute. Find it.
18922      IFS_save="$IFS"
18923      IFS=:
18924      for p in $PATH; do
18925        if test -f "$p/$path" && test -x "$p/$path"; then
18926          new_path="$p/$path"
18927          break
18928        fi
18929      done
18930      IFS="$IFS_save"
18931    else
18932      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18933$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18934      new_path="$path"
18935    fi
18936
18937    if test "x$new_path" = x; then
18938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18939$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18940        has_space=`$ECHO "$complete" | $GREP " "`
18941        if test "x$has_space" != x; then
18942          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18943$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18944        fi
18945        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18946      fi
18947  fi
18948
18949      # Now join together the path and the arguments once again
18950      if test "x$arguments" != xEOL; then
18951        new_complete="$new_path ${arguments% *}"
18952      else
18953        new_complete="$new_path"
18954      fi
18955
18956  if test "x$complete" != "x$new_complete"; then
18957      BUILD_LD="$new_complete"
18958      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18959$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18960    fi
18961
18962fi
18963
18964
18965
18966
18967# If a devkit is found on the builddeps server, then prepend its path to the
18968# PATH variable. If there are cross compilers available in the devkit, these
18969# will be found by AC_PROG_CC et al.
18970DEVKIT=
18971
18972
18973    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18974        # Source the builddeps file again, to make sure it uses the latest variables!
18975        . $builddepsfile
18976        # Look for a target and build machine specific resource!
18977        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18978        if test "x$resource" = x; then
18979            # Ok, lets instead look for a target specific resource
18980            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18981        fi
18982        if test "x$resource" = x; then
18983            # Ok, lets instead look for a build specific resource
18984            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18985        fi
18986        if test "x$resource" = x; then
18987            # Ok, lets instead look for a generic resource
18988            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18989            resource=${builddep_devkit}
18990        fi
18991        if test "x$resource" != x; then
18992            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18993$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18994	    # If the resource in the builddeps.conf file is an existing directory,
18995	    # for example /java/linux/cups
18996	    if test -d ${resource}; then
18997	       depdir=${resource}
18998	    else
18999
19000# devkit is for example mymodule
19001# $resource is for example libs/general/libmymod_1_2_3.zip
19002# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19003# $with_builddeps_dir is for example /localhome/builddeps
19004# depdir is the name of the variable into which we store the depdir, eg MYMOD
19005# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19006# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19007    filename=`basename $resource`
19008    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19009    filebase=${filename%%.*}
19010    extension=${filename#*.}
19011    installdir=$with_builddeps_dir/$filebase
19012    if test ! -f $installdir/$filename.unpacked; then
19013        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19014$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19015        if test ! -d $installdir; then
19016            mkdir -p $installdir
19017        fi
19018        if test ! -d $installdir; then
19019            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19020        fi
19021        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19022        touch $tmpfile
19023        if test ! -f $tmpfile; then
19024            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19025        fi
19026
19027    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19028    # $tmpfile is the local file name for the downloaded file.
19029    VALID_TOOL=no
19030    if test "x$BDEPS_FTP" = xwget; then
19031       VALID_TOOL=yes
19032       wget -O $tmpfile $with_builddeps_server/$resource
19033    fi
19034    if test "x$BDEPS_FTP" = xlftp; then
19035       VALID_TOOL=yes
19036       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19037    fi
19038    if test "x$BDEPS_FTP" = xftp; then
19039        VALID_TOOL=yes
19040        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19041        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19042        FTPUSERPWD=${FTPSERVER%%@*}
19043        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19044            FTPUSER=${userpwd%%:*}
19045            FTPPWD=${userpwd#*@}
19046            FTPSERVER=${FTPSERVER#*@}
19047        else
19048            FTPUSER=ftp
19049            FTPPWD=ftp
19050        fi
19051        # the "pass" command does not work on some
19052        # ftp clients (read ftp.exe) but if it works,
19053        # passive mode is better!
19054        (\
19055            echo "user $FTPUSER $FTPPWD"        ;\
19056            echo "pass"                         ;\
19057            echo "bin"                          ;\
19058            echo "get $FTPPATH $tmpfile"              ;\
19059        ) | ftp -in $FTPSERVER
19060    fi
19061    if test "x$VALID_TOOL" != xyes; then
19062       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19063    fi
19064
19065        mv $tmpfile $installdir/$filename
19066        if test ! -s $installdir/$filename; then
19067            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19068        fi
19069        case "$extension" in
19070            zip)  echo "Unzipping $installdir/$filename..."
19071               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19072            ;;
19073            tar.gz) echo "Untaring $installdir/$filename..."
19074               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19075            ;;
19076            tgz) echo "Untaring $installdir/$filename..."
19077               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19078            ;;
19079            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19080            ;;
19081        esac
19082    fi
19083    if test -f $installdir/$filename.unpacked; then
19084        depdir=$installdir
19085    fi
19086
19087	    fi
19088            # Source the builddeps file again, because in the previous command, the depdir
19089            # was updated to point at the current build dependency install directory.
19090            . $builddepsfile
19091            # Now extract variables from the builddeps.conf files.
19092            theroot=${builddep_devkit_ROOT}
19093            thecflags=${builddep_devkit_CFLAGS}
19094            thelibs=${builddep_devkit_LIBS}
19095            if test "x$depdir" = x; then
19096                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19097            fi
19098            DEVKIT=$depdir
19099            if test "x$theroot" != x; then
19100               DEVKIT="$theroot"
19101            fi
19102            if test "x$thecflags" != x; then
19103               DEVKIT_CFLAGS="$thecflags"
19104            fi
19105            if test "x$thelibs" != x; then
19106               DEVKIT_LIBS="$thelibs"
19107            fi
19108            # Found devkit
19109                     PATH="$DEVKIT/bin:$PATH"
19110                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19111                     if test "x$x_includes" = "xNONE"; then
19112                         x_includes="$SYS_ROOT/usr/include/X11"
19113                     fi
19114                     if test "x$x_libraries" = "xNONE"; then
19115                         x_libraries="$SYS_ROOT/usr/lib"
19116                     fi
19117
19118
19119        fi
19120
19121    fi
19122
19123
19124# Store the CFLAGS etal passed to the configure script.
19125ORG_CFLAGS="$CFLAGS"
19126ORG_CXXFLAGS="$CXXFLAGS"
19127ORG_OBJCFLAGS="$OBJCFLAGS"
19128
19129# autoconf magic only relies on PATH, so update it if tools dir is specified
19130OLD_PATH="$PATH"
19131if test "x$TOOLS_DIR" != x; then
19132  PATH=$TOOLS_DIR:$PATH
19133fi
19134
19135
19136### Locate C compiler (CC)
19137
19138# On windows, only cl.exe is supported.
19139# On Solaris, cc is preferred to gcc.
19140# Elsewhere, gcc is preferred to cc.
19141
19142if test "x$CC" != x; then
19143  COMPILER_CHECK_LIST="$CC"
19144elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19145  COMPILER_CHECK_LIST="cl"
19146elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19147  COMPILER_CHECK_LIST="cc gcc"
19148else
19149  COMPILER_CHECK_LIST="gcc cc"
19150fi
19151
19152
19153  COMPILER_NAME=C
19154
19155  CC=
19156  # If TOOLS_DIR is set, check for all compiler names in there first
19157  # before checking the rest of the PATH.
19158  if test -n "$TOOLS_DIR"; then
19159    PATH_save="$PATH"
19160    PATH="$TOOLS_DIR"
19161    for ac_prog in $COMPILER_CHECK_LIST
19162do
19163  # Extract the first word of "$ac_prog", so it can be a program name with args.
19164set dummy $ac_prog; ac_word=$2
19165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19166$as_echo_n "checking for $ac_word... " >&6; }
19167if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
19168  $as_echo_n "(cached) " >&6
19169else
19170  case $TOOLS_DIR_CC in
19171  [\\/]* | ?:[\\/]*)
19172  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19173  ;;
19174  *)
19175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19176for as_dir in $PATH
19177do
19178  IFS=$as_save_IFS
19179  test -z "$as_dir" && as_dir=.
19180    for ac_exec_ext in '' $ac_executable_extensions; do
19181  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19182    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19184    break 2
19185  fi
19186done
19187  done
19188IFS=$as_save_IFS
19189
19190  ;;
19191esac
19192fi
19193TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19194if test -n "$TOOLS_DIR_CC"; then
19195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19196$as_echo "$TOOLS_DIR_CC" >&6; }
19197else
19198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19199$as_echo "no" >&6; }
19200fi
19201
19202
19203  test -n "$TOOLS_DIR_CC" && break
19204done
19205
19206    CC=$TOOLS_DIR_CC
19207    PATH="$PATH_save"
19208  fi
19209
19210  # AC_PATH_PROGS can't be run multiple times with the same variable,
19211  # so create a new name for this run.
19212  if test "x$CC" = x; then
19213    for ac_prog in $COMPILER_CHECK_LIST
19214do
19215  # Extract the first word of "$ac_prog", so it can be a program name with args.
19216set dummy $ac_prog; ac_word=$2
19217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19218$as_echo_n "checking for $ac_word... " >&6; }
19219if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
19220  $as_echo_n "(cached) " >&6
19221else
19222  case $POTENTIAL_CC in
19223  [\\/]* | ?:[\\/]*)
19224  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19225  ;;
19226  *)
19227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19228for as_dir in $PATH
19229do
19230  IFS=$as_save_IFS
19231  test -z "$as_dir" && as_dir=.
19232    for ac_exec_ext in '' $ac_executable_extensions; do
19233  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19234    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19236    break 2
19237  fi
19238done
19239  done
19240IFS=$as_save_IFS
19241
19242  ;;
19243esac
19244fi
19245POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19246if test -n "$POTENTIAL_CC"; then
19247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19248$as_echo "$POTENTIAL_CC" >&6; }
19249else
19250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19251$as_echo "no" >&6; }
19252fi
19253
19254
19255  test -n "$POTENTIAL_CC" && break
19256done
19257
19258    CC=$POTENTIAL_CC
19259  fi
19260
19261  if test "x$CC" = x; then
19262
19263    # Print a helpful message on how to acquire the necessary build dependency.
19264    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19265    MISSING_DEPENDENCY=devkit
19266    PKGHANDLER_COMMAND=
19267
19268    case $PKGHANDLER in
19269	apt-get)
19270                apt_help     $MISSING_DEPENDENCY ;;
19271    yum)
19272                yum_help     $MISSING_DEPENDENCY ;;
19273	port)
19274                port_help    $MISSING_DEPENDENCY ;;
19275	pkgutil)
19276                pkgutil_help $MISSING_DEPENDENCY ;;
19277	pkgadd)
19278                pkgadd_help  $MISSING_DEPENDENCY ;;
19279    * )
19280      break ;;
19281    esac
19282
19283    if test "x$PKGHANDLER_COMMAND" != x; then
19284        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19285    fi
19286
19287      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19288  fi
19289
19290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19291
19292  # First separate the path from the arguments. This will split at the first
19293  # space.
19294  complete="$CC"
19295  path="${complete%% *}"
19296  tmp="$complete EOL"
19297  arguments="${tmp#* }"
19298
19299  # Input might be given as Windows format, start by converting to
19300  # unix format.
19301  new_path=`$CYGPATH -u "$path"`
19302
19303  # Now try to locate executable using which
19304  new_path=`$WHICH "$new_path" 2> /dev/null`
19305  # bat and cmd files are not always considered executable in cygwin causing which
19306  # to not find them
19307  if test "x$new_path" = x \
19308           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19309           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19310    new_path=`$CYGPATH -u "$path"`
19311  fi
19312  if test "x$new_path" = x; then
19313    # Oops. Which didn't find the executable.
19314    # The splitting of arguments from the executable at a space might have been incorrect,
19315    # since paths with space are more likely in Windows. Give it another try with the whole
19316    # argument.
19317    path="$complete"
19318    arguments="EOL"
19319    new_path=`$CYGPATH -u "$path"`
19320    new_path=`$WHICH "$new_path" 2> /dev/null`
19321    # bat and cmd files are not always considered executable in cygwin causing which
19322    # to not find them
19323    if test "x$new_path" = x \
19324             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19325             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19326      new_path=`$CYGPATH -u "$path"`
19327    fi
19328    if test "x$new_path" = x; then
19329      # It's still not found. Now this is an unrecoverable error.
19330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19331$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19332      has_space=`$ECHO "$complete" | $GREP " "`
19333      if test "x$has_space" != x; then
19334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19336      fi
19337      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19338    fi
19339  fi
19340
19341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19344  # "foo.exe" is OK but "foo" is an error.
19345  #
19346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19347  # It is also a way to make sure we got the proper file name for the real test later on.
19348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19349  if test "x$test_shortpath" = x; then
19350    # Short path failed, file does not exist as specified.
19351    # Try adding .exe or .cmd
19352    if test -f "${new_path}.exe"; then
19353       input_to_shortpath="${new_path}.exe"
19354    elif test -f "${new_path}.cmd"; then
19355       input_to_shortpath="${new_path}.cmd"
19356    else
19357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19358$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19359      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19360$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19361      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19362    fi
19363  else
19364    input_to_shortpath="$new_path"
19365  fi
19366
19367  # Call helper function which possibly converts this using DOS-style short mode.
19368  # If so, the updated path is stored in $new_path.
19369  new_path="$input_to_shortpath"
19370
19371  input_path="$input_to_shortpath"
19372  # Check if we need to convert this using DOS-style short mode. If the path
19373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19374  # take no chances and rewrite it.
19375  # Note: m4 eats our [], so we need to use [ and ] instead.
19376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19377  if test "x$has_forbidden_chars" != x; then
19378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19382      # Going to short mode and back again did indeed matter. Since short mode is
19383      # case insensitive, let's make it lowercase to improve readability.
19384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19385      # Now convert it back to Unix-stile (cygpath)
19386      input_path=`$CYGPATH -u "$shortmode_path"`
19387      new_path="$input_path"
19388    fi
19389  fi
19390
19391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19392  if test "x$test_cygdrive_prefix" = x; then
19393    # As a simple fix, exclude /usr/bin since it's not a real path.
19394    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19396      # a path prefixed by /cygdrive for fixpath to work.
19397      new_path="$CYGWIN_ROOT_PATH$input_path"
19398    fi
19399  fi
19400
19401  # remove trailing .exe if any
19402  new_path="${new_path/%.exe/}"
19403
19404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19405
19406  # First separate the path from the arguments. This will split at the first
19407  # space.
19408  complete="$CC"
19409  path="${complete%% *}"
19410  tmp="$complete EOL"
19411  arguments="${tmp#* }"
19412
19413  # Input might be given as Windows format, start by converting to
19414  # unix format.
19415  new_path="$path"
19416
19417  windows_path="$new_path"
19418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19419    unix_path=`$CYGPATH -u "$windows_path"`
19420    new_path="$unix_path"
19421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19423    new_path="$unix_path"
19424  fi
19425
19426
19427  # Now try to locate executable using which
19428  new_path=`$WHICH "$new_path" 2> /dev/null`
19429
19430  if test "x$new_path" = x; then
19431    # Oops. Which didn't find the executable.
19432    # The splitting of arguments from the executable at a space might have been incorrect,
19433    # since paths with space are more likely in Windows. Give it another try with the whole
19434    # argument.
19435    path="$complete"
19436    arguments="EOL"
19437    new_path="$path"
19438
19439  windows_path="$new_path"
19440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19441    unix_path=`$CYGPATH -u "$windows_path"`
19442    new_path="$unix_path"
19443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19445    new_path="$unix_path"
19446  fi
19447
19448
19449    new_path=`$WHICH "$new_path" 2> /dev/null`
19450
19451    if test "x$new_path" = x; then
19452      # It's still not found. Now this is an unrecoverable error.
19453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19454$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19455      has_space=`$ECHO "$complete" | $GREP " "`
19456      if test "x$has_space" != x; then
19457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19459      fi
19460      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19461    fi
19462  fi
19463
19464  # Now new_path has a complete unix path to the binary
19465  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19466    # Keep paths in /bin as-is, but remove trailing .exe if any
19467    new_path="${new_path/%.exe/}"
19468    # Do not save /bin paths to all_fixpath_prefixes!
19469  else
19470    # Not in mixed or Windows style, start by that.
19471    new_path=`cmd //c echo $new_path`
19472
19473  input_path="$new_path"
19474  # Check if we need to convert this using DOS-style short mode. If the path
19475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19476  # take no chances and rewrite it.
19477  # Note: m4 eats our [], so we need to use [ and ] instead.
19478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19479  if test "x$has_forbidden_chars" != x; then
19480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19482  fi
19483
19484    # Output is in $new_path
19485
19486  windows_path="$new_path"
19487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19488    unix_path=`$CYGPATH -u "$windows_path"`
19489    new_path="$unix_path"
19490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19492    new_path="$unix_path"
19493  fi
19494
19495    # remove trailing .exe if any
19496    new_path="${new_path/%.exe/}"
19497
19498    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19499    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19500  fi
19501
19502  else
19503    # We're on a posix platform. Hooray! :)
19504    # First separate the path from the arguments. This will split at the first
19505    # space.
19506    complete="$CC"
19507    path="${complete%% *}"
19508    tmp="$complete EOL"
19509    arguments="${tmp#* }"
19510
19511    # Cannot rely on the command "which" here since it doesn't always work.
19512    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19513    if test -z "$is_absolute_path"; then
19514      # Path to executable is not absolute. Find it.
19515      IFS_save="$IFS"
19516      IFS=:
19517      for p in $PATH; do
19518        if test -f "$p/$path" && test -x "$p/$path"; then
19519          new_path="$p/$path"
19520          break
19521        fi
19522      done
19523      IFS="$IFS_save"
19524    else
19525      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19526$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19527      new_path="$path"
19528    fi
19529
19530    if test "x$new_path" = x; then
19531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19532$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19533        has_space=`$ECHO "$complete" | $GREP " "`
19534        if test "x$has_space" != x; then
19535          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19536$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19537        fi
19538        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19539      fi
19540  fi
19541
19542      # Now join together the path and the arguments once again
19543      if test "x$arguments" != xEOL; then
19544        new_complete="$new_path ${arguments% *}"
19545      else
19546        new_complete="$new_path"
19547      fi
19548
19549  if test "x$complete" != "x$new_complete"; then
19550      CC="$new_complete"
19551      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19552$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19553    fi
19554
19555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19556$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19557  TEST_COMPILER="$CC"
19558
19559    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19560        # Follow a chain of symbolic links. Use readlink
19561        # where it exists, else fall back to horribly
19562        # complicated shell code.
19563        if test "x$READLINK_TESTED" != yes; then
19564            # On MacOSX there is a readlink tool with a different
19565            # purpose than the GNU readlink tool. Check the found readlink.
19566            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19567            if test "x$ISGNU" = x; then
19568                 # A readlink that we do not know how to use.
19569                 # Are there other non-GNU readlinks out there?
19570                 READLINK_TESTED=yes
19571                 READLINK=
19572            fi
19573        fi
19574
19575        if test "x$READLINK" != x; then
19576            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19577        else
19578            # Save the current directory for restoring afterwards
19579            STARTDIR=$PWD
19580            COUNTER=0
19581            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19582            sym_link_file=`$BASENAME $TEST_COMPILER`
19583            cd $sym_link_dir
19584            # Use -P flag to resolve symlinks in directories.
19585            cd `$THEPWDCMD -P`
19586            sym_link_dir=`$THEPWDCMD -P`
19587            # Resolve file symlinks
19588            while test $COUNTER -lt 20; do
19589                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19590                if test "x$ISLINK" == x; then
19591                    # This is not a symbolic link! We are done!
19592                    break
19593                fi
19594                # Again resolve directory symlinks since the target of the just found
19595                # link could be in a different directory
19596                cd `$DIRNAME $ISLINK`
19597                sym_link_dir=`$THEPWDCMD -P`
19598                sym_link_file=`$BASENAME $ISLINK`
19599                let COUNTER=COUNTER+1
19600            done
19601            cd $STARTDIR
19602            TEST_COMPILER=$sym_link_dir/$sym_link_file
19603        fi
19604    fi
19605
19606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19607$as_echo "$TEST_COMPILER" >&6; }
19608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19609$as_echo_n "checking if CC is disguised ccache... " >&6; }
19610
19611  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19612  if test "x$COMPILER_BASENAME" = "xccache"; then
19613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19614$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19615    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19616    # We want to control ccache invocation ourselves, so ignore this cc and try
19617    # searching again.
19618
19619    # Remove the path to the fake ccache cc from the PATH
19620    RETRY_COMPILER_SAVED_PATH="$PATH"
19621    COMPILER_DIRNAME=`$DIRNAME $CC`
19622    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19623
19624    # Try again looking for our compiler
19625    if test -n "$ac_tool_prefix"; then
19626  for ac_prog in $COMPILER_CHECK_LIST
19627  do
19628    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19629set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19631$as_echo_n "checking for $ac_word... " >&6; }
19632if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19633  $as_echo_n "(cached) " >&6
19634else
19635  if test -n "$PROPER_COMPILER_CC"; then
19636  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19637else
19638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19639for as_dir in $PATH
19640do
19641  IFS=$as_save_IFS
19642  test -z "$as_dir" && as_dir=.
19643    for ac_exec_ext in '' $ac_executable_extensions; do
19644  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19645    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19647    break 2
19648  fi
19649done
19650  done
19651IFS=$as_save_IFS
19652
19653fi
19654fi
19655PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19656if test -n "$PROPER_COMPILER_CC"; then
19657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19658$as_echo "$PROPER_COMPILER_CC" >&6; }
19659else
19660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19661$as_echo "no" >&6; }
19662fi
19663
19664
19665    test -n "$PROPER_COMPILER_CC" && break
19666  done
19667fi
19668if test -z "$PROPER_COMPILER_CC"; then
19669  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19670  for ac_prog in $COMPILER_CHECK_LIST
19671do
19672  # Extract the first word of "$ac_prog", so it can be a program name with args.
19673set dummy $ac_prog; ac_word=$2
19674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19675$as_echo_n "checking for $ac_word... " >&6; }
19676if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19677  $as_echo_n "(cached) " >&6
19678else
19679  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19680  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19681else
19682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19683for as_dir in $PATH
19684do
19685  IFS=$as_save_IFS
19686  test -z "$as_dir" && as_dir=.
19687    for ac_exec_ext in '' $ac_executable_extensions; do
19688  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19689    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19691    break 2
19692  fi
19693done
19694  done
19695IFS=$as_save_IFS
19696
19697fi
19698fi
19699ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19700if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19702$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19703else
19704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19705$as_echo "no" >&6; }
19706fi
19707
19708
19709  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19710done
19711
19712  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19713    PROPER_COMPILER_CC=""
19714  else
19715    case $cross_compiling:$ac_tool_warned in
19716yes:)
19717{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19718$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19719ac_tool_warned=yes ;;
19720esac
19721    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19722  fi
19723fi
19724
19725
19726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19727
19728  # First separate the path from the arguments. This will split at the first
19729  # space.
19730  complete="$PROPER_COMPILER_CC"
19731  path="${complete%% *}"
19732  tmp="$complete EOL"
19733  arguments="${tmp#* }"
19734
19735  # Input might be given as Windows format, start by converting to
19736  # unix format.
19737  new_path=`$CYGPATH -u "$path"`
19738
19739  # Now try to locate executable using which
19740  new_path=`$WHICH "$new_path" 2> /dev/null`
19741  # bat and cmd files are not always considered executable in cygwin causing which
19742  # to not find them
19743  if test "x$new_path" = x \
19744           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19745           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19746    new_path=`$CYGPATH -u "$path"`
19747  fi
19748  if test "x$new_path" = x; then
19749    # Oops. Which didn't find the executable.
19750    # The splitting of arguments from the executable at a space might have been incorrect,
19751    # since paths with space are more likely in Windows. Give it another try with the whole
19752    # argument.
19753    path="$complete"
19754    arguments="EOL"
19755    new_path=`$CYGPATH -u "$path"`
19756    new_path=`$WHICH "$new_path" 2> /dev/null`
19757    # bat and cmd files are not always considered executable in cygwin causing which
19758    # to not find them
19759    if test "x$new_path" = x \
19760             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19761             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19762      new_path=`$CYGPATH -u "$path"`
19763    fi
19764    if test "x$new_path" = x; then
19765      # It's still not found. Now this is an unrecoverable error.
19766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19767$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19768      has_space=`$ECHO "$complete" | $GREP " "`
19769      if test "x$has_space" != x; then
19770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19772      fi
19773      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19774    fi
19775  fi
19776
19777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19780  # "foo.exe" is OK but "foo" is an error.
19781  #
19782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19783  # It is also a way to make sure we got the proper file name for the real test later on.
19784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19785  if test "x$test_shortpath" = x; then
19786    # Short path failed, file does not exist as specified.
19787    # Try adding .exe or .cmd
19788    if test -f "${new_path}.exe"; then
19789       input_to_shortpath="${new_path}.exe"
19790    elif test -f "${new_path}.cmd"; then
19791       input_to_shortpath="${new_path}.cmd"
19792    else
19793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19794$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19795      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19796$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19797      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19798    fi
19799  else
19800    input_to_shortpath="$new_path"
19801  fi
19802
19803  # Call helper function which possibly converts this using DOS-style short mode.
19804  # If so, the updated path is stored in $new_path.
19805  new_path="$input_to_shortpath"
19806
19807  input_path="$input_to_shortpath"
19808  # Check if we need to convert this using DOS-style short mode. If the path
19809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19810  # take no chances and rewrite it.
19811  # Note: m4 eats our [], so we need to use [ and ] instead.
19812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19813  if test "x$has_forbidden_chars" != x; then
19814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19818      # Going to short mode and back again did indeed matter. Since short mode is
19819      # case insensitive, let's make it lowercase to improve readability.
19820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19821      # Now convert it back to Unix-stile (cygpath)
19822      input_path=`$CYGPATH -u "$shortmode_path"`
19823      new_path="$input_path"
19824    fi
19825  fi
19826
19827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19828  if test "x$test_cygdrive_prefix" = x; then
19829    # As a simple fix, exclude /usr/bin since it's not a real path.
19830    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19832      # a path prefixed by /cygdrive for fixpath to work.
19833      new_path="$CYGWIN_ROOT_PATH$input_path"
19834    fi
19835  fi
19836
19837  # remove trailing .exe if any
19838  new_path="${new_path/%.exe/}"
19839
19840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19841
19842  # First separate the path from the arguments. This will split at the first
19843  # space.
19844  complete="$PROPER_COMPILER_CC"
19845  path="${complete%% *}"
19846  tmp="$complete EOL"
19847  arguments="${tmp#* }"
19848
19849  # Input might be given as Windows format, start by converting to
19850  # unix format.
19851  new_path="$path"
19852
19853  windows_path="$new_path"
19854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19855    unix_path=`$CYGPATH -u "$windows_path"`
19856    new_path="$unix_path"
19857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19859    new_path="$unix_path"
19860  fi
19861
19862
19863  # Now try to locate executable using which
19864  new_path=`$WHICH "$new_path" 2> /dev/null`
19865
19866  if test "x$new_path" = x; then
19867    # Oops. Which didn't find the executable.
19868    # The splitting of arguments from the executable at a space might have been incorrect,
19869    # since paths with space are more likely in Windows. Give it another try with the whole
19870    # argument.
19871    path="$complete"
19872    arguments="EOL"
19873    new_path="$path"
19874
19875  windows_path="$new_path"
19876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19877    unix_path=`$CYGPATH -u "$windows_path"`
19878    new_path="$unix_path"
19879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19881    new_path="$unix_path"
19882  fi
19883
19884
19885    new_path=`$WHICH "$new_path" 2> /dev/null`
19886
19887    if test "x$new_path" = x; then
19888      # It's still not found. Now this is an unrecoverable error.
19889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19890$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19891      has_space=`$ECHO "$complete" | $GREP " "`
19892      if test "x$has_space" != x; then
19893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19895      fi
19896      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19897    fi
19898  fi
19899
19900  # Now new_path has a complete unix path to the binary
19901  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19902    # Keep paths in /bin as-is, but remove trailing .exe if any
19903    new_path="${new_path/%.exe/}"
19904    # Do not save /bin paths to all_fixpath_prefixes!
19905  else
19906    # Not in mixed or Windows style, start by that.
19907    new_path=`cmd //c echo $new_path`
19908
19909  input_path="$new_path"
19910  # Check if we need to convert this using DOS-style short mode. If the path
19911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19912  # take no chances and rewrite it.
19913  # Note: m4 eats our [], so we need to use [ and ] instead.
19914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19915  if test "x$has_forbidden_chars" != x; then
19916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19918  fi
19919
19920    # Output is in $new_path
19921
19922  windows_path="$new_path"
19923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19924    unix_path=`$CYGPATH -u "$windows_path"`
19925    new_path="$unix_path"
19926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19928    new_path="$unix_path"
19929  fi
19930
19931    # remove trailing .exe if any
19932    new_path="${new_path/%.exe/}"
19933
19934    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19935    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19936  fi
19937
19938  else
19939    # We're on a posix platform. Hooray! :)
19940    # First separate the path from the arguments. This will split at the first
19941    # space.
19942    complete="$PROPER_COMPILER_CC"
19943    path="${complete%% *}"
19944    tmp="$complete EOL"
19945    arguments="${tmp#* }"
19946
19947    # Cannot rely on the command "which" here since it doesn't always work.
19948    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19949    if test -z "$is_absolute_path"; then
19950      # Path to executable is not absolute. Find it.
19951      IFS_save="$IFS"
19952      IFS=:
19953      for p in $PATH; do
19954        if test -f "$p/$path" && test -x "$p/$path"; then
19955          new_path="$p/$path"
19956          break
19957        fi
19958      done
19959      IFS="$IFS_save"
19960    else
19961      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19962$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19963      new_path="$path"
19964    fi
19965
19966    if test "x$new_path" = x; then
19967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19968$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19969        has_space=`$ECHO "$complete" | $GREP " "`
19970        if test "x$has_space" != x; then
19971          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19972$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19973        fi
19974        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19975      fi
19976  fi
19977
19978      # Now join together the path and the arguments once again
19979      if test "x$arguments" != xEOL; then
19980        new_complete="$new_path ${arguments% *}"
19981      else
19982        new_complete="$new_path"
19983      fi
19984
19985  if test "x$complete" != "x$new_complete"; then
19986      PROPER_COMPILER_CC="$new_complete"
19987      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19988$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19989    fi
19990
19991    PATH="$RETRY_COMPILER_SAVED_PATH"
19992
19993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19994$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19995
19996    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19997        # Follow a chain of symbolic links. Use readlink
19998        # where it exists, else fall back to horribly
19999        # complicated shell code.
20000        if test "x$READLINK_TESTED" != yes; then
20001            # On MacOSX there is a readlink tool with a different
20002            # purpose than the GNU readlink tool. Check the found readlink.
20003            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20004            if test "x$ISGNU" = x; then
20005                 # A readlink that we do not know how to use.
20006                 # Are there other non-GNU readlinks out there?
20007                 READLINK_TESTED=yes
20008                 READLINK=
20009            fi
20010        fi
20011
20012        if test "x$READLINK" != x; then
20013            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20014        else
20015            # Save the current directory for restoring afterwards
20016            STARTDIR=$PWD
20017            COUNTER=0
20018            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20019            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20020            cd $sym_link_dir
20021            # Use -P flag to resolve symlinks in directories.
20022            cd `$THEPWDCMD -P`
20023            sym_link_dir=`$THEPWDCMD -P`
20024            # Resolve file symlinks
20025            while test $COUNTER -lt 20; do
20026                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20027                if test "x$ISLINK" == x; then
20028                    # This is not a symbolic link! We are done!
20029                    break
20030                fi
20031                # Again resolve directory symlinks since the target of the just found
20032                # link could be in a different directory
20033                cd `$DIRNAME $ISLINK`
20034                sym_link_dir=`$THEPWDCMD -P`
20035                sym_link_file=`$BASENAME $ISLINK`
20036                let COUNTER=COUNTER+1
20037            done
20038            cd $STARTDIR
20039            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20040        fi
20041    fi
20042
20043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20044$as_echo "$PROPER_COMPILER_CC" >&6; }
20045    CC="$PROPER_COMPILER_CC"
20046  else
20047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20048$as_echo "no, keeping CC" >&6; }
20049    CC="$TEST_COMPILER"
20050  fi
20051
20052  COMPILER=$CC
20053  COMPILER_NAME=$COMPILER_NAME
20054
20055  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20056    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20057    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20058    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20059    if test $? -ne 0; then
20060      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20061
20062      { $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
20063$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20064      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20065$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20066      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20067    else
20068      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20069      COMPILER_VENDOR="Sun Studio"
20070    fi
20071  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20072    # First line typically looks something like:
20073    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20074    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20075    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20076    COMPILER_VENDOR="Microsoft CL.EXE"
20077    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20078    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20079      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20080        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20081      fi
20082    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20083      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20084        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20085      fi
20086    fi
20087  else
20088    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20089    # Check that this is likely to be GCC.
20090    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20091    if test $? -ne 0; then
20092      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20093$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20094      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20095$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20096      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20097    fi
20098
20099    # First line typically looks something like:
20100    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20101    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20102    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20103  fi
20104  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20105  CC_VERSION="$COMPILER_VERSION"
20106  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20107  CC_VENDOR="$COMPILER_VENDOR"
20108
20109  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20110$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20111
20112
20113# Now that we have resolved CC ourself, let autoconf have its go at it
20114ac_ext=c
20115ac_cpp='$CPP $CPPFLAGS'
20116ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20117ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20118ac_compiler_gnu=$ac_cv_c_compiler_gnu
20119if test -n "$ac_tool_prefix"; then
20120  for ac_prog in $CC
20121  do
20122    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20123set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20125$as_echo_n "checking for $ac_word... " >&6; }
20126if test "${ac_cv_prog_CC+set}" = set; then :
20127  $as_echo_n "(cached) " >&6
20128else
20129  if test -n "$CC"; then
20130  ac_cv_prog_CC="$CC" # Let the user override the test.
20131else
20132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20133for as_dir in $PATH
20134do
20135  IFS=$as_save_IFS
20136  test -z "$as_dir" && as_dir=.
20137    for ac_exec_ext in '' $ac_executable_extensions; do
20138  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20139    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20141    break 2
20142  fi
20143done
20144  done
20145IFS=$as_save_IFS
20146
20147fi
20148fi
20149CC=$ac_cv_prog_CC
20150if test -n "$CC"; then
20151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20152$as_echo "$CC" >&6; }
20153else
20154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20155$as_echo "no" >&6; }
20156fi
20157
20158
20159    test -n "$CC" && break
20160  done
20161fi
20162if test -z "$CC"; then
20163  ac_ct_CC=$CC
20164  for ac_prog in $CC
20165do
20166  # Extract the first word of "$ac_prog", so it can be a program name with args.
20167set dummy $ac_prog; ac_word=$2
20168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20169$as_echo_n "checking for $ac_word... " >&6; }
20170if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
20171  $as_echo_n "(cached) " >&6
20172else
20173  if test -n "$ac_ct_CC"; then
20174  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20175else
20176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20177for as_dir in $PATH
20178do
20179  IFS=$as_save_IFS
20180  test -z "$as_dir" && as_dir=.
20181    for ac_exec_ext in '' $ac_executable_extensions; do
20182  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20183    ac_cv_prog_ac_ct_CC="$ac_prog"
20184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20185    break 2
20186  fi
20187done
20188  done
20189IFS=$as_save_IFS
20190
20191fi
20192fi
20193ac_ct_CC=$ac_cv_prog_ac_ct_CC
20194if test -n "$ac_ct_CC"; then
20195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20196$as_echo "$ac_ct_CC" >&6; }
20197else
20198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20199$as_echo "no" >&6; }
20200fi
20201
20202
20203  test -n "$ac_ct_CC" && break
20204done
20205
20206  if test "x$ac_ct_CC" = x; then
20207    CC=""
20208  else
20209    case $cross_compiling:$ac_tool_warned in
20210yes:)
20211{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20212$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20213ac_tool_warned=yes ;;
20214esac
20215    CC=$ac_ct_CC
20216  fi
20217fi
20218
20219
20220test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20222as_fn_error $? "no acceptable C compiler found in \$PATH
20223See \`config.log' for more details" "$LINENO" 5; }
20224
20225# Provide some information about the compiler.
20226$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20227set X $ac_compile
20228ac_compiler=$2
20229for ac_option in --version -v -V -qversion; do
20230  { { ac_try="$ac_compiler $ac_option >&5"
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_compiler $ac_option >&5") 2>conftest.err
20238  ac_status=$?
20239  if test -s conftest.err; then
20240    sed '10a\
20241... rest of stderr output deleted ...
20242         10q' conftest.err >conftest.er1
20243    cat conftest.er1 >&5
20244  fi
20245  rm -f conftest.er1 conftest.err
20246  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20247  test $ac_status = 0; }
20248done
20249
20250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20251/* end confdefs.h.  */
20252
20253int
20254main ()
20255{
20256
20257  ;
20258  return 0;
20259}
20260_ACEOF
20261ac_clean_files_save=$ac_clean_files
20262ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20263# Try to create an executable without -o first, disregard a.out.
20264# It will help us diagnose broken compilers, and finding out an intuition
20265# of exeext.
20266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20267$as_echo_n "checking whether the C compiler works... " >&6; }
20268ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20269
20270# The possible output files:
20271ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20272
20273ac_rmfiles=
20274for ac_file in $ac_files
20275do
20276  case $ac_file in
20277    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20278    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20279  esac
20280done
20281rm -f $ac_rmfiles
20282
20283if { { ac_try="$ac_link_default"
20284case "(($ac_try" in
20285  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20286  *) ac_try_echo=$ac_try;;
20287esac
20288eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20289$as_echo "$ac_try_echo"; } >&5
20290  (eval "$ac_link_default") 2>&5
20291  ac_status=$?
20292  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20293  test $ac_status = 0; }; then :
20294  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20295# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20296# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20297# so that the user can short-circuit this test for compilers unknown to
20298# Autoconf.
20299for ac_file in $ac_files ''
20300do
20301  test -f "$ac_file" || continue
20302  case $ac_file in
20303    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20304	;;
20305    [ab].out )
20306	# We found the default executable, but exeext='' is most
20307	# certainly right.
20308	break;;
20309    *.* )
20310	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20311	then :; else
20312	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20313	fi
20314	# We set ac_cv_exeext here because the later test for it is not
20315	# safe: cross compilers may not add the suffix if given an `-o'
20316	# argument, so we may need to know it at that point already.
20317	# Even if this section looks crufty: it has the advantage of
20318	# actually working.
20319	break;;
20320    * )
20321	break;;
20322  esac
20323done
20324test "$ac_cv_exeext" = no && ac_cv_exeext=
20325
20326else
20327  ac_file=''
20328fi
20329if test -z "$ac_file"; then :
20330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20331$as_echo "no" >&6; }
20332$as_echo "$as_me: failed program was:" >&5
20333sed 's/^/| /' conftest.$ac_ext >&5
20334
20335{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20336$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20337as_fn_error 77 "C compiler cannot create executables
20338See \`config.log' for more details" "$LINENO" 5; }
20339else
20340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20341$as_echo "yes" >&6; }
20342fi
20343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20344$as_echo_n "checking for C compiler default output file name... " >&6; }
20345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20346$as_echo "$ac_file" >&6; }
20347ac_exeext=$ac_cv_exeext
20348
20349rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20350ac_clean_files=$ac_clean_files_save
20351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20352$as_echo_n "checking for suffix of executables... " >&6; }
20353if { { ac_try="$ac_link"
20354case "(($ac_try" in
20355  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20356  *) ac_try_echo=$ac_try;;
20357esac
20358eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20359$as_echo "$ac_try_echo"; } >&5
20360  (eval "$ac_link") 2>&5
20361  ac_status=$?
20362  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20363  test $ac_status = 0; }; then :
20364  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20365# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20366# work properly (i.e., refer to `conftest.exe'), while it won't with
20367# `rm'.
20368for ac_file in conftest.exe conftest conftest.*; do
20369  test -f "$ac_file" || continue
20370  case $ac_file in
20371    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20372    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20373	  break;;
20374    * ) break;;
20375  esac
20376done
20377else
20378  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20379$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20380as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20381See \`config.log' for more details" "$LINENO" 5; }
20382fi
20383rm -f conftest conftest$ac_cv_exeext
20384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20385$as_echo "$ac_cv_exeext" >&6; }
20386
20387rm -f conftest.$ac_ext
20388EXEEXT=$ac_cv_exeext
20389ac_exeext=$EXEEXT
20390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20391/* end confdefs.h.  */
20392#include <stdio.h>
20393int
20394main ()
20395{
20396FILE *f = fopen ("conftest.out", "w");
20397 return ferror (f) || fclose (f) != 0;
20398
20399  ;
20400  return 0;
20401}
20402_ACEOF
20403ac_clean_files="$ac_clean_files conftest.out"
20404# Check that the compiler produces executables we can run.  If not, either
20405# the compiler is broken, or we cross compile.
20406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20407$as_echo_n "checking whether we are cross compiling... " >&6; }
20408if test "$cross_compiling" != yes; then
20409  { { ac_try="$ac_link"
20410case "(($ac_try" in
20411  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20412  *) ac_try_echo=$ac_try;;
20413esac
20414eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20415$as_echo "$ac_try_echo"; } >&5
20416  (eval "$ac_link") 2>&5
20417  ac_status=$?
20418  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20419  test $ac_status = 0; }
20420  if { ac_try='./conftest$ac_cv_exeext'
20421  { { case "(($ac_try" in
20422  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20423  *) ac_try_echo=$ac_try;;
20424esac
20425eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20426$as_echo "$ac_try_echo"; } >&5
20427  (eval "$ac_try") 2>&5
20428  ac_status=$?
20429  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20430  test $ac_status = 0; }; }; then
20431    cross_compiling=no
20432  else
20433    if test "$cross_compiling" = maybe; then
20434	cross_compiling=yes
20435    else
20436	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20437$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20438as_fn_error $? "cannot run C compiled programs.
20439If you meant to cross compile, use \`--host'.
20440See \`config.log' for more details" "$LINENO" 5; }
20441    fi
20442  fi
20443fi
20444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20445$as_echo "$cross_compiling" >&6; }
20446
20447rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20448ac_clean_files=$ac_clean_files_save
20449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20450$as_echo_n "checking for suffix of object files... " >&6; }
20451if test "${ac_cv_objext+set}" = set; then :
20452  $as_echo_n "(cached) " >&6
20453else
20454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20455/* end confdefs.h.  */
20456
20457int
20458main ()
20459{
20460
20461  ;
20462  return 0;
20463}
20464_ACEOF
20465rm -f conftest.o conftest.obj
20466if { { ac_try="$ac_compile"
20467case "(($ac_try" in
20468  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20469  *) ac_try_echo=$ac_try;;
20470esac
20471eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20472$as_echo "$ac_try_echo"; } >&5
20473  (eval "$ac_compile") 2>&5
20474  ac_status=$?
20475  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20476  test $ac_status = 0; }; then :
20477  for ac_file in conftest.o conftest.obj conftest.*; do
20478  test -f "$ac_file" || continue;
20479  case $ac_file in
20480    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20481    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20482       break;;
20483  esac
20484done
20485else
20486  $as_echo "$as_me: failed program was:" >&5
20487sed 's/^/| /' conftest.$ac_ext >&5
20488
20489{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20490$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20491as_fn_error $? "cannot compute suffix of object files: cannot compile
20492See \`config.log' for more details" "$LINENO" 5; }
20493fi
20494rm -f conftest.$ac_cv_objext conftest.$ac_ext
20495fi
20496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20497$as_echo "$ac_cv_objext" >&6; }
20498OBJEXT=$ac_cv_objext
20499ac_objext=$OBJEXT
20500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20501$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20502if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20503  $as_echo_n "(cached) " >&6
20504else
20505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20506/* end confdefs.h.  */
20507
20508int
20509main ()
20510{
20511#ifndef __GNUC__
20512       choke me
20513#endif
20514
20515  ;
20516  return 0;
20517}
20518_ACEOF
20519if ac_fn_c_try_compile "$LINENO"; then :
20520  ac_compiler_gnu=yes
20521else
20522  ac_compiler_gnu=no
20523fi
20524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20525ac_cv_c_compiler_gnu=$ac_compiler_gnu
20526
20527fi
20528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20529$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20530if test $ac_compiler_gnu = yes; then
20531  GCC=yes
20532else
20533  GCC=
20534fi
20535ac_test_CFLAGS=${CFLAGS+set}
20536ac_save_CFLAGS=$CFLAGS
20537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20538$as_echo_n "checking whether $CC accepts -g... " >&6; }
20539if test "${ac_cv_prog_cc_g+set}" = set; then :
20540  $as_echo_n "(cached) " >&6
20541else
20542  ac_save_c_werror_flag=$ac_c_werror_flag
20543   ac_c_werror_flag=yes
20544   ac_cv_prog_cc_g=no
20545   CFLAGS="-g"
20546   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20547/* end confdefs.h.  */
20548
20549int
20550main ()
20551{
20552
20553  ;
20554  return 0;
20555}
20556_ACEOF
20557if ac_fn_c_try_compile "$LINENO"; then :
20558  ac_cv_prog_cc_g=yes
20559else
20560  CFLAGS=""
20561      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20562/* end confdefs.h.  */
20563
20564int
20565main ()
20566{
20567
20568  ;
20569  return 0;
20570}
20571_ACEOF
20572if ac_fn_c_try_compile "$LINENO"; then :
20573
20574else
20575  ac_c_werror_flag=$ac_save_c_werror_flag
20576	 CFLAGS="-g"
20577	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20578/* end confdefs.h.  */
20579
20580int
20581main ()
20582{
20583
20584  ;
20585  return 0;
20586}
20587_ACEOF
20588if ac_fn_c_try_compile "$LINENO"; then :
20589  ac_cv_prog_cc_g=yes
20590fi
20591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20592fi
20593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20594fi
20595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20596   ac_c_werror_flag=$ac_save_c_werror_flag
20597fi
20598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20599$as_echo "$ac_cv_prog_cc_g" >&6; }
20600if test "$ac_test_CFLAGS" = set; then
20601  CFLAGS=$ac_save_CFLAGS
20602elif test $ac_cv_prog_cc_g = yes; then
20603  if test "$GCC" = yes; then
20604    CFLAGS="-g -O2"
20605  else
20606    CFLAGS="-g"
20607  fi
20608else
20609  if test "$GCC" = yes; then
20610    CFLAGS="-O2"
20611  else
20612    CFLAGS=
20613  fi
20614fi
20615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20616$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20617if test "${ac_cv_prog_cc_c89+set}" = set; then :
20618  $as_echo_n "(cached) " >&6
20619else
20620  ac_cv_prog_cc_c89=no
20621ac_save_CC=$CC
20622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20623/* end confdefs.h.  */
20624#include <stdarg.h>
20625#include <stdio.h>
20626#include <sys/types.h>
20627#include <sys/stat.h>
20628/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20629struct buf { int x; };
20630FILE * (*rcsopen) (struct buf *, struct stat *, int);
20631static char *e (p, i)
20632     char **p;
20633     int i;
20634{
20635  return p[i];
20636}
20637static char *f (char * (*g) (char **, int), char **p, ...)
20638{
20639  char *s;
20640  va_list v;
20641  va_start (v,p);
20642  s = g (p, va_arg (v,int));
20643  va_end (v);
20644  return s;
20645}
20646
20647/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20648   function prototypes and stuff, but not '\xHH' hex character constants.
20649   These don't provoke an error unfortunately, instead are silently treated
20650   as 'x'.  The following induces an error, until -std is added to get
20651   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20652   array size at least.  It's necessary to write '\x00'==0 to get something
20653   that's true only with -std.  */
20654int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20655
20656/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20657   inside strings and character constants.  */
20658#define FOO(x) 'x'
20659int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20660
20661int test (int i, double x);
20662struct s1 {int (*f) (int a);};
20663struct s2 {int (*f) (double a);};
20664int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20665int argc;
20666char **argv;
20667int
20668main ()
20669{
20670return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20671  ;
20672  return 0;
20673}
20674_ACEOF
20675for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20676	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20677do
20678  CC="$ac_save_CC $ac_arg"
20679  if ac_fn_c_try_compile "$LINENO"; then :
20680  ac_cv_prog_cc_c89=$ac_arg
20681fi
20682rm -f core conftest.err conftest.$ac_objext
20683  test "x$ac_cv_prog_cc_c89" != "xno" && break
20684done
20685rm -f conftest.$ac_ext
20686CC=$ac_save_CC
20687
20688fi
20689# AC_CACHE_VAL
20690case "x$ac_cv_prog_cc_c89" in
20691  x)
20692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20693$as_echo "none needed" >&6; } ;;
20694  xno)
20695    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20696$as_echo "unsupported" >&6; } ;;
20697  *)
20698    CC="$CC $ac_cv_prog_cc_c89"
20699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20700$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20701esac
20702if test "x$ac_cv_prog_cc_c89" != xno; then :
20703
20704fi
20705
20706ac_ext=cpp
20707ac_cpp='$CXXCPP $CPPFLAGS'
20708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20711
20712
20713### Locate C++ compiler (CXX)
20714
20715if test "x$CXX" != x; then
20716  COMPILER_CHECK_LIST="$CXX"
20717elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20718  COMPILER_CHECK_LIST="cl"
20719elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20720  COMPILER_CHECK_LIST="CC g++"
20721else
20722  COMPILER_CHECK_LIST="g++ CC"
20723fi
20724
20725
20726  COMPILER_NAME=C++
20727
20728  CXX=
20729  # If TOOLS_DIR is set, check for all compiler names in there first
20730  # before checking the rest of the PATH.
20731  if test -n "$TOOLS_DIR"; then
20732    PATH_save="$PATH"
20733    PATH="$TOOLS_DIR"
20734    for ac_prog in $COMPILER_CHECK_LIST
20735do
20736  # Extract the first word of "$ac_prog", so it can be a program name with args.
20737set dummy $ac_prog; ac_word=$2
20738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20739$as_echo_n "checking for $ac_word... " >&6; }
20740if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20741  $as_echo_n "(cached) " >&6
20742else
20743  case $TOOLS_DIR_CXX in
20744  [\\/]* | ?:[\\/]*)
20745  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20746  ;;
20747  *)
20748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20749for as_dir in $PATH
20750do
20751  IFS=$as_save_IFS
20752  test -z "$as_dir" && as_dir=.
20753    for ac_exec_ext in '' $ac_executable_extensions; do
20754  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20755    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20757    break 2
20758  fi
20759done
20760  done
20761IFS=$as_save_IFS
20762
20763  ;;
20764esac
20765fi
20766TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20767if test -n "$TOOLS_DIR_CXX"; then
20768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20769$as_echo "$TOOLS_DIR_CXX" >&6; }
20770else
20771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20772$as_echo "no" >&6; }
20773fi
20774
20775
20776  test -n "$TOOLS_DIR_CXX" && break
20777done
20778
20779    CXX=$TOOLS_DIR_CXX
20780    PATH="$PATH_save"
20781  fi
20782
20783  # AC_PATH_PROGS can't be run multiple times with the same variable,
20784  # so create a new name for this run.
20785  if test "x$CXX" = x; then
20786    for ac_prog in $COMPILER_CHECK_LIST
20787do
20788  # Extract the first word of "$ac_prog", so it can be a program name with args.
20789set dummy $ac_prog; ac_word=$2
20790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20791$as_echo_n "checking for $ac_word... " >&6; }
20792if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20793  $as_echo_n "(cached) " >&6
20794else
20795  case $POTENTIAL_CXX in
20796  [\\/]* | ?:[\\/]*)
20797  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20798  ;;
20799  *)
20800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20801for as_dir in $PATH
20802do
20803  IFS=$as_save_IFS
20804  test -z "$as_dir" && as_dir=.
20805    for ac_exec_ext in '' $ac_executable_extensions; do
20806  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20807    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20809    break 2
20810  fi
20811done
20812  done
20813IFS=$as_save_IFS
20814
20815  ;;
20816esac
20817fi
20818POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20819if test -n "$POTENTIAL_CXX"; then
20820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20821$as_echo "$POTENTIAL_CXX" >&6; }
20822else
20823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20824$as_echo "no" >&6; }
20825fi
20826
20827
20828  test -n "$POTENTIAL_CXX" && break
20829done
20830
20831    CXX=$POTENTIAL_CXX
20832  fi
20833
20834  if test "x$CXX" = x; then
20835
20836    # Print a helpful message on how to acquire the necessary build dependency.
20837    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20838    MISSING_DEPENDENCY=devkit
20839    PKGHANDLER_COMMAND=
20840
20841    case $PKGHANDLER in
20842	apt-get)
20843                apt_help     $MISSING_DEPENDENCY ;;
20844    yum)
20845                yum_help     $MISSING_DEPENDENCY ;;
20846	port)
20847                port_help    $MISSING_DEPENDENCY ;;
20848	pkgutil)
20849                pkgutil_help $MISSING_DEPENDENCY ;;
20850	pkgadd)
20851                pkgadd_help  $MISSING_DEPENDENCY ;;
20852    * )
20853      break ;;
20854    esac
20855
20856    if test "x$PKGHANDLER_COMMAND" != x; then
20857        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20858    fi
20859
20860      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20861  fi
20862
20863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20864
20865  # First separate the path from the arguments. This will split at the first
20866  # space.
20867  complete="$CXX"
20868  path="${complete%% *}"
20869  tmp="$complete EOL"
20870  arguments="${tmp#* }"
20871
20872  # Input might be given as Windows format, start by converting to
20873  # unix format.
20874  new_path=`$CYGPATH -u "$path"`
20875
20876  # Now try to locate executable using which
20877  new_path=`$WHICH "$new_path" 2> /dev/null`
20878  # bat and cmd files are not always considered executable in cygwin causing which
20879  # to not find them
20880  if test "x$new_path" = x \
20881           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20882           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20883    new_path=`$CYGPATH -u "$path"`
20884  fi
20885  if test "x$new_path" = x; then
20886    # Oops. Which didn't find the executable.
20887    # The splitting of arguments from the executable at a space might have been incorrect,
20888    # since paths with space are more likely in Windows. Give it another try with the whole
20889    # argument.
20890    path="$complete"
20891    arguments="EOL"
20892    new_path=`$CYGPATH -u "$path"`
20893    new_path=`$WHICH "$new_path" 2> /dev/null`
20894    # bat and cmd files are not always considered executable in cygwin causing which
20895    # to not find them
20896    if test "x$new_path" = x \
20897             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20898             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20899      new_path=`$CYGPATH -u "$path"`
20900    fi
20901    if test "x$new_path" = x; then
20902      # It's still not found. Now this is an unrecoverable error.
20903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20904$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20905      has_space=`$ECHO "$complete" | $GREP " "`
20906      if test "x$has_space" != x; then
20907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20909      fi
20910      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20911    fi
20912  fi
20913
20914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20917  # "foo.exe" is OK but "foo" is an error.
20918  #
20919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20920  # It is also a way to make sure we got the proper file name for the real test later on.
20921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20922  if test "x$test_shortpath" = x; then
20923    # Short path failed, file does not exist as specified.
20924    # Try adding .exe or .cmd
20925    if test -f "${new_path}.exe"; then
20926       input_to_shortpath="${new_path}.exe"
20927    elif test -f "${new_path}.cmd"; then
20928       input_to_shortpath="${new_path}.cmd"
20929    else
20930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20931$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20932      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20933$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20934      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20935    fi
20936  else
20937    input_to_shortpath="$new_path"
20938  fi
20939
20940  # Call helper function which possibly converts this using DOS-style short mode.
20941  # If so, the updated path is stored in $new_path.
20942  new_path="$input_to_shortpath"
20943
20944  input_path="$input_to_shortpath"
20945  # Check if we need to convert this using DOS-style short mode. If the path
20946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20947  # take no chances and rewrite it.
20948  # Note: m4 eats our [], so we need to use [ and ] instead.
20949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20950  if test "x$has_forbidden_chars" != x; then
20951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20955      # Going to short mode and back again did indeed matter. Since short mode is
20956      # case insensitive, let's make it lowercase to improve readability.
20957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20958      # Now convert it back to Unix-stile (cygpath)
20959      input_path=`$CYGPATH -u "$shortmode_path"`
20960      new_path="$input_path"
20961    fi
20962  fi
20963
20964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20965  if test "x$test_cygdrive_prefix" = x; then
20966    # As a simple fix, exclude /usr/bin since it's not a real path.
20967    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20969      # a path prefixed by /cygdrive for fixpath to work.
20970      new_path="$CYGWIN_ROOT_PATH$input_path"
20971    fi
20972  fi
20973
20974  # remove trailing .exe if any
20975  new_path="${new_path/%.exe/}"
20976
20977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20978
20979  # First separate the path from the arguments. This will split at the first
20980  # space.
20981  complete="$CXX"
20982  path="${complete%% *}"
20983  tmp="$complete EOL"
20984  arguments="${tmp#* }"
20985
20986  # Input might be given as Windows format, start by converting to
20987  # unix format.
20988  new_path="$path"
20989
20990  windows_path="$new_path"
20991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20992    unix_path=`$CYGPATH -u "$windows_path"`
20993    new_path="$unix_path"
20994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20996    new_path="$unix_path"
20997  fi
20998
20999
21000  # Now try to locate executable using which
21001  new_path=`$WHICH "$new_path" 2> /dev/null`
21002
21003  if test "x$new_path" = x; then
21004    # Oops. Which didn't find the executable.
21005    # The splitting of arguments from the executable at a space might have been incorrect,
21006    # since paths with space are more likely in Windows. Give it another try with the whole
21007    # argument.
21008    path="$complete"
21009    arguments="EOL"
21010    new_path="$path"
21011
21012  windows_path="$new_path"
21013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21014    unix_path=`$CYGPATH -u "$windows_path"`
21015    new_path="$unix_path"
21016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21018    new_path="$unix_path"
21019  fi
21020
21021
21022    new_path=`$WHICH "$new_path" 2> /dev/null`
21023
21024    if test "x$new_path" = x; then
21025      # It's still not found. Now this is an unrecoverable error.
21026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21027$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21028      has_space=`$ECHO "$complete" | $GREP " "`
21029      if test "x$has_space" != x; then
21030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21032      fi
21033      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21034    fi
21035  fi
21036
21037  # Now new_path has a complete unix path to the binary
21038  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21039    # Keep paths in /bin as-is, but remove trailing .exe if any
21040    new_path="${new_path/%.exe/}"
21041    # Do not save /bin paths to all_fixpath_prefixes!
21042  else
21043    # Not in mixed or Windows style, start by that.
21044    new_path=`cmd //c echo $new_path`
21045
21046  input_path="$new_path"
21047  # Check if we need to convert this using DOS-style short mode. If the path
21048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21049  # take no chances and rewrite it.
21050  # Note: m4 eats our [], so we need to use [ and ] instead.
21051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21052  if test "x$has_forbidden_chars" != x; then
21053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21055  fi
21056
21057    # Output is in $new_path
21058
21059  windows_path="$new_path"
21060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21061    unix_path=`$CYGPATH -u "$windows_path"`
21062    new_path="$unix_path"
21063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21065    new_path="$unix_path"
21066  fi
21067
21068    # remove trailing .exe if any
21069    new_path="${new_path/%.exe/}"
21070
21071    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21072    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21073  fi
21074
21075  else
21076    # We're on a posix platform. Hooray! :)
21077    # First separate the path from the arguments. This will split at the first
21078    # space.
21079    complete="$CXX"
21080    path="${complete%% *}"
21081    tmp="$complete EOL"
21082    arguments="${tmp#* }"
21083
21084    # Cannot rely on the command "which" here since it doesn't always work.
21085    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21086    if test -z "$is_absolute_path"; then
21087      # Path to executable is not absolute. Find it.
21088      IFS_save="$IFS"
21089      IFS=:
21090      for p in $PATH; do
21091        if test -f "$p/$path" && test -x "$p/$path"; then
21092          new_path="$p/$path"
21093          break
21094        fi
21095      done
21096      IFS="$IFS_save"
21097    else
21098      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21099$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21100      new_path="$path"
21101    fi
21102
21103    if test "x$new_path" = x; then
21104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21105$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21106        has_space=`$ECHO "$complete" | $GREP " "`
21107        if test "x$has_space" != x; then
21108          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21109$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21110        fi
21111        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21112      fi
21113  fi
21114
21115      # Now join together the path and the arguments once again
21116      if test "x$arguments" != xEOL; then
21117        new_complete="$new_path ${arguments% *}"
21118      else
21119        new_complete="$new_path"
21120      fi
21121
21122  if test "x$complete" != "x$new_complete"; then
21123      CXX="$new_complete"
21124      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21125$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21126    fi
21127
21128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21129$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21130  TEST_COMPILER="$CXX"
21131
21132    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21133        # Follow a chain of symbolic links. Use readlink
21134        # where it exists, else fall back to horribly
21135        # complicated shell code.
21136        if test "x$READLINK_TESTED" != yes; then
21137            # On MacOSX there is a readlink tool with a different
21138            # purpose than the GNU readlink tool. Check the found readlink.
21139            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21140            if test "x$ISGNU" = x; then
21141                 # A readlink that we do not know how to use.
21142                 # Are there other non-GNU readlinks out there?
21143                 READLINK_TESTED=yes
21144                 READLINK=
21145            fi
21146        fi
21147
21148        if test "x$READLINK" != x; then
21149            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21150        else
21151            # Save the current directory for restoring afterwards
21152            STARTDIR=$PWD
21153            COUNTER=0
21154            sym_link_dir=`$DIRNAME $TEST_COMPILER`
21155            sym_link_file=`$BASENAME $TEST_COMPILER`
21156            cd $sym_link_dir
21157            # Use -P flag to resolve symlinks in directories.
21158            cd `$THEPWDCMD -P`
21159            sym_link_dir=`$THEPWDCMD -P`
21160            # Resolve file symlinks
21161            while test $COUNTER -lt 20; do
21162                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21163                if test "x$ISLINK" == x; then
21164                    # This is not a symbolic link! We are done!
21165                    break
21166                fi
21167                # Again resolve directory symlinks since the target of the just found
21168                # link could be in a different directory
21169                cd `$DIRNAME $ISLINK`
21170                sym_link_dir=`$THEPWDCMD -P`
21171                sym_link_file=`$BASENAME $ISLINK`
21172                let COUNTER=COUNTER+1
21173            done
21174            cd $STARTDIR
21175            TEST_COMPILER=$sym_link_dir/$sym_link_file
21176        fi
21177    fi
21178
21179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21180$as_echo "$TEST_COMPILER" >&6; }
21181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21182$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21183
21184  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21185  if test "x$COMPILER_BASENAME" = "xccache"; then
21186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21187$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21188    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21189    # We want to control ccache invocation ourselves, so ignore this cc and try
21190    # searching again.
21191
21192    # Remove the path to the fake ccache cc from the PATH
21193    RETRY_COMPILER_SAVED_PATH="$PATH"
21194    COMPILER_DIRNAME=`$DIRNAME $CXX`
21195    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21196
21197    # Try again looking for our compiler
21198    if test -n "$ac_tool_prefix"; then
21199  for ac_prog in $COMPILER_CHECK_LIST
21200  do
21201    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21202set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21204$as_echo_n "checking for $ac_word... " >&6; }
21205if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
21206  $as_echo_n "(cached) " >&6
21207else
21208  if test -n "$PROPER_COMPILER_CXX"; then
21209  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21210else
21211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21212for as_dir in $PATH
21213do
21214  IFS=$as_save_IFS
21215  test -z "$as_dir" && as_dir=.
21216    for ac_exec_ext in '' $ac_executable_extensions; do
21217  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21218    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21220    break 2
21221  fi
21222done
21223  done
21224IFS=$as_save_IFS
21225
21226fi
21227fi
21228PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21229if test -n "$PROPER_COMPILER_CXX"; then
21230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21231$as_echo "$PROPER_COMPILER_CXX" >&6; }
21232else
21233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21234$as_echo "no" >&6; }
21235fi
21236
21237
21238    test -n "$PROPER_COMPILER_CXX" && break
21239  done
21240fi
21241if test -z "$PROPER_COMPILER_CXX"; then
21242  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21243  for ac_prog in $COMPILER_CHECK_LIST
21244do
21245  # Extract the first word of "$ac_prog", so it can be a program name with args.
21246set dummy $ac_prog; ac_word=$2
21247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21248$as_echo_n "checking for $ac_word... " >&6; }
21249if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
21250  $as_echo_n "(cached) " >&6
21251else
21252  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21253  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21254else
21255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21256for as_dir in $PATH
21257do
21258  IFS=$as_save_IFS
21259  test -z "$as_dir" && as_dir=.
21260    for ac_exec_ext in '' $ac_executable_extensions; do
21261  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21262    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21264    break 2
21265  fi
21266done
21267  done
21268IFS=$as_save_IFS
21269
21270fi
21271fi
21272ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21273if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21275$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21276else
21277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21278$as_echo "no" >&6; }
21279fi
21280
21281
21282  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21283done
21284
21285  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21286    PROPER_COMPILER_CXX=""
21287  else
21288    case $cross_compiling:$ac_tool_warned in
21289yes:)
21290{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21291$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21292ac_tool_warned=yes ;;
21293esac
21294    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21295  fi
21296fi
21297
21298
21299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21300
21301  # First separate the path from the arguments. This will split at the first
21302  # space.
21303  complete="$PROPER_COMPILER_CXX"
21304  path="${complete%% *}"
21305  tmp="$complete EOL"
21306  arguments="${tmp#* }"
21307
21308  # Input might be given as Windows format, start by converting to
21309  # unix format.
21310  new_path=`$CYGPATH -u "$path"`
21311
21312  # Now try to locate executable using which
21313  new_path=`$WHICH "$new_path" 2> /dev/null`
21314  # bat and cmd files are not always considered executable in cygwin causing which
21315  # to not find them
21316  if test "x$new_path" = x \
21317           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21318           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21319    new_path=`$CYGPATH -u "$path"`
21320  fi
21321  if test "x$new_path" = x; then
21322    # Oops. Which didn't find the executable.
21323    # The splitting of arguments from the executable at a space might have been incorrect,
21324    # since paths with space are more likely in Windows. Give it another try with the whole
21325    # argument.
21326    path="$complete"
21327    arguments="EOL"
21328    new_path=`$CYGPATH -u "$path"`
21329    new_path=`$WHICH "$new_path" 2> /dev/null`
21330    # bat and cmd files are not always considered executable in cygwin causing which
21331    # to not find them
21332    if test "x$new_path" = x \
21333             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21334             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21335      new_path=`$CYGPATH -u "$path"`
21336    fi
21337    if test "x$new_path" = x; then
21338      # It's still not found. Now this is an unrecoverable error.
21339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21340$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21341      has_space=`$ECHO "$complete" | $GREP " "`
21342      if test "x$has_space" != x; then
21343        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21344$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21345      fi
21346      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21347    fi
21348  fi
21349
21350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21353  # "foo.exe" is OK but "foo" is an error.
21354  #
21355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21356  # It is also a way to make sure we got the proper file name for the real test later on.
21357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21358  if test "x$test_shortpath" = x; then
21359    # Short path failed, file does not exist as specified.
21360    # Try adding .exe or .cmd
21361    if test -f "${new_path}.exe"; then
21362       input_to_shortpath="${new_path}.exe"
21363    elif test -f "${new_path}.cmd"; then
21364       input_to_shortpath="${new_path}.cmd"
21365    else
21366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21367$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21368      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21369$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21370      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21371    fi
21372  else
21373    input_to_shortpath="$new_path"
21374  fi
21375
21376  # Call helper function which possibly converts this using DOS-style short mode.
21377  # If so, the updated path is stored in $new_path.
21378  new_path="$input_to_shortpath"
21379
21380  input_path="$input_to_shortpath"
21381  # Check if we need to convert this using DOS-style short mode. If the path
21382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21383  # take no chances and rewrite it.
21384  # Note: m4 eats our [], so we need to use [ and ] instead.
21385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21386  if test "x$has_forbidden_chars" != x; then
21387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21391      # Going to short mode and back again did indeed matter. Since short mode is
21392      # case insensitive, let's make it lowercase to improve readability.
21393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21394      # Now convert it back to Unix-stile (cygpath)
21395      input_path=`$CYGPATH -u "$shortmode_path"`
21396      new_path="$input_path"
21397    fi
21398  fi
21399
21400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21401  if test "x$test_cygdrive_prefix" = x; then
21402    # As a simple fix, exclude /usr/bin since it's not a real path.
21403    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21405      # a path prefixed by /cygdrive for fixpath to work.
21406      new_path="$CYGWIN_ROOT_PATH$input_path"
21407    fi
21408  fi
21409
21410  # remove trailing .exe if any
21411  new_path="${new_path/%.exe/}"
21412
21413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21414
21415  # First separate the path from the arguments. This will split at the first
21416  # space.
21417  complete="$PROPER_COMPILER_CXX"
21418  path="${complete%% *}"
21419  tmp="$complete EOL"
21420  arguments="${tmp#* }"
21421
21422  # Input might be given as Windows format, start by converting to
21423  # unix format.
21424  new_path="$path"
21425
21426  windows_path="$new_path"
21427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21428    unix_path=`$CYGPATH -u "$windows_path"`
21429    new_path="$unix_path"
21430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21432    new_path="$unix_path"
21433  fi
21434
21435
21436  # Now try to locate executable using which
21437  new_path=`$WHICH "$new_path" 2> /dev/null`
21438
21439  if test "x$new_path" = x; then
21440    # Oops. Which didn't find the executable.
21441    # The splitting of arguments from the executable at a space might have been incorrect,
21442    # since paths with space are more likely in Windows. Give it another try with the whole
21443    # argument.
21444    path="$complete"
21445    arguments="EOL"
21446    new_path="$path"
21447
21448  windows_path="$new_path"
21449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21450    unix_path=`$CYGPATH -u "$windows_path"`
21451    new_path="$unix_path"
21452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21454    new_path="$unix_path"
21455  fi
21456
21457
21458    new_path=`$WHICH "$new_path" 2> /dev/null`
21459
21460    if test "x$new_path" = x; then
21461      # It's still not found. Now this is an unrecoverable error.
21462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21463$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21464      has_space=`$ECHO "$complete" | $GREP " "`
21465      if test "x$has_space" != x; then
21466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21468      fi
21469      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21470    fi
21471  fi
21472
21473  # Now new_path has a complete unix path to the binary
21474  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21475    # Keep paths in /bin as-is, but remove trailing .exe if any
21476    new_path="${new_path/%.exe/}"
21477    # Do not save /bin paths to all_fixpath_prefixes!
21478  else
21479    # Not in mixed or Windows style, start by that.
21480    new_path=`cmd //c echo $new_path`
21481
21482  input_path="$new_path"
21483  # Check if we need to convert this using DOS-style short mode. If the path
21484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21485  # take no chances and rewrite it.
21486  # Note: m4 eats our [], so we need to use [ and ] instead.
21487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21488  if test "x$has_forbidden_chars" != x; then
21489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21491  fi
21492
21493    # Output is in $new_path
21494
21495  windows_path="$new_path"
21496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21497    unix_path=`$CYGPATH -u "$windows_path"`
21498    new_path="$unix_path"
21499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21501    new_path="$unix_path"
21502  fi
21503
21504    # remove trailing .exe if any
21505    new_path="${new_path/%.exe/}"
21506
21507    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21508    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21509  fi
21510
21511  else
21512    # We're on a posix platform. Hooray! :)
21513    # First separate the path from the arguments. This will split at the first
21514    # space.
21515    complete="$PROPER_COMPILER_CXX"
21516    path="${complete%% *}"
21517    tmp="$complete EOL"
21518    arguments="${tmp#* }"
21519
21520    # Cannot rely on the command "which" here since it doesn't always work.
21521    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21522    if test -z "$is_absolute_path"; then
21523      # Path to executable is not absolute. Find it.
21524      IFS_save="$IFS"
21525      IFS=:
21526      for p in $PATH; do
21527        if test -f "$p/$path" && test -x "$p/$path"; then
21528          new_path="$p/$path"
21529          break
21530        fi
21531      done
21532      IFS="$IFS_save"
21533    else
21534      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21535$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21536      new_path="$path"
21537    fi
21538
21539    if test "x$new_path" = x; then
21540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21541$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21542        has_space=`$ECHO "$complete" | $GREP " "`
21543        if test "x$has_space" != x; then
21544          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21545$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21546        fi
21547        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21548      fi
21549  fi
21550
21551      # Now join together the path and the arguments once again
21552      if test "x$arguments" != xEOL; then
21553        new_complete="$new_path ${arguments% *}"
21554      else
21555        new_complete="$new_path"
21556      fi
21557
21558  if test "x$complete" != "x$new_complete"; then
21559      PROPER_COMPILER_CXX="$new_complete"
21560      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21561$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21562    fi
21563
21564    PATH="$RETRY_COMPILER_SAVED_PATH"
21565
21566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21567$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21568
21569    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21570        # Follow a chain of symbolic links. Use readlink
21571        # where it exists, else fall back to horribly
21572        # complicated shell code.
21573        if test "x$READLINK_TESTED" != yes; then
21574            # On MacOSX there is a readlink tool with a different
21575            # purpose than the GNU readlink tool. Check the found readlink.
21576            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21577            if test "x$ISGNU" = x; then
21578                 # A readlink that we do not know how to use.
21579                 # Are there other non-GNU readlinks out there?
21580                 READLINK_TESTED=yes
21581                 READLINK=
21582            fi
21583        fi
21584
21585        if test "x$READLINK" != x; then
21586            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21587        else
21588            # Save the current directory for restoring afterwards
21589            STARTDIR=$PWD
21590            COUNTER=0
21591            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21592            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21593            cd $sym_link_dir
21594            # Use -P flag to resolve symlinks in directories.
21595            cd `$THEPWDCMD -P`
21596            sym_link_dir=`$THEPWDCMD -P`
21597            # Resolve file symlinks
21598            while test $COUNTER -lt 20; do
21599                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21600                if test "x$ISLINK" == x; then
21601                    # This is not a symbolic link! We are done!
21602                    break
21603                fi
21604                # Again resolve directory symlinks since the target of the just found
21605                # link could be in a different directory
21606                cd `$DIRNAME $ISLINK`
21607                sym_link_dir=`$THEPWDCMD -P`
21608                sym_link_file=`$BASENAME $ISLINK`
21609                let COUNTER=COUNTER+1
21610            done
21611            cd $STARTDIR
21612            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21613        fi
21614    fi
21615
21616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21617$as_echo "$PROPER_COMPILER_CXX" >&6; }
21618    CXX="$PROPER_COMPILER_CXX"
21619  else
21620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21621$as_echo "no, keeping CXX" >&6; }
21622    CXX="$TEST_COMPILER"
21623  fi
21624
21625  COMPILER=$CXX
21626  COMPILER_NAME=$COMPILER_NAME
21627
21628  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21629    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21630    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21631    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21632    if test $? -ne 0; then
21633      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21634
21635      { $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
21636$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21637      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21638$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21639      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21640    else
21641      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21642      COMPILER_VENDOR="Sun Studio"
21643    fi
21644  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21645    # First line typically looks something like:
21646    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21647    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21648    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21649    COMPILER_VENDOR="Microsoft CL.EXE"
21650    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21651    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21652      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21653        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21654      fi
21655    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21656      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21657        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21658      fi
21659    fi
21660  else
21661    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21662    # Check that this is likely to be GCC.
21663    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21664    if test $? -ne 0; then
21665      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21666$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21667      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21668$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21669      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21670    fi
21671
21672    # First line typically looks something like:
21673    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21674    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21675    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21676  fi
21677  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21678  CXX_VERSION="$COMPILER_VERSION"
21679  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21680  CXX_VENDOR="$COMPILER_VENDOR"
21681
21682  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21683$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21684
21685
21686# Now that we have resolved CXX ourself, let autoconf have its go at it
21687ac_ext=cpp
21688ac_cpp='$CXXCPP $CPPFLAGS'
21689ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21690ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21691ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21692if test -z "$CXX"; then
21693  if test -n "$CCC"; then
21694    CXX=$CCC
21695  else
21696    if test -n "$ac_tool_prefix"; then
21697  for ac_prog in $CXX
21698  do
21699    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21700set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21702$as_echo_n "checking for $ac_word... " >&6; }
21703if test "${ac_cv_prog_CXX+set}" = set; then :
21704  $as_echo_n "(cached) " >&6
21705else
21706  if test -n "$CXX"; then
21707  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21708else
21709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21710for as_dir in $PATH
21711do
21712  IFS=$as_save_IFS
21713  test -z "$as_dir" && as_dir=.
21714    for ac_exec_ext in '' $ac_executable_extensions; do
21715  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21716    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21718    break 2
21719  fi
21720done
21721  done
21722IFS=$as_save_IFS
21723
21724fi
21725fi
21726CXX=$ac_cv_prog_CXX
21727if test -n "$CXX"; then
21728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21729$as_echo "$CXX" >&6; }
21730else
21731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21732$as_echo "no" >&6; }
21733fi
21734
21735
21736    test -n "$CXX" && break
21737  done
21738fi
21739if test -z "$CXX"; then
21740  ac_ct_CXX=$CXX
21741  for ac_prog in $CXX
21742do
21743  # Extract the first word of "$ac_prog", so it can be a program name with args.
21744set dummy $ac_prog; ac_word=$2
21745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21746$as_echo_n "checking for $ac_word... " >&6; }
21747if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21748  $as_echo_n "(cached) " >&6
21749else
21750  if test -n "$ac_ct_CXX"; then
21751  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21752else
21753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21754for as_dir in $PATH
21755do
21756  IFS=$as_save_IFS
21757  test -z "$as_dir" && as_dir=.
21758    for ac_exec_ext in '' $ac_executable_extensions; do
21759  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21760    ac_cv_prog_ac_ct_CXX="$ac_prog"
21761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21762    break 2
21763  fi
21764done
21765  done
21766IFS=$as_save_IFS
21767
21768fi
21769fi
21770ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21771if test -n "$ac_ct_CXX"; then
21772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21773$as_echo "$ac_ct_CXX" >&6; }
21774else
21775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21776$as_echo "no" >&6; }
21777fi
21778
21779
21780  test -n "$ac_ct_CXX" && break
21781done
21782
21783  if test "x$ac_ct_CXX" = x; then
21784    CXX="g++"
21785  else
21786    case $cross_compiling:$ac_tool_warned in
21787yes:)
21788{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21789$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21790ac_tool_warned=yes ;;
21791esac
21792    CXX=$ac_ct_CXX
21793  fi
21794fi
21795
21796  fi
21797fi
21798# Provide some information about the compiler.
21799$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21800set X $ac_compile
21801ac_compiler=$2
21802for ac_option in --version -v -V -qversion; do
21803  { { ac_try="$ac_compiler $ac_option >&5"
21804case "(($ac_try" in
21805  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21806  *) ac_try_echo=$ac_try;;
21807esac
21808eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21809$as_echo "$ac_try_echo"; } >&5
21810  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21811  ac_status=$?
21812  if test -s conftest.err; then
21813    sed '10a\
21814... rest of stderr output deleted ...
21815         10q' conftest.err >conftest.er1
21816    cat conftest.er1 >&5
21817  fi
21818  rm -f conftest.er1 conftest.err
21819  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21820  test $ac_status = 0; }
21821done
21822
21823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21824$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21825if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21826  $as_echo_n "(cached) " >&6
21827else
21828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21829/* end confdefs.h.  */
21830
21831int
21832main ()
21833{
21834#ifndef __GNUC__
21835       choke me
21836#endif
21837
21838  ;
21839  return 0;
21840}
21841_ACEOF
21842if ac_fn_cxx_try_compile "$LINENO"; then :
21843  ac_compiler_gnu=yes
21844else
21845  ac_compiler_gnu=no
21846fi
21847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21848ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21849
21850fi
21851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21852$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21853if test $ac_compiler_gnu = yes; then
21854  GXX=yes
21855else
21856  GXX=
21857fi
21858ac_test_CXXFLAGS=${CXXFLAGS+set}
21859ac_save_CXXFLAGS=$CXXFLAGS
21860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21861$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21862if test "${ac_cv_prog_cxx_g+set}" = set; then :
21863  $as_echo_n "(cached) " >&6
21864else
21865  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21866   ac_cxx_werror_flag=yes
21867   ac_cv_prog_cxx_g=no
21868   CXXFLAGS="-g"
21869   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21870/* end confdefs.h.  */
21871
21872int
21873main ()
21874{
21875
21876  ;
21877  return 0;
21878}
21879_ACEOF
21880if ac_fn_cxx_try_compile "$LINENO"; then :
21881  ac_cv_prog_cxx_g=yes
21882else
21883  CXXFLAGS=""
21884      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21885/* end confdefs.h.  */
21886
21887int
21888main ()
21889{
21890
21891  ;
21892  return 0;
21893}
21894_ACEOF
21895if ac_fn_cxx_try_compile "$LINENO"; then :
21896
21897else
21898  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21899	 CXXFLAGS="-g"
21900	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21901/* end confdefs.h.  */
21902
21903int
21904main ()
21905{
21906
21907  ;
21908  return 0;
21909}
21910_ACEOF
21911if ac_fn_cxx_try_compile "$LINENO"; then :
21912  ac_cv_prog_cxx_g=yes
21913fi
21914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21915fi
21916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21917fi
21918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21919   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21920fi
21921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21922$as_echo "$ac_cv_prog_cxx_g" >&6; }
21923if test "$ac_test_CXXFLAGS" = set; then
21924  CXXFLAGS=$ac_save_CXXFLAGS
21925elif test $ac_cv_prog_cxx_g = yes; then
21926  if test "$GXX" = yes; then
21927    CXXFLAGS="-g -O2"
21928  else
21929    CXXFLAGS="-g"
21930  fi
21931else
21932  if test "$GXX" = yes; then
21933    CXXFLAGS="-O2"
21934  else
21935    CXXFLAGS=
21936  fi
21937fi
21938ac_ext=cpp
21939ac_cpp='$CXXCPP $CPPFLAGS'
21940ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21941ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21942ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21943
21944
21945### Locate other tools
21946
21947if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21948    ac_ext=m
21949ac_cpp='$OBJCPP $CPPFLAGS'
21950ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21951ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21952ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21953if test -n "$ac_tool_prefix"; then
21954  for ac_prog in gcc objcc objc cc CC
21955  do
21956    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21957set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21959$as_echo_n "checking for $ac_word... " >&6; }
21960if test "${ac_cv_prog_OBJC+set}" = set; then :
21961  $as_echo_n "(cached) " >&6
21962else
21963  if test -n "$OBJC"; then
21964  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21965else
21966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21967for as_dir in $PATH
21968do
21969  IFS=$as_save_IFS
21970  test -z "$as_dir" && as_dir=.
21971    for ac_exec_ext in '' $ac_executable_extensions; do
21972  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21973    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21975    break 2
21976  fi
21977done
21978  done
21979IFS=$as_save_IFS
21980
21981fi
21982fi
21983OBJC=$ac_cv_prog_OBJC
21984if test -n "$OBJC"; then
21985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21986$as_echo "$OBJC" >&6; }
21987else
21988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21989$as_echo "no" >&6; }
21990fi
21991
21992
21993    test -n "$OBJC" && break
21994  done
21995fi
21996if test -z "$OBJC"; then
21997  ac_ct_OBJC=$OBJC
21998  for ac_prog in gcc objcc objc cc CC
21999do
22000  # Extract the first word of "$ac_prog", so it can be a program name with args.
22001set dummy $ac_prog; ac_word=$2
22002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22003$as_echo_n "checking for $ac_word... " >&6; }
22004if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
22005  $as_echo_n "(cached) " >&6
22006else
22007  if test -n "$ac_ct_OBJC"; then
22008  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22009else
22010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22011for as_dir in $PATH
22012do
22013  IFS=$as_save_IFS
22014  test -z "$as_dir" && as_dir=.
22015    for ac_exec_ext in '' $ac_executable_extensions; do
22016  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22017    ac_cv_prog_ac_ct_OBJC="$ac_prog"
22018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22019    break 2
22020  fi
22021done
22022  done
22023IFS=$as_save_IFS
22024
22025fi
22026fi
22027ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22028if test -n "$ac_ct_OBJC"; then
22029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22030$as_echo "$ac_ct_OBJC" >&6; }
22031else
22032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22033$as_echo "no" >&6; }
22034fi
22035
22036
22037  test -n "$ac_ct_OBJC" && break
22038done
22039
22040  if test "x$ac_ct_OBJC" = x; then
22041    OBJC="gcc"
22042  else
22043    case $cross_compiling:$ac_tool_warned in
22044yes:)
22045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22047ac_tool_warned=yes ;;
22048esac
22049    OBJC=$ac_ct_OBJC
22050  fi
22051fi
22052
22053# Provide some information about the compiler.
22054$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22055set X $ac_compile
22056ac_compiler=$2
22057for ac_option in --version -v -V -qversion; do
22058  { { ac_try="$ac_compiler $ac_option >&5"
22059case "(($ac_try" in
22060  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22061  *) ac_try_echo=$ac_try;;
22062esac
22063eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22064$as_echo "$ac_try_echo"; } >&5
22065  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22066  ac_status=$?
22067  if test -s conftest.err; then
22068    sed '10a\
22069... rest of stderr output deleted ...
22070         10q' conftest.err >conftest.er1
22071    cat conftest.er1 >&5
22072  fi
22073  rm -f conftest.er1 conftest.err
22074  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22075  test $ac_status = 0; }
22076done
22077
22078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22079$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22080if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
22081  $as_echo_n "(cached) " >&6
22082else
22083  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22084/* end confdefs.h.  */
22085
22086int
22087main ()
22088{
22089#ifndef __GNUC__
22090       choke me
22091#endif
22092
22093  ;
22094  return 0;
22095}
22096_ACEOF
22097if ac_fn_objc_try_compile "$LINENO"; then :
22098  ac_compiler_gnu=yes
22099else
22100  ac_compiler_gnu=no
22101fi
22102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22103ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22104
22105fi
22106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22107$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22108if test $ac_compiler_gnu = yes; then
22109  GOBJC=yes
22110else
22111  GOBJC=
22112fi
22113ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22114ac_save_OBJCFLAGS=$OBJCFLAGS
22115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22116$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22117if test "${ac_cv_prog_objc_g+set}" = set; then :
22118  $as_echo_n "(cached) " >&6
22119else
22120  ac_save_objc_werror_flag=$ac_objc_werror_flag
22121   ac_objc_werror_flag=yes
22122   ac_cv_prog_objc_g=no
22123   OBJCFLAGS="-g"
22124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22125/* end confdefs.h.  */
22126
22127int
22128main ()
22129{
22130
22131  ;
22132  return 0;
22133}
22134_ACEOF
22135if ac_fn_objc_try_compile "$LINENO"; then :
22136  ac_cv_prog_objc_g=yes
22137else
22138  OBJCFLAGS=""
22139      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22140/* end confdefs.h.  */
22141
22142int
22143main ()
22144{
22145
22146  ;
22147  return 0;
22148}
22149_ACEOF
22150if ac_fn_objc_try_compile "$LINENO"; then :
22151
22152else
22153  ac_objc_werror_flag=$ac_save_objc_werror_flag
22154	 OBJCFLAGS="-g"
22155	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22156/* end confdefs.h.  */
22157
22158int
22159main ()
22160{
22161
22162  ;
22163  return 0;
22164}
22165_ACEOF
22166if ac_fn_objc_try_compile "$LINENO"; then :
22167  ac_cv_prog_objc_g=yes
22168fi
22169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22170fi
22171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22172fi
22173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22174   ac_objc_werror_flag=$ac_save_objc_werror_flag
22175fi
22176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22177$as_echo "$ac_cv_prog_objc_g" >&6; }
22178if test "$ac_test_OBJCFLAGS" = set; then
22179  OBJCFLAGS=$ac_save_OBJCFLAGS
22180elif test $ac_cv_prog_objc_g = yes; then
22181  if test "$GOBJC" = yes; then
22182    OBJCFLAGS="-g -O2"
22183  else
22184    OBJCFLAGS="-g"
22185  fi
22186else
22187  if test "$GOBJC" = yes; then
22188    OBJCFLAGS="-O2"
22189  else
22190    OBJCFLAGS=
22191  fi
22192fi
22193ac_ext=cpp
22194ac_cpp='$CXXCPP $CPPFLAGS'
22195ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22196ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22197ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22198
22199
22200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22201
22202  # First separate the path from the arguments. This will split at the first
22203  # space.
22204  complete="$OBJC"
22205  path="${complete%% *}"
22206  tmp="$complete EOL"
22207  arguments="${tmp#* }"
22208
22209  # Input might be given as Windows format, start by converting to
22210  # unix format.
22211  new_path=`$CYGPATH -u "$path"`
22212
22213  # Now try to locate executable using which
22214  new_path=`$WHICH "$new_path" 2> /dev/null`
22215  # bat and cmd files are not always considered executable in cygwin causing which
22216  # to not find them
22217  if test "x$new_path" = x \
22218           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22219           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22220    new_path=`$CYGPATH -u "$path"`
22221  fi
22222  if test "x$new_path" = x; then
22223    # Oops. Which didn't find the executable.
22224    # The splitting of arguments from the executable at a space might have been incorrect,
22225    # since paths with space are more likely in Windows. Give it another try with the whole
22226    # argument.
22227    path="$complete"
22228    arguments="EOL"
22229    new_path=`$CYGPATH -u "$path"`
22230    new_path=`$WHICH "$new_path" 2> /dev/null`
22231    # bat and cmd files are not always considered executable in cygwin causing which
22232    # to not find them
22233    if test "x$new_path" = x \
22234             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22235             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22236      new_path=`$CYGPATH -u "$path"`
22237    fi
22238    if test "x$new_path" = x; then
22239      # It's still not found. Now this is an unrecoverable error.
22240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22241$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22242      has_space=`$ECHO "$complete" | $GREP " "`
22243      if test "x$has_space" != x; then
22244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22246      fi
22247      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22248    fi
22249  fi
22250
22251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22254  # "foo.exe" is OK but "foo" is an error.
22255  #
22256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22257  # It is also a way to make sure we got the proper file name for the real test later on.
22258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22259  if test "x$test_shortpath" = x; then
22260    # Short path failed, file does not exist as specified.
22261    # Try adding .exe or .cmd
22262    if test -f "${new_path}.exe"; then
22263       input_to_shortpath="${new_path}.exe"
22264    elif test -f "${new_path}.cmd"; then
22265       input_to_shortpath="${new_path}.cmd"
22266    else
22267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22268$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22269      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22270$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22271      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22272    fi
22273  else
22274    input_to_shortpath="$new_path"
22275  fi
22276
22277  # Call helper function which possibly converts this using DOS-style short mode.
22278  # If so, the updated path is stored in $new_path.
22279  new_path="$input_to_shortpath"
22280
22281  input_path="$input_to_shortpath"
22282  # Check if we need to convert this using DOS-style short mode. If the path
22283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22284  # take no chances and rewrite it.
22285  # Note: m4 eats our [], so we need to use [ and ] instead.
22286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22287  if test "x$has_forbidden_chars" != x; then
22288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22292      # Going to short mode and back again did indeed matter. Since short mode is
22293      # case insensitive, let's make it lowercase to improve readability.
22294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22295      # Now convert it back to Unix-stile (cygpath)
22296      input_path=`$CYGPATH -u "$shortmode_path"`
22297      new_path="$input_path"
22298    fi
22299  fi
22300
22301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22302  if test "x$test_cygdrive_prefix" = x; then
22303    # As a simple fix, exclude /usr/bin since it's not a real path.
22304    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22306      # a path prefixed by /cygdrive for fixpath to work.
22307      new_path="$CYGWIN_ROOT_PATH$input_path"
22308    fi
22309  fi
22310
22311  # remove trailing .exe if any
22312  new_path="${new_path/%.exe/}"
22313
22314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22315
22316  # First separate the path from the arguments. This will split at the first
22317  # space.
22318  complete="$OBJC"
22319  path="${complete%% *}"
22320  tmp="$complete EOL"
22321  arguments="${tmp#* }"
22322
22323  # Input might be given as Windows format, start by converting to
22324  # unix format.
22325  new_path="$path"
22326
22327  windows_path="$new_path"
22328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22329    unix_path=`$CYGPATH -u "$windows_path"`
22330    new_path="$unix_path"
22331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22333    new_path="$unix_path"
22334  fi
22335
22336
22337  # Now try to locate executable using which
22338  new_path=`$WHICH "$new_path" 2> /dev/null`
22339
22340  if test "x$new_path" = x; then
22341    # Oops. Which didn't find the executable.
22342    # The splitting of arguments from the executable at a space might have been incorrect,
22343    # since paths with space are more likely in Windows. Give it another try with the whole
22344    # argument.
22345    path="$complete"
22346    arguments="EOL"
22347    new_path="$path"
22348
22349  windows_path="$new_path"
22350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22351    unix_path=`$CYGPATH -u "$windows_path"`
22352    new_path="$unix_path"
22353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22355    new_path="$unix_path"
22356  fi
22357
22358
22359    new_path=`$WHICH "$new_path" 2> /dev/null`
22360
22361    if test "x$new_path" = x; then
22362      # It's still not found. Now this is an unrecoverable error.
22363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22364$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22365      has_space=`$ECHO "$complete" | $GREP " "`
22366      if test "x$has_space" != x; then
22367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22369      fi
22370      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22371    fi
22372  fi
22373
22374  # Now new_path has a complete unix path to the binary
22375  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22376    # Keep paths in /bin as-is, but remove trailing .exe if any
22377    new_path="${new_path/%.exe/}"
22378    # Do not save /bin paths to all_fixpath_prefixes!
22379  else
22380    # Not in mixed or Windows style, start by that.
22381    new_path=`cmd //c echo $new_path`
22382
22383  input_path="$new_path"
22384  # Check if we need to convert this using DOS-style short mode. If the path
22385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22386  # take no chances and rewrite it.
22387  # Note: m4 eats our [], so we need to use [ and ] instead.
22388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22389  if test "x$has_forbidden_chars" != x; then
22390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22392  fi
22393
22394    # Output is in $new_path
22395
22396  windows_path="$new_path"
22397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22398    unix_path=`$CYGPATH -u "$windows_path"`
22399    new_path="$unix_path"
22400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22402    new_path="$unix_path"
22403  fi
22404
22405    # remove trailing .exe if any
22406    new_path="${new_path/%.exe/}"
22407
22408    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22409    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22410  fi
22411
22412  else
22413    # We're on a posix platform. Hooray! :)
22414    # First separate the path from the arguments. This will split at the first
22415    # space.
22416    complete="$OBJC"
22417    path="${complete%% *}"
22418    tmp="$complete EOL"
22419    arguments="${tmp#* }"
22420
22421    # Cannot rely on the command "which" here since it doesn't always work.
22422    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22423    if test -z "$is_absolute_path"; then
22424      # Path to executable is not absolute. Find it.
22425      IFS_save="$IFS"
22426      IFS=:
22427      for p in $PATH; do
22428        if test -f "$p/$path" && test -x "$p/$path"; then
22429          new_path="$p/$path"
22430          break
22431        fi
22432      done
22433      IFS="$IFS_save"
22434    else
22435      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22436$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22437      new_path="$path"
22438    fi
22439
22440    if test "x$new_path" = x; then
22441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22442$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22443        has_space=`$ECHO "$complete" | $GREP " "`
22444        if test "x$has_space" != x; then
22445          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22446$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22447        fi
22448        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22449      fi
22450  fi
22451
22452      # Now join together the path and the arguments once again
22453      if test "x$arguments" != xEOL; then
22454        new_complete="$new_path ${arguments% *}"
22455      else
22456        new_complete="$new_path"
22457      fi
22458
22459  if test "x$complete" != "x$new_complete"; then
22460      OBJC="$new_complete"
22461      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22462$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22463    fi
22464
22465else
22466    OBJC=
22467fi
22468
22469# Restore the flags to the user specified values.
22470# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22471CFLAGS="$ORG_CFLAGS"
22472CXXFLAGS="$ORG_CXXFLAGS"
22473OBJCFLAGS="$ORG_OBJCFLAGS"
22474
22475LD="$CC"
22476LDEXE="$CC"
22477LDCXX="$CXX"
22478LDEXECXX="$CXX"
22479
22480# LDEXE is the linker to use, when creating executables.
22481
22482# Linking C++ libraries.
22483
22484# Linking C++ executables.
22485
22486
22487if test "x$OPENJDK_TARGET_OS" != xwindows; then
22488    if test -n "$ac_tool_prefix"; then
22489  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22490set dummy ${ac_tool_prefix}ar; ac_word=$2
22491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22492$as_echo_n "checking for $ac_word... " >&6; }
22493if test "${ac_cv_prog_AR+set}" = set; then :
22494  $as_echo_n "(cached) " >&6
22495else
22496  if test -n "$AR"; then
22497  ac_cv_prog_AR="$AR" # Let the user override the test.
22498else
22499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22500for as_dir in $PATH
22501do
22502  IFS=$as_save_IFS
22503  test -z "$as_dir" && as_dir=.
22504    for ac_exec_ext in '' $ac_executable_extensions; do
22505  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22506    ac_cv_prog_AR="${ac_tool_prefix}ar"
22507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22508    break 2
22509  fi
22510done
22511  done
22512IFS=$as_save_IFS
22513
22514fi
22515fi
22516AR=$ac_cv_prog_AR
22517if test -n "$AR"; then
22518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22519$as_echo "$AR" >&6; }
22520else
22521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22522$as_echo "no" >&6; }
22523fi
22524
22525
22526fi
22527if test -z "$ac_cv_prog_AR"; then
22528  ac_ct_AR=$AR
22529  # Extract the first word of "ar", so it can be a program name with args.
22530set dummy ar; ac_word=$2
22531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22532$as_echo_n "checking for $ac_word... " >&6; }
22533if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22534  $as_echo_n "(cached) " >&6
22535else
22536  if test -n "$ac_ct_AR"; then
22537  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22538else
22539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22540for as_dir in $PATH
22541do
22542  IFS=$as_save_IFS
22543  test -z "$as_dir" && as_dir=.
22544    for ac_exec_ext in '' $ac_executable_extensions; do
22545  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22546    ac_cv_prog_ac_ct_AR="ar"
22547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22548    break 2
22549  fi
22550done
22551  done
22552IFS=$as_save_IFS
22553
22554fi
22555fi
22556ac_ct_AR=$ac_cv_prog_ac_ct_AR
22557if test -n "$ac_ct_AR"; then
22558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22559$as_echo "$ac_ct_AR" >&6; }
22560else
22561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22562$as_echo "no" >&6; }
22563fi
22564
22565  if test "x$ac_ct_AR" = x; then
22566    AR=""
22567  else
22568    case $cross_compiling:$ac_tool_warned in
22569yes:)
22570{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22571$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22572ac_tool_warned=yes ;;
22573esac
22574    AR=$ac_ct_AR
22575  fi
22576else
22577  AR="$ac_cv_prog_AR"
22578fi
22579
22580
22581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22582
22583  # First separate the path from the arguments. This will split at the first
22584  # space.
22585  complete="$AR"
22586  path="${complete%% *}"
22587  tmp="$complete EOL"
22588  arguments="${tmp#* }"
22589
22590  # Input might be given as Windows format, start by converting to
22591  # unix format.
22592  new_path=`$CYGPATH -u "$path"`
22593
22594  # Now try to locate executable using which
22595  new_path=`$WHICH "$new_path" 2> /dev/null`
22596  # bat and cmd files are not always considered executable in cygwin causing which
22597  # to not find them
22598  if test "x$new_path" = x \
22599           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22600           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22601    new_path=`$CYGPATH -u "$path"`
22602  fi
22603  if test "x$new_path" = x; then
22604    # Oops. Which didn't find the executable.
22605    # The splitting of arguments from the executable at a space might have been incorrect,
22606    # since paths with space are more likely in Windows. Give it another try with the whole
22607    # argument.
22608    path="$complete"
22609    arguments="EOL"
22610    new_path=`$CYGPATH -u "$path"`
22611    new_path=`$WHICH "$new_path" 2> /dev/null`
22612    # bat and cmd files are not always considered executable in cygwin causing which
22613    # to not find them
22614    if test "x$new_path" = x \
22615             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22616             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22617      new_path=`$CYGPATH -u "$path"`
22618    fi
22619    if test "x$new_path" = x; then
22620      # It's still not found. Now this is an unrecoverable error.
22621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22622$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22623      has_space=`$ECHO "$complete" | $GREP " "`
22624      if test "x$has_space" != x; then
22625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22627      fi
22628      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22629    fi
22630  fi
22631
22632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22635  # "foo.exe" is OK but "foo" is an error.
22636  #
22637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22638  # It is also a way to make sure we got the proper file name for the real test later on.
22639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22640  if test "x$test_shortpath" = x; then
22641    # Short path failed, file does not exist as specified.
22642    # Try adding .exe or .cmd
22643    if test -f "${new_path}.exe"; then
22644       input_to_shortpath="${new_path}.exe"
22645    elif test -f "${new_path}.cmd"; then
22646       input_to_shortpath="${new_path}.cmd"
22647    else
22648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22649$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22650      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22651$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22652      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22653    fi
22654  else
22655    input_to_shortpath="$new_path"
22656  fi
22657
22658  # Call helper function which possibly converts this using DOS-style short mode.
22659  # If so, the updated path is stored in $new_path.
22660  new_path="$input_to_shortpath"
22661
22662  input_path="$input_to_shortpath"
22663  # Check if we need to convert this using DOS-style short mode. If the path
22664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22665  # take no chances and rewrite it.
22666  # Note: m4 eats our [], so we need to use [ and ] instead.
22667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22668  if test "x$has_forbidden_chars" != x; then
22669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22673      # Going to short mode and back again did indeed matter. Since short mode is
22674      # case insensitive, let's make it lowercase to improve readability.
22675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22676      # Now convert it back to Unix-stile (cygpath)
22677      input_path=`$CYGPATH -u "$shortmode_path"`
22678      new_path="$input_path"
22679    fi
22680  fi
22681
22682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22683  if test "x$test_cygdrive_prefix" = x; then
22684    # As a simple fix, exclude /usr/bin since it's not a real path.
22685    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22687      # a path prefixed by /cygdrive for fixpath to work.
22688      new_path="$CYGWIN_ROOT_PATH$input_path"
22689    fi
22690  fi
22691
22692  # remove trailing .exe if any
22693  new_path="${new_path/%.exe/}"
22694
22695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22696
22697  # First separate the path from the arguments. This will split at the first
22698  # space.
22699  complete="$AR"
22700  path="${complete%% *}"
22701  tmp="$complete EOL"
22702  arguments="${tmp#* }"
22703
22704  # Input might be given as Windows format, start by converting to
22705  # unix format.
22706  new_path="$path"
22707
22708  windows_path="$new_path"
22709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22710    unix_path=`$CYGPATH -u "$windows_path"`
22711    new_path="$unix_path"
22712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22714    new_path="$unix_path"
22715  fi
22716
22717
22718  # Now try to locate executable using which
22719  new_path=`$WHICH "$new_path" 2> /dev/null`
22720
22721  if test "x$new_path" = x; then
22722    # Oops. Which didn't find the executable.
22723    # The splitting of arguments from the executable at a space might have been incorrect,
22724    # since paths with space are more likely in Windows. Give it another try with the whole
22725    # argument.
22726    path="$complete"
22727    arguments="EOL"
22728    new_path="$path"
22729
22730  windows_path="$new_path"
22731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22732    unix_path=`$CYGPATH -u "$windows_path"`
22733    new_path="$unix_path"
22734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22736    new_path="$unix_path"
22737  fi
22738
22739
22740    new_path=`$WHICH "$new_path" 2> /dev/null`
22741
22742    if test "x$new_path" = x; then
22743      # It's still not found. Now this is an unrecoverable error.
22744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22745$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22746      has_space=`$ECHO "$complete" | $GREP " "`
22747      if test "x$has_space" != x; then
22748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22750      fi
22751      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22752    fi
22753  fi
22754
22755  # Now new_path has a complete unix path to the binary
22756  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22757    # Keep paths in /bin as-is, but remove trailing .exe if any
22758    new_path="${new_path/%.exe/}"
22759    # Do not save /bin paths to all_fixpath_prefixes!
22760  else
22761    # Not in mixed or Windows style, start by that.
22762    new_path=`cmd //c echo $new_path`
22763
22764  input_path="$new_path"
22765  # Check if we need to convert this using DOS-style short mode. If the path
22766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22767  # take no chances and rewrite it.
22768  # Note: m4 eats our [], so we need to use [ and ] instead.
22769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22770  if test "x$has_forbidden_chars" != x; then
22771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22773  fi
22774
22775    # Output is in $new_path
22776
22777  windows_path="$new_path"
22778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22779    unix_path=`$CYGPATH -u "$windows_path"`
22780    new_path="$unix_path"
22781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22783    new_path="$unix_path"
22784  fi
22785
22786    # remove trailing .exe if any
22787    new_path="${new_path/%.exe/}"
22788
22789    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22790    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22791  fi
22792
22793  else
22794    # We're on a posix platform. Hooray! :)
22795    # First separate the path from the arguments. This will split at the first
22796    # space.
22797    complete="$AR"
22798    path="${complete%% *}"
22799    tmp="$complete EOL"
22800    arguments="${tmp#* }"
22801
22802    # Cannot rely on the command "which" here since it doesn't always work.
22803    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22804    if test -z "$is_absolute_path"; then
22805      # Path to executable is not absolute. Find it.
22806      IFS_save="$IFS"
22807      IFS=:
22808      for p in $PATH; do
22809        if test -f "$p/$path" && test -x "$p/$path"; then
22810          new_path="$p/$path"
22811          break
22812        fi
22813      done
22814      IFS="$IFS_save"
22815    else
22816      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22817$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22818      new_path="$path"
22819    fi
22820
22821    if test "x$new_path" = x; then
22822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22823$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22824        has_space=`$ECHO "$complete" | $GREP " "`
22825        if test "x$has_space" != x; then
22826          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22827$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22828        fi
22829        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22830      fi
22831  fi
22832
22833      # Now join together the path and the arguments once again
22834      if test "x$arguments" != xEOL; then
22835        new_complete="$new_path ${arguments% *}"
22836      else
22837        new_complete="$new_path"
22838      fi
22839
22840  if test "x$complete" != "x$new_complete"; then
22841      AR="$new_complete"
22842      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22843$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22844    fi
22845
22846fi
22847if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22848    ARFLAGS="-r"
22849else
22850    ARFLAGS=""
22851fi
22852
22853
22854# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22855HOTSPOT_CXX="$CXX"
22856HOTSPOT_LD="$LD"
22857
22858
22859
22860COMPILER_NAME=gcc
22861COMPILER_TYPE=CC
22862if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22863
22864    # For now, assume that we are always compiling using cl.exe.
22865    CC_OUT_OPTION=-Fo
22866    EXE_OUT_OPTION=-out:
22867    LD_OUT_OPTION=-out:
22868    AR_OUT_OPTION=-out:
22869    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22870    # program for something completely different.
22871    # Extract the first word of "link", so it can be a program name with args.
22872set dummy link; ac_word=$2
22873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22874$as_echo_n "checking for $ac_word... " >&6; }
22875if test "${ac_cv_prog_WINLD+set}" = set; then :
22876  $as_echo_n "(cached) " >&6
22877else
22878  if test -n "$WINLD"; then
22879  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22880else
22881  ac_prog_rejected=no
22882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22883for as_dir in $PATH
22884do
22885  IFS=$as_save_IFS
22886  test -z "$as_dir" && as_dir=.
22887    for ac_exec_ext in '' $ac_executable_extensions; do
22888  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22889    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22890       ac_prog_rejected=yes
22891       continue
22892     fi
22893    ac_cv_prog_WINLD="link"
22894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22895    break 2
22896  fi
22897done
22898  done
22899IFS=$as_save_IFS
22900
22901if test $ac_prog_rejected = yes; then
22902  # We found a bogon in the path, so make sure we never use it.
22903  set dummy $ac_cv_prog_WINLD
22904  shift
22905  if test $# != 0; then
22906    # We chose a different compiler from the bogus one.
22907    # However, it has the same basename, so the bogon will be chosen
22908    # first if we set WINLD to just the basename; use the full file name.
22909    shift
22910    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22911  fi
22912fi
22913fi
22914fi
22915WINLD=$ac_cv_prog_WINLD
22916if test -n "$WINLD"; then
22917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22918$as_echo "$WINLD" >&6; }
22919else
22920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22921$as_echo "no" >&6; }
22922fi
22923
22924
22925    # Since we must ignore the first found link, WINLD will contain
22926    # the full path to the link.exe program.
22927
22928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22929
22930  # First separate the path from the arguments. This will split at the first
22931  # space.
22932  complete="$WINLD"
22933  path="${complete%% *}"
22934  tmp="$complete EOL"
22935  arguments="${tmp#* }"
22936
22937  # Input might be given as Windows format, start by converting to
22938  # unix format.
22939  new_path=`$CYGPATH -u "$path"`
22940
22941  # Now try to locate executable using which
22942  new_path=`$WHICH "$new_path" 2> /dev/null`
22943  # bat and cmd files are not always considered executable in cygwin causing which
22944  # to not find them
22945  if test "x$new_path" = x \
22946           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22947           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22948    new_path=`$CYGPATH -u "$path"`
22949  fi
22950  if test "x$new_path" = x; then
22951    # Oops. Which didn't find the executable.
22952    # The splitting of arguments from the executable at a space might have been incorrect,
22953    # since paths with space are more likely in Windows. Give it another try with the whole
22954    # argument.
22955    path="$complete"
22956    arguments="EOL"
22957    new_path=`$CYGPATH -u "$path"`
22958    new_path=`$WHICH "$new_path" 2> /dev/null`
22959    # bat and cmd files are not always considered executable in cygwin causing which
22960    # to not find them
22961    if test "x$new_path" = x \
22962             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22963             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22964      new_path=`$CYGPATH -u "$path"`
22965    fi
22966    if test "x$new_path" = x; then
22967      # It's still not found. Now this is an unrecoverable error.
22968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22969$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22970      has_space=`$ECHO "$complete" | $GREP " "`
22971      if test "x$has_space" != x; then
22972        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22973$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22974      fi
22975      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22976    fi
22977  fi
22978
22979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22982  # "foo.exe" is OK but "foo" is an error.
22983  #
22984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22985  # It is also a way to make sure we got the proper file name for the real test later on.
22986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22987  if test "x$test_shortpath" = x; then
22988    # Short path failed, file does not exist as specified.
22989    # Try adding .exe or .cmd
22990    if test -f "${new_path}.exe"; then
22991       input_to_shortpath="${new_path}.exe"
22992    elif test -f "${new_path}.cmd"; then
22993       input_to_shortpath="${new_path}.cmd"
22994    else
22995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22996$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22997      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22998$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22999      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23000    fi
23001  else
23002    input_to_shortpath="$new_path"
23003  fi
23004
23005  # Call helper function which possibly converts this using DOS-style short mode.
23006  # If so, the updated path is stored in $new_path.
23007  new_path="$input_to_shortpath"
23008
23009  input_path="$input_to_shortpath"
23010  # Check if we need to convert this using DOS-style short mode. If the path
23011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23012  # take no chances and rewrite it.
23013  # Note: m4 eats our [], so we need to use [ and ] instead.
23014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23015  if test "x$has_forbidden_chars" != x; then
23016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23020      # Going to short mode and back again did indeed matter. Since short mode is
23021      # case insensitive, let's make it lowercase to improve readability.
23022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23023      # Now convert it back to Unix-stile (cygpath)
23024      input_path=`$CYGPATH -u "$shortmode_path"`
23025      new_path="$input_path"
23026    fi
23027  fi
23028
23029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23030  if test "x$test_cygdrive_prefix" = x; then
23031    # As a simple fix, exclude /usr/bin since it's not a real path.
23032    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23034      # a path prefixed by /cygdrive for fixpath to work.
23035      new_path="$CYGWIN_ROOT_PATH$input_path"
23036    fi
23037  fi
23038
23039  # remove trailing .exe if any
23040  new_path="${new_path/%.exe/}"
23041
23042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23043
23044  # First separate the path from the arguments. This will split at the first
23045  # space.
23046  complete="$WINLD"
23047  path="${complete%% *}"
23048  tmp="$complete EOL"
23049  arguments="${tmp#* }"
23050
23051  # Input might be given as Windows format, start by converting to
23052  # unix format.
23053  new_path="$path"
23054
23055  windows_path="$new_path"
23056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23057    unix_path=`$CYGPATH -u "$windows_path"`
23058    new_path="$unix_path"
23059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23061    new_path="$unix_path"
23062  fi
23063
23064
23065  # Now try to locate executable using which
23066  new_path=`$WHICH "$new_path" 2> /dev/null`
23067
23068  if test "x$new_path" = x; then
23069    # Oops. Which didn't find the executable.
23070    # The splitting of arguments from the executable at a space might have been incorrect,
23071    # since paths with space are more likely in Windows. Give it another try with the whole
23072    # argument.
23073    path="$complete"
23074    arguments="EOL"
23075    new_path="$path"
23076
23077  windows_path="$new_path"
23078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23079    unix_path=`$CYGPATH -u "$windows_path"`
23080    new_path="$unix_path"
23081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23083    new_path="$unix_path"
23084  fi
23085
23086
23087    new_path=`$WHICH "$new_path" 2> /dev/null`
23088
23089    if test "x$new_path" = x; then
23090      # It's still not found. Now this is an unrecoverable error.
23091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23092$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23093      has_space=`$ECHO "$complete" | $GREP " "`
23094      if test "x$has_space" != x; then
23095        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23096$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23097      fi
23098      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23099    fi
23100  fi
23101
23102  # Now new_path has a complete unix path to the binary
23103  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23104    # Keep paths in /bin as-is, but remove trailing .exe if any
23105    new_path="${new_path/%.exe/}"
23106    # Do not save /bin paths to all_fixpath_prefixes!
23107  else
23108    # Not in mixed or Windows style, start by that.
23109    new_path=`cmd //c echo $new_path`
23110
23111  input_path="$new_path"
23112  # Check if we need to convert this using DOS-style short mode. If the path
23113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23114  # take no chances and rewrite it.
23115  # Note: m4 eats our [], so we need to use [ and ] instead.
23116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23117  if test "x$has_forbidden_chars" != x; then
23118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23120  fi
23121
23122    # Output is in $new_path
23123
23124  windows_path="$new_path"
23125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23126    unix_path=`$CYGPATH -u "$windows_path"`
23127    new_path="$unix_path"
23128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23130    new_path="$unix_path"
23131  fi
23132
23133    # remove trailing .exe if any
23134    new_path="${new_path/%.exe/}"
23135
23136    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23137    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23138  fi
23139
23140  else
23141    # We're on a posix platform. Hooray! :)
23142    # First separate the path from the arguments. This will split at the first
23143    # space.
23144    complete="$WINLD"
23145    path="${complete%% *}"
23146    tmp="$complete EOL"
23147    arguments="${tmp#* }"
23148
23149    # Cannot rely on the command "which" here since it doesn't always work.
23150    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23151    if test -z "$is_absolute_path"; then
23152      # Path to executable is not absolute. Find it.
23153      IFS_save="$IFS"
23154      IFS=:
23155      for p in $PATH; do
23156        if test -f "$p/$path" && test -x "$p/$path"; then
23157          new_path="$p/$path"
23158          break
23159        fi
23160      done
23161      IFS="$IFS_save"
23162    else
23163      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23164$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23165      new_path="$path"
23166    fi
23167
23168    if test "x$new_path" = x; then
23169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23170$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23171        has_space=`$ECHO "$complete" | $GREP " "`
23172        if test "x$has_space" != x; then
23173          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23174$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23175        fi
23176        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23177      fi
23178  fi
23179
23180      # Now join together the path and the arguments once again
23181      if test "x$arguments" != xEOL; then
23182        new_complete="$new_path ${arguments% *}"
23183      else
23184        new_complete="$new_path"
23185      fi
23186
23187  if test "x$complete" != "x$new_complete"; then
23188      WINLD="$new_complete"
23189      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23190$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23191    fi
23192
23193    printf "Windows linker was found at $WINLD\n"
23194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23195$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23196    "$WINLD" --version > /dev/null
23197    if test $? -eq 0 ; then
23198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23199$as_echo "no" >&6; }
23200      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23201    else
23202      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23203$as_echo "yes" >&6; }
23204    fi
23205    LD="$WINLD"
23206    LDEXE="$WINLD"
23207    LDCXX="$WINLD"
23208    LDEXECXX="$WINLD"
23209
23210    # Extract the first word of "mt", so it can be a program name with args.
23211set dummy mt; ac_word=$2
23212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23213$as_echo_n "checking for $ac_word... " >&6; }
23214if test "${ac_cv_prog_MT+set}" = set; then :
23215  $as_echo_n "(cached) " >&6
23216else
23217  if test -n "$MT"; then
23218  ac_cv_prog_MT="$MT" # Let the user override the test.
23219else
23220  ac_prog_rejected=no
23221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23222for as_dir in $PATH
23223do
23224  IFS=$as_save_IFS
23225  test -z "$as_dir" && as_dir=.
23226    for ac_exec_ext in '' $ac_executable_extensions; do
23227  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23228    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23229       ac_prog_rejected=yes
23230       continue
23231     fi
23232    ac_cv_prog_MT="mt"
23233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23234    break 2
23235  fi
23236done
23237  done
23238IFS=$as_save_IFS
23239
23240if test $ac_prog_rejected = yes; then
23241  # We found a bogon in the path, so make sure we never use it.
23242  set dummy $ac_cv_prog_MT
23243  shift
23244  if test $# != 0; then
23245    # We chose a different compiler from the bogus one.
23246    # However, it has the same basename, so the bogon will be chosen
23247    # first if we set MT to just the basename; use the full file name.
23248    shift
23249    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23250  fi
23251fi
23252fi
23253fi
23254MT=$ac_cv_prog_MT
23255if test -n "$MT"; then
23256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23257$as_echo "$MT" >&6; }
23258else
23259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23260$as_echo "no" >&6; }
23261fi
23262
23263
23264
23265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23266
23267  # First separate the path from the arguments. This will split at the first
23268  # space.
23269  complete="$MT"
23270  path="${complete%% *}"
23271  tmp="$complete EOL"
23272  arguments="${tmp#* }"
23273
23274  # Input might be given as Windows format, start by converting to
23275  # unix format.
23276  new_path=`$CYGPATH -u "$path"`
23277
23278  # Now try to locate executable using which
23279  new_path=`$WHICH "$new_path" 2> /dev/null`
23280  # bat and cmd files are not always considered executable in cygwin causing which
23281  # to not find them
23282  if test "x$new_path" = x \
23283           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23284           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23285    new_path=`$CYGPATH -u "$path"`
23286  fi
23287  if test "x$new_path" = x; then
23288    # Oops. Which didn't find the executable.
23289    # The splitting of arguments from the executable at a space might have been incorrect,
23290    # since paths with space are more likely in Windows. Give it another try with the whole
23291    # argument.
23292    path="$complete"
23293    arguments="EOL"
23294    new_path=`$CYGPATH -u "$path"`
23295    new_path=`$WHICH "$new_path" 2> /dev/null`
23296    # bat and cmd files are not always considered executable in cygwin causing which
23297    # to not find them
23298    if test "x$new_path" = x \
23299             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23300             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23301      new_path=`$CYGPATH -u "$path"`
23302    fi
23303    if test "x$new_path" = x; then
23304      # It's still not found. Now this is an unrecoverable error.
23305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23306$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23307      has_space=`$ECHO "$complete" | $GREP " "`
23308      if test "x$has_space" != x; then
23309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23311      fi
23312      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23313    fi
23314  fi
23315
23316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23319  # "foo.exe" is OK but "foo" is an error.
23320  #
23321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23322  # It is also a way to make sure we got the proper file name for the real test later on.
23323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23324  if test "x$test_shortpath" = x; then
23325    # Short path failed, file does not exist as specified.
23326    # Try adding .exe or .cmd
23327    if test -f "${new_path}.exe"; then
23328       input_to_shortpath="${new_path}.exe"
23329    elif test -f "${new_path}.cmd"; then
23330       input_to_shortpath="${new_path}.cmd"
23331    else
23332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23333$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23334      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23335$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23336      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23337    fi
23338  else
23339    input_to_shortpath="$new_path"
23340  fi
23341
23342  # Call helper function which possibly converts this using DOS-style short mode.
23343  # If so, the updated path is stored in $new_path.
23344  new_path="$input_to_shortpath"
23345
23346  input_path="$input_to_shortpath"
23347  # Check if we need to convert this using DOS-style short mode. If the path
23348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23349  # take no chances and rewrite it.
23350  # Note: m4 eats our [], so we need to use [ and ] instead.
23351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23352  if test "x$has_forbidden_chars" != x; then
23353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23357      # Going to short mode and back again did indeed matter. Since short mode is
23358      # case insensitive, let's make it lowercase to improve readability.
23359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23360      # Now convert it back to Unix-stile (cygpath)
23361      input_path=`$CYGPATH -u "$shortmode_path"`
23362      new_path="$input_path"
23363    fi
23364  fi
23365
23366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23367  if test "x$test_cygdrive_prefix" = x; then
23368    # As a simple fix, exclude /usr/bin since it's not a real path.
23369    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23371      # a path prefixed by /cygdrive for fixpath to work.
23372      new_path="$CYGWIN_ROOT_PATH$input_path"
23373    fi
23374  fi
23375
23376  # remove trailing .exe if any
23377  new_path="${new_path/%.exe/}"
23378
23379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23380
23381  # First separate the path from the arguments. This will split at the first
23382  # space.
23383  complete="$MT"
23384  path="${complete%% *}"
23385  tmp="$complete EOL"
23386  arguments="${tmp#* }"
23387
23388  # Input might be given as Windows format, start by converting to
23389  # unix format.
23390  new_path="$path"
23391
23392  windows_path="$new_path"
23393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23394    unix_path=`$CYGPATH -u "$windows_path"`
23395    new_path="$unix_path"
23396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23398    new_path="$unix_path"
23399  fi
23400
23401
23402  # Now try to locate executable using which
23403  new_path=`$WHICH "$new_path" 2> /dev/null`
23404
23405  if test "x$new_path" = x; then
23406    # Oops. Which didn't find the executable.
23407    # The splitting of arguments from the executable at a space might have been incorrect,
23408    # since paths with space are more likely in Windows. Give it another try with the whole
23409    # argument.
23410    path="$complete"
23411    arguments="EOL"
23412    new_path="$path"
23413
23414  windows_path="$new_path"
23415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23416    unix_path=`$CYGPATH -u "$windows_path"`
23417    new_path="$unix_path"
23418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23420    new_path="$unix_path"
23421  fi
23422
23423
23424    new_path=`$WHICH "$new_path" 2> /dev/null`
23425
23426    if test "x$new_path" = x; then
23427      # It's still not found. Now this is an unrecoverable error.
23428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23429$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23430      has_space=`$ECHO "$complete" | $GREP " "`
23431      if test "x$has_space" != x; then
23432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23434      fi
23435      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23436    fi
23437  fi
23438
23439  # Now new_path has a complete unix path to the binary
23440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23441    # Keep paths in /bin as-is, but remove trailing .exe if any
23442    new_path="${new_path/%.exe/}"
23443    # Do not save /bin paths to all_fixpath_prefixes!
23444  else
23445    # Not in mixed or Windows style, start by that.
23446    new_path=`cmd //c echo $new_path`
23447
23448  input_path="$new_path"
23449  # Check if we need to convert this using DOS-style short mode. If the path
23450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23451  # take no chances and rewrite it.
23452  # Note: m4 eats our [], so we need to use [ and ] instead.
23453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23454  if test "x$has_forbidden_chars" != x; then
23455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23457  fi
23458
23459    # Output is in $new_path
23460
23461  windows_path="$new_path"
23462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23463    unix_path=`$CYGPATH -u "$windows_path"`
23464    new_path="$unix_path"
23465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23467    new_path="$unix_path"
23468  fi
23469
23470    # remove trailing .exe if any
23471    new_path="${new_path/%.exe/}"
23472
23473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23475  fi
23476
23477  else
23478    # We're on a posix platform. Hooray! :)
23479    # First separate the path from the arguments. This will split at the first
23480    # space.
23481    complete="$MT"
23482    path="${complete%% *}"
23483    tmp="$complete EOL"
23484    arguments="${tmp#* }"
23485
23486    # Cannot rely on the command "which" here since it doesn't always work.
23487    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23488    if test -z "$is_absolute_path"; then
23489      # Path to executable is not absolute. Find it.
23490      IFS_save="$IFS"
23491      IFS=:
23492      for p in $PATH; do
23493        if test -f "$p/$path" && test -x "$p/$path"; then
23494          new_path="$p/$path"
23495          break
23496        fi
23497      done
23498      IFS="$IFS_save"
23499    else
23500      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23501$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23502      new_path="$path"
23503    fi
23504
23505    if test "x$new_path" = x; then
23506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23507$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23508        has_space=`$ECHO "$complete" | $GREP " "`
23509        if test "x$has_space" != x; then
23510          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23511$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23512        fi
23513        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23514      fi
23515  fi
23516
23517      # Now join together the path and the arguments once again
23518      if test "x$arguments" != xEOL; then
23519        new_complete="$new_path ${arguments% *}"
23520      else
23521        new_complete="$new_path"
23522      fi
23523
23524  if test "x$complete" != "x$new_complete"; then
23525      MT="$new_complete"
23526      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23527$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23528    fi
23529
23530    # The resource compiler
23531    # Extract the first word of "rc", so it can be a program name with args.
23532set dummy rc; ac_word=$2
23533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23534$as_echo_n "checking for $ac_word... " >&6; }
23535if test "${ac_cv_prog_RC+set}" = set; then :
23536  $as_echo_n "(cached) " >&6
23537else
23538  if test -n "$RC"; then
23539  ac_cv_prog_RC="$RC" # Let the user override the test.
23540else
23541  ac_prog_rejected=no
23542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23543for as_dir in $PATH
23544do
23545  IFS=$as_save_IFS
23546  test -z "$as_dir" && as_dir=.
23547    for ac_exec_ext in '' $ac_executable_extensions; do
23548  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23549    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23550       ac_prog_rejected=yes
23551       continue
23552     fi
23553    ac_cv_prog_RC="rc"
23554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23555    break 2
23556  fi
23557done
23558  done
23559IFS=$as_save_IFS
23560
23561if test $ac_prog_rejected = yes; then
23562  # We found a bogon in the path, so make sure we never use it.
23563  set dummy $ac_cv_prog_RC
23564  shift
23565  if test $# != 0; then
23566    # We chose a different compiler from the bogus one.
23567    # However, it has the same basename, so the bogon will be chosen
23568    # first if we set RC to just the basename; use the full file name.
23569    shift
23570    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23571  fi
23572fi
23573fi
23574fi
23575RC=$ac_cv_prog_RC
23576if test -n "$RC"; then
23577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23578$as_echo "$RC" >&6; }
23579else
23580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23581$as_echo "no" >&6; }
23582fi
23583
23584
23585
23586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23587
23588  # First separate the path from the arguments. This will split at the first
23589  # space.
23590  complete="$RC"
23591  path="${complete%% *}"
23592  tmp="$complete EOL"
23593  arguments="${tmp#* }"
23594
23595  # Input might be given as Windows format, start by converting to
23596  # unix format.
23597  new_path=`$CYGPATH -u "$path"`
23598
23599  # Now try to locate executable using which
23600  new_path=`$WHICH "$new_path" 2> /dev/null`
23601  # bat and cmd files are not always considered executable in cygwin causing which
23602  # to not find them
23603  if test "x$new_path" = x \
23604           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23605           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23606    new_path=`$CYGPATH -u "$path"`
23607  fi
23608  if test "x$new_path" = x; then
23609    # Oops. Which didn't find the executable.
23610    # The splitting of arguments from the executable at a space might have been incorrect,
23611    # since paths with space are more likely in Windows. Give it another try with the whole
23612    # argument.
23613    path="$complete"
23614    arguments="EOL"
23615    new_path=`$CYGPATH -u "$path"`
23616    new_path=`$WHICH "$new_path" 2> /dev/null`
23617    # bat and cmd files are not always considered executable in cygwin causing which
23618    # to not find them
23619    if test "x$new_path" = x \
23620             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23621             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23622      new_path=`$CYGPATH -u "$path"`
23623    fi
23624    if test "x$new_path" = x; then
23625      # It's still not found. Now this is an unrecoverable error.
23626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23627$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23628      has_space=`$ECHO "$complete" | $GREP " "`
23629      if test "x$has_space" != x; then
23630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23632      fi
23633      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23634    fi
23635  fi
23636
23637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23640  # "foo.exe" is OK but "foo" is an error.
23641  #
23642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23643  # It is also a way to make sure we got the proper file name for the real test later on.
23644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23645  if test "x$test_shortpath" = x; then
23646    # Short path failed, file does not exist as specified.
23647    # Try adding .exe or .cmd
23648    if test -f "${new_path}.exe"; then
23649       input_to_shortpath="${new_path}.exe"
23650    elif test -f "${new_path}.cmd"; then
23651       input_to_shortpath="${new_path}.cmd"
23652    else
23653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23654$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23655      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23656$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23657      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23658    fi
23659  else
23660    input_to_shortpath="$new_path"
23661  fi
23662
23663  # Call helper function which possibly converts this using DOS-style short mode.
23664  # If so, the updated path is stored in $new_path.
23665  new_path="$input_to_shortpath"
23666
23667  input_path="$input_to_shortpath"
23668  # Check if we need to convert this using DOS-style short mode. If the path
23669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23670  # take no chances and rewrite it.
23671  # Note: m4 eats our [], so we need to use [ and ] instead.
23672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23673  if test "x$has_forbidden_chars" != x; then
23674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23678      # Going to short mode and back again did indeed matter. Since short mode is
23679      # case insensitive, let's make it lowercase to improve readability.
23680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23681      # Now convert it back to Unix-stile (cygpath)
23682      input_path=`$CYGPATH -u "$shortmode_path"`
23683      new_path="$input_path"
23684    fi
23685  fi
23686
23687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23688  if test "x$test_cygdrive_prefix" = x; then
23689    # As a simple fix, exclude /usr/bin since it's not a real path.
23690    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23692      # a path prefixed by /cygdrive for fixpath to work.
23693      new_path="$CYGWIN_ROOT_PATH$input_path"
23694    fi
23695  fi
23696
23697  # remove trailing .exe if any
23698  new_path="${new_path/%.exe/}"
23699
23700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23701
23702  # First separate the path from the arguments. This will split at the first
23703  # space.
23704  complete="$RC"
23705  path="${complete%% *}"
23706  tmp="$complete EOL"
23707  arguments="${tmp#* }"
23708
23709  # Input might be given as Windows format, start by converting to
23710  # unix format.
23711  new_path="$path"
23712
23713  windows_path="$new_path"
23714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23715    unix_path=`$CYGPATH -u "$windows_path"`
23716    new_path="$unix_path"
23717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23719    new_path="$unix_path"
23720  fi
23721
23722
23723  # Now try to locate executable using which
23724  new_path=`$WHICH "$new_path" 2> /dev/null`
23725
23726  if test "x$new_path" = x; then
23727    # Oops. Which didn't find the executable.
23728    # The splitting of arguments from the executable at a space might have been incorrect,
23729    # since paths with space are more likely in Windows. Give it another try with the whole
23730    # argument.
23731    path="$complete"
23732    arguments="EOL"
23733    new_path="$path"
23734
23735  windows_path="$new_path"
23736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23737    unix_path=`$CYGPATH -u "$windows_path"`
23738    new_path="$unix_path"
23739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23741    new_path="$unix_path"
23742  fi
23743
23744
23745    new_path=`$WHICH "$new_path" 2> /dev/null`
23746
23747    if test "x$new_path" = x; then
23748      # It's still not found. Now this is an unrecoverable error.
23749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23750$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23751      has_space=`$ECHO "$complete" | $GREP " "`
23752      if test "x$has_space" != x; then
23753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23755      fi
23756      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23757    fi
23758  fi
23759
23760  # Now new_path has a complete unix path to the binary
23761  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23762    # Keep paths in /bin as-is, but remove trailing .exe if any
23763    new_path="${new_path/%.exe/}"
23764    # Do not save /bin paths to all_fixpath_prefixes!
23765  else
23766    # Not in mixed or Windows style, start by that.
23767    new_path=`cmd //c echo $new_path`
23768
23769  input_path="$new_path"
23770  # Check if we need to convert this using DOS-style short mode. If the path
23771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23772  # take no chances and rewrite it.
23773  # Note: m4 eats our [], so we need to use [ and ] instead.
23774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23775  if test "x$has_forbidden_chars" != x; then
23776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23778  fi
23779
23780    # Output is in $new_path
23781
23782  windows_path="$new_path"
23783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23784    unix_path=`$CYGPATH -u "$windows_path"`
23785    new_path="$unix_path"
23786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23788    new_path="$unix_path"
23789  fi
23790
23791    # remove trailing .exe if any
23792    new_path="${new_path/%.exe/}"
23793
23794    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23795    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23796  fi
23797
23798  else
23799    # We're on a posix platform. Hooray! :)
23800    # First separate the path from the arguments. This will split at the first
23801    # space.
23802    complete="$RC"
23803    path="${complete%% *}"
23804    tmp="$complete EOL"
23805    arguments="${tmp#* }"
23806
23807    # Cannot rely on the command "which" here since it doesn't always work.
23808    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23809    if test -z "$is_absolute_path"; then
23810      # Path to executable is not absolute. Find it.
23811      IFS_save="$IFS"
23812      IFS=:
23813      for p in $PATH; do
23814        if test -f "$p/$path" && test -x "$p/$path"; then
23815          new_path="$p/$path"
23816          break
23817        fi
23818      done
23819      IFS="$IFS_save"
23820    else
23821      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23822$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23823      new_path="$path"
23824    fi
23825
23826    if test "x$new_path" = x; then
23827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23828$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23829        has_space=`$ECHO "$complete" | $GREP " "`
23830        if test "x$has_space" != x; then
23831          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23832$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23833        fi
23834        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23835      fi
23836  fi
23837
23838      # Now join together the path and the arguments once again
23839      if test "x$arguments" != xEOL; then
23840        new_complete="$new_path ${arguments% *}"
23841      else
23842        new_complete="$new_path"
23843      fi
23844
23845  if test "x$complete" != "x$new_complete"; then
23846      RC="$new_complete"
23847      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23848$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23849    fi
23850
23851
23852    # For hotspot, we need these in Windows mixed path,
23853    # so rewrite them all. Need added .exe suffix.
23854    HOTSPOT_CXX="$CXX.exe"
23855    HOTSPOT_LD="$LD.exe"
23856    HOTSPOT_MT="$MT.exe"
23857    HOTSPOT_RC="$RC.exe"
23858
23859  unix_path="$HOTSPOT_CXX"
23860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23861    windows_path=`$CYGPATH -m "$unix_path"`
23862    HOTSPOT_CXX="$windows_path"
23863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23864    windows_path=`cmd //c echo $unix_path`
23865    HOTSPOT_CXX="$windows_path"
23866  fi
23867
23868
23869  unix_path="$HOTSPOT_LD"
23870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23871    windows_path=`$CYGPATH -m "$unix_path"`
23872    HOTSPOT_LD="$windows_path"
23873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23874    windows_path=`cmd //c echo $unix_path`
23875    HOTSPOT_LD="$windows_path"
23876  fi
23877
23878
23879  unix_path="$HOTSPOT_MT"
23880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23881    windows_path=`$CYGPATH -m "$unix_path"`
23882    HOTSPOT_MT="$windows_path"
23883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23884    windows_path=`cmd //c echo $unix_path`
23885    HOTSPOT_MT="$windows_path"
23886  fi
23887
23888
23889  unix_path="$HOTSPOT_RC"
23890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23891    windows_path=`$CYGPATH -m "$unix_path"`
23892    HOTSPOT_RC="$windows_path"
23893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23894    windows_path=`cmd //c echo $unix_path`
23895    HOTSPOT_RC="$windows_path"
23896  fi
23897
23898
23899
23900
23901    RC_FLAGS="-nologo -l 0x409 -r"
23902    if test "x$VARIANT" = xOPT; then :
23903
23904        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23905
23906fi
23907
23908    # The version variables used to create RC_FLAGS may be overridden
23909    # in a custom configure script, or possibly the command line.
23910    # Let those variables be expanded at make time in spec.gmk.
23911    # The \$ are escaped to the shell, and the $(...) variables
23912    # are evaluated by make.
23913    RC_FLAGS="$RC_FLAGS \
23914        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23915        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23916        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23917        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23918        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23919        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23920        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23921
23922    # lib.exe is used to create static libraries.
23923    # Extract the first word of "lib", so it can be a program name with args.
23924set dummy lib; ac_word=$2
23925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23926$as_echo_n "checking for $ac_word... " >&6; }
23927if test "${ac_cv_prog_WINAR+set}" = set; then :
23928  $as_echo_n "(cached) " >&6
23929else
23930  if test -n "$WINAR"; then
23931  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23932else
23933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23934for as_dir in $PATH
23935do
23936  IFS=$as_save_IFS
23937  test -z "$as_dir" && as_dir=.
23938    for ac_exec_ext in '' $ac_executable_extensions; do
23939  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23940    ac_cv_prog_WINAR="lib"
23941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23942    break 2
23943  fi
23944done
23945  done
23946IFS=$as_save_IFS
23947
23948fi
23949fi
23950WINAR=$ac_cv_prog_WINAR
23951if test -n "$WINAR"; then
23952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23953$as_echo "$WINAR" >&6; }
23954else
23955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23956$as_echo "no" >&6; }
23957fi
23958
23959
23960
23961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23962
23963  # First separate the path from the arguments. This will split at the first
23964  # space.
23965  complete="$WINAR"
23966  path="${complete%% *}"
23967  tmp="$complete EOL"
23968  arguments="${tmp#* }"
23969
23970  # Input might be given as Windows format, start by converting to
23971  # unix format.
23972  new_path=`$CYGPATH -u "$path"`
23973
23974  # Now try to locate executable using which
23975  new_path=`$WHICH "$new_path" 2> /dev/null`
23976  # bat and cmd files are not always considered executable in cygwin causing which
23977  # to not find them
23978  if test "x$new_path" = x \
23979           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23980           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23981    new_path=`$CYGPATH -u "$path"`
23982  fi
23983  if test "x$new_path" = x; then
23984    # Oops. Which didn't find the executable.
23985    # The splitting of arguments from the executable at a space might have been incorrect,
23986    # since paths with space are more likely in Windows. Give it another try with the whole
23987    # argument.
23988    path="$complete"
23989    arguments="EOL"
23990    new_path=`$CYGPATH -u "$path"`
23991    new_path=`$WHICH "$new_path" 2> /dev/null`
23992    # bat and cmd files are not always considered executable in cygwin causing which
23993    # to not find them
23994    if test "x$new_path" = x \
23995             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23996             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23997      new_path=`$CYGPATH -u "$path"`
23998    fi
23999    if test "x$new_path" = x; then
24000      # It's still not found. Now this is an unrecoverable error.
24001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24002$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24003      has_space=`$ECHO "$complete" | $GREP " "`
24004      if test "x$has_space" != x; then
24005        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24006$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24007      fi
24008      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24009    fi
24010  fi
24011
24012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24015  # "foo.exe" is OK but "foo" is an error.
24016  #
24017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24018  # It is also a way to make sure we got the proper file name for the real test later on.
24019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24020  if test "x$test_shortpath" = x; then
24021    # Short path failed, file does not exist as specified.
24022    # Try adding .exe or .cmd
24023    if test -f "${new_path}.exe"; then
24024       input_to_shortpath="${new_path}.exe"
24025    elif test -f "${new_path}.cmd"; then
24026       input_to_shortpath="${new_path}.cmd"
24027    else
24028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24029$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24030      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24031$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24032      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24033    fi
24034  else
24035    input_to_shortpath="$new_path"
24036  fi
24037
24038  # Call helper function which possibly converts this using DOS-style short mode.
24039  # If so, the updated path is stored in $new_path.
24040  new_path="$input_to_shortpath"
24041
24042  input_path="$input_to_shortpath"
24043  # Check if we need to convert this using DOS-style short mode. If the path
24044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24045  # take no chances and rewrite it.
24046  # Note: m4 eats our [], so we need to use [ and ] instead.
24047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24048  if test "x$has_forbidden_chars" != x; then
24049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24053      # Going to short mode and back again did indeed matter. Since short mode is
24054      # case insensitive, let's make it lowercase to improve readability.
24055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24056      # Now convert it back to Unix-stile (cygpath)
24057      input_path=`$CYGPATH -u "$shortmode_path"`
24058      new_path="$input_path"
24059    fi
24060  fi
24061
24062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24063  if test "x$test_cygdrive_prefix" = x; then
24064    # As a simple fix, exclude /usr/bin since it's not a real path.
24065    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24067      # a path prefixed by /cygdrive for fixpath to work.
24068      new_path="$CYGWIN_ROOT_PATH$input_path"
24069    fi
24070  fi
24071
24072  # remove trailing .exe if any
24073  new_path="${new_path/%.exe/}"
24074
24075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24076
24077  # First separate the path from the arguments. This will split at the first
24078  # space.
24079  complete="$WINAR"
24080  path="${complete%% *}"
24081  tmp="$complete EOL"
24082  arguments="${tmp#* }"
24083
24084  # Input might be given as Windows format, start by converting to
24085  # unix format.
24086  new_path="$path"
24087
24088  windows_path="$new_path"
24089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24090    unix_path=`$CYGPATH -u "$windows_path"`
24091    new_path="$unix_path"
24092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24094    new_path="$unix_path"
24095  fi
24096
24097
24098  # Now try to locate executable using which
24099  new_path=`$WHICH "$new_path" 2> /dev/null`
24100
24101  if test "x$new_path" = x; then
24102    # Oops. Which didn't find the executable.
24103    # The splitting of arguments from the executable at a space might have been incorrect,
24104    # since paths with space are more likely in Windows. Give it another try with the whole
24105    # argument.
24106    path="$complete"
24107    arguments="EOL"
24108    new_path="$path"
24109
24110  windows_path="$new_path"
24111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24112    unix_path=`$CYGPATH -u "$windows_path"`
24113    new_path="$unix_path"
24114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24116    new_path="$unix_path"
24117  fi
24118
24119
24120    new_path=`$WHICH "$new_path" 2> /dev/null`
24121
24122    if test "x$new_path" = x; then
24123      # It's still not found. Now this is an unrecoverable error.
24124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24125$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24126      has_space=`$ECHO "$complete" | $GREP " "`
24127      if test "x$has_space" != x; then
24128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24130      fi
24131      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24132    fi
24133  fi
24134
24135  # Now new_path has a complete unix path to the binary
24136  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24137    # Keep paths in /bin as-is, but remove trailing .exe if any
24138    new_path="${new_path/%.exe/}"
24139    # Do not save /bin paths to all_fixpath_prefixes!
24140  else
24141    # Not in mixed or Windows style, start by that.
24142    new_path=`cmd //c echo $new_path`
24143
24144  input_path="$new_path"
24145  # Check if we need to convert this using DOS-style short mode. If the path
24146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24147  # take no chances and rewrite it.
24148  # Note: m4 eats our [], so we need to use [ and ] instead.
24149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24150  if test "x$has_forbidden_chars" != x; then
24151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24153  fi
24154
24155    # Output is in $new_path
24156
24157  windows_path="$new_path"
24158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24159    unix_path=`$CYGPATH -u "$windows_path"`
24160    new_path="$unix_path"
24161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24163    new_path="$unix_path"
24164  fi
24165
24166    # remove trailing .exe if any
24167    new_path="${new_path/%.exe/}"
24168
24169    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24170    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24171  fi
24172
24173  else
24174    # We're on a posix platform. Hooray! :)
24175    # First separate the path from the arguments. This will split at the first
24176    # space.
24177    complete="$WINAR"
24178    path="${complete%% *}"
24179    tmp="$complete EOL"
24180    arguments="${tmp#* }"
24181
24182    # Cannot rely on the command "which" here since it doesn't always work.
24183    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24184    if test -z "$is_absolute_path"; then
24185      # Path to executable is not absolute. Find it.
24186      IFS_save="$IFS"
24187      IFS=:
24188      for p in $PATH; do
24189        if test -f "$p/$path" && test -x "$p/$path"; then
24190          new_path="$p/$path"
24191          break
24192        fi
24193      done
24194      IFS="$IFS_save"
24195    else
24196      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24197$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24198      new_path="$path"
24199    fi
24200
24201    if test "x$new_path" = x; then
24202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24203$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24204        has_space=`$ECHO "$complete" | $GREP " "`
24205        if test "x$has_space" != x; then
24206          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24207$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24208        fi
24209        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24210      fi
24211  fi
24212
24213      # Now join together the path and the arguments once again
24214      if test "x$arguments" != xEOL; then
24215        new_complete="$new_path ${arguments% *}"
24216      else
24217        new_complete="$new_path"
24218      fi
24219
24220  if test "x$complete" != "x$new_complete"; then
24221      WINAR="$new_complete"
24222      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24223$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24224    fi
24225
24226    AR="$WINAR"
24227    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24228
24229    # Extract the first word of "dumpbin", so it can be a program name with args.
24230set dummy dumpbin; ac_word=$2
24231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24232$as_echo_n "checking for $ac_word... " >&6; }
24233if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
24234  $as_echo_n "(cached) " >&6
24235else
24236  if test -n "$DUMPBIN"; then
24237  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24238else
24239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24240for as_dir in $PATH
24241do
24242  IFS=$as_save_IFS
24243  test -z "$as_dir" && as_dir=.
24244    for ac_exec_ext in '' $ac_executable_extensions; do
24245  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24246    ac_cv_prog_DUMPBIN="dumpbin"
24247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24248    break 2
24249  fi
24250done
24251  done
24252IFS=$as_save_IFS
24253
24254fi
24255fi
24256DUMPBIN=$ac_cv_prog_DUMPBIN
24257if test -n "$DUMPBIN"; then
24258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24259$as_echo "$DUMPBIN" >&6; }
24260else
24261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24262$as_echo "no" >&6; }
24263fi
24264
24265
24266
24267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24268
24269  # First separate the path from the arguments. This will split at the first
24270  # space.
24271  complete="$DUMPBIN"
24272  path="${complete%% *}"
24273  tmp="$complete EOL"
24274  arguments="${tmp#* }"
24275
24276  # Input might be given as Windows format, start by converting to
24277  # unix format.
24278  new_path=`$CYGPATH -u "$path"`
24279
24280  # Now try to locate executable using which
24281  new_path=`$WHICH "$new_path" 2> /dev/null`
24282  # bat and cmd files are not always considered executable in cygwin causing which
24283  # to not find them
24284  if test "x$new_path" = x \
24285           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24286           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24287    new_path=`$CYGPATH -u "$path"`
24288  fi
24289  if test "x$new_path" = x; then
24290    # Oops. Which didn't find the executable.
24291    # The splitting of arguments from the executable at a space might have been incorrect,
24292    # since paths with space are more likely in Windows. Give it another try with the whole
24293    # argument.
24294    path="$complete"
24295    arguments="EOL"
24296    new_path=`$CYGPATH -u "$path"`
24297    new_path=`$WHICH "$new_path" 2> /dev/null`
24298    # bat and cmd files are not always considered executable in cygwin causing which
24299    # to not find them
24300    if test "x$new_path" = x \
24301             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24302             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24303      new_path=`$CYGPATH -u "$path"`
24304    fi
24305    if test "x$new_path" = x; then
24306      # It's still not found. Now this is an unrecoverable error.
24307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24308$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24309      has_space=`$ECHO "$complete" | $GREP " "`
24310      if test "x$has_space" != x; then
24311        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24312$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24313      fi
24314      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24315    fi
24316  fi
24317
24318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24321  # "foo.exe" is OK but "foo" is an error.
24322  #
24323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24324  # It is also a way to make sure we got the proper file name for the real test later on.
24325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24326  if test "x$test_shortpath" = x; then
24327    # Short path failed, file does not exist as specified.
24328    # Try adding .exe or .cmd
24329    if test -f "${new_path}.exe"; then
24330       input_to_shortpath="${new_path}.exe"
24331    elif test -f "${new_path}.cmd"; then
24332       input_to_shortpath="${new_path}.cmd"
24333    else
24334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24335$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24336      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24337$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24338      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24339    fi
24340  else
24341    input_to_shortpath="$new_path"
24342  fi
24343
24344  # Call helper function which possibly converts this using DOS-style short mode.
24345  # If so, the updated path is stored in $new_path.
24346  new_path="$input_to_shortpath"
24347
24348  input_path="$input_to_shortpath"
24349  # Check if we need to convert this using DOS-style short mode. If the path
24350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24351  # take no chances and rewrite it.
24352  # Note: m4 eats our [], so we need to use [ and ] instead.
24353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24354  if test "x$has_forbidden_chars" != x; then
24355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24359      # Going to short mode and back again did indeed matter. Since short mode is
24360      # case insensitive, let's make it lowercase to improve readability.
24361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24362      # Now convert it back to Unix-stile (cygpath)
24363      input_path=`$CYGPATH -u "$shortmode_path"`
24364      new_path="$input_path"
24365    fi
24366  fi
24367
24368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24369  if test "x$test_cygdrive_prefix" = x; then
24370    # As a simple fix, exclude /usr/bin since it's not a real path.
24371    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24373      # a path prefixed by /cygdrive for fixpath to work.
24374      new_path="$CYGWIN_ROOT_PATH$input_path"
24375    fi
24376  fi
24377
24378  # remove trailing .exe if any
24379  new_path="${new_path/%.exe/}"
24380
24381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24382
24383  # First separate the path from the arguments. This will split at the first
24384  # space.
24385  complete="$DUMPBIN"
24386  path="${complete%% *}"
24387  tmp="$complete EOL"
24388  arguments="${tmp#* }"
24389
24390  # Input might be given as Windows format, start by converting to
24391  # unix format.
24392  new_path="$path"
24393
24394  windows_path="$new_path"
24395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24396    unix_path=`$CYGPATH -u "$windows_path"`
24397    new_path="$unix_path"
24398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24400    new_path="$unix_path"
24401  fi
24402
24403
24404  # Now try to locate executable using which
24405  new_path=`$WHICH "$new_path" 2> /dev/null`
24406
24407  if test "x$new_path" = x; then
24408    # Oops. Which didn't find the executable.
24409    # The splitting of arguments from the executable at a space might have been incorrect,
24410    # since paths with space are more likely in Windows. Give it another try with the whole
24411    # argument.
24412    path="$complete"
24413    arguments="EOL"
24414    new_path="$path"
24415
24416  windows_path="$new_path"
24417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24418    unix_path=`$CYGPATH -u "$windows_path"`
24419    new_path="$unix_path"
24420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24422    new_path="$unix_path"
24423  fi
24424
24425
24426    new_path=`$WHICH "$new_path" 2> /dev/null`
24427
24428    if test "x$new_path" = x; then
24429      # It's still not found. Now this is an unrecoverable error.
24430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24431$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24432      has_space=`$ECHO "$complete" | $GREP " "`
24433      if test "x$has_space" != x; then
24434        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24436      fi
24437      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24438    fi
24439  fi
24440
24441  # Now new_path has a complete unix path to the binary
24442  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24443    # Keep paths in /bin as-is, but remove trailing .exe if any
24444    new_path="${new_path/%.exe/}"
24445    # Do not save /bin paths to all_fixpath_prefixes!
24446  else
24447    # Not in mixed or Windows style, start by that.
24448    new_path=`cmd //c echo $new_path`
24449
24450  input_path="$new_path"
24451  # Check if we need to convert this using DOS-style short mode. If the path
24452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24453  # take no chances and rewrite it.
24454  # Note: m4 eats our [], so we need to use [ and ] instead.
24455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24456  if test "x$has_forbidden_chars" != x; then
24457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24459  fi
24460
24461    # Output is in $new_path
24462
24463  windows_path="$new_path"
24464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24465    unix_path=`$CYGPATH -u "$windows_path"`
24466    new_path="$unix_path"
24467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24469    new_path="$unix_path"
24470  fi
24471
24472    # remove trailing .exe if any
24473    new_path="${new_path/%.exe/}"
24474
24475    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24476    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24477  fi
24478
24479  else
24480    # We're on a posix platform. Hooray! :)
24481    # First separate the path from the arguments. This will split at the first
24482    # space.
24483    complete="$DUMPBIN"
24484    path="${complete%% *}"
24485    tmp="$complete EOL"
24486    arguments="${tmp#* }"
24487
24488    # Cannot rely on the command "which" here since it doesn't always work.
24489    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24490    if test -z "$is_absolute_path"; then
24491      # Path to executable is not absolute. Find it.
24492      IFS_save="$IFS"
24493      IFS=:
24494      for p in $PATH; do
24495        if test -f "$p/$path" && test -x "$p/$path"; then
24496          new_path="$p/$path"
24497          break
24498        fi
24499      done
24500      IFS="$IFS_save"
24501    else
24502      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24503$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24504      new_path="$path"
24505    fi
24506
24507    if test "x$new_path" = x; then
24508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24509$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24510        has_space=`$ECHO "$complete" | $GREP " "`
24511        if test "x$has_space" != x; then
24512          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24514        fi
24515        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24516      fi
24517  fi
24518
24519      # Now join together the path and the arguments once again
24520      if test "x$arguments" != xEOL; then
24521        new_complete="$new_path ${arguments% *}"
24522      else
24523        new_complete="$new_path"
24524      fi
24525
24526  if test "x$complete" != "x$new_complete"; then
24527      DUMPBIN="$new_complete"
24528      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24529$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24530    fi
24531
24532
24533    COMPILER_TYPE=CL
24534    CCXXFLAGS="$CCXXFLAGS -nologo"
24535
24536fi
24537
24538
24539
24540ac_ext=c
24541ac_cpp='$CPP $CPPFLAGS'
24542ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24543ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24544ac_compiler_gnu=$ac_cv_c_compiler_gnu
24545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24546$as_echo_n "checking how to run the C preprocessor... " >&6; }
24547# On Suns, sometimes $CPP names a directory.
24548if test -n "$CPP" && test -d "$CPP"; then
24549  CPP=
24550fi
24551if test -z "$CPP"; then
24552  if test "${ac_cv_prog_CPP+set}" = set; then :
24553  $as_echo_n "(cached) " >&6
24554else
24555      # Double quotes because CPP needs to be expanded
24556    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24557    do
24558      ac_preproc_ok=false
24559for ac_c_preproc_warn_flag in '' yes
24560do
24561  # Use a header file that comes with gcc, so configuring glibc
24562  # with a fresh cross-compiler works.
24563  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24564  # <limits.h> exists even on freestanding compilers.
24565  # On the NeXT, cc -E runs the code through the compiler's parser,
24566  # not just through cpp. "Syntax error" is here to catch this case.
24567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24568/* end confdefs.h.  */
24569#ifdef __STDC__
24570# include <limits.h>
24571#else
24572# include <assert.h>
24573#endif
24574		     Syntax error
24575_ACEOF
24576if ac_fn_c_try_cpp "$LINENO"; then :
24577
24578else
24579  # Broken: fails on valid input.
24580continue
24581fi
24582rm -f conftest.err conftest.i conftest.$ac_ext
24583
24584  # OK, works on sane cases.  Now check whether nonexistent headers
24585  # can be detected and how.
24586  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24587/* end confdefs.h.  */
24588#include <ac_nonexistent.h>
24589_ACEOF
24590if ac_fn_c_try_cpp "$LINENO"; then :
24591  # Broken: success on invalid input.
24592continue
24593else
24594  # Passes both tests.
24595ac_preproc_ok=:
24596break
24597fi
24598rm -f conftest.err conftest.i conftest.$ac_ext
24599
24600done
24601# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24602rm -f conftest.i conftest.err conftest.$ac_ext
24603if $ac_preproc_ok; then :
24604  break
24605fi
24606
24607    done
24608    ac_cv_prog_CPP=$CPP
24609
24610fi
24611  CPP=$ac_cv_prog_CPP
24612else
24613  ac_cv_prog_CPP=$CPP
24614fi
24615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24616$as_echo "$CPP" >&6; }
24617ac_preproc_ok=false
24618for ac_c_preproc_warn_flag in '' yes
24619do
24620  # Use a header file that comes with gcc, so configuring glibc
24621  # with a fresh cross-compiler works.
24622  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24623  # <limits.h> exists even on freestanding compilers.
24624  # On the NeXT, cc -E runs the code through the compiler's parser,
24625  # not just through cpp. "Syntax error" is here to catch this case.
24626  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24627/* end confdefs.h.  */
24628#ifdef __STDC__
24629# include <limits.h>
24630#else
24631# include <assert.h>
24632#endif
24633		     Syntax error
24634_ACEOF
24635if ac_fn_c_try_cpp "$LINENO"; then :
24636
24637else
24638  # Broken: fails on valid input.
24639continue
24640fi
24641rm -f conftest.err conftest.i conftest.$ac_ext
24642
24643  # OK, works on sane cases.  Now check whether nonexistent headers
24644  # can be detected and how.
24645  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24646/* end confdefs.h.  */
24647#include <ac_nonexistent.h>
24648_ACEOF
24649if ac_fn_c_try_cpp "$LINENO"; then :
24650  # Broken: success on invalid input.
24651continue
24652else
24653  # Passes both tests.
24654ac_preproc_ok=:
24655break
24656fi
24657rm -f conftest.err conftest.i conftest.$ac_ext
24658
24659done
24660# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24661rm -f conftest.i conftest.err conftest.$ac_ext
24662if $ac_preproc_ok; then :
24663
24664else
24665  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24666$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24667as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24668See \`config.log' for more details" "$LINENO" 5; }
24669fi
24670
24671ac_ext=cpp
24672ac_cpp='$CXXCPP $CPPFLAGS'
24673ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24674ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24675ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24676
24677
24678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24679
24680  # First separate the path from the arguments. This will split at the first
24681  # space.
24682  complete="$CPP"
24683  path="${complete%% *}"
24684  tmp="$complete EOL"
24685  arguments="${tmp#* }"
24686
24687  # Input might be given as Windows format, start by converting to
24688  # unix format.
24689  new_path=`$CYGPATH -u "$path"`
24690
24691  # Now try to locate executable using which
24692  new_path=`$WHICH "$new_path" 2> /dev/null`
24693  # bat and cmd files are not always considered executable in cygwin causing which
24694  # to not find them
24695  if test "x$new_path" = x \
24696           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24697           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24698    new_path=`$CYGPATH -u "$path"`
24699  fi
24700  if test "x$new_path" = x; then
24701    # Oops. Which didn't find the executable.
24702    # The splitting of arguments from the executable at a space might have been incorrect,
24703    # since paths with space are more likely in Windows. Give it another try with the whole
24704    # argument.
24705    path="$complete"
24706    arguments="EOL"
24707    new_path=`$CYGPATH -u "$path"`
24708    new_path=`$WHICH "$new_path" 2> /dev/null`
24709    # bat and cmd files are not always considered executable in cygwin causing which
24710    # to not find them
24711    if test "x$new_path" = x \
24712             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24713             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24714      new_path=`$CYGPATH -u "$path"`
24715    fi
24716    if test "x$new_path" = x; then
24717      # It's still not found. Now this is an unrecoverable error.
24718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24719$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24720      has_space=`$ECHO "$complete" | $GREP " "`
24721      if test "x$has_space" != x; then
24722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24724      fi
24725      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24726    fi
24727  fi
24728
24729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24732  # "foo.exe" is OK but "foo" is an error.
24733  #
24734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24735  # It is also a way to make sure we got the proper file name for the real test later on.
24736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24737  if test "x$test_shortpath" = x; then
24738    # Short path failed, file does not exist as specified.
24739    # Try adding .exe or .cmd
24740    if test -f "${new_path}.exe"; then
24741       input_to_shortpath="${new_path}.exe"
24742    elif test -f "${new_path}.cmd"; then
24743       input_to_shortpath="${new_path}.cmd"
24744    else
24745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24746$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24747      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24748$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24749      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24750    fi
24751  else
24752    input_to_shortpath="$new_path"
24753  fi
24754
24755  # Call helper function which possibly converts this using DOS-style short mode.
24756  # If so, the updated path is stored in $new_path.
24757  new_path="$input_to_shortpath"
24758
24759  input_path="$input_to_shortpath"
24760  # Check if we need to convert this using DOS-style short mode. If the path
24761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24762  # take no chances and rewrite it.
24763  # Note: m4 eats our [], so we need to use [ and ] instead.
24764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24765  if test "x$has_forbidden_chars" != x; then
24766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24770      # Going to short mode and back again did indeed matter. Since short mode is
24771      # case insensitive, let's make it lowercase to improve readability.
24772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24773      # Now convert it back to Unix-stile (cygpath)
24774      input_path=`$CYGPATH -u "$shortmode_path"`
24775      new_path="$input_path"
24776    fi
24777  fi
24778
24779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24780  if test "x$test_cygdrive_prefix" = x; then
24781    # As a simple fix, exclude /usr/bin since it's not a real path.
24782    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24784      # a path prefixed by /cygdrive for fixpath to work.
24785      new_path="$CYGWIN_ROOT_PATH$input_path"
24786    fi
24787  fi
24788
24789  # remove trailing .exe if any
24790  new_path="${new_path/%.exe/}"
24791
24792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24793
24794  # First separate the path from the arguments. This will split at the first
24795  # space.
24796  complete="$CPP"
24797  path="${complete%% *}"
24798  tmp="$complete EOL"
24799  arguments="${tmp#* }"
24800
24801  # Input might be given as Windows format, start by converting to
24802  # unix format.
24803  new_path="$path"
24804
24805  windows_path="$new_path"
24806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24807    unix_path=`$CYGPATH -u "$windows_path"`
24808    new_path="$unix_path"
24809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24811    new_path="$unix_path"
24812  fi
24813
24814
24815  # Now try to locate executable using which
24816  new_path=`$WHICH "$new_path" 2> /dev/null`
24817
24818  if test "x$new_path" = x; then
24819    # Oops. Which didn't find the executable.
24820    # The splitting of arguments from the executable at a space might have been incorrect,
24821    # since paths with space are more likely in Windows. Give it another try with the whole
24822    # argument.
24823    path="$complete"
24824    arguments="EOL"
24825    new_path="$path"
24826
24827  windows_path="$new_path"
24828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24829    unix_path=`$CYGPATH -u "$windows_path"`
24830    new_path="$unix_path"
24831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24833    new_path="$unix_path"
24834  fi
24835
24836
24837    new_path=`$WHICH "$new_path" 2> /dev/null`
24838
24839    if test "x$new_path" = x; then
24840      # It's still not found. Now this is an unrecoverable error.
24841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24842$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24843      has_space=`$ECHO "$complete" | $GREP " "`
24844      if test "x$has_space" != x; then
24845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24847      fi
24848      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24849    fi
24850  fi
24851
24852  # Now new_path has a complete unix path to the binary
24853  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24854    # Keep paths in /bin as-is, but remove trailing .exe if any
24855    new_path="${new_path/%.exe/}"
24856    # Do not save /bin paths to all_fixpath_prefixes!
24857  else
24858    # Not in mixed or Windows style, start by that.
24859    new_path=`cmd //c echo $new_path`
24860
24861  input_path="$new_path"
24862  # Check if we need to convert this using DOS-style short mode. If the path
24863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24864  # take no chances and rewrite it.
24865  # Note: m4 eats our [], so we need to use [ and ] instead.
24866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24867  if test "x$has_forbidden_chars" != x; then
24868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24870  fi
24871
24872    # Output is in $new_path
24873
24874  windows_path="$new_path"
24875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24876    unix_path=`$CYGPATH -u "$windows_path"`
24877    new_path="$unix_path"
24878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24880    new_path="$unix_path"
24881  fi
24882
24883    # remove trailing .exe if any
24884    new_path="${new_path/%.exe/}"
24885
24886    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24887    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24888  fi
24889
24890  else
24891    # We're on a posix platform. Hooray! :)
24892    # First separate the path from the arguments. This will split at the first
24893    # space.
24894    complete="$CPP"
24895    path="${complete%% *}"
24896    tmp="$complete EOL"
24897    arguments="${tmp#* }"
24898
24899    # Cannot rely on the command "which" here since it doesn't always work.
24900    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24901    if test -z "$is_absolute_path"; then
24902      # Path to executable is not absolute. Find it.
24903      IFS_save="$IFS"
24904      IFS=:
24905      for p in $PATH; do
24906        if test -f "$p/$path" && test -x "$p/$path"; then
24907          new_path="$p/$path"
24908          break
24909        fi
24910      done
24911      IFS="$IFS_save"
24912    else
24913      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24914$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24915      new_path="$path"
24916    fi
24917
24918    if test "x$new_path" = x; then
24919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24920$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24921        has_space=`$ECHO "$complete" | $GREP " "`
24922        if test "x$has_space" != x; then
24923          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24924$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24925        fi
24926        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24927      fi
24928  fi
24929
24930      # Now join together the path and the arguments once again
24931      if test "x$arguments" != xEOL; then
24932        new_complete="$new_path ${arguments% *}"
24933      else
24934        new_complete="$new_path"
24935      fi
24936
24937  if test "x$complete" != "x$new_complete"; then
24938      CPP="$new_complete"
24939      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24940$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24941    fi
24942
24943
24944ac_ext=cpp
24945ac_cpp='$CXXCPP $CPPFLAGS'
24946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24950$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24951if test -z "$CXXCPP"; then
24952  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24953  $as_echo_n "(cached) " >&6
24954else
24955      # Double quotes because CXXCPP needs to be expanded
24956    for CXXCPP in "$CXX -E" "/lib/cpp"
24957    do
24958      ac_preproc_ok=false
24959for ac_cxx_preproc_warn_flag in '' yes
24960do
24961  # Use a header file that comes with gcc, so configuring glibc
24962  # with a fresh cross-compiler works.
24963  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24964  # <limits.h> exists even on freestanding compilers.
24965  # On the NeXT, cc -E runs the code through the compiler's parser,
24966  # not just through cpp. "Syntax error" is here to catch this case.
24967  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24968/* end confdefs.h.  */
24969#ifdef __STDC__
24970# include <limits.h>
24971#else
24972# include <assert.h>
24973#endif
24974		     Syntax error
24975_ACEOF
24976if ac_fn_cxx_try_cpp "$LINENO"; then :
24977
24978else
24979  # Broken: fails on valid input.
24980continue
24981fi
24982rm -f conftest.err conftest.i conftest.$ac_ext
24983
24984  # OK, works on sane cases.  Now check whether nonexistent headers
24985  # can be detected and how.
24986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24987/* end confdefs.h.  */
24988#include <ac_nonexistent.h>
24989_ACEOF
24990if ac_fn_cxx_try_cpp "$LINENO"; then :
24991  # Broken: success on invalid input.
24992continue
24993else
24994  # Passes both tests.
24995ac_preproc_ok=:
24996break
24997fi
24998rm -f conftest.err conftest.i conftest.$ac_ext
24999
25000done
25001# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25002rm -f conftest.i conftest.err conftest.$ac_ext
25003if $ac_preproc_ok; then :
25004  break
25005fi
25006
25007    done
25008    ac_cv_prog_CXXCPP=$CXXCPP
25009
25010fi
25011  CXXCPP=$ac_cv_prog_CXXCPP
25012else
25013  ac_cv_prog_CXXCPP=$CXXCPP
25014fi
25015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25016$as_echo "$CXXCPP" >&6; }
25017ac_preproc_ok=false
25018for ac_cxx_preproc_warn_flag in '' yes
25019do
25020  # Use a header file that comes with gcc, so configuring glibc
25021  # with a fresh cross-compiler works.
25022  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25023  # <limits.h> exists even on freestanding compilers.
25024  # On the NeXT, cc -E runs the code through the compiler's parser,
25025  # not just through cpp. "Syntax error" is here to catch this case.
25026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25027/* end confdefs.h.  */
25028#ifdef __STDC__
25029# include <limits.h>
25030#else
25031# include <assert.h>
25032#endif
25033		     Syntax error
25034_ACEOF
25035if ac_fn_cxx_try_cpp "$LINENO"; then :
25036
25037else
25038  # Broken: fails on valid input.
25039continue
25040fi
25041rm -f conftest.err conftest.i conftest.$ac_ext
25042
25043  # OK, works on sane cases.  Now check whether nonexistent headers
25044  # can be detected and how.
25045  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25046/* end confdefs.h.  */
25047#include <ac_nonexistent.h>
25048_ACEOF
25049if ac_fn_cxx_try_cpp "$LINENO"; then :
25050  # Broken: success on invalid input.
25051continue
25052else
25053  # Passes both tests.
25054ac_preproc_ok=:
25055break
25056fi
25057rm -f conftest.err conftest.i conftest.$ac_ext
25058
25059done
25060# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25061rm -f conftest.i conftest.err conftest.$ac_ext
25062if $ac_preproc_ok; then :
25063
25064else
25065  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25067as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25068See \`config.log' for more details" "$LINENO" 5; }
25069fi
25070
25071ac_ext=cpp
25072ac_cpp='$CXXCPP $CPPFLAGS'
25073ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25074ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25075ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25076
25077
25078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25079
25080  # First separate the path from the arguments. This will split at the first
25081  # space.
25082  complete="$CXXCPP"
25083  path="${complete%% *}"
25084  tmp="$complete EOL"
25085  arguments="${tmp#* }"
25086
25087  # Input might be given as Windows format, start by converting to
25088  # unix format.
25089  new_path=`$CYGPATH -u "$path"`
25090
25091  # Now try to locate executable using which
25092  new_path=`$WHICH "$new_path" 2> /dev/null`
25093  # bat and cmd files are not always considered executable in cygwin causing which
25094  # to not find them
25095  if test "x$new_path" = x \
25096           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25097           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25098    new_path=`$CYGPATH -u "$path"`
25099  fi
25100  if test "x$new_path" = x; then
25101    # Oops. Which didn't find the executable.
25102    # The splitting of arguments from the executable at a space might have been incorrect,
25103    # since paths with space are more likely in Windows. Give it another try with the whole
25104    # argument.
25105    path="$complete"
25106    arguments="EOL"
25107    new_path=`$CYGPATH -u "$path"`
25108    new_path=`$WHICH "$new_path" 2> /dev/null`
25109    # bat and cmd files are not always considered executable in cygwin causing which
25110    # to not find them
25111    if test "x$new_path" = x \
25112             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25113             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25114      new_path=`$CYGPATH -u "$path"`
25115    fi
25116    if test "x$new_path" = x; then
25117      # It's still not found. Now this is an unrecoverable error.
25118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25119$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25120      has_space=`$ECHO "$complete" | $GREP " "`
25121      if test "x$has_space" != x; then
25122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25124      fi
25125      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25126    fi
25127  fi
25128
25129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25132  # "foo.exe" is OK but "foo" is an error.
25133  #
25134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25135  # It is also a way to make sure we got the proper file name for the real test later on.
25136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25137  if test "x$test_shortpath" = x; then
25138    # Short path failed, file does not exist as specified.
25139    # Try adding .exe or .cmd
25140    if test -f "${new_path}.exe"; then
25141       input_to_shortpath="${new_path}.exe"
25142    elif test -f "${new_path}.cmd"; then
25143       input_to_shortpath="${new_path}.cmd"
25144    else
25145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25146$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25147      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25148$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25149      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25150    fi
25151  else
25152    input_to_shortpath="$new_path"
25153  fi
25154
25155  # Call helper function which possibly converts this using DOS-style short mode.
25156  # If so, the updated path is stored in $new_path.
25157  new_path="$input_to_shortpath"
25158
25159  input_path="$input_to_shortpath"
25160  # Check if we need to convert this using DOS-style short mode. If the path
25161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25162  # take no chances and rewrite it.
25163  # Note: m4 eats our [], so we need to use [ and ] instead.
25164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25165  if test "x$has_forbidden_chars" != x; then
25166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25170      # Going to short mode and back again did indeed matter. Since short mode is
25171      # case insensitive, let's make it lowercase to improve readability.
25172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25173      # Now convert it back to Unix-stile (cygpath)
25174      input_path=`$CYGPATH -u "$shortmode_path"`
25175      new_path="$input_path"
25176    fi
25177  fi
25178
25179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25180  if test "x$test_cygdrive_prefix" = x; then
25181    # As a simple fix, exclude /usr/bin since it's not a real path.
25182    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25184      # a path prefixed by /cygdrive for fixpath to work.
25185      new_path="$CYGWIN_ROOT_PATH$input_path"
25186    fi
25187  fi
25188
25189  # remove trailing .exe if any
25190  new_path="${new_path/%.exe/}"
25191
25192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25193
25194  # First separate the path from the arguments. This will split at the first
25195  # space.
25196  complete="$CXXCPP"
25197  path="${complete%% *}"
25198  tmp="$complete EOL"
25199  arguments="${tmp#* }"
25200
25201  # Input might be given as Windows format, start by converting to
25202  # unix format.
25203  new_path="$path"
25204
25205  windows_path="$new_path"
25206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25207    unix_path=`$CYGPATH -u "$windows_path"`
25208    new_path="$unix_path"
25209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25211    new_path="$unix_path"
25212  fi
25213
25214
25215  # Now try to locate executable using which
25216  new_path=`$WHICH "$new_path" 2> /dev/null`
25217
25218  if test "x$new_path" = x; then
25219    # Oops. Which didn't find the executable.
25220    # The splitting of arguments from the executable at a space might have been incorrect,
25221    # since paths with space are more likely in Windows. Give it another try with the whole
25222    # argument.
25223    path="$complete"
25224    arguments="EOL"
25225    new_path="$path"
25226
25227  windows_path="$new_path"
25228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25229    unix_path=`$CYGPATH -u "$windows_path"`
25230    new_path="$unix_path"
25231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25233    new_path="$unix_path"
25234  fi
25235
25236
25237    new_path=`$WHICH "$new_path" 2> /dev/null`
25238
25239    if test "x$new_path" = x; then
25240      # It's still not found. Now this is an unrecoverable error.
25241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25242$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25243      has_space=`$ECHO "$complete" | $GREP " "`
25244      if test "x$has_space" != x; then
25245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25247      fi
25248      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25249    fi
25250  fi
25251
25252  # Now new_path has a complete unix path to the binary
25253  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25254    # Keep paths in /bin as-is, but remove trailing .exe if any
25255    new_path="${new_path/%.exe/}"
25256    # Do not save /bin paths to all_fixpath_prefixes!
25257  else
25258    # Not in mixed or Windows style, start by that.
25259    new_path=`cmd //c echo $new_path`
25260
25261  input_path="$new_path"
25262  # Check if we need to convert this using DOS-style short mode. If the path
25263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25264  # take no chances and rewrite it.
25265  # Note: m4 eats our [], so we need to use [ and ] instead.
25266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25267  if test "x$has_forbidden_chars" != x; then
25268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25270  fi
25271
25272    # Output is in $new_path
25273
25274  windows_path="$new_path"
25275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25276    unix_path=`$CYGPATH -u "$windows_path"`
25277    new_path="$unix_path"
25278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25280    new_path="$unix_path"
25281  fi
25282
25283    # remove trailing .exe if any
25284    new_path="${new_path/%.exe/}"
25285
25286    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25287    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25288  fi
25289
25290  else
25291    # We're on a posix platform. Hooray! :)
25292    # First separate the path from the arguments. This will split at the first
25293    # space.
25294    complete="$CXXCPP"
25295    path="${complete%% *}"
25296    tmp="$complete EOL"
25297    arguments="${tmp#* }"
25298
25299    # Cannot rely on the command "which" here since it doesn't always work.
25300    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25301    if test -z "$is_absolute_path"; then
25302      # Path to executable is not absolute. Find it.
25303      IFS_save="$IFS"
25304      IFS=:
25305      for p in $PATH; do
25306        if test -f "$p/$path" && test -x "$p/$path"; then
25307          new_path="$p/$path"
25308          break
25309        fi
25310      done
25311      IFS="$IFS_save"
25312    else
25313      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25314$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25315      new_path="$path"
25316    fi
25317
25318    if test "x$new_path" = x; then
25319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25320$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25321        has_space=`$ECHO "$complete" | $GREP " "`
25322        if test "x$has_space" != x; then
25323          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25324$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25325        fi
25326        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25327      fi
25328  fi
25329
25330      # Now join together the path and the arguments once again
25331      if test "x$arguments" != xEOL; then
25332        new_complete="$new_path ${arguments% *}"
25333      else
25334        new_complete="$new_path"
25335      fi
25336
25337  if test "x$complete" != "x$new_complete"; then
25338      CXXCPP="$new_complete"
25339      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25340$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25341    fi
25342
25343
25344if test "x$COMPILE_TYPE" != "xcross"; then
25345    # If we are not cross compiling, use the same compilers for
25346    # building the build platform executables. The cross-compilation
25347    # case needed to be done earlier, but this can only be done after
25348    # the native tools have been localized.
25349    BUILD_CC="$CC"
25350    BUILD_CXX="$CXX"
25351    BUILD_LD="$LD"
25352fi
25353
25354# for solaris we really need solaris tools, and not gnu equivalent
25355#   these seems to normally reside in /usr/ccs/bin so add that to path before
25356#   starting to probe
25357#
25358#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25359#         so that it can be overriden --with-tools-dir
25360if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25361    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25362fi
25363
25364# Find the right assembler.
25365if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25366    # Extract the first word of "as", so it can be a program name with args.
25367set dummy as; ac_word=$2
25368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25369$as_echo_n "checking for $ac_word... " >&6; }
25370if test "${ac_cv_path_AS+set}" = set; then :
25371  $as_echo_n "(cached) " >&6
25372else
25373  case $AS in
25374  [\\/]* | ?:[\\/]*)
25375  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25376  ;;
25377  *)
25378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25379for as_dir in $PATH
25380do
25381  IFS=$as_save_IFS
25382  test -z "$as_dir" && as_dir=.
25383    for ac_exec_ext in '' $ac_executable_extensions; do
25384  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25385    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25387    break 2
25388  fi
25389done
25390  done
25391IFS=$as_save_IFS
25392
25393  ;;
25394esac
25395fi
25396AS=$ac_cv_path_AS
25397if test -n "$AS"; then
25398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25399$as_echo "$AS" >&6; }
25400else
25401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25402$as_echo "no" >&6; }
25403fi
25404
25405
25406
25407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25408
25409  # First separate the path from the arguments. This will split at the first
25410  # space.
25411  complete="$AS"
25412  path="${complete%% *}"
25413  tmp="$complete EOL"
25414  arguments="${tmp#* }"
25415
25416  # Input might be given as Windows format, start by converting to
25417  # unix format.
25418  new_path=`$CYGPATH -u "$path"`
25419
25420  # Now try to locate executable using which
25421  new_path=`$WHICH "$new_path" 2> /dev/null`
25422  # bat and cmd files are not always considered executable in cygwin causing which
25423  # to not find them
25424  if test "x$new_path" = x \
25425           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25426           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25427    new_path=`$CYGPATH -u "$path"`
25428  fi
25429  if test "x$new_path" = x; then
25430    # Oops. Which didn't find the executable.
25431    # The splitting of arguments from the executable at a space might have been incorrect,
25432    # since paths with space are more likely in Windows. Give it another try with the whole
25433    # argument.
25434    path="$complete"
25435    arguments="EOL"
25436    new_path=`$CYGPATH -u "$path"`
25437    new_path=`$WHICH "$new_path" 2> /dev/null`
25438    # bat and cmd files are not always considered executable in cygwin causing which
25439    # to not find them
25440    if test "x$new_path" = x \
25441             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25442             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25443      new_path=`$CYGPATH -u "$path"`
25444    fi
25445    if test "x$new_path" = x; then
25446      # It's still not found. Now this is an unrecoverable error.
25447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25448$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25449      has_space=`$ECHO "$complete" | $GREP " "`
25450      if test "x$has_space" != x; then
25451        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25452$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25453      fi
25454      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25455    fi
25456  fi
25457
25458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25461  # "foo.exe" is OK but "foo" is an error.
25462  #
25463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25464  # It is also a way to make sure we got the proper file name for the real test later on.
25465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25466  if test "x$test_shortpath" = x; then
25467    # Short path failed, file does not exist as specified.
25468    # Try adding .exe or .cmd
25469    if test -f "${new_path}.exe"; then
25470       input_to_shortpath="${new_path}.exe"
25471    elif test -f "${new_path}.cmd"; then
25472       input_to_shortpath="${new_path}.cmd"
25473    else
25474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25475$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25476      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25477$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25478      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25479    fi
25480  else
25481    input_to_shortpath="$new_path"
25482  fi
25483
25484  # Call helper function which possibly converts this using DOS-style short mode.
25485  # If so, the updated path is stored in $new_path.
25486  new_path="$input_to_shortpath"
25487
25488  input_path="$input_to_shortpath"
25489  # Check if we need to convert this using DOS-style short mode. If the path
25490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25491  # take no chances and rewrite it.
25492  # Note: m4 eats our [], so we need to use [ and ] instead.
25493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25494  if test "x$has_forbidden_chars" != x; then
25495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25499      # Going to short mode and back again did indeed matter. Since short mode is
25500      # case insensitive, let's make it lowercase to improve readability.
25501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25502      # Now convert it back to Unix-stile (cygpath)
25503      input_path=`$CYGPATH -u "$shortmode_path"`
25504      new_path="$input_path"
25505    fi
25506  fi
25507
25508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25509  if test "x$test_cygdrive_prefix" = x; then
25510    # As a simple fix, exclude /usr/bin since it's not a real path.
25511    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25513      # a path prefixed by /cygdrive for fixpath to work.
25514      new_path="$CYGWIN_ROOT_PATH$input_path"
25515    fi
25516  fi
25517
25518  # remove trailing .exe if any
25519  new_path="${new_path/%.exe/}"
25520
25521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25522
25523  # First separate the path from the arguments. This will split at the first
25524  # space.
25525  complete="$AS"
25526  path="${complete%% *}"
25527  tmp="$complete EOL"
25528  arguments="${tmp#* }"
25529
25530  # Input might be given as Windows format, start by converting to
25531  # unix format.
25532  new_path="$path"
25533
25534  windows_path="$new_path"
25535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25536    unix_path=`$CYGPATH -u "$windows_path"`
25537    new_path="$unix_path"
25538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25540    new_path="$unix_path"
25541  fi
25542
25543
25544  # Now try to locate executable using which
25545  new_path=`$WHICH "$new_path" 2> /dev/null`
25546
25547  if test "x$new_path" = x; then
25548    # Oops. Which didn't find the executable.
25549    # The splitting of arguments from the executable at a space might have been incorrect,
25550    # since paths with space are more likely in Windows. Give it another try with the whole
25551    # argument.
25552    path="$complete"
25553    arguments="EOL"
25554    new_path="$path"
25555
25556  windows_path="$new_path"
25557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25558    unix_path=`$CYGPATH -u "$windows_path"`
25559    new_path="$unix_path"
25560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25562    new_path="$unix_path"
25563  fi
25564
25565
25566    new_path=`$WHICH "$new_path" 2> /dev/null`
25567
25568    if test "x$new_path" = x; then
25569      # It's still not found. Now this is an unrecoverable error.
25570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25571$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25572      has_space=`$ECHO "$complete" | $GREP " "`
25573      if test "x$has_space" != x; then
25574        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25575$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25576      fi
25577      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25578    fi
25579  fi
25580
25581  # Now new_path has a complete unix path to the binary
25582  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25583    # Keep paths in /bin as-is, but remove trailing .exe if any
25584    new_path="${new_path/%.exe/}"
25585    # Do not save /bin paths to all_fixpath_prefixes!
25586  else
25587    # Not in mixed or Windows style, start by that.
25588    new_path=`cmd //c echo $new_path`
25589
25590  input_path="$new_path"
25591  # Check if we need to convert this using DOS-style short mode. If the path
25592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25593  # take no chances and rewrite it.
25594  # Note: m4 eats our [], so we need to use [ and ] instead.
25595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25596  if test "x$has_forbidden_chars" != x; then
25597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25599  fi
25600
25601    # Output is in $new_path
25602
25603  windows_path="$new_path"
25604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25605    unix_path=`$CYGPATH -u "$windows_path"`
25606    new_path="$unix_path"
25607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25609    new_path="$unix_path"
25610  fi
25611
25612    # remove trailing .exe if any
25613    new_path="${new_path/%.exe/}"
25614
25615    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25616    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25617  fi
25618
25619  else
25620    # We're on a posix platform. Hooray! :)
25621    # First separate the path from the arguments. This will split at the first
25622    # space.
25623    complete="$AS"
25624    path="${complete%% *}"
25625    tmp="$complete EOL"
25626    arguments="${tmp#* }"
25627
25628    # Cannot rely on the command "which" here since it doesn't always work.
25629    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25630    if test -z "$is_absolute_path"; then
25631      # Path to executable is not absolute. Find it.
25632      IFS_save="$IFS"
25633      IFS=:
25634      for p in $PATH; do
25635        if test -f "$p/$path" && test -x "$p/$path"; then
25636          new_path="$p/$path"
25637          break
25638        fi
25639      done
25640      IFS="$IFS_save"
25641    else
25642      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25643$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25644      new_path="$path"
25645    fi
25646
25647    if test "x$new_path" = x; then
25648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25649$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25650        has_space=`$ECHO "$complete" | $GREP " "`
25651        if test "x$has_space" != x; then
25652          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25653$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25654        fi
25655        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25656      fi
25657  fi
25658
25659      # Now join together the path and the arguments once again
25660      if test "x$arguments" != xEOL; then
25661        new_complete="$new_path ${arguments% *}"
25662      else
25663        new_complete="$new_path"
25664      fi
25665
25666  if test "x$complete" != "x$new_complete"; then
25667      AS="$new_complete"
25668      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25669$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25670    fi
25671
25672else
25673    AS="$CC -c"
25674fi
25675
25676
25677if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25678    # Extract the first word of "nm", so it can be a program name with args.
25679set dummy nm; ac_word=$2
25680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25681$as_echo_n "checking for $ac_word... " >&6; }
25682if test "${ac_cv_path_NM+set}" = set; then :
25683  $as_echo_n "(cached) " >&6
25684else
25685  case $NM in
25686  [\\/]* | ?:[\\/]*)
25687  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25688  ;;
25689  *)
25690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25691for as_dir in $PATH
25692do
25693  IFS=$as_save_IFS
25694  test -z "$as_dir" && as_dir=.
25695    for ac_exec_ext in '' $ac_executable_extensions; do
25696  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25697    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25699    break 2
25700  fi
25701done
25702  done
25703IFS=$as_save_IFS
25704
25705  ;;
25706esac
25707fi
25708NM=$ac_cv_path_NM
25709if test -n "$NM"; then
25710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25711$as_echo "$NM" >&6; }
25712else
25713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25714$as_echo "no" >&6; }
25715fi
25716
25717
25718
25719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25720
25721  # First separate the path from the arguments. This will split at the first
25722  # space.
25723  complete="$NM"
25724  path="${complete%% *}"
25725  tmp="$complete EOL"
25726  arguments="${tmp#* }"
25727
25728  # Input might be given as Windows format, start by converting to
25729  # unix format.
25730  new_path=`$CYGPATH -u "$path"`
25731
25732  # Now try to locate executable using which
25733  new_path=`$WHICH "$new_path" 2> /dev/null`
25734  # bat and cmd files are not always considered executable in cygwin causing which
25735  # to not find them
25736  if test "x$new_path" = x \
25737           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25738           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25739    new_path=`$CYGPATH -u "$path"`
25740  fi
25741  if test "x$new_path" = x; then
25742    # Oops. Which didn't find the executable.
25743    # The splitting of arguments from the executable at a space might have been incorrect,
25744    # since paths with space are more likely in Windows. Give it another try with the whole
25745    # argument.
25746    path="$complete"
25747    arguments="EOL"
25748    new_path=`$CYGPATH -u "$path"`
25749    new_path=`$WHICH "$new_path" 2> /dev/null`
25750    # bat and cmd files are not always considered executable in cygwin causing which
25751    # to not find them
25752    if test "x$new_path" = x \
25753             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25754             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25755      new_path=`$CYGPATH -u "$path"`
25756    fi
25757    if test "x$new_path" = x; then
25758      # It's still not found. Now this is an unrecoverable error.
25759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25760$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25761      has_space=`$ECHO "$complete" | $GREP " "`
25762      if test "x$has_space" != x; then
25763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25765      fi
25766      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25767    fi
25768  fi
25769
25770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25773  # "foo.exe" is OK but "foo" is an error.
25774  #
25775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25776  # It is also a way to make sure we got the proper file name for the real test later on.
25777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25778  if test "x$test_shortpath" = x; then
25779    # Short path failed, file does not exist as specified.
25780    # Try adding .exe or .cmd
25781    if test -f "${new_path}.exe"; then
25782       input_to_shortpath="${new_path}.exe"
25783    elif test -f "${new_path}.cmd"; then
25784       input_to_shortpath="${new_path}.cmd"
25785    else
25786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25787$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25788      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25789$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25790      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25791    fi
25792  else
25793    input_to_shortpath="$new_path"
25794  fi
25795
25796  # Call helper function which possibly converts this using DOS-style short mode.
25797  # If so, the updated path is stored in $new_path.
25798  new_path="$input_to_shortpath"
25799
25800  input_path="$input_to_shortpath"
25801  # Check if we need to convert this using DOS-style short mode. If the path
25802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25803  # take no chances and rewrite it.
25804  # Note: m4 eats our [], so we need to use [ and ] instead.
25805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25806  if test "x$has_forbidden_chars" != x; then
25807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25811      # Going to short mode and back again did indeed matter. Since short mode is
25812      # case insensitive, let's make it lowercase to improve readability.
25813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25814      # Now convert it back to Unix-stile (cygpath)
25815      input_path=`$CYGPATH -u "$shortmode_path"`
25816      new_path="$input_path"
25817    fi
25818  fi
25819
25820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25821  if test "x$test_cygdrive_prefix" = x; then
25822    # As a simple fix, exclude /usr/bin since it's not a real path.
25823    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25825      # a path prefixed by /cygdrive for fixpath to work.
25826      new_path="$CYGWIN_ROOT_PATH$input_path"
25827    fi
25828  fi
25829
25830  # remove trailing .exe if any
25831  new_path="${new_path/%.exe/}"
25832
25833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25834
25835  # First separate the path from the arguments. This will split at the first
25836  # space.
25837  complete="$NM"
25838  path="${complete%% *}"
25839  tmp="$complete EOL"
25840  arguments="${tmp#* }"
25841
25842  # Input might be given as Windows format, start by converting to
25843  # unix format.
25844  new_path="$path"
25845
25846  windows_path="$new_path"
25847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25848    unix_path=`$CYGPATH -u "$windows_path"`
25849    new_path="$unix_path"
25850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25852    new_path="$unix_path"
25853  fi
25854
25855
25856  # Now try to locate executable using which
25857  new_path=`$WHICH "$new_path" 2> /dev/null`
25858
25859  if test "x$new_path" = x; then
25860    # Oops. Which didn't find the executable.
25861    # The splitting of arguments from the executable at a space might have been incorrect,
25862    # since paths with space are more likely in Windows. Give it another try with the whole
25863    # argument.
25864    path="$complete"
25865    arguments="EOL"
25866    new_path="$path"
25867
25868  windows_path="$new_path"
25869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25870    unix_path=`$CYGPATH -u "$windows_path"`
25871    new_path="$unix_path"
25872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25874    new_path="$unix_path"
25875  fi
25876
25877
25878    new_path=`$WHICH "$new_path" 2> /dev/null`
25879
25880    if test "x$new_path" = x; then
25881      # It's still not found. Now this is an unrecoverable error.
25882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25883$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25884      has_space=`$ECHO "$complete" | $GREP " "`
25885      if test "x$has_space" != x; then
25886        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25887$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25888      fi
25889      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25890    fi
25891  fi
25892
25893  # Now new_path has a complete unix path to the binary
25894  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25895    # Keep paths in /bin as-is, but remove trailing .exe if any
25896    new_path="${new_path/%.exe/}"
25897    # Do not save /bin paths to all_fixpath_prefixes!
25898  else
25899    # Not in mixed or Windows style, start by that.
25900    new_path=`cmd //c echo $new_path`
25901
25902  input_path="$new_path"
25903  # Check if we need to convert this using DOS-style short mode. If the path
25904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25905  # take no chances and rewrite it.
25906  # Note: m4 eats our [], so we need to use [ and ] instead.
25907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25908  if test "x$has_forbidden_chars" != x; then
25909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25911  fi
25912
25913    # Output is in $new_path
25914
25915  windows_path="$new_path"
25916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25917    unix_path=`$CYGPATH -u "$windows_path"`
25918    new_path="$unix_path"
25919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25921    new_path="$unix_path"
25922  fi
25923
25924    # remove trailing .exe if any
25925    new_path="${new_path/%.exe/}"
25926
25927    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25928    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25929  fi
25930
25931  else
25932    # We're on a posix platform. Hooray! :)
25933    # First separate the path from the arguments. This will split at the first
25934    # space.
25935    complete="$NM"
25936    path="${complete%% *}"
25937    tmp="$complete EOL"
25938    arguments="${tmp#* }"
25939
25940    # Cannot rely on the command "which" here since it doesn't always work.
25941    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25942    if test -z "$is_absolute_path"; then
25943      # Path to executable is not absolute. Find it.
25944      IFS_save="$IFS"
25945      IFS=:
25946      for p in $PATH; do
25947        if test -f "$p/$path" && test -x "$p/$path"; then
25948          new_path="$p/$path"
25949          break
25950        fi
25951      done
25952      IFS="$IFS_save"
25953    else
25954      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25955$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25956      new_path="$path"
25957    fi
25958
25959    if test "x$new_path" = x; then
25960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25961$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25962        has_space=`$ECHO "$complete" | $GREP " "`
25963        if test "x$has_space" != x; then
25964          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25965$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25966        fi
25967        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25968      fi
25969  fi
25970
25971      # Now join together the path and the arguments once again
25972      if test "x$arguments" != xEOL; then
25973        new_complete="$new_path ${arguments% *}"
25974      else
25975        new_complete="$new_path"
25976      fi
25977
25978  if test "x$complete" != "x$new_complete"; then
25979      NM="$new_complete"
25980      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25981$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25982    fi
25983
25984    # Extract the first word of "gnm", so it can be a program name with args.
25985set dummy gnm; ac_word=$2
25986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25987$as_echo_n "checking for $ac_word... " >&6; }
25988if test "${ac_cv_path_GNM+set}" = set; then :
25989  $as_echo_n "(cached) " >&6
25990else
25991  case $GNM in
25992  [\\/]* | ?:[\\/]*)
25993  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25994  ;;
25995  *)
25996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25997for as_dir in $PATH
25998do
25999  IFS=$as_save_IFS
26000  test -z "$as_dir" && as_dir=.
26001    for ac_exec_ext in '' $ac_executable_extensions; do
26002  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26003    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26005    break 2
26006  fi
26007done
26008  done
26009IFS=$as_save_IFS
26010
26011  ;;
26012esac
26013fi
26014GNM=$ac_cv_path_GNM
26015if test -n "$GNM"; then
26016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26017$as_echo "$GNM" >&6; }
26018else
26019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26020$as_echo "no" >&6; }
26021fi
26022
26023
26024
26025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26026
26027  # First separate the path from the arguments. This will split at the first
26028  # space.
26029  complete="$GNM"
26030  path="${complete%% *}"
26031  tmp="$complete EOL"
26032  arguments="${tmp#* }"
26033
26034  # Input might be given as Windows format, start by converting to
26035  # unix format.
26036  new_path=`$CYGPATH -u "$path"`
26037
26038  # Now try to locate executable using which
26039  new_path=`$WHICH "$new_path" 2> /dev/null`
26040  # bat and cmd files are not always considered executable in cygwin causing which
26041  # to not find them
26042  if test "x$new_path" = x \
26043           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26044           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26045    new_path=`$CYGPATH -u "$path"`
26046  fi
26047  if test "x$new_path" = x; then
26048    # Oops. Which didn't find the executable.
26049    # The splitting of arguments from the executable at a space might have been incorrect,
26050    # since paths with space are more likely in Windows. Give it another try with the whole
26051    # argument.
26052    path="$complete"
26053    arguments="EOL"
26054    new_path=`$CYGPATH -u "$path"`
26055    new_path=`$WHICH "$new_path" 2> /dev/null`
26056    # bat and cmd files are not always considered executable in cygwin causing which
26057    # to not find them
26058    if test "x$new_path" = x \
26059             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26060             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26061      new_path=`$CYGPATH -u "$path"`
26062    fi
26063    if test "x$new_path" = x; then
26064      # It's still not found. Now this is an unrecoverable error.
26065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26066$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26067      has_space=`$ECHO "$complete" | $GREP " "`
26068      if test "x$has_space" != x; then
26069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26071      fi
26072      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26073    fi
26074  fi
26075
26076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26079  # "foo.exe" is OK but "foo" is an error.
26080  #
26081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26082  # It is also a way to make sure we got the proper file name for the real test later on.
26083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26084  if test "x$test_shortpath" = x; then
26085    # Short path failed, file does not exist as specified.
26086    # Try adding .exe or .cmd
26087    if test -f "${new_path}.exe"; then
26088       input_to_shortpath="${new_path}.exe"
26089    elif test -f "${new_path}.cmd"; then
26090       input_to_shortpath="${new_path}.cmd"
26091    else
26092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26093$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26096      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26097    fi
26098  else
26099    input_to_shortpath="$new_path"
26100  fi
26101
26102  # Call helper function which possibly converts this using DOS-style short mode.
26103  # If so, the updated path is stored in $new_path.
26104  new_path="$input_to_shortpath"
26105
26106  input_path="$input_to_shortpath"
26107  # Check if we need to convert this using DOS-style short mode. If the path
26108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26109  # take no chances and rewrite it.
26110  # Note: m4 eats our [], so we need to use [ and ] instead.
26111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26112  if test "x$has_forbidden_chars" != x; then
26113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26117      # Going to short mode and back again did indeed matter. Since short mode is
26118      # case insensitive, let's make it lowercase to improve readability.
26119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26120      # Now convert it back to Unix-stile (cygpath)
26121      input_path=`$CYGPATH -u "$shortmode_path"`
26122      new_path="$input_path"
26123    fi
26124  fi
26125
26126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26127  if test "x$test_cygdrive_prefix" = x; then
26128    # As a simple fix, exclude /usr/bin since it's not a real path.
26129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26131      # a path prefixed by /cygdrive for fixpath to work.
26132      new_path="$CYGWIN_ROOT_PATH$input_path"
26133    fi
26134  fi
26135
26136  # remove trailing .exe if any
26137  new_path="${new_path/%.exe/}"
26138
26139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26140
26141  # First separate the path from the arguments. This will split at the first
26142  # space.
26143  complete="$GNM"
26144  path="${complete%% *}"
26145  tmp="$complete EOL"
26146  arguments="${tmp#* }"
26147
26148  # Input might be given as Windows format, start by converting to
26149  # unix format.
26150  new_path="$path"
26151
26152  windows_path="$new_path"
26153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26154    unix_path=`$CYGPATH -u "$windows_path"`
26155    new_path="$unix_path"
26156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26158    new_path="$unix_path"
26159  fi
26160
26161
26162  # Now try to locate executable using which
26163  new_path=`$WHICH "$new_path" 2> /dev/null`
26164
26165  if test "x$new_path" = x; then
26166    # Oops. Which didn't find the executable.
26167    # The splitting of arguments from the executable at a space might have been incorrect,
26168    # since paths with space are more likely in Windows. Give it another try with the whole
26169    # argument.
26170    path="$complete"
26171    arguments="EOL"
26172    new_path="$path"
26173
26174  windows_path="$new_path"
26175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26176    unix_path=`$CYGPATH -u "$windows_path"`
26177    new_path="$unix_path"
26178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26180    new_path="$unix_path"
26181  fi
26182
26183
26184    new_path=`$WHICH "$new_path" 2> /dev/null`
26185
26186    if test "x$new_path" = x; then
26187      # It's still not found. Now this is an unrecoverable error.
26188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26189$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26190      has_space=`$ECHO "$complete" | $GREP " "`
26191      if test "x$has_space" != x; then
26192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26194      fi
26195      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26196    fi
26197  fi
26198
26199  # Now new_path has a complete unix path to the binary
26200  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26201    # Keep paths in /bin as-is, but remove trailing .exe if any
26202    new_path="${new_path/%.exe/}"
26203    # Do not save /bin paths to all_fixpath_prefixes!
26204  else
26205    # Not in mixed or Windows style, start by that.
26206    new_path=`cmd //c echo $new_path`
26207
26208  input_path="$new_path"
26209  # Check if we need to convert this using DOS-style short mode. If the path
26210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26211  # take no chances and rewrite it.
26212  # Note: m4 eats our [], so we need to use [ and ] instead.
26213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26214  if test "x$has_forbidden_chars" != x; then
26215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26217  fi
26218
26219    # Output is in $new_path
26220
26221  windows_path="$new_path"
26222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26223    unix_path=`$CYGPATH -u "$windows_path"`
26224    new_path="$unix_path"
26225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26227    new_path="$unix_path"
26228  fi
26229
26230    # remove trailing .exe if any
26231    new_path="${new_path/%.exe/}"
26232
26233    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26234    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26235  fi
26236
26237  else
26238    # We're on a posix platform. Hooray! :)
26239    # First separate the path from the arguments. This will split at the first
26240    # space.
26241    complete="$GNM"
26242    path="${complete%% *}"
26243    tmp="$complete EOL"
26244    arguments="${tmp#* }"
26245
26246    # Cannot rely on the command "which" here since it doesn't always work.
26247    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26248    if test -z "$is_absolute_path"; then
26249      # Path to executable is not absolute. Find it.
26250      IFS_save="$IFS"
26251      IFS=:
26252      for p in $PATH; do
26253        if test -f "$p/$path" && test -x "$p/$path"; then
26254          new_path="$p/$path"
26255          break
26256        fi
26257      done
26258      IFS="$IFS_save"
26259    else
26260      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26261$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26262      new_path="$path"
26263    fi
26264
26265    if test "x$new_path" = x; then
26266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26267$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26268        has_space=`$ECHO "$complete" | $GREP " "`
26269        if test "x$has_space" != x; then
26270          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26272        fi
26273        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26274      fi
26275  fi
26276
26277      # Now join together the path and the arguments once again
26278      if test "x$arguments" != xEOL; then
26279        new_complete="$new_path ${arguments% *}"
26280      else
26281        new_complete="$new_path"
26282      fi
26283
26284  if test "x$complete" != "x$new_complete"; then
26285      GNM="$new_complete"
26286      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26287$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26288    fi
26289
26290    # Extract the first word of "strip", so it can be a program name with args.
26291set dummy strip; ac_word=$2
26292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26293$as_echo_n "checking for $ac_word... " >&6; }
26294if test "${ac_cv_path_STRIP+set}" = set; then :
26295  $as_echo_n "(cached) " >&6
26296else
26297  case $STRIP in
26298  [\\/]* | ?:[\\/]*)
26299  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26300  ;;
26301  *)
26302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26303for as_dir in $PATH
26304do
26305  IFS=$as_save_IFS
26306  test -z "$as_dir" && as_dir=.
26307    for ac_exec_ext in '' $ac_executable_extensions; do
26308  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26309    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26311    break 2
26312  fi
26313done
26314  done
26315IFS=$as_save_IFS
26316
26317  ;;
26318esac
26319fi
26320STRIP=$ac_cv_path_STRIP
26321if test -n "$STRIP"; then
26322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26323$as_echo "$STRIP" >&6; }
26324else
26325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26326$as_echo "no" >&6; }
26327fi
26328
26329
26330
26331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26332
26333  # First separate the path from the arguments. This will split at the first
26334  # space.
26335  complete="$STRIP"
26336  path="${complete%% *}"
26337  tmp="$complete EOL"
26338  arguments="${tmp#* }"
26339
26340  # Input might be given as Windows format, start by converting to
26341  # unix format.
26342  new_path=`$CYGPATH -u "$path"`
26343
26344  # Now try to locate executable using which
26345  new_path=`$WHICH "$new_path" 2> /dev/null`
26346  # bat and cmd files are not always considered executable in cygwin causing which
26347  # to not find them
26348  if test "x$new_path" = x \
26349           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26350           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26351    new_path=`$CYGPATH -u "$path"`
26352  fi
26353  if test "x$new_path" = x; then
26354    # Oops. Which didn't find the executable.
26355    # The splitting of arguments from the executable at a space might have been incorrect,
26356    # since paths with space are more likely in Windows. Give it another try with the whole
26357    # argument.
26358    path="$complete"
26359    arguments="EOL"
26360    new_path=`$CYGPATH -u "$path"`
26361    new_path=`$WHICH "$new_path" 2> /dev/null`
26362    # bat and cmd files are not always considered executable in cygwin causing which
26363    # to not find them
26364    if test "x$new_path" = x \
26365             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26366             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26367      new_path=`$CYGPATH -u "$path"`
26368    fi
26369    if test "x$new_path" = x; then
26370      # It's still not found. Now this is an unrecoverable error.
26371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26372$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26373      has_space=`$ECHO "$complete" | $GREP " "`
26374      if test "x$has_space" != x; then
26375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26377      fi
26378      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26379    fi
26380  fi
26381
26382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26385  # "foo.exe" is OK but "foo" is an error.
26386  #
26387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26388  # It is also a way to make sure we got the proper file name for the real test later on.
26389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26390  if test "x$test_shortpath" = x; then
26391    # Short path failed, file does not exist as specified.
26392    # Try adding .exe or .cmd
26393    if test -f "${new_path}.exe"; then
26394       input_to_shortpath="${new_path}.exe"
26395    elif test -f "${new_path}.cmd"; then
26396       input_to_shortpath="${new_path}.cmd"
26397    else
26398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26399$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26400      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26401$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26402      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26403    fi
26404  else
26405    input_to_shortpath="$new_path"
26406  fi
26407
26408  # Call helper function which possibly converts this using DOS-style short mode.
26409  # If so, the updated path is stored in $new_path.
26410  new_path="$input_to_shortpath"
26411
26412  input_path="$input_to_shortpath"
26413  # Check if we need to convert this using DOS-style short mode. If the path
26414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26415  # take no chances and rewrite it.
26416  # Note: m4 eats our [], so we need to use [ and ] instead.
26417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26418  if test "x$has_forbidden_chars" != x; then
26419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26423      # Going to short mode and back again did indeed matter. Since short mode is
26424      # case insensitive, let's make it lowercase to improve readability.
26425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26426      # Now convert it back to Unix-stile (cygpath)
26427      input_path=`$CYGPATH -u "$shortmode_path"`
26428      new_path="$input_path"
26429    fi
26430  fi
26431
26432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26433  if test "x$test_cygdrive_prefix" = x; then
26434    # As a simple fix, exclude /usr/bin since it's not a real path.
26435    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26437      # a path prefixed by /cygdrive for fixpath to work.
26438      new_path="$CYGWIN_ROOT_PATH$input_path"
26439    fi
26440  fi
26441
26442  # remove trailing .exe if any
26443  new_path="${new_path/%.exe/}"
26444
26445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26446
26447  # First separate the path from the arguments. This will split at the first
26448  # space.
26449  complete="$STRIP"
26450  path="${complete%% *}"
26451  tmp="$complete EOL"
26452  arguments="${tmp#* }"
26453
26454  # Input might be given as Windows format, start by converting to
26455  # unix format.
26456  new_path="$path"
26457
26458  windows_path="$new_path"
26459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26460    unix_path=`$CYGPATH -u "$windows_path"`
26461    new_path="$unix_path"
26462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26464    new_path="$unix_path"
26465  fi
26466
26467
26468  # Now try to locate executable using which
26469  new_path=`$WHICH "$new_path" 2> /dev/null`
26470
26471  if test "x$new_path" = x; then
26472    # Oops. Which didn't find the executable.
26473    # The splitting of arguments from the executable at a space might have been incorrect,
26474    # since paths with space are more likely in Windows. Give it another try with the whole
26475    # argument.
26476    path="$complete"
26477    arguments="EOL"
26478    new_path="$path"
26479
26480  windows_path="$new_path"
26481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26482    unix_path=`$CYGPATH -u "$windows_path"`
26483    new_path="$unix_path"
26484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26486    new_path="$unix_path"
26487  fi
26488
26489
26490    new_path=`$WHICH "$new_path" 2> /dev/null`
26491
26492    if test "x$new_path" = x; then
26493      # It's still not found. Now this is an unrecoverable error.
26494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26495$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26496      has_space=`$ECHO "$complete" | $GREP " "`
26497      if test "x$has_space" != x; then
26498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26500      fi
26501      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26502    fi
26503  fi
26504
26505  # Now new_path has a complete unix path to the binary
26506  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26507    # Keep paths in /bin as-is, but remove trailing .exe if any
26508    new_path="${new_path/%.exe/}"
26509    # Do not save /bin paths to all_fixpath_prefixes!
26510  else
26511    # Not in mixed or Windows style, start by that.
26512    new_path=`cmd //c echo $new_path`
26513
26514  input_path="$new_path"
26515  # Check if we need to convert this using DOS-style short mode. If the path
26516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26517  # take no chances and rewrite it.
26518  # Note: m4 eats our [], so we need to use [ and ] instead.
26519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26520  if test "x$has_forbidden_chars" != x; then
26521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26523  fi
26524
26525    # Output is in $new_path
26526
26527  windows_path="$new_path"
26528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26529    unix_path=`$CYGPATH -u "$windows_path"`
26530    new_path="$unix_path"
26531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26533    new_path="$unix_path"
26534  fi
26535
26536    # remove trailing .exe if any
26537    new_path="${new_path/%.exe/}"
26538
26539    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26540    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26541  fi
26542
26543  else
26544    # We're on a posix platform. Hooray! :)
26545    # First separate the path from the arguments. This will split at the first
26546    # space.
26547    complete="$STRIP"
26548    path="${complete%% *}"
26549    tmp="$complete EOL"
26550    arguments="${tmp#* }"
26551
26552    # Cannot rely on the command "which" here since it doesn't always work.
26553    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26554    if test -z "$is_absolute_path"; then
26555      # Path to executable is not absolute. Find it.
26556      IFS_save="$IFS"
26557      IFS=:
26558      for p in $PATH; do
26559        if test -f "$p/$path" && test -x "$p/$path"; then
26560          new_path="$p/$path"
26561          break
26562        fi
26563      done
26564      IFS="$IFS_save"
26565    else
26566      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26567$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26568      new_path="$path"
26569    fi
26570
26571    if test "x$new_path" = x; then
26572        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26573$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26574        has_space=`$ECHO "$complete" | $GREP " "`
26575        if test "x$has_space" != x; then
26576          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26577$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26578        fi
26579        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26580      fi
26581  fi
26582
26583      # Now join together the path and the arguments once again
26584      if test "x$arguments" != xEOL; then
26585        new_complete="$new_path ${arguments% *}"
26586      else
26587        new_complete="$new_path"
26588      fi
26589
26590  if test "x$complete" != "x$new_complete"; then
26591      STRIP="$new_complete"
26592      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26593$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26594    fi
26595
26596    # Extract the first word of "mcs", so it can be a program name with args.
26597set dummy mcs; ac_word=$2
26598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26599$as_echo_n "checking for $ac_word... " >&6; }
26600if test "${ac_cv_path_MCS+set}" = set; then :
26601  $as_echo_n "(cached) " >&6
26602else
26603  case $MCS in
26604  [\\/]* | ?:[\\/]*)
26605  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26606  ;;
26607  *)
26608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26609for as_dir in $PATH
26610do
26611  IFS=$as_save_IFS
26612  test -z "$as_dir" && as_dir=.
26613    for ac_exec_ext in '' $ac_executable_extensions; do
26614  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26615    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26617    break 2
26618  fi
26619done
26620  done
26621IFS=$as_save_IFS
26622
26623  ;;
26624esac
26625fi
26626MCS=$ac_cv_path_MCS
26627if test -n "$MCS"; then
26628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26629$as_echo "$MCS" >&6; }
26630else
26631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26632$as_echo "no" >&6; }
26633fi
26634
26635
26636
26637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26638
26639  # First separate the path from the arguments. This will split at the first
26640  # space.
26641  complete="$MCS"
26642  path="${complete%% *}"
26643  tmp="$complete EOL"
26644  arguments="${tmp#* }"
26645
26646  # Input might be given as Windows format, start by converting to
26647  # unix format.
26648  new_path=`$CYGPATH -u "$path"`
26649
26650  # Now try to locate executable using which
26651  new_path=`$WHICH "$new_path" 2> /dev/null`
26652  # bat and cmd files are not always considered executable in cygwin causing which
26653  # to not find them
26654  if test "x$new_path" = x \
26655           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26656           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26657    new_path=`$CYGPATH -u "$path"`
26658  fi
26659  if test "x$new_path" = x; then
26660    # Oops. Which didn't find the executable.
26661    # The splitting of arguments from the executable at a space might have been incorrect,
26662    # since paths with space are more likely in Windows. Give it another try with the whole
26663    # argument.
26664    path="$complete"
26665    arguments="EOL"
26666    new_path=`$CYGPATH -u "$path"`
26667    new_path=`$WHICH "$new_path" 2> /dev/null`
26668    # bat and cmd files are not always considered executable in cygwin causing which
26669    # to not find them
26670    if test "x$new_path" = x \
26671             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26672             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26673      new_path=`$CYGPATH -u "$path"`
26674    fi
26675    if test "x$new_path" = x; then
26676      # It's still not found. Now this is an unrecoverable error.
26677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26678$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26679      has_space=`$ECHO "$complete" | $GREP " "`
26680      if test "x$has_space" != x; then
26681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26683      fi
26684      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26685    fi
26686  fi
26687
26688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26691  # "foo.exe" is OK but "foo" is an error.
26692  #
26693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26694  # It is also a way to make sure we got the proper file name for the real test later on.
26695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26696  if test "x$test_shortpath" = x; then
26697    # Short path failed, file does not exist as specified.
26698    # Try adding .exe or .cmd
26699    if test -f "${new_path}.exe"; then
26700       input_to_shortpath="${new_path}.exe"
26701    elif test -f "${new_path}.cmd"; then
26702       input_to_shortpath="${new_path}.cmd"
26703    else
26704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26705$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26706      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26707$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26708      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26709    fi
26710  else
26711    input_to_shortpath="$new_path"
26712  fi
26713
26714  # Call helper function which possibly converts this using DOS-style short mode.
26715  # If so, the updated path is stored in $new_path.
26716  new_path="$input_to_shortpath"
26717
26718  input_path="$input_to_shortpath"
26719  # Check if we need to convert this using DOS-style short mode. If the path
26720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26721  # take no chances and rewrite it.
26722  # Note: m4 eats our [], so we need to use [ and ] instead.
26723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26724  if test "x$has_forbidden_chars" != x; then
26725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26729      # Going to short mode and back again did indeed matter. Since short mode is
26730      # case insensitive, let's make it lowercase to improve readability.
26731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26732      # Now convert it back to Unix-stile (cygpath)
26733      input_path=`$CYGPATH -u "$shortmode_path"`
26734      new_path="$input_path"
26735    fi
26736  fi
26737
26738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26739  if test "x$test_cygdrive_prefix" = x; then
26740    # As a simple fix, exclude /usr/bin since it's not a real path.
26741    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26743      # a path prefixed by /cygdrive for fixpath to work.
26744      new_path="$CYGWIN_ROOT_PATH$input_path"
26745    fi
26746  fi
26747
26748  # remove trailing .exe if any
26749  new_path="${new_path/%.exe/}"
26750
26751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26752
26753  # First separate the path from the arguments. This will split at the first
26754  # space.
26755  complete="$MCS"
26756  path="${complete%% *}"
26757  tmp="$complete EOL"
26758  arguments="${tmp#* }"
26759
26760  # Input might be given as Windows format, start by converting to
26761  # unix format.
26762  new_path="$path"
26763
26764  windows_path="$new_path"
26765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26766    unix_path=`$CYGPATH -u "$windows_path"`
26767    new_path="$unix_path"
26768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26770    new_path="$unix_path"
26771  fi
26772
26773
26774  # Now try to locate executable using which
26775  new_path=`$WHICH "$new_path" 2> /dev/null`
26776
26777  if test "x$new_path" = x; then
26778    # Oops. Which didn't find the executable.
26779    # The splitting of arguments from the executable at a space might have been incorrect,
26780    # since paths with space are more likely in Windows. Give it another try with the whole
26781    # argument.
26782    path="$complete"
26783    arguments="EOL"
26784    new_path="$path"
26785
26786  windows_path="$new_path"
26787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26788    unix_path=`$CYGPATH -u "$windows_path"`
26789    new_path="$unix_path"
26790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26792    new_path="$unix_path"
26793  fi
26794
26795
26796    new_path=`$WHICH "$new_path" 2> /dev/null`
26797
26798    if test "x$new_path" = x; then
26799      # It's still not found. Now this is an unrecoverable error.
26800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26801$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26802      has_space=`$ECHO "$complete" | $GREP " "`
26803      if test "x$has_space" != x; then
26804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26806      fi
26807      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26808    fi
26809  fi
26810
26811  # Now new_path has a complete unix path to the binary
26812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26813    # Keep paths in /bin as-is, but remove trailing .exe if any
26814    new_path="${new_path/%.exe/}"
26815    # Do not save /bin paths to all_fixpath_prefixes!
26816  else
26817    # Not in mixed or Windows style, start by that.
26818    new_path=`cmd //c echo $new_path`
26819
26820  input_path="$new_path"
26821  # Check if we need to convert this using DOS-style short mode. If the path
26822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26823  # take no chances and rewrite it.
26824  # Note: m4 eats our [], so we need to use [ and ] instead.
26825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26826  if test "x$has_forbidden_chars" != x; then
26827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26829  fi
26830
26831    # Output is in $new_path
26832
26833  windows_path="$new_path"
26834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26835    unix_path=`$CYGPATH -u "$windows_path"`
26836    new_path="$unix_path"
26837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26839    new_path="$unix_path"
26840  fi
26841
26842    # remove trailing .exe if any
26843    new_path="${new_path/%.exe/}"
26844
26845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26847  fi
26848
26849  else
26850    # We're on a posix platform. Hooray! :)
26851    # First separate the path from the arguments. This will split at the first
26852    # space.
26853    complete="$MCS"
26854    path="${complete%% *}"
26855    tmp="$complete EOL"
26856    arguments="${tmp#* }"
26857
26858    # Cannot rely on the command "which" here since it doesn't always work.
26859    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26860    if test -z "$is_absolute_path"; then
26861      # Path to executable is not absolute. Find it.
26862      IFS_save="$IFS"
26863      IFS=:
26864      for p in $PATH; do
26865        if test -f "$p/$path" && test -x "$p/$path"; then
26866          new_path="$p/$path"
26867          break
26868        fi
26869      done
26870      IFS="$IFS_save"
26871    else
26872      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26873$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26874      new_path="$path"
26875    fi
26876
26877    if test "x$new_path" = x; then
26878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26879$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26880        has_space=`$ECHO "$complete" | $GREP " "`
26881        if test "x$has_space" != x; then
26882          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26884        fi
26885        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26886      fi
26887  fi
26888
26889      # Now join together the path and the arguments once again
26890      if test "x$arguments" != xEOL; then
26891        new_complete="$new_path ${arguments% *}"
26892      else
26893        new_complete="$new_path"
26894      fi
26895
26896  if test "x$complete" != "x$new_complete"; then
26897      MCS="$new_complete"
26898      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26899$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26900    fi
26901
26902elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26903    if test -n "$ac_tool_prefix"; then
26904  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26905set dummy ${ac_tool_prefix}nm; ac_word=$2
26906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26907$as_echo_n "checking for $ac_word... " >&6; }
26908if test "${ac_cv_prog_NM+set}" = set; then :
26909  $as_echo_n "(cached) " >&6
26910else
26911  if test -n "$NM"; then
26912  ac_cv_prog_NM="$NM" # Let the user override the test.
26913else
26914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26915for as_dir in $PATH
26916do
26917  IFS=$as_save_IFS
26918  test -z "$as_dir" && as_dir=.
26919    for ac_exec_ext in '' $ac_executable_extensions; do
26920  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26921    ac_cv_prog_NM="${ac_tool_prefix}nm"
26922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26923    break 2
26924  fi
26925done
26926  done
26927IFS=$as_save_IFS
26928
26929fi
26930fi
26931NM=$ac_cv_prog_NM
26932if test -n "$NM"; then
26933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26934$as_echo "$NM" >&6; }
26935else
26936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26937$as_echo "no" >&6; }
26938fi
26939
26940
26941fi
26942if test -z "$ac_cv_prog_NM"; then
26943  ac_ct_NM=$NM
26944  # Extract the first word of "nm", so it can be a program name with args.
26945set dummy nm; ac_word=$2
26946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26947$as_echo_n "checking for $ac_word... " >&6; }
26948if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26949  $as_echo_n "(cached) " >&6
26950else
26951  if test -n "$ac_ct_NM"; then
26952  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26953else
26954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26955for as_dir in $PATH
26956do
26957  IFS=$as_save_IFS
26958  test -z "$as_dir" && as_dir=.
26959    for ac_exec_ext in '' $ac_executable_extensions; do
26960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26961    ac_cv_prog_ac_ct_NM="nm"
26962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26963    break 2
26964  fi
26965done
26966  done
26967IFS=$as_save_IFS
26968
26969fi
26970fi
26971ac_ct_NM=$ac_cv_prog_ac_ct_NM
26972if test -n "$ac_ct_NM"; then
26973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26974$as_echo "$ac_ct_NM" >&6; }
26975else
26976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26977$as_echo "no" >&6; }
26978fi
26979
26980  if test "x$ac_ct_NM" = x; then
26981    NM=""
26982  else
26983    case $cross_compiling:$ac_tool_warned in
26984yes:)
26985{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26986$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26987ac_tool_warned=yes ;;
26988esac
26989    NM=$ac_ct_NM
26990  fi
26991else
26992  NM="$ac_cv_prog_NM"
26993fi
26994
26995
26996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26997
26998  # First separate the path from the arguments. This will split at the first
26999  # space.
27000  complete="$NM"
27001  path="${complete%% *}"
27002  tmp="$complete EOL"
27003  arguments="${tmp#* }"
27004
27005  # Input might be given as Windows format, start by converting to
27006  # unix format.
27007  new_path=`$CYGPATH -u "$path"`
27008
27009  # Now try to locate executable using which
27010  new_path=`$WHICH "$new_path" 2> /dev/null`
27011  # bat and cmd files are not always considered executable in cygwin causing which
27012  # to not find them
27013  if test "x$new_path" = x \
27014           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27015           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27016    new_path=`$CYGPATH -u "$path"`
27017  fi
27018  if test "x$new_path" = x; then
27019    # Oops. Which didn't find the executable.
27020    # The splitting of arguments from the executable at a space might have been incorrect,
27021    # since paths with space are more likely in Windows. Give it another try with the whole
27022    # argument.
27023    path="$complete"
27024    arguments="EOL"
27025    new_path=`$CYGPATH -u "$path"`
27026    new_path=`$WHICH "$new_path" 2> /dev/null`
27027    # bat and cmd files are not always considered executable in cygwin causing which
27028    # to not find them
27029    if test "x$new_path" = x \
27030             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27031             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27032      new_path=`$CYGPATH -u "$path"`
27033    fi
27034    if test "x$new_path" = x; then
27035      # It's still not found. Now this is an unrecoverable error.
27036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27037$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27038      has_space=`$ECHO "$complete" | $GREP " "`
27039      if test "x$has_space" != x; then
27040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27042      fi
27043      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27044    fi
27045  fi
27046
27047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27050  # "foo.exe" is OK but "foo" is an error.
27051  #
27052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27053  # It is also a way to make sure we got the proper file name for the real test later on.
27054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27055  if test "x$test_shortpath" = x; then
27056    # Short path failed, file does not exist as specified.
27057    # Try adding .exe or .cmd
27058    if test -f "${new_path}.exe"; then
27059       input_to_shortpath="${new_path}.exe"
27060    elif test -f "${new_path}.cmd"; then
27061       input_to_shortpath="${new_path}.cmd"
27062    else
27063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27064$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27067      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27068    fi
27069  else
27070    input_to_shortpath="$new_path"
27071  fi
27072
27073  # Call helper function which possibly converts this using DOS-style short mode.
27074  # If so, the updated path is stored in $new_path.
27075  new_path="$input_to_shortpath"
27076
27077  input_path="$input_to_shortpath"
27078  # Check if we need to convert this using DOS-style short mode. If the path
27079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27080  # take no chances and rewrite it.
27081  # Note: m4 eats our [], so we need to use [ and ] instead.
27082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27083  if test "x$has_forbidden_chars" != x; then
27084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27088      # Going to short mode and back again did indeed matter. Since short mode is
27089      # case insensitive, let's make it lowercase to improve readability.
27090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27091      # Now convert it back to Unix-stile (cygpath)
27092      input_path=`$CYGPATH -u "$shortmode_path"`
27093      new_path="$input_path"
27094    fi
27095  fi
27096
27097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27098  if test "x$test_cygdrive_prefix" = x; then
27099    # As a simple fix, exclude /usr/bin since it's not a real path.
27100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27102      # a path prefixed by /cygdrive for fixpath to work.
27103      new_path="$CYGWIN_ROOT_PATH$input_path"
27104    fi
27105  fi
27106
27107  # remove trailing .exe if any
27108  new_path="${new_path/%.exe/}"
27109
27110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27111
27112  # First separate the path from the arguments. This will split at the first
27113  # space.
27114  complete="$NM"
27115  path="${complete%% *}"
27116  tmp="$complete EOL"
27117  arguments="${tmp#* }"
27118
27119  # Input might be given as Windows format, start by converting to
27120  # unix format.
27121  new_path="$path"
27122
27123  windows_path="$new_path"
27124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27125    unix_path=`$CYGPATH -u "$windows_path"`
27126    new_path="$unix_path"
27127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27129    new_path="$unix_path"
27130  fi
27131
27132
27133  # Now try to locate executable using which
27134  new_path=`$WHICH "$new_path" 2> /dev/null`
27135
27136  if test "x$new_path" = x; then
27137    # Oops. Which didn't find the executable.
27138    # The splitting of arguments from the executable at a space might have been incorrect,
27139    # since paths with space are more likely in Windows. Give it another try with the whole
27140    # argument.
27141    path="$complete"
27142    arguments="EOL"
27143    new_path="$path"
27144
27145  windows_path="$new_path"
27146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27147    unix_path=`$CYGPATH -u "$windows_path"`
27148    new_path="$unix_path"
27149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27151    new_path="$unix_path"
27152  fi
27153
27154
27155    new_path=`$WHICH "$new_path" 2> /dev/null`
27156
27157    if test "x$new_path" = x; then
27158      # It's still not found. Now this is an unrecoverable error.
27159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27160$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27161      has_space=`$ECHO "$complete" | $GREP " "`
27162      if test "x$has_space" != x; then
27163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27165      fi
27166      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27167    fi
27168  fi
27169
27170  # Now new_path has a complete unix path to the binary
27171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27172    # Keep paths in /bin as-is, but remove trailing .exe if any
27173    new_path="${new_path/%.exe/}"
27174    # Do not save /bin paths to all_fixpath_prefixes!
27175  else
27176    # Not in mixed or Windows style, start by that.
27177    new_path=`cmd //c echo $new_path`
27178
27179  input_path="$new_path"
27180  # Check if we need to convert this using DOS-style short mode. If the path
27181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27182  # take no chances and rewrite it.
27183  # Note: m4 eats our [], so we need to use [ and ] instead.
27184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27185  if test "x$has_forbidden_chars" != x; then
27186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27188  fi
27189
27190    # Output is in $new_path
27191
27192  windows_path="$new_path"
27193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27194    unix_path=`$CYGPATH -u "$windows_path"`
27195    new_path="$unix_path"
27196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27198    new_path="$unix_path"
27199  fi
27200
27201    # remove trailing .exe if any
27202    new_path="${new_path/%.exe/}"
27203
27204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27206  fi
27207
27208  else
27209    # We're on a posix platform. Hooray! :)
27210    # First separate the path from the arguments. This will split at the first
27211    # space.
27212    complete="$NM"
27213    path="${complete%% *}"
27214    tmp="$complete EOL"
27215    arguments="${tmp#* }"
27216
27217    # Cannot rely on the command "which" here since it doesn't always work.
27218    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27219    if test -z "$is_absolute_path"; then
27220      # Path to executable is not absolute. Find it.
27221      IFS_save="$IFS"
27222      IFS=:
27223      for p in $PATH; do
27224        if test -f "$p/$path" && test -x "$p/$path"; then
27225          new_path="$p/$path"
27226          break
27227        fi
27228      done
27229      IFS="$IFS_save"
27230    else
27231      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27232$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27233      new_path="$path"
27234    fi
27235
27236    if test "x$new_path" = x; then
27237        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27238$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27239        has_space=`$ECHO "$complete" | $GREP " "`
27240        if test "x$has_space" != x; then
27241          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27242$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27243        fi
27244        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27245      fi
27246  fi
27247
27248      # Now join together the path and the arguments once again
27249      if test "x$arguments" != xEOL; then
27250        new_complete="$new_path ${arguments% *}"
27251      else
27252        new_complete="$new_path"
27253      fi
27254
27255  if test "x$complete" != "x$new_complete"; then
27256      NM="$new_complete"
27257      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27258$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27259    fi
27260
27261    GNM="$NM"
27262
27263    if test -n "$ac_tool_prefix"; then
27264  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27265set dummy ${ac_tool_prefix}strip; ac_word=$2
27266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27267$as_echo_n "checking for $ac_word... " >&6; }
27268if test "${ac_cv_prog_STRIP+set}" = set; then :
27269  $as_echo_n "(cached) " >&6
27270else
27271  if test -n "$STRIP"; then
27272  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27273else
27274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27275for as_dir in $PATH
27276do
27277  IFS=$as_save_IFS
27278  test -z "$as_dir" && as_dir=.
27279    for ac_exec_ext in '' $ac_executable_extensions; do
27280  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27281    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27283    break 2
27284  fi
27285done
27286  done
27287IFS=$as_save_IFS
27288
27289fi
27290fi
27291STRIP=$ac_cv_prog_STRIP
27292if test -n "$STRIP"; then
27293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27294$as_echo "$STRIP" >&6; }
27295else
27296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27297$as_echo "no" >&6; }
27298fi
27299
27300
27301fi
27302if test -z "$ac_cv_prog_STRIP"; then
27303  ac_ct_STRIP=$STRIP
27304  # Extract the first word of "strip", so it can be a program name with args.
27305set dummy strip; ac_word=$2
27306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27307$as_echo_n "checking for $ac_word... " >&6; }
27308if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27309  $as_echo_n "(cached) " >&6
27310else
27311  if test -n "$ac_ct_STRIP"; then
27312  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27313else
27314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27315for as_dir in $PATH
27316do
27317  IFS=$as_save_IFS
27318  test -z "$as_dir" && as_dir=.
27319    for ac_exec_ext in '' $ac_executable_extensions; do
27320  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27321    ac_cv_prog_ac_ct_STRIP="strip"
27322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27323    break 2
27324  fi
27325done
27326  done
27327IFS=$as_save_IFS
27328
27329fi
27330fi
27331ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27332if test -n "$ac_ct_STRIP"; then
27333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27334$as_echo "$ac_ct_STRIP" >&6; }
27335else
27336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27337$as_echo "no" >&6; }
27338fi
27339
27340  if test "x$ac_ct_STRIP" = x; then
27341    STRIP=""
27342  else
27343    case $cross_compiling:$ac_tool_warned in
27344yes:)
27345{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27346$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27347ac_tool_warned=yes ;;
27348esac
27349    STRIP=$ac_ct_STRIP
27350  fi
27351else
27352  STRIP="$ac_cv_prog_STRIP"
27353fi
27354
27355
27356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27357
27358  # First separate the path from the arguments. This will split at the first
27359  # space.
27360  complete="$STRIP"
27361  path="${complete%% *}"
27362  tmp="$complete EOL"
27363  arguments="${tmp#* }"
27364
27365  # Input might be given as Windows format, start by converting to
27366  # unix format.
27367  new_path=`$CYGPATH -u "$path"`
27368
27369  # Now try to locate executable using which
27370  new_path=`$WHICH "$new_path" 2> /dev/null`
27371  # bat and cmd files are not always considered executable in cygwin causing which
27372  # to not find them
27373  if test "x$new_path" = x \
27374           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27375           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27376    new_path=`$CYGPATH -u "$path"`
27377  fi
27378  if test "x$new_path" = x; then
27379    # Oops. Which didn't find the executable.
27380    # The splitting of arguments from the executable at a space might have been incorrect,
27381    # since paths with space are more likely in Windows. Give it another try with the whole
27382    # argument.
27383    path="$complete"
27384    arguments="EOL"
27385    new_path=`$CYGPATH -u "$path"`
27386    new_path=`$WHICH "$new_path" 2> /dev/null`
27387    # bat and cmd files are not always considered executable in cygwin causing which
27388    # to not find them
27389    if test "x$new_path" = x \
27390             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27391             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27392      new_path=`$CYGPATH -u "$path"`
27393    fi
27394    if test "x$new_path" = x; then
27395      # It's still not found. Now this is an unrecoverable error.
27396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27397$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27398      has_space=`$ECHO "$complete" | $GREP " "`
27399      if test "x$has_space" != x; then
27400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27402      fi
27403      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27404    fi
27405  fi
27406
27407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27410  # "foo.exe" is OK but "foo" is an error.
27411  #
27412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27413  # It is also a way to make sure we got the proper file name for the real test later on.
27414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27415  if test "x$test_shortpath" = x; then
27416    # Short path failed, file does not exist as specified.
27417    # Try adding .exe or .cmd
27418    if test -f "${new_path}.exe"; then
27419       input_to_shortpath="${new_path}.exe"
27420    elif test -f "${new_path}.cmd"; then
27421       input_to_shortpath="${new_path}.cmd"
27422    else
27423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27424$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27425      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27426$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27427      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27428    fi
27429  else
27430    input_to_shortpath="$new_path"
27431  fi
27432
27433  # Call helper function which possibly converts this using DOS-style short mode.
27434  # If so, the updated path is stored in $new_path.
27435  new_path="$input_to_shortpath"
27436
27437  input_path="$input_to_shortpath"
27438  # Check if we need to convert this using DOS-style short mode. If the path
27439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27440  # take no chances and rewrite it.
27441  # Note: m4 eats our [], so we need to use [ and ] instead.
27442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27443  if test "x$has_forbidden_chars" != x; then
27444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27448      # Going to short mode and back again did indeed matter. Since short mode is
27449      # case insensitive, let's make it lowercase to improve readability.
27450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27451      # Now convert it back to Unix-stile (cygpath)
27452      input_path=`$CYGPATH -u "$shortmode_path"`
27453      new_path="$input_path"
27454    fi
27455  fi
27456
27457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27458  if test "x$test_cygdrive_prefix" = x; then
27459    # As a simple fix, exclude /usr/bin since it's not a real path.
27460    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27462      # a path prefixed by /cygdrive for fixpath to work.
27463      new_path="$CYGWIN_ROOT_PATH$input_path"
27464    fi
27465  fi
27466
27467  # remove trailing .exe if any
27468  new_path="${new_path/%.exe/}"
27469
27470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27471
27472  # First separate the path from the arguments. This will split at the first
27473  # space.
27474  complete="$STRIP"
27475  path="${complete%% *}"
27476  tmp="$complete EOL"
27477  arguments="${tmp#* }"
27478
27479  # Input might be given as Windows format, start by converting to
27480  # unix format.
27481  new_path="$path"
27482
27483  windows_path="$new_path"
27484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27485    unix_path=`$CYGPATH -u "$windows_path"`
27486    new_path="$unix_path"
27487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27489    new_path="$unix_path"
27490  fi
27491
27492
27493  # Now try to locate executable using which
27494  new_path=`$WHICH "$new_path" 2> /dev/null`
27495
27496  if test "x$new_path" = x; then
27497    # Oops. Which didn't find the executable.
27498    # The splitting of arguments from the executable at a space might have been incorrect,
27499    # since paths with space are more likely in Windows. Give it another try with the whole
27500    # argument.
27501    path="$complete"
27502    arguments="EOL"
27503    new_path="$path"
27504
27505  windows_path="$new_path"
27506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27507    unix_path=`$CYGPATH -u "$windows_path"`
27508    new_path="$unix_path"
27509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27511    new_path="$unix_path"
27512  fi
27513
27514
27515    new_path=`$WHICH "$new_path" 2> /dev/null`
27516
27517    if test "x$new_path" = x; then
27518      # It's still not found. Now this is an unrecoverable error.
27519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27520$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27521      has_space=`$ECHO "$complete" | $GREP " "`
27522      if test "x$has_space" != x; then
27523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27525      fi
27526      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27527    fi
27528  fi
27529
27530  # Now new_path has a complete unix path to the binary
27531  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27532    # Keep paths in /bin as-is, but remove trailing .exe if any
27533    new_path="${new_path/%.exe/}"
27534    # Do not save /bin paths to all_fixpath_prefixes!
27535  else
27536    # Not in mixed or Windows style, start by that.
27537    new_path=`cmd //c echo $new_path`
27538
27539  input_path="$new_path"
27540  # Check if we need to convert this using DOS-style short mode. If the path
27541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27542  # take no chances and rewrite it.
27543  # Note: m4 eats our [], so we need to use [ and ] instead.
27544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27545  if test "x$has_forbidden_chars" != x; then
27546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27548  fi
27549
27550    # Output is in $new_path
27551
27552  windows_path="$new_path"
27553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27554    unix_path=`$CYGPATH -u "$windows_path"`
27555    new_path="$unix_path"
27556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27558    new_path="$unix_path"
27559  fi
27560
27561    # remove trailing .exe if any
27562    new_path="${new_path/%.exe/}"
27563
27564    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27565    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27566  fi
27567
27568  else
27569    # We're on a posix platform. Hooray! :)
27570    # First separate the path from the arguments. This will split at the first
27571    # space.
27572    complete="$STRIP"
27573    path="${complete%% *}"
27574    tmp="$complete EOL"
27575    arguments="${tmp#* }"
27576
27577    # Cannot rely on the command "which" here since it doesn't always work.
27578    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27579    if test -z "$is_absolute_path"; then
27580      # Path to executable is not absolute. Find it.
27581      IFS_save="$IFS"
27582      IFS=:
27583      for p in $PATH; do
27584        if test -f "$p/$path" && test -x "$p/$path"; then
27585          new_path="$p/$path"
27586          break
27587        fi
27588      done
27589      IFS="$IFS_save"
27590    else
27591      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27592$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27593      new_path="$path"
27594    fi
27595
27596    if test "x$new_path" = x; then
27597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27598$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27599        has_space=`$ECHO "$complete" | $GREP " "`
27600        if test "x$has_space" != x; then
27601          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27602$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27603        fi
27604        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27605      fi
27606  fi
27607
27608      # Now join together the path and the arguments once again
27609      if test "x$arguments" != xEOL; then
27610        new_complete="$new_path ${arguments% *}"
27611      else
27612        new_complete="$new_path"
27613      fi
27614
27615  if test "x$complete" != "x$new_complete"; then
27616      STRIP="$new_complete"
27617      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27618$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27619    fi
27620
27621fi
27622
27623# objcopy is used for moving debug symbols to separate files when
27624# full debug symbols are enabled.
27625if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27626    if test -n "$ac_tool_prefix"; then
27627  for ac_prog in gobjcopy objcopy
27628  do
27629    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27630set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27632$as_echo_n "checking for $ac_word... " >&6; }
27633if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27634  $as_echo_n "(cached) " >&6
27635else
27636  if test -n "$OBJCOPY"; then
27637  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27638else
27639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27640for as_dir in $PATH
27641do
27642  IFS=$as_save_IFS
27643  test -z "$as_dir" && as_dir=.
27644    for ac_exec_ext in '' $ac_executable_extensions; do
27645  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27646    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27648    break 2
27649  fi
27650done
27651  done
27652IFS=$as_save_IFS
27653
27654fi
27655fi
27656OBJCOPY=$ac_cv_prog_OBJCOPY
27657if test -n "$OBJCOPY"; then
27658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27659$as_echo "$OBJCOPY" >&6; }
27660else
27661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27662$as_echo "no" >&6; }
27663fi
27664
27665
27666    test -n "$OBJCOPY" && break
27667  done
27668fi
27669if test -z "$OBJCOPY"; then
27670  ac_ct_OBJCOPY=$OBJCOPY
27671  for ac_prog in gobjcopy objcopy
27672do
27673  # Extract the first word of "$ac_prog", so it can be a program name with args.
27674set dummy $ac_prog; ac_word=$2
27675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27676$as_echo_n "checking for $ac_word... " >&6; }
27677if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27678  $as_echo_n "(cached) " >&6
27679else
27680  if test -n "$ac_ct_OBJCOPY"; then
27681  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27682else
27683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27684for as_dir in $PATH
27685do
27686  IFS=$as_save_IFS
27687  test -z "$as_dir" && as_dir=.
27688    for ac_exec_ext in '' $ac_executable_extensions; do
27689  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27690    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27692    break 2
27693  fi
27694done
27695  done
27696IFS=$as_save_IFS
27697
27698fi
27699fi
27700ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27701if test -n "$ac_ct_OBJCOPY"; then
27702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27703$as_echo "$ac_ct_OBJCOPY" >&6; }
27704else
27705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27706$as_echo "no" >&6; }
27707fi
27708
27709
27710  test -n "$ac_ct_OBJCOPY" && break
27711done
27712
27713  if test "x$ac_ct_OBJCOPY" = x; then
27714    OBJCOPY=""
27715  else
27716    case $cross_compiling:$ac_tool_warned in
27717yes:)
27718{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27719$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27720ac_tool_warned=yes ;;
27721esac
27722    OBJCOPY=$ac_ct_OBJCOPY
27723  fi
27724fi
27725
27726    # Only call fixup if objcopy was found.
27727    if test -n "$OBJCOPY"; then
27728
27729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27730
27731  # First separate the path from the arguments. This will split at the first
27732  # space.
27733  complete="$OBJCOPY"
27734  path="${complete%% *}"
27735  tmp="$complete EOL"
27736  arguments="${tmp#* }"
27737
27738  # Input might be given as Windows format, start by converting to
27739  # unix format.
27740  new_path=`$CYGPATH -u "$path"`
27741
27742  # Now try to locate executable using which
27743  new_path=`$WHICH "$new_path" 2> /dev/null`
27744  # bat and cmd files are not always considered executable in cygwin causing which
27745  # to not find them
27746  if test "x$new_path" = x \
27747           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27748           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27749    new_path=`$CYGPATH -u "$path"`
27750  fi
27751  if test "x$new_path" = x; then
27752    # Oops. Which didn't find the executable.
27753    # The splitting of arguments from the executable at a space might have been incorrect,
27754    # since paths with space are more likely in Windows. Give it another try with the whole
27755    # argument.
27756    path="$complete"
27757    arguments="EOL"
27758    new_path=`$CYGPATH -u "$path"`
27759    new_path=`$WHICH "$new_path" 2> /dev/null`
27760    # bat and cmd files are not always considered executable in cygwin causing which
27761    # to not find them
27762    if test "x$new_path" = x \
27763             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27764             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27765      new_path=`$CYGPATH -u "$path"`
27766    fi
27767    if test "x$new_path" = x; then
27768      # It's still not found. Now this is an unrecoverable error.
27769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27770$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27771      has_space=`$ECHO "$complete" | $GREP " "`
27772      if test "x$has_space" != x; then
27773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27775      fi
27776      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27777    fi
27778  fi
27779
27780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27783  # "foo.exe" is OK but "foo" is an error.
27784  #
27785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27786  # It is also a way to make sure we got the proper file name for the real test later on.
27787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27788  if test "x$test_shortpath" = x; then
27789    # Short path failed, file does not exist as specified.
27790    # Try adding .exe or .cmd
27791    if test -f "${new_path}.exe"; then
27792       input_to_shortpath="${new_path}.exe"
27793    elif test -f "${new_path}.cmd"; then
27794       input_to_shortpath="${new_path}.cmd"
27795    else
27796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27797$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27798      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27799$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27800      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27801    fi
27802  else
27803    input_to_shortpath="$new_path"
27804  fi
27805
27806  # Call helper function which possibly converts this using DOS-style short mode.
27807  # If so, the updated path is stored in $new_path.
27808  new_path="$input_to_shortpath"
27809
27810  input_path="$input_to_shortpath"
27811  # Check if we need to convert this using DOS-style short mode. If the path
27812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27813  # take no chances and rewrite it.
27814  # Note: m4 eats our [], so we need to use [ and ] instead.
27815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27816  if test "x$has_forbidden_chars" != x; then
27817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27821      # Going to short mode and back again did indeed matter. Since short mode is
27822      # case insensitive, let's make it lowercase to improve readability.
27823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27824      # Now convert it back to Unix-stile (cygpath)
27825      input_path=`$CYGPATH -u "$shortmode_path"`
27826      new_path="$input_path"
27827    fi
27828  fi
27829
27830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27831  if test "x$test_cygdrive_prefix" = x; then
27832    # As a simple fix, exclude /usr/bin since it's not a real path.
27833    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27835      # a path prefixed by /cygdrive for fixpath to work.
27836      new_path="$CYGWIN_ROOT_PATH$input_path"
27837    fi
27838  fi
27839
27840  # remove trailing .exe if any
27841  new_path="${new_path/%.exe/}"
27842
27843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27844
27845  # First separate the path from the arguments. This will split at the first
27846  # space.
27847  complete="$OBJCOPY"
27848  path="${complete%% *}"
27849  tmp="$complete EOL"
27850  arguments="${tmp#* }"
27851
27852  # Input might be given as Windows format, start by converting to
27853  # unix format.
27854  new_path="$path"
27855
27856  windows_path="$new_path"
27857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27858    unix_path=`$CYGPATH -u "$windows_path"`
27859    new_path="$unix_path"
27860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27862    new_path="$unix_path"
27863  fi
27864
27865
27866  # Now try to locate executable using which
27867  new_path=`$WHICH "$new_path" 2> /dev/null`
27868
27869  if test "x$new_path" = x; then
27870    # Oops. Which didn't find the executable.
27871    # The splitting of arguments from the executable at a space might have been incorrect,
27872    # since paths with space are more likely in Windows. Give it another try with the whole
27873    # argument.
27874    path="$complete"
27875    arguments="EOL"
27876    new_path="$path"
27877
27878  windows_path="$new_path"
27879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27880    unix_path=`$CYGPATH -u "$windows_path"`
27881    new_path="$unix_path"
27882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27884    new_path="$unix_path"
27885  fi
27886
27887
27888    new_path=`$WHICH "$new_path" 2> /dev/null`
27889
27890    if test "x$new_path" = x; then
27891      # It's still not found. Now this is an unrecoverable error.
27892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27893$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27894      has_space=`$ECHO "$complete" | $GREP " "`
27895      if test "x$has_space" != x; then
27896        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27897$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27898      fi
27899      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27900    fi
27901  fi
27902
27903  # Now new_path has a complete unix path to the binary
27904  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27905    # Keep paths in /bin as-is, but remove trailing .exe if any
27906    new_path="${new_path/%.exe/}"
27907    # Do not save /bin paths to all_fixpath_prefixes!
27908  else
27909    # Not in mixed or Windows style, start by that.
27910    new_path=`cmd //c echo $new_path`
27911
27912  input_path="$new_path"
27913  # Check if we need to convert this using DOS-style short mode. If the path
27914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27915  # take no chances and rewrite it.
27916  # Note: m4 eats our [], so we need to use [ and ] instead.
27917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27918  if test "x$has_forbidden_chars" != x; then
27919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27921  fi
27922
27923    # Output is in $new_path
27924
27925  windows_path="$new_path"
27926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27927    unix_path=`$CYGPATH -u "$windows_path"`
27928    new_path="$unix_path"
27929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27931    new_path="$unix_path"
27932  fi
27933
27934    # remove trailing .exe if any
27935    new_path="${new_path/%.exe/}"
27936
27937    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27938    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27939  fi
27940
27941  else
27942    # We're on a posix platform. Hooray! :)
27943    # First separate the path from the arguments. This will split at the first
27944    # space.
27945    complete="$OBJCOPY"
27946    path="${complete%% *}"
27947    tmp="$complete EOL"
27948    arguments="${tmp#* }"
27949
27950    # Cannot rely on the command "which" here since it doesn't always work.
27951    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27952    if test -z "$is_absolute_path"; then
27953      # Path to executable is not absolute. Find it.
27954      IFS_save="$IFS"
27955      IFS=:
27956      for p in $PATH; do
27957        if test -f "$p/$path" && test -x "$p/$path"; then
27958          new_path="$p/$path"
27959          break
27960        fi
27961      done
27962      IFS="$IFS_save"
27963    else
27964      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27965$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27966      new_path="$path"
27967    fi
27968
27969    if test "x$new_path" = x; then
27970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27971$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27972        has_space=`$ECHO "$complete" | $GREP " "`
27973        if test "x$has_space" != x; then
27974          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27975$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27976        fi
27977        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27978      fi
27979  fi
27980
27981      # Now join together the path and the arguments once again
27982      if test "x$arguments" != xEOL; then
27983        new_complete="$new_path ${arguments% *}"
27984      else
27985        new_complete="$new_path"
27986      fi
27987
27988  if test "x$complete" != "x$new_complete"; then
27989      OBJCOPY="$new_complete"
27990      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27991$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27992    fi
27993
27994    fi
27995fi
27996
27997if test -n "$ac_tool_prefix"; then
27998  for ac_prog in gobjdump objdump
27999  do
28000    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28001set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28003$as_echo_n "checking for $ac_word... " >&6; }
28004if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
28005  $as_echo_n "(cached) " >&6
28006else
28007  if test -n "$OBJDUMP"; then
28008  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28009else
28010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28011for as_dir in $PATH
28012do
28013  IFS=$as_save_IFS
28014  test -z "$as_dir" && as_dir=.
28015    for ac_exec_ext in '' $ac_executable_extensions; do
28016  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28017    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28019    break 2
28020  fi
28021done
28022  done
28023IFS=$as_save_IFS
28024
28025fi
28026fi
28027OBJDUMP=$ac_cv_prog_OBJDUMP
28028if test -n "$OBJDUMP"; then
28029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28030$as_echo "$OBJDUMP" >&6; }
28031else
28032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28033$as_echo "no" >&6; }
28034fi
28035
28036
28037    test -n "$OBJDUMP" && break
28038  done
28039fi
28040if test -z "$OBJDUMP"; then
28041  ac_ct_OBJDUMP=$OBJDUMP
28042  for ac_prog in gobjdump objdump
28043do
28044  # Extract the first word of "$ac_prog", so it can be a program name with args.
28045set dummy $ac_prog; ac_word=$2
28046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28047$as_echo_n "checking for $ac_word... " >&6; }
28048if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
28049  $as_echo_n "(cached) " >&6
28050else
28051  if test -n "$ac_ct_OBJDUMP"; then
28052  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28053else
28054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28055for as_dir in $PATH
28056do
28057  IFS=$as_save_IFS
28058  test -z "$as_dir" && as_dir=.
28059    for ac_exec_ext in '' $ac_executable_extensions; do
28060  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28061    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28063    break 2
28064  fi
28065done
28066  done
28067IFS=$as_save_IFS
28068
28069fi
28070fi
28071ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28072if test -n "$ac_ct_OBJDUMP"; then
28073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28074$as_echo "$ac_ct_OBJDUMP" >&6; }
28075else
28076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28077$as_echo "no" >&6; }
28078fi
28079
28080
28081  test -n "$ac_ct_OBJDUMP" && break
28082done
28083
28084  if test "x$ac_ct_OBJDUMP" = x; then
28085    OBJDUMP=""
28086  else
28087    case $cross_compiling:$ac_tool_warned in
28088yes:)
28089{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28090$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28091ac_tool_warned=yes ;;
28092esac
28093    OBJDUMP=$ac_ct_OBJDUMP
28094  fi
28095fi
28096
28097if test "x$OBJDUMP" != x; then
28098  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28099
28100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28101
28102  # First separate the path from the arguments. This will split at the first
28103  # space.
28104  complete="$OBJDUMP"
28105  path="${complete%% *}"
28106  tmp="$complete EOL"
28107  arguments="${tmp#* }"
28108
28109  # Input might be given as Windows format, start by converting to
28110  # unix format.
28111  new_path=`$CYGPATH -u "$path"`
28112
28113  # Now try to locate executable using which
28114  new_path=`$WHICH "$new_path" 2> /dev/null`
28115  # bat and cmd files are not always considered executable in cygwin causing which
28116  # to not find them
28117  if test "x$new_path" = x \
28118           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28119           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28120    new_path=`$CYGPATH -u "$path"`
28121  fi
28122  if test "x$new_path" = x; then
28123    # Oops. Which didn't find the executable.
28124    # The splitting of arguments from the executable at a space might have been incorrect,
28125    # since paths with space are more likely in Windows. Give it another try with the whole
28126    # argument.
28127    path="$complete"
28128    arguments="EOL"
28129    new_path=`$CYGPATH -u "$path"`
28130    new_path=`$WHICH "$new_path" 2> /dev/null`
28131    # bat and cmd files are not always considered executable in cygwin causing which
28132    # to not find them
28133    if test "x$new_path" = x \
28134             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28135             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28136      new_path=`$CYGPATH -u "$path"`
28137    fi
28138    if test "x$new_path" = x; then
28139      # It's still not found. Now this is an unrecoverable error.
28140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28141$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28142      has_space=`$ECHO "$complete" | $GREP " "`
28143      if test "x$has_space" != x; then
28144        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28145$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28146      fi
28147      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28148    fi
28149  fi
28150
28151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28154  # "foo.exe" is OK but "foo" is an error.
28155  #
28156  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28157  # It is also a way to make sure we got the proper file name for the real test later on.
28158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28159  if test "x$test_shortpath" = x; then
28160    # Short path failed, file does not exist as specified.
28161    # Try adding .exe or .cmd
28162    if test -f "${new_path}.exe"; then
28163       input_to_shortpath="${new_path}.exe"
28164    elif test -f "${new_path}.cmd"; then
28165       input_to_shortpath="${new_path}.cmd"
28166    else
28167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28168$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28169      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28170$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28171      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28172    fi
28173  else
28174    input_to_shortpath="$new_path"
28175  fi
28176
28177  # Call helper function which possibly converts this using DOS-style short mode.
28178  # If so, the updated path is stored in $new_path.
28179  new_path="$input_to_shortpath"
28180
28181  input_path="$input_to_shortpath"
28182  # Check if we need to convert this using DOS-style short mode. If the path
28183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28184  # take no chances and rewrite it.
28185  # Note: m4 eats our [], so we need to use [ and ] instead.
28186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28187  if test "x$has_forbidden_chars" != x; then
28188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28192      # Going to short mode and back again did indeed matter. Since short mode is
28193      # case insensitive, let's make it lowercase to improve readability.
28194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28195      # Now convert it back to Unix-stile (cygpath)
28196      input_path=`$CYGPATH -u "$shortmode_path"`
28197      new_path="$input_path"
28198    fi
28199  fi
28200
28201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28202  if test "x$test_cygdrive_prefix" = x; then
28203    # As a simple fix, exclude /usr/bin since it's not a real path.
28204    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28206      # a path prefixed by /cygdrive for fixpath to work.
28207      new_path="$CYGWIN_ROOT_PATH$input_path"
28208    fi
28209  fi
28210
28211  # remove trailing .exe if any
28212  new_path="${new_path/%.exe/}"
28213
28214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28215
28216  # First separate the path from the arguments. This will split at the first
28217  # space.
28218  complete="$OBJDUMP"
28219  path="${complete%% *}"
28220  tmp="$complete EOL"
28221  arguments="${tmp#* }"
28222
28223  # Input might be given as Windows format, start by converting to
28224  # unix format.
28225  new_path="$path"
28226
28227  windows_path="$new_path"
28228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28229    unix_path=`$CYGPATH -u "$windows_path"`
28230    new_path="$unix_path"
28231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28233    new_path="$unix_path"
28234  fi
28235
28236
28237  # Now try to locate executable using which
28238  new_path=`$WHICH "$new_path" 2> /dev/null`
28239
28240  if test "x$new_path" = x; then
28241    # Oops. Which didn't find the executable.
28242    # The splitting of arguments from the executable at a space might have been incorrect,
28243    # since paths with space are more likely in Windows. Give it another try with the whole
28244    # argument.
28245    path="$complete"
28246    arguments="EOL"
28247    new_path="$path"
28248
28249  windows_path="$new_path"
28250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28251    unix_path=`$CYGPATH -u "$windows_path"`
28252    new_path="$unix_path"
28253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28255    new_path="$unix_path"
28256  fi
28257
28258
28259    new_path=`$WHICH "$new_path" 2> /dev/null`
28260
28261    if test "x$new_path" = x; then
28262      # It's still not found. Now this is an unrecoverable error.
28263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28264$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28265      has_space=`$ECHO "$complete" | $GREP " "`
28266      if test "x$has_space" != x; then
28267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28269      fi
28270      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28271    fi
28272  fi
28273
28274  # Now new_path has a complete unix path to the binary
28275  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28276    # Keep paths in /bin as-is, but remove trailing .exe if any
28277    new_path="${new_path/%.exe/}"
28278    # Do not save /bin paths to all_fixpath_prefixes!
28279  else
28280    # Not in mixed or Windows style, start by that.
28281    new_path=`cmd //c echo $new_path`
28282
28283  input_path="$new_path"
28284  # Check if we need to convert this using DOS-style short mode. If the path
28285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28286  # take no chances and rewrite it.
28287  # Note: m4 eats our [], so we need to use [ and ] instead.
28288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28289  if test "x$has_forbidden_chars" != x; then
28290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28292  fi
28293
28294    # Output is in $new_path
28295
28296  windows_path="$new_path"
28297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28298    unix_path=`$CYGPATH -u "$windows_path"`
28299    new_path="$unix_path"
28300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28302    new_path="$unix_path"
28303  fi
28304
28305    # remove trailing .exe if any
28306    new_path="${new_path/%.exe/}"
28307
28308    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28309    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28310  fi
28311
28312  else
28313    # We're on a posix platform. Hooray! :)
28314    # First separate the path from the arguments. This will split at the first
28315    # space.
28316    complete="$OBJDUMP"
28317    path="${complete%% *}"
28318    tmp="$complete EOL"
28319    arguments="${tmp#* }"
28320
28321    # Cannot rely on the command "which" here since it doesn't always work.
28322    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28323    if test -z "$is_absolute_path"; then
28324      # Path to executable is not absolute. Find it.
28325      IFS_save="$IFS"
28326      IFS=:
28327      for p in $PATH; do
28328        if test -f "$p/$path" && test -x "$p/$path"; then
28329          new_path="$p/$path"
28330          break
28331        fi
28332      done
28333      IFS="$IFS_save"
28334    else
28335      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28336$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28337      new_path="$path"
28338    fi
28339
28340    if test "x$new_path" = x; then
28341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28342$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28343        has_space=`$ECHO "$complete" | $GREP " "`
28344        if test "x$has_space" != x; then
28345          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28346$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28347        fi
28348        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28349      fi
28350  fi
28351
28352      # Now join together the path and the arguments once again
28353      if test "x$arguments" != xEOL; then
28354        new_complete="$new_path ${arguments% *}"
28355      else
28356        new_complete="$new_path"
28357      fi
28358
28359  if test "x$complete" != "x$new_complete"; then
28360      OBJDUMP="$new_complete"
28361      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28362$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28363    fi
28364
28365fi
28366
28367if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28368   # Extract the first word of "lipo", so it can be a program name with args.
28369set dummy lipo; ac_word=$2
28370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28371$as_echo_n "checking for $ac_word... " >&6; }
28372if test "${ac_cv_path_LIPO+set}" = set; then :
28373  $as_echo_n "(cached) " >&6
28374else
28375  case $LIPO in
28376  [\\/]* | ?:[\\/]*)
28377  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28378  ;;
28379  *)
28380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28381for as_dir in $PATH
28382do
28383  IFS=$as_save_IFS
28384  test -z "$as_dir" && as_dir=.
28385    for ac_exec_ext in '' $ac_executable_extensions; do
28386  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28387    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28389    break 2
28390  fi
28391done
28392  done
28393IFS=$as_save_IFS
28394
28395  ;;
28396esac
28397fi
28398LIPO=$ac_cv_path_LIPO
28399if test -n "$LIPO"; then
28400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28401$as_echo "$LIPO" >&6; }
28402else
28403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28404$as_echo "no" >&6; }
28405fi
28406
28407
28408
28409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28410
28411  # First separate the path from the arguments. This will split at the first
28412  # space.
28413  complete="$LIPO"
28414  path="${complete%% *}"
28415  tmp="$complete EOL"
28416  arguments="${tmp#* }"
28417
28418  # Input might be given as Windows format, start by converting to
28419  # unix format.
28420  new_path=`$CYGPATH -u "$path"`
28421
28422  # Now try to locate executable using which
28423  new_path=`$WHICH "$new_path" 2> /dev/null`
28424  # bat and cmd files are not always considered executable in cygwin causing which
28425  # to not find them
28426  if test "x$new_path" = x \
28427           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28428           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28429    new_path=`$CYGPATH -u "$path"`
28430  fi
28431  if test "x$new_path" = x; then
28432    # Oops. Which didn't find the executable.
28433    # The splitting of arguments from the executable at a space might have been incorrect,
28434    # since paths with space are more likely in Windows. Give it another try with the whole
28435    # argument.
28436    path="$complete"
28437    arguments="EOL"
28438    new_path=`$CYGPATH -u "$path"`
28439    new_path=`$WHICH "$new_path" 2> /dev/null`
28440    # bat and cmd files are not always considered executable in cygwin causing which
28441    # to not find them
28442    if test "x$new_path" = x \
28443             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28444             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28445      new_path=`$CYGPATH -u "$path"`
28446    fi
28447    if test "x$new_path" = x; then
28448      # It's still not found. Now this is an unrecoverable error.
28449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28450$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28451      has_space=`$ECHO "$complete" | $GREP " "`
28452      if test "x$has_space" != x; then
28453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28455      fi
28456      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28457    fi
28458  fi
28459
28460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28463  # "foo.exe" is OK but "foo" is an error.
28464  #
28465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28466  # It is also a way to make sure we got the proper file name for the real test later on.
28467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28468  if test "x$test_shortpath" = x; then
28469    # Short path failed, file does not exist as specified.
28470    # Try adding .exe or .cmd
28471    if test -f "${new_path}.exe"; then
28472       input_to_shortpath="${new_path}.exe"
28473    elif test -f "${new_path}.cmd"; then
28474       input_to_shortpath="${new_path}.cmd"
28475    else
28476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28477$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28478      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28479$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28480      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28481    fi
28482  else
28483    input_to_shortpath="$new_path"
28484  fi
28485
28486  # Call helper function which possibly converts this using DOS-style short mode.
28487  # If so, the updated path is stored in $new_path.
28488  new_path="$input_to_shortpath"
28489
28490  input_path="$input_to_shortpath"
28491  # Check if we need to convert this using DOS-style short mode. If the path
28492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28493  # take no chances and rewrite it.
28494  # Note: m4 eats our [], so we need to use [ and ] instead.
28495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28496  if test "x$has_forbidden_chars" != x; then
28497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28501      # Going to short mode and back again did indeed matter. Since short mode is
28502      # case insensitive, let's make it lowercase to improve readability.
28503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28504      # Now convert it back to Unix-stile (cygpath)
28505      input_path=`$CYGPATH -u "$shortmode_path"`
28506      new_path="$input_path"
28507    fi
28508  fi
28509
28510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28511  if test "x$test_cygdrive_prefix" = x; then
28512    # As a simple fix, exclude /usr/bin since it's not a real path.
28513    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28515      # a path prefixed by /cygdrive for fixpath to work.
28516      new_path="$CYGWIN_ROOT_PATH$input_path"
28517    fi
28518  fi
28519
28520  # remove trailing .exe if any
28521  new_path="${new_path/%.exe/}"
28522
28523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28524
28525  # First separate the path from the arguments. This will split at the first
28526  # space.
28527  complete="$LIPO"
28528  path="${complete%% *}"
28529  tmp="$complete EOL"
28530  arguments="${tmp#* }"
28531
28532  # Input might be given as Windows format, start by converting to
28533  # unix format.
28534  new_path="$path"
28535
28536  windows_path="$new_path"
28537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28538    unix_path=`$CYGPATH -u "$windows_path"`
28539    new_path="$unix_path"
28540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28542    new_path="$unix_path"
28543  fi
28544
28545
28546  # Now try to locate executable using which
28547  new_path=`$WHICH "$new_path" 2> /dev/null`
28548
28549  if test "x$new_path" = x; then
28550    # Oops. Which didn't find the executable.
28551    # The splitting of arguments from the executable at a space might have been incorrect,
28552    # since paths with space are more likely in Windows. Give it another try with the whole
28553    # argument.
28554    path="$complete"
28555    arguments="EOL"
28556    new_path="$path"
28557
28558  windows_path="$new_path"
28559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28560    unix_path=`$CYGPATH -u "$windows_path"`
28561    new_path="$unix_path"
28562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28564    new_path="$unix_path"
28565  fi
28566
28567
28568    new_path=`$WHICH "$new_path" 2> /dev/null`
28569
28570    if test "x$new_path" = x; then
28571      # It's still not found. Now this is an unrecoverable error.
28572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28573$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28574      has_space=`$ECHO "$complete" | $GREP " "`
28575      if test "x$has_space" != x; then
28576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28578      fi
28579      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28580    fi
28581  fi
28582
28583  # Now new_path has a complete unix path to the binary
28584  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28585    # Keep paths in /bin as-is, but remove trailing .exe if any
28586    new_path="${new_path/%.exe/}"
28587    # Do not save /bin paths to all_fixpath_prefixes!
28588  else
28589    # Not in mixed or Windows style, start by that.
28590    new_path=`cmd //c echo $new_path`
28591
28592  input_path="$new_path"
28593  # Check if we need to convert this using DOS-style short mode. If the path
28594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28595  # take no chances and rewrite it.
28596  # Note: m4 eats our [], so we need to use [ and ] instead.
28597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28598  if test "x$has_forbidden_chars" != x; then
28599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28601  fi
28602
28603    # Output is in $new_path
28604
28605  windows_path="$new_path"
28606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28607    unix_path=`$CYGPATH -u "$windows_path"`
28608    new_path="$unix_path"
28609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28611    new_path="$unix_path"
28612  fi
28613
28614    # remove trailing .exe if any
28615    new_path="${new_path/%.exe/}"
28616
28617    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28618    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28619  fi
28620
28621  else
28622    # We're on a posix platform. Hooray! :)
28623    # First separate the path from the arguments. This will split at the first
28624    # space.
28625    complete="$LIPO"
28626    path="${complete%% *}"
28627    tmp="$complete EOL"
28628    arguments="${tmp#* }"
28629
28630    # Cannot rely on the command "which" here since it doesn't always work.
28631    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28632    if test -z "$is_absolute_path"; then
28633      # Path to executable is not absolute. Find it.
28634      IFS_save="$IFS"
28635      IFS=:
28636      for p in $PATH; do
28637        if test -f "$p/$path" && test -x "$p/$path"; then
28638          new_path="$p/$path"
28639          break
28640        fi
28641      done
28642      IFS="$IFS_save"
28643    else
28644      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28645$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28646      new_path="$path"
28647    fi
28648
28649    if test "x$new_path" = x; then
28650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28651$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28652        has_space=`$ECHO "$complete" | $GREP " "`
28653        if test "x$has_space" != x; then
28654          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28655$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28656        fi
28657        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28658      fi
28659  fi
28660
28661      # Now join together the path and the arguments once again
28662      if test "x$arguments" != xEOL; then
28663        new_complete="$new_path ${arguments% *}"
28664      else
28665        new_complete="$new_path"
28666      fi
28667
28668  if test "x$complete" != "x$new_complete"; then
28669      LIPO="$new_complete"
28670      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28671$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28672    fi
28673
28674fi
28675
28676
28677
28678# Restore old path without tools dir
28679PATH="$OLD_PATH"
28680
28681
28682# FIXME: Currently we must test this after paths but before flags. Fix!
28683
28684# And we can test some aspects on the target using configure macros.
28685
28686
28687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28688$as_echo_n "checking for ANSI C header files... " >&6; }
28689if test "${ac_cv_header_stdc+set}" = set; then :
28690  $as_echo_n "(cached) " >&6
28691else
28692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28693/* end confdefs.h.  */
28694#include <stdlib.h>
28695#include <stdarg.h>
28696#include <string.h>
28697#include <float.h>
28698
28699int
28700main ()
28701{
28702
28703  ;
28704  return 0;
28705}
28706_ACEOF
28707if ac_fn_cxx_try_compile "$LINENO"; then :
28708  ac_cv_header_stdc=yes
28709else
28710  ac_cv_header_stdc=no
28711fi
28712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28713
28714if test $ac_cv_header_stdc = yes; then
28715  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28717/* end confdefs.h.  */
28718#include <string.h>
28719
28720_ACEOF
28721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28722  $EGREP "memchr" >/dev/null 2>&1; then :
28723
28724else
28725  ac_cv_header_stdc=no
28726fi
28727rm -f conftest*
28728
28729fi
28730
28731if test $ac_cv_header_stdc = yes; then
28732  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28734/* end confdefs.h.  */
28735#include <stdlib.h>
28736
28737_ACEOF
28738if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28739  $EGREP "free" >/dev/null 2>&1; then :
28740
28741else
28742  ac_cv_header_stdc=no
28743fi
28744rm -f conftest*
28745
28746fi
28747
28748if test $ac_cv_header_stdc = yes; then
28749  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28750  if test "$cross_compiling" = yes; then :
28751  :
28752else
28753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28754/* end confdefs.h.  */
28755#include <ctype.h>
28756#include <stdlib.h>
28757#if ((' ' & 0x0FF) == 0x020)
28758# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28759# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28760#else
28761# define ISLOWER(c) \
28762		   (('a' <= (c) && (c) <= 'i') \
28763		     || ('j' <= (c) && (c) <= 'r') \
28764		     || ('s' <= (c) && (c) <= 'z'))
28765# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28766#endif
28767
28768#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28769int
28770main ()
28771{
28772  int i;
28773  for (i = 0; i < 256; i++)
28774    if (XOR (islower (i), ISLOWER (i))
28775	|| toupper (i) != TOUPPER (i))
28776      return 2;
28777  return 0;
28778}
28779_ACEOF
28780if ac_fn_cxx_try_run "$LINENO"; then :
28781
28782else
28783  ac_cv_header_stdc=no
28784fi
28785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28786  conftest.$ac_objext conftest.beam conftest.$ac_ext
28787fi
28788
28789fi
28790fi
28791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28792$as_echo "$ac_cv_header_stdc" >&6; }
28793if test $ac_cv_header_stdc = yes; then
28794
28795$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28796
28797fi
28798
28799# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28800for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28801		  inttypes.h stdint.h unistd.h
28802do :
28803  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28804ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28805"
28806if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28807  cat >>confdefs.h <<_ACEOF
28808#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28809_ACEOF
28810
28811fi
28812
28813done
28814
28815
28816
28817###############################################################################
28818#
28819# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28820# (The JVM can use 32 or 64 bit Java pointers but that decision
28821# is made at runtime.)
28822#
28823
28824if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28825  # Always specify -m flags on Solaris
28826
28827  # keep track of c/cxx flags that we added outselves...
28828  #   to prevent emitting warning...
28829  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28830  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28831  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28832
28833  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28834  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28835  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28836
28837  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28838  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28839  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28840
28841elif test "x$COMPILE_TYPE" = xreduced; then
28842  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28843    # Specify -m if running reduced on other Posix platforms
28844
28845  # keep track of c/cxx flags that we added outselves...
28846  #   to prevent emitting warning...
28847  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28848  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28849  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28850
28851  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28852  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28853  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28854
28855  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28856  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28857  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28858
28859  fi
28860fi
28861
28862# Make compilation sanity check
28863for ac_header in stdio.h
28864do :
28865  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28866if test "x$ac_cv_header_stdio_h" = x""yes; then :
28867  cat >>confdefs.h <<_ACEOF
28868#define HAVE_STDIO_H 1
28869_ACEOF
28870
28871else
28872
28873  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28874$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28875  if test "x$COMPILE_TYPE" = xreduced; then
28876    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28877$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28878  elif test "x$COMPILE_TYPE" = xcross; then
28879    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28880$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28881  fi
28882  as_fn_error $? "Cannot continue." "$LINENO" 5
28883
28884fi
28885
28886done
28887
28888
28889# The cast to long int works around a bug in the HP C Compiler
28890# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28891# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28892# This bug is HP SR number 8606223364.
28893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28894$as_echo_n "checking size of int *... " >&6; }
28895if test "${ac_cv_sizeof_int_p+set}" = set; then :
28896  $as_echo_n "(cached) " >&6
28897else
28898  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28899
28900else
28901  if test "$ac_cv_type_int_p" = yes; then
28902     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28904as_fn_error 77 "cannot compute sizeof (int *)
28905See \`config.log' for more details" "$LINENO" 5; }
28906   else
28907     ac_cv_sizeof_int_p=0
28908   fi
28909fi
28910
28911fi
28912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28913$as_echo "$ac_cv_sizeof_int_p" >&6; }
28914
28915
28916
28917cat >>confdefs.h <<_ACEOF
28918#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28919_ACEOF
28920
28921
28922
28923if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28924  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28925  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28926fi
28927
28928if test "x$SIZEOF_INT_P" = x; then
28929    # The test failed, lets stick to the assumed value.
28930    { $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
28931$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28932else
28933    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28934
28935    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28936        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
28937    fi
28938fi
28939
28940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28941$as_echo_n "checking for target address size... " >&6; }
28942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28943$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28944
28945
28946###############################################################################
28947#
28948# Is the target little of big endian?
28949#
28950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28951$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28952if test "${ac_cv_c_bigendian+set}" = set; then :
28953  $as_echo_n "(cached) " >&6
28954else
28955  ac_cv_c_bigendian=unknown
28956    # See if we're dealing with a universal compiler.
28957    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28958/* end confdefs.h.  */
28959#ifndef __APPLE_CC__
28960	       not a universal capable compiler
28961	     #endif
28962	     typedef int dummy;
28963
28964_ACEOF
28965if ac_fn_cxx_try_compile "$LINENO"; then :
28966
28967	# Check for potential -arch flags.  It is not universal unless
28968	# there are at least two -arch flags with different values.
28969	ac_arch=
28970	ac_prev=
28971	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28972	 if test -n "$ac_prev"; then
28973	   case $ac_word in
28974	     i?86 | x86_64 | ppc | ppc64)
28975	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28976		 ac_arch=$ac_word
28977	       else
28978		 ac_cv_c_bigendian=universal
28979		 break
28980	       fi
28981	       ;;
28982	   esac
28983	   ac_prev=
28984	 elif test "x$ac_word" = "x-arch"; then
28985	   ac_prev=arch
28986	 fi
28987       done
28988fi
28989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28990    if test $ac_cv_c_bigendian = unknown; then
28991      # See if sys/param.h defines the BYTE_ORDER macro.
28992      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28993/* end confdefs.h.  */
28994#include <sys/types.h>
28995	     #include <sys/param.h>
28996
28997int
28998main ()
28999{
29000#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29001		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29002		     && LITTLE_ENDIAN)
29003	      bogus endian macros
29004	     #endif
29005
29006  ;
29007  return 0;
29008}
29009_ACEOF
29010if ac_fn_cxx_try_compile "$LINENO"; then :
29011  # It does; now see whether it defined to BIG_ENDIAN or not.
29012	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29013/* end confdefs.h.  */
29014#include <sys/types.h>
29015		#include <sys/param.h>
29016
29017int
29018main ()
29019{
29020#if BYTE_ORDER != BIG_ENDIAN
29021		 not big endian
29022		#endif
29023
29024  ;
29025  return 0;
29026}
29027_ACEOF
29028if ac_fn_cxx_try_compile "$LINENO"; then :
29029  ac_cv_c_bigendian=yes
29030else
29031  ac_cv_c_bigendian=no
29032fi
29033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29034fi
29035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29036    fi
29037    if test $ac_cv_c_bigendian = unknown; then
29038      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29039      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29040/* end confdefs.h.  */
29041#include <limits.h>
29042
29043int
29044main ()
29045{
29046#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29047	      bogus endian macros
29048	     #endif
29049
29050  ;
29051  return 0;
29052}
29053_ACEOF
29054if ac_fn_cxx_try_compile "$LINENO"; then :
29055  # It does; now see whether it defined to _BIG_ENDIAN or not.
29056	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29057/* end confdefs.h.  */
29058#include <limits.h>
29059
29060int
29061main ()
29062{
29063#ifndef _BIG_ENDIAN
29064		 not big endian
29065		#endif
29066
29067  ;
29068  return 0;
29069}
29070_ACEOF
29071if ac_fn_cxx_try_compile "$LINENO"; then :
29072  ac_cv_c_bigendian=yes
29073else
29074  ac_cv_c_bigendian=no
29075fi
29076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29077fi
29078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29079    fi
29080    if test $ac_cv_c_bigendian = unknown; then
29081      # Compile a test program.
29082      if test "$cross_compiling" = yes; then :
29083  # Try to guess by grepping values from an object file.
29084	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29085/* end confdefs.h.  */
29086short int ascii_mm[] =
29087		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29088		short int ascii_ii[] =
29089		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29090		int use_ascii (int i) {
29091		  return ascii_mm[i] + ascii_ii[i];
29092		}
29093		short int ebcdic_ii[] =
29094		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29095		short int ebcdic_mm[] =
29096		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29097		int use_ebcdic (int i) {
29098		  return ebcdic_mm[i] + ebcdic_ii[i];
29099		}
29100		extern int foo;
29101
29102int
29103main ()
29104{
29105return use_ascii (foo) == use_ebcdic (foo);
29106  ;
29107  return 0;
29108}
29109_ACEOF
29110if ac_fn_cxx_try_compile "$LINENO"; then :
29111  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29112	      ac_cv_c_bigendian=yes
29113	    fi
29114	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29115	      if test "$ac_cv_c_bigendian" = unknown; then
29116		ac_cv_c_bigendian=no
29117	      else
29118		# finding both strings is unlikely to happen, but who knows?
29119		ac_cv_c_bigendian=unknown
29120	      fi
29121	    fi
29122fi
29123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29124else
29125  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29126/* end confdefs.h.  */
29127$ac_includes_default
29128int
29129main ()
29130{
29131
29132	     /* Are we little or big endian?  From Harbison&Steele.  */
29133	     union
29134	     {
29135	       long int l;
29136	       char c[sizeof (long int)];
29137	     } u;
29138	     u.l = 1;
29139	     return u.c[sizeof (long int) - 1] == 1;
29140
29141  ;
29142  return 0;
29143}
29144_ACEOF
29145if ac_fn_cxx_try_run "$LINENO"; then :
29146  ac_cv_c_bigendian=no
29147else
29148  ac_cv_c_bigendian=yes
29149fi
29150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29151  conftest.$ac_objext conftest.beam conftest.$ac_ext
29152fi
29153
29154    fi
29155fi
29156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29157$as_echo "$ac_cv_c_bigendian" >&6; }
29158 case $ac_cv_c_bigendian in #(
29159   yes)
29160     ENDIAN="big";; #(
29161   no)
29162     ENDIAN="little" ;; #(
29163   universal)
29164     ENDIAN="universal_endianness"
29165     ;; #(
29166   *)
29167     ENDIAN="unknown" ;;
29168 esac
29169
29170
29171if test "x$ENDIAN" = xuniversal_endianness; then
29172    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29173fi
29174if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29175    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
29176fi
29177
29178
29179# Configure flags for the tools
29180
29181
29182###############################################################################
29183#
29184# How to compile shared libraries.
29185#
29186
29187if test "x$GCC" = xyes; then
29188    COMPILER_NAME=gcc
29189    PICFLAG="-fPIC"
29190    LIBRARY_PREFIX=lib
29191    SHARED_LIBRARY='lib$1.so'
29192    STATIC_LIBRARY='lib$1.a'
29193    SHARED_LIBRARY_FLAGS="-shared"
29194    SHARED_LIBRARY_SUFFIX='.so'
29195    STATIC_LIBRARY_SUFFIX='.a'
29196    OBJ_SUFFIX='.o'
29197    EXE_SUFFIX=''
29198    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29199    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29200    C_FLAG_REORDER=''
29201    CXX_FLAG_REORDER=''
29202    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29203    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29204    LD="$CC"
29205    LDEXE="$CC"
29206    LDCXX="$CXX"
29207    LDEXECXX="$CXX"
29208    POST_STRIP_CMD="$STRIP -g"
29209
29210    # Linking is different on MacOSX
29211    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29212        # Might change in the future to clang.
29213        COMPILER_NAME=gcc
29214        SHARED_LIBRARY='lib$1.dylib'
29215        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29216        SHARED_LIBRARY_SUFFIX='.dylib'
29217        EXE_SUFFIX=''
29218        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29219        SET_SHARED_LIBRARY_MAPFILE=''
29220        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29221        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29222        POST_STRIP_CMD="$STRIP -S"
29223    fi
29224else
29225    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29226        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29227        COMPILER_NAME=ossc
29228        PICFLAG="-KPIC"
29229        LIBRARY_PREFIX=lib
29230        SHARED_LIBRARY='lib$1.so'
29231        STATIC_LIBRARY='lib$1.a'
29232        SHARED_LIBRARY_FLAGS="-G"
29233        SHARED_LIBRARY_SUFFIX='.so'
29234        STATIC_LIBRARY_SUFFIX='.a'
29235        OBJ_SUFFIX='.o'
29236        EXE_SUFFIX=''
29237        SET_SHARED_LIBRARY_NAME=''
29238        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29239	C_FLAG_REORDER='-xF'
29240	CXX_FLAG_REORDER='-xF'
29241        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29242        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29243        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29244        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29245        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29246        POST_STRIP_CMD="$STRIP -x"
29247        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29248    fi
29249    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29250        # If it is not gcc, then assume it is the MS Visual Studio compiler
29251        COMPILER_NAME=cl
29252        PICFLAG=""
29253        LIBRARY_PREFIX=
29254        SHARED_LIBRARY='$1.dll'
29255        STATIC_LIBRARY='$1.lib'
29256        SHARED_LIBRARY_FLAGS="-LD"
29257        SHARED_LIBRARY_SUFFIX='.dll'
29258        STATIC_LIBRARY_SUFFIX='.lib'
29259        OBJ_SUFFIX='.obj'
29260        EXE_SUFFIX='.exe'
29261        SET_SHARED_LIBRARY_NAME=''
29262        SET_SHARED_LIBRARY_MAPFILE=''
29263        SET_SHARED_LIBRARY_ORIGIN=''
29264        SET_EXECUTABLE_ORIGIN=''
29265    fi
29266fi
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286# The (cross) compiler is now configured, we can now test capabilities
29287# of the target platform.
29288
29289
29290
29291###############################################################################
29292#
29293# Setup the opt flags for different compilers
29294# and different operating systems.
29295#
29296
29297#
29298# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29299#
29300if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29301    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29302    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29303    CFLAGS="$CFLAGS -mstackrealign"
29304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29305$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29306    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29307/* end confdefs.h.  */
29308int main() { return 0; }
29309_ACEOF
29310if ac_fn_cxx_try_link "$LINENO"; then :
29311
29312		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29313$as_echo "yes" >&6; }
29314
29315else
29316
29317		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29318$as_echo "no" >&6; }
29319	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29320
29321fi
29322rm -f core conftest.err conftest.$ac_objext \
29323    conftest$ac_exeext conftest.$ac_ext
29324fi
29325
29326C_FLAG_DEPS="-MMD -MF"
29327CXX_FLAG_DEPS="-MMD -MF"
29328
29329case $COMPILER_TYPE in
29330  CC )
29331    case $COMPILER_NAME in
29332      gcc )
29333      	case $OPENJDK_TARGET_OS in
29334	  macosx )
29335	    # On MacOSX we optimize for size, something
29336	    # we should do for all platforms?
29337	    C_O_FLAG_HI="-Os"
29338	    C_O_FLAG_NORM="-Os"
29339	    C_O_FLAG_NONE=""
29340	    ;;
29341	  *)
29342	    C_O_FLAG_HI="-O3"
29343	    C_O_FLAG_NORM="-O2"
29344	    C_O_FLAG_NONE="-O0"
29345	    ;;
29346	esac
29347        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29348        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29349        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29350        CFLAGS_DEBUG_SYMBOLS="-g"
29351        CXXFLAGS_DEBUG_SYMBOLS="-g"
29352        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29353            CFLAGS_DEBUG_SYMBOLS="-g1"
29354            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29355        fi
29356        ;;
29357      ossc )
29358        #
29359        # Forte has different names for this with their C++ compiler...
29360        #
29361        C_FLAG_DEPS="-xMMD -xMF"
29362        CXX_FLAG_DEPS="-xMMD -xMF"
29363
29364        # Extra options used with HIGHEST
29365        #
29366        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29367        #          done with care, there are some assumptions below that need to
29368        #          be understood about the use of pointers, and IEEE behavior.
29369        #
29370        # Use non-standard floating point mode (not IEEE 754)
29371        CC_HIGHEST="$CC_HIGHEST -fns"
29372        # Do some simplification of floating point arithmetic (not IEEE 754)
29373        CC_HIGHEST="$CC_HIGHEST -fsimple"
29374        # Use single precision floating point with 'float'
29375        CC_HIGHEST="$CC_HIGHEST -fsingle"
29376        # Assume memory references via basic pointer types do not alias
29377        #   (Source with excessing pointer casting and data access with mixed
29378        #    pointer types are not recommended)
29379        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29380        # Use intrinsic or inline versions for math/std functions
29381        #   (If you expect perfect errno behavior, do not use this)
29382        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29383        # Loop data dependency optimizations (need -xO3 or higher)
29384        CC_HIGHEST="$CC_HIGHEST -xdepend"
29385        # Pointer parameters to functions do not overlap
29386        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29387        #    If you pass in multiple pointers to the same data, do not use this)
29388        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29389        # Inline some library routines
29390        #   (If you expect perfect errno behavior, do not use this)
29391        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29392        # Use optimized math routines
29393        #   (If you expect perfect errno behavior, do not use this)
29394        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29395        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29396
29397        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29398          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29399          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29400        fi
29401
29402        case $OPENJDK_TARGET_CPU_ARCH in
29403          x86)
29404            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29405            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29406            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29407            C_O_FLAG_NONE="-xregs=no%frameptr"
29408            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29409            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29410            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29411            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29412            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29413               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29414               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29415            fi
29416            ;;
29417          sparc)
29418            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29419            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29420            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29421            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29422            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29423            C_O_FLAG_NONE=""
29424            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29425            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29426            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29427            CXX_O_FLAG_NONE=""
29428            ;;
29429        esac
29430
29431    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29432    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29433    esac
29434    ;;
29435  CL )
29436    C_O_FLAG_HIGHEST="-O2"
29437    C_O_FLAG_HI="-O1"
29438    C_O_FLAG_NORM="-O1"
29439    C_O_FLAG_NONE="-Od"
29440    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29441    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29442    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29443    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29444    ;;
29445esac
29446
29447if test -z "$C_O_FLAG_HIGHEST"; then
29448   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29449fi
29450
29451if test -z "$CXX_O_FLAG_HIGHEST"; then
29452   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29453fi
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29469   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29470$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29471fi
29472
29473if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29474   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29475$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29476fi
29477
29478if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29479   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29480$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29481fi
29482
29483
29484# Check whether --with-extra-cflags was given.
29485if test "${with_extra_cflags+set}" = set; then :
29486  withval=$with_extra_cflags;
29487fi
29488
29489
29490
29491# Check whether --with-extra-cxxflags was given.
29492if test "${with_extra_cxxflags+set}" = set; then :
29493  withval=$with_extra_cxxflags;
29494fi
29495
29496
29497
29498# Check whether --with-extra-ldflags was given.
29499if test "${with_extra_ldflags+set}" = set; then :
29500  withval=$with_extra_ldflags;
29501fi
29502
29503
29504CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29505CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29506LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29507
29508# Hotspot needs these set in their legacy form
29509LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29510LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29511LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29512
29513
29514
29515
29516
29517###############################################################################
29518#
29519# Now setup the CFLAGS and LDFLAGS for the JDK build.
29520# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29521#
29522case $COMPILER_NAME in
29523      gcc )
29524      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29525                          -pipe \
29526                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29527	  case $OPENJDK_TARGET_CPU_ARCH in
29528	  arm )
29529            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29530	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29531	  ;;
29532	  ppc )
29533            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29534	  ;;
29535	  * )
29536	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29537	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29538          ;;
29539	  esac
29540          ;;
29541      ossc )
29542          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29543          case $OPENJDK_TARGET_CPU_ARCH in
29544          x86 )
29545            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29546       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29547          ;;
29548          esac
29549
29550      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29551      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29552
29553          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29554          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29555          ;;
29556      cl )
29557          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29558               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29559	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29560	       -DWIN32 -DIAL"
29561          case $OPENJDK_TARGET_CPU in
29562              x86 )
29563                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29564                  ;;
29565              x86_64 )
29566                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29567                  ;;
29568          esac
29569          ;;
29570esac
29571
29572###############################################################################
29573
29574# Adjust flags according to debug level.
29575case $DEBUG_LEVEL in
29576      fastdebug )
29577              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29578              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29579	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29580	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29581	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29582	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29583              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29584              ;;
29585      slowdebug )
29586              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29587              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29588	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29589	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29590	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29591	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29592              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29593              ;;
29594esac
29595
29596CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29597
29598# The package path is used only on macosx?
29599PACKAGE_PATH=/opt/local
29600
29601
29602if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29603    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29604    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29605    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29606    #   Note: -Dmacro         is the same as    #define macro 1
29607    #         -Dmacro=	    is the same as    #define macro
29608    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29609        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29610    else
29611        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29612    fi
29613else
29614    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29615fi
29616if test "x$OPENJDK_TARGET_OS" = xlinux; then
29617    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29618fi
29619if test "x$OPENJDK_TARGET_OS" = xwindows; then
29620    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29621fi
29622if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29623    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29624fi
29625if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29626    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29627    # Setting these parameters makes it an error to link to macosx APIs that are
29628    # newer than the given OS version and makes the linked binaries compatible even
29629    # if built on a newer version of the OS.
29630    # The expected format is X.Y.Z
29631    MACOSX_VERSION_MIN=10.7.0
29632
29633    # The macro takes the version with no dots, ex: 1070
29634    # Let the flags variables get resolved in make for easier override on make
29635    # command line.
29636    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29637    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29638fi
29639if test "x$OPENJDK_TARGET_OS" = xbsd; then
29640    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29641fi
29642if test "x$DEBUG_LEVEL" = xrelease; then
29643    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29644    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29645        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29646    fi
29647else
29648    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29649fi
29650
29651CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29652CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29653
29654CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29655        -I${JDK_OUTPUTDIR}/include \
29656        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29657        -I${JDK_TOPDIR}/src/share/javavm/export \
29658        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29659        -I${JDK_TOPDIR}/src/share/native/common \
29660        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29661
29662# The shared libraries are compiled using the picflag.
29663CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29664CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29665
29666# Executable flags
29667CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29668CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29669
29670# Now this is odd. The JDK native libraries have to link against libjvm.so
29671# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29672# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29673# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29674# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29675# libraries will link to whatever is in memory. Yuck.
29676#
29677# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29678if test "x$COMPILER_NAME" = xcl; then
29679    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29680    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29681        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29682    fi
29683    # TODO: make -debug optional "--disable-full-debug-symbols"
29684    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29685    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29686    LDFLAGS_JDKLIB_SUFFIX=""
29687    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29688        LDFLAGS_STACK_SIZE=1048576
29689    else
29690        LDFLAGS_STACK_SIZE=327680
29691    fi
29692    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29693else
29694    if test "x$COMPILER_NAME" = xgcc; then
29695        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29696        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29697        if test -n "$HAS_GNU_HASH"; then
29698            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29699        fi
29700        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29701          # And since we now know that the linker is gnu, then add -z defs, to forbid
29702          # undefined symbols in object files.
29703          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29704          if test "x$DEBUG_LEVEL" = "xrelease"; then
29705              # When building release libraries, tell the linker optimize them.
29706              # Should this be supplied to the OSS linker as well?
29707              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29708          fi
29709        fi
29710    fi
29711    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29712                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29713
29714    # On some platforms (mac) the linker warns about non existing -L dirs.
29715    # Add server first if available. Linking aginst client does not always produce the same results.
29716    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29717    # Default to server for other variants.
29718    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29719        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29720    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29721        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29722    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29723        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29724    else
29725        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29726    fi
29727
29728    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29729    if test "x$COMPILER_NAME" = xossc; then
29730        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29731    fi
29732
29733    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29734    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29735        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29736    fi
29737fi
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753  # Some Zero and Shark settings.
29754  # ZERO_ARCHFLAG tells the compiler which mode to build for
29755  case "${OPENJDK_TARGET_CPU}" in
29756    s390)
29757      ZERO_ARCHFLAG="-m31"
29758      ;;
29759    *)
29760      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29761  esac
29762
29763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29764$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29765  supports=yes
29766
29767  saved_cflags="$CFLAGS"
29768  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29769  ac_ext=c
29770ac_cpp='$CPP $CPPFLAGS'
29771ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29772ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29773ac_compiler_gnu=$ac_cv_c_compiler_gnu
29774
29775  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29776/* end confdefs.h.  */
29777
29778    int i;
29779
29780_ACEOF
29781if ac_fn_c_try_compile "$LINENO"; then :
29782
29783else
29784  supports=no
29785fi
29786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29787  ac_ext=cpp
29788ac_cpp='$CXXCPP $CPPFLAGS'
29789ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29790ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29791ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29792
29793  CFLAGS="$saved_cflags"
29794
29795  saved_cxxflags="$CXXFLAGS"
29796  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29797  ac_ext=cpp
29798ac_cpp='$CXXCPP $CPPFLAGS'
29799ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29800ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29801ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29802
29803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29804/* end confdefs.h.  */
29805
29806    int i;
29807
29808_ACEOF
29809if ac_fn_cxx_try_compile "$LINENO"; then :
29810
29811else
29812  supports=no
29813fi
29814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29815  ac_ext=cpp
29816ac_cpp='$CXXCPP $CPPFLAGS'
29817ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29818ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29819ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29820
29821  CXXFLAGS="$saved_cxxflags"
29822
29823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29824$as_echo "$supports" >&6; }
29825  if test "x$supports" = "xyes" ; then
29826    :
29827  else
29828    ZERO_ARCHFLAG=""
29829  fi
29830
29831
29832
29833  # Check that the compiler supports -mX flags
29834  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29835
29836  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29837$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29838  supports=yes
29839
29840  saved_cflags="$CFLAGS"
29841  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29842  ac_ext=c
29843ac_cpp='$CPP $CPPFLAGS'
29844ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29845ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29846ac_compiler_gnu=$ac_cv_c_compiler_gnu
29847
29848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29849/* end confdefs.h.  */
29850
29851    int i;
29852
29853_ACEOF
29854if ac_fn_c_try_compile "$LINENO"; then :
29855
29856else
29857  supports=no
29858fi
29859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29860  ac_ext=cpp
29861ac_cpp='$CXXCPP $CPPFLAGS'
29862ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29863ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29864ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29865
29866  CFLAGS="$saved_cflags"
29867
29868  saved_cxxflags="$CXXFLAGS"
29869  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29870  ac_ext=cpp
29871ac_cpp='$CXXCPP $CPPFLAGS'
29872ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29873ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29874ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29875
29876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29877/* end confdefs.h.  */
29878
29879    int i;
29880
29881_ACEOF
29882if ac_fn_cxx_try_compile "$LINENO"; then :
29883
29884else
29885  supports=no
29886fi
29887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29888  ac_ext=cpp
29889ac_cpp='$CXXCPP $CPPFLAGS'
29890ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29891ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29892ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29893
29894  CXXFLAGS="$saved_cxxflags"
29895
29896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29897$as_echo "$supports" >&6; }
29898  if test "x$supports" = "xyes" ; then
29899    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29900  else
29901    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29902  fi
29903
29904
29905
29906
29907  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
29908  USING_BROKEN_SUSE_LD=no
29909  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
29910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
29911$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
29912    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
29913    echo "int main() { }" > main.c
29914    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
29915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29916$as_echo "no" >&6; }
29917      USING_BROKEN_SUSE_LD=no
29918    else
29919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29920$as_echo "yes" >&6; }
29921      USING_BROKEN_SUSE_LD=yes
29922    fi
29923    rm -rf version-script.map main.c
29924  fi
29925
29926
29927
29928# Setup debug symbols (need objcopy from the toolchain for that)
29929
29930#
29931# ENABLE_DEBUG_SYMBOLS
29932# This must be done after the toolchain is setup, since we're looking at objcopy.
29933#
29934# Check whether --enable-debug-symbols was given.
29935if test "${enable_debug_symbols+set}" = set; then :
29936  enableval=$enable_debug_symbols;
29937fi
29938
29939
29940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29941$as_echo_n "checking if we should generate debug symbols... " >&6; }
29942
29943if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29944   # explicit enabling of enable-debug-symbols and can't find objcopy
29945   #   this is an error
29946   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29947fi
29948
29949if test "x$enable_debug_symbols" = "xyes"; then
29950  ENABLE_DEBUG_SYMBOLS=true
29951elif test "x$enable_debug_symbols" = "xno"; then
29952  ENABLE_DEBUG_SYMBOLS=false
29953else
29954  # default on macosx is false
29955  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29956    ENABLE_DEBUG_SYMBOLS=false
29957  # Default is on if objcopy is found, otherwise off
29958  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29959    ENABLE_DEBUG_SYMBOLS=true
29960  else
29961    ENABLE_DEBUG_SYMBOLS=false
29962  fi
29963fi
29964
29965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29966$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29967
29968#
29969# ZIP_DEBUGINFO_FILES
29970#
29971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29972$as_echo_n "checking if we should zip debug-info files... " >&6; }
29973# Check whether --enable-zip-debug-info was given.
29974if test "${enable_zip_debug_info+set}" = set; then :
29975  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29976else
29977  enable_zip_debug_info="yes"
29978fi
29979
29980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29981$as_echo "${enable_zip_debug_info}" >&6; }
29982
29983if test "x${enable_zip_debug_info}" = "xno"; then
29984   ZIP_DEBUGINFO_FILES=false
29985else
29986   ZIP_DEBUGINFO_FILES=true
29987fi
29988
29989
29990
29991
29992
29993
29994
29995###############################################################################
29996#
29997# Check dependencies for external and internal libraries.
29998#
29999###############################################################################
30000
30001
30002
30003###############################################################################
30004#
30005# OS specific settings that we never will need to probe.
30006#
30007if test "x$OPENJDK_TARGET_OS" = xlinux; then
30008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30009$as_echo_n "checking what is not needed on Linux?... " >&6; }
30010    PULSE_NOT_NEEDED=yes
30011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30012$as_echo "pulse" >&6; }
30013fi
30014
30015if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30017$as_echo_n "checking what is not needed on Solaris?... " >&6; }
30018    ALSA_NOT_NEEDED=yes
30019    PULSE_NOT_NEEDED=yes
30020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30021$as_echo "alsa pulse" >&6; }
30022fi
30023
30024if test "x$OPENJDK_TARGET_OS" = xwindows; then
30025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30026$as_echo_n "checking what is not needed on Windows?... " >&6; }
30027    CUPS_NOT_NEEDED=yes
30028    ALSA_NOT_NEEDED=yes
30029    PULSE_NOT_NEEDED=yes
30030    X11_NOT_NEEDED=yes
30031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30032$as_echo "alsa cups pulse x11" >&6; }
30033fi
30034
30035if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30037$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30038    ALSA_NOT_NEEDED=yes
30039    PULSE_NOT_NEEDED=yes
30040    X11_NOT_NEEDED=yes
30041    FREETYPE2_NOT_NEEDED=yes
30042    # If the java runtime framework is disabled, then we need X11.
30043    # This will be adjusted below.
30044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30045$as_echo "alsa pulse x11" >&6; }
30046fi
30047
30048if test "x$OPENJDK_TARGET_OS" = xbsd; then
30049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30050$as_echo_n "checking what is not needed on bsd?... " >&6; }
30051    ALSA_NOT_NEEDED=yes
30052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30053$as_echo "alsa" >&6; }
30054fi
30055
30056if test "x$OPENJDK" = "xfalse"; then
30057    FREETYPE2_NOT_NEEDED=yes
30058fi
30059
30060if test "x$SUPPORT_HEADFUL" = xno; then
30061    X11_NOT_NEEDED=yes
30062fi
30063
30064###############################################################################
30065#
30066# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
30067# that uses this API.
30068#
30069# Check whether --enable-macosx-runtime-support was given.
30070if test "${enable_macosx_runtime_support+set}" = set; then :
30071  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
30072else
30073  MACOSX_RUNTIME_SUPPORT="no"
30074fi
30075
30076
30077USE_MACOSX_RUNTIME_SUPPORT=no
30078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
30079$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
30080if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30081    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
30082        MACOSX_RUNTIME_SUPPORT=yes
30083        USE_MACOSX_RUNTIME_SUPPORT=yes
30084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
30085$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
30086    else
30087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
30088$as_echo "yes, but explicitly disabled." >&6; }
30089    fi
30090else
30091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30092$as_echo "no" >&6; }
30093fi
30094
30095if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
30096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
30097$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
30098    X11_NOT_NEEDED=
30099    FREETYPE2_NOT_NEEDED=
30100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30101$as_echo "alsa pulse" >&6; }
30102fi
30103
30104
30105
30106###############################################################################
30107#
30108# Check for X Windows
30109#
30110
30111# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30112# Make a simple check for the libraries at the sysroot, and setup --x-includes and
30113# --x-libraries for the sysroot, if that seems to be correct.
30114if test "x$SYS_ROOT" != "x/"; then
30115  if test "x$x_includes" = xNONE; then
30116    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30117      x_includes="$SYS_ROOT/usr/X11R6/include"
30118    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30119      x_includes="$SYS_ROOT/usr/include"
30120    fi
30121  fi
30122  if test "x$x_libraries" = xNONE; then
30123    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30124      x_libraries="$SYS_ROOT/usr/X11R6/lib"
30125    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30126      x_libraries="$SYS_ROOT/usr/lib64"
30127    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30128      x_libraries="$SYS_ROOT/usr/lib"
30129    fi
30130  fi
30131fi
30132
30133# Now let autoconf do it's magic
30134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30135$as_echo_n "checking for X... " >&6; }
30136
30137
30138# Check whether --with-x was given.
30139if test "${with_x+set}" = set; then :
30140  withval=$with_x;
30141fi
30142
30143# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30144if test "x$with_x" = xno; then
30145  # The user explicitly disabled X.
30146  have_x=disabled
30147else
30148  case $x_includes,$x_libraries in #(
30149    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30150    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
30151  $as_echo_n "(cached) " >&6
30152else
30153  # One or both of the vars are not set, and there is no cached value.
30154ac_x_includes=no ac_x_libraries=no
30155rm -f -r conftest.dir
30156if mkdir conftest.dir; then
30157  cd conftest.dir
30158  cat >Imakefile <<'_ACEOF'
30159incroot:
30160	@echo incroot='${INCROOT}'
30161usrlibdir:
30162	@echo usrlibdir='${USRLIBDIR}'
30163libdir:
30164	@echo libdir='${LIBDIR}'
30165_ACEOF
30166  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30167    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30168    for ac_var in incroot usrlibdir libdir; do
30169      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30170    done
30171    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30172    for ac_extension in a so sl dylib la dll; do
30173      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30174	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30175	ac_im_usrlibdir=$ac_im_libdir; break
30176      fi
30177    done
30178    # Screen out bogus values from the imake configuration.  They are
30179    # bogus both because they are the default anyway, and because
30180    # using them would break gcc on systems where it needs fixed includes.
30181    case $ac_im_incroot in
30182	/usr/include) ac_x_includes= ;;
30183	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30184    esac
30185    case $ac_im_usrlibdir in
30186	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30187	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30188    esac
30189  fi
30190  cd ..
30191  rm -f -r conftest.dir
30192fi
30193
30194# Standard set of common directories for X headers.
30195# Check X11 before X11Rn because it is often a symlink to the current release.
30196ac_x_header_dirs='
30197/usr/X11/include
30198/usr/X11R7/include
30199/usr/X11R6/include
30200/usr/X11R5/include
30201/usr/X11R4/include
30202
30203/usr/include/X11
30204/usr/include/X11R7
30205/usr/include/X11R6
30206/usr/include/X11R5
30207/usr/include/X11R4
30208
30209/usr/local/X11/include
30210/usr/local/X11R7/include
30211/usr/local/X11R6/include
30212/usr/local/X11R5/include
30213/usr/local/X11R4/include
30214
30215/usr/local/include/X11
30216/usr/local/include/X11R7
30217/usr/local/include/X11R6
30218/usr/local/include/X11R5
30219/usr/local/include/X11R4
30220
30221/usr/X386/include
30222/usr/x386/include
30223/usr/XFree86/include/X11
30224
30225/usr/include
30226/usr/local/include
30227/usr/unsupported/include
30228/usr/athena/include
30229/usr/local/x11r5/include
30230/usr/lpp/Xamples/include
30231
30232/usr/openwin/include
30233/usr/openwin/share/include'
30234
30235if test "$ac_x_includes" = no; then
30236  # Guess where to find include files, by looking for Xlib.h.
30237  # First, try using that file with no special directory specified.
30238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30239/* end confdefs.h.  */
30240#include <X11/Xlib.h>
30241_ACEOF
30242if ac_fn_cxx_try_cpp "$LINENO"; then :
30243  # We can compile using X headers with no special include directory.
30244ac_x_includes=
30245else
30246  for ac_dir in $ac_x_header_dirs; do
30247  if test -r "$ac_dir/X11/Xlib.h"; then
30248    ac_x_includes=$ac_dir
30249    break
30250  fi
30251done
30252fi
30253rm -f conftest.err conftest.i conftest.$ac_ext
30254fi # $ac_x_includes = no
30255
30256if test "$ac_x_libraries" = no; then
30257  # Check for the libraries.
30258  # See if we find them without any special options.
30259  # Don't add to $LIBS permanently.
30260  ac_save_LIBS=$LIBS
30261  LIBS="-lX11 $LIBS"
30262  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30263/* end confdefs.h.  */
30264#include <X11/Xlib.h>
30265int
30266main ()
30267{
30268XrmInitialize ()
30269  ;
30270  return 0;
30271}
30272_ACEOF
30273if ac_fn_cxx_try_link "$LINENO"; then :
30274  LIBS=$ac_save_LIBS
30275# We can link X programs with no special library path.
30276ac_x_libraries=
30277else
30278  LIBS=$ac_save_LIBS
30279for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30280do
30281  # Don't even attempt the hair of trying to link an X program!
30282  for ac_extension in a so sl dylib la dll; do
30283    if test -r "$ac_dir/libX11.$ac_extension"; then
30284      ac_x_libraries=$ac_dir
30285      break 2
30286    fi
30287  done
30288done
30289fi
30290rm -f core conftest.err conftest.$ac_objext \
30291    conftest$ac_exeext conftest.$ac_ext
30292fi # $ac_x_libraries = no
30293
30294case $ac_x_includes,$ac_x_libraries in #(
30295  no,* | *,no | *\'*)
30296    # Didn't find X, or a directory has "'" in its name.
30297    ac_cv_have_x="have_x=no";; #(
30298  *)
30299    # Record where we found X for the cache.
30300    ac_cv_have_x="have_x=yes\
30301	ac_x_includes='$ac_x_includes'\
30302	ac_x_libraries='$ac_x_libraries'"
30303esac
30304fi
30305;; #(
30306    *) have_x=yes;;
30307  esac
30308  eval "$ac_cv_have_x"
30309fi # $with_x != no
30310
30311if test "$have_x" != yes; then
30312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30313$as_echo "$have_x" >&6; }
30314  no_x=yes
30315else
30316  # If each of the values was on the command line, it overrides each guess.
30317  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30318  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30319  # Update the cache value to reflect the command line values.
30320  ac_cv_have_x="have_x=yes\
30321	ac_x_includes='$x_includes'\
30322	ac_x_libraries='$x_libraries'"
30323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30324$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30325fi
30326
30327if test "$no_x" = yes; then
30328  # Not all programs may use this symbol, but it does not hurt to define it.
30329
30330$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30331
30332  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30333else
30334  if test -n "$x_includes"; then
30335    X_CFLAGS="$X_CFLAGS -I$x_includes"
30336  fi
30337
30338  # It would also be nice to do this for all -L options, not just this one.
30339  if test -n "$x_libraries"; then
30340    X_LIBS="$X_LIBS -L$x_libraries"
30341    # For Solaris; some versions of Sun CC require a space after -R and
30342    # others require no space.  Words are not sufficient . . . .
30343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30344$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30345    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30346    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30347    ac_cxx_werror_flag=yes
30348    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30349/* end confdefs.h.  */
30350
30351int
30352main ()
30353{
30354
30355  ;
30356  return 0;
30357}
30358_ACEOF
30359if ac_fn_cxx_try_link "$LINENO"; then :
30360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30361$as_echo "no" >&6; }
30362       X_LIBS="$X_LIBS -R$x_libraries"
30363else
30364  LIBS="$ac_xsave_LIBS -R $x_libraries"
30365       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30366/* end confdefs.h.  */
30367
30368int
30369main ()
30370{
30371
30372  ;
30373  return 0;
30374}
30375_ACEOF
30376if ac_fn_cxx_try_link "$LINENO"; then :
30377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30378$as_echo "yes" >&6; }
30379	  X_LIBS="$X_LIBS -R $x_libraries"
30380else
30381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30382$as_echo "neither works" >&6; }
30383fi
30384rm -f core conftest.err conftest.$ac_objext \
30385    conftest$ac_exeext conftest.$ac_ext
30386fi
30387rm -f core conftest.err conftest.$ac_objext \
30388    conftest$ac_exeext conftest.$ac_ext
30389    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30390    LIBS=$ac_xsave_LIBS
30391  fi
30392
30393  # Check for system-dependent libraries X programs must link with.
30394  # Do this before checking for the system-independent R6 libraries
30395  # (-lICE), since we may need -lsocket or whatever for X linking.
30396
30397  if test "$ISC" = yes; then
30398    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30399  else
30400    # Martyn Johnson says this is needed for Ultrix, if the X
30401    # libraries were built with DECnet support.  And Karl Berry says
30402    # the Alpha needs dnet_stub (dnet does not exist).
30403    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30404    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30405/* end confdefs.h.  */
30406
30407/* Override any GCC internal prototype to avoid an error.
30408   Use char because int might match the return type of a GCC
30409   builtin and then its argument prototype would still apply.  */
30410#ifdef __cplusplus
30411extern "C"
30412#endif
30413char XOpenDisplay ();
30414int
30415main ()
30416{
30417return XOpenDisplay ();
30418  ;
30419  return 0;
30420}
30421_ACEOF
30422if ac_fn_cxx_try_link "$LINENO"; then :
30423
30424else
30425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30426$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30427if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30428  $as_echo_n "(cached) " >&6
30429else
30430  ac_check_lib_save_LIBS=$LIBS
30431LIBS="-ldnet  $LIBS"
30432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30433/* end confdefs.h.  */
30434
30435/* Override any GCC internal prototype to avoid an error.
30436   Use char because int might match the return type of a GCC
30437   builtin and then its argument prototype would still apply.  */
30438#ifdef __cplusplus
30439extern "C"
30440#endif
30441char dnet_ntoa ();
30442int
30443main ()
30444{
30445return dnet_ntoa ();
30446  ;
30447  return 0;
30448}
30449_ACEOF
30450if ac_fn_cxx_try_link "$LINENO"; then :
30451  ac_cv_lib_dnet_dnet_ntoa=yes
30452else
30453  ac_cv_lib_dnet_dnet_ntoa=no
30454fi
30455rm -f core conftest.err conftest.$ac_objext \
30456    conftest$ac_exeext conftest.$ac_ext
30457LIBS=$ac_check_lib_save_LIBS
30458fi
30459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30460$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30461if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30462  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30463fi
30464
30465    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30467$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30468if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30469  $as_echo_n "(cached) " >&6
30470else
30471  ac_check_lib_save_LIBS=$LIBS
30472LIBS="-ldnet_stub  $LIBS"
30473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30474/* end confdefs.h.  */
30475
30476/* Override any GCC internal prototype to avoid an error.
30477   Use char because int might match the return type of a GCC
30478   builtin and then its argument prototype would still apply.  */
30479#ifdef __cplusplus
30480extern "C"
30481#endif
30482char dnet_ntoa ();
30483int
30484main ()
30485{
30486return dnet_ntoa ();
30487  ;
30488  return 0;
30489}
30490_ACEOF
30491if ac_fn_cxx_try_link "$LINENO"; then :
30492  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30493else
30494  ac_cv_lib_dnet_stub_dnet_ntoa=no
30495fi
30496rm -f core conftest.err conftest.$ac_objext \
30497    conftest$ac_exeext conftest.$ac_ext
30498LIBS=$ac_check_lib_save_LIBS
30499fi
30500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30501$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30502if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30503  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30504fi
30505
30506    fi
30507fi
30508rm -f core conftest.err conftest.$ac_objext \
30509    conftest$ac_exeext conftest.$ac_ext
30510    LIBS="$ac_xsave_LIBS"
30511
30512    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30513    # to get the SysV transport functions.
30514    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30515    # needs -lnsl.
30516    # The nsl library prevents programs from opening the X display
30517    # on Irix 5.2, according to T.E. Dickey.
30518    # The functions gethostbyname, getservbyname, and inet_addr are
30519    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30520    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30521if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30522
30523fi
30524
30525    if test $ac_cv_func_gethostbyname = no; then
30526      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30527$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30528if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30529  $as_echo_n "(cached) " >&6
30530else
30531  ac_check_lib_save_LIBS=$LIBS
30532LIBS="-lnsl  $LIBS"
30533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30534/* end confdefs.h.  */
30535
30536/* Override any GCC internal prototype to avoid an error.
30537   Use char because int might match the return type of a GCC
30538   builtin and then its argument prototype would still apply.  */
30539#ifdef __cplusplus
30540extern "C"
30541#endif
30542char gethostbyname ();
30543int
30544main ()
30545{
30546return gethostbyname ();
30547  ;
30548  return 0;
30549}
30550_ACEOF
30551if ac_fn_cxx_try_link "$LINENO"; then :
30552  ac_cv_lib_nsl_gethostbyname=yes
30553else
30554  ac_cv_lib_nsl_gethostbyname=no
30555fi
30556rm -f core conftest.err conftest.$ac_objext \
30557    conftest$ac_exeext conftest.$ac_ext
30558LIBS=$ac_check_lib_save_LIBS
30559fi
30560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30561$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30562if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30563  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30564fi
30565
30566      if test $ac_cv_lib_nsl_gethostbyname = no; then
30567	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30568$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30569if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30570  $as_echo_n "(cached) " >&6
30571else
30572  ac_check_lib_save_LIBS=$LIBS
30573LIBS="-lbsd  $LIBS"
30574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30575/* end confdefs.h.  */
30576
30577/* Override any GCC internal prototype to avoid an error.
30578   Use char because int might match the return type of a GCC
30579   builtin and then its argument prototype would still apply.  */
30580#ifdef __cplusplus
30581extern "C"
30582#endif
30583char gethostbyname ();
30584int
30585main ()
30586{
30587return gethostbyname ();
30588  ;
30589  return 0;
30590}
30591_ACEOF
30592if ac_fn_cxx_try_link "$LINENO"; then :
30593  ac_cv_lib_bsd_gethostbyname=yes
30594else
30595  ac_cv_lib_bsd_gethostbyname=no
30596fi
30597rm -f core conftest.err conftest.$ac_objext \
30598    conftest$ac_exeext conftest.$ac_ext
30599LIBS=$ac_check_lib_save_LIBS
30600fi
30601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30602$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30603if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30604  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30605fi
30606
30607      fi
30608    fi
30609
30610    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30611    # socket/setsockopt and other routines are undefined under SCO ODT
30612    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30613    # on later versions), says Simon Leinen: it contains gethostby*
30614    # variants that don't use the name server (or something).  -lsocket
30615    # must be given before -lnsl if both are needed.  We assume that
30616    # if connect needs -lnsl, so does gethostbyname.
30617    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30618if test "x$ac_cv_func_connect" = x""yes; then :
30619
30620fi
30621
30622    if test $ac_cv_func_connect = no; then
30623      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30624$as_echo_n "checking for connect in -lsocket... " >&6; }
30625if test "${ac_cv_lib_socket_connect+set}" = set; then :
30626  $as_echo_n "(cached) " >&6
30627else
30628  ac_check_lib_save_LIBS=$LIBS
30629LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30631/* end confdefs.h.  */
30632
30633/* Override any GCC internal prototype to avoid an error.
30634   Use char because int might match the return type of a GCC
30635   builtin and then its argument prototype would still apply.  */
30636#ifdef __cplusplus
30637extern "C"
30638#endif
30639char connect ();
30640int
30641main ()
30642{
30643return connect ();
30644  ;
30645  return 0;
30646}
30647_ACEOF
30648if ac_fn_cxx_try_link "$LINENO"; then :
30649  ac_cv_lib_socket_connect=yes
30650else
30651  ac_cv_lib_socket_connect=no
30652fi
30653rm -f core conftest.err conftest.$ac_objext \
30654    conftest$ac_exeext conftest.$ac_ext
30655LIBS=$ac_check_lib_save_LIBS
30656fi
30657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30658$as_echo "$ac_cv_lib_socket_connect" >&6; }
30659if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30660  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30661fi
30662
30663    fi
30664
30665    # Guillermo Gomez says -lposix is necessary on A/UX.
30666    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30667if test "x$ac_cv_func_remove" = x""yes; then :
30668
30669fi
30670
30671    if test $ac_cv_func_remove = no; then
30672      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30673$as_echo_n "checking for remove in -lposix... " >&6; }
30674if test "${ac_cv_lib_posix_remove+set}" = set; then :
30675  $as_echo_n "(cached) " >&6
30676else
30677  ac_check_lib_save_LIBS=$LIBS
30678LIBS="-lposix  $LIBS"
30679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30680/* end confdefs.h.  */
30681
30682/* Override any GCC internal prototype to avoid an error.
30683   Use char because int might match the return type of a GCC
30684   builtin and then its argument prototype would still apply.  */
30685#ifdef __cplusplus
30686extern "C"
30687#endif
30688char remove ();
30689int
30690main ()
30691{
30692return remove ();
30693  ;
30694  return 0;
30695}
30696_ACEOF
30697if ac_fn_cxx_try_link "$LINENO"; then :
30698  ac_cv_lib_posix_remove=yes
30699else
30700  ac_cv_lib_posix_remove=no
30701fi
30702rm -f core conftest.err conftest.$ac_objext \
30703    conftest$ac_exeext conftest.$ac_ext
30704LIBS=$ac_check_lib_save_LIBS
30705fi
30706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30707$as_echo "$ac_cv_lib_posix_remove" >&6; }
30708if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30709  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30710fi
30711
30712    fi
30713
30714    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30715    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30716if test "x$ac_cv_func_shmat" = x""yes; then :
30717
30718fi
30719
30720    if test $ac_cv_func_shmat = no; then
30721      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30722$as_echo_n "checking for shmat in -lipc... " >&6; }
30723if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30724  $as_echo_n "(cached) " >&6
30725else
30726  ac_check_lib_save_LIBS=$LIBS
30727LIBS="-lipc  $LIBS"
30728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30729/* end confdefs.h.  */
30730
30731/* Override any GCC internal prototype to avoid an error.
30732   Use char because int might match the return type of a GCC
30733   builtin and then its argument prototype would still apply.  */
30734#ifdef __cplusplus
30735extern "C"
30736#endif
30737char shmat ();
30738int
30739main ()
30740{
30741return shmat ();
30742  ;
30743  return 0;
30744}
30745_ACEOF
30746if ac_fn_cxx_try_link "$LINENO"; then :
30747  ac_cv_lib_ipc_shmat=yes
30748else
30749  ac_cv_lib_ipc_shmat=no
30750fi
30751rm -f core conftest.err conftest.$ac_objext \
30752    conftest$ac_exeext conftest.$ac_ext
30753LIBS=$ac_check_lib_save_LIBS
30754fi
30755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30756$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30757if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30758  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30759fi
30760
30761    fi
30762  fi
30763
30764  # Check for libraries that X11R6 Xt/Xaw programs need.
30765  ac_save_LDFLAGS=$LDFLAGS
30766  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30767  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30768  # check for ICE first), but we must link in the order -lSM -lICE or
30769  # we get undefined symbols.  So assume we have SM if we have ICE.
30770  # These have to be linked with before -lX11, unlike the other
30771  # libraries we check for below, so use a different variable.
30772  # John Interrante, Karl Berry
30773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30774$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30775if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30776  $as_echo_n "(cached) " >&6
30777else
30778  ac_check_lib_save_LIBS=$LIBS
30779LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30781/* end confdefs.h.  */
30782
30783/* Override any GCC internal prototype to avoid an error.
30784   Use char because int might match the return type of a GCC
30785   builtin and then its argument prototype would still apply.  */
30786#ifdef __cplusplus
30787extern "C"
30788#endif
30789char IceConnectionNumber ();
30790int
30791main ()
30792{
30793return IceConnectionNumber ();
30794  ;
30795  return 0;
30796}
30797_ACEOF
30798if ac_fn_cxx_try_link "$LINENO"; then :
30799  ac_cv_lib_ICE_IceConnectionNumber=yes
30800else
30801  ac_cv_lib_ICE_IceConnectionNumber=no
30802fi
30803rm -f core conftest.err conftest.$ac_objext \
30804    conftest$ac_exeext conftest.$ac_ext
30805LIBS=$ac_check_lib_save_LIBS
30806fi
30807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30808$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30809if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30810  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30811fi
30812
30813  LDFLAGS=$ac_save_LDFLAGS
30814
30815fi
30816
30817
30818# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30819# this doesn't make sense so we remove it.
30820if test "x$COMPILE_TYPE" = xcross; then
30821  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30822fi
30823
30824if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30825
30826    # Print a helpful message on how to acquire the necessary build dependency.
30827    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30828    MISSING_DEPENDENCY=x11
30829    PKGHANDLER_COMMAND=
30830
30831    case $PKGHANDLER in
30832	apt-get)
30833                apt_help     $MISSING_DEPENDENCY ;;
30834    yum)
30835                yum_help     $MISSING_DEPENDENCY ;;
30836	port)
30837                port_help    $MISSING_DEPENDENCY ;;
30838	pkgutil)
30839                pkgutil_help $MISSING_DEPENDENCY ;;
30840	pkgadd)
30841                pkgadd_help  $MISSING_DEPENDENCY ;;
30842    * )
30843      break ;;
30844    esac
30845
30846    if test "x$PKGHANDLER_COMMAND" != x; then
30847        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30848    fi
30849
30850    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30851fi
30852
30853# Some of the old makefiles require a setting of OPENWIN_HOME
30854# Since the X11R6 directory has disappeared on later Linuxes,
30855# we need to probe for it.
30856if test "x$OPENJDK_TARGET_OS" = xlinux; then
30857    if test -d "$SYS_ROOT/usr/X11R6"; then
30858        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30859    elif test -d "$SYS_ROOT/usr/include/X11"; then
30860        OPENWIN_HOME="$SYS_ROOT/usr"
30861    fi
30862fi
30863if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30864    OPENWIN_HOME="/usr/openwin"
30865fi
30866
30867
30868
30869#
30870# Weird Sol10 something check...TODO change to try compile
30871#
30872if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30873  if test "`uname -r`" = "5.10"; then
30874     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30875     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30876     fi
30877  fi
30878fi
30879
30880ac_ext=c
30881ac_cpp='$CPP $CPPFLAGS'
30882ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30883ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30884ac_compiler_gnu=$ac_cv_c_compiler_gnu
30885
30886OLD_CFLAGS="$CFLAGS"
30887CFLAGS="$CFLAGS $X_CFLAGS"
30888
30889# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30890for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30891do :
30892  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30893ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30894                   # include <X11/Xutil.h>
30895
30896"
30897if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30898  cat >>confdefs.h <<_ACEOF
30899#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30900_ACEOF
30901 X11_A_OK=yes
30902else
30903  X11_A_OK=no; break
30904fi
30905
30906done
30907
30908
30909CFLAGS="$OLD_CFLAGS"
30910ac_ext=cpp
30911ac_cpp='$CXXCPP $CPPFLAGS'
30912ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30913ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30914ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30915
30916
30917if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30918
30919    # Print a helpful message on how to acquire the necessary build dependency.
30920    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30921    MISSING_DEPENDENCY=x11
30922    PKGHANDLER_COMMAND=
30923
30924    case $PKGHANDLER in
30925	apt-get)
30926                apt_help     $MISSING_DEPENDENCY ;;
30927    yum)
30928                yum_help     $MISSING_DEPENDENCY ;;
30929	port)
30930                port_help    $MISSING_DEPENDENCY ;;
30931	pkgutil)
30932                pkgutil_help $MISSING_DEPENDENCY ;;
30933	pkgadd)
30934                pkgadd_help  $MISSING_DEPENDENCY ;;
30935    * )
30936      break ;;
30937    esac
30938
30939    if test "x$PKGHANDLER_COMMAND" != x; then
30940        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30941    fi
30942
30943    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30944fi
30945
30946
30947
30948
30949
30950
30951###############################################################################
30952#
30953# The common unix printing system cups is used to print from java.
30954#
30955
30956# Check whether --with-cups was given.
30957if test "${with_cups+set}" = set; then :
30958  withval=$with_cups;
30959fi
30960
30961
30962# Check whether --with-cups-include was given.
30963if test "${with_cups_include+set}" = set; then :
30964  withval=$with_cups_include;
30965fi
30966
30967
30968if test "x$CUPS_NOT_NEEDED" = xyes; then
30969	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30970		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30971$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30972	fi
30973	CUPS_CFLAGS=
30974else
30975	CUPS_FOUND=no
30976
30977	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30978	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30979	fi
30980
30981	if test "x${with_cups}" != x; then
30982	    CUPS_CFLAGS="-I${with_cups}/include"
30983	    CUPS_FOUND=yes
30984	fi
30985	if test "x${with_cups_include}" != x; then
30986	    CUPS_CFLAGS="-I${with_cups_include}"
30987	    CUPS_FOUND=yes
30988	fi
30989	if test "x$CUPS_FOUND" = xno; then
30990
30991
30992    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30993        # Source the builddeps file again, to make sure it uses the latest variables!
30994        . $builddepsfile
30995        # Look for a target and build machine specific resource!
30996        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30997        if test "x$resource" = x; then
30998            # Ok, lets instead look for a target specific resource
30999            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31000        fi
31001        if test "x$resource" = x; then
31002            # Ok, lets instead look for a build specific resource
31003            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31004        fi
31005        if test "x$resource" = x; then
31006            # Ok, lets instead look for a generic resource
31007            # (The cups comes from M4 and not the shell, thus no need for eval here.)
31008            resource=${builddep_cups}
31009        fi
31010        if test "x$resource" != x; then
31011            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31012$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31013	    # If the resource in the builddeps.conf file is an existing directory,
31014	    # for example /java/linux/cups
31015	    if test -d ${resource}; then
31016	       depdir=${resource}
31017	    else
31018
31019# cups is for example mymodule
31020# $resource is for example libs/general/libmymod_1_2_3.zip
31021# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31022# $with_builddeps_dir is for example /localhome/builddeps
31023# depdir is the name of the variable into which we store the depdir, eg MYMOD
31024# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31025# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31026    filename=`basename $resource`
31027    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31028    filebase=${filename%%.*}
31029    extension=${filename#*.}
31030    installdir=$with_builddeps_dir/$filebase
31031    if test ! -f $installdir/$filename.unpacked; then
31032        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31033$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31034        if test ! -d $installdir; then
31035            mkdir -p $installdir
31036        fi
31037        if test ! -d $installdir; then
31038            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31039        fi
31040        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31041        touch $tmpfile
31042        if test ! -f $tmpfile; then
31043            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31044        fi
31045
31046    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31047    # $tmpfile is the local file name for the downloaded file.
31048    VALID_TOOL=no
31049    if test "x$BDEPS_FTP" = xwget; then
31050       VALID_TOOL=yes
31051       wget -O $tmpfile $with_builddeps_server/$resource
31052    fi
31053    if test "x$BDEPS_FTP" = xlftp; then
31054       VALID_TOOL=yes
31055       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31056    fi
31057    if test "x$BDEPS_FTP" = xftp; then
31058        VALID_TOOL=yes
31059        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31060        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31061        FTPUSERPWD=${FTPSERVER%%@*}
31062        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31063            FTPUSER=${userpwd%%:*}
31064            FTPPWD=${userpwd#*@}
31065            FTPSERVER=${FTPSERVER#*@}
31066        else
31067            FTPUSER=ftp
31068            FTPPWD=ftp
31069        fi
31070        # the "pass" command does not work on some
31071        # ftp clients (read ftp.exe) but if it works,
31072        # passive mode is better!
31073        (\
31074            echo "user $FTPUSER $FTPPWD"        ;\
31075            echo "pass"                         ;\
31076            echo "bin"                          ;\
31077            echo "get $FTPPATH $tmpfile"              ;\
31078        ) | ftp -in $FTPSERVER
31079    fi
31080    if test "x$VALID_TOOL" != xyes; then
31081       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31082    fi
31083
31084        mv $tmpfile $installdir/$filename
31085        if test ! -s $installdir/$filename; then
31086            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31087        fi
31088        case "$extension" in
31089            zip)  echo "Unzipping $installdir/$filename..."
31090               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31091            ;;
31092            tar.gz) echo "Untaring $installdir/$filename..."
31093               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31094            ;;
31095            tgz) echo "Untaring $installdir/$filename..."
31096               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31097            ;;
31098            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31099            ;;
31100        esac
31101    fi
31102    if test -f $installdir/$filename.unpacked; then
31103        depdir=$installdir
31104    fi
31105
31106	    fi
31107            # Source the builddeps file again, because in the previous command, the depdir
31108            # was updated to point at the current build dependency install directory.
31109            . $builddepsfile
31110            # Now extract variables from the builddeps.conf files.
31111            theroot=${builddep_cups_ROOT}
31112            thecflags=${builddep_cups_CFLAGS}
31113            thelibs=${builddep_cups_LIBS}
31114            if test "x$depdir" = x; then
31115                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31116            fi
31117            CUPS=$depdir
31118            if test "x$theroot" != x; then
31119               CUPS="$theroot"
31120            fi
31121            if test "x$thecflags" != x; then
31122               CUPS_CFLAGS="$thecflags"
31123            fi
31124            if test "x$thelibs" != x; then
31125               CUPS_LIBS="$thelibs"
31126            fi
31127            CUPS_FOUND=yes
31128
31129        fi
31130
31131    fi
31132
31133	fi
31134	if test "x$CUPS_FOUND" = xno; then
31135	    # Are the cups headers installed in the default /usr/include location?
31136	    for ac_header in cups/cups.h cups/ppd.h
31137do :
31138  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31139ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31140if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31141  cat >>confdefs.h <<_ACEOF
31142#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31143_ACEOF
31144 CUPS_FOUND=yes
31145	                      CUPS_CFLAGS=
31146	                      DEFAULT_CUPS=yes
31147fi
31148
31149done
31150
31151	fi
31152	if test "x$CUPS_FOUND" = xno; then
31153	    # Getting nervous now? Lets poke around for standard Solaris third-party
31154	    # package installation locations.
31155	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31156$as_echo_n "checking for cups headers... " >&6; }
31157	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31158	       # An SFW package seems to be installed!
31159	       CUPS_FOUND=yes
31160	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31161	    elif test -s /opt/csw/include/cups/cups.h; then
31162	       # A CSW package seems to be installed!
31163	       CUPS_FOUND=yes
31164	       CUPS_CFLAGS="-I/opt/csw/include"
31165	    fi
31166	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31167$as_echo "$CUPS_FOUND" >&6; }
31168	fi
31169	if test "x$CUPS_FOUND" = xno; then
31170
31171    # Print a helpful message on how to acquire the necessary build dependency.
31172    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31173    MISSING_DEPENDENCY=cups
31174    PKGHANDLER_COMMAND=
31175
31176    case $PKGHANDLER in
31177	apt-get)
31178                apt_help     $MISSING_DEPENDENCY ;;
31179    yum)
31180                yum_help     $MISSING_DEPENDENCY ;;
31181	port)
31182                port_help    $MISSING_DEPENDENCY ;;
31183	pkgutil)
31184                pkgutil_help $MISSING_DEPENDENCY ;;
31185	pkgadd)
31186                pkgadd_help  $MISSING_DEPENDENCY ;;
31187    * )
31188      break ;;
31189    esac
31190
31191    if test "x$PKGHANDLER_COMMAND" != x; then
31192        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31193    fi
31194
31195	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31196	fi
31197fi
31198
31199
31200
31201
31202
31203
31204###############################################################################
31205#
31206# The ubiquitous freetype2 library is used to render fonts.
31207#
31208
31209# Check whether --with-freetype was given.
31210if test "${with_freetype+set}" = set; then :
31211  withval=$with_freetype;
31212fi
31213
31214
31215# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31216USING_SYSTEM_FT_LIB=false
31217
31218if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31219	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31220		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31221$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31222	fi
31223	FREETYPE2_CFLAGS=
31224	FREETYPE2_LIBS=
31225        FREETYPE2_LIB_PATH=
31226else
31227	FREETYPE2_FOUND=no
31228
31229	if test "x$with_freetype" != x; then
31230
31231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31232
31233  # Input might be given as Windows format, start by converting to
31234  # unix format.
31235  path="$with_freetype"
31236  new_path=`$CYGPATH -u "$path"`
31237
31238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31241  # "foo.exe" is OK but "foo" is an error.
31242  #
31243  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31244  # It is also a way to make sure we got the proper file name for the real test later on.
31245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31246  if test "x$test_shortpath" = x; then
31247    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31248$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31249    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31250  fi
31251
31252  # Call helper function which possibly converts this using DOS-style short mode.
31253  # If so, the updated path is stored in $new_path.
31254
31255  input_path="$new_path"
31256  # Check if we need to convert this using DOS-style short mode. If the path
31257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31258  # take no chances and rewrite it.
31259  # Note: m4 eats our [], so we need to use [ and ] instead.
31260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31261  if test "x$has_forbidden_chars" != x; then
31262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31266      # Going to short mode and back again did indeed matter. Since short mode is
31267      # case insensitive, let's make it lowercase to improve readability.
31268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31269      # Now convert it back to Unix-stile (cygpath)
31270      input_path=`$CYGPATH -u "$shortmode_path"`
31271      new_path="$input_path"
31272    fi
31273  fi
31274
31275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31276  if test "x$test_cygdrive_prefix" = x; then
31277    # As a simple fix, exclude /usr/bin since it's not a real path.
31278    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31280      # a path prefixed by /cygdrive for fixpath to work.
31281      new_path="$CYGWIN_ROOT_PATH$input_path"
31282    fi
31283  fi
31284
31285
31286  if test "x$path" != "x$new_path"; then
31287    with_freetype="$new_path"
31288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31289$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31290  fi
31291
31292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31293
31294  path="$with_freetype"
31295  has_colon=`$ECHO $path | $GREP ^.:`
31296  new_path="$path"
31297  if test "x$has_colon" = x; then
31298    # Not in mixed or Windows style, start by that.
31299    new_path=`cmd //c echo $path`
31300  fi
31301
31302
31303  input_path="$new_path"
31304  # Check if we need to convert this using DOS-style short mode. If the path
31305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31306  # take no chances and rewrite it.
31307  # Note: m4 eats our [], so we need to use [ and ] instead.
31308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31309  if test "x$has_forbidden_chars" != x; then
31310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31312  fi
31313
31314
31315  windows_path="$new_path"
31316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31317    unix_path=`$CYGPATH -u "$windows_path"`
31318    new_path="$unix_path"
31319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31321    new_path="$unix_path"
31322  fi
31323
31324  if test "x$path" != "x$new_path"; then
31325    with_freetype="$new_path"
31326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31327$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31328  fi
31329
31330  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31331  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31332
31333  else
31334    # We're on a posix platform. Hooray! :)
31335    path="$with_freetype"
31336    has_space=`$ECHO "$path" | $GREP " "`
31337    if test "x$has_space" != x; then
31338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31339$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31340      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31341    fi
31342
31343    # Use eval to expand a potential ~
31344    eval path="$path"
31345    if test ! -f "$path" && test ! -d "$path"; then
31346      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31347    fi
31348
31349    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31350  fi
31351
31352	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31353            FREETYPE2_LIB_PATH="$with_freetype/lib"
31354            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31355                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31356                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31357            fi
31358            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31359                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31360            fi
31361	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31362            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31363                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31364            fi
31365 	    FREETYPE2_FOUND=yes
31366   	    if test "x$FREETYPE2_FOUND" = xyes; then
31367	        # Verify that the directories exist
31368                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31369		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31370		fi
31371	        # List the contents of the lib.
31372		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31373                if test "x$FREETYPELIB" = x; then
31374		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31375		fi
31376	        # Check one h-file
31377                if ! test -s "$with_freetype/include/ft2build.h"; then
31378		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31379		fi
31380            fi
31381        fi
31382	if test "x$FREETYPE2_FOUND" = xno; then
31383
31384
31385    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31386        # Source the builddeps file again, to make sure it uses the latest variables!
31387        . $builddepsfile
31388        # Look for a target and build machine specific resource!
31389        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31390        if test "x$resource" = x; then
31391            # Ok, lets instead look for a target specific resource
31392            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31393        fi
31394        if test "x$resource" = x; then
31395            # Ok, lets instead look for a build specific resource
31396            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31397        fi
31398        if test "x$resource" = x; then
31399            # Ok, lets instead look for a generic resource
31400            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31401            resource=${builddep_freetype2}
31402        fi
31403        if test "x$resource" != x; then
31404            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31405$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31406	    # If the resource in the builddeps.conf file is an existing directory,
31407	    # for example /java/linux/cups
31408	    if test -d ${resource}; then
31409	       depdir=${resource}
31410	    else
31411
31412# freetype2 is for example mymodule
31413# $resource is for example libs/general/libmymod_1_2_3.zip
31414# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31415# $with_builddeps_dir is for example /localhome/builddeps
31416# depdir is the name of the variable into which we store the depdir, eg MYMOD
31417# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31418# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31419    filename=`basename $resource`
31420    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31421    filebase=${filename%%.*}
31422    extension=${filename#*.}
31423    installdir=$with_builddeps_dir/$filebase
31424    if test ! -f $installdir/$filename.unpacked; then
31425        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31426$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31427        if test ! -d $installdir; then
31428            mkdir -p $installdir
31429        fi
31430        if test ! -d $installdir; then
31431            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31432        fi
31433        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31434        touch $tmpfile
31435        if test ! -f $tmpfile; then
31436            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31437        fi
31438
31439    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31440    # $tmpfile is the local file name for the downloaded file.
31441    VALID_TOOL=no
31442    if test "x$BDEPS_FTP" = xwget; then
31443       VALID_TOOL=yes
31444       wget -O $tmpfile $with_builddeps_server/$resource
31445    fi
31446    if test "x$BDEPS_FTP" = xlftp; then
31447       VALID_TOOL=yes
31448       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31449    fi
31450    if test "x$BDEPS_FTP" = xftp; then
31451        VALID_TOOL=yes
31452        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31453        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31454        FTPUSERPWD=${FTPSERVER%%@*}
31455        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31456            FTPUSER=${userpwd%%:*}
31457            FTPPWD=${userpwd#*@}
31458            FTPSERVER=${FTPSERVER#*@}
31459        else
31460            FTPUSER=ftp
31461            FTPPWD=ftp
31462        fi
31463        # the "pass" command does not work on some
31464        # ftp clients (read ftp.exe) but if it works,
31465        # passive mode is better!
31466        (\
31467            echo "user $FTPUSER $FTPPWD"        ;\
31468            echo "pass"                         ;\
31469            echo "bin"                          ;\
31470            echo "get $FTPPATH $tmpfile"              ;\
31471        ) | ftp -in $FTPSERVER
31472    fi
31473    if test "x$VALID_TOOL" != xyes; then
31474       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31475    fi
31476
31477        mv $tmpfile $installdir/$filename
31478        if test ! -s $installdir/$filename; then
31479            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31480        fi
31481        case "$extension" in
31482            zip)  echo "Unzipping $installdir/$filename..."
31483               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31484            ;;
31485            tar.gz) echo "Untaring $installdir/$filename..."
31486               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31487            ;;
31488            tgz) echo "Untaring $installdir/$filename..."
31489               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31490            ;;
31491            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31492            ;;
31493        esac
31494    fi
31495    if test -f $installdir/$filename.unpacked; then
31496        depdir=$installdir
31497    fi
31498
31499	    fi
31500            # Source the builddeps file again, because in the previous command, the depdir
31501            # was updated to point at the current build dependency install directory.
31502            . $builddepsfile
31503            # Now extract variables from the builddeps.conf files.
31504            theroot=${builddep_freetype2_ROOT}
31505            thecflags=${builddep_freetype2_CFLAGS}
31506            thelibs=${builddep_freetype2_LIBS}
31507            if test "x$depdir" = x; then
31508                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31509            fi
31510            FREETYPE2=$depdir
31511            if test "x$theroot" != x; then
31512               FREETYPE2="$theroot"
31513            fi
31514            if test "x$thecflags" != x; then
31515               FREETYPE2_CFLAGS="$thecflags"
31516            fi
31517            if test "x$thelibs" != x; then
31518               FREETYPE2_LIBS="$thelibs"
31519            fi
31520            FREETYPE2_FOUND=yes
31521            else FREETYPE2_FOUND=no
31522
31523        fi
31524        else FREETYPE2_FOUND=no
31525
31526    fi
31527
31528            USING_SYSTEM_FT_LIB=true
31529	fi
31530	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31531            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31532
31533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31534
31535  # Input might be given as Windows format, start by converting to
31536  # unix format.
31537  path="$FREETYPELOCATION"
31538  new_path=`$CYGPATH -u "$path"`
31539
31540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31543  # "foo.exe" is OK but "foo" is an error.
31544  #
31545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31546  # It is also a way to make sure we got the proper file name for the real test later on.
31547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31548  if test "x$test_shortpath" = x; then
31549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31550$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31551    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31552  fi
31553
31554  # Call helper function which possibly converts this using DOS-style short mode.
31555  # If so, the updated path is stored in $new_path.
31556
31557  input_path="$new_path"
31558  # Check if we need to convert this using DOS-style short mode. If the path
31559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31560  # take no chances and rewrite it.
31561  # Note: m4 eats our [], so we need to use [ and ] instead.
31562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31563  if test "x$has_forbidden_chars" != x; then
31564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31568      # Going to short mode and back again did indeed matter. Since short mode is
31569      # case insensitive, let's make it lowercase to improve readability.
31570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31571      # Now convert it back to Unix-stile (cygpath)
31572      input_path=`$CYGPATH -u "$shortmode_path"`
31573      new_path="$input_path"
31574    fi
31575  fi
31576
31577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31578  if test "x$test_cygdrive_prefix" = x; then
31579    # As a simple fix, exclude /usr/bin since it's not a real path.
31580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31582      # a path prefixed by /cygdrive for fixpath to work.
31583      new_path="$CYGWIN_ROOT_PATH$input_path"
31584    fi
31585  fi
31586
31587
31588  if test "x$path" != "x$new_path"; then
31589    FREETYPELOCATION="$new_path"
31590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31591$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31592  fi
31593
31594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31595
31596  path="$FREETYPELOCATION"
31597  has_colon=`$ECHO $path | $GREP ^.:`
31598  new_path="$path"
31599  if test "x$has_colon" = x; then
31600    # Not in mixed or Windows style, start by that.
31601    new_path=`cmd //c echo $path`
31602  fi
31603
31604
31605  input_path="$new_path"
31606  # Check if we need to convert this using DOS-style short mode. If the path
31607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31608  # take no chances and rewrite it.
31609  # Note: m4 eats our [], so we need to use [ and ] instead.
31610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31611  if test "x$has_forbidden_chars" != x; then
31612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31614  fi
31615
31616
31617  windows_path="$new_path"
31618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31619    unix_path=`$CYGPATH -u "$windows_path"`
31620    new_path="$unix_path"
31621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31623    new_path="$unix_path"
31624  fi
31625
31626  if test "x$path" != "x$new_path"; then
31627    FREETYPELOCATION="$new_path"
31628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31629$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31630  fi
31631
31632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31634
31635  else
31636    # We're on a posix platform. Hooray! :)
31637    path="$FREETYPELOCATION"
31638    has_space=`$ECHO "$path" | $GREP " "`
31639    if test "x$has_space" != x; then
31640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31641$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31642      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31643    fi
31644
31645    # Use eval to expand a potential ~
31646    eval path="$path"
31647    if test ! -f "$path" && test ! -d "$path"; then
31648      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31649    fi
31650
31651    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31652  fi
31653
31654	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31655$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31656	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31657	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31658	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31659 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31660                if ! test -s "$FREETYPE2_LIBS"; then
31661		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31662		fi
31663                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31664		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31665		fi
31666                USING_SYSTEM_FT_LIB=true
31667                FREETYPE2_FOUND=yes
31668	    fi
31669	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31670$as_echo "$FREETYPE2_FOUND" >&6; }
31671        fi
31672	if test "x$FREETYPE2_FOUND" = xno; then
31673
31674pkg_failed=no
31675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31676$as_echo_n "checking for FREETYPE2... " >&6; }
31677
31678if test -n "$FREETYPE2_CFLAGS"; then
31679    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31680 elif test -n "$PKG_CONFIG"; then
31681    if test -n "$PKG_CONFIG" && \
31682    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31683  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31684  ac_status=$?
31685  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31686  test $ac_status = 0; }; then
31687  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31688else
31689  pkg_failed=yes
31690fi
31691 else
31692    pkg_failed=untried
31693fi
31694if test -n "$FREETYPE2_LIBS"; then
31695    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31696 elif test -n "$PKG_CONFIG"; then
31697    if test -n "$PKG_CONFIG" && \
31698    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31699  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31700  ac_status=$?
31701  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31702  test $ac_status = 0; }; then
31703  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31704else
31705  pkg_failed=yes
31706fi
31707 else
31708    pkg_failed=untried
31709fi
31710
31711
31712
31713if test $pkg_failed = yes; then
31714
31715if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31716        _pkg_short_errors_supported=yes
31717else
31718        _pkg_short_errors_supported=no
31719fi
31720        if test $_pkg_short_errors_supported = yes; then
31721	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31722        else
31723	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31724        fi
31725	# Put the nasty error message in config.log where it belongs
31726	echo "$FREETYPE2_PKG_ERRORS" >&5
31727
31728	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31729$as_echo "no" >&6; }
31730                FREETYPE2_FOUND=no
31731elif test $pkg_failed = untried; then
31732	FREETYPE2_FOUND=no
31733else
31734	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31735	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31737$as_echo "yes" >&6; }
31738	FREETYPE2_FOUND=yes
31739fi
31740            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31741            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31742            USING_SYSTEM_FT_LIB=true
31743            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31744            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31745              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31746            fi
31747	fi
31748	if test "x$FREETYPE2_FOUND" = xno; then
31749	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31750$as_echo_n "checking for freetype in some standard locations... " >&6; }
31751
31752	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31753	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31754	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31755	    fi
31756	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31757	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31758	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31759	    fi
31760
31761	    PREV_CXXCFLAGS="$CXXFLAGS"
31762	    PREV_LDFLAGS="$LDFLAGS"
31763	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31764	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31765	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31766/* end confdefs.h.  */
31767#include<ft2build.h>
31768	                    #include FT_FREETYPE_H
31769	                   int main() { return 0; }
31770
31771_ACEOF
31772if ac_fn_cxx_try_link "$LINENO"; then :
31773
31774	                      # Yes, the default cflags and libs did the trick.
31775	                      FREETYPE2_FOUND=yes
31776	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31777	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31778
31779else
31780
31781	                      FREETYPE2_FOUND=no
31782
31783fi
31784rm -f core conftest.err conftest.$ac_objext \
31785    conftest$ac_exeext conftest.$ac_ext
31786            CXXCFLAGS="$PREV_CXXFLAGS"
31787	    LDFLAGS="$PREV_LDFLAGS"
31788	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31789$as_echo "$FREETYPE2_FOUND" >&6; }
31790            USING_SYSTEM_FT_LIB=true
31791	fi
31792	if test "x$FREETYPE2_FOUND" = xno; then
31793
31794    # Print a helpful message on how to acquire the necessary build dependency.
31795    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31796    MISSING_DEPENDENCY=freetype2
31797    PKGHANDLER_COMMAND=
31798
31799    case $PKGHANDLER in
31800	apt-get)
31801                apt_help     $MISSING_DEPENDENCY ;;
31802    yum)
31803                yum_help     $MISSING_DEPENDENCY ;;
31804	port)
31805                port_help    $MISSING_DEPENDENCY ;;
31806	pkgutil)
31807                pkgutil_help $MISSING_DEPENDENCY ;;
31808	pkgadd)
31809                pkgadd_help  $MISSING_DEPENDENCY ;;
31810    * )
31811      break ;;
31812    esac
31813
31814    if test "x$PKGHANDLER_COMMAND" != x; then
31815        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31816    fi
31817
31818		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31819	fi
31820
31821        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31822            # AC_CHECK_LIB does not support use of cl.exe
31823            PREV_LDFLAGS="$LDFLAGS"
31824            LDFLAGS="$FREETYPE2_LIBS"
31825            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31826$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31827if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31828  $as_echo_n "(cached) " >&6
31829else
31830  ac_check_lib_save_LIBS=$LIBS
31831LIBS="-lfreetype  $LIBS"
31832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31833/* end confdefs.h.  */
31834
31835/* Override any GCC internal prototype to avoid an error.
31836   Use char because int might match the return type of a GCC
31837   builtin and then its argument prototype would still apply.  */
31838#ifdef __cplusplus
31839extern "C"
31840#endif
31841char FT_Init_FreeType ();
31842int
31843main ()
31844{
31845return FT_Init_FreeType ();
31846  ;
31847  return 0;
31848}
31849_ACEOF
31850if ac_fn_cxx_try_link "$LINENO"; then :
31851  ac_cv_lib_freetype_FT_Init_FreeType=yes
31852else
31853  ac_cv_lib_freetype_FT_Init_FreeType=no
31854fi
31855rm -f core conftest.err conftest.$ac_objext \
31856    conftest$ac_exeext conftest.$ac_ext
31857LIBS=$ac_check_lib_save_LIBS
31858fi
31859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31860$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31861if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31862  FREETYPE2_FOUND=true
31863else
31864  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31865fi
31866
31867            LDFLAGS="$PREV_LDFLAGS"
31868        fi
31869fi
31870
31871
31872
31873
31874
31875
31876
31877
31878
31879###############################################################################
31880#
31881# Check for alsa headers and libraries. Used on Linux/GNU systems.
31882#
31883
31884# Check whether --with-alsa was given.
31885if test "${with_alsa+set}" = set; then :
31886  withval=$with_alsa;
31887fi
31888
31889
31890# Check whether --with-alsa-include was given.
31891if test "${with_alsa_include+set}" = set; then :
31892  withval=$with_alsa_include;
31893fi
31894
31895
31896# Check whether --with-alsa-lib was given.
31897if test "${with_alsa_lib+set}" = set; then :
31898  withval=$with_alsa_lib;
31899fi
31900
31901
31902if test "x$ALSA_NOT_NEEDED" = xyes; then
31903	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31904		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31905$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31906	fi
31907	ALSA_CFLAGS=
31908	ALSA_LIBS=
31909else
31910	ALSA_FOUND=no
31911
31912	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31913	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31914	fi
31915
31916	if test "x${with_alsa}" != x; then
31917	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31918	    ALSA_CFLAGS="-I${with_alsa}/include"
31919	    ALSA_FOUND=yes
31920	fi
31921	if test "x${with_alsa_include}" != x; then
31922	    ALSA_CFLAGS="-I${with_alsa_include}"
31923	    ALSA_FOUND=yes
31924	fi
31925	if test "x${with_alsa_lib}" != x; then
31926	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31927	    ALSA_FOUND=yes
31928	fi
31929	if test "x$ALSA_FOUND" = xno; then
31930
31931
31932    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31933        # Source the builddeps file again, to make sure it uses the latest variables!
31934        . $builddepsfile
31935        # Look for a target and build machine specific resource!
31936        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31937        if test "x$resource" = x; then
31938            # Ok, lets instead look for a target specific resource
31939            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31940        fi
31941        if test "x$resource" = x; then
31942            # Ok, lets instead look for a build specific resource
31943            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31944        fi
31945        if test "x$resource" = x; then
31946            # Ok, lets instead look for a generic resource
31947            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31948            resource=${builddep_alsa}
31949        fi
31950        if test "x$resource" != x; then
31951            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31952$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31953	    # If the resource in the builddeps.conf file is an existing directory,
31954	    # for example /java/linux/cups
31955	    if test -d ${resource}; then
31956	       depdir=${resource}
31957	    else
31958
31959# alsa is for example mymodule
31960# $resource is for example libs/general/libmymod_1_2_3.zip
31961# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31962# $with_builddeps_dir is for example /localhome/builddeps
31963# depdir is the name of the variable into which we store the depdir, eg MYMOD
31964# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31965# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31966    filename=`basename $resource`
31967    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31968    filebase=${filename%%.*}
31969    extension=${filename#*.}
31970    installdir=$with_builddeps_dir/$filebase
31971    if test ! -f $installdir/$filename.unpacked; then
31972        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31973$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31974        if test ! -d $installdir; then
31975            mkdir -p $installdir
31976        fi
31977        if test ! -d $installdir; then
31978            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31979        fi
31980        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31981        touch $tmpfile
31982        if test ! -f $tmpfile; then
31983            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31984        fi
31985
31986    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31987    # $tmpfile is the local file name for the downloaded file.
31988    VALID_TOOL=no
31989    if test "x$BDEPS_FTP" = xwget; then
31990       VALID_TOOL=yes
31991       wget -O $tmpfile $with_builddeps_server/$resource
31992    fi
31993    if test "x$BDEPS_FTP" = xlftp; then
31994       VALID_TOOL=yes
31995       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31996    fi
31997    if test "x$BDEPS_FTP" = xftp; then
31998        VALID_TOOL=yes
31999        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32000        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32001        FTPUSERPWD=${FTPSERVER%%@*}
32002        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32003            FTPUSER=${userpwd%%:*}
32004            FTPPWD=${userpwd#*@}
32005            FTPSERVER=${FTPSERVER#*@}
32006        else
32007            FTPUSER=ftp
32008            FTPPWD=ftp
32009        fi
32010        # the "pass" command does not work on some
32011        # ftp clients (read ftp.exe) but if it works,
32012        # passive mode is better!
32013        (\
32014            echo "user $FTPUSER $FTPPWD"        ;\
32015            echo "pass"                         ;\
32016            echo "bin"                          ;\
32017            echo "get $FTPPATH $tmpfile"              ;\
32018        ) | ftp -in $FTPSERVER
32019    fi
32020    if test "x$VALID_TOOL" != xyes; then
32021       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
32022    fi
32023
32024        mv $tmpfile $installdir/$filename
32025        if test ! -s $installdir/$filename; then
32026            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
32027        fi
32028        case "$extension" in
32029            zip)  echo "Unzipping $installdir/$filename..."
32030               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32031            ;;
32032            tar.gz) echo "Untaring $installdir/$filename..."
32033               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32034            ;;
32035            tgz) echo "Untaring $installdir/$filename..."
32036               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32037            ;;
32038            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32039            ;;
32040        esac
32041    fi
32042    if test -f $installdir/$filename.unpacked; then
32043        depdir=$installdir
32044    fi
32045
32046	    fi
32047            # Source the builddeps file again, because in the previous command, the depdir
32048            # was updated to point at the current build dependency install directory.
32049            . $builddepsfile
32050            # Now extract variables from the builddeps.conf files.
32051            theroot=${builddep_alsa_ROOT}
32052            thecflags=${builddep_alsa_CFLAGS}
32053            thelibs=${builddep_alsa_LIBS}
32054            if test "x$depdir" = x; then
32055                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
32056            fi
32057            ALSA=$depdir
32058            if test "x$theroot" != x; then
32059               ALSA="$theroot"
32060            fi
32061            if test "x$thecflags" != x; then
32062               ALSA_CFLAGS="$thecflags"
32063            fi
32064            if test "x$thelibs" != x; then
32065               ALSA_LIBS="$thelibs"
32066            fi
32067            ALSA_FOUND=yes
32068            else ALSA_FOUND=no
32069
32070        fi
32071        else ALSA_FOUND=no
32072
32073    fi
32074
32075	fi
32076	if test "x$ALSA_FOUND" = xno; then
32077
32078pkg_failed=no
32079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32080$as_echo_n "checking for ALSA... " >&6; }
32081
32082if test -n "$ALSA_CFLAGS"; then
32083    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32084 elif test -n "$PKG_CONFIG"; then
32085    if test -n "$PKG_CONFIG" && \
32086    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32087  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32088  ac_status=$?
32089  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32090  test $ac_status = 0; }; then
32091  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32092else
32093  pkg_failed=yes
32094fi
32095 else
32096    pkg_failed=untried
32097fi
32098if test -n "$ALSA_LIBS"; then
32099    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32100 elif test -n "$PKG_CONFIG"; then
32101    if test -n "$PKG_CONFIG" && \
32102    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32103  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32104  ac_status=$?
32105  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32106  test $ac_status = 0; }; then
32107  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32108else
32109  pkg_failed=yes
32110fi
32111 else
32112    pkg_failed=untried
32113fi
32114
32115
32116
32117if test $pkg_failed = yes; then
32118
32119if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32120        _pkg_short_errors_supported=yes
32121else
32122        _pkg_short_errors_supported=no
32123fi
32124        if test $_pkg_short_errors_supported = yes; then
32125	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32126        else
32127	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32128        fi
32129	# Put the nasty error message in config.log where it belongs
32130	echo "$ALSA_PKG_ERRORS" >&5
32131
32132	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32133$as_echo "no" >&6; }
32134                ALSA_FOUND=no
32135elif test $pkg_failed = untried; then
32136	ALSA_FOUND=no
32137else
32138	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32139	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32141$as_echo "yes" >&6; }
32142	ALSA_FOUND=yes
32143fi
32144	fi
32145	if test "x$ALSA_FOUND" = xno; then
32146	    for ac_header in alsa/asoundlib.h
32147do :
32148  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32149if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
32150  cat >>confdefs.h <<_ACEOF
32151#define HAVE_ALSA_ASOUNDLIB_H 1
32152_ACEOF
32153 ALSA_FOUND=yes
32154	                      ALSA_CFLAGS=-Iignoreme
32155	                      ALSA_LIBS=-lasound
32156	                      DEFAULT_ALSA=yes
32157else
32158  ALSA_FOUND=no
32159fi
32160
32161done
32162
32163	fi
32164	if test "x$ALSA_FOUND" = xno; then
32165
32166    # Print a helpful message on how to acquire the necessary build dependency.
32167    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32168    MISSING_DEPENDENCY=alsa
32169    PKGHANDLER_COMMAND=
32170
32171    case $PKGHANDLER in
32172	apt-get)
32173                apt_help     $MISSING_DEPENDENCY ;;
32174    yum)
32175                yum_help     $MISSING_DEPENDENCY ;;
32176	port)
32177                port_help    $MISSING_DEPENDENCY ;;
32178	pkgutil)
32179                pkgutil_help $MISSING_DEPENDENCY ;;
32180	pkgadd)
32181                pkgadd_help  $MISSING_DEPENDENCY ;;
32182    * )
32183      break ;;
32184    esac
32185
32186    if test "x$PKGHANDLER_COMMAND" != x; then
32187        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32188    fi
32189
32190	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32191	fi
32192fi
32193
32194
32195
32196
32197
32198
32199
32200###############################################################################
32201#
32202# Check for the jpeg library
32203#
32204
32205USE_EXTERNAL_LIBJPEG=true
32206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32207$as_echo_n "checking for main in -ljpeg... " >&6; }
32208if test "${ac_cv_lib_jpeg_main+set}" = set; then :
32209  $as_echo_n "(cached) " >&6
32210else
32211  ac_check_lib_save_LIBS=$LIBS
32212LIBS="-ljpeg  $LIBS"
32213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32214/* end confdefs.h.  */
32215
32216
32217int
32218main ()
32219{
32220return main ();
32221  ;
32222  return 0;
32223}
32224_ACEOF
32225if ac_fn_cxx_try_link "$LINENO"; then :
32226  ac_cv_lib_jpeg_main=yes
32227else
32228  ac_cv_lib_jpeg_main=no
32229fi
32230rm -f core conftest.err conftest.$ac_objext \
32231    conftest$ac_exeext conftest.$ac_ext
32232LIBS=$ac_check_lib_save_LIBS
32233fi
32234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32235$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32236if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
32237  cat >>confdefs.h <<_ACEOF
32238#define HAVE_LIBJPEG 1
32239_ACEOF
32240
32241  LIBS="-ljpeg $LIBS"
32242
32243else
32244   USE_EXTERNAL_LIBJPEG=false
32245               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32246$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32247
32248fi
32249
32250
32251
32252###############################################################################
32253#
32254# Check for the gif library
32255#
32256
32257
32258# Check whether --with-giflib was given.
32259if test "${with_giflib+set}" = set; then :
32260  withval=$with_giflib;
32261fi
32262
32263
32264
32265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32266$as_echo_n "checking for which giflib to use... " >&6; }
32267
32268# default is bundled
32269DEFAULT_GIFLIB=bundled
32270
32271#
32272# if user didn't specify, use DEFAULT_GIFLIB
32273#
32274if test "x${with_giflib}" = "x"; then
32275    with_giflib=${DEFAULT_GIFLIB}
32276fi
32277
32278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32279$as_echo "${with_giflib}" >&6; }
32280
32281if test "x${with_giflib}" = "xbundled"; then
32282    USE_EXTERNAL_LIBGIF=false
32283elif test "x${with_giflib}" = "xsystem"; then
32284    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32285if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
32286
32287else
32288   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32289fi
32290
32291
32292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32293$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32294if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
32295  $as_echo_n "(cached) " >&6
32296else
32297  ac_check_lib_save_LIBS=$LIBS
32298LIBS="-lgif  $LIBS"
32299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32300/* end confdefs.h.  */
32301
32302/* Override any GCC internal prototype to avoid an error.
32303   Use char because int might match the return type of a GCC
32304   builtin and then its argument prototype would still apply.  */
32305#ifdef __cplusplus
32306extern "C"
32307#endif
32308char DGifGetCode ();
32309int
32310main ()
32311{
32312return DGifGetCode ();
32313  ;
32314  return 0;
32315}
32316_ACEOF
32317if ac_fn_cxx_try_link "$LINENO"; then :
32318  ac_cv_lib_gif_DGifGetCode=yes
32319else
32320  ac_cv_lib_gif_DGifGetCode=no
32321fi
32322rm -f core conftest.err conftest.$ac_objext \
32323    conftest$ac_exeext conftest.$ac_ext
32324LIBS=$ac_check_lib_save_LIBS
32325fi
32326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32327$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32328if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32329  cat >>confdefs.h <<_ACEOF
32330#define HAVE_LIBGIF 1
32331_ACEOF
32332
32333  LIBS="-lgif $LIBS"
32334
32335else
32336   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32337fi
32338
32339
32340    USE_EXTERNAL_LIBGIF=true
32341else
32342    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32343fi
32344
32345
32346###############################################################################
32347#
32348# Check for the zlib library
32349#
32350
32351
32352# Check whether --with-zlib was given.
32353if test "${with_zlib+set}" = set; then :
32354  withval=$with_zlib;
32355fi
32356
32357
32358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32359$as_echo_n "checking for compress in -lz... " >&6; }
32360if test "${ac_cv_lib_z_compress+set}" = set; then :
32361  $as_echo_n "(cached) " >&6
32362else
32363  ac_check_lib_save_LIBS=$LIBS
32364LIBS="-lz  $LIBS"
32365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32366/* end confdefs.h.  */
32367
32368/* Override any GCC internal prototype to avoid an error.
32369   Use char because int might match the return type of a GCC
32370   builtin and then its argument prototype would still apply.  */
32371#ifdef __cplusplus
32372extern "C"
32373#endif
32374char compress ();
32375int
32376main ()
32377{
32378return compress ();
32379  ;
32380  return 0;
32381}
32382_ACEOF
32383if ac_fn_cxx_try_link "$LINENO"; then :
32384  ac_cv_lib_z_compress=yes
32385else
32386  ac_cv_lib_z_compress=no
32387fi
32388rm -f core conftest.err conftest.$ac_objext \
32389    conftest$ac_exeext conftest.$ac_ext
32390LIBS=$ac_check_lib_save_LIBS
32391fi
32392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32393$as_echo "$ac_cv_lib_z_compress" >&6; }
32394if test "x$ac_cv_lib_z_compress" = x""yes; then :
32395   ZLIB_FOUND=yes
32396else
32397   ZLIB_FOUND=no
32398fi
32399
32400
32401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32402$as_echo_n "checking for which zlib to use... " >&6; }
32403
32404DEFAULT_ZLIB=bundled
32405if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32406#
32407# On macosx default is system...on others default is
32408#
32409    DEFAULT_ZLIB=system
32410fi
32411
32412if test "x${ZLIB_FOUND}" != "xyes"; then
32413#
32414# If we don't find any system...set default to bundled
32415#
32416    DEFAULT_ZLIB=bundled
32417fi
32418
32419#
32420# If user didn't specify, use DEFAULT_ZLIB
32421#
32422if test "x${with_zlib}" = "x"; then
32423    with_zlib=${DEFAULT_ZLIB}
32424fi
32425
32426if test "x${with_zlib}" = "xbundled"; then
32427    USE_EXTERNAL_LIBZ=false
32428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32429$as_echo "bundled" >&6; }
32430elif test "x${with_zlib}" = "xsystem"; then
32431    if test "x${ZLIB_FOUND}" = "xyes"; then
32432        USE_EXTERNAL_LIBZ=true
32433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32434$as_echo "system" >&6; }
32435    else
32436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32437$as_echo "system not found" >&6; }
32438        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32439    fi
32440else
32441    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32442fi
32443
32444
32445
32446###############################################################################
32447LIBZIP_CAN_USE_MMAP=true
32448
32449
32450
32451###############################################################################
32452#
32453# Check if altzone exists in time.h
32454#
32455
32456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32457/* end confdefs.h.  */
32458#include <time.h>
32459int
32460main ()
32461{
32462return (int)altzone;
32463  ;
32464  return 0;
32465}
32466_ACEOF
32467if ac_fn_cxx_try_link "$LINENO"; then :
32468  has_altzone=yes
32469else
32470  has_altzone=no
32471fi
32472rm -f core conftest.err conftest.$ac_objext \
32473    conftest$ac_exeext conftest.$ac_ext
32474if test "x$has_altzone" = xyes; then
32475
32476$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32477
32478fi
32479
32480###############################################################################
32481#
32482# Check the maths library
32483#
32484
32485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32486$as_echo_n "checking for cos in -lm... " >&6; }
32487if test "${ac_cv_lib_m_cos+set}" = set; then :
32488  $as_echo_n "(cached) " >&6
32489else
32490  ac_check_lib_save_LIBS=$LIBS
32491LIBS="-lm  $LIBS"
32492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32493/* end confdefs.h.  */
32494
32495/* Override any GCC internal prototype to avoid an error.
32496   Use char because int might match the return type of a GCC
32497   builtin and then its argument prototype would still apply.  */
32498#ifdef __cplusplus
32499extern "C"
32500#endif
32501char cos ();
32502int
32503main ()
32504{
32505return cos ();
32506  ;
32507  return 0;
32508}
32509_ACEOF
32510if ac_fn_cxx_try_link "$LINENO"; then :
32511  ac_cv_lib_m_cos=yes
32512else
32513  ac_cv_lib_m_cos=no
32514fi
32515rm -f core conftest.err conftest.$ac_objext \
32516    conftest$ac_exeext conftest.$ac_ext
32517LIBS=$ac_check_lib_save_LIBS
32518fi
32519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32520$as_echo "$ac_cv_lib_m_cos" >&6; }
32521if test "x$ac_cv_lib_m_cos" = x""yes; then :
32522  cat >>confdefs.h <<_ACEOF
32523#define HAVE_LIBM 1
32524_ACEOF
32525
32526  LIBS="-lm $LIBS"
32527
32528else
32529
32530                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32531$as_echo "$as_me: Maths library was not found" >&6;}
32532
32533fi
32534
32535
32536
32537###############################################################################
32538#
32539# Check for libdl.so
32540
32541save_LIBS="$LIBS"
32542LIBS=""
32543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32544$as_echo_n "checking for dlopen in -ldl... " >&6; }
32545if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32546  $as_echo_n "(cached) " >&6
32547else
32548  ac_check_lib_save_LIBS=$LIBS
32549LIBS="-ldl  $LIBS"
32550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32551/* end confdefs.h.  */
32552
32553/* Override any GCC internal prototype to avoid an error.
32554   Use char because int might match the return type of a GCC
32555   builtin and then its argument prototype would still apply.  */
32556#ifdef __cplusplus
32557extern "C"
32558#endif
32559char dlopen ();
32560int
32561main ()
32562{
32563return dlopen ();
32564  ;
32565  return 0;
32566}
32567_ACEOF
32568if ac_fn_cxx_try_link "$LINENO"; then :
32569  ac_cv_lib_dl_dlopen=yes
32570else
32571  ac_cv_lib_dl_dlopen=no
32572fi
32573rm -f core conftest.err conftest.$ac_objext \
32574    conftest$ac_exeext conftest.$ac_ext
32575LIBS=$ac_check_lib_save_LIBS
32576fi
32577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32578$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32579if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32580  cat >>confdefs.h <<_ACEOF
32581#define HAVE_LIBDL 1
32582_ACEOF
32583
32584  LIBS="-ldl $LIBS"
32585
32586fi
32587
32588LIBDL="$LIBS"
32589
32590LIBS="$save_LIBS"
32591
32592
32593
32594###############################################################################
32595#
32596# statically link libstdc++ before C++ ABI is stablized on Linux unless
32597# dynamic build is configured on command line.
32598#
32599
32600# Check whether --with-stdc++lib was given.
32601if test "${with_stdc__lib+set}" = set; then :
32602  withval=$with_stdc__lib;
32603    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32604        && test "x$with_stdc__lib" != xdefault; then
32605      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32606    fi
32607
32608else
32609  with_stdc__lib=default
32610
32611fi
32612
32613
32614if test "x$OPENJDK_TARGET_OS" = xlinux; then
32615    # Test if -lstdc++ works.
32616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32617$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32618    ac_ext=cpp
32619ac_cpp='$CXXCPP $CPPFLAGS'
32620ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32621ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32622ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32623
32624    OLD_CXXFLAGS="$CXXFLAGS"
32625    CXXFLAGS="$CXXFLAGS -lstdc++"
32626    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32627/* end confdefs.h.  */
32628
32629int
32630main ()
32631{
32632return 0;
32633  ;
32634  return 0;
32635}
32636_ACEOF
32637if ac_fn_cxx_try_link "$LINENO"; then :
32638  has_dynamic_libstdcxx=yes
32639else
32640  has_dynamic_libstdcxx=no
32641fi
32642rm -f core conftest.err conftest.$ac_objext \
32643    conftest$ac_exeext conftest.$ac_ext
32644    CXXFLAGS="$OLD_CXXFLAGS"
32645    ac_ext=cpp
32646ac_cpp='$CXXCPP $CPPFLAGS'
32647ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32648ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32649ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32650
32651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32652$as_echo "$has_dynamic_libstdcxx" >&6; }
32653
32654    # Test if stdc++ can be linked statically.
32655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32656$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32657    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32658    ac_ext=cpp
32659ac_cpp='$CXXCPP $CPPFLAGS'
32660ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32661ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32662ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32663
32664    OLD_LIBS="$LIBS"
32665    OLD_CXX="$CXX"
32666    LIBS="$STATIC_STDCXX_FLAGS"
32667    CXX="$CC"
32668    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32669/* end confdefs.h.  */
32670
32671int
32672main ()
32673{
32674return 0;
32675  ;
32676  return 0;
32677}
32678_ACEOF
32679if ac_fn_cxx_try_link "$LINENO"; then :
32680  has_static_libstdcxx=yes
32681else
32682  has_static_libstdcxx=no
32683fi
32684rm -f core conftest.err conftest.$ac_objext \
32685    conftest$ac_exeext conftest.$ac_ext
32686    LIBS="$OLD_LIBS"
32687    CXX="$OLD_CXX"
32688    ac_ext=cpp
32689ac_cpp='$CXXCPP $CPPFLAGS'
32690ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32691ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32692ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32693
32694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32695$as_echo "$has_static_libstdcxx" >&6; }
32696
32697    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32698        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32699    fi
32700
32701    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32702        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32703    fi
32704
32705    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32706        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32707    fi
32708
32709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32710$as_echo_n "checking how to link with libstdc++... " >&6; }
32711    # If dynamic was requested, it's available since it would fail above otherwise.
32712    # If dynamic wasn't requested, go with static unless it isn't available.
32713    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32714        LIBCXX="$LIBCXX -lstdc++"
32715        LDCXX="$CXX"
32716        STATIC_CXX_SETTING="STATIC_CXX=false"
32717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32718$as_echo "dynamic" >&6; }
32719    else
32720        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32721        LDCXX="$CC"
32722        STATIC_CXX_SETTING="STATIC_CXX=true"
32723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32724$as_echo "static" >&6; }
32725    fi
32726fi
32727
32728
32729if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32730    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32731
32732pkg_failed=no
32733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32734$as_echo_n "checking for LIBFFI... " >&6; }
32735
32736if test -n "$LIBFFI_CFLAGS"; then
32737    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32738 elif test -n "$PKG_CONFIG"; then
32739    if test -n "$PKG_CONFIG" && \
32740    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32741  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32742  ac_status=$?
32743  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32744  test $ac_status = 0; }; then
32745  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32746else
32747  pkg_failed=yes
32748fi
32749 else
32750    pkg_failed=untried
32751fi
32752if test -n "$LIBFFI_LIBS"; then
32753    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32754 elif test -n "$PKG_CONFIG"; then
32755    if test -n "$PKG_CONFIG" && \
32756    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32757  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32758  ac_status=$?
32759  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32760  test $ac_status = 0; }; then
32761  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32762else
32763  pkg_failed=yes
32764fi
32765 else
32766    pkg_failed=untried
32767fi
32768
32769
32770
32771if test $pkg_failed = yes; then
32772
32773if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32774        _pkg_short_errors_supported=yes
32775else
32776        _pkg_short_errors_supported=no
32777fi
32778        if test $_pkg_short_errors_supported = yes; then
32779	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32780        else
32781	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32782        fi
32783	# Put the nasty error message in config.log where it belongs
32784	echo "$LIBFFI_PKG_ERRORS" >&5
32785
32786	as_fn_error $? "Package requirements (libffi) were not met:
32787
32788$LIBFFI_PKG_ERRORS
32789
32790Consider adjusting the PKG_CONFIG_PATH environment variable if you
32791installed software in a non-standard prefix.
32792
32793Alternatively, you may set the environment variables LIBFFI_CFLAGS
32794and LIBFFI_LIBS to avoid the need to call pkg-config.
32795See the pkg-config man page for more details.
32796" "$LINENO" 5
32797elif test $pkg_failed = untried; then
32798	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32800as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32801is in your PATH or set the PKG_CONFIG environment variable to the full
32802path to pkg-config.
32803
32804Alternatively, you may set the environment variables LIBFFI_CFLAGS
32805and LIBFFI_LIBS to avoid the need to call pkg-config.
32806See the pkg-config man page for more details.
32807
32808To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32809See \`config.log' for more details" "$LINENO" 5; }
32810else
32811	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32812	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32814$as_echo "yes" >&6; }
32815	:
32816fi
32817
32818fi
32819
32820if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32821    # Extract the first word of "llvm-config", so it can be a program name with args.
32822set dummy llvm-config; ac_word=$2
32823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32824$as_echo_n "checking for $ac_word... " >&6; }
32825if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32826  $as_echo_n "(cached) " >&6
32827else
32828  if test -n "$LLVM_CONFIG"; then
32829  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32830else
32831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32832for as_dir in $PATH
32833do
32834  IFS=$as_save_IFS
32835  test -z "$as_dir" && as_dir=.
32836    for ac_exec_ext in '' $ac_executable_extensions; do
32837  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32838    ac_cv_prog_LLVM_CONFIG="llvm-config"
32839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32840    break 2
32841  fi
32842done
32843  done
32844IFS=$as_save_IFS
32845
32846fi
32847fi
32848LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32849if test -n "$LLVM_CONFIG"; then
32850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32851$as_echo "$LLVM_CONFIG" >&6; }
32852else
32853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32854$as_echo "no" >&6; }
32855fi
32856
32857
32858
32859    if test "x$LLVM_CONFIG" != xllvm-config; then
32860        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32861    fi
32862
32863    llvm_components="jit mcjit engine nativecodegen native"
32864    unset LLVM_CFLAGS
32865    for flag in $("$LLVM_CONFIG" --cxxflags); do
32866      if echo "${flag}" | grep -q '^-[ID]'; then
32867        if test "${flag}" != "-D_DEBUG" ; then
32868          if test "${LLVM_CFLAGS}" != "" ; then
32869            LLVM_CFLAGS="${LLVM_CFLAGS} "
32870          fi
32871          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32872        fi
32873      fi
32874    done
32875    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32876    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32877
32878    unset LLVM_LDFLAGS
32879    for flag in $("${LLVM_CONFIG}" --ldflags); do
32880      if echo "${flag}" | grep -q '^-L'; then
32881        if test "${LLVM_LDFLAGS}" != ""; then
32882          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32883        fi
32884        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32885      fi
32886    done
32887
32888    unset LLVM_LIBS
32889    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32890      if echo "${flag}" | grep -q '^-l'; then
32891        if test "${LLVM_LIBS}" != ""; then
32892          LLVM_LIBS="${LLVM_LIBS} "
32893        fi
32894        LLVM_LIBS="${LLVM_LIBS}${flag}"
32895      fi
32896    done
32897
32898
32899
32900
32901fi
32902
32903# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32904if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32905    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32906fi
32907
32908# TODO better (platform agnostic) test
32909if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32910    LIBCXX="-lstdc++"
32911fi
32912
32913
32914
32915
32916
32917# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32918
32919# When using cygwin or msys, we need a wrapper binary that renames
32920# /cygdrive/c/ arguments into c:/ arguments and peeks into
32921# @files and rewrites these too! This wrapper binary is
32922# called fixpath.
32923FIXPATH=
32924if test "x$OPENJDK_BUILD_OS" = xwindows; then
32925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32926$as_echo_n "checking if fixpath can be created... " >&6; }
32927    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32928    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32929    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32930      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32931      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32932      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32933      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32934    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32935      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32936      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32937
32938      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32939      # @ was chosen as separator to minimize risk of other tools messing around with it
32940      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32941      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32942
32943      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32944    fi
32945    rm -f $OUTPUT_ROOT/fixpath*
32946    cd $OUTPUT_ROOT
32947    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32948    cd $CURDIR
32949
32950    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32952$as_echo "no" >&6; }
32953        cat $OUTPUT_ROOT/fixpath1.log
32954        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32955    fi
32956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32957$as_echo "yes" >&6; }
32958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32959$as_echo_n "checking if fixpath.exe works... " >&6; }
32960    cd $OUTPUT_ROOT
32961    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32962    cd $CURDIR
32963    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32965$as_echo "no" >&6; }
32966        cat $OUTPUT_ROOT/fixpath2.log
32967        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32968    fi
32969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32970$as_echo "yes" >&6; }
32971    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32972fi
32973
32974
32975
32976
32977###############################################################################
32978#
32979# We need to do some final tweaking, when everything else is done.
32980#
32981###############################################################################
32982
32983
32984HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32985
32986
32987# The name of the Service Agent jar.
32988SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32989if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32990  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32991fi
32992
32993
32994
32995
32996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32997$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32998
32999if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
33000    ENABLE_INTREE_EC=yes
33001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33002$as_echo "yes" >&6; }
33003else
33004    ENABLE_INTREE_EC=no
33005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33006$as_echo "no" >&6; }
33007fi
33008
33009
33010
33011
33012###############################################################################
33013#
33014# Configure parts of the build that only affect the build performance,
33015# not the result.
33016#
33017###############################################################################
33018
33019
33020  # How many cores do we have on this build system?
33021
33022# Check whether --with-num-cores was given.
33023if test "${with_num_cores+set}" = set; then :
33024  withval=$with_num_cores;
33025fi
33026
33027  if test "x$with_num_cores" = x; then
33028    # The number of cores were not specified, try to probe them.
33029
33030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
33031$as_echo_n "checking for number of cores... " >&6; }
33032    NUM_CORES=1
33033    FOUND_CORES=no
33034
33035    if test -f /proc/cpuinfo; then
33036        # Looks like a Linux (or cygwin) system
33037        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33038        FOUND_CORES=yes
33039    elif test -x /usr/sbin/psrinfo; then
33040        # Looks like a Solaris system
33041        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33042        FOUND_CORES=yes
33043    elif test -x /usr/sbin/system_profiler; then
33044        # Looks like a MacOSX system
33045        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33046        FOUND_CORES=yes
33047    elif test -n "$NUMBER_OF_PROCESSORS"; then
33048        # On windows, look in the env
33049        NUM_CORES=$NUMBER_OF_PROCESSORS
33050        FOUND_CORES=yes
33051    fi
33052
33053    if test "x$FOUND_CORES" = xyes; then
33054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
33055$as_echo "$NUM_CORES" >&6; }
33056    else
33057        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
33058$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
33060$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33061    fi
33062
33063
33064  else
33065    NUM_CORES=$with_num_cores
33066  fi
33067
33068
33069
33070  # How much memory do we have on this build system?
33071
33072# Check whether --with-memory-size was given.
33073if test "${with_memory_size+set}" = set; then :
33074  withval=$with_memory_size;
33075fi
33076
33077  if test "x$with_memory_size" = x; then
33078    # The memory size was not specified, try to probe it.
33079
33080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33081$as_echo_n "checking for memory size... " >&6; }
33082    # Default to 1024 MB
33083    MEMORY_SIZE=1024
33084    FOUND_MEM=no
33085
33086    if test -f /proc/meminfo; then
33087        # Looks like a Linux (or cygwin) system
33088        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33089        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33090        FOUND_MEM=yes
33091    elif test -x /usr/sbin/prtconf; then
33092        # Looks like a Solaris system
33093        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33094        FOUND_MEM=yes
33095    elif test -x /usr/sbin/system_profiler; then
33096        # Looks like a MacOSX system
33097        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33098        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33099        FOUND_MEM=yes
33100    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33101        # Windows, but without cygwin
33102        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33103        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33104        FOUND_MEM=yes
33105    fi
33106
33107    if test "x$FOUND_MEM" = xyes; then
33108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33109$as_echo "$MEMORY_SIZE MB" >&6; }
33110    else
33111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33112$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33114$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33115    fi
33116
33117  else
33118    MEMORY_SIZE=$with_memory_size
33119  fi
33120
33121
33122
33123  # Provide a decent default number of parallel jobs for make depending on
33124  # number of cores, amount of memory and machine architecture.
33125
33126# Check whether --with-jobs was given.
33127if test "${with_jobs+set}" = set; then :
33128  withval=$with_jobs;
33129fi
33130
33131  if test "x$with_jobs" = x; then
33132    # Number of jobs was not specified, calculate.
33133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33134$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33135    # Approximate memory in GB, rounding up a bit.
33136    memory_gb=`expr $MEMORY_SIZE / 1100`
33137    # Pick the lowest of memory in gb and number of cores.
33138    if test "$memory_gb" -lt "$NUM_CORES"; then
33139      JOBS="$memory_gb"
33140    else
33141      JOBS="$NUM_CORES"
33142      # On bigger machines, leave some room for other processes to run
33143      if test "$JOBS" -gt "4"; then
33144        JOBS=`expr $JOBS '*' 90 / 100`
33145      fi
33146    fi
33147    # Cap number of jobs to 16
33148    if test "$JOBS" -gt "16"; then
33149      JOBS=16
33150    fi
33151    if test "$JOBS" -eq "0"; then
33152      JOBS=1
33153    fi
33154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33155$as_echo "$JOBS" >&6; }
33156  else
33157    JOBS=$with_jobs
33158  fi
33159
33160
33161
33162# Setup smart javac (after cores and memory have been setup)
33163
33164
33165# Check whether --with-sjavac-server-java was given.
33166if test "${with_sjavac_server_java+set}" = set; then :
33167  withval=$with_sjavac_server_java;
33168fi
33169
33170
33171if test "x$with_sjavac_server_java" != x; then
33172    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33173    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33174    if test "x$FOUND_VERSION" = x; then
33175        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33176    fi
33177else
33178    SJAVAC_SERVER_JAVA=""
33179    # Hotspot specific options.
33180
33181    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33182    $ECHO "Command: $JAVA -verbosegc -version" >&5
33183    OUTPUT=`$JAVA -verbosegc -version 2>&1`
33184    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33185    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33186    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33187        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33188	JVM_ARG_OK=true
33189    else
33190	$ECHO "Arg failed:" >&5
33191	$ECHO "$OUTPUT" >&5
33192	JVM_ARG_OK=false
33193    fi
33194
33195    # JRockit specific options.
33196
33197    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33198    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33199    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33200    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33201    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33202    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33203        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33204	JVM_ARG_OK=true
33205    else
33206	$ECHO "Arg failed:" >&5
33207	$ECHO "$OUTPUT" >&5
33208	JVM_ARG_OK=false
33209    fi
33210
33211    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33212fi
33213
33214
33215if test "$MEMORY_SIZE" -gt "2500"; then
33216
33217    $ECHO "Check if jvm arg is ok: -d64" >&5
33218    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33219    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33220    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33221    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33222    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33223        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33224	JVM_ARG_OK=true
33225    else
33226	$ECHO "Arg failed:" >&5
33227	$ECHO "$OUTPUT" >&5
33228	JVM_ARG_OK=false
33229    fi
33230
33231    if test "$JVM_ARG_OK" = true; then
33232        JVM_64BIT=true
33233	JVM_ARG_OK=false
33234    fi
33235    fi
33236
33237if test "$JVM_64BIT" = true; then
33238    if test "$MEMORY_SIZE" -gt "17000"; then
33239
33240    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33241    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33242    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33243    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33244    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33245    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33246        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33247	JVM_ARG_OK=true
33248    else
33249	$ECHO "Arg failed:" >&5
33250	$ECHO "$OUTPUT" >&5
33251	JVM_ARG_OK=false
33252    fi
33253
33254    fi
33255    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33256
33257    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33258    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33259    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33260    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33261    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33262    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33263        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33264	JVM_ARG_OK=true
33265    else
33266	$ECHO "Arg failed:" >&5
33267	$ECHO "$OUTPUT" >&5
33268	JVM_ARG_OK=false
33269    fi
33270
33271    fi
33272    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33273
33274    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33275    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33276    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33277    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33278    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33279    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33280        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33281	JVM_ARG_OK=true
33282    else
33283	$ECHO "Arg failed:" >&5
33284	$ECHO "$OUTPUT" >&5
33285	JVM_ARG_OK=false
33286    fi
33287
33288    fi
33289    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33290
33291    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33292    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33293    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33294    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33295    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33296    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33297        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33298	JVM_ARG_OK=true
33299    else
33300	$ECHO "Arg failed:" >&5
33301	$ECHO "$OUTPUT" >&5
33302	JVM_ARG_OK=false
33303    fi
33304
33305    fi
33306fi
33307if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33308
33309    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33310    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33311    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33312    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33313    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33314    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33315        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33316	JVM_ARG_OK=true
33317    else
33318	$ECHO "Arg failed:" >&5
33319	$ECHO "$OUTPUT" >&5
33320	JVM_ARG_OK=false
33321    fi
33322
33323fi
33324if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33325
33326    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33327    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33328    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33329    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33330    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33331    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33332        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33333	JVM_ARG_OK=true
33334    else
33335	$ECHO "Arg failed:" >&5
33336	$ECHO "$OUTPUT" >&5
33337	JVM_ARG_OK=false
33338    fi
33339
33340fi
33341if test "$JVM_ARG_OK" = false; then
33342
33343    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33344    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33345    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33346    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33347    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33348    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33349        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33350	JVM_ARG_OK=true
33351    else
33352	$ECHO "Arg failed:" >&5
33353	$ECHO "$OUTPUT" >&5
33354	JVM_ARG_OK=false
33355    fi
33356
33357fi
33358
33359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33360$as_echo_n "checking whether to use sjavac... " >&6; }
33361# Check whether --enable-sjavac was given.
33362if test "${enable_sjavac+set}" = set; then :
33363  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33364else
33365  ENABLE_SJAVAC='no'
33366fi
33367
33368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33369$as_echo "$ENABLE_SJAVAC" >&6; }
33370
33371
33372if test "x$ENABLE_SJAVAC" = xyes; then
33373    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33374else
33375    SJAVAC_SERVER_DIR=
33376fi
33377
33378
33379
33380
33381# Can the C/C++ compiler use precompiled headers?
33382
33383
33384###############################################################################
33385#
33386# Can the C/C++ compiler use precompiled headers?
33387#
33388# Check whether --enable-precompiled-headers was given.
33389if test "${enable_precompiled_headers+set}" = set; then :
33390  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33391else
33392  ENABLE_PRECOMPH=yes
33393fi
33394
33395
33396USE_PRECOMPILED_HEADER=1
33397if test "x$ENABLE_PRECOMPH" = xno; then
33398    USE_PRECOMPILED_HEADER=0
33399fi
33400
33401if test "x$ENABLE_PRECOMPH" = xyes; then
33402    # Check that the compiler actually supports precomp headers.
33403    if test "x$GCC" = xyes; then
33404         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33405$as_echo_n "checking that precompiled headers work... " >&6; }
33406         echo "int alfa();" > conftest.h
33407         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33408         if test ! -f conftest.hpp.gch; then
33409             USE_PRECOMPILED_HEADER=0
33410             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33411$as_echo "no" >&6; }
33412         else
33413             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33414$as_echo "yes" >&6; }
33415         fi
33416         rm -f conftest.h conftest.hpp.gch
33417    fi
33418fi
33419
33420
33421
33422
33423# Setup use of ccache, if available
33424
33425    # Check whether --enable-ccache was given.
33426if test "${enable_ccache+set}" = set; then :
33427  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33428else
33429  ENABLE_CCACHE=yes
33430fi
33431
33432    if test "x$ENABLE_CCACHE" = xyes; then
33433        OLD_PATH="$PATH"
33434        if test "x$TOOLS_DIR" != x; then
33435          PATH=$TOOLS_DIR:$PATH
33436        fi
33437        # Extract the first word of "ccache", so it can be a program name with args.
33438set dummy ccache; ac_word=$2
33439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33440$as_echo_n "checking for $ac_word... " >&6; }
33441if test "${ac_cv_path_CCACHE+set}" = set; then :
33442  $as_echo_n "(cached) " >&6
33443else
33444  case $CCACHE in
33445  [\\/]* | ?:[\\/]*)
33446  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33447  ;;
33448  *)
33449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33450for as_dir in $PATH
33451do
33452  IFS=$as_save_IFS
33453  test -z "$as_dir" && as_dir=.
33454    for ac_exec_ext in '' $ac_executable_extensions; do
33455  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33456    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33458    break 2
33459  fi
33460done
33461  done
33462IFS=$as_save_IFS
33463
33464  ;;
33465esac
33466fi
33467CCACHE=$ac_cv_path_CCACHE
33468if test -n "$CCACHE"; then
33469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33470$as_echo "$CCACHE" >&6; }
33471else
33472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33473$as_echo "no" >&6; }
33474fi
33475
33476
33477        PATH="$OLD_PATH"
33478    else
33479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33480$as_echo_n "checking for ccache... " >&6; }
33481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33482$as_echo "explicitly disabled" >&6; }
33483        CCACHE=
33484    fi
33485
33486
33487
33488# Check whether --with-ccache-dir was given.
33489if test "${with_ccache_dir+set}" = set; then :
33490  withval=$with_ccache_dir;
33491fi
33492
33493
33494    if test "x$with_ccache_dir" != x; then
33495        # When using a non home ccache directory, assume the use is to share ccache files
33496        # with other users. Thus change the umask.
33497        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33498    fi
33499    CCACHE_FOUND=""
33500    if test "x$CCACHE" != x; then
33501
33502    if test "x$CCACHE" != x; then
33503        CCACHE_FOUND="true"
33504        # Only use ccache if it is 3.1.4 or later, which supports
33505        # precompiled headers.
33506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33507$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33508        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33509        if test "x$HAS_GOOD_CCACHE" = x; then
33510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33511$as_echo "no, disabling ccache" >&6; }
33512            CCACHE=
33513        else
33514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33515$as_echo "yes" >&6; }
33516            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33517$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33518            PUSHED_FLAGS="$CXXFLAGS"
33519            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33520            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33521/* end confdefs.h.  */
33522
33523int
33524main ()
33525{
33526
33527  ;
33528  return 0;
33529}
33530_ACEOF
33531if ac_fn_cxx_try_compile "$LINENO"; then :
33532  CC_KNOWS_CCACHE_TRICK=yes
33533else
33534  CC_KNOWS_CCACHE_TRICK=no
33535fi
33536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33537            CXXFLAGS="$PUSHED_FLAGS"
33538            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33539                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33540$as_echo "yes" >&6; }
33541            else
33542                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33543$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33544                CCACHE=
33545            fi
33546        fi
33547    fi
33548
33549    if test "x$CCACHE" != x; then
33550        CCACHE_SLOPPINESS=time_macros
33551        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33552        CCACHE_FLAGS=-fpch-preprocess
33553
33554        if test "x$SET_CCACHE_DIR" != x; then
33555            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33556	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33557        fi
33558    fi
33559
33560    fi
33561
33562
33563###############################################################################
33564#
33565# And now the finish...
33566#
33567###############################################################################
33568
33569# Check for some common pitfalls
33570
33571  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33572    file_to_test="$SRC_ROOT/LICENSE"
33573    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33574      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
33575    fi
33576  fi
33577
33578
33579
33580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33581$as_echo_n "checking if build directory is on local disk... " >&6; }
33582
33583	# df -l lists only local disks; if the given directory is not found then
33584	# a non-zero exit code is given
33585  if test "x$DF" = x; then
33586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33587      # msys does not have df; use Windows "net use" instead.
33588      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33589      if test "x$IS_NETWORK_DISK" = x; then
33590        OUTPUT_DIR_IS_LOCAL="yes"
33591      else
33592        OUTPUT_DIR_IS_LOCAL="no"
33593      fi
33594    else
33595      # No df here, say it's local
33596      OUTPUT_DIR_IS_LOCAL="yes"
33597    fi
33598  else
33599    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33600      OUTPUT_DIR_IS_LOCAL="yes"
33601    else
33602      OUTPUT_DIR_IS_LOCAL="no"
33603    fi
33604  fi
33605
33606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33607$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33608
33609
33610
33611# Check if the user has any old-style ALT_ variables set.
33612FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33613
33614# Before generating output files, test if they exist. If they do, this is a reconfigure.
33615# Since we can't properly handle the dependencies for this, warn the user about the situation
33616if test -e $OUTPUT_ROOT/spec.gmk; then
33617  IS_RECONFIGURE=yes
33618else
33619  IS_RECONFIGURE=no
33620fi
33621
33622if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33623  HIDE_PERFORMANCE_HINTS=yes
33624else
33625  HIDE_PERFORMANCE_HINTS=no
33626  # Hide it the next time around...
33627  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33628fi
33629
33630
33631
33632# At the end, call the custom hook. (Dummy macro if no custom sources available)
33633
33634
33635# We're messing a bit with internal autoconf variables to put the config.status
33636# in the output directory instead of the current directory.
33637CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33638# Create the actual output files. Now the main work of configure is done.
33639cat >confcache <<\_ACEOF
33640# This file is a shell script that caches the results of configure
33641# tests run on this system so they can be shared between configure
33642# scripts and configure runs, see configure's option --config-cache.
33643# It is not useful on other systems.  If it contains results you don't
33644# want to keep, you may remove or edit it.
33645#
33646# config.status only pays attention to the cache file if you give it
33647# the --recheck option to rerun configure.
33648#
33649# `ac_cv_env_foo' variables (set or unset) will be overridden when
33650# loading this file, other *unset* `ac_cv_foo' will be assigned the
33651# following values.
33652
33653_ACEOF
33654
33655# The following way of writing the cache mishandles newlines in values,
33656# but we know of no workaround that is simple, portable, and efficient.
33657# So, we kill variables containing newlines.
33658# Ultrix sh set writes to stderr and can't be redirected directly,
33659# and sets the high bit in the cache file unless we assign to the vars.
33660(
33661  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33662    eval ac_val=\$$ac_var
33663    case $ac_val in #(
33664    *${as_nl}*)
33665      case $ac_var in #(
33666      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33667$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33668      esac
33669      case $ac_var in #(
33670      _ | IFS | as_nl) ;; #(
33671      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33672      *) { eval $ac_var=; unset $ac_var;} ;;
33673      esac ;;
33674    esac
33675  done
33676
33677  (set) 2>&1 |
33678    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33679    *${as_nl}ac_space=\ *)
33680      # `set' does not quote correctly, so add quotes: double-quote
33681      # substitution turns \\\\ into \\, and sed turns \\ into \.
33682      sed -n \
33683	"s/'/'\\\\''/g;
33684	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33685      ;; #(
33686    *)
33687      # `set' quotes correctly as required by POSIX, so do not add quotes.
33688      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33689      ;;
33690    esac |
33691    sort
33692) |
33693  sed '
33694     /^ac_cv_env_/b end
33695     t clear
33696     :clear
33697     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33698     t end
33699     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33700     :end' >>confcache
33701if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33702  if test -w "$cache_file"; then
33703    test "x$cache_file" != "x/dev/null" &&
33704      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33705$as_echo "$as_me: updating cache $cache_file" >&6;}
33706    cat confcache >$cache_file
33707  else
33708    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33709$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33710  fi
33711fi
33712rm -f confcache
33713
33714test "x$prefix" = xNONE && prefix=$ac_default_prefix
33715# Let make expand exec_prefix.
33716test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33717
33718DEFS=-DHAVE_CONFIG_H
33719
33720ac_libobjs=
33721ac_ltlibobjs=
33722U=
33723for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33724  # 1. Remove the extension, and $U if already installed.
33725  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33726  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33727  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33728  #    will be set to the directory where LIBOBJS objects are built.
33729  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33730  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33731done
33732LIBOBJS=$ac_libobjs
33733
33734LTLIBOBJS=$ac_ltlibobjs
33735
33736
33737
33738: ${CONFIG_STATUS=./config.status}
33739ac_write_fail=0
33740ac_clean_files_save=$ac_clean_files
33741ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33742{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33743$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33744as_write_fail=0
33745cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33746#! $SHELL
33747# Generated by $as_me.
33748# Run this file to recreate the current configuration.
33749# Compiler output produced by configure, useful for debugging
33750# configure, is in config.log if it exists.
33751
33752debug=false
33753ac_cs_recheck=false
33754ac_cs_silent=false
33755
33756SHELL=\${CONFIG_SHELL-$SHELL}
33757export SHELL
33758_ASEOF
33759cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33760## -------------------- ##
33761## M4sh Initialization. ##
33762## -------------------- ##
33763
33764# Be more Bourne compatible
33765DUALCASE=1; export DUALCASE # for MKS sh
33766if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33767  emulate sh
33768  NULLCMD=:
33769  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33770  # is contrary to our usage.  Disable this feature.
33771  alias -g '${1+"$@"}'='"$@"'
33772  setopt NO_GLOB_SUBST
33773else
33774  case `(set -o) 2>/dev/null` in #(
33775  *posix*) :
33776    set -o posix ;; #(
33777  *) :
33778     ;;
33779esac
33780fi
33781
33782
33783as_nl='
33784'
33785export as_nl
33786# Printing a long string crashes Solaris 7 /usr/bin/printf.
33787as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33788as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33789as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33790# Prefer a ksh shell builtin over an external printf program on Solaris,
33791# but without wasting forks for bash or zsh.
33792if test -z "$BASH_VERSION$ZSH_VERSION" \
33793    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33794  as_echo='print -r --'
33795  as_echo_n='print -rn --'
33796elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33797  as_echo='printf %s\n'
33798  as_echo_n='printf %s'
33799else
33800  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33801    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33802    as_echo_n='/usr/ucb/echo -n'
33803  else
33804    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33805    as_echo_n_body='eval
33806      arg=$1;
33807      case $arg in #(
33808      *"$as_nl"*)
33809	expr "X$arg" : "X\\(.*\\)$as_nl";
33810	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33811      esac;
33812      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33813    '
33814    export as_echo_n_body
33815    as_echo_n='sh -c $as_echo_n_body as_echo'
33816  fi
33817  export as_echo_body
33818  as_echo='sh -c $as_echo_body as_echo'
33819fi
33820
33821# The user is always right.
33822if test "${PATH_SEPARATOR+set}" != set; then
33823  PATH_SEPARATOR=:
33824  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33825    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33826      PATH_SEPARATOR=';'
33827  }
33828fi
33829
33830
33831# IFS
33832# We need space, tab and new line, in precisely that order.  Quoting is
33833# there to prevent editors from complaining about space-tab.
33834# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33835# splitting by setting IFS to empty value.)
33836IFS=" ""	$as_nl"
33837
33838# Find who we are.  Look in the path if we contain no directory separator.
33839case $0 in #((
33840  *[\\/]* ) as_myself=$0 ;;
33841  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33842for as_dir in $PATH
33843do
33844  IFS=$as_save_IFS
33845  test -z "$as_dir" && as_dir=.
33846    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33847  done
33848IFS=$as_save_IFS
33849
33850     ;;
33851esac
33852# We did not find ourselves, most probably we were run as `sh COMMAND'
33853# in which case we are not to be found in the path.
33854if test "x$as_myself" = x; then
33855  as_myself=$0
33856fi
33857if test ! -f "$as_myself"; then
33858  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33859  exit 1
33860fi
33861
33862# Unset variables that we do not need and which cause bugs (e.g. in
33863# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33864# suppresses any "Segmentation fault" message there.  '((' could
33865# trigger a bug in pdksh 5.2.14.
33866for as_var in BASH_ENV ENV MAIL MAILPATH
33867do eval test x\${$as_var+set} = xset \
33868  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33869done
33870PS1='$ '
33871PS2='> '
33872PS4='+ '
33873
33874# NLS nuisances.
33875LC_ALL=C
33876export LC_ALL
33877LANGUAGE=C
33878export LANGUAGE
33879
33880# CDPATH.
33881(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33882
33883
33884# as_fn_error STATUS ERROR [LINENO LOG_FD]
33885# ----------------------------------------
33886# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33887# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33888# script with STATUS, using 1 if that was 0.
33889as_fn_error ()
33890{
33891  as_status=$1; test $as_status -eq 0 && as_status=1
33892  if test "$4"; then
33893    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33894    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33895  fi
33896  $as_echo "$as_me: error: $2" >&2
33897  as_fn_exit $as_status
33898} # as_fn_error
33899
33900
33901# as_fn_set_status STATUS
33902# -----------------------
33903# Set $? to STATUS, without forking.
33904as_fn_set_status ()
33905{
33906  return $1
33907} # as_fn_set_status
33908
33909# as_fn_exit STATUS
33910# -----------------
33911# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33912as_fn_exit ()
33913{
33914  set +e
33915  as_fn_set_status $1
33916  exit $1
33917} # as_fn_exit
33918
33919# as_fn_unset VAR
33920# ---------------
33921# Portably unset VAR.
33922as_fn_unset ()
33923{
33924  { eval $1=; unset $1;}
33925}
33926as_unset=as_fn_unset
33927# as_fn_append VAR VALUE
33928# ----------------------
33929# Append the text in VALUE to the end of the definition contained in VAR. Take
33930# advantage of any shell optimizations that allow amortized linear growth over
33931# repeated appends, instead of the typical quadratic growth present in naive
33932# implementations.
33933if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33934  eval 'as_fn_append ()
33935  {
33936    eval $1+=\$2
33937  }'
33938else
33939  as_fn_append ()
33940  {
33941    eval $1=\$$1\$2
33942  }
33943fi # as_fn_append
33944
33945# as_fn_arith ARG...
33946# ------------------
33947# Perform arithmetic evaluation on the ARGs, and store the result in the
33948# global $as_val. Take advantage of shells that can avoid forks. The arguments
33949# must be portable across $(()) and expr.
33950if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33951  eval 'as_fn_arith ()
33952  {
33953    as_val=$(( $* ))
33954  }'
33955else
33956  as_fn_arith ()
33957  {
33958    as_val=`expr "$@" || test $? -eq 1`
33959  }
33960fi # as_fn_arith
33961
33962
33963if expr a : '\(a\)' >/dev/null 2>&1 &&
33964   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33965  as_expr=expr
33966else
33967  as_expr=false
33968fi
33969
33970if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33971  as_basename=basename
33972else
33973  as_basename=false
33974fi
33975
33976if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33977  as_dirname=dirname
33978else
33979  as_dirname=false
33980fi
33981
33982as_me=`$as_basename -- "$0" ||
33983$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33984	 X"$0" : 'X\(//\)$' \| \
33985	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33986$as_echo X/"$0" |
33987    sed '/^.*\/\([^/][^/]*\)\/*$/{
33988	    s//\1/
33989	    q
33990	  }
33991	  /^X\/\(\/\/\)$/{
33992	    s//\1/
33993	    q
33994	  }
33995	  /^X\/\(\/\).*/{
33996	    s//\1/
33997	    q
33998	  }
33999	  s/.*/./; q'`
34000
34001# Avoid depending upon Character Ranges.
34002as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34003as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34004as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34005as_cr_digits='0123456789'
34006as_cr_alnum=$as_cr_Letters$as_cr_digits
34007
34008ECHO_C= ECHO_N= ECHO_T=
34009case `echo -n x` in #(((((
34010-n*)
34011  case `echo 'xy\c'` in
34012  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34013  xy)  ECHO_C='\c';;
34014  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
34015       ECHO_T='	';;
34016  esac;;
34017*)
34018  ECHO_N='-n';;
34019esac
34020
34021rm -f conf$$ conf$$.exe conf$$.file
34022if test -d conf$$.dir; then
34023  rm -f conf$$.dir/conf$$.file
34024else
34025  rm -f conf$$.dir
34026  mkdir conf$$.dir 2>/dev/null
34027fi
34028if (echo >conf$$.file) 2>/dev/null; then
34029  if ln -s conf$$.file conf$$ 2>/dev/null; then
34030    as_ln_s='ln -s'
34031    # ... but there are two gotchas:
34032    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34033    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34034    # In both cases, we have to default to `cp -p'.
34035    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34036      as_ln_s='cp -p'
34037  elif ln conf$$.file conf$$ 2>/dev/null; then
34038    as_ln_s=ln
34039  else
34040    as_ln_s='cp -p'
34041  fi
34042else
34043  as_ln_s='cp -p'
34044fi
34045rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34046rmdir conf$$.dir 2>/dev/null
34047
34048
34049# as_fn_mkdir_p
34050# -------------
34051# Create "$as_dir" as a directory, including parents if necessary.
34052as_fn_mkdir_p ()
34053{
34054
34055  case $as_dir in #(
34056  -*) as_dir=./$as_dir;;
34057  esac
34058  test -d "$as_dir" || eval $as_mkdir_p || {
34059    as_dirs=
34060    while :; do
34061      case $as_dir in #(
34062      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34063      *) as_qdir=$as_dir;;
34064      esac
34065      as_dirs="'$as_qdir' $as_dirs"
34066      as_dir=`$as_dirname -- "$as_dir" ||
34067$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34068	 X"$as_dir" : 'X\(//\)[^/]' \| \
34069	 X"$as_dir" : 'X\(//\)$' \| \
34070	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34071$as_echo X"$as_dir" |
34072    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34073	    s//\1/
34074	    q
34075	  }
34076	  /^X\(\/\/\)[^/].*/{
34077	    s//\1/
34078	    q
34079	  }
34080	  /^X\(\/\/\)$/{
34081	    s//\1/
34082	    q
34083	  }
34084	  /^X\(\/\).*/{
34085	    s//\1/
34086	    q
34087	  }
34088	  s/.*/./; q'`
34089      test -d "$as_dir" && break
34090    done
34091    test -z "$as_dirs" || eval "mkdir $as_dirs"
34092  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34093
34094
34095} # as_fn_mkdir_p
34096if mkdir -p . 2>/dev/null; then
34097  as_mkdir_p='mkdir -p "$as_dir"'
34098else
34099  test -d ./-p && rmdir ./-p
34100  as_mkdir_p=false
34101fi
34102
34103if test -x / >/dev/null 2>&1; then
34104  as_test_x='test -x'
34105else
34106  if ls -dL / >/dev/null 2>&1; then
34107    as_ls_L_option=L
34108  else
34109    as_ls_L_option=
34110  fi
34111  as_test_x='
34112    eval sh -c '\''
34113      if test -d "$1"; then
34114	test -d "$1/.";
34115      else
34116	case $1 in #(
34117	-*)set "./$1";;
34118	esac;
34119	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
34120	???[sx]*):;;*)false;;esac;fi
34121    '\'' sh
34122  '
34123fi
34124as_executable_p=$as_test_x
34125
34126# Sed expression to map a string onto a valid CPP name.
34127as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34128
34129# Sed expression to map a string onto a valid variable name.
34130as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34131
34132
34133exec 6>&1
34134## ----------------------------------- ##
34135## Main body of $CONFIG_STATUS script. ##
34136## ----------------------------------- ##
34137_ASEOF
34138test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34139
34140cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34141# Save the log message, to keep $0 and so on meaningful, and to
34142# report actual input values of CONFIG_FILES etc. instead of their
34143# values after options handling.
34144ac_log="
34145This file was extended by OpenJDK $as_me jdk8, which was
34146generated by GNU Autoconf 2.67.  Invocation command line was
34147
34148  CONFIG_FILES    = $CONFIG_FILES
34149  CONFIG_HEADERS  = $CONFIG_HEADERS
34150  CONFIG_LINKS    = $CONFIG_LINKS
34151  CONFIG_COMMANDS = $CONFIG_COMMANDS
34152  $ $0 $@
34153
34154on `(hostname || uname -n) 2>/dev/null | sed 1q`
34155"
34156
34157_ACEOF
34158
34159case $ac_config_files in *"
34160"*) set x $ac_config_files; shift; ac_config_files=$*;;
34161esac
34162
34163case $ac_config_headers in *"
34164"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34165esac
34166
34167
34168cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34169# Files that config.status was made for.
34170config_files="$ac_config_files"
34171config_headers="$ac_config_headers"
34172
34173_ACEOF
34174
34175cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34176ac_cs_usage="\
34177\`$as_me' instantiates files and other configuration actions
34178from templates according to the current configuration.  Unless the files
34179and actions are specified as TAGs, all are instantiated by default.
34180
34181Usage: $0 [OPTION]... [TAG]...
34182
34183  -h, --help       print this help, then exit
34184  -V, --version    print version number and configuration settings, then exit
34185      --config     print configuration, then exit
34186  -q, --quiet, --silent
34187                   do not print progress messages
34188  -d, --debug      don't remove temporary files
34189      --recheck    update $as_me by reconfiguring in the same conditions
34190      --file=FILE[:TEMPLATE]
34191                   instantiate the configuration file FILE
34192      --header=FILE[:TEMPLATE]
34193                   instantiate the configuration header FILE
34194
34195Configuration files:
34196$config_files
34197
34198Configuration headers:
34199$config_headers
34200
34201Report bugs to <build-dev@openjdk.java.net>.
34202OpenJDK home page: <http://openjdk.java.net>."
34203
34204_ACEOF
34205cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34206ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34207ac_cs_version="\\
34208OpenJDK config.status jdk8
34209configured by $0, generated by GNU Autoconf 2.67,
34210  with options \\"\$ac_cs_config\\"
34211
34212Copyright (C) 2010 Free Software Foundation, Inc.
34213This config.status script is free software; the Free Software Foundation
34214gives unlimited permission to copy, distribute and modify it."
34215
34216ac_pwd='$ac_pwd'
34217srcdir='$srcdir'
34218AWK='$AWK'
34219test -n "\$AWK" || AWK=awk
34220_ACEOF
34221
34222cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34223# The default lists apply if the user does not specify any file.
34224ac_need_defaults=:
34225while test $# != 0
34226do
34227  case $1 in
34228  --*=?*)
34229    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34230    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34231    ac_shift=:
34232    ;;
34233  --*=)
34234    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34235    ac_optarg=
34236    ac_shift=:
34237    ;;
34238  *)
34239    ac_option=$1
34240    ac_optarg=$2
34241    ac_shift=shift
34242    ;;
34243  esac
34244
34245  case $ac_option in
34246  # Handling of the options.
34247  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34248    ac_cs_recheck=: ;;
34249  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34250    $as_echo "$ac_cs_version"; exit ;;
34251  --config | --confi | --conf | --con | --co | --c )
34252    $as_echo "$ac_cs_config"; exit ;;
34253  --debug | --debu | --deb | --de | --d | -d )
34254    debug=: ;;
34255  --file | --fil | --fi | --f )
34256    $ac_shift
34257    case $ac_optarg in
34258    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34259    '') as_fn_error $? "missing file argument" ;;
34260    esac
34261    as_fn_append CONFIG_FILES " '$ac_optarg'"
34262    ac_need_defaults=false;;
34263  --header | --heade | --head | --hea )
34264    $ac_shift
34265    case $ac_optarg in
34266    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34267    esac
34268    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34269    ac_need_defaults=false;;
34270  --he | --h)
34271    # Conflict between --help and --header
34272    as_fn_error $? "ambiguous option: \`$1'
34273Try \`$0 --help' for more information.";;
34274  --help | --hel | -h )
34275    $as_echo "$ac_cs_usage"; exit ;;
34276  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34277  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34278    ac_cs_silent=: ;;
34279
34280  # This is an error.
34281  -*) as_fn_error $? "unrecognized option: \`$1'
34282Try \`$0 --help' for more information." ;;
34283
34284  *) as_fn_append ac_config_targets " $1"
34285     ac_need_defaults=false ;;
34286
34287  esac
34288  shift
34289done
34290
34291ac_configure_extra_args=
34292
34293if $ac_cs_silent; then
34294  exec 6>/dev/null
34295  ac_configure_extra_args="$ac_configure_extra_args --silent"
34296fi
34297
34298_ACEOF
34299cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34300if \$ac_cs_recheck; then
34301  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34302  shift
34303  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34304  CONFIG_SHELL='$SHELL'
34305  export CONFIG_SHELL
34306  exec "\$@"
34307fi
34308
34309_ACEOF
34310cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34311exec 5>>config.log
34312{
34313  echo
34314  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34315## Running $as_me. ##
34316_ASBOX
34317  $as_echo "$ac_log"
34318} >&5
34319
34320_ACEOF
34321cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34322_ACEOF
34323
34324cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34325
34326# Handling of arguments.
34327for ac_config_target in $ac_config_targets
34328do
34329  case $ac_config_target in
34330    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34331    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34332    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34333    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34334    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34335    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34336    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34337
34338  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34339  esac
34340done
34341
34342
34343# If the user did not use the arguments to specify the items to instantiate,
34344# then the envvar interface is used.  Set only those that are not.
34345# We use the long form for the default assignment because of an extremely
34346# bizarre bug on SunOS 4.1.3.
34347if $ac_need_defaults; then
34348  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34349  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34350fi
34351
34352# Have a temporary directory for convenience.  Make it in the build tree
34353# simply because there is no reason against having it here, and in addition,
34354# creating and moving files from /tmp can sometimes cause problems.
34355# Hook for its removal unless debugging.
34356# Note that there is a small window in which the directory will not be cleaned:
34357# after its creation but before its name has been assigned to `$tmp'.
34358$debug ||
34359{
34360  tmp=
34361  trap 'exit_status=$?
34362  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34363' 0
34364  trap 'as_fn_exit 1' 1 2 13 15
34365}
34366# Create a (secure) tmp directory for tmp files.
34367
34368{
34369  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34370  test -n "$tmp" && test -d "$tmp"
34371}  ||
34372{
34373  tmp=./conf$$-$RANDOM
34374  (umask 077 && mkdir "$tmp")
34375} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34376
34377# Set up the scripts for CONFIG_FILES section.
34378# No need to generate them if there are no CONFIG_FILES.
34379# This happens for instance with `./config.status config.h'.
34380if test -n "$CONFIG_FILES"; then
34381
34382
34383ac_cr=`echo X | tr X '\015'`
34384# On cygwin, bash can eat \r inside `` if the user requested igncr.
34385# But we know of no other shell where ac_cr would be empty at this
34386# point, so we can use a bashism as a fallback.
34387if test "x$ac_cr" = x; then
34388  eval ac_cr=\$\'\\r\'
34389fi
34390ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34391if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34392  ac_cs_awk_cr='\\r'
34393else
34394  ac_cs_awk_cr=$ac_cr
34395fi
34396
34397echo 'BEGIN {' >"$tmp/subs1.awk" &&
34398_ACEOF
34399
34400
34401{
34402  echo "cat >conf$$subs.awk <<_ACEOF" &&
34403  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34404  echo "_ACEOF"
34405} >conf$$subs.sh ||
34406  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34407ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34408ac_delim='%!_!# '
34409for ac_last_try in false false false false false :; do
34410  . ./conf$$subs.sh ||
34411    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34412
34413  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34414  if test $ac_delim_n = $ac_delim_num; then
34415    break
34416  elif $ac_last_try; then
34417    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34418  else
34419    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34420  fi
34421done
34422rm -f conf$$subs.sh
34423
34424cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34425cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34426_ACEOF
34427sed -n '
34428h
34429s/^/S["/; s/!.*/"]=/
34430p
34431g
34432s/^[^!]*!//
34433:repl
34434t repl
34435s/'"$ac_delim"'$//
34436t delim
34437:nl
34438h
34439s/\(.\{148\}\)..*/\1/
34440t more1
34441s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34442p
34443n
34444b repl
34445:more1
34446s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34447p
34448g
34449s/.\{148\}//
34450t nl
34451:delim
34452h
34453s/\(.\{148\}\)..*/\1/
34454t more2
34455s/["\\]/\\&/g; s/^/"/; s/$/"/
34456p
34457b
34458:more2
34459s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34460p
34461g
34462s/.\{148\}//
34463t delim
34464' <conf$$subs.awk | sed '
34465/^[^""]/{
34466  N
34467  s/\n//
34468}
34469' >>$CONFIG_STATUS || ac_write_fail=1
34470rm -f conf$$subs.awk
34471cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34472_ACAWK
34473cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34474  for (key in S) S_is_set[key] = 1
34475  FS = ""
34476
34477}
34478{
34479  line = $ 0
34480  nfields = split(line, field, "@")
34481  substed = 0
34482  len = length(field[1])
34483  for (i = 2; i < nfields; i++) {
34484    key = field[i]
34485    keylen = length(key)
34486    if (S_is_set[key]) {
34487      value = S[key]
34488      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34489      len += length(value) + length(field[++i])
34490      substed = 1
34491    } else
34492      len += 1 + keylen
34493  }
34494
34495  print line
34496}
34497
34498_ACAWK
34499_ACEOF
34500cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34501if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34502  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34503else
34504  cat
34505fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34506  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34507_ACEOF
34508
34509# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34510# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34511# trailing colons and then remove the whole line if VPATH becomes empty
34512# (actually we leave an empty line to preserve line numbers).
34513if test "x$srcdir" = x.; then
34514  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34515h
34516s///
34517s/^/:/
34518s/[	 ]*$/:/
34519s/:\$(srcdir):/:/g
34520s/:\${srcdir}:/:/g
34521s/:@srcdir@:/:/g
34522s/^:*//
34523s/:*$//
34524x
34525s/\(=[	 ]*\).*/\1/
34526G
34527s/\n//
34528s/^[^=]*=[	 ]*$//
34529}'
34530fi
34531
34532cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34533fi # test -n "$CONFIG_FILES"
34534
34535# Set up the scripts for CONFIG_HEADERS section.
34536# No need to generate them if there are no CONFIG_HEADERS.
34537# This happens for instance with `./config.status Makefile'.
34538if test -n "$CONFIG_HEADERS"; then
34539cat >"$tmp/defines.awk" <<\_ACAWK ||
34540BEGIN {
34541_ACEOF
34542
34543# Transform confdefs.h into an awk script `defines.awk', embedded as
34544# here-document in config.status, that substitutes the proper values into
34545# config.h.in to produce config.h.
34546
34547# Create a delimiter string that does not exist in confdefs.h, to ease
34548# handling of long lines.
34549ac_delim='%!_!# '
34550for ac_last_try in false false :; do
34551  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34552  if test -z "$ac_t"; then
34553    break
34554  elif $ac_last_try; then
34555    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34556  else
34557    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34558  fi
34559done
34560
34561# For the awk script, D is an array of macro values keyed by name,
34562# likewise P contains macro parameters if any.  Preserve backslash
34563# newline sequences.
34564
34565ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34566sed -n '
34567s/.\{148\}/&'"$ac_delim"'/g
34568t rset
34569:rset
34570s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34571t def
34572d
34573:def
34574s/\\$//
34575t bsnl
34576s/["\\]/\\&/g
34577s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34578D["\1"]=" \3"/p
34579s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34580d
34581:bsnl
34582s/["\\]/\\&/g
34583s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34584D["\1"]=" \3\\\\\\n"\\/p
34585t cont
34586s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34587t cont
34588d
34589:cont
34590n
34591s/.\{148\}/&'"$ac_delim"'/g
34592t clear
34593:clear
34594s/\\$//
34595t bsnlc
34596s/["\\]/\\&/g; s/^/"/; s/$/"/p
34597d
34598:bsnlc
34599s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34600b cont
34601' <confdefs.h | sed '
34602s/'"$ac_delim"'/"\\\
34603"/g' >>$CONFIG_STATUS || ac_write_fail=1
34604
34605cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34606  for (key in D) D_is_set[key] = 1
34607  FS = ""
34608}
34609/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34610  line = \$ 0
34611  split(line, arg, " ")
34612  if (arg[1] == "#") {
34613    defundef = arg[2]
34614    mac1 = arg[3]
34615  } else {
34616    defundef = substr(arg[1], 2)
34617    mac1 = arg[2]
34618  }
34619  split(mac1, mac2, "(") #)
34620  macro = mac2[1]
34621  prefix = substr(line, 1, index(line, defundef) - 1)
34622  if (D_is_set[macro]) {
34623    # Preserve the white space surrounding the "#".
34624    print prefix "define", macro P[macro] D[macro]
34625    next
34626  } else {
34627    # Replace #undef with comments.  This is necessary, for example,
34628    # in the case of _POSIX_SOURCE, which is predefined and required
34629    # on some systems where configure will not decide to define it.
34630    if (defundef == "undef") {
34631      print "/*", prefix defundef, macro, "*/"
34632      next
34633    }
34634  }
34635}
34636{ print }
34637_ACAWK
34638_ACEOF
34639cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34640  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34641fi # test -n "$CONFIG_HEADERS"
34642
34643
34644eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34645shift
34646for ac_tag
34647do
34648  case $ac_tag in
34649  :[FHLC]) ac_mode=$ac_tag; continue;;
34650  esac
34651  case $ac_mode$ac_tag in
34652  :[FHL]*:*);;
34653  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34654  :[FH]-) ac_tag=-:-;;
34655  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34656  esac
34657  ac_save_IFS=$IFS
34658  IFS=:
34659  set x $ac_tag
34660  IFS=$ac_save_IFS
34661  shift
34662  ac_file=$1
34663  shift
34664
34665  case $ac_mode in
34666  :L) ac_source=$1;;
34667  :[FH])
34668    ac_file_inputs=
34669    for ac_f
34670    do
34671      case $ac_f in
34672      -) ac_f="$tmp/stdin";;
34673      *) # Look for the file first in the build tree, then in the source tree
34674	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34675	 # because $ac_f cannot contain `:'.
34676	 test -f "$ac_f" ||
34677	   case $ac_f in
34678	   [\\/$]*) false;;
34679	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34680	   esac ||
34681	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34682      esac
34683      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34684      as_fn_append ac_file_inputs " '$ac_f'"
34685    done
34686
34687    # Let's still pretend it is `configure' which instantiates (i.e., don't
34688    # use $as_me), people would be surprised to read:
34689    #    /* config.h.  Generated by config.status.  */
34690    configure_input='Generated from '`
34691	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34692	`' by configure.'
34693    if test x"$ac_file" != x-; then
34694      configure_input="$ac_file.  $configure_input"
34695      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34696$as_echo "$as_me: creating $ac_file" >&6;}
34697    fi
34698    # Neutralize special characters interpreted by sed in replacement strings.
34699    case $configure_input in #(
34700    *\&* | *\|* | *\\* )
34701       ac_sed_conf_input=`$as_echo "$configure_input" |
34702       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34703    *) ac_sed_conf_input=$configure_input;;
34704    esac
34705
34706    case $ac_tag in
34707    *:-:* | *:-) cat >"$tmp/stdin" \
34708      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34709    esac
34710    ;;
34711  esac
34712
34713  ac_dir=`$as_dirname -- "$ac_file" ||
34714$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34715	 X"$ac_file" : 'X\(//\)[^/]' \| \
34716	 X"$ac_file" : 'X\(//\)$' \| \
34717	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34718$as_echo X"$ac_file" |
34719    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34720	    s//\1/
34721	    q
34722	  }
34723	  /^X\(\/\/\)[^/].*/{
34724	    s//\1/
34725	    q
34726	  }
34727	  /^X\(\/\/\)$/{
34728	    s//\1/
34729	    q
34730	  }
34731	  /^X\(\/\).*/{
34732	    s//\1/
34733	    q
34734	  }
34735	  s/.*/./; q'`
34736  as_dir="$ac_dir"; as_fn_mkdir_p
34737  ac_builddir=.
34738
34739case "$ac_dir" in
34740.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34741*)
34742  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34743  # A ".." for each directory in $ac_dir_suffix.
34744  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34745  case $ac_top_builddir_sub in
34746  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34747  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34748  esac ;;
34749esac
34750ac_abs_top_builddir=$ac_pwd
34751ac_abs_builddir=$ac_pwd$ac_dir_suffix
34752# for backward compatibility:
34753ac_top_builddir=$ac_top_build_prefix
34754
34755case $srcdir in
34756  .)  # We are building in place.
34757    ac_srcdir=.
34758    ac_top_srcdir=$ac_top_builddir_sub
34759    ac_abs_top_srcdir=$ac_pwd ;;
34760  [\\/]* | ?:[\\/]* )  # Absolute name.
34761    ac_srcdir=$srcdir$ac_dir_suffix;
34762    ac_top_srcdir=$srcdir
34763    ac_abs_top_srcdir=$srcdir ;;
34764  *) # Relative name.
34765    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34766    ac_top_srcdir=$ac_top_build_prefix$srcdir
34767    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34768esac
34769ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34770
34771
34772  case $ac_mode in
34773  :F)
34774  #
34775  # CONFIG_FILE
34776  #
34777
34778_ACEOF
34779
34780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34781# If the template does not know about datarootdir, expand it.
34782# FIXME: This hack should be removed a few years after 2.60.
34783ac_datarootdir_hack=; ac_datarootdir_seen=
34784ac_sed_dataroot='
34785/datarootdir/ {
34786  p
34787  q
34788}
34789/@datadir@/p
34790/@docdir@/p
34791/@infodir@/p
34792/@localedir@/p
34793/@mandir@/p'
34794case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34795*datarootdir*) ac_datarootdir_seen=yes;;
34796*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34797  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34798$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34799_ACEOF
34800cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34801  ac_datarootdir_hack='
34802  s&@datadir@&$datadir&g
34803  s&@docdir@&$docdir&g
34804  s&@infodir@&$infodir&g
34805  s&@localedir@&$localedir&g
34806  s&@mandir@&$mandir&g
34807  s&\\\${datarootdir}&$datarootdir&g' ;;
34808esac
34809_ACEOF
34810
34811# Neutralize VPATH when `$srcdir' = `.'.
34812# Shell code in configure.ac might set extrasub.
34813# FIXME: do we really want to maintain this feature?
34814cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34815ac_sed_extra="$ac_vpsub
34816$extrasub
34817_ACEOF
34818cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34819:t
34820/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34821s|@configure_input@|$ac_sed_conf_input|;t t
34822s&@top_builddir@&$ac_top_builddir_sub&;t t
34823s&@top_build_prefix@&$ac_top_build_prefix&;t t
34824s&@srcdir@&$ac_srcdir&;t t
34825s&@abs_srcdir@&$ac_abs_srcdir&;t t
34826s&@top_srcdir@&$ac_top_srcdir&;t t
34827s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34828s&@builddir@&$ac_builddir&;t t
34829s&@abs_builddir@&$ac_abs_builddir&;t t
34830s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34831$ac_datarootdir_hack
34832"
34833eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34834  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34835
34836test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34837  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34838  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34839  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34840which seems to be undefined.  Please make sure it is defined" >&5
34841$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34842which seems to be undefined.  Please make sure it is defined" >&2;}
34843
34844  rm -f "$tmp/stdin"
34845  case $ac_file in
34846  -) cat "$tmp/out" && rm -f "$tmp/out";;
34847  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34848  esac \
34849  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34850 ;;
34851  :H)
34852  #
34853  # CONFIG_HEADER
34854  #
34855  if test x"$ac_file" != x-; then
34856    {
34857      $as_echo "/* $configure_input  */" \
34858      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34859    } >"$tmp/config.h" \
34860      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34861    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34862      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34863$as_echo "$as_me: $ac_file is unchanged" >&6;}
34864    else
34865      rm -f "$ac_file"
34866      mv "$tmp/config.h" "$ac_file" \
34867	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34868    fi
34869  else
34870    $as_echo "/* $configure_input  */" \
34871      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34872      || as_fn_error $? "could not create -" "$LINENO" 5
34873  fi
34874 ;;
34875
34876
34877  esac
34878
34879done # for ac_tag
34880
34881
34882as_fn_exit 0
34883_ACEOF
34884ac_clean_files=$ac_clean_files_save
34885
34886test $ac_write_fail = 0 ||
34887  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34888
34889
34890# configure is writing to config.log, and then calls config.status.
34891# config.status does its own redirection, appending to config.log.
34892# Unfortunately, on DOS this fails, as config.log is still kept open
34893# by configure, so config.status won't be able to write to it; its
34894# output is simply discarded.  So we exec the FD to /dev/null,
34895# effectively closing config.log, so it can be properly (re)opened and
34896# appended to by config.status.  When coming back to configure, we
34897# need to make the FD available again.
34898if test "$no_create" != yes; then
34899  ac_cs_success=:
34900  ac_config_status_args=
34901  test "$silent" = yes &&
34902    ac_config_status_args="$ac_config_status_args --quiet"
34903  exec 5>/dev/null
34904  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34905  exec 5>>config.log
34906  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34907  # would make configure fail if this is the last instruction.
34908  $ac_cs_success || as_fn_exit 1
34909fi
34910if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34911  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34912$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34913fi
34914
34915
34916# Make the compare script executable
34917$CHMOD +x $OUTPUT_ROOT/compare.sh
34918
34919# Finally output some useful information to the user
34920
34921# Finally output some useful information to the user
34922
34923if test "x$CCACHE_FOUND" != x; then
34924	if  test "x$HAS_GOOD_CCACHE" = x; then
34925		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34926		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34927	else
34928		CCACHE_STATUS="installed and in use"
34929	fi
34930else
34931	if test "x$GCC" = xyes; then
34932		CCACHE_STATUS="not installed (consider installing)"
34933		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34934	else
34935		CCACHE_STATUS="not available for your system"
34936	fi
34937fi
34938
34939printf "\n"
34940printf "====================================================\n"
34941printf "A new configuration has been successfully created in\n"
34942printf "$OUTPUT_ROOT\n"
34943if test "x$CONFIGURE_COMMAND_LINE" != x; then
34944	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34945else
34946	printf "using default settings.\n"
34947fi
34948
34949printf "\n"
34950printf "Configuration summary:\n"
34951printf "* Debug level:    $DEBUG_LEVEL\n"
34952printf "* JDK variant:    $JDK_VARIANT\n"
34953printf "* JVM variants:   $with_jvm_variants\n"
34954printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34955
34956printf "\n"
34957printf "Tools summary:\n"
34958if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34959  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34960fi
34961printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34962printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34963printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34964
34965printf "\n"
34966printf "Build performance summary:\n"
34967printf "* Cores to use:   $JOBS\n"
34968printf "* Memory limit:   $MEMORY_SIZE MB\n"
34969printf "* ccache status:  $CCACHE_STATUS\n"
34970printf "\n"
34971
34972if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34973	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34974	printf "$CCACHE_HELP_MSG\n"
34975
34976    # Print a helpful message on how to acquire the necessary build dependency.
34977    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34978    MISSING_DEPENDENCY=ccache
34979    PKGHANDLER_COMMAND=
34980
34981    case $PKGHANDLER in
34982	apt-get)
34983                apt_help     $MISSING_DEPENDENCY ;;
34984    yum)
34985                yum_help     $MISSING_DEPENDENCY ;;
34986	port)
34987                port_help    $MISSING_DEPENDENCY ;;
34988	pkgutil)
34989                pkgutil_help $MISSING_DEPENDENCY ;;
34990	pkgadd)
34991                pkgadd_help  $MISSING_DEPENDENCY ;;
34992    * )
34993      break ;;
34994    esac
34995
34996    if test "x$PKGHANDLER_COMMAND" != x; then
34997        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34998    fi
34999
35000	printf "$HELP_MSG\n"
35001	printf "\n"
35002fi
35003
35004if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
35005	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
35006	printf "will result in longer build times.\n"
35007	printf "\n"
35008fi
35009
35010if test "x$FOUND_ALT_VARIABLES" != "x"; then
35011	printf "WARNING: You have old-style ALT_ environment variables set.\n"
35012	printf "These are not respected, and will be ignored. It is recommended\n"
35013	printf "that you clean your environment. The following variables are set:\n"
35014	printf "$FOUND_ALT_VARIABLES\n"
35015	printf "\n"
35016fi
35017
35018if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35019	printf "WARNING: Your build output directory is not on a local disk.\n"
35020	printf "This will severely degrade build performance!\n"
35021	printf "It is recommended that you create an output directory on a local disk,\n"
35022	printf "and run the configure script again from that directory.\n"
35023	printf "\n"
35024fi
35025
35026if test "x$IS_RECONFIGURE" = "xyes"; then
35027	printf "WARNING: The result of this configuration has overridden an older\n"
35028	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35029	printf "proper build. Failure to do so might result in strange build problems.\n"
35030	printf "\n"
35031fi
35032
35033