generated-configure.sh revision 626:fd1a5574cf68
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.68 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.
94as_myself=
95case $0 in #((
96  *[\\/]* ) as_myself=$0 ;;
97  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98for as_dir in $PATH
99do
100  IFS=$as_save_IFS
101  test -z "$as_dir" && as_dir=.
102    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103  done
104IFS=$as_save_IFS
105
106     ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111  as_myself=$0
112fi
113if test ! -f "$as_myself"; then
114  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115  exit 1
116fi
117
118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there.  '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
135
136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141  emulate sh
142  NULLCMD=:
143  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144  # is contrary to our usage.  Disable this feature.
145  alias -g '\${1+\"\$@\"}'='\"\$@\"'
146  setopt NO_GLOB_SUBST
147else
148  case \`(set -o) 2>/dev/null\` in #(
149  *posix*) :
150    set -o posix ;; #(
151  *) :
152     ;;
153esac
154fi
155"
156  as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170  exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178  if (eval "$as_required") 2>/dev/null; then :
179  as_have_required=yes
180else
181  as_have_required=no
182fi
183  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190  IFS=$as_save_IFS
191  test -z "$as_dir" && as_dir=.
192  as_found=:
193  case $as_dir in #(
194	 /*)
195	   for as_base in sh bash ksh sh5; do
196	     # Try only shells that exist, to save several forks.
197	     as_shell=$as_dir/$as_base
198	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200  CONFIG_SHELL=$as_shell as_have_required=yes
201		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202  break 2
203fi
204fi
205	   done;;
206       esac
207  as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211  CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216      if test "x$CONFIG_SHELL" != x; then :
217  # We cannot yet assume a decent shell, so we have to provide a
218	# neutralization value for shells without unset; and this also
219	# works around shells that cannot unset nonexistent variables.
220	# Preserve -v and -x to the replacement shell.
221	BASH_ENV=/dev/null
222	ENV=/dev/null
223	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224	export CONFIG_SHELL
225	case $- in # ((((
226	  *v*x* | *x*v* ) as_opts=-vx ;;
227	  *v* ) as_opts=-v ;;
228	  *x* ) as_opts=-x ;;
229	  * ) as_opts= ;;
230	esac
231	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
232fi
233
234    if test x$as_have_required = xno; then :
235  $as_echo "$0: This script requires a shell more modern than all"
236  $as_echo "$0: the shells that I found on your system."
237  if test x${ZSH_VERSION+set} = xset ; then
238    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240  else
241    $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: build-dev@openjdk.java.net about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246  fi
247  exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265  { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274  return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282  set +e
283  as_fn_set_status $1
284  exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293  case $as_dir in #(
294  -*) as_dir=./$as_dir;;
295  esac
296  test -d "$as_dir" || eval $as_mkdir_p || {
297    as_dirs=
298    while :; do
299      case $as_dir in #(
300      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301      *) as_qdir=$as_dir;;
302      esac
303      as_dirs="'$as_qdir' $as_dirs"
304      as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306	 X"$as_dir" : 'X\(//\)[^/]' \| \
307	 X"$as_dir" : 'X\(//\)$' \| \
308	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\/\)[^/].*/{
315	    s//\1/
316	    q
317	  }
318	  /^X\(\/\/\)$/{
319	    s//\1/
320	    q
321	  }
322	  /^X\(\/\).*/{
323	    s//\1/
324	    q
325	  }
326	  s/.*/./; q'`
327      test -d "$as_dir" && break
328    done
329    test -z "$as_dirs" || eval "mkdir $as_dirs"
330  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341  eval 'as_fn_append ()
342  {
343    eval $1+=\$2
344  }'
345else
346  as_fn_append ()
347  {
348    eval $1=\$$1\$2
349  }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358  eval 'as_fn_arith ()
359  {
360    as_val=$(( $* ))
361  }'
362else
363  as_fn_arith ()
364  {
365    as_val=`expr "$@" || test $? -eq 1`
366  }
367fi # as_fn_arith
368
369
370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
374# script with STATUS, using 1 if that was 0.
375as_fn_error ()
376{
377  as_status=$1; test $as_status -eq 0 && as_status=1
378  if test "$4"; then
379    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
381  fi
382  $as_echo "$as_me: error: $2" >&2
383  as_fn_exit $as_status
384} # as_fn_error
385
386if expr a : '\(a\)' >/dev/null 2>&1 &&
387   test "X`expr 00001 : '.*\(...\)'`" = X001; then
388  as_expr=expr
389else
390  as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394  as_basename=basename
395else
396  as_basename=false
397fi
398
399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400  as_dirname=dirname
401else
402  as_dirname=false
403fi
404
405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407	 X"$0" : 'X\(//\)$' \| \
408	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
409$as_echo X/"$0" |
410    sed '/^.*\/\([^/][^/]*\)\/*$/{
411	    s//\1/
412	    q
413	  }
414	  /^X\/\(\/\/\)$/{
415	    s//\1/
416	    q
417	  }
418	  /^X\/\(\/\).*/{
419	    s//\1/
420	    q
421	  }
422	  s/.*/./; q'`
423
424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
430
431
432  as_lineno_1=$LINENO as_lineno_1a=$LINENO
433  as_lineno_2=$LINENO as_lineno_2a=$LINENO
434  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
437  sed -n '
438    p
439    /[$]LINENO/=
440  ' <$as_myself |
441    sed '
442      s/[$]LINENO.*/&-/
443      t lineno
444      b
445      :lineno
446      N
447      :loop
448      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
449      t loop
450      s/-\n.*//
451    ' >$as_me.lineno &&
452  chmod +x "$as_me.lineno" ||
453    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
454
455  # Don't try to exec as it changes $[0], causing all sort of problems
456  # (the dirname of $[0] is not the place where we might find the
457  # original and so on.  Autoconf is especially sensitive to this).
458  . "./$as_me.lineno"
459  # Exit status is that of the last command.
460  exit
461}
462
463ECHO_C= ECHO_N= ECHO_T=
464case `echo -n x` in #(((((
465-n*)
466  case `echo 'xy\c'` in
467  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
468  xy)  ECHO_C='\c';;
469  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
470       ECHO_T='	';;
471  esac;;
472*)
473  ECHO_N='-n';;
474esac
475
476rm -f conf$$ conf$$.exe conf$$.file
477if test -d conf$$.dir; then
478  rm -f conf$$.dir/conf$$.file
479else
480  rm -f conf$$.dir
481  mkdir conf$$.dir 2>/dev/null
482fi
483if (echo >conf$$.file) 2>/dev/null; then
484  if ln -s conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s='ln -s'
486    # ... but there are two gotchas:
487    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489    # In both cases, we have to default to `cp -p'.
490    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491      as_ln_s='cp -p'
492  elif ln conf$$.file conf$$ 2>/dev/null; then
493    as_ln_s=ln
494  else
495    as_ln_s='cp -p'
496  fi
497else
498  as_ln_s='cp -p'
499fi
500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
502
503if mkdir -p . 2>/dev/null; then
504  as_mkdir_p='mkdir -p "$as_dir"'
505else
506  test -d ./-p && rmdir ./-p
507  as_mkdir_p=false
508fi
509
510if test -x / >/dev/null 2>&1; then
511  as_test_x='test -x'
512else
513  if ls -dL / >/dev/null 2>&1; then
514    as_ls_L_option=L
515  else
516    as_ls_L_option=
517  fi
518  as_test_x='
519    eval sh -c '\''
520      if test -d "$1"; then
521	test -d "$1/.";
522      else
523	case $1 in #(
524	-*)set "./$1";;
525	esac;
526	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527	???[sx]*):;;*)false;;esac;fi
528    '\'' sh
529  '
530fi
531as_executable_p=$as_test_x
532
533# Sed expression to map a string onto a valid CPP name.
534as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
535
536# Sed expression to map a string onto a valid variable name.
537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
538
539
540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
542
543# Name of the host.
544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
548#
549# Initializations.
550#
551ac_default_prefix=/usr/local
552ac_clean_files=
553ac_config_libobj_dir=.
554LIBOBJS=
555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
559
560# Identity of this package.
561PACKAGE_NAME='OpenJDK'
562PACKAGE_TARNAME='openjdk'
563PACKAGE_VERSION='jdk8'
564PACKAGE_STRING='OpenJDK jdk8'
565PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
566PACKAGE_URL='http://openjdk.java.net'
567
568# Factoring default headers for most tests.
569ac_includes_default="\
570#include <stdio.h>
571#ifdef HAVE_SYS_TYPES_H
572# include <sys/types.h>
573#endif
574#ifdef HAVE_SYS_STAT_H
575# include <sys/stat.h>
576#endif
577#ifdef STDC_HEADERS
578# include <stdlib.h>
579# include <stddef.h>
580#else
581# ifdef HAVE_STDLIB_H
582#  include <stdlib.h>
583# endif
584#endif
585#ifdef HAVE_STRING_H
586# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
587#  include <memory.h>
588# endif
589# include <string.h>
590#endif
591#ifdef HAVE_STRINGS_H
592# include <strings.h>
593#endif
594#ifdef HAVE_INTTYPES_H
595# include <inttypes.h>
596#endif
597#ifdef HAVE_STDINT_H
598# include <stdint.h>
599#endif
600#ifdef HAVE_UNISTD_H
601# include <unistd.h>
602#endif"
603
604ac_subst_vars='LTLIBOBJS
605LIBOBJS
606CCACHE
607USE_PRECOMPILED_HEADER
608SJAVAC_SERVER_DIR
609ENABLE_SJAVAC
610SJAVAC_SERVER_CORES
611SJAVAC_SERVER_JAVA
612MEMORY_SIZE
613CONCURRENT_BUILD_JOBS
614NUM_CORES
615SALIB_NAME
616HOTSPOT_MAKE_ARGS
617FIXPATH
618LIBCXX
619STATIC_CXX_SETTING
620LIBDL
621LIBM
622LIBZIP_CAN_USE_MMAP
623USE_EXTERNAL_LIBZ
624USE_EXTERNAL_LIBGIF
625USE_EXTERNAL_LIBJPEG
626ALSA_LIBS
627ALSA_CFLAGS
628FREETYPE2_LIB_PATH
629USING_SYSTEM_FT_LIB
630FREETYPE2_LIBS
631FREETYPE2_CFLAGS
632CUPS_CFLAGS
633OPENWIN_HOME
634X_EXTRA_LIBS
635X_LIBS
636X_PRE_LIBS
637X_CFLAGS
638XMKMF
639CXXFLAGS_DEBUG_SYMBOLS
640CFLAGS_DEBUG_SYMBOLS
641ZIP_DEBUGINFO_FILES
642ENABLE_DEBUG_SYMBOLS
643LDFLAGS_CXX_JDK
644LDFLAGS_JDKEXE_SUFFIX
645LDFLAGS_JDKLIB_SUFFIX
646LDFLAGS_JDKEXE
647LDFLAGS_JDKLIB
648CXXFLAGS_JDKEXE
649CXXFLAGS_JDKLIB
650CFLAGS_JDKEXE
651CFLAGS_JDKLIB
652MACOSX_REQUIRED_VERSION
653PACKAGE_PATH
654LEGACY_EXTRA_LDFLAGS
655LEGACY_EXTRA_CXXFLAGS
656LEGACY_EXTRA_CFLAGS
657CXX_FLAG_DEPS
658C_FLAG_DEPS
659CXX_O_FLAG_NONE
660CXX_O_FLAG_NORM
661CXX_O_FLAG_HI
662CXX_O_FLAG_HIGHEST
663C_O_FLAG_NONE
664C_O_FLAG_NORM
665C_O_FLAG_HI
666C_O_FLAG_HIGHEST
667POST_MCS_CMD
668POST_STRIP_CMD
669SET_EXECUTABLE_ORIGIN
670SET_SHARED_LIBRARY_ORIGIN
671CXX_FLAG_REORDER
672C_FLAG_REORDER
673SET_SHARED_LIBRARY_MAPFILE
674SET_SHARED_LIBRARY_NAME
675SHARED_LIBRARY_FLAGS
676EXE_SUFFIX
677STATIC_LIBRARY_SUFFIX
678SHARED_LIBRARY_SUFFIX
679LIBRARY_PREFIX
680STATIC_LIBRARY
681SHARED_LIBRARY
682OBJ_SUFFIX
683LIPO
684ac_ct_OBJDUMP
685OBJDUMP
686ac_ct_OBJCOPY
687OBJCOPY
688MCS
689STRIP
690NM
691AS
692CXXCPP
693CPP
694COMPILER_TYPE
695RC_FLAGS
696DUMPBIN
697WINAR
698HOTSPOT_RC
699HOTSPOT_MT
700RC
701MT
702WINLD
703HOTSPOT_LD
704HOTSPOT_CXX
705ARFLAGS
706AR
707LDEXECXX
708LDCXX
709LDEXE
710LD
711ac_ct_OBJC
712OBJCFLAGS
713OBJC
714ac_ct_CXX
715CXXFLAGS
716CXX
717ac_ct_PROPER_COMPILER_CXX
718PROPER_COMPILER_CXX
719POTENTIAL_CXX
720TOOLS_DIR_CXX
721OBJEXT
722EXEEXT
723ac_ct_CC
724CPPFLAGS
725LDFLAGS
726CFLAGS
727CC
728ac_ct_PROPER_COMPILER_CC
729PROPER_COMPILER_CC
730POTENTIAL_CC
731TOOLS_DIR_CC
732BUILD_LD
733BUILD_CXX
734BUILD_CC
735MSVCR_DLL
736VS_PATH
737VS_LIB
738VS_INCLUDE
739CYGWIN_LINK
740AR_OUT_OPTION
741LD_OUT_OPTION
742EXE_OUT_OPTION
743CC_OUT_OPTION
744BUILD_HOTSPOT
745HOTSPOT_DIST
746BUILD_OUTPUT
747OVERRIDE_SRC_ROOT
748ADD_SRC_ROOT
749JDK_TOPDIR
750HOTSPOT_TOPDIR
751JAXWS_TOPDIR
752JAXP_TOPDIR
753CORBA_TOPDIR
754LANGTOOLS_TOPDIR
755BOOT_JDK_JVMARGS
756JAVAC_FLAGS
757BOOT_JDK_SOURCETARGET
758BOOT_JDK
759BOOT_TOOLSJAR
760BOOT_RTJAR
761JAVA_CHECK
762JAVAC_CHECK
763COOKED_BUILD_NUMBER
764JDK_VERSION
765COPYRIGHT_YEAR
766MACOSX_BUNDLE_ID_BASE
767MACOSX_BUNDLE_NAME_BASE
768COMPANY_NAME
769JDK_RC_PLATFORM_NAME
770PRODUCT_SUFFIX
771PRODUCT_NAME
772LAUNCHER_NAME
773MILESTONE
774JDK_BUILD_NUMBER
775JDK_UPDATE_VERSION
776JDK_MICRO_VERSION
777JDK_MINOR_VERSION
778JDK_MAJOR_VERSION
779USER_RELEASE_SUFFIX
780COMPRESS_JARS
781UNLIMITED_CRYPTO
782CACERTS_FILE
783TEST_IN_BUILD
784BUILD_HEADLESS
785SUPPORT_HEADFUL
786SUPPORT_HEADLESS
787BDEPS_FTP
788BDEPS_UNZIP
789OS_VERSION_MICRO
790OS_VERSION_MINOR
791OS_VERSION_MAJOR
792PKG_CONFIG
793TIME
794STAT
795HG
796READELF
797OTOOL
798LDD
799ZIP
800UNZIP
801FIND_DELETE
802MAKE
803CHECK_TOOLSDIR_MAKE
804CHECK_TOOLSDIR_GMAKE
805CHECK_MAKE
806CHECK_GMAKE
807PKGHANDLER
808OUTPUT_ROOT
809CONF_NAME
810SPEC
811BUILD_VARIANT_RELEASE
812DEBUG_CLASSFILES
813FASTDEBUG
814VARIANT
815DEBUG_LEVEL
816MACOSX_UNIVERSAL
817JVM_VARIANT_ZEROSHARK
818JVM_VARIANT_ZERO
819JVM_VARIANT_KERNEL
820JVM_VARIANT_MINIMAL1
821JVM_VARIANT_CLIENT
822JVM_VARIANT_SERVER
823JVM_VARIANTS
824JDK_VARIANT
825SET_OPENJDK
826BUILD_LOG_WRAPPER
827BUILD_LOG_PREVIOUS
828BUILD_LOG
829SYS_ROOT
830PATH_SEP
831SRC_ROOT
832DEFINE_CROSS_COMPILE_ARCH
833LP64
834OPENJDK_TARGET_OS_API_DIR
835OPENJDK_TARGET_CPU_JLI_CFLAGS
836OPENJDK_TARGET_CPU_OSARCH
837OPENJDK_TARGET_CPU_ISADIR
838OPENJDK_TARGET_CPU_LIBDIR
839OPENJDK_TARGET_CPU_LEGACY_LIB
840OPENJDK_TARGET_CPU_LEGACY
841REQUIRED_OS_VERSION
842REQUIRED_OS_NAME
843COMPILE_TYPE
844OPENJDK_TARGET_CPU_ENDIAN
845OPENJDK_TARGET_CPU_BITS
846OPENJDK_TARGET_CPU_ARCH
847OPENJDK_TARGET_CPU
848OPENJDK_TARGET_OS_API
849OPENJDK_TARGET_OS
850OPENJDK_BUILD_CPU_ENDIAN
851OPENJDK_BUILD_CPU_BITS
852OPENJDK_BUILD_CPU_ARCH
853OPENJDK_BUILD_CPU
854OPENJDK_BUILD_OS_API
855OPENJDK_BUILD_OS
856OPENJDK_BUILD_AUTOCONF_NAME
857OPENJDK_TARGET_AUTOCONF_NAME
858target_os
859target_vendor
860target_cpu
861target
862host_os
863host_vendor
864host_cpu
865host
866build_os
867build_vendor
868build_cpu
869build
870SETFILE
871DF
872READLINK
873CYGPATH
874NAWK
875SED
876FGREP
877EGREP
878GREP
879AWK
880XARGS
881WHICH
882WC
883UNIQ
884UNAME
885TR
886TOUCH
887TEE
888TAR
889TAIL
890SORT
891SH
892RM
893THEPWDCMD
894PRINTF
895MV
896MKTEMP
897MKDIR
898LS
899LN
900HEAD
901FIND
902FILE
903EXPR
904ECHO
905DIRNAME
906DIFF
907DATE
908CUT
909CPIO
910CP
911COMM
912CMP
913CHMOD
914CAT
915BASH
916BASENAME
917DATE_WHEN_CONFIGURED
918CONFIGURE_COMMAND_LINE
919CUSTOM_MAKE_DIR
920target_alias
921host_alias
922build_alias
923LIBS
924ECHO_T
925ECHO_N
926ECHO_C
927DEFS
928mandir
929localedir
930libdir
931psdir
932pdfdir
933dvidir
934htmldir
935infodir
936docdir
937oldincludedir
938includedir
939localstatedir
940sharedstatedir
941sysconfdir
942datadir
943datarootdir
944libexecdir
945sbindir
946bindir
947program_transform_name
948prefix
949exec_prefix
950PACKAGE_URL
951PACKAGE_BUGREPORT
952PACKAGE_STRING
953PACKAGE_VERSION
954PACKAGE_TARNAME
955PACKAGE_NAME
956PATH_SEPARATOR
957SHELL'
958ac_subst_files=''
959ac_user_opts='
960enable_option_checking
961with_custom_make_dir
962with_target_bits
963with_sys_root
964with_tools_dir
965with_devkit
966enable_openjdk_only
967with_jdk_variant
968with_jvm_variants
969enable_debug
970with_debug_level
971with_conf_name
972with_builddeps_conf
973with_builddeps_server
974with_builddeps_dir
975with_builddeps_group
976enable_headful
977enable_hotspot_test_in_build
978with_cacerts_file
979enable_unlimited_crypto
980with_milestone
981with_build_number
982with_user_release_suffix
983with_boot_jdk
984with_boot_jdk_jvmargs
985with_add_source_root
986with_override_source_root
987with_adds_and_overrides
988with_override_langtools
989with_override_corba
990with_override_jaxp
991with_override_jaxws
992with_override_hotspot
993with_override_jdk
994with_import_hotspot
995with_msvcr_dll
996with_extra_cflags
997with_extra_cxxflags
998with_extra_ldflags
999enable_debug_symbols
1000enable_zip_debug_info
1001enable_macosx_runtime_support
1002with_x
1003with_cups
1004with_cups_include
1005with_freetype
1006with_alsa
1007with_alsa_include
1008with_alsa_lib
1009with_zlib
1010with_stdc__lib
1011with_num_cores
1012with_memory_size
1013with_sjavac_server_java
1014with_sjavac_server_cores
1015enable_sjavac
1016enable_precompiled_headers
1017enable_ccache
1018with_ccache_dir
1019'
1020      ac_precious_vars='build_alias
1021host_alias
1022target_alias
1023PKG_CONFIG
1024CC
1025CFLAGS
1026LDFLAGS
1027LIBS
1028CPPFLAGS
1029CXX
1030CXXFLAGS
1031CCC
1032OBJC
1033OBJCFLAGS
1034CPP
1035CXXCPP
1036XMKMF
1037FREETYPE2_CFLAGS
1038FREETYPE2_LIBS
1039ALSA_CFLAGS
1040ALSA_LIBS'
1041
1042
1043# Initialize some variables set by options.
1044ac_init_help=
1045ac_init_version=false
1046ac_unrecognized_opts=
1047ac_unrecognized_sep=
1048# The variables have the same names as the options, with
1049# dashes changed to underlines.
1050cache_file=/dev/null
1051exec_prefix=NONE
1052no_create=
1053no_recursion=
1054prefix=NONE
1055program_prefix=NONE
1056program_suffix=NONE
1057program_transform_name=s,x,x,
1058silent=
1059site=
1060srcdir=
1061verbose=
1062x_includes=NONE
1063x_libraries=NONE
1064
1065# Installation directory options.
1066# These are left unexpanded so users can "make install exec_prefix=/foo"
1067# and all the variables that are supposed to be based on exec_prefix
1068# by default will actually change.
1069# Use braces instead of parens because sh, perl, etc. also accept them.
1070# (The list follows the same order as the GNU Coding Standards.)
1071bindir='${exec_prefix}/bin'
1072sbindir='${exec_prefix}/sbin'
1073libexecdir='${exec_prefix}/libexec'
1074datarootdir='${prefix}/share'
1075datadir='${datarootdir}'
1076sysconfdir='${prefix}/etc'
1077sharedstatedir='${prefix}/com'
1078localstatedir='${prefix}/var'
1079includedir='${prefix}/include'
1080oldincludedir='/usr/include'
1081docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1082infodir='${datarootdir}/info'
1083htmldir='${docdir}'
1084dvidir='${docdir}'
1085pdfdir='${docdir}'
1086psdir='${docdir}'
1087libdir='${exec_prefix}/lib'
1088localedir='${datarootdir}/locale'
1089mandir='${datarootdir}/man'
1090
1091ac_prev=
1092ac_dashdash=
1093for ac_option
1094do
1095  # If the previous option needs an argument, assign it.
1096  if test -n "$ac_prev"; then
1097    eval $ac_prev=\$ac_option
1098    ac_prev=
1099    continue
1100  fi
1101
1102  case $ac_option in
1103  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1104  *=)   ac_optarg= ;;
1105  *)    ac_optarg=yes ;;
1106  esac
1107
1108  # Accept the important Cygnus configure options, so we can diagnose typos.
1109
1110  case $ac_dashdash$ac_option in
1111  --)
1112    ac_dashdash=yes ;;
1113
1114  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1115    ac_prev=bindir ;;
1116  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1117    bindir=$ac_optarg ;;
1118
1119  -build | --build | --buil | --bui | --bu)
1120    ac_prev=build_alias ;;
1121  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1122    build_alias=$ac_optarg ;;
1123
1124  -cache-file | --cache-file | --cache-fil | --cache-fi \
1125  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1126    ac_prev=cache_file ;;
1127  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1128  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1129    cache_file=$ac_optarg ;;
1130
1131  --config-cache | -C)
1132    cache_file=config.cache ;;
1133
1134  -datadir | --datadir | --datadi | --datad)
1135    ac_prev=datadir ;;
1136  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1137    datadir=$ac_optarg ;;
1138
1139  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1140  | --dataroo | --dataro | --datar)
1141    ac_prev=datarootdir ;;
1142  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1143  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1144    datarootdir=$ac_optarg ;;
1145
1146  -disable-* | --disable-*)
1147    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1148    # Reject names that are not valid shell variable names.
1149    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1150      as_fn_error $? "invalid feature name: $ac_useropt"
1151    ac_useropt_orig=$ac_useropt
1152    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1153    case $ac_user_opts in
1154      *"
1155"enable_$ac_useropt"
1156"*) ;;
1157      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1158	 ac_unrecognized_sep=', ';;
1159    esac
1160    eval enable_$ac_useropt=no ;;
1161
1162  -docdir | --docdir | --docdi | --doc | --do)
1163    ac_prev=docdir ;;
1164  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1165    docdir=$ac_optarg ;;
1166
1167  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1168    ac_prev=dvidir ;;
1169  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1170    dvidir=$ac_optarg ;;
1171
1172  -enable-* | --enable-*)
1173    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1174    # Reject names that are not valid shell variable names.
1175    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1176      as_fn_error $? "invalid feature name: $ac_useropt"
1177    ac_useropt_orig=$ac_useropt
1178    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1179    case $ac_user_opts in
1180      *"
1181"enable_$ac_useropt"
1182"*) ;;
1183      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1184	 ac_unrecognized_sep=', ';;
1185    esac
1186    eval enable_$ac_useropt=\$ac_optarg ;;
1187
1188  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1189  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1190  | --exec | --exe | --ex)
1191    ac_prev=exec_prefix ;;
1192  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1193  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1194  | --exec=* | --exe=* | --ex=*)
1195    exec_prefix=$ac_optarg ;;
1196
1197  -gas | --gas | --ga | --g)
1198    # Obsolete; use --with-gas.
1199    with_gas=yes ;;
1200
1201  -help | --help | --hel | --he | -h)
1202    ac_init_help=long ;;
1203  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1204    ac_init_help=recursive ;;
1205  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1206    ac_init_help=short ;;
1207
1208  -host | --host | --hos | --ho)
1209    ac_prev=host_alias ;;
1210  -host=* | --host=* | --hos=* | --ho=*)
1211    host_alias=$ac_optarg ;;
1212
1213  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1214    ac_prev=htmldir ;;
1215  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1216  | --ht=*)
1217    htmldir=$ac_optarg ;;
1218
1219  -includedir | --includedir | --includedi | --included | --include \
1220  | --includ | --inclu | --incl | --inc)
1221    ac_prev=includedir ;;
1222  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1223  | --includ=* | --inclu=* | --incl=* | --inc=*)
1224    includedir=$ac_optarg ;;
1225
1226  -infodir | --infodir | --infodi | --infod | --info | --inf)
1227    ac_prev=infodir ;;
1228  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1229    infodir=$ac_optarg ;;
1230
1231  -libdir | --libdir | --libdi | --libd)
1232    ac_prev=libdir ;;
1233  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1234    libdir=$ac_optarg ;;
1235
1236  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1237  | --libexe | --libex | --libe)
1238    ac_prev=libexecdir ;;
1239  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1240  | --libexe=* | --libex=* | --libe=*)
1241    libexecdir=$ac_optarg ;;
1242
1243  -localedir | --localedir | --localedi | --localed | --locale)
1244    ac_prev=localedir ;;
1245  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1246    localedir=$ac_optarg ;;
1247
1248  -localstatedir | --localstatedir | --localstatedi | --localstated \
1249  | --localstate | --localstat | --localsta | --localst | --locals)
1250    ac_prev=localstatedir ;;
1251  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1252  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1253    localstatedir=$ac_optarg ;;
1254
1255  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1256    ac_prev=mandir ;;
1257  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1258    mandir=$ac_optarg ;;
1259
1260  -nfp | --nfp | --nf)
1261    # Obsolete; use --without-fp.
1262    with_fp=no ;;
1263
1264  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1265  | --no-cr | --no-c | -n)
1266    no_create=yes ;;
1267
1268  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1269  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1270    no_recursion=yes ;;
1271
1272  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1273  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1274  | --oldin | --oldi | --old | --ol | --o)
1275    ac_prev=oldincludedir ;;
1276  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1277  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1278  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1279    oldincludedir=$ac_optarg ;;
1280
1281  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1282    ac_prev=prefix ;;
1283  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1284    prefix=$ac_optarg ;;
1285
1286  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1287  | --program-pre | --program-pr | --program-p)
1288    ac_prev=program_prefix ;;
1289  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1290  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1291    program_prefix=$ac_optarg ;;
1292
1293  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1294  | --program-suf | --program-su | --program-s)
1295    ac_prev=program_suffix ;;
1296  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1297  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1298    program_suffix=$ac_optarg ;;
1299
1300  -program-transform-name | --program-transform-name \
1301  | --program-transform-nam | --program-transform-na \
1302  | --program-transform-n | --program-transform- \
1303  | --program-transform | --program-transfor \
1304  | --program-transfo | --program-transf \
1305  | --program-trans | --program-tran \
1306  | --progr-tra | --program-tr | --program-t)
1307    ac_prev=program_transform_name ;;
1308  -program-transform-name=* | --program-transform-name=* \
1309  | --program-transform-nam=* | --program-transform-na=* \
1310  | --program-transform-n=* | --program-transform-=* \
1311  | --program-transform=* | --program-transfor=* \
1312  | --program-transfo=* | --program-transf=* \
1313  | --program-trans=* | --program-tran=* \
1314  | --progr-tra=* | --program-tr=* | --program-t=*)
1315    program_transform_name=$ac_optarg ;;
1316
1317  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1318    ac_prev=pdfdir ;;
1319  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1320    pdfdir=$ac_optarg ;;
1321
1322  -psdir | --psdir | --psdi | --psd | --ps)
1323    ac_prev=psdir ;;
1324  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1325    psdir=$ac_optarg ;;
1326
1327  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1328  | -silent | --silent | --silen | --sile | --sil)
1329    silent=yes ;;
1330
1331  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1332    ac_prev=sbindir ;;
1333  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1334  | --sbi=* | --sb=*)
1335    sbindir=$ac_optarg ;;
1336
1337  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1338  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1339  | --sharedst | --shareds | --shared | --share | --shar \
1340  | --sha | --sh)
1341    ac_prev=sharedstatedir ;;
1342  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1343  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1344  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1345  | --sha=* | --sh=*)
1346    sharedstatedir=$ac_optarg ;;
1347
1348  -site | --site | --sit)
1349    ac_prev=site ;;
1350  -site=* | --site=* | --sit=*)
1351    site=$ac_optarg ;;
1352
1353  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1354    ac_prev=srcdir ;;
1355  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1356    srcdir=$ac_optarg ;;
1357
1358  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1359  | --syscon | --sysco | --sysc | --sys | --sy)
1360    ac_prev=sysconfdir ;;
1361  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1362  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1363    sysconfdir=$ac_optarg ;;
1364
1365  -target | --target | --targe | --targ | --tar | --ta | --t)
1366    ac_prev=target_alias ;;
1367  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1368    target_alias=$ac_optarg ;;
1369
1370  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1371    verbose=yes ;;
1372
1373  -version | --version | --versio | --versi | --vers | -V)
1374    ac_init_version=: ;;
1375
1376  -with-* | --with-*)
1377    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1378    # Reject names that are not valid shell variable names.
1379    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1380      as_fn_error $? "invalid package name: $ac_useropt"
1381    ac_useropt_orig=$ac_useropt
1382    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1383    case $ac_user_opts in
1384      *"
1385"with_$ac_useropt"
1386"*) ;;
1387      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1388	 ac_unrecognized_sep=', ';;
1389    esac
1390    eval with_$ac_useropt=\$ac_optarg ;;
1391
1392  -without-* | --without-*)
1393    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1394    # Reject names that are not valid shell variable names.
1395    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1396      as_fn_error $? "invalid package name: $ac_useropt"
1397    ac_useropt_orig=$ac_useropt
1398    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1399    case $ac_user_opts in
1400      *"
1401"with_$ac_useropt"
1402"*) ;;
1403      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1404	 ac_unrecognized_sep=', ';;
1405    esac
1406    eval with_$ac_useropt=no ;;
1407
1408  --x)
1409    # Obsolete; use --with-x.
1410    with_x=yes ;;
1411
1412  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1413  | --x-incl | --x-inc | --x-in | --x-i)
1414    ac_prev=x_includes ;;
1415  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1416  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1417    x_includes=$ac_optarg ;;
1418
1419  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1420  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1421    ac_prev=x_libraries ;;
1422  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1423  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1424    x_libraries=$ac_optarg ;;
1425
1426  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1427Try \`$0 --help' for more information"
1428    ;;
1429
1430  *=*)
1431    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1432    # Reject names that are not valid shell variable names.
1433    case $ac_envvar in #(
1434      '' | [0-9]* | *[!_$as_cr_alnum]* )
1435      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1436    esac
1437    eval $ac_envvar=\$ac_optarg
1438    export $ac_envvar ;;
1439
1440  *)
1441    # FIXME: should be removed in autoconf 3.0.
1442    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1443    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1444      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1445    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1446    ;;
1447
1448  esac
1449done
1450
1451if test -n "$ac_prev"; then
1452  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1453  as_fn_error $? "missing argument to $ac_option"
1454fi
1455
1456if test -n "$ac_unrecognized_opts"; then
1457  case $enable_option_checking in
1458    no) ;;
1459    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1460    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1461  esac
1462fi
1463
1464# Check all directory arguments for consistency.
1465for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1466		datadir sysconfdir sharedstatedir localstatedir includedir \
1467		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1468		libdir localedir mandir
1469do
1470  eval ac_val=\$$ac_var
1471  # Remove trailing slashes.
1472  case $ac_val in
1473    */ )
1474      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1475      eval $ac_var=\$ac_val;;
1476  esac
1477  # Be sure to have absolute directory names.
1478  case $ac_val in
1479    [\\/$]* | ?:[\\/]* )  continue;;
1480    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1481  esac
1482  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1483done
1484
1485# There might be people who depend on the old broken behavior: `$host'
1486# used to hold the argument of --host etc.
1487# FIXME: To remove some day.
1488build=$build_alias
1489host=$host_alias
1490target=$target_alias
1491
1492# FIXME: To remove some day.
1493if test "x$host_alias" != x; then
1494  if test "x$build_alias" = x; then
1495    cross_compiling=maybe
1496    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1497    If a cross compiler is detected then cross compile mode will be used" >&2
1498  elif test "x$build_alias" != "x$host_alias"; then
1499    cross_compiling=yes
1500  fi
1501fi
1502
1503ac_tool_prefix=
1504test -n "$host_alias" && ac_tool_prefix=$host_alias-
1505
1506test "$silent" = yes && exec 6>/dev/null
1507
1508
1509ac_pwd=`pwd` && test -n "$ac_pwd" &&
1510ac_ls_di=`ls -di .` &&
1511ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1512  as_fn_error $? "working directory cannot be determined"
1513test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1514  as_fn_error $? "pwd does not report name of working directory"
1515
1516
1517# Find the source files, if location was not specified.
1518if test -z "$srcdir"; then
1519  ac_srcdir_defaulted=yes
1520  # Try the directory containing this script, then the parent directory.
1521  ac_confdir=`$as_dirname -- "$as_myself" ||
1522$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1523	 X"$as_myself" : 'X\(//\)[^/]' \| \
1524	 X"$as_myself" : 'X\(//\)$' \| \
1525	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1526$as_echo X"$as_myself" |
1527    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1528	    s//\1/
1529	    q
1530	  }
1531	  /^X\(\/\/\)[^/].*/{
1532	    s//\1/
1533	    q
1534	  }
1535	  /^X\(\/\/\)$/{
1536	    s//\1/
1537	    q
1538	  }
1539	  /^X\(\/\).*/{
1540	    s//\1/
1541	    q
1542	  }
1543	  s/.*/./; q'`
1544  srcdir=$ac_confdir
1545  if test ! -r "$srcdir/$ac_unique_file"; then
1546    srcdir=..
1547  fi
1548else
1549  ac_srcdir_defaulted=no
1550fi
1551if test ! -r "$srcdir/$ac_unique_file"; then
1552  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1553  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1554fi
1555ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1556ac_abs_confdir=`(
1557	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1558	pwd)`
1559# When building in place, set srcdir=.
1560if test "$ac_abs_confdir" = "$ac_pwd"; then
1561  srcdir=.
1562fi
1563# Remove unnecessary trailing slashes from srcdir.
1564# Double slashes in file names in object file debugging info
1565# mess up M-x gdb in Emacs.
1566case $srcdir in
1567*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1568esac
1569for ac_var in $ac_precious_vars; do
1570  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1571  eval ac_env_${ac_var}_value=\$${ac_var}
1572  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1573  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1574done
1575
1576#
1577# Report the --help message.
1578#
1579if test "$ac_init_help" = "long"; then
1580  # Omit some internal or obsolete options to make the list less imposing.
1581  # This message is too long to be a string in the A/UX 3.1 sh.
1582  cat <<_ACEOF
1583\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1584
1585Usage: $0 [OPTION]... [VAR=VALUE]...
1586
1587To assign environment variables (e.g., CC, CFLAGS...), specify them as
1588VAR=VALUE.  See below for descriptions of some of the useful variables.
1589
1590Defaults for the options are specified in brackets.
1591
1592Configuration:
1593  -h, --help              display this help and exit
1594      --help=short        display options specific to this package
1595      --help=recursive    display the short help of all the included packages
1596  -V, --version           display version information and exit
1597  -q, --quiet, --silent   do not print \`checking ...' messages
1598      --cache-file=FILE   cache test results in FILE [disabled]
1599  -C, --config-cache      alias for \`--cache-file=config.cache'
1600  -n, --no-create         do not create output files
1601      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1602
1603Installation directories:
1604  --prefix=PREFIX         install architecture-independent files in PREFIX
1605                          [$ac_default_prefix]
1606  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1607                          [PREFIX]
1608
1609By default, \`make install' will install all the files in
1610\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1611an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1612for instance \`--prefix=\$HOME'.
1613
1614For better control, use the options below.
1615
1616Fine tuning of the installation directories:
1617  --bindir=DIR            user executables [EPREFIX/bin]
1618  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1619  --libexecdir=DIR        program executables [EPREFIX/libexec]
1620  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1621  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1622  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1623  --libdir=DIR            object code libraries [EPREFIX/lib]
1624  --includedir=DIR        C header files [PREFIX/include]
1625  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1626  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1627  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1628  --infodir=DIR           info documentation [DATAROOTDIR/info]
1629  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1630  --mandir=DIR            man documentation [DATAROOTDIR/man]
1631  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1632  --htmldir=DIR           html documentation [DOCDIR]
1633  --dvidir=DIR            dvi documentation [DOCDIR]
1634  --pdfdir=DIR            pdf documentation [DOCDIR]
1635  --psdir=DIR             ps documentation [DOCDIR]
1636_ACEOF
1637
1638  cat <<\_ACEOF
1639
1640X features:
1641  --x-includes=DIR    X include files are in DIR
1642  --x-libraries=DIR   X library files are in DIR
1643
1644System types:
1645  --build=BUILD     configure for building on BUILD [guessed]
1646  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1647  --target=TARGET   configure for building compilers for TARGET [HOST]
1648_ACEOF
1649fi
1650
1651if test -n "$ac_init_help"; then
1652  case $ac_init_help in
1653     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1654   esac
1655  cat <<\_ACEOF
1656
1657Optional Features:
1658  --disable-option-checking  ignore unrecognized --enable/--with options
1659  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1660  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1661  --enable-openjdk-only   suppress building custom source even if present
1662                          [disabled]
1663  --enable-debug          set the debug level to fastdebug (shorthand for
1664                          --with-debug-level=fastdebug) [disabled]
1665  --disable-headful       disable building headful support (graphical UI
1666                          support) [enabled]
1667  --enable-hotspot-test-in-build
1668                          run the Queens test after Hotspot build [disabled]
1669  --enable-unlimited-crypto
1670                          Enable unlimited crypto policy [disabled]
1671  --disable-debug-symbols disable generation of debug symbols [enabled]
1672  --disable-zip-debug-info
1673                          disable zipping of debug-info files [enabled]
1674  --disable-macosx-runtime-support
1675                          disable the use of MacOSX Java runtime support
1676                          framework [enabled]
1677  --enable-sjavac         use sjavac to do fast incremental compiles
1678                          [disabled]
1679  --disable-precompiled-headers
1680                          disable using precompiled headers when compiling C++
1681                          [enabled]
1682  --disable-ccache        disable using ccache to speed up recompilations
1683                          [enabled]
1684
1685Optional Packages:
1686  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1687  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1688  --with-custom-make-dir  use this directory for custom build/make files
1689  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1690                          support it), e.g. --with-target-bits=32 [guessed]
1691  --with-sys-root         pass this sys-root to the compilers and tools (for
1692                          cross-compiling)
1693  --with-tools-dir        search this directory for compilers and tools (for
1694                          cross-compiling)
1695  --with-devkit           use this directory as base for tools-dir and
1696                          sys-root (for cross-compiling)
1697  --with-jdk-variant      JDK variant to build (normal) [normal]
1698  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1699                          client, minimal1, kernel, zero, zeroshark) [server]
1700  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1701                          [release]
1702  --with-conf-name        use this as the name of the configuration [generated
1703                          from important configuration options]
1704  --with-builddeps-conf   use this configuration file for the builddeps
1705  --with-builddeps-server download and use build dependencies from this server
1706                          url
1707  --with-builddeps-dir    store downloaded build dependencies here
1708                          [/localhome/builddeps]
1709  --with-builddeps-group  chgrp the downloaded build dependencies to this
1710                          group
1711  --with-cacerts-file     specify alternative cacerts file
1712  --with-milestone        Set milestone value for build [internal]
1713  --with-build-number     Set build number value for build [b00]
1714  --with-user-release-suffix
1715                          Add a custom string to the version string if build
1716                          number isn't set.[username_builddateb00]
1717  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1718  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1719                          invocations of the Boot JDK, overriding the default
1720                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1721                          -enableassertions"
1722  --with-add-source-root  for each and every source directory, look in this
1723                          additional source root for the same directory; if it
1724                          exists and have files in it, include it in the build
1725  --with-override-source-root
1726                          for each and every source directory, look in this
1727                          override source root for the same directory; if it
1728                          exists, use that directory instead and ignore the
1729                          directory in the original source root
1730  --with-adds-and-overrides
1731                          use the subdirs 'adds' and 'overrides' in the
1732                          specified directory as add-source-root and
1733                          override-source-root
1734  --with-override-langtools
1735                          use this langtools dir for the build
1736  --with-override-corba   use this corba dir for the build
1737  --with-override-jaxp    use this jaxp dir for the build
1738  --with-override-jaxws   use this jaxws dir for the build
1739  --with-override-hotspot use this hotspot dir for the build
1740  --with-override-jdk     use this jdk dir for the build
1741  --with-import-hotspot   import hotspot binaries from this jdk image or
1742                          hotspot build dist dir instead of building from
1743                          source
1744  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1745                          only) [probed]
1746  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1747  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1748  --with-extra-ldflags    extra flags to be used when linking jdk
1749  --with-x                use the X Window System
1750  --with-cups             specify prefix directory for the cups package
1751                          (expecting the headers under PATH/include)
1752  --with-cups-include     specify directory for the cups include files
1753  --with-freetype         specify prefix directory for the freetype2 package
1754                          (expecting the libraries under PATH/lib and the
1755                          headers under PATH/include)
1756  --with-alsa             specify prefix directory for the alsa package
1757                          (expecting the libraries under PATH/lib and the
1758                          headers under PATH/include)
1759  --with-alsa-include     specify directory for the alsa include files
1760  --with-alsa-lib         specify directory for the alsa library
1761  --with-zlib             use zlib from build system or OpenJDK source
1762                          (system, bundled) [bundled]
1763  --with-stdc++lib=<static>,<dynamic>,<default>
1764                          force linking of the C++ runtime on Linux to either
1765                          static or dynamic, default is static with dynamic as
1766                          fallback
1767  --with-num-cores        number of cores in the build system, e.g.
1768                          --with-num-cores=8 [probed]
1769  --with-memory-size      memory (in MB) available in the build system, e.g.
1770                          --with-memory-size=1024 [probed]
1771  --with-sjavac-server-java
1772                          use this java binary for running the sjavac
1773                          background server [Boot JDK java]
1774  --with-sjavac-server-cores
1775                          use at most this number of concurrent threads on the
1776                          sjavac server [probed]
1777  --with-ccache-dir       where to store ccache files [~/.ccache]
1778
1779Some influential environment variables:
1780  PKG_CONFIG  path to pkg-config utility
1781  CC          C compiler command
1782  CFLAGS      C compiler flags
1783  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1784              nonstandard directory <lib dir>
1785  LIBS        libraries to pass to the linker, e.g. -l<library>
1786  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1787              you have headers in a nonstandard directory <include dir>
1788  CXX         C++ compiler command
1789  CXXFLAGS    C++ compiler flags
1790  OBJC        Objective C compiler command
1791  OBJCFLAGS   Objective C compiler flags
1792  CPP         C preprocessor
1793  CXXCPP      C++ preprocessor
1794  XMKMF       Path to xmkmf, Makefile generator for X Window System
1795  FREETYPE2_CFLAGS
1796              C compiler flags for FREETYPE2, overriding pkg-config
1797  FREETYPE2_LIBS
1798              linker flags for FREETYPE2, overriding pkg-config
1799  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1800  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1801
1802Use these variables to override the choices made by `configure' or to help
1803it to find libraries and programs with nonstandard names/locations.
1804
1805Report bugs to <build-dev@openjdk.java.net>.
1806OpenJDK home page: <http://openjdk.java.net>.
1807_ACEOF
1808ac_status=$?
1809fi
1810
1811if test "$ac_init_help" = "recursive"; then
1812  # If there are subdirs, report their specific --help.
1813  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1814    test -d "$ac_dir" ||
1815      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1816      continue
1817    ac_builddir=.
1818
1819case "$ac_dir" in
1820.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1821*)
1822  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1823  # A ".." for each directory in $ac_dir_suffix.
1824  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1825  case $ac_top_builddir_sub in
1826  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1827  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1828  esac ;;
1829esac
1830ac_abs_top_builddir=$ac_pwd
1831ac_abs_builddir=$ac_pwd$ac_dir_suffix
1832# for backward compatibility:
1833ac_top_builddir=$ac_top_build_prefix
1834
1835case $srcdir in
1836  .)  # We are building in place.
1837    ac_srcdir=.
1838    ac_top_srcdir=$ac_top_builddir_sub
1839    ac_abs_top_srcdir=$ac_pwd ;;
1840  [\\/]* | ?:[\\/]* )  # Absolute name.
1841    ac_srcdir=$srcdir$ac_dir_suffix;
1842    ac_top_srcdir=$srcdir
1843    ac_abs_top_srcdir=$srcdir ;;
1844  *) # Relative name.
1845    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1846    ac_top_srcdir=$ac_top_build_prefix$srcdir
1847    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1848esac
1849ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1850
1851    cd "$ac_dir" || { ac_status=$?; continue; }
1852    # Check for guested configure.
1853    if test -f "$ac_srcdir/configure.gnu"; then
1854      echo &&
1855      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1856    elif test -f "$ac_srcdir/configure"; then
1857      echo &&
1858      $SHELL "$ac_srcdir/configure" --help=recursive
1859    else
1860      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1861    fi || ac_status=$?
1862    cd "$ac_pwd" || { ac_status=$?; break; }
1863  done
1864fi
1865
1866test -n "$ac_init_help" && exit $ac_status
1867if $ac_init_version; then
1868  cat <<\_ACEOF
1869OpenJDK configure jdk8
1870generated by GNU Autoconf 2.68
1871
1872Copyright (C) 2010 Free Software Foundation, Inc.
1873This configure script is free software; the Free Software Foundation
1874gives unlimited permission to copy, distribute and modify it.
1875_ACEOF
1876  exit
1877fi
1878
1879## ------------------------ ##
1880## Autoconf initialization. ##
1881## ------------------------ ##
1882
1883# ac_fn_c_try_compile LINENO
1884# --------------------------
1885# Try to compile conftest.$ac_ext, and return whether this succeeded.
1886ac_fn_c_try_compile ()
1887{
1888  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889  rm -f conftest.$ac_objext
1890  if { { ac_try="$ac_compile"
1891case "(($ac_try" in
1892  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1893  *) ac_try_echo=$ac_try;;
1894esac
1895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1896$as_echo "$ac_try_echo"; } >&5
1897  (eval "$ac_compile") 2>conftest.err
1898  ac_status=$?
1899  if test -s conftest.err; then
1900    grep -v '^ *+' conftest.err >conftest.er1
1901    cat conftest.er1 >&5
1902    mv -f conftest.er1 conftest.err
1903  fi
1904  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1905  test $ac_status = 0; } && {
1906	 test -z "$ac_c_werror_flag" ||
1907	 test ! -s conftest.err
1908       } && test -s conftest.$ac_objext; then :
1909  ac_retval=0
1910else
1911  $as_echo "$as_me: failed program was:" >&5
1912sed 's/^/| /' conftest.$ac_ext >&5
1913
1914	ac_retval=1
1915fi
1916  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1917  as_fn_set_status $ac_retval
1918
1919} # ac_fn_c_try_compile
1920
1921# ac_fn_cxx_try_compile LINENO
1922# ----------------------------
1923# Try to compile conftest.$ac_ext, and return whether this succeeded.
1924ac_fn_cxx_try_compile ()
1925{
1926  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1927  rm -f conftest.$ac_objext
1928  if { { ac_try="$ac_compile"
1929case "(($ac_try" in
1930  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1931  *) ac_try_echo=$ac_try;;
1932esac
1933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1934$as_echo "$ac_try_echo"; } >&5
1935  (eval "$ac_compile") 2>conftest.err
1936  ac_status=$?
1937  if test -s conftest.err; then
1938    grep -v '^ *+' conftest.err >conftest.er1
1939    cat conftest.er1 >&5
1940    mv -f conftest.er1 conftest.err
1941  fi
1942  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1943  test $ac_status = 0; } && {
1944	 test -z "$ac_cxx_werror_flag" ||
1945	 test ! -s conftest.err
1946       } && test -s conftest.$ac_objext; then :
1947  ac_retval=0
1948else
1949  $as_echo "$as_me: failed program was:" >&5
1950sed 's/^/| /' conftest.$ac_ext >&5
1951
1952	ac_retval=1
1953fi
1954  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1955  as_fn_set_status $ac_retval
1956
1957} # ac_fn_cxx_try_compile
1958
1959# ac_fn_objc_try_compile LINENO
1960# -----------------------------
1961# Try to compile conftest.$ac_ext, and return whether this succeeded.
1962ac_fn_objc_try_compile ()
1963{
1964  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1965  rm -f conftest.$ac_objext
1966  if { { ac_try="$ac_compile"
1967case "(($ac_try" in
1968  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1969  *) ac_try_echo=$ac_try;;
1970esac
1971eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1972$as_echo "$ac_try_echo"; } >&5
1973  (eval "$ac_compile") 2>conftest.err
1974  ac_status=$?
1975  if test -s conftest.err; then
1976    grep -v '^ *+' conftest.err >conftest.er1
1977    cat conftest.er1 >&5
1978    mv -f conftest.er1 conftest.err
1979  fi
1980  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1981  test $ac_status = 0; } && {
1982	 test -z "$ac_objc_werror_flag" ||
1983	 test ! -s conftest.err
1984       } && test -s conftest.$ac_objext; then :
1985  ac_retval=0
1986else
1987  $as_echo "$as_me: failed program was:" >&5
1988sed 's/^/| /' conftest.$ac_ext >&5
1989
1990	ac_retval=1
1991fi
1992  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1993  as_fn_set_status $ac_retval
1994
1995} # ac_fn_objc_try_compile
1996
1997# ac_fn_c_try_cpp LINENO
1998# ----------------------
1999# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2000ac_fn_c_try_cpp ()
2001{
2002  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2003  if { { ac_try="$ac_cpp conftest.$ac_ext"
2004case "(($ac_try" in
2005  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2006  *) ac_try_echo=$ac_try;;
2007esac
2008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2009$as_echo "$ac_try_echo"; } >&5
2010  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2011  ac_status=$?
2012  if test -s conftest.err; then
2013    grep -v '^ *+' conftest.err >conftest.er1
2014    cat conftest.er1 >&5
2015    mv -f conftest.er1 conftest.err
2016  fi
2017  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2018  test $ac_status = 0; } > conftest.i && {
2019	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2020	 test ! -s conftest.err
2021       }; then :
2022  ac_retval=0
2023else
2024  $as_echo "$as_me: failed program was:" >&5
2025sed 's/^/| /' conftest.$ac_ext >&5
2026
2027    ac_retval=1
2028fi
2029  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2030  as_fn_set_status $ac_retval
2031
2032} # ac_fn_c_try_cpp
2033
2034# ac_fn_cxx_try_cpp LINENO
2035# ------------------------
2036# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2037ac_fn_cxx_try_cpp ()
2038{
2039  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2040  if { { ac_try="$ac_cpp conftest.$ac_ext"
2041case "(($ac_try" in
2042  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2043  *) ac_try_echo=$ac_try;;
2044esac
2045eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2046$as_echo "$ac_try_echo"; } >&5
2047  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2048  ac_status=$?
2049  if test -s conftest.err; then
2050    grep -v '^ *+' conftest.err >conftest.er1
2051    cat conftest.er1 >&5
2052    mv -f conftest.er1 conftest.err
2053  fi
2054  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2055  test $ac_status = 0; } > conftest.i && {
2056	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2057	 test ! -s conftest.err
2058       }; then :
2059  ac_retval=0
2060else
2061  $as_echo "$as_me: failed program was:" >&5
2062sed 's/^/| /' conftest.$ac_ext >&5
2063
2064    ac_retval=1
2065fi
2066  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2067  as_fn_set_status $ac_retval
2068
2069} # ac_fn_cxx_try_cpp
2070
2071# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2072# ---------------------------------------------------------
2073# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2074# the include files in INCLUDES and setting the cache variable VAR
2075# accordingly.
2076ac_fn_cxx_check_header_mongrel ()
2077{
2078  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2079  if eval \${$3+:} false; then :
2080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2081$as_echo_n "checking for $2... " >&6; }
2082if eval \${$3+:} false; then :
2083  $as_echo_n "(cached) " >&6
2084fi
2085eval ac_res=\$$3
2086	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2087$as_echo "$ac_res" >&6; }
2088else
2089  # Is the header compilable?
2090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2091$as_echo_n "checking $2 usability... " >&6; }
2092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h.  */
2094$4
2095#include <$2>
2096_ACEOF
2097if ac_fn_cxx_try_compile "$LINENO"; then :
2098  ac_header_compiler=yes
2099else
2100  ac_header_compiler=no
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2104$as_echo "$ac_header_compiler" >&6; }
2105
2106# Is the header present?
2107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2108$as_echo_n "checking $2 presence... " >&6; }
2109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h.  */
2111#include <$2>
2112_ACEOF
2113if ac_fn_cxx_try_cpp "$LINENO"; then :
2114  ac_header_preproc=yes
2115else
2116  ac_header_preproc=no
2117fi
2118rm -f conftest.err conftest.i conftest.$ac_ext
2119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2120$as_echo "$ac_header_preproc" >&6; }
2121
2122# So?  What about this header?
2123case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2124  yes:no: )
2125    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2126$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2127    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2128$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2129    ;;
2130  no:yes:* )
2131    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2132$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2133    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2134$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2135    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2136$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2137    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2138$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2139    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2140$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2141( $as_echo "## ----------------------------------------- ##
2142## Report this to build-dev@openjdk.java.net ##
2143## ----------------------------------------- ##"
2144     ) | sed "s/^/$as_me: WARNING:     /" >&2
2145    ;;
2146esac
2147  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2148$as_echo_n "checking for $2... " >&6; }
2149if eval \${$3+:} false; then :
2150  $as_echo_n "(cached) " >&6
2151else
2152  eval "$3=\$ac_header_compiler"
2153fi
2154eval ac_res=\$$3
2155	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2156$as_echo "$ac_res" >&6; }
2157fi
2158  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2159
2160} # ac_fn_cxx_check_header_mongrel
2161
2162# ac_fn_cxx_try_run LINENO
2163# ------------------------
2164# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2165# that executables *can* be run.
2166ac_fn_cxx_try_run ()
2167{
2168  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2169  if { { ac_try="$ac_link"
2170case "(($ac_try" in
2171  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2172  *) ac_try_echo=$ac_try;;
2173esac
2174eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2175$as_echo "$ac_try_echo"; } >&5
2176  (eval "$ac_link") 2>&5
2177  ac_status=$?
2178  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2179  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2180  { { case "(($ac_try" in
2181  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2182  *) ac_try_echo=$ac_try;;
2183esac
2184eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2185$as_echo "$ac_try_echo"; } >&5
2186  (eval "$ac_try") 2>&5
2187  ac_status=$?
2188  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2189  test $ac_status = 0; }; }; then :
2190  ac_retval=0
2191else
2192  $as_echo "$as_me: program exited with status $ac_status" >&5
2193       $as_echo "$as_me: failed program was:" >&5
2194sed 's/^/| /' conftest.$ac_ext >&5
2195
2196       ac_retval=$ac_status
2197fi
2198  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2199  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2200  as_fn_set_status $ac_retval
2201
2202} # ac_fn_cxx_try_run
2203
2204# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2205# ---------------------------------------------------------
2206# Tests whether HEADER exists and can be compiled using the include files in
2207# INCLUDES, setting the cache variable VAR accordingly.
2208ac_fn_cxx_check_header_compile ()
2209{
2210  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2212$as_echo_n "checking for $2... " >&6; }
2213if eval \${$3+:} false; then :
2214  $as_echo_n "(cached) " >&6
2215else
2216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2217/* end confdefs.h.  */
2218$4
2219#include <$2>
2220_ACEOF
2221if ac_fn_cxx_try_compile "$LINENO"; then :
2222  eval "$3=yes"
2223else
2224  eval "$3=no"
2225fi
2226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2227fi
2228eval ac_res=\$$3
2229	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2230$as_echo "$ac_res" >&6; }
2231  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2232
2233} # ac_fn_cxx_check_header_compile
2234
2235# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2236# ----------------------------------------------
2237# Tries to find the compile-time value of EXPR in a program that includes
2238# INCLUDES, setting VAR accordingly. Returns whether the value could be
2239# computed
2240ac_fn_cxx_compute_int ()
2241{
2242  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243  if test "$cross_compiling" = yes; then
2244    # Depending upon the size, compute the lo and hi bounds.
2245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h.  */
2247$4
2248int
2249main ()
2250{
2251static int test_array [1 - 2 * !(($2) >= 0)];
2252test_array [0] = 0
2253
2254  ;
2255  return 0;
2256}
2257_ACEOF
2258if ac_fn_cxx_try_compile "$LINENO"; then :
2259  ac_lo=0 ac_mid=0
2260  while :; do
2261    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h.  */
2263$4
2264int
2265main ()
2266{
2267static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2268test_array [0] = 0
2269
2270  ;
2271  return 0;
2272}
2273_ACEOF
2274if ac_fn_cxx_try_compile "$LINENO"; then :
2275  ac_hi=$ac_mid; break
2276else
2277  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2278			if test $ac_lo -le $ac_mid; then
2279			  ac_lo= ac_hi=
2280			  break
2281			fi
2282			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2283fi
2284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285  done
2286else
2287  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288/* end confdefs.h.  */
2289$4
2290int
2291main ()
2292{
2293static int test_array [1 - 2 * !(($2) < 0)];
2294test_array [0] = 0
2295
2296  ;
2297  return 0;
2298}
2299_ACEOF
2300if ac_fn_cxx_try_compile "$LINENO"; then :
2301  ac_hi=-1 ac_mid=-1
2302  while :; do
2303    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h.  */
2305$4
2306int
2307main ()
2308{
2309static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2310test_array [0] = 0
2311
2312  ;
2313  return 0;
2314}
2315_ACEOF
2316if ac_fn_cxx_try_compile "$LINENO"; then :
2317  ac_lo=$ac_mid; break
2318else
2319  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2320			if test $ac_mid -le $ac_hi; then
2321			  ac_lo= ac_hi=
2322			  break
2323			fi
2324			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327  done
2328else
2329  ac_lo= ac_hi=
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334# Binary search between lo and hi bounds.
2335while test "x$ac_lo" != "x$ac_hi"; do
2336  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2338/* end confdefs.h.  */
2339$4
2340int
2341main ()
2342{
2343static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2344test_array [0] = 0
2345
2346  ;
2347  return 0;
2348}
2349_ACEOF
2350if ac_fn_cxx_try_compile "$LINENO"; then :
2351  ac_hi=$ac_mid
2352else
2353  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2354fi
2355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356done
2357case $ac_lo in #((
2358?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2359'') ac_retval=1 ;;
2360esac
2361  else
2362    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2363/* end confdefs.h.  */
2364$4
2365static long int longval () { return $2; }
2366static unsigned long int ulongval () { return $2; }
2367#include <stdio.h>
2368#include <stdlib.h>
2369int
2370main ()
2371{
2372
2373  FILE *f = fopen ("conftest.val", "w");
2374  if (! f)
2375    return 1;
2376  if (($2) < 0)
2377    {
2378      long int i = longval ();
2379      if (i != ($2))
2380	return 1;
2381      fprintf (f, "%ld", i);
2382    }
2383  else
2384    {
2385      unsigned long int i = ulongval ();
2386      if (i != ($2))
2387	return 1;
2388      fprintf (f, "%lu", i);
2389    }
2390  /* Do not output a trailing newline, as this causes \r\n confusion
2391     on some platforms.  */
2392  return ferror (f) || fclose (f) != 0;
2393
2394  ;
2395  return 0;
2396}
2397_ACEOF
2398if ac_fn_cxx_try_run "$LINENO"; then :
2399  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2400else
2401  ac_retval=1
2402fi
2403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2404  conftest.$ac_objext conftest.beam conftest.$ac_ext
2405rm -f conftest.val
2406
2407  fi
2408  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2409  as_fn_set_status $ac_retval
2410
2411} # ac_fn_cxx_compute_int
2412
2413# ac_fn_cxx_try_link LINENO
2414# -------------------------
2415# Try to link conftest.$ac_ext, and return whether this succeeded.
2416ac_fn_cxx_try_link ()
2417{
2418  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2419  rm -f conftest.$ac_objext conftest$ac_exeext
2420  if { { ac_try="$ac_link"
2421case "(($ac_try" in
2422  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2423  *) ac_try_echo=$ac_try;;
2424esac
2425eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2426$as_echo "$ac_try_echo"; } >&5
2427  (eval "$ac_link") 2>conftest.err
2428  ac_status=$?
2429  if test -s conftest.err; then
2430    grep -v '^ *+' conftest.err >conftest.er1
2431    cat conftest.er1 >&5
2432    mv -f conftest.er1 conftest.err
2433  fi
2434  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2435  test $ac_status = 0; } && {
2436	 test -z "$ac_cxx_werror_flag" ||
2437	 test ! -s conftest.err
2438       } && test -s conftest$ac_exeext && {
2439	 test "$cross_compiling" = yes ||
2440	 $as_test_x conftest$ac_exeext
2441       }; then :
2442  ac_retval=0
2443else
2444  $as_echo "$as_me: failed program was:" >&5
2445sed 's/^/| /' conftest.$ac_ext >&5
2446
2447	ac_retval=1
2448fi
2449  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2450  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2451  # interfere with the next link command; also delete a directory that is
2452  # left behind by Apple's compiler.  We do this before executing the actions.
2453  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2454  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2455  as_fn_set_status $ac_retval
2456
2457} # ac_fn_cxx_try_link
2458
2459# ac_fn_cxx_check_func LINENO FUNC VAR
2460# ------------------------------------
2461# Tests whether FUNC exists, setting the cache variable VAR accordingly
2462ac_fn_cxx_check_func ()
2463{
2464  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2466$as_echo_n "checking for $2... " >&6; }
2467if eval \${$3+:} false; then :
2468  $as_echo_n "(cached) " >&6
2469else
2470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2471/* end confdefs.h.  */
2472/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2473   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2474#define $2 innocuous_$2
2475
2476/* System header to define __stub macros and hopefully few prototypes,
2477    which can conflict with char $2 (); below.
2478    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2479    <limits.h> exists even on freestanding compilers.  */
2480
2481#ifdef __STDC__
2482# include <limits.h>
2483#else
2484# include <assert.h>
2485#endif
2486
2487#undef $2
2488
2489/* Override any GCC internal prototype to avoid an error.
2490   Use char because int might match the return type of a GCC
2491   builtin and then its argument prototype would still apply.  */
2492#ifdef __cplusplus
2493extern "C"
2494#endif
2495char $2 ();
2496/* The GNU C library defines this for functions which it implements
2497    to always fail with ENOSYS.  Some functions are actually named
2498    something starting with __ and the normal name is an alias.  */
2499#if defined __stub_$2 || defined __stub___$2
2500choke me
2501#endif
2502
2503int
2504main ()
2505{
2506return $2 ();
2507  ;
2508  return 0;
2509}
2510_ACEOF
2511if ac_fn_cxx_try_link "$LINENO"; then :
2512  eval "$3=yes"
2513else
2514  eval "$3=no"
2515fi
2516rm -f core conftest.err conftest.$ac_objext \
2517    conftest$ac_exeext conftest.$ac_ext
2518fi
2519eval ac_res=\$$3
2520	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2521$as_echo "$ac_res" >&6; }
2522  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2523
2524} # ac_fn_cxx_check_func
2525
2526# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2527# -------------------------------------------------------
2528# Tests whether HEADER exists and can be compiled using the include files in
2529# INCLUDES, setting the cache variable VAR accordingly.
2530ac_fn_c_check_header_compile ()
2531{
2532  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2534$as_echo_n "checking for $2... " >&6; }
2535if eval \${$3+:} false; then :
2536  $as_echo_n "(cached) " >&6
2537else
2538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2539/* end confdefs.h.  */
2540$4
2541#include <$2>
2542_ACEOF
2543if ac_fn_c_try_compile "$LINENO"; then :
2544  eval "$3=yes"
2545else
2546  eval "$3=no"
2547fi
2548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2549fi
2550eval ac_res=\$$3
2551	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2552$as_echo "$ac_res" >&6; }
2553  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2554
2555} # ac_fn_c_check_header_compile
2556cat >config.log <<_ACEOF
2557This file contains any messages produced by compilers while
2558running configure, to aid debugging if configure makes a mistake.
2559
2560It was created by OpenJDK $as_me jdk8, which was
2561generated by GNU Autoconf 2.68.  Invocation command line was
2562
2563  $ $0 $@
2564
2565_ACEOF
2566exec 5>>config.log
2567{
2568cat <<_ASUNAME
2569## --------- ##
2570## Platform. ##
2571## --------- ##
2572
2573hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2574uname -m = `(uname -m) 2>/dev/null || echo unknown`
2575uname -r = `(uname -r) 2>/dev/null || echo unknown`
2576uname -s = `(uname -s) 2>/dev/null || echo unknown`
2577uname -v = `(uname -v) 2>/dev/null || echo unknown`
2578
2579/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2580/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2581
2582/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2583/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2584/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2585/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2586/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2587/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2588/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2589
2590_ASUNAME
2591
2592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2593for as_dir in $PATH
2594do
2595  IFS=$as_save_IFS
2596  test -z "$as_dir" && as_dir=.
2597    $as_echo "PATH: $as_dir"
2598  done
2599IFS=$as_save_IFS
2600
2601} >&5
2602
2603cat >&5 <<_ACEOF
2604
2605
2606## ----------- ##
2607## Core tests. ##
2608## ----------- ##
2609
2610_ACEOF
2611
2612
2613# Keep a trace of the command line.
2614# Strip out --no-create and --no-recursion so they do not pile up.
2615# Strip out --silent because we don't want to record it for future runs.
2616# Also quote any args containing shell meta-characters.
2617# Make two passes to allow for proper duplicate-argument suppression.
2618ac_configure_args=
2619ac_configure_args0=
2620ac_configure_args1=
2621ac_must_keep_next=false
2622for ac_pass in 1 2
2623do
2624  for ac_arg
2625  do
2626    case $ac_arg in
2627    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2628    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2629    | -silent | --silent | --silen | --sile | --sil)
2630      continue ;;
2631    *\'*)
2632      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2633    esac
2634    case $ac_pass in
2635    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2636    2)
2637      as_fn_append ac_configure_args1 " '$ac_arg'"
2638      if test $ac_must_keep_next = true; then
2639	ac_must_keep_next=false # Got value, back to normal.
2640      else
2641	case $ac_arg in
2642	  *=* | --config-cache | -C | -disable-* | --disable-* \
2643	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2644	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2645	  | -with-* | --with-* | -without-* | --without-* | --x)
2646	    case "$ac_configure_args0 " in
2647	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2648	    esac
2649	    ;;
2650	  -* ) ac_must_keep_next=true ;;
2651	esac
2652      fi
2653      as_fn_append ac_configure_args " '$ac_arg'"
2654      ;;
2655    esac
2656  done
2657done
2658{ ac_configure_args0=; unset ac_configure_args0;}
2659{ ac_configure_args1=; unset ac_configure_args1;}
2660
2661# When interrupted or exit'd, cleanup temporary files, and complete
2662# config.log.  We remove comments because anyway the quotes in there
2663# would cause problems or look ugly.
2664# WARNING: Use '\'' to represent an apostrophe within the trap.
2665# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2666trap 'exit_status=$?
2667  # Save into config.log some information that might help in debugging.
2668  {
2669    echo
2670
2671    $as_echo "## ---------------- ##
2672## Cache variables. ##
2673## ---------------- ##"
2674    echo
2675    # The following way of writing the cache mishandles newlines in values,
2676(
2677  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2678    eval ac_val=\$$ac_var
2679    case $ac_val in #(
2680    *${as_nl}*)
2681      case $ac_var in #(
2682      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2683$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2684      esac
2685      case $ac_var in #(
2686      _ | IFS | as_nl) ;; #(
2687      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2688      *) { eval $ac_var=; unset $ac_var;} ;;
2689      esac ;;
2690    esac
2691  done
2692  (set) 2>&1 |
2693    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2694    *${as_nl}ac_space=\ *)
2695      sed -n \
2696	"s/'\''/'\''\\\\'\'''\''/g;
2697	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2698      ;; #(
2699    *)
2700      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2701      ;;
2702    esac |
2703    sort
2704)
2705    echo
2706
2707    $as_echo "## ----------------- ##
2708## Output variables. ##
2709## ----------------- ##"
2710    echo
2711    for ac_var in $ac_subst_vars
2712    do
2713      eval ac_val=\$$ac_var
2714      case $ac_val in
2715      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2716      esac
2717      $as_echo "$ac_var='\''$ac_val'\''"
2718    done | sort
2719    echo
2720
2721    if test -n "$ac_subst_files"; then
2722      $as_echo "## ------------------- ##
2723## File substitutions. ##
2724## ------------------- ##"
2725      echo
2726      for ac_var in $ac_subst_files
2727      do
2728	eval ac_val=\$$ac_var
2729	case $ac_val in
2730	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2731	esac
2732	$as_echo "$ac_var='\''$ac_val'\''"
2733      done | sort
2734      echo
2735    fi
2736
2737    if test -s confdefs.h; then
2738      $as_echo "## ----------- ##
2739## confdefs.h. ##
2740## ----------- ##"
2741      echo
2742      cat confdefs.h
2743      echo
2744    fi
2745    test "$ac_signal" != 0 &&
2746      $as_echo "$as_me: caught signal $ac_signal"
2747    $as_echo "$as_me: exit $exit_status"
2748  } >&5
2749  rm -f core *.core core.conftest.* &&
2750    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2751    exit $exit_status
2752' 0
2753for ac_signal in 1 2 13 15; do
2754  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2755done
2756ac_signal=0
2757
2758# confdefs.h avoids OS command line length limits that DEFS can exceed.
2759rm -f -r conftest* confdefs.h
2760
2761$as_echo "/* confdefs.h */" > confdefs.h
2762
2763# Predefined preprocessor variables.
2764
2765cat >>confdefs.h <<_ACEOF
2766#define PACKAGE_NAME "$PACKAGE_NAME"
2767_ACEOF
2768
2769cat >>confdefs.h <<_ACEOF
2770#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2771_ACEOF
2772
2773cat >>confdefs.h <<_ACEOF
2774#define PACKAGE_VERSION "$PACKAGE_VERSION"
2775_ACEOF
2776
2777cat >>confdefs.h <<_ACEOF
2778#define PACKAGE_STRING "$PACKAGE_STRING"
2779_ACEOF
2780
2781cat >>confdefs.h <<_ACEOF
2782#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2783_ACEOF
2784
2785cat >>confdefs.h <<_ACEOF
2786#define PACKAGE_URL "$PACKAGE_URL"
2787_ACEOF
2788
2789
2790# Let the site file select an alternate cache file if it wants to.
2791# Prefer an explicitly selected file to automatically selected ones.
2792ac_site_file1=NONE
2793ac_site_file2=NONE
2794if test -n "$CONFIG_SITE"; then
2795  # We do not want a PATH search for config.site.
2796  case $CONFIG_SITE in #((
2797    -*)  ac_site_file1=./$CONFIG_SITE;;
2798    */*) ac_site_file1=$CONFIG_SITE;;
2799    *)   ac_site_file1=./$CONFIG_SITE;;
2800  esac
2801elif test "x$prefix" != xNONE; then
2802  ac_site_file1=$prefix/share/config.site
2803  ac_site_file2=$prefix/etc/config.site
2804else
2805  ac_site_file1=$ac_default_prefix/share/config.site
2806  ac_site_file2=$ac_default_prefix/etc/config.site
2807fi
2808for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2809do
2810  test "x$ac_site_file" = xNONE && continue
2811  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2812    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2813$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2814    sed 's/^/| /' "$ac_site_file" >&5
2815    . "$ac_site_file" \
2816      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2817$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2818as_fn_error $? "failed to load site script $ac_site_file
2819See \`config.log' for more details" "$LINENO" 5; }
2820  fi
2821done
2822
2823if test -r "$cache_file"; then
2824  # Some versions of bash will fail to source /dev/null (special files
2825  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2826  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2827    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2828$as_echo "$as_me: loading cache $cache_file" >&6;}
2829    case $cache_file in
2830      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2831      *)                      . "./$cache_file";;
2832    esac
2833  fi
2834else
2835  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2836$as_echo "$as_me: creating cache $cache_file" >&6;}
2837  >$cache_file
2838fi
2839
2840# Check that the precious variables saved in the cache have kept the same
2841# value.
2842ac_cache_corrupted=false
2843for ac_var in $ac_precious_vars; do
2844  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2845  eval ac_new_set=\$ac_env_${ac_var}_set
2846  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2847  eval ac_new_val=\$ac_env_${ac_var}_value
2848  case $ac_old_set,$ac_new_set in
2849    set,)
2850      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2851$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2852      ac_cache_corrupted=: ;;
2853    ,set)
2854      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2855$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2856      ac_cache_corrupted=: ;;
2857    ,);;
2858    *)
2859      if test "x$ac_old_val" != "x$ac_new_val"; then
2860	# differences in whitespace do not lead to failure.
2861	ac_old_val_w=`echo x $ac_old_val`
2862	ac_new_val_w=`echo x $ac_new_val`
2863	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2864	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2865$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2866	  ac_cache_corrupted=:
2867	else
2868	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2869$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2870	  eval $ac_var=\$ac_old_val
2871	fi
2872	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2873$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2874	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2875$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2876      fi;;
2877  esac
2878  # Pass precious variables to config.status.
2879  if test "$ac_new_set" = set; then
2880    case $ac_new_val in
2881    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2882    *) ac_arg=$ac_var=$ac_new_val ;;
2883    esac
2884    case " $ac_configure_args " in
2885      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2886      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2887    esac
2888  fi
2889done
2890if $ac_cache_corrupted; then
2891  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2893  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2894$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2895  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2896fi
2897## -------------------- ##
2898## Main body of script. ##
2899## -------------------- ##
2900
2901ac_ext=c
2902ac_cpp='$CPP $CPPFLAGS'
2903ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2904ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2905ac_compiler_gnu=$ac_cv_c_compiler_gnu
2906
2907
2908
2909ac_aux_dir=
2910for ac_dir in build-aux "$srcdir"/build-aux; do
2911  if test -f "$ac_dir/install-sh"; then
2912    ac_aux_dir=$ac_dir
2913    ac_install_sh="$ac_aux_dir/install-sh -c"
2914    break
2915  elif test -f "$ac_dir/install.sh"; then
2916    ac_aux_dir=$ac_dir
2917    ac_install_sh="$ac_aux_dir/install.sh -c"
2918    break
2919  elif test -f "$ac_dir/shtool"; then
2920    ac_aux_dir=$ac_dir
2921    ac_install_sh="$ac_aux_dir/shtool install -c"
2922    break
2923  fi
2924done
2925if test -z "$ac_aux_dir"; then
2926  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2927fi
2928
2929# These three variables are undocumented and unsupported,
2930# and are intended to be withdrawn in a future Autoconf release.
2931# They can cause serious problems if a builder's source tree is in a directory
2932# whose full name contains unusual characters.
2933ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2934ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2935ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2936
2937
2938# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2939
2940#
2941# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2942# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2943#
2944# This code is free software; you can redistribute it and/or modify it
2945# under the terms of the GNU General Public License version 2 only, as
2946# published by the Free Software Foundation.  Oracle designates this
2947# particular file as subject to the "Classpath" exception as provided
2948# by Oracle in the LICENSE file that accompanied this code.
2949#
2950# This code is distributed in the hope that it will be useful, but WITHOUT
2951# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2952# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2953# version 2 for more details (a copy is included in the LICENSE file that
2954# accompanied this code).
2955#
2956# You should have received a copy of the GNU General Public License version
2957# 2 along with this work; if not, write to the Free Software Foundation,
2958# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2959#
2960# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2961# or visit www.oracle.com if you need additional information or have any
2962# questions.
2963#
2964
2965#
2966# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2967#
2968# This program is free software; you can redistribute it and/or modify
2969# it under the terms of the GNU General Public License as published by
2970# the Free Software Foundation; either version 2 of the License, or
2971# (at your option) any later version.
2972#
2973# This program is distributed in the hope that it will be useful, but
2974# WITHOUT ANY WARRANTY; without even the implied warranty of
2975# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2976# General Public License for more details.
2977#
2978# You should have received a copy of the GNU General Public License
2979# along with this program; if not, write to the Free Software
2980# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2981#
2982# As a special exception to the GNU General Public License, if you
2983# distribute this file as part of a program that contains a
2984# configuration script generated by Autoconf, you may include it under
2985# the same distribution terms that you use for the rest of that program.
2986
2987# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2988# ----------------------------------
2989# PKG_PROG_PKG_CONFIG
2990
2991# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2992#
2993# Check to see whether a particular set of modules exists.  Similar
2994# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2995#
2996#
2997# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2998# this or PKG_CHECK_MODULES is called, or make sure to call
2999# PKG_CHECK_EXISTS manually
3000# --------------------------------------------------------------
3001
3002
3003
3004# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3005# ---------------------------------------------
3006# _PKG_CONFIG
3007
3008# _PKG_SHORT_ERRORS_SUPPORTED
3009# -----------------------------
3010# _PKG_SHORT_ERRORS_SUPPORTED
3011
3012
3013# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3014# [ACTION-IF-NOT-FOUND])
3015#
3016#
3017# Note that if there is a possibility the first call to
3018# PKG_CHECK_MODULES might not happen, you should be sure to include an
3019# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3020#
3021#
3022# --------------------------------------------------------------
3023# PKG_CHECK_MODULES
3024
3025
3026# Include these first...
3027#
3028# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3029# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3030#
3031# This code is free software; you can redistribute it and/or modify it
3032# under the terms of the GNU General Public License version 2 only, as
3033# published by the Free Software Foundation.  Oracle designates this
3034# particular file as subject to the "Classpath" exception as provided
3035# by Oracle in the LICENSE file that accompanied this code.
3036#
3037# This code is distributed in the hope that it will be useful, but WITHOUT
3038# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3039# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3040# version 2 for more details (a copy is included in the LICENSE file that
3041# accompanied this code).
3042#
3043# You should have received a copy of the GNU General Public License version
3044# 2 along with this work; if not, write to the Free Software Foundation,
3045# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3046#
3047# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3048# or visit www.oracle.com if you need additional information or have any
3049# questions.
3050#
3051
3052
3053
3054# This will make sure the given variable points to a full and proper
3055# path. This means:
3056# 1) There will be no spaces in the path. On posix platforms,
3057#    spaces in the path will result in an error. On Windows,
3058#    the path will be rewritten using short-style to be space-free.
3059# 2) The path will be absolute, and it will be in unix-style (on
3060#     cygwin).
3061# $1: The name of the variable to fix
3062
3063
3064# This will make sure the given variable points to a executable
3065# with a full and proper path. This means:
3066# 1) There will be no spaces in the path. On posix platforms,
3067#    spaces in the path will result in an error. On Windows,
3068#    the path will be rewritten using short-style to be space-free.
3069# 2) The path will be absolute, and it will be in unix-style (on
3070#     cygwin).
3071# Any arguments given to the executable is preserved.
3072# If the input variable does not have a directory specification, then
3073# it need to be in the PATH.
3074# $1: The name of the variable to fix
3075
3076
3077
3078
3079
3080
3081# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3082# $1: variable to check
3083# $2: executable name to print in warning (optional)
3084
3085
3086# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3087# Arguments as AC_PATH_PROG:
3088# $1: variable to set
3089# $2: executable name to look for
3090
3091
3092# Setup the most fundamental tools that relies on not much else to set up,
3093# but is used by much of the early bootstrap code.
3094
3095
3096# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3097
3098
3099
3100
3101
3102
3103
3104#%%% Simple tools %%%
3105
3106# Check if we have found a usable version of make
3107# $1: the path to a potential make binary (or empty)
3108# $2: the description on how we found this
3109
3110
3111# Goes looking for a usable version of GNU make.
3112
3113
3114
3115
3116
3117
3118# Check if build directory is on local disk. If not possible to determine,
3119# we prefer to claim it's local.
3120# Argument 1: directory to test
3121# Argument 2: what to do if it is on local disk
3122# Argument 3: what to do otherwise (remote disk or failure)
3123
3124
3125# Check that source files have basic read permissions set. This might
3126# not be the case in cygwin in certain conditions.
3127
3128
3129
3130
3131#
3132# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3133# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3134#
3135# This code is free software; you can redistribute it and/or modify it
3136# under the terms of the GNU General Public License version 2 only, as
3137# published by the Free Software Foundation.  Oracle designates this
3138# particular file as subject to the "Classpath" exception as provided
3139# by Oracle in the LICENSE file that accompanied this code.
3140#
3141# This code is distributed in the hope that it will be useful, but WITHOUT
3142# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3143# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3144# version 2 for more details (a copy is included in the LICENSE file that
3145# accompanied this code).
3146#
3147# You should have received a copy of the GNU General Public License version
3148# 2 along with this work; if not, write to the Free Software Foundation,
3149# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3150#
3151# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3152# or visit www.oracle.com if you need additional information or have any
3153# questions.
3154#
3155
3156
3157
3158
3159
3160# Helper function which possibly converts a path using DOS-style short mode.
3161# If so, the updated path is stored in $new_path.
3162# $1: The path to check
3163
3164
3165# Helper function which possibly converts a path using DOS-style short mode.
3166# If so, the updated path is stored in $new_path.
3167# $1: The path to check
3168
3169
3170# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3171# and could probably be heavily simplified. However, all changes in this
3172# area tend to need lot of testing in different scenarios, and in lack of
3173# proper unit testing, cleaning this up has not been deemed worth the effort
3174# at the moment.
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3185
3186
3187
3188
3189#
3190# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3191# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3192#
3193# This code is free software; you can redistribute it and/or modify it
3194# under the terms of the GNU General Public License version 2 only, as
3195# published by the Free Software Foundation.  Oracle designates this
3196# particular file as subject to the "Classpath" exception as provided
3197# by Oracle in the LICENSE file that accompanied this code.
3198#
3199# This code is distributed in the hope that it will be useful, but WITHOUT
3200# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3201# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3202# version 2 for more details (a copy is included in the LICENSE file that
3203# accompanied this code).
3204#
3205# You should have received a copy of the GNU General Public License version
3206# 2 along with this work; if not, write to the Free Software Foundation,
3207# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3208#
3209# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3210# or visit www.oracle.com if you need additional information or have any
3211# questions.
3212#
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224# ... then the rest
3225#
3226# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3227# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3228#
3229# This code is free software; you can redistribute it and/or modify it
3230# under the terms of the GNU General Public License version 2 only, as
3231# published by the Free Software Foundation.  Oracle designates this
3232# particular file as subject to the "Classpath" exception as provided
3233# by Oracle in the LICENSE file that accompanied this code.
3234#
3235# This code is distributed in the hope that it will be useful, but WITHOUT
3236# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3237# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3238# version 2 for more details (a copy is included in the LICENSE file that
3239# accompanied this code).
3240#
3241# You should have received a copy of the GNU General Public License version
3242# 2 along with this work; if not, write to the Free Software Foundation,
3243# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3244#
3245# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3246# or visit www.oracle.com if you need additional information or have any
3247# questions.
3248#
3249
3250# Execute the check given as argument, and verify the result
3251# If the Boot JDK was previously found, do nothing
3252# $1 A command line (typically autoconf macro) to execute
3253
3254
3255# Test: Is bootjdk explicitely set by command line arguments?
3256
3257
3258# Test: Is bootjdk available from builddeps?
3259
3260
3261# Test: Is $JAVA_HOME set?
3262
3263
3264# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3265
3266
3267# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3268
3269
3270# Look for a jdk in the given path. If there are multiple, try to select the newest.
3271# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3272# $1 = Path to directory containing jdk installations.
3273# $2 = String to append to the found JDK directory to get the proper JDK home
3274
3275
3276# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3277# environmental variable as base for where to look.
3278# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3279
3280
3281# Test: Is there a JDK installed in default, well-known locations?
3282
3283
3284# Check that a command-line tool in the Boot JDK is correct
3285# $1 = name of variable to assign
3286# $2 = name of binary
3287
3288
3289###############################################################################
3290#
3291# We need a Boot JDK to bootstrap the build.
3292#
3293
3294
3295
3296
3297
3298#
3299# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3300# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3301#
3302# This code is free software; you can redistribute it and/or modify it
3303# under the terms of the GNU General Public License version 2 only, as
3304# published by the Free Software Foundation.  Oracle designates this
3305# particular file as subject to the "Classpath" exception as provided
3306# by Oracle in the LICENSE file that accompanied this code.
3307#
3308# This code is distributed in the hope that it will be useful, but WITHOUT
3309# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3310# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3311# version 2 for more details (a copy is included in the LICENSE file that
3312# accompanied this code).
3313#
3314# You should have received a copy of the GNU General Public License version
3315# 2 along with this work; if not, write to the Free Software Foundation,
3316# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3317#
3318# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3319# or visit www.oracle.com if you need additional information or have any
3320# questions.
3321#
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
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
3369cygwin_help() {
3370    case $1 in
3371    unzip)
3372        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3373    zip)
3374        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3375    make)
3376        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3377    * )
3378       break ;;
3379    esac
3380}
3381
3382apt_help() {
3383    case $1 in
3384    devkit)
3385        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3386    openjdk)
3387        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3388    alsa)
3389        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3390    cups)
3391        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3392    freetype2)
3393        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3394    pulse)
3395        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3396    x11)
3397        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3398    ccache)
3399        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3400    * )
3401       break ;;
3402    esac
3403}
3404
3405yum_help() {
3406    case $1 in
3407    devkit)
3408        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3409    openjdk)
3410        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3411    alsa)
3412        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3413    cups)
3414        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3415    freetype2)
3416        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3417    pulse)
3418        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3419    x11)
3420        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3421    ccache)
3422        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3423    * )
3424       break ;;
3425    esac
3426}
3427
3428port_help() {
3429    PKGHANDLER_COMMAND=""
3430}
3431
3432pkgutil_help() {
3433    PKGHANDLER_COMMAND=""
3434}
3435
3436pkgadd_help() {
3437    PKGHANDLER_COMMAND=""
3438}
3439
3440
3441
3442#
3443# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3444# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3445#
3446# This code is free software; you can redistribute it and/or modify it
3447# under the terms of the GNU General Public License version 2 only, as
3448# published by the Free Software Foundation.  Oracle designates this
3449# particular file as subject to the "Classpath" exception as provided
3450# by Oracle in the LICENSE file that accompanied this code.
3451#
3452# This code is distributed in the hope that it will be useful, but WITHOUT
3453# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3454# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3455# version 2 for more details (a copy is included in the LICENSE file that
3456# accompanied this code).
3457#
3458# You should have received a copy of the GNU General Public License version
3459# 2 along with this work; if not, write to the Free Software Foundation,
3460# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3461#
3462# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3463# or visit www.oracle.com if you need additional information or have any
3464# questions.
3465#
3466
3467
3468
3469
3470
3471
3472
3473
3474###############################################################################
3475#
3476# Should we build only OpenJDK even if closed sources are present?
3477#
3478
3479
3480
3481
3482###############################################################################
3483#
3484# Setup version numbers
3485#
3486
3487
3488
3489
3490
3491
3492# Support for customization of the build process. Some build files
3493# will include counterparts from this location, if they exist. This allows
3494# for a degree of customization of the build targets and the rules/recipes
3495# to create them
3496
3497# Check whether --with-custom-make-dir was given.
3498if test "${with_custom_make_dir+set}" = set; then :
3499  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3500fi
3501
3502
3503
3504#
3505# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3506# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3507#
3508# This code is free software; you can redistribute it and/or modify it
3509# under the terms of the GNU General Public License version 2 only, as
3510# published by the Free Software Foundation.  Oracle designates this
3511# particular file as subject to the "Classpath" exception as provided
3512# by Oracle in the LICENSE file that accompanied this code.
3513#
3514# This code is distributed in the hope that it will be useful, but WITHOUT
3515# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3516# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3517# version 2 for more details (a copy is included in the LICENSE file that
3518# accompanied this code).
3519#
3520# You should have received a copy of the GNU General Public License version
3521# 2 along with this work; if not, write to the Free Software Foundation,
3522# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3523#
3524# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3525# or visit www.oracle.com if you need additional information or have any
3526# questions.
3527#
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543#
3544# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3545# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3546#
3547# This code is free software; you can redistribute it and/or modify it
3548# under the terms of the GNU General Public License version 2 only, as
3549# published by the Free Software Foundation.  Oracle designates this
3550# particular file as subject to the "Classpath" exception as provided
3551# by Oracle in the LICENSE file that accompanied this code.
3552#
3553# This code is distributed in the hope that it will be useful, but WITHOUT
3554# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3555# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3556# version 2 for more details (a copy is included in the LICENSE file that
3557# accompanied this code).
3558#
3559# You should have received a copy of the GNU General Public License version
3560# 2 along with this work; if not, write to the Free Software Foundation,
3561# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3562#
3563# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3564# or visit www.oracle.com if you need additional information or have any
3565# questions.
3566#
3567
3568# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3569# Converts autoconf style CPU name to OpenJDK style, into
3570# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3571
3572
3573# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3574# Converts autoconf style OS name to OpenJDK style, into
3575# VAR_OS and VAR_OS_API.
3576
3577
3578# Expects $host_os $host_cpu $build_os and $build_cpu
3579# and $with_target_bits to have been setup!
3580#
3581# Translate the standard triplet(quadruplet) definition
3582# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3583# OPENJDK_BUILD_OS, etc.
3584
3585
3586# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3587# accordingly. Must be done after setting up build and target system, but before
3588# doing anything else with these values.
3589
3590
3591    # Setup the legacy variables, for controlling the old makefiles.
3592    #
3593
3594
3595
3596
3597#%%% Build and target systems %%%
3598
3599
3600
3601
3602# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3603# Add -mX to various FLAGS variables.
3604
3605
3606
3607
3608
3609
3610#
3611# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3612# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3613#
3614# This code is free software; you can redistribute it and/or modify it
3615# under the terms of the GNU General Public License version 2 only, as
3616# published by the Free Software Foundation.  Oracle designates this
3617# particular file as subject to the "Classpath" exception as provided
3618# by Oracle in the LICENSE file that accompanied this code.
3619#
3620# This code is distributed in the hope that it will be useful, but WITHOUT
3621# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3622# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3623# version 2 for more details (a copy is included in the LICENSE file that
3624# accompanied this code).
3625#
3626# You should have received a copy of the GNU General Public License version
3627# 2 along with this work; if not, write to the Free Software Foundation,
3628# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3629#
3630# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3631# or visit www.oracle.com if you need additional information or have any
3632# questions.
3633#
3634
3635
3636
3637
3638
3639
3640
3641
3642#
3643# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3644# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3645#
3646# This code is free software; you can redistribute it and/or modify it
3647# under the terms of the GNU General Public License version 2 only, as
3648# published by the Free Software Foundation.  Oracle designates this
3649# particular file as subject to the "Classpath" exception as provided
3650# by Oracle in the LICENSE file that accompanied this code.
3651#
3652# This code is distributed in the hope that it will be useful, but WITHOUT
3653# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3654# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3655# version 2 for more details (a copy is included in the LICENSE file that
3656# accompanied this code).
3657#
3658# You should have received a copy of the GNU General Public License version
3659# 2 along with this work; if not, write to the Free Software Foundation,
3660# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3661#
3662# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3663# or visit www.oracle.com if you need additional information or have any
3664# questions.
3665#
3666
3667# $1 = compiler to test (CC or CXX)
3668# $2 = human readable name of compiler (C or C++)
3669
3670
3671
3672
3673
3674# $1 = compiler to test (CC or CXX)
3675# $2 = human readable name of compiler (C or C++)
3676# $3 = list of compiler names to search for
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689#
3690# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3691# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3692#
3693# This code is free software; you can redistribute it and/or modify it
3694# under the terms of the GNU General Public License version 2 only, as
3695# published by the Free Software Foundation.  Oracle designates this
3696# particular file as subject to the "Classpath" exception as provided
3697# by Oracle in the LICENSE file that accompanied this code.
3698#
3699# This code is distributed in the hope that it will be useful, but WITHOUT
3700# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3701# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3702# version 2 for more details (a copy is included in the LICENSE file that
3703# accompanied this code).
3704#
3705# You should have received a copy of the GNU General Public License version
3706# 2 along with this work; if not, write to the Free Software Foundation,
3707# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3708#
3709# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3710# or visit www.oracle.com if you need additional information or have any
3711# questions.
3712#
3713
3714
3715
3716
3717
3718
3719
3720# Check if the VS env variables were setup prior to running configure.
3721# If not, then find vcvarsall.bat and run it automatically, and integrate
3722# the set env variables into the spec file.
3723
3724
3725
3726
3727
3728
3729# This line needs to be here, verbatim, after all includes and the dummy hook
3730# definitions. It is replaced with custom functionality when building
3731# custom sources.
3732#CUSTOM_AUTOCONF_INCLUDE
3733
3734# Do not change or remove the following line, it is needed for consistency checks:
3735DATE_WHEN_GENERATED=1361218904
3736
3737###############################################################################
3738#
3739# Initialization / Boot-strapping
3740#
3741# The bootstrapping process needs to solve the "chicken or the egg" problem,
3742# thus it jumps back and forth, each time gaining something needed later on.
3743#
3744###############################################################################
3745
3746# Basic initialization that must happen first of all
3747
3748# Save the original command line. This is passed to us by the wrapper configure script.
3749
3750DATE_WHEN_CONFIGURED=`LANG=C date`
3751
3752{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3753$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3754{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3755$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3756
3757
3758
3759# Start with tools that do not need have cross compilation support
3760# and can be expected to be found in the default PATH. These tools are
3761# used by configure. Nor are these tools expected to be found in the
3762# devkit from the builddeps server either, since they are
3763# needed to download the devkit.
3764
3765# First are all the simple required tools.
3766
3767    for ac_prog in basename
3768do
3769  # Extract the first word of "$ac_prog", so it can be a program name with args.
3770set dummy $ac_prog; ac_word=$2
3771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3772$as_echo_n "checking for $ac_word... " >&6; }
3773if ${ac_cv_path_BASENAME+:} false; then :
3774  $as_echo_n "(cached) " >&6
3775else
3776  case $BASENAME in
3777  [\\/]* | ?:[\\/]*)
3778  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3779  ;;
3780  *)
3781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3782for as_dir in $PATH
3783do
3784  IFS=$as_save_IFS
3785  test -z "$as_dir" && as_dir=.
3786    for ac_exec_ext in '' $ac_executable_extensions; do
3787  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3788    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3790    break 2
3791  fi
3792done
3793  done
3794IFS=$as_save_IFS
3795
3796  ;;
3797esac
3798fi
3799BASENAME=$ac_cv_path_BASENAME
3800if test -n "$BASENAME"; then
3801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3802$as_echo "$BASENAME" >&6; }
3803else
3804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3805$as_echo "no" >&6; }
3806fi
3807
3808
3809  test -n "$BASENAME" && break
3810done
3811
3812
3813    if test "x$BASENAME" = x; then
3814        if test "xbasename" = x; then
3815          PROG_NAME=basename
3816        else
3817          PROG_NAME=basename
3818        fi
3819        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3820$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3821        as_fn_error $? "Cannot continue" "$LINENO" 5
3822    fi
3823
3824
3825
3826    for ac_prog in bash
3827do
3828  # Extract the first word of "$ac_prog", so it can be a program name with args.
3829set dummy $ac_prog; ac_word=$2
3830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3831$as_echo_n "checking for $ac_word... " >&6; }
3832if ${ac_cv_path_BASH+:} false; then :
3833  $as_echo_n "(cached) " >&6
3834else
3835  case $BASH in
3836  [\\/]* | ?:[\\/]*)
3837  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3838  ;;
3839  *)
3840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3841for as_dir in $PATH
3842do
3843  IFS=$as_save_IFS
3844  test -z "$as_dir" && as_dir=.
3845    for ac_exec_ext in '' $ac_executable_extensions; do
3846  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3847    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3849    break 2
3850  fi
3851done
3852  done
3853IFS=$as_save_IFS
3854
3855  ;;
3856esac
3857fi
3858BASH=$ac_cv_path_BASH
3859if test -n "$BASH"; then
3860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3861$as_echo "$BASH" >&6; }
3862else
3863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3864$as_echo "no" >&6; }
3865fi
3866
3867
3868  test -n "$BASH" && break
3869done
3870
3871
3872    if test "x$BASH" = x; then
3873        if test "xbash" = x; then
3874          PROG_NAME=bash
3875        else
3876          PROG_NAME=bash
3877        fi
3878        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3879$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3880        as_fn_error $? "Cannot continue" "$LINENO" 5
3881    fi
3882
3883
3884
3885    for ac_prog in cat
3886do
3887  # Extract the first word of "$ac_prog", so it can be a program name with args.
3888set dummy $ac_prog; ac_word=$2
3889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3890$as_echo_n "checking for $ac_word... " >&6; }
3891if ${ac_cv_path_CAT+:} false; then :
3892  $as_echo_n "(cached) " >&6
3893else
3894  case $CAT in
3895  [\\/]* | ?:[\\/]*)
3896  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3897  ;;
3898  *)
3899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3900for as_dir in $PATH
3901do
3902  IFS=$as_save_IFS
3903  test -z "$as_dir" && as_dir=.
3904    for ac_exec_ext in '' $ac_executable_extensions; do
3905  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3906    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3908    break 2
3909  fi
3910done
3911  done
3912IFS=$as_save_IFS
3913
3914  ;;
3915esac
3916fi
3917CAT=$ac_cv_path_CAT
3918if test -n "$CAT"; then
3919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3920$as_echo "$CAT" >&6; }
3921else
3922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3923$as_echo "no" >&6; }
3924fi
3925
3926
3927  test -n "$CAT" && break
3928done
3929
3930
3931    if test "x$CAT" = x; then
3932        if test "xcat" = x; then
3933          PROG_NAME=cat
3934        else
3935          PROG_NAME=cat
3936        fi
3937        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3938$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3939        as_fn_error $? "Cannot continue" "$LINENO" 5
3940    fi
3941
3942
3943
3944    for ac_prog in chmod
3945do
3946  # Extract the first word of "$ac_prog", so it can be a program name with args.
3947set dummy $ac_prog; ac_word=$2
3948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3949$as_echo_n "checking for $ac_word... " >&6; }
3950if ${ac_cv_path_CHMOD+:} false; then :
3951  $as_echo_n "(cached) " >&6
3952else
3953  case $CHMOD in
3954  [\\/]* | ?:[\\/]*)
3955  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3956  ;;
3957  *)
3958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3959for as_dir in $PATH
3960do
3961  IFS=$as_save_IFS
3962  test -z "$as_dir" && as_dir=.
3963    for ac_exec_ext in '' $ac_executable_extensions; do
3964  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3965    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3967    break 2
3968  fi
3969done
3970  done
3971IFS=$as_save_IFS
3972
3973  ;;
3974esac
3975fi
3976CHMOD=$ac_cv_path_CHMOD
3977if test -n "$CHMOD"; then
3978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3979$as_echo "$CHMOD" >&6; }
3980else
3981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3982$as_echo "no" >&6; }
3983fi
3984
3985
3986  test -n "$CHMOD" && break
3987done
3988
3989
3990    if test "x$CHMOD" = x; then
3991        if test "xchmod" = x; then
3992          PROG_NAME=chmod
3993        else
3994          PROG_NAME=chmod
3995        fi
3996        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3997$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3998        as_fn_error $? "Cannot continue" "$LINENO" 5
3999    fi
4000
4001
4002
4003    for ac_prog in cmp
4004do
4005  # Extract the first word of "$ac_prog", so it can be a program name with args.
4006set dummy $ac_prog; ac_word=$2
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4008$as_echo_n "checking for $ac_word... " >&6; }
4009if ${ac_cv_path_CMP+:} false; then :
4010  $as_echo_n "(cached) " >&6
4011else
4012  case $CMP in
4013  [\\/]* | ?:[\\/]*)
4014  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4015  ;;
4016  *)
4017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4018for as_dir in $PATH
4019do
4020  IFS=$as_save_IFS
4021  test -z "$as_dir" && as_dir=.
4022    for ac_exec_ext in '' $ac_executable_extensions; do
4023  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4024    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4026    break 2
4027  fi
4028done
4029  done
4030IFS=$as_save_IFS
4031
4032  ;;
4033esac
4034fi
4035CMP=$ac_cv_path_CMP
4036if test -n "$CMP"; then
4037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4038$as_echo "$CMP" >&6; }
4039else
4040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4041$as_echo "no" >&6; }
4042fi
4043
4044
4045  test -n "$CMP" && break
4046done
4047
4048
4049    if test "x$CMP" = x; then
4050        if test "xcmp" = x; then
4051          PROG_NAME=cmp
4052        else
4053          PROG_NAME=cmp
4054        fi
4055        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4056$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4057        as_fn_error $? "Cannot continue" "$LINENO" 5
4058    fi
4059
4060
4061
4062    for ac_prog in comm
4063do
4064  # Extract the first word of "$ac_prog", so it can be a program name with args.
4065set dummy $ac_prog; ac_word=$2
4066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4067$as_echo_n "checking for $ac_word... " >&6; }
4068if ${ac_cv_path_COMM+:} false; then :
4069  $as_echo_n "(cached) " >&6
4070else
4071  case $COMM in
4072  [\\/]* | ?:[\\/]*)
4073  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4074  ;;
4075  *)
4076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4077for as_dir in $PATH
4078do
4079  IFS=$as_save_IFS
4080  test -z "$as_dir" && as_dir=.
4081    for ac_exec_ext in '' $ac_executable_extensions; do
4082  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4083    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4085    break 2
4086  fi
4087done
4088  done
4089IFS=$as_save_IFS
4090
4091  ;;
4092esac
4093fi
4094COMM=$ac_cv_path_COMM
4095if test -n "$COMM"; then
4096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4097$as_echo "$COMM" >&6; }
4098else
4099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4100$as_echo "no" >&6; }
4101fi
4102
4103
4104  test -n "$COMM" && break
4105done
4106
4107
4108    if test "x$COMM" = x; then
4109        if test "xcomm" = x; then
4110          PROG_NAME=comm
4111        else
4112          PROG_NAME=comm
4113        fi
4114        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4115$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4116        as_fn_error $? "Cannot continue" "$LINENO" 5
4117    fi
4118
4119
4120
4121    for ac_prog in cp
4122do
4123  # Extract the first word of "$ac_prog", so it can be a program name with args.
4124set dummy $ac_prog; ac_word=$2
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4126$as_echo_n "checking for $ac_word... " >&6; }
4127if ${ac_cv_path_CP+:} false; then :
4128  $as_echo_n "(cached) " >&6
4129else
4130  case $CP in
4131  [\\/]* | ?:[\\/]*)
4132  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4133  ;;
4134  *)
4135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4136for as_dir in $PATH
4137do
4138  IFS=$as_save_IFS
4139  test -z "$as_dir" && as_dir=.
4140    for ac_exec_ext in '' $ac_executable_extensions; do
4141  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4142    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4144    break 2
4145  fi
4146done
4147  done
4148IFS=$as_save_IFS
4149
4150  ;;
4151esac
4152fi
4153CP=$ac_cv_path_CP
4154if test -n "$CP"; then
4155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4156$as_echo "$CP" >&6; }
4157else
4158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4159$as_echo "no" >&6; }
4160fi
4161
4162
4163  test -n "$CP" && break
4164done
4165
4166
4167    if test "x$CP" = x; then
4168        if test "xcp" = x; then
4169          PROG_NAME=cp
4170        else
4171          PROG_NAME=cp
4172        fi
4173        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4174$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4175        as_fn_error $? "Cannot continue" "$LINENO" 5
4176    fi
4177
4178
4179
4180    for ac_prog in cpio
4181do
4182  # Extract the first word of "$ac_prog", so it can be a program name with args.
4183set dummy $ac_prog; ac_word=$2
4184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4185$as_echo_n "checking for $ac_word... " >&6; }
4186if ${ac_cv_path_CPIO+:} false; then :
4187  $as_echo_n "(cached) " >&6
4188else
4189  case $CPIO in
4190  [\\/]* | ?:[\\/]*)
4191  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4192  ;;
4193  *)
4194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4195for as_dir in $PATH
4196do
4197  IFS=$as_save_IFS
4198  test -z "$as_dir" && as_dir=.
4199    for ac_exec_ext in '' $ac_executable_extensions; do
4200  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4201    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4203    break 2
4204  fi
4205done
4206  done
4207IFS=$as_save_IFS
4208
4209  ;;
4210esac
4211fi
4212CPIO=$ac_cv_path_CPIO
4213if test -n "$CPIO"; then
4214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4215$as_echo "$CPIO" >&6; }
4216else
4217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4218$as_echo "no" >&6; }
4219fi
4220
4221
4222  test -n "$CPIO" && break
4223done
4224
4225
4226    if test "x$CPIO" = x; then
4227        if test "xcpio" = x; then
4228          PROG_NAME=cpio
4229        else
4230          PROG_NAME=cpio
4231        fi
4232        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4233$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4234        as_fn_error $? "Cannot continue" "$LINENO" 5
4235    fi
4236
4237
4238
4239    for ac_prog in cut
4240do
4241  # Extract the first word of "$ac_prog", so it can be a program name with args.
4242set dummy $ac_prog; ac_word=$2
4243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4244$as_echo_n "checking for $ac_word... " >&6; }
4245if ${ac_cv_path_CUT+:} false; then :
4246  $as_echo_n "(cached) " >&6
4247else
4248  case $CUT in
4249  [\\/]* | ?:[\\/]*)
4250  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4251  ;;
4252  *)
4253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4254for as_dir in $PATH
4255do
4256  IFS=$as_save_IFS
4257  test -z "$as_dir" && as_dir=.
4258    for ac_exec_ext in '' $ac_executable_extensions; do
4259  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4260    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4262    break 2
4263  fi
4264done
4265  done
4266IFS=$as_save_IFS
4267
4268  ;;
4269esac
4270fi
4271CUT=$ac_cv_path_CUT
4272if test -n "$CUT"; then
4273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4274$as_echo "$CUT" >&6; }
4275else
4276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4277$as_echo "no" >&6; }
4278fi
4279
4280
4281  test -n "$CUT" && break
4282done
4283
4284
4285    if test "x$CUT" = x; then
4286        if test "xcut" = x; then
4287          PROG_NAME=cut
4288        else
4289          PROG_NAME=cut
4290        fi
4291        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4292$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4293        as_fn_error $? "Cannot continue" "$LINENO" 5
4294    fi
4295
4296
4297
4298    for ac_prog in date
4299do
4300  # Extract the first word of "$ac_prog", so it can be a program name with args.
4301set dummy $ac_prog; ac_word=$2
4302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4303$as_echo_n "checking for $ac_word... " >&6; }
4304if ${ac_cv_path_DATE+:} false; then :
4305  $as_echo_n "(cached) " >&6
4306else
4307  case $DATE in
4308  [\\/]* | ?:[\\/]*)
4309  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4310  ;;
4311  *)
4312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4313for as_dir in $PATH
4314do
4315  IFS=$as_save_IFS
4316  test -z "$as_dir" && as_dir=.
4317    for ac_exec_ext in '' $ac_executable_extensions; do
4318  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4319    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4321    break 2
4322  fi
4323done
4324  done
4325IFS=$as_save_IFS
4326
4327  ;;
4328esac
4329fi
4330DATE=$ac_cv_path_DATE
4331if test -n "$DATE"; then
4332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4333$as_echo "$DATE" >&6; }
4334else
4335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4336$as_echo "no" >&6; }
4337fi
4338
4339
4340  test -n "$DATE" && break
4341done
4342
4343
4344    if test "x$DATE" = x; then
4345        if test "xdate" = x; then
4346          PROG_NAME=date
4347        else
4348          PROG_NAME=date
4349        fi
4350        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4351$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4352        as_fn_error $? "Cannot continue" "$LINENO" 5
4353    fi
4354
4355
4356
4357    for ac_prog in gdiff diff
4358do
4359  # Extract the first word of "$ac_prog", so it can be a program name with args.
4360set dummy $ac_prog; ac_word=$2
4361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4362$as_echo_n "checking for $ac_word... " >&6; }
4363if ${ac_cv_path_DIFF+:} false; then :
4364  $as_echo_n "(cached) " >&6
4365else
4366  case $DIFF in
4367  [\\/]* | ?:[\\/]*)
4368  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4369  ;;
4370  *)
4371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4372for as_dir in $PATH
4373do
4374  IFS=$as_save_IFS
4375  test -z "$as_dir" && as_dir=.
4376    for ac_exec_ext in '' $ac_executable_extensions; do
4377  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4378    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4380    break 2
4381  fi
4382done
4383  done
4384IFS=$as_save_IFS
4385
4386  ;;
4387esac
4388fi
4389DIFF=$ac_cv_path_DIFF
4390if test -n "$DIFF"; then
4391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4392$as_echo "$DIFF" >&6; }
4393else
4394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4395$as_echo "no" >&6; }
4396fi
4397
4398
4399  test -n "$DIFF" && break
4400done
4401
4402
4403    if test "x$DIFF" = x; then
4404        if test "xgdiff diff" = x; then
4405          PROG_NAME=diff
4406        else
4407          PROG_NAME=gdiff diff
4408        fi
4409        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4410$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4411        as_fn_error $? "Cannot continue" "$LINENO" 5
4412    fi
4413
4414
4415
4416    for ac_prog in dirname
4417do
4418  # Extract the first word of "$ac_prog", so it can be a program name with args.
4419set dummy $ac_prog; ac_word=$2
4420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4421$as_echo_n "checking for $ac_word... " >&6; }
4422if ${ac_cv_path_DIRNAME+:} false; then :
4423  $as_echo_n "(cached) " >&6
4424else
4425  case $DIRNAME in
4426  [\\/]* | ?:[\\/]*)
4427  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4428  ;;
4429  *)
4430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4431for as_dir in $PATH
4432do
4433  IFS=$as_save_IFS
4434  test -z "$as_dir" && as_dir=.
4435    for ac_exec_ext in '' $ac_executable_extensions; do
4436  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4437    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4439    break 2
4440  fi
4441done
4442  done
4443IFS=$as_save_IFS
4444
4445  ;;
4446esac
4447fi
4448DIRNAME=$ac_cv_path_DIRNAME
4449if test -n "$DIRNAME"; then
4450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4451$as_echo "$DIRNAME" >&6; }
4452else
4453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4454$as_echo "no" >&6; }
4455fi
4456
4457
4458  test -n "$DIRNAME" && break
4459done
4460
4461
4462    if test "x$DIRNAME" = x; then
4463        if test "xdirname" = x; then
4464          PROG_NAME=dirname
4465        else
4466          PROG_NAME=dirname
4467        fi
4468        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4469$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4470        as_fn_error $? "Cannot continue" "$LINENO" 5
4471    fi
4472
4473
4474
4475    for ac_prog in echo
4476do
4477  # Extract the first word of "$ac_prog", so it can be a program name with args.
4478set dummy $ac_prog; ac_word=$2
4479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4480$as_echo_n "checking for $ac_word... " >&6; }
4481if ${ac_cv_path_ECHO+:} false; then :
4482  $as_echo_n "(cached) " >&6
4483else
4484  case $ECHO in
4485  [\\/]* | ?:[\\/]*)
4486  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4487  ;;
4488  *)
4489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4490for as_dir in $PATH
4491do
4492  IFS=$as_save_IFS
4493  test -z "$as_dir" && as_dir=.
4494    for ac_exec_ext in '' $ac_executable_extensions; do
4495  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4496    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4498    break 2
4499  fi
4500done
4501  done
4502IFS=$as_save_IFS
4503
4504  ;;
4505esac
4506fi
4507ECHO=$ac_cv_path_ECHO
4508if test -n "$ECHO"; then
4509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4510$as_echo "$ECHO" >&6; }
4511else
4512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4513$as_echo "no" >&6; }
4514fi
4515
4516
4517  test -n "$ECHO" && break
4518done
4519
4520
4521    if test "x$ECHO" = x; then
4522        if test "xecho" = x; then
4523          PROG_NAME=echo
4524        else
4525          PROG_NAME=echo
4526        fi
4527        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4528$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4529        as_fn_error $? "Cannot continue" "$LINENO" 5
4530    fi
4531
4532
4533
4534    for ac_prog in expr
4535do
4536  # Extract the first word of "$ac_prog", so it can be a program name with args.
4537set dummy $ac_prog; ac_word=$2
4538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4539$as_echo_n "checking for $ac_word... " >&6; }
4540if ${ac_cv_path_EXPR+:} false; then :
4541  $as_echo_n "(cached) " >&6
4542else
4543  case $EXPR in
4544  [\\/]* | ?:[\\/]*)
4545  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4546  ;;
4547  *)
4548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4549for as_dir in $PATH
4550do
4551  IFS=$as_save_IFS
4552  test -z "$as_dir" && as_dir=.
4553    for ac_exec_ext in '' $ac_executable_extensions; do
4554  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4555    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4557    break 2
4558  fi
4559done
4560  done
4561IFS=$as_save_IFS
4562
4563  ;;
4564esac
4565fi
4566EXPR=$ac_cv_path_EXPR
4567if test -n "$EXPR"; then
4568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4569$as_echo "$EXPR" >&6; }
4570else
4571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4572$as_echo "no" >&6; }
4573fi
4574
4575
4576  test -n "$EXPR" && break
4577done
4578
4579
4580    if test "x$EXPR" = x; then
4581        if test "xexpr" = x; then
4582          PROG_NAME=expr
4583        else
4584          PROG_NAME=expr
4585        fi
4586        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4587$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4588        as_fn_error $? "Cannot continue" "$LINENO" 5
4589    fi
4590
4591
4592
4593    for ac_prog in file
4594do
4595  # Extract the first word of "$ac_prog", so it can be a program name with args.
4596set dummy $ac_prog; ac_word=$2
4597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4598$as_echo_n "checking for $ac_word... " >&6; }
4599if ${ac_cv_path_FILE+:} false; then :
4600  $as_echo_n "(cached) " >&6
4601else
4602  case $FILE in
4603  [\\/]* | ?:[\\/]*)
4604  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4605  ;;
4606  *)
4607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4608for as_dir in $PATH
4609do
4610  IFS=$as_save_IFS
4611  test -z "$as_dir" && as_dir=.
4612    for ac_exec_ext in '' $ac_executable_extensions; do
4613  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4614    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4616    break 2
4617  fi
4618done
4619  done
4620IFS=$as_save_IFS
4621
4622  ;;
4623esac
4624fi
4625FILE=$ac_cv_path_FILE
4626if test -n "$FILE"; then
4627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4628$as_echo "$FILE" >&6; }
4629else
4630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4631$as_echo "no" >&6; }
4632fi
4633
4634
4635  test -n "$FILE" && break
4636done
4637
4638
4639    if test "x$FILE" = x; then
4640        if test "xfile" = x; then
4641          PROG_NAME=file
4642        else
4643          PROG_NAME=file
4644        fi
4645        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4646$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4647        as_fn_error $? "Cannot continue" "$LINENO" 5
4648    fi
4649
4650
4651
4652    for ac_prog in find
4653do
4654  # Extract the first word of "$ac_prog", so it can be a program name with args.
4655set dummy $ac_prog; ac_word=$2
4656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4657$as_echo_n "checking for $ac_word... " >&6; }
4658if ${ac_cv_path_FIND+:} false; then :
4659  $as_echo_n "(cached) " >&6
4660else
4661  case $FIND in
4662  [\\/]* | ?:[\\/]*)
4663  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4664  ;;
4665  *)
4666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4667for as_dir in $PATH
4668do
4669  IFS=$as_save_IFS
4670  test -z "$as_dir" && as_dir=.
4671    for ac_exec_ext in '' $ac_executable_extensions; do
4672  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4673    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4675    break 2
4676  fi
4677done
4678  done
4679IFS=$as_save_IFS
4680
4681  ;;
4682esac
4683fi
4684FIND=$ac_cv_path_FIND
4685if test -n "$FIND"; then
4686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4687$as_echo "$FIND" >&6; }
4688else
4689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4690$as_echo "no" >&6; }
4691fi
4692
4693
4694  test -n "$FIND" && break
4695done
4696
4697
4698    if test "x$FIND" = x; then
4699        if test "xfind" = x; then
4700          PROG_NAME=find
4701        else
4702          PROG_NAME=find
4703        fi
4704        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4705$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4706        as_fn_error $? "Cannot continue" "$LINENO" 5
4707    fi
4708
4709
4710
4711    for ac_prog in head
4712do
4713  # Extract the first word of "$ac_prog", so it can be a program name with args.
4714set dummy $ac_prog; ac_word=$2
4715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4716$as_echo_n "checking for $ac_word... " >&6; }
4717if ${ac_cv_path_HEAD+:} false; then :
4718  $as_echo_n "(cached) " >&6
4719else
4720  case $HEAD in
4721  [\\/]* | ?:[\\/]*)
4722  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4723  ;;
4724  *)
4725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4726for as_dir in $PATH
4727do
4728  IFS=$as_save_IFS
4729  test -z "$as_dir" && as_dir=.
4730    for ac_exec_ext in '' $ac_executable_extensions; do
4731  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4732    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4734    break 2
4735  fi
4736done
4737  done
4738IFS=$as_save_IFS
4739
4740  ;;
4741esac
4742fi
4743HEAD=$ac_cv_path_HEAD
4744if test -n "$HEAD"; then
4745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4746$as_echo "$HEAD" >&6; }
4747else
4748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4749$as_echo "no" >&6; }
4750fi
4751
4752
4753  test -n "$HEAD" && break
4754done
4755
4756
4757    if test "x$HEAD" = x; then
4758        if test "xhead" = x; then
4759          PROG_NAME=head
4760        else
4761          PROG_NAME=head
4762        fi
4763        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4764$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4765        as_fn_error $? "Cannot continue" "$LINENO" 5
4766    fi
4767
4768
4769
4770    for ac_prog in ln
4771do
4772  # Extract the first word of "$ac_prog", so it can be a program name with args.
4773set dummy $ac_prog; ac_word=$2
4774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4775$as_echo_n "checking for $ac_word... " >&6; }
4776if ${ac_cv_path_LN+:} false; then :
4777  $as_echo_n "(cached) " >&6
4778else
4779  case $LN in
4780  [\\/]* | ?:[\\/]*)
4781  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4782  ;;
4783  *)
4784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4785for as_dir in $PATH
4786do
4787  IFS=$as_save_IFS
4788  test -z "$as_dir" && as_dir=.
4789    for ac_exec_ext in '' $ac_executable_extensions; do
4790  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4791    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4793    break 2
4794  fi
4795done
4796  done
4797IFS=$as_save_IFS
4798
4799  ;;
4800esac
4801fi
4802LN=$ac_cv_path_LN
4803if test -n "$LN"; then
4804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4805$as_echo "$LN" >&6; }
4806else
4807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4808$as_echo "no" >&6; }
4809fi
4810
4811
4812  test -n "$LN" && break
4813done
4814
4815
4816    if test "x$LN" = x; then
4817        if test "xln" = x; then
4818          PROG_NAME=ln
4819        else
4820          PROG_NAME=ln
4821        fi
4822        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4823$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4824        as_fn_error $? "Cannot continue" "$LINENO" 5
4825    fi
4826
4827
4828
4829    for ac_prog in ls
4830do
4831  # Extract the first word of "$ac_prog", so it can be a program name with args.
4832set dummy $ac_prog; ac_word=$2
4833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4834$as_echo_n "checking for $ac_word... " >&6; }
4835if ${ac_cv_path_LS+:} false; then :
4836  $as_echo_n "(cached) " >&6
4837else
4838  case $LS in
4839  [\\/]* | ?:[\\/]*)
4840  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4841  ;;
4842  *)
4843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4844for as_dir in $PATH
4845do
4846  IFS=$as_save_IFS
4847  test -z "$as_dir" && as_dir=.
4848    for ac_exec_ext in '' $ac_executable_extensions; do
4849  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4850    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4852    break 2
4853  fi
4854done
4855  done
4856IFS=$as_save_IFS
4857
4858  ;;
4859esac
4860fi
4861LS=$ac_cv_path_LS
4862if test -n "$LS"; then
4863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4864$as_echo "$LS" >&6; }
4865else
4866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4867$as_echo "no" >&6; }
4868fi
4869
4870
4871  test -n "$LS" && break
4872done
4873
4874
4875    if test "x$LS" = x; then
4876        if test "xls" = x; then
4877          PROG_NAME=ls
4878        else
4879          PROG_NAME=ls
4880        fi
4881        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4882$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4883        as_fn_error $? "Cannot continue" "$LINENO" 5
4884    fi
4885
4886
4887
4888    for ac_prog in mkdir
4889do
4890  # Extract the first word of "$ac_prog", so it can be a program name with args.
4891set dummy $ac_prog; ac_word=$2
4892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4893$as_echo_n "checking for $ac_word... " >&6; }
4894if ${ac_cv_path_MKDIR+:} false; then :
4895  $as_echo_n "(cached) " >&6
4896else
4897  case $MKDIR in
4898  [\\/]* | ?:[\\/]*)
4899  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4900  ;;
4901  *)
4902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4903for as_dir in $PATH
4904do
4905  IFS=$as_save_IFS
4906  test -z "$as_dir" && as_dir=.
4907    for ac_exec_ext in '' $ac_executable_extensions; do
4908  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4909    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4911    break 2
4912  fi
4913done
4914  done
4915IFS=$as_save_IFS
4916
4917  ;;
4918esac
4919fi
4920MKDIR=$ac_cv_path_MKDIR
4921if test -n "$MKDIR"; then
4922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4923$as_echo "$MKDIR" >&6; }
4924else
4925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4926$as_echo "no" >&6; }
4927fi
4928
4929
4930  test -n "$MKDIR" && break
4931done
4932
4933
4934    if test "x$MKDIR" = x; then
4935        if test "xmkdir" = x; then
4936          PROG_NAME=mkdir
4937        else
4938          PROG_NAME=mkdir
4939        fi
4940        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4941$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4942        as_fn_error $? "Cannot continue" "$LINENO" 5
4943    fi
4944
4945
4946
4947    for ac_prog in mktemp
4948do
4949  # Extract the first word of "$ac_prog", so it can be a program name with args.
4950set dummy $ac_prog; ac_word=$2
4951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4952$as_echo_n "checking for $ac_word... " >&6; }
4953if ${ac_cv_path_MKTEMP+:} false; then :
4954  $as_echo_n "(cached) " >&6
4955else
4956  case $MKTEMP in
4957  [\\/]* | ?:[\\/]*)
4958  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4959  ;;
4960  *)
4961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4962for as_dir in $PATH
4963do
4964  IFS=$as_save_IFS
4965  test -z "$as_dir" && as_dir=.
4966    for ac_exec_ext in '' $ac_executable_extensions; do
4967  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4968    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4970    break 2
4971  fi
4972done
4973  done
4974IFS=$as_save_IFS
4975
4976  ;;
4977esac
4978fi
4979MKTEMP=$ac_cv_path_MKTEMP
4980if test -n "$MKTEMP"; then
4981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4982$as_echo "$MKTEMP" >&6; }
4983else
4984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4985$as_echo "no" >&6; }
4986fi
4987
4988
4989  test -n "$MKTEMP" && break
4990done
4991
4992
4993    if test "x$MKTEMP" = x; then
4994        if test "xmktemp" = x; then
4995          PROG_NAME=mktemp
4996        else
4997          PROG_NAME=mktemp
4998        fi
4999        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5000$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5001        as_fn_error $? "Cannot continue" "$LINENO" 5
5002    fi
5003
5004
5005
5006    for ac_prog in mv
5007do
5008  # Extract the first word of "$ac_prog", so it can be a program name with args.
5009set dummy $ac_prog; ac_word=$2
5010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5011$as_echo_n "checking for $ac_word... " >&6; }
5012if ${ac_cv_path_MV+:} false; then :
5013  $as_echo_n "(cached) " >&6
5014else
5015  case $MV in
5016  [\\/]* | ?:[\\/]*)
5017  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5018  ;;
5019  *)
5020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5021for as_dir in $PATH
5022do
5023  IFS=$as_save_IFS
5024  test -z "$as_dir" && as_dir=.
5025    for ac_exec_ext in '' $ac_executable_extensions; do
5026  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5027    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5029    break 2
5030  fi
5031done
5032  done
5033IFS=$as_save_IFS
5034
5035  ;;
5036esac
5037fi
5038MV=$ac_cv_path_MV
5039if test -n "$MV"; then
5040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5041$as_echo "$MV" >&6; }
5042else
5043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5044$as_echo "no" >&6; }
5045fi
5046
5047
5048  test -n "$MV" && break
5049done
5050
5051
5052    if test "x$MV" = x; then
5053        if test "xmv" = x; then
5054          PROG_NAME=mv
5055        else
5056          PROG_NAME=mv
5057        fi
5058        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5059$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5060        as_fn_error $? "Cannot continue" "$LINENO" 5
5061    fi
5062
5063
5064
5065    for ac_prog in printf
5066do
5067  # Extract the first word of "$ac_prog", so it can be a program name with args.
5068set dummy $ac_prog; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
5071if ${ac_cv_path_PRINTF+:} false; then :
5072  $as_echo_n "(cached) " >&6
5073else
5074  case $PRINTF in
5075  [\\/]* | ?:[\\/]*)
5076  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5077  ;;
5078  *)
5079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080for as_dir in $PATH
5081do
5082  IFS=$as_save_IFS
5083  test -z "$as_dir" && as_dir=.
5084    for ac_exec_ext in '' $ac_executable_extensions; do
5085  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5086    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088    break 2
5089  fi
5090done
5091  done
5092IFS=$as_save_IFS
5093
5094  ;;
5095esac
5096fi
5097PRINTF=$ac_cv_path_PRINTF
5098if test -n "$PRINTF"; then
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5100$as_echo "$PRINTF" >&6; }
5101else
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
5104fi
5105
5106
5107  test -n "$PRINTF" && break
5108done
5109
5110
5111    if test "x$PRINTF" = x; then
5112        if test "xprintf" = x; then
5113          PROG_NAME=printf
5114        else
5115          PROG_NAME=printf
5116        fi
5117        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5118$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5119        as_fn_error $? "Cannot continue" "$LINENO" 5
5120    fi
5121
5122
5123
5124    for ac_prog in pwd
5125do
5126  # Extract the first word of "$ac_prog", so it can be a program name with args.
5127set dummy $ac_prog; ac_word=$2
5128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5129$as_echo_n "checking for $ac_word... " >&6; }
5130if ${ac_cv_path_THEPWDCMD+:} false; then :
5131  $as_echo_n "(cached) " >&6
5132else
5133  case $THEPWDCMD in
5134  [\\/]* | ?:[\\/]*)
5135  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5136  ;;
5137  *)
5138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5139for as_dir in $PATH
5140do
5141  IFS=$as_save_IFS
5142  test -z "$as_dir" && as_dir=.
5143    for ac_exec_ext in '' $ac_executable_extensions; do
5144  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5145    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5147    break 2
5148  fi
5149done
5150  done
5151IFS=$as_save_IFS
5152
5153  ;;
5154esac
5155fi
5156THEPWDCMD=$ac_cv_path_THEPWDCMD
5157if test -n "$THEPWDCMD"; then
5158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5159$as_echo "$THEPWDCMD" >&6; }
5160else
5161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5162$as_echo "no" >&6; }
5163fi
5164
5165
5166  test -n "$THEPWDCMD" && break
5167done
5168
5169
5170    if test "x$THEPWDCMD" = x; then
5171        if test "xpwd" = x; then
5172          PROG_NAME=thepwdcmd
5173        else
5174          PROG_NAME=pwd
5175        fi
5176        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5177$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5178        as_fn_error $? "Cannot continue" "$LINENO" 5
5179    fi
5180
5181
5182
5183    for ac_prog in rm
5184do
5185  # Extract the first word of "$ac_prog", so it can be a program name with args.
5186set dummy $ac_prog; ac_word=$2
5187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5188$as_echo_n "checking for $ac_word... " >&6; }
5189if ${ac_cv_path_RM+:} false; then :
5190  $as_echo_n "(cached) " >&6
5191else
5192  case $RM in
5193  [\\/]* | ?:[\\/]*)
5194  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5195  ;;
5196  *)
5197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5198for as_dir in $PATH
5199do
5200  IFS=$as_save_IFS
5201  test -z "$as_dir" && as_dir=.
5202    for ac_exec_ext in '' $ac_executable_extensions; do
5203  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5204    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5206    break 2
5207  fi
5208done
5209  done
5210IFS=$as_save_IFS
5211
5212  ;;
5213esac
5214fi
5215RM=$ac_cv_path_RM
5216if test -n "$RM"; then
5217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5218$as_echo "$RM" >&6; }
5219else
5220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5221$as_echo "no" >&6; }
5222fi
5223
5224
5225  test -n "$RM" && break
5226done
5227
5228
5229    if test "x$RM" = x; then
5230        if test "xrm" = x; then
5231          PROG_NAME=rm
5232        else
5233          PROG_NAME=rm
5234        fi
5235        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5236$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5237        as_fn_error $? "Cannot continue" "$LINENO" 5
5238    fi
5239
5240
5241
5242    for ac_prog in sh
5243do
5244  # Extract the first word of "$ac_prog", so it can be a program name with args.
5245set dummy $ac_prog; ac_word=$2
5246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5247$as_echo_n "checking for $ac_word... " >&6; }
5248if ${ac_cv_path_SH+:} false; then :
5249  $as_echo_n "(cached) " >&6
5250else
5251  case $SH in
5252  [\\/]* | ?:[\\/]*)
5253  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5254  ;;
5255  *)
5256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5257for as_dir in $PATH
5258do
5259  IFS=$as_save_IFS
5260  test -z "$as_dir" && as_dir=.
5261    for ac_exec_ext in '' $ac_executable_extensions; do
5262  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5263    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5265    break 2
5266  fi
5267done
5268  done
5269IFS=$as_save_IFS
5270
5271  ;;
5272esac
5273fi
5274SH=$ac_cv_path_SH
5275if test -n "$SH"; then
5276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5277$as_echo "$SH" >&6; }
5278else
5279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5280$as_echo "no" >&6; }
5281fi
5282
5283
5284  test -n "$SH" && break
5285done
5286
5287
5288    if test "x$SH" = x; then
5289        if test "xsh" = x; then
5290          PROG_NAME=sh
5291        else
5292          PROG_NAME=sh
5293        fi
5294        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5295$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5296        as_fn_error $? "Cannot continue" "$LINENO" 5
5297    fi
5298
5299
5300
5301    for ac_prog in sort
5302do
5303  # Extract the first word of "$ac_prog", so it can be a program name with args.
5304set dummy $ac_prog; ac_word=$2
5305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5306$as_echo_n "checking for $ac_word... " >&6; }
5307if ${ac_cv_path_SORT+:} false; then :
5308  $as_echo_n "(cached) " >&6
5309else
5310  case $SORT in
5311  [\\/]* | ?:[\\/]*)
5312  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5313  ;;
5314  *)
5315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5316for as_dir in $PATH
5317do
5318  IFS=$as_save_IFS
5319  test -z "$as_dir" && as_dir=.
5320    for ac_exec_ext in '' $ac_executable_extensions; do
5321  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5322    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5324    break 2
5325  fi
5326done
5327  done
5328IFS=$as_save_IFS
5329
5330  ;;
5331esac
5332fi
5333SORT=$ac_cv_path_SORT
5334if test -n "$SORT"; then
5335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5336$as_echo "$SORT" >&6; }
5337else
5338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5339$as_echo "no" >&6; }
5340fi
5341
5342
5343  test -n "$SORT" && break
5344done
5345
5346
5347    if test "x$SORT" = x; then
5348        if test "xsort" = x; then
5349          PROG_NAME=sort
5350        else
5351          PROG_NAME=sort
5352        fi
5353        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5354$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5355        as_fn_error $? "Cannot continue" "$LINENO" 5
5356    fi
5357
5358
5359
5360    for ac_prog in tail
5361do
5362  # Extract the first word of "$ac_prog", so it can be a program name with args.
5363set dummy $ac_prog; ac_word=$2
5364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5365$as_echo_n "checking for $ac_word... " >&6; }
5366if ${ac_cv_path_TAIL+:} false; then :
5367  $as_echo_n "(cached) " >&6
5368else
5369  case $TAIL in
5370  [\\/]* | ?:[\\/]*)
5371  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5372  ;;
5373  *)
5374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5375for as_dir in $PATH
5376do
5377  IFS=$as_save_IFS
5378  test -z "$as_dir" && as_dir=.
5379    for ac_exec_ext in '' $ac_executable_extensions; do
5380  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5381    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5383    break 2
5384  fi
5385done
5386  done
5387IFS=$as_save_IFS
5388
5389  ;;
5390esac
5391fi
5392TAIL=$ac_cv_path_TAIL
5393if test -n "$TAIL"; then
5394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5395$as_echo "$TAIL" >&6; }
5396else
5397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5398$as_echo "no" >&6; }
5399fi
5400
5401
5402  test -n "$TAIL" && break
5403done
5404
5405
5406    if test "x$TAIL" = x; then
5407        if test "xtail" = x; then
5408          PROG_NAME=tail
5409        else
5410          PROG_NAME=tail
5411        fi
5412        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5413$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5414        as_fn_error $? "Cannot continue" "$LINENO" 5
5415    fi
5416
5417
5418
5419    for ac_prog in tar
5420do
5421  # Extract the first word of "$ac_prog", so it can be a program name with args.
5422set dummy $ac_prog; ac_word=$2
5423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5424$as_echo_n "checking for $ac_word... " >&6; }
5425if ${ac_cv_path_TAR+:} false; then :
5426  $as_echo_n "(cached) " >&6
5427else
5428  case $TAR in
5429  [\\/]* | ?:[\\/]*)
5430  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5431  ;;
5432  *)
5433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5434for as_dir in $PATH
5435do
5436  IFS=$as_save_IFS
5437  test -z "$as_dir" && as_dir=.
5438    for ac_exec_ext in '' $ac_executable_extensions; do
5439  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5440    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5442    break 2
5443  fi
5444done
5445  done
5446IFS=$as_save_IFS
5447
5448  ;;
5449esac
5450fi
5451TAR=$ac_cv_path_TAR
5452if test -n "$TAR"; then
5453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5454$as_echo "$TAR" >&6; }
5455else
5456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5457$as_echo "no" >&6; }
5458fi
5459
5460
5461  test -n "$TAR" && break
5462done
5463
5464
5465    if test "x$TAR" = x; then
5466        if test "xtar" = x; then
5467          PROG_NAME=tar
5468        else
5469          PROG_NAME=tar
5470        fi
5471        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5472$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5473        as_fn_error $? "Cannot continue" "$LINENO" 5
5474    fi
5475
5476
5477
5478    for ac_prog in tee
5479do
5480  # Extract the first word of "$ac_prog", so it can be a program name with args.
5481set dummy $ac_prog; ac_word=$2
5482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5483$as_echo_n "checking for $ac_word... " >&6; }
5484if ${ac_cv_path_TEE+:} false; then :
5485  $as_echo_n "(cached) " >&6
5486else
5487  case $TEE in
5488  [\\/]* | ?:[\\/]*)
5489  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5490  ;;
5491  *)
5492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5493for as_dir in $PATH
5494do
5495  IFS=$as_save_IFS
5496  test -z "$as_dir" && as_dir=.
5497    for ac_exec_ext in '' $ac_executable_extensions; do
5498  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5499    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5501    break 2
5502  fi
5503done
5504  done
5505IFS=$as_save_IFS
5506
5507  ;;
5508esac
5509fi
5510TEE=$ac_cv_path_TEE
5511if test -n "$TEE"; then
5512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5513$as_echo "$TEE" >&6; }
5514else
5515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5516$as_echo "no" >&6; }
5517fi
5518
5519
5520  test -n "$TEE" && break
5521done
5522
5523
5524    if test "x$TEE" = x; then
5525        if test "xtee" = x; then
5526          PROG_NAME=tee
5527        else
5528          PROG_NAME=tee
5529        fi
5530        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5531$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5532        as_fn_error $? "Cannot continue" "$LINENO" 5
5533    fi
5534
5535
5536
5537    for ac_prog in touch
5538do
5539  # Extract the first word of "$ac_prog", so it can be a program name with args.
5540set dummy $ac_prog; ac_word=$2
5541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5542$as_echo_n "checking for $ac_word... " >&6; }
5543if ${ac_cv_path_TOUCH+:} false; then :
5544  $as_echo_n "(cached) " >&6
5545else
5546  case $TOUCH in
5547  [\\/]* | ?:[\\/]*)
5548  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5549  ;;
5550  *)
5551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5552for as_dir in $PATH
5553do
5554  IFS=$as_save_IFS
5555  test -z "$as_dir" && as_dir=.
5556    for ac_exec_ext in '' $ac_executable_extensions; do
5557  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5558    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5560    break 2
5561  fi
5562done
5563  done
5564IFS=$as_save_IFS
5565
5566  ;;
5567esac
5568fi
5569TOUCH=$ac_cv_path_TOUCH
5570if test -n "$TOUCH"; then
5571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5572$as_echo "$TOUCH" >&6; }
5573else
5574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5575$as_echo "no" >&6; }
5576fi
5577
5578
5579  test -n "$TOUCH" && break
5580done
5581
5582
5583    if test "x$TOUCH" = x; then
5584        if test "xtouch" = x; then
5585          PROG_NAME=touch
5586        else
5587          PROG_NAME=touch
5588        fi
5589        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5590$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5591        as_fn_error $? "Cannot continue" "$LINENO" 5
5592    fi
5593
5594
5595
5596    for ac_prog in tr
5597do
5598  # Extract the first word of "$ac_prog", so it can be a program name with args.
5599set dummy $ac_prog; ac_word=$2
5600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5601$as_echo_n "checking for $ac_word... " >&6; }
5602if ${ac_cv_path_TR+:} false; then :
5603  $as_echo_n "(cached) " >&6
5604else
5605  case $TR in
5606  [\\/]* | ?:[\\/]*)
5607  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5608  ;;
5609  *)
5610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5611for as_dir in $PATH
5612do
5613  IFS=$as_save_IFS
5614  test -z "$as_dir" && as_dir=.
5615    for ac_exec_ext in '' $ac_executable_extensions; do
5616  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5617    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5619    break 2
5620  fi
5621done
5622  done
5623IFS=$as_save_IFS
5624
5625  ;;
5626esac
5627fi
5628TR=$ac_cv_path_TR
5629if test -n "$TR"; then
5630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5631$as_echo "$TR" >&6; }
5632else
5633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5634$as_echo "no" >&6; }
5635fi
5636
5637
5638  test -n "$TR" && break
5639done
5640
5641
5642    if test "x$TR" = x; then
5643        if test "xtr" = x; then
5644          PROG_NAME=tr
5645        else
5646          PROG_NAME=tr
5647        fi
5648        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5649$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5650        as_fn_error $? "Cannot continue" "$LINENO" 5
5651    fi
5652
5653
5654
5655    for ac_prog in uname
5656do
5657  # Extract the first word of "$ac_prog", so it can be a program name with args.
5658set dummy $ac_prog; ac_word=$2
5659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5660$as_echo_n "checking for $ac_word... " >&6; }
5661if ${ac_cv_path_UNAME+:} false; then :
5662  $as_echo_n "(cached) " >&6
5663else
5664  case $UNAME in
5665  [\\/]* | ?:[\\/]*)
5666  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5667  ;;
5668  *)
5669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5670for as_dir in $PATH
5671do
5672  IFS=$as_save_IFS
5673  test -z "$as_dir" && as_dir=.
5674    for ac_exec_ext in '' $ac_executable_extensions; do
5675  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5676    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5678    break 2
5679  fi
5680done
5681  done
5682IFS=$as_save_IFS
5683
5684  ;;
5685esac
5686fi
5687UNAME=$ac_cv_path_UNAME
5688if test -n "$UNAME"; then
5689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5690$as_echo "$UNAME" >&6; }
5691else
5692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5693$as_echo "no" >&6; }
5694fi
5695
5696
5697  test -n "$UNAME" && break
5698done
5699
5700
5701    if test "x$UNAME" = x; then
5702        if test "xuname" = x; then
5703          PROG_NAME=uname
5704        else
5705          PROG_NAME=uname
5706        fi
5707        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5708$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5709        as_fn_error $? "Cannot continue" "$LINENO" 5
5710    fi
5711
5712
5713
5714    for ac_prog in uniq
5715do
5716  # Extract the first word of "$ac_prog", so it can be a program name with args.
5717set dummy $ac_prog; ac_word=$2
5718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5719$as_echo_n "checking for $ac_word... " >&6; }
5720if ${ac_cv_path_UNIQ+:} false; then :
5721  $as_echo_n "(cached) " >&6
5722else
5723  case $UNIQ in
5724  [\\/]* | ?:[\\/]*)
5725  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5726  ;;
5727  *)
5728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5729for as_dir in $PATH
5730do
5731  IFS=$as_save_IFS
5732  test -z "$as_dir" && as_dir=.
5733    for ac_exec_ext in '' $ac_executable_extensions; do
5734  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5735    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5737    break 2
5738  fi
5739done
5740  done
5741IFS=$as_save_IFS
5742
5743  ;;
5744esac
5745fi
5746UNIQ=$ac_cv_path_UNIQ
5747if test -n "$UNIQ"; then
5748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5749$as_echo "$UNIQ" >&6; }
5750else
5751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5752$as_echo "no" >&6; }
5753fi
5754
5755
5756  test -n "$UNIQ" && break
5757done
5758
5759
5760    if test "x$UNIQ" = x; then
5761        if test "xuniq" = x; then
5762          PROG_NAME=uniq
5763        else
5764          PROG_NAME=uniq
5765        fi
5766        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5767$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5768        as_fn_error $? "Cannot continue" "$LINENO" 5
5769    fi
5770
5771
5772
5773    for ac_prog in wc
5774do
5775  # Extract the first word of "$ac_prog", so it can be a program name with args.
5776set dummy $ac_prog; ac_word=$2
5777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5778$as_echo_n "checking for $ac_word... " >&6; }
5779if ${ac_cv_path_WC+:} false; then :
5780  $as_echo_n "(cached) " >&6
5781else
5782  case $WC in
5783  [\\/]* | ?:[\\/]*)
5784  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5785  ;;
5786  *)
5787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5788for as_dir in $PATH
5789do
5790  IFS=$as_save_IFS
5791  test -z "$as_dir" && as_dir=.
5792    for ac_exec_ext in '' $ac_executable_extensions; do
5793  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5794    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5796    break 2
5797  fi
5798done
5799  done
5800IFS=$as_save_IFS
5801
5802  ;;
5803esac
5804fi
5805WC=$ac_cv_path_WC
5806if test -n "$WC"; then
5807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5808$as_echo "$WC" >&6; }
5809else
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5811$as_echo "no" >&6; }
5812fi
5813
5814
5815  test -n "$WC" && break
5816done
5817
5818
5819    if test "x$WC" = x; then
5820        if test "xwc" = x; then
5821          PROG_NAME=wc
5822        else
5823          PROG_NAME=wc
5824        fi
5825        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5826$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5827        as_fn_error $? "Cannot continue" "$LINENO" 5
5828    fi
5829
5830
5831
5832    for ac_prog in which
5833do
5834  # Extract the first word of "$ac_prog", so it can be a program name with args.
5835set dummy $ac_prog; ac_word=$2
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
5838if ${ac_cv_path_WHICH+:} false; then :
5839  $as_echo_n "(cached) " >&6
5840else
5841  case $WHICH in
5842  [\\/]* | ?:[\\/]*)
5843  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5844  ;;
5845  *)
5846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5847for as_dir in $PATH
5848do
5849  IFS=$as_save_IFS
5850  test -z "$as_dir" && as_dir=.
5851    for ac_exec_ext in '' $ac_executable_extensions; do
5852  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5853    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5855    break 2
5856  fi
5857done
5858  done
5859IFS=$as_save_IFS
5860
5861  ;;
5862esac
5863fi
5864WHICH=$ac_cv_path_WHICH
5865if test -n "$WHICH"; then
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5867$as_echo "$WHICH" >&6; }
5868else
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870$as_echo "no" >&6; }
5871fi
5872
5873
5874  test -n "$WHICH" && break
5875done
5876
5877
5878    if test "x$WHICH" = x; then
5879        if test "xwhich" = x; then
5880          PROG_NAME=which
5881        else
5882          PROG_NAME=which
5883        fi
5884        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5885$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5886        as_fn_error $? "Cannot continue" "$LINENO" 5
5887    fi
5888
5889
5890
5891    for ac_prog in xargs
5892do
5893  # Extract the first word of "$ac_prog", so it can be a program name with args.
5894set dummy $ac_prog; ac_word=$2
5895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5896$as_echo_n "checking for $ac_word... " >&6; }
5897if ${ac_cv_path_XARGS+:} false; then :
5898  $as_echo_n "(cached) " >&6
5899else
5900  case $XARGS in
5901  [\\/]* | ?:[\\/]*)
5902  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5903  ;;
5904  *)
5905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5906for as_dir in $PATH
5907do
5908  IFS=$as_save_IFS
5909  test -z "$as_dir" && as_dir=.
5910    for ac_exec_ext in '' $ac_executable_extensions; do
5911  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5912    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5914    break 2
5915  fi
5916done
5917  done
5918IFS=$as_save_IFS
5919
5920  ;;
5921esac
5922fi
5923XARGS=$ac_cv_path_XARGS
5924if test -n "$XARGS"; then
5925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5926$as_echo "$XARGS" >&6; }
5927else
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929$as_echo "no" >&6; }
5930fi
5931
5932
5933  test -n "$XARGS" && break
5934done
5935
5936
5937    if test "x$XARGS" = x; then
5938        if test "xxargs" = x; then
5939          PROG_NAME=xargs
5940        else
5941          PROG_NAME=xargs
5942        fi
5943        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5944$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5945        as_fn_error $? "Cannot continue" "$LINENO" 5
5946    fi
5947
5948
5949
5950# Then required tools that require some special treatment.
5951for ac_prog in gawk mawk nawk awk
5952do
5953  # Extract the first word of "$ac_prog", so it can be a program name with args.
5954set dummy $ac_prog; ac_word=$2
5955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5956$as_echo_n "checking for $ac_word... " >&6; }
5957if ${ac_cv_prog_AWK+:} false; then :
5958  $as_echo_n "(cached) " >&6
5959else
5960  if test -n "$AWK"; then
5961  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5962else
5963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5964for as_dir in $PATH
5965do
5966  IFS=$as_save_IFS
5967  test -z "$as_dir" && as_dir=.
5968    for ac_exec_ext in '' $ac_executable_extensions; do
5969  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5970    ac_cv_prog_AWK="$ac_prog"
5971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5972    break 2
5973  fi
5974done
5975  done
5976IFS=$as_save_IFS
5977
5978fi
5979fi
5980AWK=$ac_cv_prog_AWK
5981if test -n "$AWK"; then
5982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5983$as_echo "$AWK" >&6; }
5984else
5985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986$as_echo "no" >&6; }
5987fi
5988
5989
5990  test -n "$AWK" && break
5991done
5992
5993
5994    if test "x$AWK" = x; then
5995        if test "x" = x; then
5996          PROG_NAME=awk
5997        else
5998          PROG_NAME=
5999        fi
6000        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6001$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6002        as_fn_error $? "Cannot continue" "$LINENO" 5
6003    fi
6004
6005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6006$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6007if ${ac_cv_path_GREP+:} false; then :
6008  $as_echo_n "(cached) " >&6
6009else
6010  if test -z "$GREP"; then
6011  ac_path_GREP_found=false
6012  # Loop through the user's path and test for each of PROGNAME-LIST
6013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6015do
6016  IFS=$as_save_IFS
6017  test -z "$as_dir" && as_dir=.
6018    for ac_prog in grep ggrep; do
6019    for ac_exec_ext in '' $ac_executable_extensions; do
6020      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6021      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6022# Check for GNU ac_path_GREP and select it if it is found.
6023  # Check for GNU $ac_path_GREP
6024case `"$ac_path_GREP" --version 2>&1` in
6025*GNU*)
6026  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6027*)
6028  ac_count=0
6029  $as_echo_n 0123456789 >"conftest.in"
6030  while :
6031  do
6032    cat "conftest.in" "conftest.in" >"conftest.tmp"
6033    mv "conftest.tmp" "conftest.in"
6034    cp "conftest.in" "conftest.nl"
6035    $as_echo 'GREP' >> "conftest.nl"
6036    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6037    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6038    as_fn_arith $ac_count + 1 && ac_count=$as_val
6039    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6040      # Best one so far, save it but keep looking for a better one
6041      ac_cv_path_GREP="$ac_path_GREP"
6042      ac_path_GREP_max=$ac_count
6043    fi
6044    # 10*(2^10) chars as input seems more than enough
6045    test $ac_count -gt 10 && break
6046  done
6047  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6048esac
6049
6050      $ac_path_GREP_found && break 3
6051    done
6052  done
6053  done
6054IFS=$as_save_IFS
6055  if test -z "$ac_cv_path_GREP"; then
6056    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6057  fi
6058else
6059  ac_cv_path_GREP=$GREP
6060fi
6061
6062fi
6063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6064$as_echo "$ac_cv_path_GREP" >&6; }
6065 GREP="$ac_cv_path_GREP"
6066
6067
6068
6069    if test "x$GREP" = x; then
6070        if test "x" = x; then
6071          PROG_NAME=grep
6072        else
6073          PROG_NAME=
6074        fi
6075        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6076$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6077        as_fn_error $? "Cannot continue" "$LINENO" 5
6078    fi
6079
6080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6081$as_echo_n "checking for egrep... " >&6; }
6082if ${ac_cv_path_EGREP+:} false; then :
6083  $as_echo_n "(cached) " >&6
6084else
6085  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6086   then ac_cv_path_EGREP="$GREP -E"
6087   else
6088     if test -z "$EGREP"; then
6089  ac_path_EGREP_found=false
6090  # Loop through the user's path and test for each of PROGNAME-LIST
6091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6092for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6093do
6094  IFS=$as_save_IFS
6095  test -z "$as_dir" && as_dir=.
6096    for ac_prog in egrep; do
6097    for ac_exec_ext in '' $ac_executable_extensions; do
6098      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6099      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6100# Check for GNU ac_path_EGREP and select it if it is found.
6101  # Check for GNU $ac_path_EGREP
6102case `"$ac_path_EGREP" --version 2>&1` in
6103*GNU*)
6104  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6105*)
6106  ac_count=0
6107  $as_echo_n 0123456789 >"conftest.in"
6108  while :
6109  do
6110    cat "conftest.in" "conftest.in" >"conftest.tmp"
6111    mv "conftest.tmp" "conftest.in"
6112    cp "conftest.in" "conftest.nl"
6113    $as_echo 'EGREP' >> "conftest.nl"
6114    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6115    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6116    as_fn_arith $ac_count + 1 && ac_count=$as_val
6117    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6118      # Best one so far, save it but keep looking for a better one
6119      ac_cv_path_EGREP="$ac_path_EGREP"
6120      ac_path_EGREP_max=$ac_count
6121    fi
6122    # 10*(2^10) chars as input seems more than enough
6123    test $ac_count -gt 10 && break
6124  done
6125  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6126esac
6127
6128      $ac_path_EGREP_found && break 3
6129    done
6130  done
6131  done
6132IFS=$as_save_IFS
6133  if test -z "$ac_cv_path_EGREP"; then
6134    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6135  fi
6136else
6137  ac_cv_path_EGREP=$EGREP
6138fi
6139
6140   fi
6141fi
6142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6143$as_echo "$ac_cv_path_EGREP" >&6; }
6144 EGREP="$ac_cv_path_EGREP"
6145
6146
6147
6148    if test "x$EGREP" = x; then
6149        if test "x" = x; then
6150          PROG_NAME=egrep
6151        else
6152          PROG_NAME=
6153        fi
6154        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6155$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6156        as_fn_error $? "Cannot continue" "$LINENO" 5
6157    fi
6158
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6160$as_echo_n "checking for fgrep... " >&6; }
6161if ${ac_cv_path_FGREP+:} false; then :
6162  $as_echo_n "(cached) " >&6
6163else
6164  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6165   then ac_cv_path_FGREP="$GREP -F"
6166   else
6167     if test -z "$FGREP"; then
6168  ac_path_FGREP_found=false
6169  # Loop through the user's path and test for each of PROGNAME-LIST
6170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6171for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6172do
6173  IFS=$as_save_IFS
6174  test -z "$as_dir" && as_dir=.
6175    for ac_prog in fgrep; do
6176    for ac_exec_ext in '' $ac_executable_extensions; do
6177      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6178      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6179# Check for GNU ac_path_FGREP and select it if it is found.
6180  # Check for GNU $ac_path_FGREP
6181case `"$ac_path_FGREP" --version 2>&1` in
6182*GNU*)
6183  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6184*)
6185  ac_count=0
6186  $as_echo_n 0123456789 >"conftest.in"
6187  while :
6188  do
6189    cat "conftest.in" "conftest.in" >"conftest.tmp"
6190    mv "conftest.tmp" "conftest.in"
6191    cp "conftest.in" "conftest.nl"
6192    $as_echo 'FGREP' >> "conftest.nl"
6193    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6194    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6195    as_fn_arith $ac_count + 1 && ac_count=$as_val
6196    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6197      # Best one so far, save it but keep looking for a better one
6198      ac_cv_path_FGREP="$ac_path_FGREP"
6199      ac_path_FGREP_max=$ac_count
6200    fi
6201    # 10*(2^10) chars as input seems more than enough
6202    test $ac_count -gt 10 && break
6203  done
6204  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6205esac
6206
6207      $ac_path_FGREP_found && break 3
6208    done
6209  done
6210  done
6211IFS=$as_save_IFS
6212  if test -z "$ac_cv_path_FGREP"; then
6213    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6214  fi
6215else
6216  ac_cv_path_FGREP=$FGREP
6217fi
6218
6219   fi
6220fi
6221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6222$as_echo "$ac_cv_path_FGREP" >&6; }
6223 FGREP="$ac_cv_path_FGREP"
6224
6225
6226
6227    if test "x$FGREP" = x; then
6228        if test "x" = x; then
6229          PROG_NAME=fgrep
6230        else
6231          PROG_NAME=
6232        fi
6233        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6234$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6235        as_fn_error $? "Cannot continue" "$LINENO" 5
6236    fi
6237
6238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6239$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6240if ${ac_cv_path_SED+:} false; then :
6241  $as_echo_n "(cached) " >&6
6242else
6243            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6244     for ac_i in 1 2 3 4 5 6 7; do
6245       ac_script="$ac_script$as_nl$ac_script"
6246     done
6247     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6248     { ac_script=; unset ac_script;}
6249     if test -z "$SED"; then
6250  ac_path_SED_found=false
6251  # Loop through the user's path and test for each of PROGNAME-LIST
6252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6253for as_dir in $PATH
6254do
6255  IFS=$as_save_IFS
6256  test -z "$as_dir" && as_dir=.
6257    for ac_prog in sed gsed; do
6258    for ac_exec_ext in '' $ac_executable_extensions; do
6259      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6260      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6261# Check for GNU ac_path_SED and select it if it is found.
6262  # Check for GNU $ac_path_SED
6263case `"$ac_path_SED" --version 2>&1` in
6264*GNU*)
6265  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6266*)
6267  ac_count=0
6268  $as_echo_n 0123456789 >"conftest.in"
6269  while :
6270  do
6271    cat "conftest.in" "conftest.in" >"conftest.tmp"
6272    mv "conftest.tmp" "conftest.in"
6273    cp "conftest.in" "conftest.nl"
6274    $as_echo '' >> "conftest.nl"
6275    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6276    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6277    as_fn_arith $ac_count + 1 && ac_count=$as_val
6278    if test $ac_count -gt ${ac_path_SED_max-0}; then
6279      # Best one so far, save it but keep looking for a better one
6280      ac_cv_path_SED="$ac_path_SED"
6281      ac_path_SED_max=$ac_count
6282    fi
6283    # 10*(2^10) chars as input seems more than enough
6284    test $ac_count -gt 10 && break
6285  done
6286  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6287esac
6288
6289      $ac_path_SED_found && break 3
6290    done
6291  done
6292  done
6293IFS=$as_save_IFS
6294  if test -z "$ac_cv_path_SED"; then
6295    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6296  fi
6297else
6298  ac_cv_path_SED=$SED
6299fi
6300
6301fi
6302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6303$as_echo "$ac_cv_path_SED" >&6; }
6304 SED="$ac_cv_path_SED"
6305  rm -f conftest.sed
6306
6307
6308    if test "x$SED" = x; then
6309        if test "x" = x; then
6310          PROG_NAME=sed
6311        else
6312          PROG_NAME=
6313        fi
6314        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6315$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6316        as_fn_error $? "Cannot continue" "$LINENO" 5
6317    fi
6318
6319
6320for ac_prog in nawk gawk awk
6321do
6322  # Extract the first word of "$ac_prog", so it can be a program name with args.
6323set dummy $ac_prog; ac_word=$2
6324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6325$as_echo_n "checking for $ac_word... " >&6; }
6326if ${ac_cv_path_NAWK+:} false; then :
6327  $as_echo_n "(cached) " >&6
6328else
6329  case $NAWK in
6330  [\\/]* | ?:[\\/]*)
6331  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6332  ;;
6333  *)
6334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6335for as_dir in $PATH
6336do
6337  IFS=$as_save_IFS
6338  test -z "$as_dir" && as_dir=.
6339    for ac_exec_ext in '' $ac_executable_extensions; do
6340  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6341    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6343    break 2
6344  fi
6345done
6346  done
6347IFS=$as_save_IFS
6348
6349  ;;
6350esac
6351fi
6352NAWK=$ac_cv_path_NAWK
6353if test -n "$NAWK"; then
6354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6355$as_echo "$NAWK" >&6; }
6356else
6357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6358$as_echo "no" >&6; }
6359fi
6360
6361
6362  test -n "$NAWK" && break
6363done
6364
6365
6366    if test "x$NAWK" = x; then
6367        if test "x" = x; then
6368          PROG_NAME=nawk
6369        else
6370          PROG_NAME=
6371        fi
6372        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6373$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6374        as_fn_error $? "Cannot continue" "$LINENO" 5
6375    fi
6376
6377
6378# Always force rm.
6379RM="$RM -f"
6380
6381# These are not required on all platforms
6382# Extract the first word of "cygpath", so it can be a program name with args.
6383set dummy cygpath; ac_word=$2
6384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6385$as_echo_n "checking for $ac_word... " >&6; }
6386if ${ac_cv_path_CYGPATH+:} false; then :
6387  $as_echo_n "(cached) " >&6
6388else
6389  case $CYGPATH in
6390  [\\/]* | ?:[\\/]*)
6391  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6392  ;;
6393  *)
6394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6395for as_dir in $PATH
6396do
6397  IFS=$as_save_IFS
6398  test -z "$as_dir" && as_dir=.
6399    for ac_exec_ext in '' $ac_executable_extensions; do
6400  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6401    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6403    break 2
6404  fi
6405done
6406  done
6407IFS=$as_save_IFS
6408
6409  ;;
6410esac
6411fi
6412CYGPATH=$ac_cv_path_CYGPATH
6413if test -n "$CYGPATH"; then
6414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6415$as_echo "$CYGPATH" >&6; }
6416else
6417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6418$as_echo "no" >&6; }
6419fi
6420
6421
6422# Extract the first word of "readlink", so it can be a program name with args.
6423set dummy readlink; ac_word=$2
6424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6425$as_echo_n "checking for $ac_word... " >&6; }
6426if ${ac_cv_path_READLINK+:} false; then :
6427  $as_echo_n "(cached) " >&6
6428else
6429  case $READLINK in
6430  [\\/]* | ?:[\\/]*)
6431  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6432  ;;
6433  *)
6434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6435for as_dir in $PATH
6436do
6437  IFS=$as_save_IFS
6438  test -z "$as_dir" && as_dir=.
6439    for ac_exec_ext in '' $ac_executable_extensions; do
6440  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6441    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6443    break 2
6444  fi
6445done
6446  done
6447IFS=$as_save_IFS
6448
6449  ;;
6450esac
6451fi
6452READLINK=$ac_cv_path_READLINK
6453if test -n "$READLINK"; then
6454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6455$as_echo "$READLINK" >&6; }
6456else
6457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6458$as_echo "no" >&6; }
6459fi
6460
6461
6462# Extract the first word of "df", so it can be a program name with args.
6463set dummy df; ac_word=$2
6464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6465$as_echo_n "checking for $ac_word... " >&6; }
6466if ${ac_cv_path_DF+:} false; then :
6467  $as_echo_n "(cached) " >&6
6468else
6469  case $DF in
6470  [\\/]* | ?:[\\/]*)
6471  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6472  ;;
6473  *)
6474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6475for as_dir in $PATH
6476do
6477  IFS=$as_save_IFS
6478  test -z "$as_dir" && as_dir=.
6479    for ac_exec_ext in '' $ac_executable_extensions; do
6480  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6481    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6483    break 2
6484  fi
6485done
6486  done
6487IFS=$as_save_IFS
6488
6489  ;;
6490esac
6491fi
6492DF=$ac_cv_path_DF
6493if test -n "$DF"; then
6494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6495$as_echo "$DF" >&6; }
6496else
6497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6498$as_echo "no" >&6; }
6499fi
6500
6501
6502# Extract the first word of "SetFile", so it can be a program name with args.
6503set dummy SetFile; ac_word=$2
6504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6505$as_echo_n "checking for $ac_word... " >&6; }
6506if ${ac_cv_path_SETFILE+:} false; then :
6507  $as_echo_n "(cached) " >&6
6508else
6509  case $SETFILE in
6510  [\\/]* | ?:[\\/]*)
6511  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6512  ;;
6513  *)
6514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6515for as_dir in $PATH
6516do
6517  IFS=$as_save_IFS
6518  test -z "$as_dir" && as_dir=.
6519    for ac_exec_ext in '' $ac_executable_extensions; do
6520  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6521    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6523    break 2
6524  fi
6525done
6526  done
6527IFS=$as_save_IFS
6528
6529  ;;
6530esac
6531fi
6532SETFILE=$ac_cv_path_SETFILE
6533if test -n "$SETFILE"; then
6534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6535$as_echo "$SETFILE" >&6; }
6536else
6537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6538$as_echo "no" >&6; }
6539fi
6540
6541
6542
6543
6544# Now we can determine OpenJDK build and target platforms. This is required to
6545# have early on.
6546# Make sure we can run config.sub.
6547$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6548  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6549
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6551$as_echo_n "checking build system type... " >&6; }
6552if ${ac_cv_build+:} false; then :
6553  $as_echo_n "(cached) " >&6
6554else
6555  ac_build_alias=$build_alias
6556test "x$ac_build_alias" = x &&
6557  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6558test "x$ac_build_alias" = x &&
6559  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6560ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6561  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6562
6563fi
6564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6565$as_echo "$ac_cv_build" >&6; }
6566case $ac_cv_build in
6567*-*-*) ;;
6568*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6569esac
6570build=$ac_cv_build
6571ac_save_IFS=$IFS; IFS='-'
6572set x $ac_cv_build
6573shift
6574build_cpu=$1
6575build_vendor=$2
6576shift; shift
6577# Remember, the first character of IFS is used to create $*,
6578# except with old shells:
6579build_os=$*
6580IFS=$ac_save_IFS
6581case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6582
6583
6584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6585$as_echo_n "checking host system type... " >&6; }
6586if ${ac_cv_host+:} false; then :
6587  $as_echo_n "(cached) " >&6
6588else
6589  if test "x$host_alias" = x; then
6590  ac_cv_host=$ac_cv_build
6591else
6592  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6593    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6594fi
6595
6596fi
6597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6598$as_echo "$ac_cv_host" >&6; }
6599case $ac_cv_host in
6600*-*-*) ;;
6601*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6602esac
6603host=$ac_cv_host
6604ac_save_IFS=$IFS; IFS='-'
6605set x $ac_cv_host
6606shift
6607host_cpu=$1
6608host_vendor=$2
6609shift; shift
6610# Remember, the first character of IFS is used to create $*,
6611# except with old shells:
6612host_os=$*
6613IFS=$ac_save_IFS
6614case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6615
6616
6617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6618$as_echo_n "checking target system type... " >&6; }
6619if ${ac_cv_target+:} false; then :
6620  $as_echo_n "(cached) " >&6
6621else
6622  if test "x$target_alias" = x; then
6623  ac_cv_target=$ac_cv_host
6624else
6625  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6626    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6627fi
6628
6629fi
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6631$as_echo "$ac_cv_target" >&6; }
6632case $ac_cv_target in
6633*-*-*) ;;
6634*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6635esac
6636target=$ac_cv_target
6637ac_save_IFS=$IFS; IFS='-'
6638set x $ac_cv_target
6639shift
6640target_cpu=$1
6641target_vendor=$2
6642shift; shift
6643# Remember, the first character of IFS is used to create $*,
6644# except with old shells:
6645target_os=$*
6646IFS=$ac_save_IFS
6647case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6648
6649
6650# The aliases save the names the user supplied, while $host etc.
6651# will get canonicalized.
6652test -n "$target_alias" &&
6653  test "$program_prefix$program_suffix$program_transform_name" = \
6654    NONENONEs,x,x, &&
6655  program_prefix=${target_alias}-
6656
6657# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6658# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6659# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6660# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6661# to use the configure naming style.
6662
6663
6664
6665
6666
6667    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6668    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6669    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6670    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6671    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6672    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6673
6674
6675
6676    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6677
6678  case "$build_os" in
6679    *linux*)
6680      VAR_OS=linux
6681      VAR_OS_API=posix
6682      VAR_OS_ENV=linux
6683      ;;
6684    *solaris*)
6685      VAR_OS=solaris
6686      VAR_OS_API=posix
6687      VAR_OS_ENV=solaris
6688      ;;
6689    *darwin*)
6690      VAR_OS=macosx
6691      VAR_OS_API=posix
6692      VAR_OS_ENV=macosx
6693      ;;
6694    *bsd*)
6695      VAR_OS=bsd
6696      VAR_OS_API=posix
6697      VAR_OS_ENV=bsd
6698      ;;
6699    *cygwin*)
6700      VAR_OS=windows
6701      VAR_OS_API=winapi
6702      VAR_OS_ENV=windows.cygwin
6703      ;;
6704    *mingw*)
6705      VAR_OS=windows
6706      VAR_OS_API=winapi
6707      VAR_OS_ENV=windows.msys
6708      ;;
6709    *)
6710      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6711      ;;
6712  esac
6713
6714
6715  # First argument is the cpu name from the trip/quad
6716  case "$build_cpu" in
6717    x86_64)
6718      VAR_CPU=x86_64
6719      VAR_CPU_ARCH=x86
6720      VAR_CPU_BITS=64
6721      VAR_CPU_ENDIAN=little
6722      ;;
6723    i?86)
6724      VAR_CPU=x86
6725      VAR_CPU_ARCH=x86
6726      VAR_CPU_BITS=32
6727      VAR_CPU_ENDIAN=little
6728      ;;
6729    arm*)
6730      VAR_CPU=arm
6731      VAR_CPU_ARCH=arm
6732      VAR_CPU_BITS=32
6733      VAR_CPU_ENDIAN=little
6734      ;;
6735    powerpc)
6736      VAR_CPU=ppc
6737      VAR_CPU_ARCH=ppc
6738      VAR_CPU_BITS=32
6739      VAR_CPU_ENDIAN=big
6740       ;;
6741    powerpc64)
6742      VAR_CPU=ppc64
6743      VAR_CPU_ARCH=ppc
6744      VAR_CPU_BITS=64
6745      VAR_CPU_ENDIAN=big
6746       ;;
6747    sparc)
6748      VAR_CPU=sparc
6749      VAR_CPU_ARCH=sparc
6750      VAR_CPU_BITS=32
6751      VAR_CPU_ENDIAN=big
6752       ;;
6753    sparcv9)
6754      VAR_CPU=sparcv9
6755      VAR_CPU_ARCH=sparc
6756      VAR_CPU_BITS=64
6757      VAR_CPU_ENDIAN=big
6758       ;;
6759    *)
6760      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6761      ;;
6762  esac
6763
6764    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6765    OPENJDK_BUILD_OS="$VAR_OS"
6766    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6767    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6768    OPENJDK_BUILD_CPU="$VAR_CPU"
6769    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6770    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6771    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6772
6773
6774
6775
6776
6777
6778
6779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6780$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6782$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6783
6784    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6785
6786  case "$host_os" in
6787    *linux*)
6788      VAR_OS=linux
6789      VAR_OS_API=posix
6790      VAR_OS_ENV=linux
6791      ;;
6792    *solaris*)
6793      VAR_OS=solaris
6794      VAR_OS_API=posix
6795      VAR_OS_ENV=solaris
6796      ;;
6797    *darwin*)
6798      VAR_OS=macosx
6799      VAR_OS_API=posix
6800      VAR_OS_ENV=macosx
6801      ;;
6802    *bsd*)
6803      VAR_OS=bsd
6804      VAR_OS_API=posix
6805      VAR_OS_ENV=bsd
6806      ;;
6807    *cygwin*)
6808      VAR_OS=windows
6809      VAR_OS_API=winapi
6810      VAR_OS_ENV=windows.cygwin
6811      ;;
6812    *mingw*)
6813      VAR_OS=windows
6814      VAR_OS_API=winapi
6815      VAR_OS_ENV=windows.msys
6816      ;;
6817    *)
6818      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6819      ;;
6820  esac
6821
6822
6823  # First argument is the cpu name from the trip/quad
6824  case "$host_cpu" in
6825    x86_64)
6826      VAR_CPU=x86_64
6827      VAR_CPU_ARCH=x86
6828      VAR_CPU_BITS=64
6829      VAR_CPU_ENDIAN=little
6830      ;;
6831    i?86)
6832      VAR_CPU=x86
6833      VAR_CPU_ARCH=x86
6834      VAR_CPU_BITS=32
6835      VAR_CPU_ENDIAN=little
6836      ;;
6837    arm*)
6838      VAR_CPU=arm
6839      VAR_CPU_ARCH=arm
6840      VAR_CPU_BITS=32
6841      VAR_CPU_ENDIAN=little
6842      ;;
6843    powerpc)
6844      VAR_CPU=ppc
6845      VAR_CPU_ARCH=ppc
6846      VAR_CPU_BITS=32
6847      VAR_CPU_ENDIAN=big
6848       ;;
6849    powerpc64)
6850      VAR_CPU=ppc64
6851      VAR_CPU_ARCH=ppc
6852      VAR_CPU_BITS=64
6853      VAR_CPU_ENDIAN=big
6854       ;;
6855    sparc)
6856      VAR_CPU=sparc
6857      VAR_CPU_ARCH=sparc
6858      VAR_CPU_BITS=32
6859      VAR_CPU_ENDIAN=big
6860       ;;
6861    sparcv9)
6862      VAR_CPU=sparcv9
6863      VAR_CPU_ARCH=sparc
6864      VAR_CPU_BITS=64
6865      VAR_CPU_ENDIAN=big
6866       ;;
6867    *)
6868      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6869      ;;
6870  esac
6871
6872    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6873    OPENJDK_TARGET_OS="$VAR_OS"
6874    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6875    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6876    OPENJDK_TARGET_CPU="$VAR_CPU"
6877    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6878    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6879    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6880
6881
6882
6883
6884
6885
6886
6887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6888$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6890$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6891
6892
6893
6894# Check whether --with-target-bits was given.
6895if test "${with_target_bits+set}" = set; then :
6896  withval=$with_target_bits;
6897fi
6898
6899
6900  # We have three types of compiles:
6901  # native  == normal compilation, target system == build system
6902  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6903  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6904  #
6905  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6906    # We're doing a proper cross-compilation
6907    COMPILE_TYPE="cross"
6908  else
6909    COMPILE_TYPE="native"
6910  fi
6911
6912  if test "x$with_target_bits" != x; then
6913    if test "x$COMPILE_TYPE" = "xcross"; then
6914      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6915    fi
6916
6917    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6918      # A reduced build is requested
6919      COMPILE_TYPE="reduced"
6920      OPENJDK_TARGET_CPU_BITS=32
6921      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6922        OPENJDK_TARGET_CPU=x86
6923      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6924        OPENJDK_TARGET_CPU=sparc
6925      else
6926        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6927      fi
6928    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6929      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
6930    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6931      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6932$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6933    else
6934      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6935    fi
6936  fi
6937
6938
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6940$as_echo_n "checking compilation type... " >&6; }
6941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6942$as_echo "$COMPILE_TYPE" >&6; }
6943
6944
6945    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6946       REQUIRED_OS_NAME=SunOS
6947       REQUIRED_OS_VERSION=5.10
6948    fi
6949    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6950       REQUIRED_OS_NAME=Linux
6951       REQUIRED_OS_VERSION=2.6
6952    fi
6953    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6954        REQUIRED_OS_NAME=Windows
6955        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6956            REQUIRED_OS_VERSION=5.2
6957        else
6958            REQUIRED_OS_VERSION=5.1
6959        fi
6960    fi
6961    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6962        REQUIRED_OS_NAME=Darwin
6963        REQUIRED_OS_VERSION=11.2
6964    fi
6965
6966
6967
6968
6969
6970    # Also store the legacy naming of the cpu.
6971    # Ie i586 and amd64 instead of x86 and x86_64
6972    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6973    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6974      OPENJDK_TARGET_CPU_LEGACY="i586"
6975    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6976      # On all platforms except MacOSX replace x86_64 with amd64.
6977      OPENJDK_TARGET_CPU_LEGACY="amd64"
6978    fi
6979
6980
6981    # And the second legacy naming of the cpu.
6982    # Ie i386 and amd64 instead of x86 and x86_64.
6983    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6984    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6985      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6986    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6987      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6988    fi
6989
6990
6991    # This is the name of the cpu (but using i386 and amd64 instead of
6992    # x86 and x86_64, respectively), preceeded by a /, to be used when
6993    # locating libraries. On macosx, it's empty, though.
6994    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6995    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6996        OPENJDK_TARGET_CPU_LIBDIR=""
6997    fi
6998
6999
7000    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7001    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7002    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7003    OPENJDK_TARGET_CPU_ISADIR=""
7004    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7005      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7006          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7007      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7008          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7009      fi
7010    fi
7011
7012
7013    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7014    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7015    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7016      # On linux only, we replace x86 with i386.
7017      OPENJDK_TARGET_CPU_OSARCH="i386"
7018    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7019      # On all platforms except macosx, we replace x86_64 with amd64.
7020      OPENJDK_TARGET_CPU_OSARCH="amd64"
7021    fi
7022
7023
7024    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7025    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7026      OPENJDK_TARGET_CPU_JLI="i386"
7027    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7028      # On all platforms except macosx, we replace x86_64 with amd64.
7029      OPENJDK_TARGET_CPU_JLI="amd64"
7030    fi
7031    # Now setup the -D flags for building libjli.
7032    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7033    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7034      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7035        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7036      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7037        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7038      fi
7039    fi
7040
7041
7042    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7043    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7044        OPENJDK_TARGET_OS_API_DIR="solaris"
7045    fi
7046    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7047        OPENJDK_TARGET_OS_API_DIR="windows"
7048    fi
7049
7050
7051    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7052        A_LP64="LP64:="
7053        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7054        # unpack200.exe
7055        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7056            ADD_LP64="-D_LP64=1"
7057        fi
7058    fi
7059    LP64=$A_LP64
7060
7061
7062    if test "x$COMPILE_TYPE" = "xcross"; then
7063      # FIXME: ... or should this include reduced builds..?
7064      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7065    else
7066      DEFINE_CROSS_COMPILE_ARCH=""
7067    fi
7068
7069
7070
7071
7072# Continue setting up basic stuff. Most remaining code require fundamental tools.
7073
7074# Locate the directory of this script.
7075SCRIPT="$0"
7076
7077    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7078        # Follow a chain of symbolic links. Use readlink
7079        # where it exists, else fall back to horribly
7080        # complicated shell code.
7081        if test "x$READLINK_TESTED" != yes; then
7082            # On MacOSX there is a readlink tool with a different
7083            # purpose than the GNU readlink tool. Check the found readlink.
7084            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7085            if test "x$ISGNU" = x; then
7086                 # A readlink that we do not know how to use.
7087                 # Are there other non-GNU readlinks out there?
7088                 READLINK_TESTED=yes
7089                 READLINK=
7090            fi
7091        fi
7092
7093        if test "x$READLINK" != x; then
7094            SCRIPT=`$READLINK -f $SCRIPT`
7095        else
7096            # Save the current directory for restoring afterwards
7097            STARTDIR=$PWD
7098            COUNTER=0
7099            sym_link_dir=`$DIRNAME $SCRIPT`
7100            sym_link_file=`$BASENAME $SCRIPT`
7101            # Use the system pwd and not the shell builtin to resolve directory symlinks
7102            cd $sym_link_dir
7103            cd `$THEPWDCMD`
7104            sym_link_dir=`$THEPWDCMD`
7105            # Resolve file symlinks
7106            while test $COUNTER -lt 20; do
7107                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7108                if test "x$ISLINK" == x; then
7109                    # This is not a symbolic link! We are done!
7110                    break
7111                fi
7112                # Again resolve directory symlinks since the target of the just found
7113                # link could be in a different directory
7114                cd `$DIRNAME $ISLINK`
7115                sym_link_dir=`$THEPWDCMD`
7116                sym_link_file=`$BASENAME $ISLINK`
7117                let COUNTER=COUNTER+1
7118            done
7119            cd $STARTDIR
7120            SCRIPT=$sym_link_dir/$sym_link_file
7121        fi
7122    fi
7123
7124AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7125
7126# Where is the source? It is located two levels above the configure script.
7127CURDIR="$PWD"
7128cd "$AUTOCONF_DIR/../.."
7129SRC_ROOT="`$THEPWDCMD`"
7130
7131if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7132  PATH_SEP=";"
7133
7134  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7135  if test $SRC_ROOT_LENGTH -gt 100; then
7136      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7137  fi
7138
7139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7141$as_echo_n "checking cygwin release... " >&6; }
7142    CYGWIN_VERSION=`$UNAME -r`
7143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7144$as_echo "$CYGWIN_VERSION" >&6; }
7145    WINDOWS_ENV_VENDOR='cygwin'
7146    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7147
7148    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7149    if test "x$CYGWIN_VERSION_OK" = x; then
7150      { $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
7151$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;}
7152      as_fn_error $? "Cannot continue" "$LINENO" 5
7153    fi
7154    if test "x$CYGPATH" = x; then
7155        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7156    fi
7157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7158$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7159    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7160    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7161    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7162    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7164$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7165    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7166    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7167    if test "x$test_cygdrive_prefix" = x; then
7168        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7169    fi
7170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7172$as_echo_n "checking msys release... " >&6; }
7173    MSYS_VERSION=`$UNAME -r`
7174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7175$as_echo "$MSYS_VERSION" >&6; }
7176
7177    WINDOWS_ENV_VENDOR='msys'
7178    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7179
7180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7181$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7182    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7183    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7184
7185  windows_path="$MSYS_ROOT_PATH"
7186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7187    unix_path=`$CYGPATH -u "$windows_path"`
7188    MSYS_ROOT_PATH="$unix_path"
7189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7191    MSYS_ROOT_PATH="$unix_path"
7192  fi
7193
7194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7195$as_echo "$MSYS_ROOT_PATH" >&6; }
7196    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7197  else
7198    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7199  fi
7200
7201  # Test if windows or unix (cygwin/msys) find is first in path.
7202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7203$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7204  FIND_BINARY_OUTPUT=`find --version 2>&1`
7205  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7207$as_echo "unix style" >&6; }
7208  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7210$as_echo "Windows" >&6; }
7211    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7212$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7213    { $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
7214$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7215    as_fn_error $? "Cannot continue" "$LINENO" 5
7216  else
7217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7218$as_echo "unknown" >&6; }
7219    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7220$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7221  fi
7222
7223else
7224  PATH_SEP=":"
7225fi
7226
7227
7228
7229cd "$CURDIR"
7230
7231
7232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7233
7234  # Input might be given as Windows format, start by converting to
7235  # unix format.
7236  path="$SRC_ROOT"
7237  new_path=`$CYGPATH -u "$path"`
7238
7239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7242  # "foo.exe" is OK but "foo" is an error.
7243  #
7244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7245  # It is also a way to make sure we got the proper file name for the real test later on.
7246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7247  if test "x$test_shortpath" = x; then
7248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7249$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7250    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7251  fi
7252
7253  # Call helper function which possibly converts this using DOS-style short mode.
7254  # If so, the updated path is stored in $new_path.
7255
7256  input_path="$new_path"
7257  # Check if we need to convert this using DOS-style short mode. If the path
7258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7259  # take no chances and rewrite it.
7260  # Note: m4 eats our [], so we need to use [ and ] instead.
7261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7262  if test "x$has_forbidden_chars" != x; then
7263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7267      # Going to short mode and back again did indeed matter. Since short mode is
7268      # case insensitive, let's make it lowercase to improve readability.
7269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7270      # Now convert it back to Unix-stile (cygpath)
7271      input_path=`$CYGPATH -u "$shortmode_path"`
7272      new_path="$input_path"
7273    fi
7274  fi
7275
7276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7277  if test "x$test_cygdrive_prefix" = x; then
7278    # As a simple fix, exclude /usr/bin since it's not a real path.
7279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7281      # a path prefixed by /cygdrive for fixpath to work.
7282      new_path="$CYGWIN_ROOT_PATH$input_path"
7283    fi
7284  fi
7285
7286
7287  if test "x$path" != "x$new_path"; then
7288    SRC_ROOT="$new_path"
7289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7290$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7291  fi
7292
7293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7294
7295  path="$SRC_ROOT"
7296  has_colon=`$ECHO $path | $GREP ^.:`
7297  new_path="$path"
7298  if test "x$has_colon" = x; then
7299    # Not in mixed or Windows style, start by that.
7300    new_path=`cmd //c echo $path`
7301  fi
7302
7303
7304  input_path="$new_path"
7305  # Check if we need to convert this using DOS-style short mode. If the path
7306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7307  # take no chances and rewrite it.
7308  # Note: m4 eats our [], so we need to use [ and ] instead.
7309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7310  if test "x$has_forbidden_chars" != x; then
7311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7313  fi
7314
7315
7316  windows_path="$new_path"
7317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7318    unix_path=`$CYGPATH -u "$windows_path"`
7319    new_path="$unix_path"
7320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7322    new_path="$unix_path"
7323  fi
7324
7325  if test "x$path" != "x$new_path"; then
7326    SRC_ROOT="$new_path"
7327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7328$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7329  fi
7330
7331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7333
7334  else
7335    # We're on a posix platform. Hooray! :)
7336    path="$SRC_ROOT"
7337
7338    if test ! -f "$path" && test ! -d "$path"; then
7339      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7340    fi
7341
7342    has_space=`$ECHO "$path" | $GREP " "`
7343    if test "x$has_space" != x; then
7344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7345$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7346      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7347    fi
7348  fi
7349
7350
7351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7352
7353  # Input might be given as Windows format, start by converting to
7354  # unix format.
7355  path="$CURDIR"
7356  new_path=`$CYGPATH -u "$path"`
7357
7358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7361  # "foo.exe" is OK but "foo" is an error.
7362  #
7363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7364  # It is also a way to make sure we got the proper file name for the real test later on.
7365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7366  if test "x$test_shortpath" = x; then
7367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7368$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7369    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7370  fi
7371
7372  # Call helper function which possibly converts this using DOS-style short mode.
7373  # If so, the updated path is stored in $new_path.
7374
7375  input_path="$new_path"
7376  # Check if we need to convert this using DOS-style short mode. If the path
7377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7378  # take no chances and rewrite it.
7379  # Note: m4 eats our [], so we need to use [ and ] instead.
7380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7381  if test "x$has_forbidden_chars" != x; then
7382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7386      # Going to short mode and back again did indeed matter. Since short mode is
7387      # case insensitive, let's make it lowercase to improve readability.
7388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7389      # Now convert it back to Unix-stile (cygpath)
7390      input_path=`$CYGPATH -u "$shortmode_path"`
7391      new_path="$input_path"
7392    fi
7393  fi
7394
7395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7396  if test "x$test_cygdrive_prefix" = x; then
7397    # As a simple fix, exclude /usr/bin since it's not a real path.
7398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7400      # a path prefixed by /cygdrive for fixpath to work.
7401      new_path="$CYGWIN_ROOT_PATH$input_path"
7402    fi
7403  fi
7404
7405
7406  if test "x$path" != "x$new_path"; then
7407    CURDIR="$new_path"
7408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7409$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7410  fi
7411
7412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7413
7414  path="$CURDIR"
7415  has_colon=`$ECHO $path | $GREP ^.:`
7416  new_path="$path"
7417  if test "x$has_colon" = x; then
7418    # Not in mixed or Windows style, start by that.
7419    new_path=`cmd //c echo $path`
7420  fi
7421
7422
7423  input_path="$new_path"
7424  # Check if we need to convert this using DOS-style short mode. If the path
7425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7426  # take no chances and rewrite it.
7427  # Note: m4 eats our [], so we need to use [ and ] instead.
7428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7429  if test "x$has_forbidden_chars" != x; then
7430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7432  fi
7433
7434
7435  windows_path="$new_path"
7436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7437    unix_path=`$CYGPATH -u "$windows_path"`
7438    new_path="$unix_path"
7439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7441    new_path="$unix_path"
7442  fi
7443
7444  if test "x$path" != "x$new_path"; then
7445    CURDIR="$new_path"
7446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7447$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7448  fi
7449
7450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7452
7453  else
7454    # We're on a posix platform. Hooray! :)
7455    path="$CURDIR"
7456
7457    if test ! -f "$path" && test ! -d "$path"; then
7458      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7459    fi
7460
7461    has_space=`$ECHO "$path" | $GREP " "`
7462    if test "x$has_space" != x; then
7463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7464$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7465      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7466    fi
7467  fi
7468
7469
7470if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7471    # Add extra search paths on solaris for utilities like ar and as etc...
7472    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7473fi
7474
7475# You can force the sys-root if the sys-root encoded into the cross compiler tools
7476# is not correct.
7477
7478# Check whether --with-sys-root was given.
7479if test "${with_sys_root+set}" = set; then :
7480  withval=$with_sys_root;
7481fi
7482
7483
7484if test "x$with_sys_root" != x; then
7485  SYS_ROOT=$with_sys_root
7486else
7487  SYS_ROOT=/
7488fi
7489
7490
7491
7492# Check whether --with-tools-dir was given.
7493if test "${with_tools_dir+set}" = set; then :
7494  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7495fi
7496
7497
7498
7499# Check whether --with-devkit was given.
7500if test "${with_devkit+set}" = set; then :
7501  withval=$with_devkit;
7502    if test "x$with_sys_root" != x; then
7503      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7504    fi
7505    if test "x$with_tools_dir" != x; then
7506      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7507    fi
7508    TOOLS_DIR=$with_devkit/bin
7509    SYS_ROOT=$with_devkit/$host_alias/libc
7510
7511fi
7512
7513
7514
7515
7516# Setup default logging of stdout and stderr to build.log in the output root.
7517BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7518BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7519BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7520
7521
7522
7523
7524
7525# Check if it's a pure open build or if custom sources are to be used.
7526
7527  # Check whether --enable-openjdk-only was given.
7528if test "${enable_openjdk_only+set}" = set; then :
7529  enableval=$enable_openjdk_only;
7530else
7531  enable_openjdk_only="no"
7532fi
7533
7534
7535  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7536$as_echo_n "checking for presence of closed sources... " >&6; }
7537  if test -d "$SRC_ROOT/jdk/src/closed"; then
7538    CLOSED_SOURCE_PRESENT=yes
7539  else
7540    CLOSED_SOURCE_PRESENT=no
7541  fi
7542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7543$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7544
7545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7546$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7547  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7549$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7550
7551  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7552    OPENJDK=true
7553    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7554      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7555$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7556    fi
7557  else
7558    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7559      OPENJDK=true
7560    else
7561      OPENJDK=false
7562    fi
7563  fi
7564
7565  if test "x$OPENJDK" = "xtrue"; then
7566    SET_OPENJDK="OPENJDK=true"
7567  fi
7568
7569
7570
7571
7572# These are needed to be able to create a configuration name (and thus the output directory)
7573
7574###############################################################################
7575#
7576# Check which variant of the JDK that we want to build.
7577# Currently we have:
7578#    normal:   standard edition
7579# but the custom make system may add other variants
7580#
7581# Effectively the JDK variant gives a name to a specific set of
7582# modules to compile into the JDK. In the future, these modules
7583# might even be Jigsaw modules.
7584#
7585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7586$as_echo_n "checking which variant of the JDK to build... " >&6; }
7587
7588# Check whether --with-jdk-variant was given.
7589if test "${with_jdk_variant+set}" = set; then :
7590  withval=$with_jdk_variant;
7591fi
7592
7593
7594if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7595    JDK_VARIANT="normal"
7596else
7597    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7598fi
7599
7600
7601
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7603$as_echo "$JDK_VARIANT" >&6; }
7604
7605
7606
7607###############################################################################
7608#
7609# Check which variants of the JVM that we want to build.
7610# Currently we have:
7611#    server: normal interpreter and a tiered C1/C2 compiler
7612#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7613#    minimal1: reduced form of client with optional VM services and features stripped out
7614#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7615#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7616#    zero: no machine code interpreter, no compiler
7617#    zeroshark: zero interpreter and shark/llvm compiler backend
7618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7619$as_echo_n "checking which variants of the JVM to build... " >&6; }
7620
7621# Check whether --with-jvm-variants was given.
7622if test "${with_jvm_variants+set}" = set; then :
7623  withval=$with_jvm_variants;
7624fi
7625
7626
7627if test "x$with_jvm_variants" = x; then
7628     with_jvm_variants="server"
7629fi
7630
7631JVM_VARIANTS=",$with_jvm_variants,"
7632TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7633
7634if test "x$TEST_VARIANTS" != "x,"; then
7635   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7636fi
7637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7638$as_echo "$with_jvm_variants" >&6; }
7639
7640JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7641JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7642JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7643JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7644JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7645JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7646
7647if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7648    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7649        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7650    fi
7651fi
7652if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7653    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7654        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7655    fi
7656fi
7657if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7658    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7659        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7660    fi
7661fi
7662
7663# Replace the commas with AND for use in the build directory name.
7664ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7665COUNT_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/'`
7666if test "x$COUNT_VARIANTS" != "x,1"; then
7667    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7668else
7669    BUILDING_MULTIPLE_JVM_VARIANTS=no
7670fi
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7681   MACOSX_UNIVERSAL="true"
7682fi
7683
7684
7685
7686
7687
7688###############################################################################
7689#
7690# Set the debug level
7691#    release: no debug information, all optimizations, no asserts.
7692#    fastdebug: debug information (-g), all optimizations, all asserts
7693#    slowdebug: debug information (-g), no optimizations, all asserts
7694#
7695DEBUG_LEVEL="release"
7696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7697$as_echo_n "checking which debug level to use... " >&6; }
7698# Check whether --enable-debug was given.
7699if test "${enable_debug+set}" = set; then :
7700  enableval=$enable_debug;
7701        ENABLE_DEBUG="${enableval}"
7702        DEBUG_LEVEL="fastdebug"
7703
7704else
7705  ENABLE_DEBUG="no"
7706fi
7707
7708
7709
7710# Check whether --with-debug-level was given.
7711if test "${with_debug_level+set}" = set; then :
7712  withval=$with_debug_level;
7713        DEBUG_LEVEL="${withval}"
7714        if test "x$ENABLE_DEBUG" = xyes; then
7715			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7716        fi
7717
7718fi
7719
7720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7721$as_echo "$DEBUG_LEVEL" >&6; }
7722
7723if test "x$DEBUG_LEVEL" != xrelease && \
7724   test "x$DEBUG_LEVEL" != xfastdebug && \
7725   test "x$DEBUG_LEVEL" != xslowdebug; then
7726   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7727fi
7728
7729
7730###############################################################################
7731#
7732# Setup legacy vars/targets and new vars to deal with different debug levels.
7733#
7734
7735case $DEBUG_LEVEL in
7736      release )
7737          VARIANT="OPT"
7738          FASTDEBUG="false"
7739          DEBUG_CLASSFILES="false"
7740          BUILD_VARIANT_RELEASE=""
7741          HOTSPOT_DEBUG_LEVEL="product"
7742          HOTSPOT_EXPORT="product"
7743           ;;
7744      fastdebug )
7745          VARIANT="DBG"
7746          FASTDEBUG="true"
7747          DEBUG_CLASSFILES="true"
7748          BUILD_VARIANT_RELEASE="-fastdebug"
7749          HOTSPOT_DEBUG_LEVEL="fastdebug"
7750          HOTSPOT_EXPORT="fastdebug"
7751           ;;
7752      slowdebug )
7753          VARIANT="DBG"
7754          FASTDEBUG="false"
7755          DEBUG_CLASSFILES="true"
7756          BUILD_VARIANT_RELEASE="-debug"
7757          HOTSPOT_DEBUG_LEVEL="jvmg"
7758          HOTSPOT_EXPORT="debug"
7759           ;;
7760esac
7761
7762#####
7763# Generate the legacy makefile targets for hotspot.
7764# The hotspot api for selecting the build artifacts, really, needs to be improved.
7765# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7766# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7767# But until then ...
7768HOTSPOT_TARGET=""
7769
7770if test "x$JVM_VARIANT_SERVER" = xtrue; then
7771    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7772fi
7773
7774if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7775    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7776fi
7777
7778if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7779    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7780fi
7781
7782if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7783    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7784fi
7785
7786if test "x$JVM_VARIANT_ZERO" = xtrue; then
7787    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7788fi
7789
7790if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7791    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7792fi
7793
7794HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7795
7796# On Macosx universal binaries are produced, but they only contain
7797# 64 bit intel. This invalidates control of which jvms are built
7798# from configure, but only server is valid anyway. Fix this
7799# when hotspot makefiles are rewritten.
7800if test "x$MACOSX_UNIVERSAL" = xtrue; then
7801    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7802fi
7803
7804#####
7805
7806
7807
7808
7809
7810
7811
7812
7813# With basic setup done, call the custom early hook.
7814
7815
7816# To properly create a configuration name, we need to have the OpenJDK target
7817# and options (variants and debug level) parsed.
7818
7819
7820
7821# Check whether --with-conf-name was given.
7822if test "${with_conf_name+set}" = set; then :
7823  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7824fi
7825
7826
7827# Test from where we are running configure, in or outside of src root.
7828# To enable comparison of directories, CURDIR needs to be symlink free
7829# just like SRC_ROOT already is
7830NOSYM_CURDIR="$CURDIR"
7831
7832    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7833        # Follow a chain of symbolic links. Use readlink
7834        # where it exists, else fall back to horribly
7835        # complicated shell code.
7836        if test "x$READLINK_TESTED" != yes; then
7837            # On MacOSX there is a readlink tool with a different
7838            # purpose than the GNU readlink tool. Check the found readlink.
7839            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7840            if test "x$ISGNU" = x; then
7841                 # A readlink that we do not know how to use.
7842                 # Are there other non-GNU readlinks out there?
7843                 READLINK_TESTED=yes
7844                 READLINK=
7845            fi
7846        fi
7847
7848        if test "x$READLINK" != x; then
7849            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7850        else
7851            # Save the current directory for restoring afterwards
7852            STARTDIR=$PWD
7853            COUNTER=0
7854            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7855            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7856            # Use the system pwd and not the shell builtin to resolve directory symlinks
7857            cd $sym_link_dir
7858            cd `$THEPWDCMD`
7859            sym_link_dir=`$THEPWDCMD`
7860            # Resolve file symlinks
7861            while test $COUNTER -lt 20; do
7862                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7863                if test "x$ISLINK" == x; then
7864                    # This is not a symbolic link! We are done!
7865                    break
7866                fi
7867                # Again resolve directory symlinks since the target of the just found
7868                # link could be in a different directory
7869                cd `$DIRNAME $ISLINK`
7870                sym_link_dir=`$THEPWDCMD`
7871                sym_link_file=`$BASENAME $ISLINK`
7872                let COUNTER=COUNTER+1
7873            done
7874            cd $STARTDIR
7875            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7876        fi
7877    fi
7878
7879if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7880        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7881        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7882    # We are running configure from the src root.
7883    # Create a default ./build/target-variant-debuglevel output root.
7884    if test "x${CONF_NAME}" = x; then
7885        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7886    fi
7887    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7888    $MKDIR -p "$OUTPUT_ROOT"
7889    if test ! -d "$OUTPUT_ROOT"; then
7890        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7891    fi
7892else
7893    # We are running configure from outside of the src dir.
7894    # Then use the current directory as output dir!
7895    # If configuration is situated in normal build directory, just use the build
7896    # directory name as configuration name, otherwise use the complete path.
7897    if test "x${CONF_NAME}" = x; then
7898        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7899    fi
7900    OUTPUT_ROOT="$CURDIR"
7901
7902    # WARNING: This might be a bad thing to do. You need to be sure you want to
7903    # have a configuration in this directory. Do some sanity checks!
7904
7905    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7906      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7907      # other files
7908      files_present=`$LS $OUTPUT_ROOT`
7909      # Configure has already touched config.log and confdefs.h in the current dir when this check
7910      # is performed.
7911      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7912                                             | $TR -d '\n'`
7913      if test "x$filtered_files" != x; then
7914        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7915$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7917$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7918        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7919$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7920        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7921$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7922        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7923$as_echo "$as_me: seriously mess up just about everything." >&6;}
7924        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7925$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7926        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7927$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7928        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7929      fi
7930    fi
7931fi
7932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7933$as_echo_n "checking what configuration name to use... " >&6; }
7934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7935$as_echo "$CONF_NAME" >&6; }
7936
7937
7938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7939
7940  # Input might be given as Windows format, start by converting to
7941  # unix format.
7942  path="$OUTPUT_ROOT"
7943  new_path=`$CYGPATH -u "$path"`
7944
7945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7948  # "foo.exe" is OK but "foo" is an error.
7949  #
7950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7951  # It is also a way to make sure we got the proper file name for the real test later on.
7952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7953  if test "x$test_shortpath" = x; then
7954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7955$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7956    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7957  fi
7958
7959  # Call helper function which possibly converts this using DOS-style short mode.
7960  # If so, the updated path is stored in $new_path.
7961
7962  input_path="$new_path"
7963  # Check if we need to convert this using DOS-style short mode. If the path
7964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7965  # take no chances and rewrite it.
7966  # Note: m4 eats our [], so we need to use [ and ] instead.
7967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7968  if test "x$has_forbidden_chars" != x; then
7969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7973      # Going to short mode and back again did indeed matter. Since short mode is
7974      # case insensitive, let's make it lowercase to improve readability.
7975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7976      # Now convert it back to Unix-stile (cygpath)
7977      input_path=`$CYGPATH -u "$shortmode_path"`
7978      new_path="$input_path"
7979    fi
7980  fi
7981
7982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7983  if test "x$test_cygdrive_prefix" = x; then
7984    # As a simple fix, exclude /usr/bin since it's not a real path.
7985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7987      # a path prefixed by /cygdrive for fixpath to work.
7988      new_path="$CYGWIN_ROOT_PATH$input_path"
7989    fi
7990  fi
7991
7992
7993  if test "x$path" != "x$new_path"; then
7994    OUTPUT_ROOT="$new_path"
7995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7996$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7997  fi
7998
7999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8000
8001  path="$OUTPUT_ROOT"
8002  has_colon=`$ECHO $path | $GREP ^.:`
8003  new_path="$path"
8004  if test "x$has_colon" = x; then
8005    # Not in mixed or Windows style, start by that.
8006    new_path=`cmd //c echo $path`
8007  fi
8008
8009
8010  input_path="$new_path"
8011  # Check if we need to convert this using DOS-style short mode. If the path
8012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8013  # take no chances and rewrite it.
8014  # Note: m4 eats our [], so we need to use [ and ] instead.
8015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8016  if test "x$has_forbidden_chars" != x; then
8017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8019  fi
8020
8021
8022  windows_path="$new_path"
8023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8024    unix_path=`$CYGPATH -u "$windows_path"`
8025    new_path="$unix_path"
8026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8028    new_path="$unix_path"
8029  fi
8030
8031  if test "x$path" != "x$new_path"; then
8032    OUTPUT_ROOT="$new_path"
8033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8034$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8035  fi
8036
8037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8039
8040  else
8041    # We're on a posix platform. Hooray! :)
8042    path="$OUTPUT_ROOT"
8043
8044    if test ! -f "$path" && test ! -d "$path"; then
8045      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8046    fi
8047
8048    has_space=`$ECHO "$path" | $GREP " "`
8049    if test "x$has_space" != x; then
8050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8051$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8052      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8053    fi
8054  fi
8055
8056
8057SPEC=$OUTPUT_ROOT/spec.gmk
8058
8059CONF_NAME=$CONF_NAME
8060
8061OUTPUT_ROOT=$OUTPUT_ROOT
8062
8063
8064# Most of the probed defines are put into config.h
8065ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8066
8067# The spec.gmk file contains all variables for the make system.
8068ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8069
8070# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8071ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8072
8073# The bootcycle-spec.gmk file contains support for boot cycle builds.
8074ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8075
8076# The compare.sh is used to compare the build output to other builds.
8077ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8078
8079# Spec.sh is currently used by compare-objects.sh
8080ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8081
8082# The generated Makefile knows where the spec.gmk is and where the source is.
8083# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8084# which will look for generated configurations
8085ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8086
8087
8088# Save the arguments given to us
8089echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8090
8091
8092# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8093
8094    for ac_prog in apt-get yum port pkgutil pkgadd
8095do
8096  # Extract the first word of "$ac_prog", so it can be a program name with args.
8097set dummy $ac_prog; ac_word=$2
8098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8099$as_echo_n "checking for $ac_word... " >&6; }
8100if ${ac_cv_prog_PKGHANDLER+:} false; then :
8101  $as_echo_n "(cached) " >&6
8102else
8103  if test -n "$PKGHANDLER"; then
8104  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8105else
8106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8107for as_dir in $PATH
8108do
8109  IFS=$as_save_IFS
8110  test -z "$as_dir" && as_dir=.
8111    for ac_exec_ext in '' $ac_executable_extensions; do
8112  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8113    ac_cv_prog_PKGHANDLER="$ac_prog"
8114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8115    break 2
8116  fi
8117done
8118  done
8119IFS=$as_save_IFS
8120
8121fi
8122fi
8123PKGHANDLER=$ac_cv_prog_PKGHANDLER
8124if test -n "$PKGHANDLER"; then
8125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8126$as_echo "$PKGHANDLER" >&6; }
8127else
8128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8129$as_echo "no" >&6; }
8130fi
8131
8132
8133  test -n "$PKGHANDLER" && break
8134done
8135
8136
8137
8138# Setup tools that requires more complex handling, or that is not needed by the configure script.
8139
8140
8141  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8142  if test "x$MAKE" != x; then
8143    # User has supplied a make, test it.
8144    if test ! -f "$MAKE"; then
8145      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8146    fi
8147
8148  MAKE_CANDIDATE=""$MAKE""
8149  DESCRIPTION="user supplied MAKE=$MAKE"
8150  if test "x$MAKE_CANDIDATE" != x; then
8151    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8152$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8153    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8154    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8155    if test "x$IS_GNU_MAKE" = x; then
8156      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8157$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8158    else
8159      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8160      if test "x$IS_MODERN_MAKE" = x; then
8161        { $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
8162$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;}
8163      else
8164        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8165          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8166            MAKE_EXPECTED_ENV='cygwin'
8167          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8168            MAKE_EXPECTED_ENV='msys'
8169          else
8170            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8171          fi
8172          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8173          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8174        else
8175          # Not relevant for non-Windows
8176          IS_MAKE_CORRECT_ENV=true
8177        fi
8178        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8179          { $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
8180$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;}
8181        else
8182          FOUND_MAKE=$MAKE_CANDIDATE
8183
8184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8185
8186  # First separate the path from the arguments. This will split at the first
8187  # space.
8188  complete="$FOUND_MAKE"
8189  path="${complete%% *}"
8190  tmp="$complete EOL"
8191  arguments="${tmp#* }"
8192
8193  # Input might be given as Windows format, start by converting to
8194  # unix format.
8195  new_path=`$CYGPATH -u "$path"`
8196
8197  # Now try to locate executable using which
8198  new_path=`$WHICH "$new_path" 2> /dev/null`
8199  # bat and cmd files are not always considered executable in cygwin causing which
8200  # to not find them
8201  if test "x$new_path" = x \
8202           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8203           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8204    new_path=`$CYGPATH -u "$path"`
8205  fi
8206  if test "x$new_path" = x; then
8207    # Oops. Which didn't find the executable.
8208    # The splitting of arguments from the executable at a space might have been incorrect,
8209    # since paths with space are more likely in Windows. Give it another try with the whole
8210    # argument.
8211    path="$complete"
8212    arguments="EOL"
8213    new_path=`$CYGPATH -u "$path"`
8214    new_path=`$WHICH "$new_path" 2> /dev/null`
8215    # bat and cmd files are not always considered executable in cygwin causing which
8216    # to not find them
8217    if test "x$new_path" = x \
8218             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8219             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8220      new_path=`$CYGPATH -u "$path"`
8221    fi
8222    if test "x$new_path" = x; then
8223      # It's still not found. Now this is an unrecoverable error.
8224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8225$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8226      has_space=`$ECHO "$complete" | $GREP " "`
8227      if test "x$has_space" != x; then
8228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8230      fi
8231      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8232    fi
8233  fi
8234
8235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8238  # "foo.exe" is OK but "foo" is an error.
8239  #
8240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8241  # It is also a way to make sure we got the proper file name for the real test later on.
8242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8243  if test "x$test_shortpath" = x; then
8244    # Short path failed, file does not exist as specified.
8245    # Try adding .exe or .cmd
8246    if test -f "${new_path}.exe"; then
8247       input_to_shortpath="${new_path}.exe"
8248    elif test -f "${new_path}.cmd"; then
8249       input_to_shortpath="${new_path}.cmd"
8250    else
8251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8252$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8253      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8254$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8255      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8256    fi
8257  else
8258    input_to_shortpath="$new_path"
8259  fi
8260
8261  # Call helper function which possibly converts this using DOS-style short mode.
8262  # If so, the updated path is stored in $new_path.
8263  new_path="$input_to_shortpath"
8264
8265  input_path="$input_to_shortpath"
8266  # Check if we need to convert this using DOS-style short mode. If the path
8267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8268  # take no chances and rewrite it.
8269  # Note: m4 eats our [], so we need to use [ and ] instead.
8270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8271  if test "x$has_forbidden_chars" != x; then
8272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8276      # Going to short mode and back again did indeed matter. Since short mode is
8277      # case insensitive, let's make it lowercase to improve readability.
8278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8279      # Now convert it back to Unix-stile (cygpath)
8280      input_path=`$CYGPATH -u "$shortmode_path"`
8281      new_path="$input_path"
8282    fi
8283  fi
8284
8285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8286  if test "x$test_cygdrive_prefix" = x; then
8287    # As a simple fix, exclude /usr/bin since it's not a real path.
8288    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8290      # a path prefixed by /cygdrive for fixpath to work.
8291      new_path="$CYGWIN_ROOT_PATH$input_path"
8292    fi
8293  fi
8294
8295  # remove trailing .exe if any
8296  new_path="${new_path/%.exe/}"
8297
8298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8299
8300  # First separate the path from the arguments. This will split at the first
8301  # space.
8302  complete="$FOUND_MAKE"
8303  path="${complete%% *}"
8304  tmp="$complete EOL"
8305  arguments="${tmp#* }"
8306
8307  # Input might be given as Windows format, start by converting to
8308  # unix format.
8309  new_path="$path"
8310
8311  windows_path="$new_path"
8312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8313    unix_path=`$CYGPATH -u "$windows_path"`
8314    new_path="$unix_path"
8315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8317    new_path="$unix_path"
8318  fi
8319
8320
8321  # Now try to locate executable using which
8322  new_path=`$WHICH "$new_path" 2> /dev/null`
8323
8324  if test "x$new_path" = x; then
8325    # Oops. Which didn't find the executable.
8326    # The splitting of arguments from the executable at a space might have been incorrect,
8327    # since paths with space are more likely in Windows. Give it another try with the whole
8328    # argument.
8329    path="$complete"
8330    arguments="EOL"
8331    new_path="$path"
8332
8333  windows_path="$new_path"
8334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8335    unix_path=`$CYGPATH -u "$windows_path"`
8336    new_path="$unix_path"
8337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8339    new_path="$unix_path"
8340  fi
8341
8342
8343    new_path=`$WHICH "$new_path" 2> /dev/null`
8344
8345    if test "x$new_path" = x; then
8346      # It's still not found. Now this is an unrecoverable error.
8347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8348$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8349      has_space=`$ECHO "$complete" | $GREP " "`
8350      if test "x$has_space" != x; then
8351        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8352$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8353      fi
8354      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8355    fi
8356  fi
8357
8358  # Now new_path has a complete unix path to the binary
8359  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8360    # Keep paths in /bin as-is, but remove trailing .exe if any
8361    new_path="${new_path/%.exe/}"
8362    # Do not save /bin paths to all_fixpath_prefixes!
8363  else
8364    # Not in mixed or Windows style, start by that.
8365    new_path=`cmd //c echo $new_path`
8366
8367  input_path="$new_path"
8368  # Check if we need to convert this using DOS-style short mode. If the path
8369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8370  # take no chances and rewrite it.
8371  # Note: m4 eats our [], so we need to use [ and ] instead.
8372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8373  if test "x$has_forbidden_chars" != x; then
8374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8376  fi
8377
8378    # Output is in $new_path
8379
8380  windows_path="$new_path"
8381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8382    unix_path=`$CYGPATH -u "$windows_path"`
8383    new_path="$unix_path"
8384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8386    new_path="$unix_path"
8387  fi
8388
8389    # remove trailing .exe if any
8390    new_path="${new_path/%.exe/}"
8391
8392    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8393    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8394  fi
8395
8396  else
8397    # We're on a posix platform. Hooray! :)
8398    # First separate the path from the arguments. This will split at the first
8399    # space.
8400    complete="$FOUND_MAKE"
8401    path="${complete%% *}"
8402    tmp="$complete EOL"
8403    arguments="${tmp#* }"
8404
8405    # Cannot rely on the command "which" here since it doesn't always work.
8406    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8407    if test -z "$is_absolute_path"; then
8408      # Path to executable is not absolute. Find it.
8409      IFS_save="$IFS"
8410      IFS=:
8411      for p in $PATH; do
8412        if test -f "$p/$path" && test -x "$p/$path"; then
8413          new_path="$p/$path"
8414          break
8415        fi
8416      done
8417      IFS="$IFS_save"
8418    else
8419      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8420$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8421      new_path="$path"
8422    fi
8423
8424    if test "x$new_path" = x; then
8425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8426$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8427        has_space=`$ECHO "$complete" | $GREP " "`
8428        if test "x$has_space" != x; then
8429          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8430$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8431        fi
8432        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8433      fi
8434  fi
8435
8436      # Now join together the path and the arguments once again
8437      if test "x$arguments" != xEOL; then
8438        new_complete="$new_path ${arguments% *}"
8439      else
8440        new_complete="$new_path"
8441      fi
8442
8443  if test "x$complete" != "x$new_complete"; then
8444      FOUND_MAKE="$new_complete"
8445      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8446$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8447    fi
8448
8449        fi
8450      fi
8451    fi
8452  fi
8453
8454    if test "x$FOUND_MAKE" = x; then
8455      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8456    fi
8457  else
8458    # Try our hardest to locate a correct version of GNU make
8459    for ac_prog in gmake
8460do
8461  # Extract the first word of "$ac_prog", so it can be a program name with args.
8462set dummy $ac_prog; ac_word=$2
8463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8464$as_echo_n "checking for $ac_word... " >&6; }
8465if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8466  $as_echo_n "(cached) " >&6
8467else
8468  case $CHECK_GMAKE in
8469  [\\/]* | ?:[\\/]*)
8470  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8471  ;;
8472  *)
8473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8474for as_dir in $PATH
8475do
8476  IFS=$as_save_IFS
8477  test -z "$as_dir" && as_dir=.
8478    for ac_exec_ext in '' $ac_executable_extensions; do
8479  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8480    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8482    break 2
8483  fi
8484done
8485  done
8486IFS=$as_save_IFS
8487
8488  ;;
8489esac
8490fi
8491CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8492if test -n "$CHECK_GMAKE"; then
8493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8494$as_echo "$CHECK_GMAKE" >&6; }
8495else
8496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8497$as_echo "no" >&6; }
8498fi
8499
8500
8501  test -n "$CHECK_GMAKE" && break
8502done
8503
8504
8505  MAKE_CANDIDATE=""$CHECK_GMAKE""
8506  DESCRIPTION="gmake in PATH"
8507  if test "x$MAKE_CANDIDATE" != x; then
8508    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8509$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8510    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8511    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8512    if test "x$IS_GNU_MAKE" = x; then
8513      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8514$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8515    else
8516      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8517      if test "x$IS_MODERN_MAKE" = x; then
8518        { $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
8519$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;}
8520      else
8521        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8522          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8523            MAKE_EXPECTED_ENV='cygwin'
8524          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8525            MAKE_EXPECTED_ENV='msys'
8526          else
8527            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8528          fi
8529          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8530          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8531        else
8532          # Not relevant for non-Windows
8533          IS_MAKE_CORRECT_ENV=true
8534        fi
8535        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8536          { $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
8537$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;}
8538        else
8539          FOUND_MAKE=$MAKE_CANDIDATE
8540
8541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8542
8543  # First separate the path from the arguments. This will split at the first
8544  # space.
8545  complete="$FOUND_MAKE"
8546  path="${complete%% *}"
8547  tmp="$complete EOL"
8548  arguments="${tmp#* }"
8549
8550  # Input might be given as Windows format, start by converting to
8551  # unix format.
8552  new_path=`$CYGPATH -u "$path"`
8553
8554  # Now try to locate executable using which
8555  new_path=`$WHICH "$new_path" 2> /dev/null`
8556  # bat and cmd files are not always considered executable in cygwin causing which
8557  # to not find them
8558  if test "x$new_path" = x \
8559           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8560           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8561    new_path=`$CYGPATH -u "$path"`
8562  fi
8563  if test "x$new_path" = x; then
8564    # Oops. Which didn't find the executable.
8565    # The splitting of arguments from the executable at a space might have been incorrect,
8566    # since paths with space are more likely in Windows. Give it another try with the whole
8567    # argument.
8568    path="$complete"
8569    arguments="EOL"
8570    new_path=`$CYGPATH -u "$path"`
8571    new_path=`$WHICH "$new_path" 2> /dev/null`
8572    # bat and cmd files are not always considered executable in cygwin causing which
8573    # to not find them
8574    if test "x$new_path" = x \
8575             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8576             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8577      new_path=`$CYGPATH -u "$path"`
8578    fi
8579    if test "x$new_path" = x; then
8580      # It's still not found. Now this is an unrecoverable error.
8581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8582$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8583      has_space=`$ECHO "$complete" | $GREP " "`
8584      if test "x$has_space" != x; then
8585        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8586$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8587      fi
8588      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8589    fi
8590  fi
8591
8592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8595  # "foo.exe" is OK but "foo" is an error.
8596  #
8597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8598  # It is also a way to make sure we got the proper file name for the real test later on.
8599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8600  if test "x$test_shortpath" = x; then
8601    # Short path failed, file does not exist as specified.
8602    # Try adding .exe or .cmd
8603    if test -f "${new_path}.exe"; then
8604       input_to_shortpath="${new_path}.exe"
8605    elif test -f "${new_path}.cmd"; then
8606       input_to_shortpath="${new_path}.cmd"
8607    else
8608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8609$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8610      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8611$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8612      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8613    fi
8614  else
8615    input_to_shortpath="$new_path"
8616  fi
8617
8618  # Call helper function which possibly converts this using DOS-style short mode.
8619  # If so, the updated path is stored in $new_path.
8620  new_path="$input_to_shortpath"
8621
8622  input_path="$input_to_shortpath"
8623  # Check if we need to convert this using DOS-style short mode. If the path
8624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8625  # take no chances and rewrite it.
8626  # Note: m4 eats our [], so we need to use [ and ] instead.
8627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8628  if test "x$has_forbidden_chars" != x; then
8629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8633      # Going to short mode and back again did indeed matter. Since short mode is
8634      # case insensitive, let's make it lowercase to improve readability.
8635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8636      # Now convert it back to Unix-stile (cygpath)
8637      input_path=`$CYGPATH -u "$shortmode_path"`
8638      new_path="$input_path"
8639    fi
8640  fi
8641
8642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8643  if test "x$test_cygdrive_prefix" = x; then
8644    # As a simple fix, exclude /usr/bin since it's not a real path.
8645    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8647      # a path prefixed by /cygdrive for fixpath to work.
8648      new_path="$CYGWIN_ROOT_PATH$input_path"
8649    fi
8650  fi
8651
8652  # remove trailing .exe if any
8653  new_path="${new_path/%.exe/}"
8654
8655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8656
8657  # First separate the path from the arguments. This will split at the first
8658  # space.
8659  complete="$FOUND_MAKE"
8660  path="${complete%% *}"
8661  tmp="$complete EOL"
8662  arguments="${tmp#* }"
8663
8664  # Input might be given as Windows format, start by converting to
8665  # unix format.
8666  new_path="$path"
8667
8668  windows_path="$new_path"
8669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8670    unix_path=`$CYGPATH -u "$windows_path"`
8671    new_path="$unix_path"
8672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8674    new_path="$unix_path"
8675  fi
8676
8677
8678  # Now try to locate executable using which
8679  new_path=`$WHICH "$new_path" 2> /dev/null`
8680
8681  if test "x$new_path" = x; then
8682    # Oops. Which didn't find the executable.
8683    # The splitting of arguments from the executable at a space might have been incorrect,
8684    # since paths with space are more likely in Windows. Give it another try with the whole
8685    # argument.
8686    path="$complete"
8687    arguments="EOL"
8688    new_path="$path"
8689
8690  windows_path="$new_path"
8691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8692    unix_path=`$CYGPATH -u "$windows_path"`
8693    new_path="$unix_path"
8694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8696    new_path="$unix_path"
8697  fi
8698
8699
8700    new_path=`$WHICH "$new_path" 2> /dev/null`
8701
8702    if test "x$new_path" = x; then
8703      # It's still not found. Now this is an unrecoverable error.
8704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8705$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8706      has_space=`$ECHO "$complete" | $GREP " "`
8707      if test "x$has_space" != x; then
8708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8710      fi
8711      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8712    fi
8713  fi
8714
8715  # Now new_path has a complete unix path to the binary
8716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8717    # Keep paths in /bin as-is, but remove trailing .exe if any
8718    new_path="${new_path/%.exe/}"
8719    # Do not save /bin paths to all_fixpath_prefixes!
8720  else
8721    # Not in mixed or Windows style, start by that.
8722    new_path=`cmd //c echo $new_path`
8723
8724  input_path="$new_path"
8725  # Check if we need to convert this using DOS-style short mode. If the path
8726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8727  # take no chances and rewrite it.
8728  # Note: m4 eats our [], so we need to use [ and ] instead.
8729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8730  if test "x$has_forbidden_chars" != x; then
8731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8733  fi
8734
8735    # Output is in $new_path
8736
8737  windows_path="$new_path"
8738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8739    unix_path=`$CYGPATH -u "$windows_path"`
8740    new_path="$unix_path"
8741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8743    new_path="$unix_path"
8744  fi
8745
8746    # remove trailing .exe if any
8747    new_path="${new_path/%.exe/}"
8748
8749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8751  fi
8752
8753  else
8754    # We're on a posix platform. Hooray! :)
8755    # First separate the path from the arguments. This will split at the first
8756    # space.
8757    complete="$FOUND_MAKE"
8758    path="${complete%% *}"
8759    tmp="$complete EOL"
8760    arguments="${tmp#* }"
8761
8762    # Cannot rely on the command "which" here since it doesn't always work.
8763    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8764    if test -z "$is_absolute_path"; then
8765      # Path to executable is not absolute. Find it.
8766      IFS_save="$IFS"
8767      IFS=:
8768      for p in $PATH; do
8769        if test -f "$p/$path" && test -x "$p/$path"; then
8770          new_path="$p/$path"
8771          break
8772        fi
8773      done
8774      IFS="$IFS_save"
8775    else
8776      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8777$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8778      new_path="$path"
8779    fi
8780
8781    if test "x$new_path" = x; then
8782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8783$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8784        has_space=`$ECHO "$complete" | $GREP " "`
8785        if test "x$has_space" != x; then
8786          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8787$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8788        fi
8789        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8790      fi
8791  fi
8792
8793      # Now join together the path and the arguments once again
8794      if test "x$arguments" != xEOL; then
8795        new_complete="$new_path ${arguments% *}"
8796      else
8797        new_complete="$new_path"
8798      fi
8799
8800  if test "x$complete" != "x$new_complete"; then
8801      FOUND_MAKE="$new_complete"
8802      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8803$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8804    fi
8805
8806        fi
8807      fi
8808    fi
8809  fi
8810
8811
8812    if test "x$FOUND_MAKE" = x; then
8813      for ac_prog in make
8814do
8815  # Extract the first word of "$ac_prog", so it can be a program name with args.
8816set dummy $ac_prog; ac_word=$2
8817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8818$as_echo_n "checking for $ac_word... " >&6; }
8819if ${ac_cv_path_CHECK_MAKE+:} false; then :
8820  $as_echo_n "(cached) " >&6
8821else
8822  case $CHECK_MAKE in
8823  [\\/]* | ?:[\\/]*)
8824  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8825  ;;
8826  *)
8827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8828for as_dir in $PATH
8829do
8830  IFS=$as_save_IFS
8831  test -z "$as_dir" && as_dir=.
8832    for ac_exec_ext in '' $ac_executable_extensions; do
8833  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8834    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8836    break 2
8837  fi
8838done
8839  done
8840IFS=$as_save_IFS
8841
8842  ;;
8843esac
8844fi
8845CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8846if test -n "$CHECK_MAKE"; then
8847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8848$as_echo "$CHECK_MAKE" >&6; }
8849else
8850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8851$as_echo "no" >&6; }
8852fi
8853
8854
8855  test -n "$CHECK_MAKE" && break
8856done
8857
8858
8859  MAKE_CANDIDATE=""$CHECK_MAKE""
8860  DESCRIPTION="make in PATH"
8861  if test "x$MAKE_CANDIDATE" != x; then
8862    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8863$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8864    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8865    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8866    if test "x$IS_GNU_MAKE" = x; then
8867      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8868$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8869    else
8870      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8871      if test "x$IS_MODERN_MAKE" = x; then
8872        { $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
8873$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;}
8874      else
8875        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8876          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8877            MAKE_EXPECTED_ENV='cygwin'
8878          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8879            MAKE_EXPECTED_ENV='msys'
8880          else
8881            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8882          fi
8883          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8884          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8885        else
8886          # Not relevant for non-Windows
8887          IS_MAKE_CORRECT_ENV=true
8888        fi
8889        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8890          { $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
8891$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;}
8892        else
8893          FOUND_MAKE=$MAKE_CANDIDATE
8894
8895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8896
8897  # First separate the path from the arguments. This will split at the first
8898  # space.
8899  complete="$FOUND_MAKE"
8900  path="${complete%% *}"
8901  tmp="$complete EOL"
8902  arguments="${tmp#* }"
8903
8904  # Input might be given as Windows format, start by converting to
8905  # unix format.
8906  new_path=`$CYGPATH -u "$path"`
8907
8908  # Now try to locate executable using which
8909  new_path=`$WHICH "$new_path" 2> /dev/null`
8910  # bat and cmd files are not always considered executable in cygwin causing which
8911  # to not find them
8912  if test "x$new_path" = x \
8913           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8914           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8915    new_path=`$CYGPATH -u "$path"`
8916  fi
8917  if test "x$new_path" = x; then
8918    # Oops. Which didn't find the executable.
8919    # The splitting of arguments from the executable at a space might have been incorrect,
8920    # since paths with space are more likely in Windows. Give it another try with the whole
8921    # argument.
8922    path="$complete"
8923    arguments="EOL"
8924    new_path=`$CYGPATH -u "$path"`
8925    new_path=`$WHICH "$new_path" 2> /dev/null`
8926    # bat and cmd files are not always considered executable in cygwin causing which
8927    # to not find them
8928    if test "x$new_path" = x \
8929             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8930             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8931      new_path=`$CYGPATH -u "$path"`
8932    fi
8933    if test "x$new_path" = x; then
8934      # It's still not found. Now this is an unrecoverable error.
8935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8936$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8937      has_space=`$ECHO "$complete" | $GREP " "`
8938      if test "x$has_space" != x; then
8939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8941      fi
8942      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8943    fi
8944  fi
8945
8946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8949  # "foo.exe" is OK but "foo" is an error.
8950  #
8951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8952  # It is also a way to make sure we got the proper file name for the real test later on.
8953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8954  if test "x$test_shortpath" = x; then
8955    # Short path failed, file does not exist as specified.
8956    # Try adding .exe or .cmd
8957    if test -f "${new_path}.exe"; then
8958       input_to_shortpath="${new_path}.exe"
8959    elif test -f "${new_path}.cmd"; then
8960       input_to_shortpath="${new_path}.cmd"
8961    else
8962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8964      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8965$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8966      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8967    fi
8968  else
8969    input_to_shortpath="$new_path"
8970  fi
8971
8972  # Call helper function which possibly converts this using DOS-style short mode.
8973  # If so, the updated path is stored in $new_path.
8974  new_path="$input_to_shortpath"
8975
8976  input_path="$input_to_shortpath"
8977  # Check if we need to convert this using DOS-style short mode. If the path
8978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8979  # take no chances and rewrite it.
8980  # Note: m4 eats our [], so we need to use [ and ] instead.
8981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8982  if test "x$has_forbidden_chars" != x; then
8983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8984    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8985    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8986    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8987      # Going to short mode and back again did indeed matter. Since short mode is
8988      # case insensitive, let's make it lowercase to improve readability.
8989      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8990      # Now convert it back to Unix-stile (cygpath)
8991      input_path=`$CYGPATH -u "$shortmode_path"`
8992      new_path="$input_path"
8993    fi
8994  fi
8995
8996  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8997  if test "x$test_cygdrive_prefix" = x; then
8998    # As a simple fix, exclude /usr/bin since it's not a real path.
8999    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9000      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9001      # a path prefixed by /cygdrive for fixpath to work.
9002      new_path="$CYGWIN_ROOT_PATH$input_path"
9003    fi
9004  fi
9005
9006  # remove trailing .exe if any
9007  new_path="${new_path/%.exe/}"
9008
9009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9010
9011  # First separate the path from the arguments. This will split at the first
9012  # space.
9013  complete="$FOUND_MAKE"
9014  path="${complete%% *}"
9015  tmp="$complete EOL"
9016  arguments="${tmp#* }"
9017
9018  # Input might be given as Windows format, start by converting to
9019  # unix format.
9020  new_path="$path"
9021
9022  windows_path="$new_path"
9023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9024    unix_path=`$CYGPATH -u "$windows_path"`
9025    new_path="$unix_path"
9026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9028    new_path="$unix_path"
9029  fi
9030
9031
9032  # Now try to locate executable using which
9033  new_path=`$WHICH "$new_path" 2> /dev/null`
9034
9035  if test "x$new_path" = x; then
9036    # Oops. Which didn't find the executable.
9037    # The splitting of arguments from the executable at a space might have been incorrect,
9038    # since paths with space are more likely in Windows. Give it another try with the whole
9039    # argument.
9040    path="$complete"
9041    arguments="EOL"
9042    new_path="$path"
9043
9044  windows_path="$new_path"
9045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9046    unix_path=`$CYGPATH -u "$windows_path"`
9047    new_path="$unix_path"
9048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9050    new_path="$unix_path"
9051  fi
9052
9053
9054    new_path=`$WHICH "$new_path" 2> /dev/null`
9055
9056    if test "x$new_path" = x; then
9057      # It's still not found. Now this is an unrecoverable error.
9058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9059$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9060      has_space=`$ECHO "$complete" | $GREP " "`
9061      if test "x$has_space" != x; then
9062        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9063$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9064      fi
9065      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9066    fi
9067  fi
9068
9069  # Now new_path has a complete unix path to the binary
9070  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9071    # Keep paths in /bin as-is, but remove trailing .exe if any
9072    new_path="${new_path/%.exe/}"
9073    # Do not save /bin paths to all_fixpath_prefixes!
9074  else
9075    # Not in mixed or Windows style, start by that.
9076    new_path=`cmd //c echo $new_path`
9077
9078  input_path="$new_path"
9079  # Check if we need to convert this using DOS-style short mode. If the path
9080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9081  # take no chances and rewrite it.
9082  # Note: m4 eats our [], so we need to use [ and ] instead.
9083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9084  if test "x$has_forbidden_chars" != x; then
9085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9087  fi
9088
9089    # Output is in $new_path
9090
9091  windows_path="$new_path"
9092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9093    unix_path=`$CYGPATH -u "$windows_path"`
9094    new_path="$unix_path"
9095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9097    new_path="$unix_path"
9098  fi
9099
9100    # remove trailing .exe if any
9101    new_path="${new_path/%.exe/}"
9102
9103    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9104    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9105  fi
9106
9107  else
9108    # We're on a posix platform. Hooray! :)
9109    # First separate the path from the arguments. This will split at the first
9110    # space.
9111    complete="$FOUND_MAKE"
9112    path="${complete%% *}"
9113    tmp="$complete EOL"
9114    arguments="${tmp#* }"
9115
9116    # Cannot rely on the command "which" here since it doesn't always work.
9117    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9118    if test -z "$is_absolute_path"; then
9119      # Path to executable is not absolute. Find it.
9120      IFS_save="$IFS"
9121      IFS=:
9122      for p in $PATH; do
9123        if test -f "$p/$path" && test -x "$p/$path"; then
9124          new_path="$p/$path"
9125          break
9126        fi
9127      done
9128      IFS="$IFS_save"
9129    else
9130      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9131$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9132      new_path="$path"
9133    fi
9134
9135    if test "x$new_path" = x; then
9136        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9137$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9138        has_space=`$ECHO "$complete" | $GREP " "`
9139        if test "x$has_space" != x; then
9140          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9141$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9142        fi
9143        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9144      fi
9145  fi
9146
9147      # Now join together the path and the arguments once again
9148      if test "x$arguments" != xEOL; then
9149        new_complete="$new_path ${arguments% *}"
9150      else
9151        new_complete="$new_path"
9152      fi
9153
9154  if test "x$complete" != "x$new_complete"; then
9155      FOUND_MAKE="$new_complete"
9156      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9157$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9158    fi
9159
9160        fi
9161      fi
9162    fi
9163  fi
9164
9165    fi
9166
9167    if test "x$FOUND_MAKE" = x; then
9168      if test "x$TOOLS_DIR" != x; then
9169        # We have a tools-dir, check that as well before giving up.
9170        OLD_PATH=$PATH
9171        PATH=$TOOLS_DIR:$PATH
9172        for ac_prog in gmake
9173do
9174  # Extract the first word of "$ac_prog", so it can be a program name with args.
9175set dummy $ac_prog; ac_word=$2
9176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9177$as_echo_n "checking for $ac_word... " >&6; }
9178if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9179  $as_echo_n "(cached) " >&6
9180else
9181  case $CHECK_TOOLSDIR_GMAKE in
9182  [\\/]* | ?:[\\/]*)
9183  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9184  ;;
9185  *)
9186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9187for as_dir in $PATH
9188do
9189  IFS=$as_save_IFS
9190  test -z "$as_dir" && as_dir=.
9191    for ac_exec_ext in '' $ac_executable_extensions; do
9192  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9193    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9195    break 2
9196  fi
9197done
9198  done
9199IFS=$as_save_IFS
9200
9201  ;;
9202esac
9203fi
9204CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9205if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9207$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9208else
9209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9210$as_echo "no" >&6; }
9211fi
9212
9213
9214  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9215done
9216
9217
9218  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9219  DESCRIPTION="gmake in tools-dir"
9220  if test "x$MAKE_CANDIDATE" != x; then
9221    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9222$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9223    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9224    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9225    if test "x$IS_GNU_MAKE" = x; then
9226      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9227$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9228    else
9229      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9230      if test "x$IS_MODERN_MAKE" = x; then
9231        { $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
9232$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;}
9233      else
9234        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9235          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9236            MAKE_EXPECTED_ENV='cygwin'
9237          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9238            MAKE_EXPECTED_ENV='msys'
9239          else
9240            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9241          fi
9242          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9243          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9244        else
9245          # Not relevant for non-Windows
9246          IS_MAKE_CORRECT_ENV=true
9247        fi
9248        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9249          { $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
9250$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;}
9251        else
9252          FOUND_MAKE=$MAKE_CANDIDATE
9253
9254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9255
9256  # First separate the path from the arguments. This will split at the first
9257  # space.
9258  complete="$FOUND_MAKE"
9259  path="${complete%% *}"
9260  tmp="$complete EOL"
9261  arguments="${tmp#* }"
9262
9263  # Input might be given as Windows format, start by converting to
9264  # unix format.
9265  new_path=`$CYGPATH -u "$path"`
9266
9267  # Now try to locate executable using which
9268  new_path=`$WHICH "$new_path" 2> /dev/null`
9269  # bat and cmd files are not always considered executable in cygwin causing which
9270  # to not find them
9271  if test "x$new_path" = x \
9272           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9273           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9274    new_path=`$CYGPATH -u "$path"`
9275  fi
9276  if test "x$new_path" = x; then
9277    # Oops. Which didn't find the executable.
9278    # The splitting of arguments from the executable at a space might have been incorrect,
9279    # since paths with space are more likely in Windows. Give it another try with the whole
9280    # argument.
9281    path="$complete"
9282    arguments="EOL"
9283    new_path=`$CYGPATH -u "$path"`
9284    new_path=`$WHICH "$new_path" 2> /dev/null`
9285    # bat and cmd files are not always considered executable in cygwin causing which
9286    # to not find them
9287    if test "x$new_path" = x \
9288             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9289             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9290      new_path=`$CYGPATH -u "$path"`
9291    fi
9292    if test "x$new_path" = x; then
9293      # It's still not found. Now this is an unrecoverable error.
9294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9295$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9296      has_space=`$ECHO "$complete" | $GREP " "`
9297      if test "x$has_space" != x; then
9298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9300      fi
9301      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9302    fi
9303  fi
9304
9305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9308  # "foo.exe" is OK but "foo" is an error.
9309  #
9310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9311  # It is also a way to make sure we got the proper file name for the real test later on.
9312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9313  if test "x$test_shortpath" = x; then
9314    # Short path failed, file does not exist as specified.
9315    # Try adding .exe or .cmd
9316    if test -f "${new_path}.exe"; then
9317       input_to_shortpath="${new_path}.exe"
9318    elif test -f "${new_path}.cmd"; then
9319       input_to_shortpath="${new_path}.cmd"
9320    else
9321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9322$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9323      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9324$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9325      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9326    fi
9327  else
9328    input_to_shortpath="$new_path"
9329  fi
9330
9331  # Call helper function which possibly converts this using DOS-style short mode.
9332  # If so, the updated path is stored in $new_path.
9333  new_path="$input_to_shortpath"
9334
9335  input_path="$input_to_shortpath"
9336  # Check if we need to convert this using DOS-style short mode. If the path
9337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9338  # take no chances and rewrite it.
9339  # Note: m4 eats our [], so we need to use [ and ] instead.
9340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9341  if test "x$has_forbidden_chars" != x; then
9342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9346      # Going to short mode and back again did indeed matter. Since short mode is
9347      # case insensitive, let's make it lowercase to improve readability.
9348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9349      # Now convert it back to Unix-stile (cygpath)
9350      input_path=`$CYGPATH -u "$shortmode_path"`
9351      new_path="$input_path"
9352    fi
9353  fi
9354
9355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9356  if test "x$test_cygdrive_prefix" = x; then
9357    # As a simple fix, exclude /usr/bin since it's not a real path.
9358    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9360      # a path prefixed by /cygdrive for fixpath to work.
9361      new_path="$CYGWIN_ROOT_PATH$input_path"
9362    fi
9363  fi
9364
9365  # remove trailing .exe if any
9366  new_path="${new_path/%.exe/}"
9367
9368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9369
9370  # First separate the path from the arguments. This will split at the first
9371  # space.
9372  complete="$FOUND_MAKE"
9373  path="${complete%% *}"
9374  tmp="$complete EOL"
9375  arguments="${tmp#* }"
9376
9377  # Input might be given as Windows format, start by converting to
9378  # unix format.
9379  new_path="$path"
9380
9381  windows_path="$new_path"
9382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9383    unix_path=`$CYGPATH -u "$windows_path"`
9384    new_path="$unix_path"
9385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9387    new_path="$unix_path"
9388  fi
9389
9390
9391  # Now try to locate executable using which
9392  new_path=`$WHICH "$new_path" 2> /dev/null`
9393
9394  if test "x$new_path" = x; then
9395    # Oops. Which didn't find the executable.
9396    # The splitting of arguments from the executable at a space might have been incorrect,
9397    # since paths with space are more likely in Windows. Give it another try with the whole
9398    # argument.
9399    path="$complete"
9400    arguments="EOL"
9401    new_path="$path"
9402
9403  windows_path="$new_path"
9404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9405    unix_path=`$CYGPATH -u "$windows_path"`
9406    new_path="$unix_path"
9407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9409    new_path="$unix_path"
9410  fi
9411
9412
9413    new_path=`$WHICH "$new_path" 2> /dev/null`
9414
9415    if test "x$new_path" = x; then
9416      # It's still not found. Now this is an unrecoverable error.
9417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9418$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9419      has_space=`$ECHO "$complete" | $GREP " "`
9420      if test "x$has_space" != x; then
9421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9423      fi
9424      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9425    fi
9426  fi
9427
9428  # Now new_path has a complete unix path to the binary
9429  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9430    # Keep paths in /bin as-is, but remove trailing .exe if any
9431    new_path="${new_path/%.exe/}"
9432    # Do not save /bin paths to all_fixpath_prefixes!
9433  else
9434    # Not in mixed or Windows style, start by that.
9435    new_path=`cmd //c echo $new_path`
9436
9437  input_path="$new_path"
9438  # Check if we need to convert this using DOS-style short mode. If the path
9439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9440  # take no chances and rewrite it.
9441  # Note: m4 eats our [], so we need to use [ and ] instead.
9442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9443  if test "x$has_forbidden_chars" != x; then
9444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9446  fi
9447
9448    # Output is in $new_path
9449
9450  windows_path="$new_path"
9451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9452    unix_path=`$CYGPATH -u "$windows_path"`
9453    new_path="$unix_path"
9454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9456    new_path="$unix_path"
9457  fi
9458
9459    # remove trailing .exe if any
9460    new_path="${new_path/%.exe/}"
9461
9462    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9463    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9464  fi
9465
9466  else
9467    # We're on a posix platform. Hooray! :)
9468    # First separate the path from the arguments. This will split at the first
9469    # space.
9470    complete="$FOUND_MAKE"
9471    path="${complete%% *}"
9472    tmp="$complete EOL"
9473    arguments="${tmp#* }"
9474
9475    # Cannot rely on the command "which" here since it doesn't always work.
9476    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9477    if test -z "$is_absolute_path"; then
9478      # Path to executable is not absolute. Find it.
9479      IFS_save="$IFS"
9480      IFS=:
9481      for p in $PATH; do
9482        if test -f "$p/$path" && test -x "$p/$path"; then
9483          new_path="$p/$path"
9484          break
9485        fi
9486      done
9487      IFS="$IFS_save"
9488    else
9489      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9490$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9491      new_path="$path"
9492    fi
9493
9494    if test "x$new_path" = x; then
9495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9496$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9497        has_space=`$ECHO "$complete" | $GREP " "`
9498        if test "x$has_space" != x; then
9499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9501        fi
9502        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9503      fi
9504  fi
9505
9506      # Now join together the path and the arguments once again
9507      if test "x$arguments" != xEOL; then
9508        new_complete="$new_path ${arguments% *}"
9509      else
9510        new_complete="$new_path"
9511      fi
9512
9513  if test "x$complete" != "x$new_complete"; then
9514      FOUND_MAKE="$new_complete"
9515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9516$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9517    fi
9518
9519        fi
9520      fi
9521    fi
9522  fi
9523
9524        if test "x$FOUND_MAKE" = x; then
9525          for ac_prog in make
9526do
9527  # Extract the first word of "$ac_prog", so it can be a program name with args.
9528set dummy $ac_prog; ac_word=$2
9529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9530$as_echo_n "checking for $ac_word... " >&6; }
9531if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9532  $as_echo_n "(cached) " >&6
9533else
9534  case $CHECK_TOOLSDIR_MAKE in
9535  [\\/]* | ?:[\\/]*)
9536  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9537  ;;
9538  *)
9539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9540for as_dir in $PATH
9541do
9542  IFS=$as_save_IFS
9543  test -z "$as_dir" && as_dir=.
9544    for ac_exec_ext in '' $ac_executable_extensions; do
9545  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9546    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9548    break 2
9549  fi
9550done
9551  done
9552IFS=$as_save_IFS
9553
9554  ;;
9555esac
9556fi
9557CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9558if test -n "$CHECK_TOOLSDIR_MAKE"; then
9559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9560$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9561else
9562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9563$as_echo "no" >&6; }
9564fi
9565
9566
9567  test -n "$CHECK_TOOLSDIR_MAKE" && break
9568done
9569
9570
9571  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9572  DESCRIPTION="make in tools-dir"
9573  if test "x$MAKE_CANDIDATE" != x; then
9574    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9575$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9576    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9577    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9578    if test "x$IS_GNU_MAKE" = x; then
9579      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9580$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9581    else
9582      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9583      if test "x$IS_MODERN_MAKE" = x; then
9584        { $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
9585$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;}
9586      else
9587        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9588          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9589            MAKE_EXPECTED_ENV='cygwin'
9590          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9591            MAKE_EXPECTED_ENV='msys'
9592          else
9593            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9594          fi
9595          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9596          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9597        else
9598          # Not relevant for non-Windows
9599          IS_MAKE_CORRECT_ENV=true
9600        fi
9601        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9602          { $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
9603$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;}
9604        else
9605          FOUND_MAKE=$MAKE_CANDIDATE
9606
9607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9608
9609  # First separate the path from the arguments. This will split at the first
9610  # space.
9611  complete="$FOUND_MAKE"
9612  path="${complete%% *}"
9613  tmp="$complete EOL"
9614  arguments="${tmp#* }"
9615
9616  # Input might be given as Windows format, start by converting to
9617  # unix format.
9618  new_path=`$CYGPATH -u "$path"`
9619
9620  # Now try to locate executable using which
9621  new_path=`$WHICH "$new_path" 2> /dev/null`
9622  # bat and cmd files are not always considered executable in cygwin causing which
9623  # to not find them
9624  if test "x$new_path" = x \
9625           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9626           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9627    new_path=`$CYGPATH -u "$path"`
9628  fi
9629  if test "x$new_path" = x; then
9630    # Oops. Which didn't find the executable.
9631    # The splitting of arguments from the executable at a space might have been incorrect,
9632    # since paths with space are more likely in Windows. Give it another try with the whole
9633    # argument.
9634    path="$complete"
9635    arguments="EOL"
9636    new_path=`$CYGPATH -u "$path"`
9637    new_path=`$WHICH "$new_path" 2> /dev/null`
9638    # bat and cmd files are not always considered executable in cygwin causing which
9639    # to not find them
9640    if test "x$new_path" = x \
9641             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9642             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9643      new_path=`$CYGPATH -u "$path"`
9644    fi
9645    if test "x$new_path" = x; then
9646      # It's still not found. Now this is an unrecoverable error.
9647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9648$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9649      has_space=`$ECHO "$complete" | $GREP " "`
9650      if test "x$has_space" != x; then
9651        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9652$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9653      fi
9654      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9655    fi
9656  fi
9657
9658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9661  # "foo.exe" is OK but "foo" is an error.
9662  #
9663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9664  # It is also a way to make sure we got the proper file name for the real test later on.
9665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9666  if test "x$test_shortpath" = x; then
9667    # Short path failed, file does not exist as specified.
9668    # Try adding .exe or .cmd
9669    if test -f "${new_path}.exe"; then
9670       input_to_shortpath="${new_path}.exe"
9671    elif test -f "${new_path}.cmd"; then
9672       input_to_shortpath="${new_path}.cmd"
9673    else
9674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9675$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9676      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9677$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9678      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9679    fi
9680  else
9681    input_to_shortpath="$new_path"
9682  fi
9683
9684  # Call helper function which possibly converts this using DOS-style short mode.
9685  # If so, the updated path is stored in $new_path.
9686  new_path="$input_to_shortpath"
9687
9688  input_path="$input_to_shortpath"
9689  # Check if we need to convert this using DOS-style short mode. If the path
9690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9691  # take no chances and rewrite it.
9692  # Note: m4 eats our [], so we need to use [ and ] instead.
9693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9694  if test "x$has_forbidden_chars" != x; then
9695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9696    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9699      # Going to short mode and back again did indeed matter. Since short mode is
9700      # case insensitive, let's make it lowercase to improve readability.
9701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9702      # Now convert it back to Unix-stile (cygpath)
9703      input_path=`$CYGPATH -u "$shortmode_path"`
9704      new_path="$input_path"
9705    fi
9706  fi
9707
9708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9709  if test "x$test_cygdrive_prefix" = x; then
9710    # As a simple fix, exclude /usr/bin since it's not a real path.
9711    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9713      # a path prefixed by /cygdrive for fixpath to work.
9714      new_path="$CYGWIN_ROOT_PATH$input_path"
9715    fi
9716  fi
9717
9718  # remove trailing .exe if any
9719  new_path="${new_path/%.exe/}"
9720
9721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9722
9723  # First separate the path from the arguments. This will split at the first
9724  # space.
9725  complete="$FOUND_MAKE"
9726  path="${complete%% *}"
9727  tmp="$complete EOL"
9728  arguments="${tmp#* }"
9729
9730  # Input might be given as Windows format, start by converting to
9731  # unix format.
9732  new_path="$path"
9733
9734  windows_path="$new_path"
9735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9736    unix_path=`$CYGPATH -u "$windows_path"`
9737    new_path="$unix_path"
9738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9740    new_path="$unix_path"
9741  fi
9742
9743
9744  # Now try to locate executable using which
9745  new_path=`$WHICH "$new_path" 2> /dev/null`
9746
9747  if test "x$new_path" = x; then
9748    # Oops. Which didn't find the executable.
9749    # The splitting of arguments from the executable at a space might have been incorrect,
9750    # since paths with space are more likely in Windows. Give it another try with the whole
9751    # argument.
9752    path="$complete"
9753    arguments="EOL"
9754    new_path="$path"
9755
9756  windows_path="$new_path"
9757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9758    unix_path=`$CYGPATH -u "$windows_path"`
9759    new_path="$unix_path"
9760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9762    new_path="$unix_path"
9763  fi
9764
9765
9766    new_path=`$WHICH "$new_path" 2> /dev/null`
9767
9768    if test "x$new_path" = x; then
9769      # It's still not found. Now this is an unrecoverable error.
9770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9771$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9772      has_space=`$ECHO "$complete" | $GREP " "`
9773      if test "x$has_space" != x; then
9774        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9775$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9776      fi
9777      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9778    fi
9779  fi
9780
9781  # Now new_path has a complete unix path to the binary
9782  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9783    # Keep paths in /bin as-is, but remove trailing .exe if any
9784    new_path="${new_path/%.exe/}"
9785    # Do not save /bin paths to all_fixpath_prefixes!
9786  else
9787    # Not in mixed or Windows style, start by that.
9788    new_path=`cmd //c echo $new_path`
9789
9790  input_path="$new_path"
9791  # Check if we need to convert this using DOS-style short mode. If the path
9792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9793  # take no chances and rewrite it.
9794  # Note: m4 eats our [], so we need to use [ and ] instead.
9795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9796  if test "x$has_forbidden_chars" != x; then
9797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9799  fi
9800
9801    # Output is in $new_path
9802
9803  windows_path="$new_path"
9804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9805    unix_path=`$CYGPATH -u "$windows_path"`
9806    new_path="$unix_path"
9807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9809    new_path="$unix_path"
9810  fi
9811
9812    # remove trailing .exe if any
9813    new_path="${new_path/%.exe/}"
9814
9815    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9816    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9817  fi
9818
9819  else
9820    # We're on a posix platform. Hooray! :)
9821    # First separate the path from the arguments. This will split at the first
9822    # space.
9823    complete="$FOUND_MAKE"
9824    path="${complete%% *}"
9825    tmp="$complete EOL"
9826    arguments="${tmp#* }"
9827
9828    # Cannot rely on the command "which" here since it doesn't always work.
9829    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9830    if test -z "$is_absolute_path"; then
9831      # Path to executable is not absolute. Find it.
9832      IFS_save="$IFS"
9833      IFS=:
9834      for p in $PATH; do
9835        if test -f "$p/$path" && test -x "$p/$path"; then
9836          new_path="$p/$path"
9837          break
9838        fi
9839      done
9840      IFS="$IFS_save"
9841    else
9842      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9843$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9844      new_path="$path"
9845    fi
9846
9847    if test "x$new_path" = x; then
9848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9849$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9850        has_space=`$ECHO "$complete" | $GREP " "`
9851        if test "x$has_space" != x; then
9852          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9853$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9854        fi
9855        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9856      fi
9857  fi
9858
9859      # Now join together the path and the arguments once again
9860      if test "x$arguments" != xEOL; then
9861        new_complete="$new_path ${arguments% *}"
9862      else
9863        new_complete="$new_path"
9864      fi
9865
9866  if test "x$complete" != "x$new_complete"; then
9867      FOUND_MAKE="$new_complete"
9868      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9869$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9870    fi
9871
9872        fi
9873      fi
9874    fi
9875  fi
9876
9877        fi
9878        PATH=$OLD_PATH
9879      fi
9880    fi
9881
9882    if test "x$FOUND_MAKE" = x; then
9883      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
9884    fi
9885  fi
9886
9887  MAKE=$FOUND_MAKE
9888
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9890$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9891
9892
9893
9894    # Test if find supports -delete
9895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9896$as_echo_n "checking if find supports -delete... " >&6; }
9897    FIND_DELETE="-delete"
9898
9899    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9900
9901    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9902
9903    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9904    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9905        # No, it does not.
9906        rm $DELETEDIR/TestIfFindSupportsDelete
9907        FIND_DELETE="-exec rm \{\} \+"
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9909$as_echo "no" >&6; }
9910    else
9911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9912$as_echo "yes" >&6; }
9913    fi
9914    rmdir $DELETEDIR
9915
9916
9917
9918# These tools might not be installed by default,
9919# need hint on how to install them.
9920
9921    for ac_prog in unzip
9922do
9923  # Extract the first word of "$ac_prog", so it can be a program name with args.
9924set dummy $ac_prog; ac_word=$2
9925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9926$as_echo_n "checking for $ac_word... " >&6; }
9927if ${ac_cv_path_UNZIP+:} false; then :
9928  $as_echo_n "(cached) " >&6
9929else
9930  case $UNZIP in
9931  [\\/]* | ?:[\\/]*)
9932  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9933  ;;
9934  *)
9935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9936for as_dir in $PATH
9937do
9938  IFS=$as_save_IFS
9939  test -z "$as_dir" && as_dir=.
9940    for ac_exec_ext in '' $ac_executable_extensions; do
9941  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9942    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9944    break 2
9945  fi
9946done
9947  done
9948IFS=$as_save_IFS
9949
9950  ;;
9951esac
9952fi
9953UNZIP=$ac_cv_path_UNZIP
9954if test -n "$UNZIP"; then
9955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9956$as_echo "$UNZIP" >&6; }
9957else
9958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9959$as_echo "no" >&6; }
9960fi
9961
9962
9963  test -n "$UNZIP" && break
9964done
9965
9966
9967    if test "x$UNZIP" = x; then
9968        if test "xunzip" = x; then
9969          PROG_NAME=unzip
9970        else
9971          PROG_NAME=unzip
9972        fi
9973        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9974$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9975        as_fn_error $? "Cannot continue" "$LINENO" 5
9976    fi
9977
9978
9979
9980    for ac_prog in zip
9981do
9982  # Extract the first word of "$ac_prog", so it can be a program name with args.
9983set dummy $ac_prog; ac_word=$2
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9985$as_echo_n "checking for $ac_word... " >&6; }
9986if ${ac_cv_path_ZIP+:} false; then :
9987  $as_echo_n "(cached) " >&6
9988else
9989  case $ZIP in
9990  [\\/]* | ?:[\\/]*)
9991  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9992  ;;
9993  *)
9994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9995for as_dir in $PATH
9996do
9997  IFS=$as_save_IFS
9998  test -z "$as_dir" && as_dir=.
9999    for ac_exec_ext in '' $ac_executable_extensions; do
10000  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10001    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10003    break 2
10004  fi
10005done
10006  done
10007IFS=$as_save_IFS
10008
10009  ;;
10010esac
10011fi
10012ZIP=$ac_cv_path_ZIP
10013if test -n "$ZIP"; then
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10015$as_echo "$ZIP" >&6; }
10016else
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
10019fi
10020
10021
10022  test -n "$ZIP" && break
10023done
10024
10025
10026    if test "x$ZIP" = x; then
10027        if test "xzip" = x; then
10028          PROG_NAME=zip
10029        else
10030          PROG_NAME=zip
10031        fi
10032        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10033$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10034        as_fn_error $? "Cannot continue" "$LINENO" 5
10035    fi
10036
10037
10038
10039# Non-required basic tools
10040
10041# Extract the first word of "ldd", so it can be a program name with args.
10042set dummy ldd; ac_word=$2
10043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10044$as_echo_n "checking for $ac_word... " >&6; }
10045if ${ac_cv_path_LDD+:} false; then :
10046  $as_echo_n "(cached) " >&6
10047else
10048  case $LDD in
10049  [\\/]* | ?:[\\/]*)
10050  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10051  ;;
10052  *)
10053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10054for as_dir in $PATH
10055do
10056  IFS=$as_save_IFS
10057  test -z "$as_dir" && as_dir=.
10058    for ac_exec_ext in '' $ac_executable_extensions; do
10059  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10060    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10062    break 2
10063  fi
10064done
10065  done
10066IFS=$as_save_IFS
10067
10068  ;;
10069esac
10070fi
10071LDD=$ac_cv_path_LDD
10072if test -n "$LDD"; then
10073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10074$as_echo "$LDD" >&6; }
10075else
10076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10077$as_echo "no" >&6; }
10078fi
10079
10080
10081if test "x$LDD" = "x"; then
10082    # List shared lib dependencies is used for
10083    # debug output and checking for forbidden dependencies.
10084    # We can build without it.
10085    LDD="true"
10086fi
10087# Extract the first word of "otool", so it can be a program name with args.
10088set dummy otool; ac_word=$2
10089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10090$as_echo_n "checking for $ac_word... " >&6; }
10091if ${ac_cv_path_OTOOL+:} false; then :
10092  $as_echo_n "(cached) " >&6
10093else
10094  case $OTOOL in
10095  [\\/]* | ?:[\\/]*)
10096  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10097  ;;
10098  *)
10099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10100for as_dir in $PATH
10101do
10102  IFS=$as_save_IFS
10103  test -z "$as_dir" && as_dir=.
10104    for ac_exec_ext in '' $ac_executable_extensions; do
10105  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10106    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10108    break 2
10109  fi
10110done
10111  done
10112IFS=$as_save_IFS
10113
10114  ;;
10115esac
10116fi
10117OTOOL=$ac_cv_path_OTOOL
10118if test -n "$OTOOL"; then
10119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10120$as_echo "$OTOOL" >&6; }
10121else
10122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10123$as_echo "no" >&6; }
10124fi
10125
10126
10127if test "x$OTOOL" = "x"; then
10128   OTOOL="true"
10129fi
10130for ac_prog in readelf greadelf
10131do
10132  # Extract the first word of "$ac_prog", so it can be a program name with args.
10133set dummy $ac_prog; ac_word=$2
10134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10135$as_echo_n "checking for $ac_word... " >&6; }
10136if ${ac_cv_path_READELF+:} false; then :
10137  $as_echo_n "(cached) " >&6
10138else
10139  case $READELF in
10140  [\\/]* | ?:[\\/]*)
10141  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10142  ;;
10143  *)
10144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10145for as_dir in $PATH
10146do
10147  IFS=$as_save_IFS
10148  test -z "$as_dir" && as_dir=.
10149    for ac_exec_ext in '' $ac_executable_extensions; do
10150  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10151    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10153    break 2
10154  fi
10155done
10156  done
10157IFS=$as_save_IFS
10158
10159  ;;
10160esac
10161fi
10162READELF=$ac_cv_path_READELF
10163if test -n "$READELF"; then
10164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10165$as_echo "$READELF" >&6; }
10166else
10167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10168$as_echo "no" >&6; }
10169fi
10170
10171
10172  test -n "$READELF" && break
10173done
10174
10175# Extract the first word of "hg", so it can be a program name with args.
10176set dummy hg; ac_word=$2
10177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10178$as_echo_n "checking for $ac_word... " >&6; }
10179if ${ac_cv_path_HG+:} false; then :
10180  $as_echo_n "(cached) " >&6
10181else
10182  case $HG in
10183  [\\/]* | ?:[\\/]*)
10184  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10185  ;;
10186  *)
10187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10188for as_dir in $PATH
10189do
10190  IFS=$as_save_IFS
10191  test -z "$as_dir" && as_dir=.
10192    for ac_exec_ext in '' $ac_executable_extensions; do
10193  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10194    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10196    break 2
10197  fi
10198done
10199  done
10200IFS=$as_save_IFS
10201
10202  ;;
10203esac
10204fi
10205HG=$ac_cv_path_HG
10206if test -n "$HG"; then
10207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10208$as_echo "$HG" >&6; }
10209else
10210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10211$as_echo "no" >&6; }
10212fi
10213
10214
10215# Extract the first word of "stat", so it can be a program name with args.
10216set dummy stat; ac_word=$2
10217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10218$as_echo_n "checking for $ac_word... " >&6; }
10219if ${ac_cv_path_STAT+:} false; then :
10220  $as_echo_n "(cached) " >&6
10221else
10222  case $STAT in
10223  [\\/]* | ?:[\\/]*)
10224  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10225  ;;
10226  *)
10227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10228for as_dir in $PATH
10229do
10230  IFS=$as_save_IFS
10231  test -z "$as_dir" && as_dir=.
10232    for ac_exec_ext in '' $ac_executable_extensions; do
10233  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10234    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10236    break 2
10237  fi
10238done
10239  done
10240IFS=$as_save_IFS
10241
10242  ;;
10243esac
10244fi
10245STAT=$ac_cv_path_STAT
10246if test -n "$STAT"; then
10247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10248$as_echo "$STAT" >&6; }
10249else
10250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10251$as_echo "no" >&6; }
10252fi
10253
10254
10255# Extract the first word of "time", so it can be a program name with args.
10256set dummy time; ac_word=$2
10257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10258$as_echo_n "checking for $ac_word... " >&6; }
10259if ${ac_cv_path_TIME+:} false; then :
10260  $as_echo_n "(cached) " >&6
10261else
10262  case $TIME in
10263  [\\/]* | ?:[\\/]*)
10264  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10265  ;;
10266  *)
10267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10268for as_dir in $PATH
10269do
10270  IFS=$as_save_IFS
10271  test -z "$as_dir" && as_dir=.
10272    for ac_exec_ext in '' $ac_executable_extensions; do
10273  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10274    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10276    break 2
10277  fi
10278done
10279  done
10280IFS=$as_save_IFS
10281
10282  ;;
10283esac
10284fi
10285TIME=$ac_cv_path_TIME
10286if test -n "$TIME"; then
10287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10288$as_echo "$TIME" >&6; }
10289else
10290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10291$as_echo "no" >&6; }
10292fi
10293
10294
10295
10296if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10297
10298    for ac_prog in comm
10299do
10300  # Extract the first word of "$ac_prog", so it can be a program name with args.
10301set dummy $ac_prog; ac_word=$2
10302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10303$as_echo_n "checking for $ac_word... " >&6; }
10304if ${ac_cv_path_COMM+:} false; then :
10305  $as_echo_n "(cached) " >&6
10306else
10307  case $COMM in
10308  [\\/]* | ?:[\\/]*)
10309  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10310  ;;
10311  *)
10312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10313for as_dir in $PATH
10314do
10315  IFS=$as_save_IFS
10316  test -z "$as_dir" && as_dir=.
10317    for ac_exec_ext in '' $ac_executable_extensions; do
10318  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10319    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10321    break 2
10322  fi
10323done
10324  done
10325IFS=$as_save_IFS
10326
10327  ;;
10328esac
10329fi
10330COMM=$ac_cv_path_COMM
10331if test -n "$COMM"; then
10332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10333$as_echo "$COMM" >&6; }
10334else
10335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10336$as_echo "no" >&6; }
10337fi
10338
10339
10340  test -n "$COMM" && break
10341done
10342
10343
10344    if test "x$COMM" = x; then
10345        if test "xcomm" = x; then
10346          PROG_NAME=comm
10347        else
10348          PROG_NAME=comm
10349        fi
10350        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10351$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10352        as_fn_error $? "Cannot continue" "$LINENO" 5
10353    fi
10354
10355
10356fi
10357
10358
10359# Check if pkg-config is available.
10360
10361
10362if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10363	if test -n "$ac_tool_prefix"; then
10364  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10365set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10367$as_echo_n "checking for $ac_word... " >&6; }
10368if ${ac_cv_path_PKG_CONFIG+:} false; then :
10369  $as_echo_n "(cached) " >&6
10370else
10371  case $PKG_CONFIG in
10372  [\\/]* | ?:[\\/]*)
10373  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10374  ;;
10375  *)
10376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10377for as_dir in $PATH
10378do
10379  IFS=$as_save_IFS
10380  test -z "$as_dir" && as_dir=.
10381    for ac_exec_ext in '' $ac_executable_extensions; do
10382  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10383    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10385    break 2
10386  fi
10387done
10388  done
10389IFS=$as_save_IFS
10390
10391  ;;
10392esac
10393fi
10394PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10395if test -n "$PKG_CONFIG"; then
10396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10397$as_echo "$PKG_CONFIG" >&6; }
10398else
10399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10400$as_echo "no" >&6; }
10401fi
10402
10403
10404fi
10405if test -z "$ac_cv_path_PKG_CONFIG"; then
10406  ac_pt_PKG_CONFIG=$PKG_CONFIG
10407  # Extract the first word of "pkg-config", so it can be a program name with args.
10408set dummy pkg-config; ac_word=$2
10409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10410$as_echo_n "checking for $ac_word... " >&6; }
10411if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10412  $as_echo_n "(cached) " >&6
10413else
10414  case $ac_pt_PKG_CONFIG in
10415  [\\/]* | ?:[\\/]*)
10416  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10417  ;;
10418  *)
10419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10420for as_dir in $PATH
10421do
10422  IFS=$as_save_IFS
10423  test -z "$as_dir" && as_dir=.
10424    for ac_exec_ext in '' $ac_executable_extensions; do
10425  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10426    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10428    break 2
10429  fi
10430done
10431  done
10432IFS=$as_save_IFS
10433
10434  ;;
10435esac
10436fi
10437ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10438if test -n "$ac_pt_PKG_CONFIG"; then
10439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10440$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10441else
10442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10443$as_echo "no" >&6; }
10444fi
10445
10446  if test "x$ac_pt_PKG_CONFIG" = x; then
10447    PKG_CONFIG=""
10448  else
10449    case $cross_compiling:$ac_tool_warned in
10450yes:)
10451{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10452$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10453ac_tool_warned=yes ;;
10454esac
10455    PKG_CONFIG=$ac_pt_PKG_CONFIG
10456  fi
10457else
10458  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10459fi
10460
10461fi
10462if test -n "$PKG_CONFIG"; then
10463	_pkg_min_version=0.9.0
10464	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10465$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10466	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10467		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10468$as_echo "yes" >&6; }
10469	else
10470		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10471$as_echo "no" >&6; }
10472		PKG_CONFIG=""
10473	fi
10474
10475fi
10476
10477# After basic tools have been setup, we can check build os specific details.
10478
10479###############################################################################
10480
10481# Note that this is the build platform OS version!
10482
10483OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10484OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10485OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10486OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10487
10488
10489
10490
10491
10492# Setup builddeps, for automatic downloading of tools we need.
10493# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10494# boot-jdk setup, but we need to have basic tools setup first.
10495
10496
10497# Check whether --with-builddeps-conf was given.
10498if test "${with_builddeps_conf+set}" = set; then :
10499  withval=$with_builddeps_conf;
10500fi
10501
10502
10503
10504# Check whether --with-builddeps-server was given.
10505if test "${with_builddeps_server+set}" = set; then :
10506  withval=$with_builddeps_server;
10507fi
10508
10509
10510
10511# Check whether --with-builddeps-dir was given.
10512if test "${with_builddeps_dir+set}" = set; then :
10513  withval=$with_builddeps_dir;
10514else
10515  with_builddeps_dir=/localhome/builddeps
10516fi
10517
10518
10519
10520# Check whether --with-builddeps-group was given.
10521if test "${with_builddeps_group+set}" = set; then :
10522  withval=$with_builddeps_group;
10523fi
10524
10525
10526
10527
10528    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10529        if test "x$with_builddeps_conf" != x; then
10530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10531$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10532            builddepsfile=$with_builddeps_conf
10533            if test -s $builddepsfile; then
10534                . $builddepsfile
10535                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10536$as_echo "loaded!" >&6; }
10537            else
10538               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10539           fi
10540        else
10541            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10542$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10543            builddepsfile=`mktemp`
10544            touch $builddepsfile
10545            # Put all found confs into a single file.
10546            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10547            # Source the file to acquire the variables
10548            if test -s $builddepsfile; then
10549                . $builddepsfile
10550                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10551$as_echo "found at least one!" >&6; }
10552            else
10553               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10554           fi
10555        fi
10556        # Create build and target names that use _ instead of "-" and ".".
10557        # This is necessary to use them in variable names.
10558        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10559        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10560        # Extract rewrite information for build and target
10561        eval rewritten_build=\${REWRITE_${build_var}}
10562        if test "x$rewritten_build" = x; then
10563            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10564            echo Build stays the same $rewritten_build
10565        else
10566            echo Rewriting build for builddeps into $rewritten_build
10567        fi
10568        eval rewritten_target=\${REWRITE_${target_var}}
10569        if test "x$rewritten_target" = x; then
10570            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10571            echo Target stays the same $rewritten_target
10572        else
10573            echo Rewriting target for builddeps into $rewritten_target
10574        fi
10575        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10576        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10577    fi
10578    for ac_prog in 7z unzip
10579do
10580  # Extract the first word of "$ac_prog", so it can be a program name with args.
10581set dummy $ac_prog; ac_word=$2
10582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10583$as_echo_n "checking for $ac_word... " >&6; }
10584if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10585  $as_echo_n "(cached) " >&6
10586else
10587  if test -n "$BDEPS_UNZIP"; then
10588  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10589else
10590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10591for as_dir in $PATH
10592do
10593  IFS=$as_save_IFS
10594  test -z "$as_dir" && as_dir=.
10595    for ac_exec_ext in '' $ac_executable_extensions; do
10596  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10597    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10599    break 2
10600  fi
10601done
10602  done
10603IFS=$as_save_IFS
10604
10605fi
10606fi
10607BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10608if test -n "$BDEPS_UNZIP"; then
10609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10610$as_echo "$BDEPS_UNZIP" >&6; }
10611else
10612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10613$as_echo "no" >&6; }
10614fi
10615
10616
10617  test -n "$BDEPS_UNZIP" && break
10618done
10619
10620    if test "x$BDEPS_UNZIP" = x7z; then
10621        BDEPS_UNZIP="7z x"
10622    fi
10623
10624    for ac_prog in wget lftp ftp
10625do
10626  # Extract the first word of "$ac_prog", so it can be a program name with args.
10627set dummy $ac_prog; ac_word=$2
10628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10629$as_echo_n "checking for $ac_word... " >&6; }
10630if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10631  $as_echo_n "(cached) " >&6
10632else
10633  if test -n "$BDEPS_FTP"; then
10634  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10635else
10636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10637for as_dir in $PATH
10638do
10639  IFS=$as_save_IFS
10640  test -z "$as_dir" && as_dir=.
10641    for ac_exec_ext in '' $ac_executable_extensions; do
10642  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10643    ac_cv_prog_BDEPS_FTP="$ac_prog"
10644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10645    break 2
10646  fi
10647done
10648  done
10649IFS=$as_save_IFS
10650
10651fi
10652fi
10653BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10654if test -n "$BDEPS_FTP"; then
10655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10656$as_echo "$BDEPS_FTP" >&6; }
10657else
10658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10659$as_echo "no" >&6; }
10660fi
10661
10662
10663  test -n "$BDEPS_FTP" && break
10664done
10665
10666
10667
10668###############################################################################
10669#
10670# Determine OpenJDK variants, options and version numbers.
10671#
10672###############################################################################
10673
10674# We need build & target for this.
10675
10676
10677###############################################################################
10678#
10679# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10680# We always build headless support.
10681#
10682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10683$as_echo_n "checking headful support... " >&6; }
10684# Check whether --enable-headful was given.
10685if test "${enable_headful+set}" = set; then :
10686  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10687else
10688  SUPPORT_HEADFUL=yes
10689fi
10690
10691
10692SUPPORT_HEADLESS=yes
10693BUILD_HEADLESS="BUILD_HEADLESS:=true"
10694
10695if test "x$SUPPORT_HEADFUL" = xyes; then
10696    # We are building both headful and headless.
10697    headful_msg="inlude support for both headful and headless"
10698fi
10699
10700if test "x$SUPPORT_HEADFUL" = xno; then
10701    # Thus we are building headless only.
10702    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10703    headful_msg="headless only"
10704fi
10705
10706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10707$as_echo "$headful_msg" >&6; }
10708
10709
10710
10711
10712
10713# Control wether Hotspot runs Queens test after build.
10714# Check whether --enable-hotspot-test-in-build was given.
10715if test "${enable_hotspot_test_in_build+set}" = set; then :
10716  enableval=$enable_hotspot_test_in_build;
10717else
10718  enable_hotspot_test_in_build=no
10719fi
10720
10721if test "x$enable_hotspot_test_in_build" = "xyes"; then
10722    TEST_IN_BUILD=true
10723else
10724    TEST_IN_BUILD=false
10725fi
10726
10727
10728###############################################################################
10729#
10730# Choose cacerts source file
10731#
10732
10733# Check whether --with-cacerts-file was given.
10734if test "${with_cacerts_file+set}" = set; then :
10735  withval=$with_cacerts_file;
10736fi
10737
10738if test "x$with_cacerts_file" != x; then
10739    CACERTS_FILE=$with_cacerts_file
10740else
10741    if test "x$OPENJDK" = "xtrue"; then
10742        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10743    else
10744        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10745    fi
10746fi
10747
10748
10749###############################################################################
10750#
10751# Enable or disable unlimited crypto
10752#
10753# Check whether --enable-unlimited-crypto was given.
10754if test "${enable_unlimited_crypto+set}" = set; then :
10755  enableval=$enable_unlimited_crypto;
10756else
10757  enable_unlimited_crypto=no
10758fi
10759
10760if test "x$enable_unlimited_crypto" = "xyes"; then
10761    UNLIMITED_CRYPTO=true
10762else
10763    UNLIMITED_CRYPTO=false
10764fi
10765
10766
10767###############################################################################
10768#
10769# Compress jars
10770#
10771COMPRESS_JARS=false
10772
10773
10774
10775
10776# Source the version numbers
10777. $AUTOCONF_DIR/version-numbers
10778
10779# Get the settings from parameters
10780
10781# Check whether --with-milestone was given.
10782if test "${with_milestone+set}" = set; then :
10783  withval=$with_milestone;
10784fi
10785
10786if test "x$with_milestone" = xyes; then
10787  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10788elif test "x$with_milestone" != x; then
10789    MILESTONE="$with_milestone"
10790fi
10791if test "x$MILESTONE" = x; then
10792  MILESTONE=internal
10793fi
10794
10795
10796# Check whether --with-build-number was given.
10797if test "${with_build_number+set}" = set; then :
10798  withval=$with_build_number;
10799fi
10800
10801if test "x$with_build_number" = xyes; then
10802  as_fn_error $? "Build number must have a value" "$LINENO" 5
10803elif test "x$with_build_number" != x; then
10804  JDK_BUILD_NUMBER="$with_build_number"
10805fi
10806if test "x$JDK_BUILD_NUMBER" = x; then
10807  JDK_BUILD_NUMBER=b00
10808fi
10809
10810
10811# Check whether --with-user-release-suffix was given.
10812if test "${with_user_release_suffix+set}" = set; then :
10813  withval=$with_user_release_suffix;
10814fi
10815
10816if test "x$with_user_release_suffix" = xyes; then
10817  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10818elif test "x$with_user_release_suffix" != x; then
10819  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10820else
10821  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10822  # Avoid [:alnum:] since it depends on the locale.
10823  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10824  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10825fi
10826
10827
10828# Now set the JDK version, milestone, build number etc.
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843COPYRIGHT_YEAR=`date +'%Y'`
10844
10845
10846if test "x$JDK_UPDATE_VERSION" != x; then
10847  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10848else
10849  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10850fi
10851
10852
10853COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10854
10855
10856
10857###############################################################################
10858#
10859# Setup BootJDK, used to bootstrap the build.
10860#
10861###############################################################################
10862
10863
10864BOOT_JDK_FOUND=no
10865
10866# Check whether --with-boot-jdk was given.
10867if test "${with_boot_jdk+set}" = set; then :
10868  withval=$with_boot_jdk;
10869fi
10870
10871
10872# We look for the Boot JDK through various means, going from more certain to
10873# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10874# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10875# must check if this is indeed valid; otherwise we'll continue looking.
10876
10877# Test: Is bootjdk explicitely set by command line arguments?
10878
10879  if test "x$BOOT_JDK_FOUND" = xno; then
10880    # Now execute the test
10881
10882if test "x$with_boot_jdk" != x; then
10883    BOOT_JDK=$with_boot_jdk
10884    BOOT_JDK_FOUND=maybe
10885    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10886$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10887fi
10888
10889
10890    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10891    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10892      # Do we have a bin/java?
10893      if test ! -x "$BOOT_JDK/bin/java"; then
10894        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10895$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10896        BOOT_JDK_FOUND=no
10897      else
10898        # Do we have a bin/javac?
10899        if test ! -x "$BOOT_JDK/bin/javac"; then
10900          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10902          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10903$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10904          BOOT_JDK_FOUND=no
10905        else
10906          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10907          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10908            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10910            BOOT_JDK_FOUND=no
10911          else
10912            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10913            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10914
10915            # Extra M4 quote needed to protect [] in grep expression.
10916            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10917            if test "x$FOUND_VERSION_78" = x; then
10918              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10920              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10921$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10922              BOOT_JDK_FOUND=no
10923            else
10924              # We're done! :-)
10925              BOOT_JDK_FOUND=yes
10926
10927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10928
10929  # Input might be given as Windows format, start by converting to
10930  # unix format.
10931  path="$BOOT_JDK"
10932  new_path=`$CYGPATH -u "$path"`
10933
10934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10937  # "foo.exe" is OK but "foo" is an error.
10938  #
10939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10940  # It is also a way to make sure we got the proper file name for the real test later on.
10941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10942  if test "x$test_shortpath" = x; then
10943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10945    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10946  fi
10947
10948  # Call helper function which possibly converts this using DOS-style short mode.
10949  # If so, the updated path is stored in $new_path.
10950
10951  input_path="$new_path"
10952  # Check if we need to convert this using DOS-style short mode. If the path
10953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10954  # take no chances and rewrite it.
10955  # Note: m4 eats our [], so we need to use [ and ] instead.
10956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10957  if test "x$has_forbidden_chars" != x; then
10958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10962      # Going to short mode and back again did indeed matter. Since short mode is
10963      # case insensitive, let's make it lowercase to improve readability.
10964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10965      # Now convert it back to Unix-stile (cygpath)
10966      input_path=`$CYGPATH -u "$shortmode_path"`
10967      new_path="$input_path"
10968    fi
10969  fi
10970
10971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10972  if test "x$test_cygdrive_prefix" = x; then
10973    # As a simple fix, exclude /usr/bin since it's not a real path.
10974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10976      # a path prefixed by /cygdrive for fixpath to work.
10977      new_path="$CYGWIN_ROOT_PATH$input_path"
10978    fi
10979  fi
10980
10981
10982  if test "x$path" != "x$new_path"; then
10983    BOOT_JDK="$new_path"
10984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10986  fi
10987
10988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10989
10990  path="$BOOT_JDK"
10991  has_colon=`$ECHO $path | $GREP ^.:`
10992  new_path="$path"
10993  if test "x$has_colon" = x; then
10994    # Not in mixed or Windows style, start by that.
10995    new_path=`cmd //c echo $path`
10996  fi
10997
10998
10999  input_path="$new_path"
11000  # Check if we need to convert this using DOS-style short mode. If the path
11001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11002  # take no chances and rewrite it.
11003  # Note: m4 eats our [], so we need to use [ and ] instead.
11004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11005  if test "x$has_forbidden_chars" != x; then
11006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11008  fi
11009
11010
11011  windows_path="$new_path"
11012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11013    unix_path=`$CYGPATH -u "$windows_path"`
11014    new_path="$unix_path"
11015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11017    new_path="$unix_path"
11018  fi
11019
11020  if test "x$path" != "x$new_path"; then
11021    BOOT_JDK="$new_path"
11022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11024  fi
11025
11026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11028
11029  else
11030    # We're on a posix platform. Hooray! :)
11031    path="$BOOT_JDK"
11032
11033    if test ! -f "$path" && test ! -d "$path"; then
11034      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11035    fi
11036
11037    has_space=`$ECHO "$path" | $GREP " "`
11038    if test "x$has_space" != x; then
11039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11040$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11041      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11042    fi
11043  fi
11044
11045              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11046$as_echo_n "checking for Boot JDK... " >&6; }
11047              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11048$as_echo "$BOOT_JDK" >&6; }
11049              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11050$as_echo_n "checking Boot JDK version... " >&6; }
11051              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11052              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11053$as_echo "$BOOT_JDK_VERSION" >&6; }
11054            fi # end check jdk version
11055          fi # end check rt.jar
11056        fi # end check javac
11057      fi # end check java
11058    fi # end check boot jdk found
11059  fi
11060
11061if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11062  # Having specified an argument which is incorrect will produce an instant failure;
11063  # we should not go on looking
11064  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11065fi
11066
11067# Test: Is bootjdk available from builddeps?
11068
11069  if test "x$BOOT_JDK_FOUND" = xno; then
11070    # Now execute the test
11071
11072
11073
11074    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11075        # Source the builddeps file again, to make sure it uses the latest variables!
11076        . $builddepsfile
11077        # Look for a target and build machine specific resource!
11078        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11079        if test "x$resource" = x; then
11080            # Ok, lets instead look for a target specific resource
11081            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11082        fi
11083        if test "x$resource" = x; then
11084            # Ok, lets instead look for a build specific resource
11085            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11086        fi
11087        if test "x$resource" = x; then
11088            # Ok, lets instead look for a generic resource
11089            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11090            resource=${builddep_bootjdk}
11091        fi
11092        if test "x$resource" != x; then
11093            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11094$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11095	    # If the resource in the builddeps.conf file is an existing directory,
11096	    # for example /java/linux/cups
11097	    if test -d ${resource}; then
11098	       depdir=${resource}
11099	    else
11100
11101# bootjdk is for example mymodule
11102# $resource is for example libs/general/libmymod_1_2_3.zip
11103# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11104# $with_builddeps_dir is for example /localhome/builddeps
11105# depdir is the name of the variable into which we store the depdir, eg MYMOD
11106# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11107# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11108    filename=`basename $resource`
11109    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11110    filebase=${filename%%.*}
11111    extension=${filename#*.}
11112    installdir=$with_builddeps_dir/$filebase
11113    if test ! -f $installdir/$filename.unpacked; then
11114        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11115$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11116        if test ! -d $installdir; then
11117            mkdir -p $installdir
11118        fi
11119        if test ! -d $installdir; then
11120            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11121        fi
11122        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11123        touch $tmpfile
11124        if test ! -f $tmpfile; then
11125            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11126        fi
11127
11128    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11129    # $tmpfile is the local file name for the downloaded file.
11130    VALID_TOOL=no
11131    if test "x$BDEPS_FTP" = xwget; then
11132       VALID_TOOL=yes
11133       wget -O $tmpfile $with_builddeps_server/$resource
11134    fi
11135    if test "x$BDEPS_FTP" = xlftp; then
11136       VALID_TOOL=yes
11137       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11138    fi
11139    if test "x$BDEPS_FTP" = xftp; then
11140        VALID_TOOL=yes
11141        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11142        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11143        FTPUSERPWD=${FTPSERVER%%@*}
11144        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11145            FTPUSER=${userpwd%%:*}
11146            FTPPWD=${userpwd#*@}
11147            FTPSERVER=${FTPSERVER#*@}
11148        else
11149            FTPUSER=ftp
11150            FTPPWD=ftp
11151        fi
11152        # the "pass" command does not work on some
11153        # ftp clients (read ftp.exe) but if it works,
11154        # passive mode is better!
11155        (\
11156            echo "user $FTPUSER $FTPPWD"        ;\
11157            echo "pass"                         ;\
11158            echo "bin"                          ;\
11159            echo "get $FTPPATH $tmpfile"              ;\
11160        ) | ftp -in $FTPSERVER
11161    fi
11162    if test "x$VALID_TOOL" != xyes; then
11163       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11164    fi
11165
11166        mv $tmpfile $installdir/$filename
11167        if test ! -s $installdir/$filename; then
11168            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11169        fi
11170        case "$extension" in
11171            zip)  echo "Unzipping $installdir/$filename..."
11172               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11173            ;;
11174            tar.gz) echo "Untaring $installdir/$filename..."
11175               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11176            ;;
11177            tgz) echo "Untaring $installdir/$filename..."
11178               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11179            ;;
11180            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11181            ;;
11182        esac
11183    fi
11184    if test -f $installdir/$filename.unpacked; then
11185        depdir=$installdir
11186    fi
11187
11188	    fi
11189            # Source the builddeps file again, because in the previous command, the depdir
11190            # was updated to point at the current build dependency install directory.
11191            . $builddepsfile
11192            # Now extract variables from the builddeps.conf files.
11193            theroot=${builddep_bootjdk_ROOT}
11194            thecflags=${builddep_bootjdk_CFLAGS}
11195            thelibs=${builddep_bootjdk_LIBS}
11196            if test "x$depdir" = x; then
11197                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11198            fi
11199            BOOT_JDK=$depdir
11200            if test "x$theroot" != x; then
11201               BOOT_JDK="$theroot"
11202            fi
11203            if test "x$thecflags" != x; then
11204               BOOT_JDK_CFLAGS="$thecflags"
11205            fi
11206            if test "x$thelibs" != x; then
11207               BOOT_JDK_LIBS="$thelibs"
11208            fi
11209            BOOT_JDK_FOUND=maybe
11210            else BOOT_JDK_FOUND=no
11211
11212        fi
11213        else BOOT_JDK_FOUND=no
11214
11215    fi
11216
11217
11218
11219    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11220    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11221      # Do we have a bin/java?
11222      if test ! -x "$BOOT_JDK/bin/java"; then
11223        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11225        BOOT_JDK_FOUND=no
11226      else
11227        # Do we have a bin/javac?
11228        if test ! -x "$BOOT_JDK/bin/javac"; then
11229          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11231          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11232$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11233          BOOT_JDK_FOUND=no
11234        else
11235          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11236          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11237            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11239            BOOT_JDK_FOUND=no
11240          else
11241            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11242            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11243
11244            # Extra M4 quote needed to protect [] in grep expression.
11245            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11246            if test "x$FOUND_VERSION_78" = x; then
11247              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11249              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11250$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11251              BOOT_JDK_FOUND=no
11252            else
11253              # We're done! :-)
11254              BOOT_JDK_FOUND=yes
11255
11256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11257
11258  # Input might be given as Windows format, start by converting to
11259  # unix format.
11260  path="$BOOT_JDK"
11261  new_path=`$CYGPATH -u "$path"`
11262
11263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11266  # "foo.exe" is OK but "foo" is an error.
11267  #
11268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11269  # It is also a way to make sure we got the proper file name for the real test later on.
11270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11271  if test "x$test_shortpath" = x; then
11272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11274    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11275  fi
11276
11277  # Call helper function which possibly converts this using DOS-style short mode.
11278  # If so, the updated path is stored in $new_path.
11279
11280  input_path="$new_path"
11281  # Check if we need to convert this using DOS-style short mode. If the path
11282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11283  # take no chances and rewrite it.
11284  # Note: m4 eats our [], so we need to use [ and ] instead.
11285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11286  if test "x$has_forbidden_chars" != x; then
11287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11291      # Going to short mode and back again did indeed matter. Since short mode is
11292      # case insensitive, let's make it lowercase to improve readability.
11293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11294      # Now convert it back to Unix-stile (cygpath)
11295      input_path=`$CYGPATH -u "$shortmode_path"`
11296      new_path="$input_path"
11297    fi
11298  fi
11299
11300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11301  if test "x$test_cygdrive_prefix" = x; then
11302    # As a simple fix, exclude /usr/bin since it's not a real path.
11303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11305      # a path prefixed by /cygdrive for fixpath to work.
11306      new_path="$CYGWIN_ROOT_PATH$input_path"
11307    fi
11308  fi
11309
11310
11311  if test "x$path" != "x$new_path"; then
11312    BOOT_JDK="$new_path"
11313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11315  fi
11316
11317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11318
11319  path="$BOOT_JDK"
11320  has_colon=`$ECHO $path | $GREP ^.:`
11321  new_path="$path"
11322  if test "x$has_colon" = x; then
11323    # Not in mixed or Windows style, start by that.
11324    new_path=`cmd //c echo $path`
11325  fi
11326
11327
11328  input_path="$new_path"
11329  # Check if we need to convert this using DOS-style short mode. If the path
11330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11331  # take no chances and rewrite it.
11332  # Note: m4 eats our [], so we need to use [ and ] instead.
11333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11334  if test "x$has_forbidden_chars" != x; then
11335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11337  fi
11338
11339
11340  windows_path="$new_path"
11341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11342    unix_path=`$CYGPATH -u "$windows_path"`
11343    new_path="$unix_path"
11344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11346    new_path="$unix_path"
11347  fi
11348
11349  if test "x$path" != "x$new_path"; then
11350    BOOT_JDK="$new_path"
11351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11353  fi
11354
11355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11357
11358  else
11359    # We're on a posix platform. Hooray! :)
11360    path="$BOOT_JDK"
11361
11362    if test ! -f "$path" && test ! -d "$path"; then
11363      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11364    fi
11365
11366    has_space=`$ECHO "$path" | $GREP " "`
11367    if test "x$has_space" != x; then
11368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11370      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11371    fi
11372  fi
11373
11374              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11375$as_echo_n "checking for Boot JDK... " >&6; }
11376              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11377$as_echo "$BOOT_JDK" >&6; }
11378              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11379$as_echo_n "checking Boot JDK version... " >&6; }
11380              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11381              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11382$as_echo "$BOOT_JDK_VERSION" >&6; }
11383            fi # end check jdk version
11384          fi # end check rt.jar
11385        fi # end check javac
11386      fi # end check java
11387    fi # end check boot jdk found
11388  fi
11389
11390
11391# Test: Is $JAVA_HOME set?
11392
11393  if test "x$BOOT_JDK_FOUND" = xno; then
11394    # Now execute the test
11395
11396    if test "x$JAVA_HOME" != x; then
11397        JAVA_HOME_PROCESSED="$JAVA_HOME"
11398
11399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11400
11401  # Input might be given as Windows format, start by converting to
11402  # unix format.
11403  path="$JAVA_HOME_PROCESSED"
11404  new_path=`$CYGPATH -u "$path"`
11405
11406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11409  # "foo.exe" is OK but "foo" is an error.
11410  #
11411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11412  # It is also a way to make sure we got the proper file name for the real test later on.
11413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11414  if test "x$test_shortpath" = x; then
11415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11416$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11417    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11418  fi
11419
11420  # Call helper function which possibly converts this using DOS-style short mode.
11421  # If so, the updated path is stored in $new_path.
11422
11423  input_path="$new_path"
11424  # Check if we need to convert this using DOS-style short mode. If the path
11425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11426  # take no chances and rewrite it.
11427  # Note: m4 eats our [], so we need to use [ and ] instead.
11428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11429  if test "x$has_forbidden_chars" != x; then
11430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11434      # Going to short mode and back again did indeed matter. Since short mode is
11435      # case insensitive, let's make it lowercase to improve readability.
11436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11437      # Now convert it back to Unix-stile (cygpath)
11438      input_path=`$CYGPATH -u "$shortmode_path"`
11439      new_path="$input_path"
11440    fi
11441  fi
11442
11443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11444  if test "x$test_cygdrive_prefix" = x; then
11445    # As a simple fix, exclude /usr/bin since it's not a real path.
11446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11448      # a path prefixed by /cygdrive for fixpath to work.
11449      new_path="$CYGWIN_ROOT_PATH$input_path"
11450    fi
11451  fi
11452
11453
11454  if test "x$path" != "x$new_path"; then
11455    JAVA_HOME_PROCESSED="$new_path"
11456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11457$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11458  fi
11459
11460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11461
11462  path="$JAVA_HOME_PROCESSED"
11463  has_colon=`$ECHO $path | $GREP ^.:`
11464  new_path="$path"
11465  if test "x$has_colon" = x; then
11466    # Not in mixed or Windows style, start by that.
11467    new_path=`cmd //c echo $path`
11468  fi
11469
11470
11471  input_path="$new_path"
11472  # Check if we need to convert this using DOS-style short mode. If the path
11473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11474  # take no chances and rewrite it.
11475  # Note: m4 eats our [], so we need to use [ and ] instead.
11476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11477  if test "x$has_forbidden_chars" != x; then
11478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11480  fi
11481
11482
11483  windows_path="$new_path"
11484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11485    unix_path=`$CYGPATH -u "$windows_path"`
11486    new_path="$unix_path"
11487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11489    new_path="$unix_path"
11490  fi
11491
11492  if test "x$path" != "x$new_path"; then
11493    JAVA_HOME_PROCESSED="$new_path"
11494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11495$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11496  fi
11497
11498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11500
11501  else
11502    # We're on a posix platform. Hooray! :)
11503    path="$JAVA_HOME_PROCESSED"
11504
11505    if test ! -f "$path" && test ! -d "$path"; then
11506      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11507    fi
11508
11509    has_space=`$ECHO "$path" | $GREP " "`
11510    if test "x$has_space" != x; then
11511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11512$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11513      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11514    fi
11515  fi
11516
11517        if test ! -d "$JAVA_HOME_PROCESSED"; then
11518            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11519$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11520        else
11521          # Aha, the user has set a JAVA_HOME
11522          # let us use that as the Boot JDK.
11523          BOOT_JDK="$JAVA_HOME_PROCESSED"
11524          BOOT_JDK_FOUND=maybe
11525          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11526$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11527        fi
11528    fi
11529
11530
11531    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11532    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11533      # Do we have a bin/java?
11534      if test ! -x "$BOOT_JDK/bin/java"; then
11535        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11537        BOOT_JDK_FOUND=no
11538      else
11539        # Do we have a bin/javac?
11540        if test ! -x "$BOOT_JDK/bin/javac"; then
11541          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11543          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11544$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11545          BOOT_JDK_FOUND=no
11546        else
11547          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11548          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11549            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11551            BOOT_JDK_FOUND=no
11552          else
11553            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11554            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11555
11556            # Extra M4 quote needed to protect [] in grep expression.
11557            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11558            if test "x$FOUND_VERSION_78" = x; then
11559              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11561              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11562$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11563              BOOT_JDK_FOUND=no
11564            else
11565              # We're done! :-)
11566              BOOT_JDK_FOUND=yes
11567
11568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11569
11570  # Input might be given as Windows format, start by converting to
11571  # unix format.
11572  path="$BOOT_JDK"
11573  new_path=`$CYGPATH -u "$path"`
11574
11575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11578  # "foo.exe" is OK but "foo" is an error.
11579  #
11580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11581  # It is also a way to make sure we got the proper file name for the real test later on.
11582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11583  if test "x$test_shortpath" = x; then
11584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11585$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11586    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11587  fi
11588
11589  # Call helper function which possibly converts this using DOS-style short mode.
11590  # If so, the updated path is stored in $new_path.
11591
11592  input_path="$new_path"
11593  # Check if we need to convert this using DOS-style short mode. If the path
11594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11595  # take no chances and rewrite it.
11596  # Note: m4 eats our [], so we need to use [ and ] instead.
11597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11598  if test "x$has_forbidden_chars" != x; then
11599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11603      # Going to short mode and back again did indeed matter. Since short mode is
11604      # case insensitive, let's make it lowercase to improve readability.
11605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11606      # Now convert it back to Unix-stile (cygpath)
11607      input_path=`$CYGPATH -u "$shortmode_path"`
11608      new_path="$input_path"
11609    fi
11610  fi
11611
11612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11613  if test "x$test_cygdrive_prefix" = x; then
11614    # As a simple fix, exclude /usr/bin since it's not a real path.
11615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11617      # a path prefixed by /cygdrive for fixpath to work.
11618      new_path="$CYGWIN_ROOT_PATH$input_path"
11619    fi
11620  fi
11621
11622
11623  if test "x$path" != "x$new_path"; then
11624    BOOT_JDK="$new_path"
11625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11627  fi
11628
11629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11630
11631  path="$BOOT_JDK"
11632  has_colon=`$ECHO $path | $GREP ^.:`
11633  new_path="$path"
11634  if test "x$has_colon" = x; then
11635    # Not in mixed or Windows style, start by that.
11636    new_path=`cmd //c echo $path`
11637  fi
11638
11639
11640  input_path="$new_path"
11641  # Check if we need to convert this using DOS-style short mode. If the path
11642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11643  # take no chances and rewrite it.
11644  # Note: m4 eats our [], so we need to use [ and ] instead.
11645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11646  if test "x$has_forbidden_chars" != x; then
11647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11649  fi
11650
11651
11652  windows_path="$new_path"
11653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11654    unix_path=`$CYGPATH -u "$windows_path"`
11655    new_path="$unix_path"
11656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11658    new_path="$unix_path"
11659  fi
11660
11661  if test "x$path" != "x$new_path"; then
11662    BOOT_JDK="$new_path"
11663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11664$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11665  fi
11666
11667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11669
11670  else
11671    # We're on a posix platform. Hooray! :)
11672    path="$BOOT_JDK"
11673
11674    if test ! -f "$path" && test ! -d "$path"; then
11675      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11676    fi
11677
11678    has_space=`$ECHO "$path" | $GREP " "`
11679    if test "x$has_space" != x; then
11680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11681$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11682      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11683    fi
11684  fi
11685
11686              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11687$as_echo_n "checking for Boot JDK... " >&6; }
11688              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11689$as_echo "$BOOT_JDK" >&6; }
11690              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11691$as_echo_n "checking Boot JDK version... " >&6; }
11692              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11693              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11694$as_echo "$BOOT_JDK_VERSION" >&6; }
11695            fi # end check jdk version
11696          fi # end check rt.jar
11697        fi # end check javac
11698      fi # end check java
11699    fi # end check boot jdk found
11700  fi
11701
11702
11703# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11704
11705  if test "x$BOOT_JDK_FOUND" = xno; then
11706    # Now execute the test
11707
11708    if test -x /usr/libexec/java_home; then
11709        BOOT_JDK=`/usr/libexec/java_home`
11710        BOOT_JDK_FOUND=maybe
11711        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11712$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11713    fi
11714
11715
11716    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11717    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11718      # Do we have a bin/java?
11719      if test ! -x "$BOOT_JDK/bin/java"; then
11720        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11722        BOOT_JDK_FOUND=no
11723      else
11724        # Do we have a bin/javac?
11725        if test ! -x "$BOOT_JDK/bin/javac"; then
11726          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11728          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11729$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11730          BOOT_JDK_FOUND=no
11731        else
11732          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11733          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11734            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11736            BOOT_JDK_FOUND=no
11737          else
11738            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11739            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11740
11741            # Extra M4 quote needed to protect [] in grep expression.
11742            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11743            if test "x$FOUND_VERSION_78" = x; then
11744              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11746              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11747$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11748              BOOT_JDK_FOUND=no
11749            else
11750              # We're done! :-)
11751              BOOT_JDK_FOUND=yes
11752
11753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11754
11755  # Input might be given as Windows format, start by converting to
11756  # unix format.
11757  path="$BOOT_JDK"
11758  new_path=`$CYGPATH -u "$path"`
11759
11760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11763  # "foo.exe" is OK but "foo" is an error.
11764  #
11765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11766  # It is also a way to make sure we got the proper file name for the real test later on.
11767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11768  if test "x$test_shortpath" = x; then
11769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11771    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11772  fi
11773
11774  # Call helper function which possibly converts this using DOS-style short mode.
11775  # If so, the updated path is stored in $new_path.
11776
11777  input_path="$new_path"
11778  # Check if we need to convert this using DOS-style short mode. If the path
11779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11780  # take no chances and rewrite it.
11781  # Note: m4 eats our [], so we need to use [ and ] instead.
11782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11783  if test "x$has_forbidden_chars" != x; then
11784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11788      # Going to short mode and back again did indeed matter. Since short mode is
11789      # case insensitive, let's make it lowercase to improve readability.
11790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11791      # Now convert it back to Unix-stile (cygpath)
11792      input_path=`$CYGPATH -u "$shortmode_path"`
11793      new_path="$input_path"
11794    fi
11795  fi
11796
11797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11798  if test "x$test_cygdrive_prefix" = x; then
11799    # As a simple fix, exclude /usr/bin since it's not a real path.
11800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11802      # a path prefixed by /cygdrive for fixpath to work.
11803      new_path="$CYGWIN_ROOT_PATH$input_path"
11804    fi
11805  fi
11806
11807
11808  if test "x$path" != "x$new_path"; then
11809    BOOT_JDK="$new_path"
11810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11812  fi
11813
11814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11815
11816  path="$BOOT_JDK"
11817  has_colon=`$ECHO $path | $GREP ^.:`
11818  new_path="$path"
11819  if test "x$has_colon" = x; then
11820    # Not in mixed or Windows style, start by that.
11821    new_path=`cmd //c echo $path`
11822  fi
11823
11824
11825  input_path="$new_path"
11826  # Check if we need to convert this using DOS-style short mode. If the path
11827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11828  # take no chances and rewrite it.
11829  # Note: m4 eats our [], so we need to use [ and ] instead.
11830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11831  if test "x$has_forbidden_chars" != x; then
11832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11834  fi
11835
11836
11837  windows_path="$new_path"
11838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11839    unix_path=`$CYGPATH -u "$windows_path"`
11840    new_path="$unix_path"
11841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11843    new_path="$unix_path"
11844  fi
11845
11846  if test "x$path" != "x$new_path"; then
11847    BOOT_JDK="$new_path"
11848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11849$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11850  fi
11851
11852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11854
11855  else
11856    # We're on a posix platform. Hooray! :)
11857    path="$BOOT_JDK"
11858
11859    if test ! -f "$path" && test ! -d "$path"; then
11860      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11861    fi
11862
11863    has_space=`$ECHO "$path" | $GREP " "`
11864    if test "x$has_space" != x; then
11865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11866$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11867      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11868    fi
11869  fi
11870
11871              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11872$as_echo_n "checking for Boot JDK... " >&6; }
11873              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11874$as_echo "$BOOT_JDK" >&6; }
11875              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11876$as_echo_n "checking Boot JDK version... " >&6; }
11877              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11878              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11879$as_echo "$BOOT_JDK_VERSION" >&6; }
11880            fi # end check jdk version
11881          fi # end check rt.jar
11882        fi # end check javac
11883      fi # end check java
11884    fi # end check boot jdk found
11885  fi
11886
11887
11888# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11889
11890  if test "x$BOOT_JDK_FOUND" = xno; then
11891    # Now execute the test
11892
11893    # Extract the first word of "javac", so it can be a program name with args.
11894set dummy javac; ac_word=$2
11895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11896$as_echo_n "checking for $ac_word... " >&6; }
11897if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11898  $as_echo_n "(cached) " >&6
11899else
11900  case $JAVAC_CHECK in
11901  [\\/]* | ?:[\\/]*)
11902  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11903  ;;
11904  *)
11905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11906for as_dir in $PATH
11907do
11908  IFS=$as_save_IFS
11909  test -z "$as_dir" && as_dir=.
11910    for ac_exec_ext in '' $ac_executable_extensions; do
11911  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11912    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11914    break 2
11915  fi
11916done
11917  done
11918IFS=$as_save_IFS
11919
11920  ;;
11921esac
11922fi
11923JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11924if test -n "$JAVAC_CHECK"; then
11925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11926$as_echo "$JAVAC_CHECK" >&6; }
11927else
11928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11929$as_echo "no" >&6; }
11930fi
11931
11932
11933    # Extract the first word of "java", so it can be a program name with args.
11934set dummy java; ac_word=$2
11935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11936$as_echo_n "checking for $ac_word... " >&6; }
11937if ${ac_cv_path_JAVA_CHECK+:} false; then :
11938  $as_echo_n "(cached) " >&6
11939else
11940  case $JAVA_CHECK in
11941  [\\/]* | ?:[\\/]*)
11942  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11943  ;;
11944  *)
11945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11946for as_dir in $PATH
11947do
11948  IFS=$as_save_IFS
11949  test -z "$as_dir" && as_dir=.
11950    for ac_exec_ext in '' $ac_executable_extensions; do
11951  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11952    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11954    break 2
11955  fi
11956done
11957  done
11958IFS=$as_save_IFS
11959
11960  ;;
11961esac
11962fi
11963JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11964if test -n "$JAVA_CHECK"; then
11965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11966$as_echo "$JAVA_CHECK" >&6; }
11967else
11968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11969$as_echo "no" >&6; }
11970fi
11971
11972
11973    BINARY="$JAVAC_CHECK"
11974    if test "x$JAVAC_CHECK" = x; then
11975        BINARY="$JAVA_CHECK"
11976    fi
11977    if test "x$BINARY" != x; then
11978        # So there is a java(c) binary, it might be part of a JDK.
11979        # Lets find the JDK/JRE directory by following symbolic links.
11980        # Linux/GNU systems often have links from /usr/bin/java to
11981        # /etc/alternatives/java to the real JDK binary.
11982
11983    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11984        # Follow a chain of symbolic links. Use readlink
11985        # where it exists, else fall back to horribly
11986        # complicated shell code.
11987        if test "x$READLINK_TESTED" != yes; then
11988            # On MacOSX there is a readlink tool with a different
11989            # purpose than the GNU readlink tool. Check the found readlink.
11990            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11991            if test "x$ISGNU" = x; then
11992                 # A readlink that we do not know how to use.
11993                 # Are there other non-GNU readlinks out there?
11994                 READLINK_TESTED=yes
11995                 READLINK=
11996            fi
11997        fi
11998
11999        if test "x$READLINK" != x; then
12000            BINARY=`$READLINK -f $BINARY`
12001        else
12002            # Save the current directory for restoring afterwards
12003            STARTDIR=$PWD
12004            COUNTER=0
12005            sym_link_dir=`$DIRNAME $BINARY`
12006            sym_link_file=`$BASENAME $BINARY`
12007            # Use the system pwd and not the shell builtin to resolve directory symlinks
12008            cd $sym_link_dir
12009            cd `$THEPWDCMD`
12010            sym_link_dir=`$THEPWDCMD`
12011            # Resolve file symlinks
12012            while test $COUNTER -lt 20; do
12013                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12014                if test "x$ISLINK" == x; then
12015                    # This is not a symbolic link! We are done!
12016                    break
12017                fi
12018                # Again resolve directory symlinks since the target of the just found
12019                # link could be in a different directory
12020                cd `$DIRNAME $ISLINK`
12021                sym_link_dir=`$THEPWDCMD`
12022                sym_link_file=`$BASENAME $ISLINK`
12023                let COUNTER=COUNTER+1
12024            done
12025            cd $STARTDIR
12026            BINARY=$sym_link_dir/$sym_link_file
12027        fi
12028    fi
12029
12030        BOOT_JDK=`dirname "$BINARY"`
12031        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12032        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12033            # Looks like we found ourselves an JDK
12034            BOOT_JDK_FOUND=maybe
12035            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12036$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12037        fi
12038    fi
12039
12040
12041    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12042    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12043      # Do we have a bin/java?
12044      if test ! -x "$BOOT_JDK/bin/java"; then
12045        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12047        BOOT_JDK_FOUND=no
12048      else
12049        # Do we have a bin/javac?
12050        if test ! -x "$BOOT_JDK/bin/javac"; then
12051          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12053          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12054$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12055          BOOT_JDK_FOUND=no
12056        else
12057          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12058          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12059            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12061            BOOT_JDK_FOUND=no
12062          else
12063            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12064            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12065
12066            # Extra M4 quote needed to protect [] in grep expression.
12067            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12068            if test "x$FOUND_VERSION_78" = x; then
12069              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12071              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12072$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12073              BOOT_JDK_FOUND=no
12074            else
12075              # We're done! :-)
12076              BOOT_JDK_FOUND=yes
12077
12078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12079
12080  # Input might be given as Windows format, start by converting to
12081  # unix format.
12082  path="$BOOT_JDK"
12083  new_path=`$CYGPATH -u "$path"`
12084
12085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12088  # "foo.exe" is OK but "foo" is an error.
12089  #
12090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12091  # It is also a way to make sure we got the proper file name for the real test later on.
12092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12093  if test "x$test_shortpath" = x; then
12094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12095$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12096    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12097  fi
12098
12099  # Call helper function which possibly converts this using DOS-style short mode.
12100  # If so, the updated path is stored in $new_path.
12101
12102  input_path="$new_path"
12103  # Check if we need to convert this using DOS-style short mode. If the path
12104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12105  # take no chances and rewrite it.
12106  # Note: m4 eats our [], so we need to use [ and ] instead.
12107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12108  if test "x$has_forbidden_chars" != x; then
12109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12113      # Going to short mode and back again did indeed matter. Since short mode is
12114      # case insensitive, let's make it lowercase to improve readability.
12115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12116      # Now convert it back to Unix-stile (cygpath)
12117      input_path=`$CYGPATH -u "$shortmode_path"`
12118      new_path="$input_path"
12119    fi
12120  fi
12121
12122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12123  if test "x$test_cygdrive_prefix" = x; then
12124    # As a simple fix, exclude /usr/bin since it's not a real path.
12125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12127      # a path prefixed by /cygdrive for fixpath to work.
12128      new_path="$CYGWIN_ROOT_PATH$input_path"
12129    fi
12130  fi
12131
12132
12133  if test "x$path" != "x$new_path"; then
12134    BOOT_JDK="$new_path"
12135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12136$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12137  fi
12138
12139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12140
12141  path="$BOOT_JDK"
12142  has_colon=`$ECHO $path | $GREP ^.:`
12143  new_path="$path"
12144  if test "x$has_colon" = x; then
12145    # Not in mixed or Windows style, start by that.
12146    new_path=`cmd //c echo $path`
12147  fi
12148
12149
12150  input_path="$new_path"
12151  # Check if we need to convert this using DOS-style short mode. If the path
12152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12153  # take no chances and rewrite it.
12154  # Note: m4 eats our [], so we need to use [ and ] instead.
12155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12156  if test "x$has_forbidden_chars" != x; then
12157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12159  fi
12160
12161
12162  windows_path="$new_path"
12163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12164    unix_path=`$CYGPATH -u "$windows_path"`
12165    new_path="$unix_path"
12166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12168    new_path="$unix_path"
12169  fi
12170
12171  if test "x$path" != "x$new_path"; then
12172    BOOT_JDK="$new_path"
12173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12174$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12175  fi
12176
12177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12179
12180  else
12181    # We're on a posix platform. Hooray! :)
12182    path="$BOOT_JDK"
12183
12184    if test ! -f "$path" && test ! -d "$path"; then
12185      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12186    fi
12187
12188    has_space=`$ECHO "$path" | $GREP " "`
12189    if test "x$has_space" != x; then
12190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12192      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12193    fi
12194  fi
12195
12196              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12197$as_echo_n "checking for Boot JDK... " >&6; }
12198              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12199$as_echo "$BOOT_JDK" >&6; }
12200              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12201$as_echo_n "checking Boot JDK version... " >&6; }
12202              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12203              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12204$as_echo "$BOOT_JDK_VERSION" >&6; }
12205            fi # end check jdk version
12206          fi # end check rt.jar
12207        fi # end check javac
12208      fi # end check java
12209    fi # end check boot jdk found
12210  fi
12211
12212
12213# Test: Is there a JDK installed in default, well-known locations?
12214
12215  if test "x$BOOT_JDK_FOUND" = xno; then
12216    # Now execute the test
12217
12218  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12219
12220  if test "x$BOOT_JDK_FOUND" = xno; then
12221    # Now execute the test
12222
12223  if test "x$ProgramW6432" != x; then
12224    VIRTUAL_DIR="$ProgramW6432/Java"
12225
12226  windows_path="$VIRTUAL_DIR"
12227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12228    unix_path=`$CYGPATH -u "$windows_path"`
12229    VIRTUAL_DIR="$unix_path"
12230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12232    VIRTUAL_DIR="$unix_path"
12233  fi
12234
12235
12236  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12237  BOOT_JDK_SUFFIX=""
12238  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12239  if test "x$ALL_JDKS_FOUND" != x; then
12240    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12241
12242  if test "x$BOOT_JDK_FOUND" = xno; then
12243    # Now execute the test
12244
12245        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12246        if test -d "$BOOT_JDK"; then
12247          BOOT_JDK_FOUND=maybe
12248          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12249$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12250        fi
12251
12252
12253    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12254    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12255      # Do we have a bin/java?
12256      if test ! -x "$BOOT_JDK/bin/java"; then
12257        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12259        BOOT_JDK_FOUND=no
12260      else
12261        # Do we have a bin/javac?
12262        if test ! -x "$BOOT_JDK/bin/javac"; then
12263          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12265          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12266$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12267          BOOT_JDK_FOUND=no
12268        else
12269          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12270          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12271            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12273            BOOT_JDK_FOUND=no
12274          else
12275            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12276            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12277
12278            # Extra M4 quote needed to protect [] in grep expression.
12279            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12280            if test "x$FOUND_VERSION_78" = x; then
12281              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12283              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12284$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12285              BOOT_JDK_FOUND=no
12286            else
12287              # We're done! :-)
12288              BOOT_JDK_FOUND=yes
12289
12290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12291
12292  # Input might be given as Windows format, start by converting to
12293  # unix format.
12294  path="$BOOT_JDK"
12295  new_path=`$CYGPATH -u "$path"`
12296
12297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12300  # "foo.exe" is OK but "foo" is an error.
12301  #
12302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12303  # It is also a way to make sure we got the proper file name for the real test later on.
12304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12305  if test "x$test_shortpath" = x; then
12306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12308    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12309  fi
12310
12311  # Call helper function which possibly converts this using DOS-style short mode.
12312  # If so, the updated path is stored in $new_path.
12313
12314  input_path="$new_path"
12315  # Check if we need to convert this using DOS-style short mode. If the path
12316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12317  # take no chances and rewrite it.
12318  # Note: m4 eats our [], so we need to use [ and ] instead.
12319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12320  if test "x$has_forbidden_chars" != x; then
12321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12325      # Going to short mode and back again did indeed matter. Since short mode is
12326      # case insensitive, let's make it lowercase to improve readability.
12327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12328      # Now convert it back to Unix-stile (cygpath)
12329      input_path=`$CYGPATH -u "$shortmode_path"`
12330      new_path="$input_path"
12331    fi
12332  fi
12333
12334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12335  if test "x$test_cygdrive_prefix" = x; then
12336    # As a simple fix, exclude /usr/bin since it's not a real path.
12337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12339      # a path prefixed by /cygdrive for fixpath to work.
12340      new_path="$CYGWIN_ROOT_PATH$input_path"
12341    fi
12342  fi
12343
12344
12345  if test "x$path" != "x$new_path"; then
12346    BOOT_JDK="$new_path"
12347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12349  fi
12350
12351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12352
12353  path="$BOOT_JDK"
12354  has_colon=`$ECHO $path | $GREP ^.:`
12355  new_path="$path"
12356  if test "x$has_colon" = x; then
12357    # Not in mixed or Windows style, start by that.
12358    new_path=`cmd //c echo $path`
12359  fi
12360
12361
12362  input_path="$new_path"
12363  # Check if we need to convert this using DOS-style short mode. If the path
12364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12365  # take no chances and rewrite it.
12366  # Note: m4 eats our [], so we need to use [ and ] instead.
12367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12368  if test "x$has_forbidden_chars" != x; then
12369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12371  fi
12372
12373
12374  windows_path="$new_path"
12375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12376    unix_path=`$CYGPATH -u "$windows_path"`
12377    new_path="$unix_path"
12378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12380    new_path="$unix_path"
12381  fi
12382
12383  if test "x$path" != "x$new_path"; then
12384    BOOT_JDK="$new_path"
12385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12386$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12387  fi
12388
12389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12391
12392  else
12393    # We're on a posix platform. Hooray! :)
12394    path="$BOOT_JDK"
12395
12396    if test ! -f "$path" && test ! -d "$path"; then
12397      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12398    fi
12399
12400    has_space=`$ECHO "$path" | $GREP " "`
12401    if test "x$has_space" != x; then
12402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12403$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12404      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12405    fi
12406  fi
12407
12408              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12409$as_echo_n "checking for Boot JDK... " >&6; }
12410              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12411$as_echo "$BOOT_JDK" >&6; }
12412              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12413$as_echo_n "checking Boot JDK version... " >&6; }
12414              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12415              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12416$as_echo "$BOOT_JDK_VERSION" >&6; }
12417            fi # end check jdk version
12418          fi # end check rt.jar
12419        fi # end check javac
12420      fi # end check java
12421    fi # end check boot jdk found
12422  fi
12423
12424    done
12425  fi
12426
12427  fi
12428
12429
12430    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12431    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12432      # Do we have a bin/java?
12433      if test ! -x "$BOOT_JDK/bin/java"; then
12434        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12436        BOOT_JDK_FOUND=no
12437      else
12438        # Do we have a bin/javac?
12439        if test ! -x "$BOOT_JDK/bin/javac"; then
12440          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12442          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12443$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12444          BOOT_JDK_FOUND=no
12445        else
12446          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12447          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12448            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12450            BOOT_JDK_FOUND=no
12451          else
12452            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12453            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12454
12455            # Extra M4 quote needed to protect [] in grep expression.
12456            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12457            if test "x$FOUND_VERSION_78" = x; then
12458              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12460              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12461$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12462              BOOT_JDK_FOUND=no
12463            else
12464              # We're done! :-)
12465              BOOT_JDK_FOUND=yes
12466
12467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12468
12469  # Input might be given as Windows format, start by converting to
12470  # unix format.
12471  path="$BOOT_JDK"
12472  new_path=`$CYGPATH -u "$path"`
12473
12474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12477  # "foo.exe" is OK but "foo" is an error.
12478  #
12479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12480  # It is also a way to make sure we got the proper file name for the real test later on.
12481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12482  if test "x$test_shortpath" = x; then
12483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12484$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12485    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12486  fi
12487
12488  # Call helper function which possibly converts this using DOS-style short mode.
12489  # If so, the updated path is stored in $new_path.
12490
12491  input_path="$new_path"
12492  # Check if we need to convert this using DOS-style short mode. If the path
12493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12494  # take no chances and rewrite it.
12495  # Note: m4 eats our [], so we need to use [ and ] instead.
12496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12497  if test "x$has_forbidden_chars" != x; then
12498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12502      # Going to short mode and back again did indeed matter. Since short mode is
12503      # case insensitive, let's make it lowercase to improve readability.
12504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12505      # Now convert it back to Unix-stile (cygpath)
12506      input_path=`$CYGPATH -u "$shortmode_path"`
12507      new_path="$input_path"
12508    fi
12509  fi
12510
12511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12512  if test "x$test_cygdrive_prefix" = x; then
12513    # As a simple fix, exclude /usr/bin since it's not a real path.
12514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12516      # a path prefixed by /cygdrive for fixpath to work.
12517      new_path="$CYGWIN_ROOT_PATH$input_path"
12518    fi
12519  fi
12520
12521
12522  if test "x$path" != "x$new_path"; then
12523    BOOT_JDK="$new_path"
12524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12525$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12526  fi
12527
12528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12529
12530  path="$BOOT_JDK"
12531  has_colon=`$ECHO $path | $GREP ^.:`
12532  new_path="$path"
12533  if test "x$has_colon" = x; then
12534    # Not in mixed or Windows style, start by that.
12535    new_path=`cmd //c echo $path`
12536  fi
12537
12538
12539  input_path="$new_path"
12540  # Check if we need to convert this using DOS-style short mode. If the path
12541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12542  # take no chances and rewrite it.
12543  # Note: m4 eats our [], so we need to use [ and ] instead.
12544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12545  if test "x$has_forbidden_chars" != x; then
12546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12548  fi
12549
12550
12551  windows_path="$new_path"
12552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12553    unix_path=`$CYGPATH -u "$windows_path"`
12554    new_path="$unix_path"
12555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12557    new_path="$unix_path"
12558  fi
12559
12560  if test "x$path" != "x$new_path"; then
12561    BOOT_JDK="$new_path"
12562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12563$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12564  fi
12565
12566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12568
12569  else
12570    # We're on a posix platform. Hooray! :)
12571    path="$BOOT_JDK"
12572
12573    if test ! -f "$path" && test ! -d "$path"; then
12574      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12575    fi
12576
12577    has_space=`$ECHO "$path" | $GREP " "`
12578    if test "x$has_space" != x; then
12579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12580$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12581      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12582    fi
12583  fi
12584
12585              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12586$as_echo_n "checking for Boot JDK... " >&6; }
12587              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12588$as_echo "$BOOT_JDK" >&6; }
12589              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12590$as_echo_n "checking Boot JDK version... " >&6; }
12591              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12592              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12593$as_echo "$BOOT_JDK_VERSION" >&6; }
12594            fi # end check jdk version
12595          fi # end check rt.jar
12596        fi # end check javac
12597      fi # end check java
12598    fi # end check boot jdk found
12599  fi
12600
12601
12602  if test "x$BOOT_JDK_FOUND" = xno; then
12603    # Now execute the test
12604
12605  if test "x$PROGRAMW6432" != x; then
12606    VIRTUAL_DIR="$PROGRAMW6432/Java"
12607
12608  windows_path="$VIRTUAL_DIR"
12609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12610    unix_path=`$CYGPATH -u "$windows_path"`
12611    VIRTUAL_DIR="$unix_path"
12612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12614    VIRTUAL_DIR="$unix_path"
12615  fi
12616
12617
12618  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12619  BOOT_JDK_SUFFIX=""
12620  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12621  if test "x$ALL_JDKS_FOUND" != x; then
12622    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12623
12624  if test "x$BOOT_JDK_FOUND" = xno; then
12625    # Now execute the test
12626
12627        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12628        if test -d "$BOOT_JDK"; then
12629          BOOT_JDK_FOUND=maybe
12630          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12631$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12632        fi
12633
12634
12635    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12636    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12637      # Do we have a bin/java?
12638      if test ! -x "$BOOT_JDK/bin/java"; then
12639        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12641        BOOT_JDK_FOUND=no
12642      else
12643        # Do we have a bin/javac?
12644        if test ! -x "$BOOT_JDK/bin/javac"; then
12645          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12647          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12648$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12649          BOOT_JDK_FOUND=no
12650        else
12651          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12652          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12653            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12655            BOOT_JDK_FOUND=no
12656          else
12657            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12658            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12659
12660            # Extra M4 quote needed to protect [] in grep expression.
12661            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12662            if test "x$FOUND_VERSION_78" = x; then
12663              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12665              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12666$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12667              BOOT_JDK_FOUND=no
12668            else
12669              # We're done! :-)
12670              BOOT_JDK_FOUND=yes
12671
12672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12673
12674  # Input might be given as Windows format, start by converting to
12675  # unix format.
12676  path="$BOOT_JDK"
12677  new_path=`$CYGPATH -u "$path"`
12678
12679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12682  # "foo.exe" is OK but "foo" is an error.
12683  #
12684  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12685  # It is also a way to make sure we got the proper file name for the real test later on.
12686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12687  if test "x$test_shortpath" = x; then
12688    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12689$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12690    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12691  fi
12692
12693  # Call helper function which possibly converts this using DOS-style short mode.
12694  # If so, the updated path is stored in $new_path.
12695
12696  input_path="$new_path"
12697  # Check if we need to convert this using DOS-style short mode. If the path
12698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12699  # take no chances and rewrite it.
12700  # Note: m4 eats our [], so we need to use [ and ] instead.
12701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12702  if test "x$has_forbidden_chars" != x; then
12703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12707      # Going to short mode and back again did indeed matter. Since short mode is
12708      # case insensitive, let's make it lowercase to improve readability.
12709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12710      # Now convert it back to Unix-stile (cygpath)
12711      input_path=`$CYGPATH -u "$shortmode_path"`
12712      new_path="$input_path"
12713    fi
12714  fi
12715
12716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12717  if test "x$test_cygdrive_prefix" = x; then
12718    # As a simple fix, exclude /usr/bin since it's not a real path.
12719    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12721      # a path prefixed by /cygdrive for fixpath to work.
12722      new_path="$CYGWIN_ROOT_PATH$input_path"
12723    fi
12724  fi
12725
12726
12727  if test "x$path" != "x$new_path"; then
12728    BOOT_JDK="$new_path"
12729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12730$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12731  fi
12732
12733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12734
12735  path="$BOOT_JDK"
12736  has_colon=`$ECHO $path | $GREP ^.:`
12737  new_path="$path"
12738  if test "x$has_colon" = x; then
12739    # Not in mixed or Windows style, start by that.
12740    new_path=`cmd //c echo $path`
12741  fi
12742
12743
12744  input_path="$new_path"
12745  # Check if we need to convert this using DOS-style short mode. If the path
12746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12747  # take no chances and rewrite it.
12748  # Note: m4 eats our [], so we need to use [ and ] instead.
12749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12750  if test "x$has_forbidden_chars" != x; then
12751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12753  fi
12754
12755
12756  windows_path="$new_path"
12757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12758    unix_path=`$CYGPATH -u "$windows_path"`
12759    new_path="$unix_path"
12760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12762    new_path="$unix_path"
12763  fi
12764
12765  if test "x$path" != "x$new_path"; then
12766    BOOT_JDK="$new_path"
12767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12768$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12769  fi
12770
12771  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12772  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12773
12774  else
12775    # We're on a posix platform. Hooray! :)
12776    path="$BOOT_JDK"
12777
12778    if test ! -f "$path" && test ! -d "$path"; then
12779      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12780    fi
12781
12782    has_space=`$ECHO "$path" | $GREP " "`
12783    if test "x$has_space" != x; then
12784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12785$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12786      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12787    fi
12788  fi
12789
12790              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12791$as_echo_n "checking for Boot JDK... " >&6; }
12792              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12793$as_echo "$BOOT_JDK" >&6; }
12794              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12795$as_echo_n "checking Boot JDK version... " >&6; }
12796              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12797              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12798$as_echo "$BOOT_JDK_VERSION" >&6; }
12799            fi # end check jdk version
12800          fi # end check rt.jar
12801        fi # end check javac
12802      fi # end check java
12803    fi # end check boot jdk found
12804  fi
12805
12806    done
12807  fi
12808
12809  fi
12810
12811
12812    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12813    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12814      # Do we have a bin/java?
12815      if test ! -x "$BOOT_JDK/bin/java"; then
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12818        BOOT_JDK_FOUND=no
12819      else
12820        # Do we have a bin/javac?
12821        if test ! -x "$BOOT_JDK/bin/javac"; then
12822          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12824          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12825$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12826          BOOT_JDK_FOUND=no
12827        else
12828          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12829          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12830            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12832            BOOT_JDK_FOUND=no
12833          else
12834            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12835            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12836
12837            # Extra M4 quote needed to protect [] in grep expression.
12838            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12839            if test "x$FOUND_VERSION_78" = x; then
12840              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12842              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12843$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12844              BOOT_JDK_FOUND=no
12845            else
12846              # We're done! :-)
12847              BOOT_JDK_FOUND=yes
12848
12849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12850
12851  # Input might be given as Windows format, start by converting to
12852  # unix format.
12853  path="$BOOT_JDK"
12854  new_path=`$CYGPATH -u "$path"`
12855
12856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12859  # "foo.exe" is OK but "foo" is an error.
12860  #
12861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12862  # It is also a way to make sure we got the proper file name for the real test later on.
12863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12864  if test "x$test_shortpath" = x; then
12865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12866$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12867    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12868  fi
12869
12870  # Call helper function which possibly converts this using DOS-style short mode.
12871  # If so, the updated path is stored in $new_path.
12872
12873  input_path="$new_path"
12874  # Check if we need to convert this using DOS-style short mode. If the path
12875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12876  # take no chances and rewrite it.
12877  # Note: m4 eats our [], so we need to use [ and ] instead.
12878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12879  if test "x$has_forbidden_chars" != x; then
12880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12884      # Going to short mode and back again did indeed matter. Since short mode is
12885      # case insensitive, let's make it lowercase to improve readability.
12886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12887      # Now convert it back to Unix-stile (cygpath)
12888      input_path=`$CYGPATH -u "$shortmode_path"`
12889      new_path="$input_path"
12890    fi
12891  fi
12892
12893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12894  if test "x$test_cygdrive_prefix" = x; then
12895    # As a simple fix, exclude /usr/bin since it's not a real path.
12896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12898      # a path prefixed by /cygdrive for fixpath to work.
12899      new_path="$CYGWIN_ROOT_PATH$input_path"
12900    fi
12901  fi
12902
12903
12904  if test "x$path" != "x$new_path"; then
12905    BOOT_JDK="$new_path"
12906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12908  fi
12909
12910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12911
12912  path="$BOOT_JDK"
12913  has_colon=`$ECHO $path | $GREP ^.:`
12914  new_path="$path"
12915  if test "x$has_colon" = x; then
12916    # Not in mixed or Windows style, start by that.
12917    new_path=`cmd //c echo $path`
12918  fi
12919
12920
12921  input_path="$new_path"
12922  # Check if we need to convert this using DOS-style short mode. If the path
12923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12924  # take no chances and rewrite it.
12925  # Note: m4 eats our [], so we need to use [ and ] instead.
12926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12927  if test "x$has_forbidden_chars" != x; then
12928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12930  fi
12931
12932
12933  windows_path="$new_path"
12934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12935    unix_path=`$CYGPATH -u "$windows_path"`
12936    new_path="$unix_path"
12937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12939    new_path="$unix_path"
12940  fi
12941
12942  if test "x$path" != "x$new_path"; then
12943    BOOT_JDK="$new_path"
12944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12945$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12946  fi
12947
12948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12950
12951  else
12952    # We're on a posix platform. Hooray! :)
12953    path="$BOOT_JDK"
12954
12955    if test ! -f "$path" && test ! -d "$path"; then
12956      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12957    fi
12958
12959    has_space=`$ECHO "$path" | $GREP " "`
12960    if test "x$has_space" != x; then
12961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12962$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12963      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12964    fi
12965  fi
12966
12967              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12968$as_echo_n "checking for Boot JDK... " >&6; }
12969              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12970$as_echo "$BOOT_JDK" >&6; }
12971              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12972$as_echo_n "checking Boot JDK version... " >&6; }
12973              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12974              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12975$as_echo "$BOOT_JDK_VERSION" >&6; }
12976            fi # end check jdk version
12977          fi # end check rt.jar
12978        fi # end check javac
12979      fi # end check java
12980    fi # end check boot jdk found
12981  fi
12982
12983
12984  if test "x$BOOT_JDK_FOUND" = xno; then
12985    # Now execute the test
12986
12987  if test "x$PROGRAMFILES" != x; then
12988    VIRTUAL_DIR="$PROGRAMFILES/Java"
12989
12990  windows_path="$VIRTUAL_DIR"
12991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12992    unix_path=`$CYGPATH -u "$windows_path"`
12993    VIRTUAL_DIR="$unix_path"
12994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12996    VIRTUAL_DIR="$unix_path"
12997  fi
12998
12999
13000  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13001  BOOT_JDK_SUFFIX=""
13002  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13003  if test "x$ALL_JDKS_FOUND" != x; then
13004    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13005
13006  if test "x$BOOT_JDK_FOUND" = xno; then
13007    # Now execute the test
13008
13009        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13010        if test -d "$BOOT_JDK"; then
13011          BOOT_JDK_FOUND=maybe
13012          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13013$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13014        fi
13015
13016
13017    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13018    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13019      # Do we have a bin/java?
13020      if test ! -x "$BOOT_JDK/bin/java"; then
13021        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13023        BOOT_JDK_FOUND=no
13024      else
13025        # Do we have a bin/javac?
13026        if test ! -x "$BOOT_JDK/bin/javac"; then
13027          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13029          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13030$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13031          BOOT_JDK_FOUND=no
13032        else
13033          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13034          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13035            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13037            BOOT_JDK_FOUND=no
13038          else
13039            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13040            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13041
13042            # Extra M4 quote needed to protect [] in grep expression.
13043            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13044            if test "x$FOUND_VERSION_78" = x; then
13045              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13047              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13048$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13049              BOOT_JDK_FOUND=no
13050            else
13051              # We're done! :-)
13052              BOOT_JDK_FOUND=yes
13053
13054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13055
13056  # Input might be given as Windows format, start by converting to
13057  # unix format.
13058  path="$BOOT_JDK"
13059  new_path=`$CYGPATH -u "$path"`
13060
13061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13064  # "foo.exe" is OK but "foo" is an error.
13065  #
13066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13067  # It is also a way to make sure we got the proper file name for the real test later on.
13068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13069  if test "x$test_shortpath" = x; then
13070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13071$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13072    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13073  fi
13074
13075  # Call helper function which possibly converts this using DOS-style short mode.
13076  # If so, the updated path is stored in $new_path.
13077
13078  input_path="$new_path"
13079  # Check if we need to convert this using DOS-style short mode. If the path
13080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13081  # take no chances and rewrite it.
13082  # Note: m4 eats our [], so we need to use [ and ] instead.
13083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13084  if test "x$has_forbidden_chars" != x; then
13085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13089      # Going to short mode and back again did indeed matter. Since short mode is
13090      # case insensitive, let's make it lowercase to improve readability.
13091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13092      # Now convert it back to Unix-stile (cygpath)
13093      input_path=`$CYGPATH -u "$shortmode_path"`
13094      new_path="$input_path"
13095    fi
13096  fi
13097
13098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13099  if test "x$test_cygdrive_prefix" = x; then
13100    # As a simple fix, exclude /usr/bin since it's not a real path.
13101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13103      # a path prefixed by /cygdrive for fixpath to work.
13104      new_path="$CYGWIN_ROOT_PATH$input_path"
13105    fi
13106  fi
13107
13108
13109  if test "x$path" != "x$new_path"; then
13110    BOOT_JDK="$new_path"
13111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13113  fi
13114
13115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13116
13117  path="$BOOT_JDK"
13118  has_colon=`$ECHO $path | $GREP ^.:`
13119  new_path="$path"
13120  if test "x$has_colon" = x; then
13121    # Not in mixed or Windows style, start by that.
13122    new_path=`cmd //c echo $path`
13123  fi
13124
13125
13126  input_path="$new_path"
13127  # Check if we need to convert this using DOS-style short mode. If the path
13128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13129  # take no chances and rewrite it.
13130  # Note: m4 eats our [], so we need to use [ and ] instead.
13131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13132  if test "x$has_forbidden_chars" != x; then
13133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13135  fi
13136
13137
13138  windows_path="$new_path"
13139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13140    unix_path=`$CYGPATH -u "$windows_path"`
13141    new_path="$unix_path"
13142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13144    new_path="$unix_path"
13145  fi
13146
13147  if test "x$path" != "x$new_path"; then
13148    BOOT_JDK="$new_path"
13149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13150$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13151  fi
13152
13153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13155
13156  else
13157    # We're on a posix platform. Hooray! :)
13158    path="$BOOT_JDK"
13159
13160    if test ! -f "$path" && test ! -d "$path"; then
13161      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13162    fi
13163
13164    has_space=`$ECHO "$path" | $GREP " "`
13165    if test "x$has_space" != x; then
13166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13167$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13168      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13169    fi
13170  fi
13171
13172              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13173$as_echo_n "checking for Boot JDK... " >&6; }
13174              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13175$as_echo "$BOOT_JDK" >&6; }
13176              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13177$as_echo_n "checking Boot JDK version... " >&6; }
13178              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13179              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13180$as_echo "$BOOT_JDK_VERSION" >&6; }
13181            fi # end check jdk version
13182          fi # end check rt.jar
13183        fi # end check javac
13184      fi # end check java
13185    fi # end check boot jdk found
13186  fi
13187
13188    done
13189  fi
13190
13191  fi
13192
13193
13194    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13195    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13196      # Do we have a bin/java?
13197      if test ! -x "$BOOT_JDK/bin/java"; then
13198        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13200        BOOT_JDK_FOUND=no
13201      else
13202        # Do we have a bin/javac?
13203        if test ! -x "$BOOT_JDK/bin/javac"; then
13204          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13206          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13207$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13208          BOOT_JDK_FOUND=no
13209        else
13210          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13211          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13212            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13214            BOOT_JDK_FOUND=no
13215          else
13216            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13217            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13218
13219            # Extra M4 quote needed to protect [] in grep expression.
13220            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13221            if test "x$FOUND_VERSION_78" = x; then
13222              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13224              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13225$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13226              BOOT_JDK_FOUND=no
13227            else
13228              # We're done! :-)
13229              BOOT_JDK_FOUND=yes
13230
13231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13232
13233  # Input might be given as Windows format, start by converting to
13234  # unix format.
13235  path="$BOOT_JDK"
13236  new_path=`$CYGPATH -u "$path"`
13237
13238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13241  # "foo.exe" is OK but "foo" is an error.
13242  #
13243  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13244  # It is also a way to make sure we got the proper file name for the real test later on.
13245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13246  if test "x$test_shortpath" = x; then
13247    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13248$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13249    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13250  fi
13251
13252  # Call helper function which possibly converts this using DOS-style short mode.
13253  # If so, the updated path is stored in $new_path.
13254
13255  input_path="$new_path"
13256  # Check if we need to convert this using DOS-style short mode. If the path
13257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13258  # take no chances and rewrite it.
13259  # Note: m4 eats our [], so we need to use [ and ] instead.
13260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13261  if test "x$has_forbidden_chars" != x; then
13262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13266      # Going to short mode and back again did indeed matter. Since short mode is
13267      # case insensitive, let's make it lowercase to improve readability.
13268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13269      # Now convert it back to Unix-stile (cygpath)
13270      input_path=`$CYGPATH -u "$shortmode_path"`
13271      new_path="$input_path"
13272    fi
13273  fi
13274
13275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13276  if test "x$test_cygdrive_prefix" = x; then
13277    # As a simple fix, exclude /usr/bin since it's not a real path.
13278    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13280      # a path prefixed by /cygdrive for fixpath to work.
13281      new_path="$CYGWIN_ROOT_PATH$input_path"
13282    fi
13283  fi
13284
13285
13286  if test "x$path" != "x$new_path"; then
13287    BOOT_JDK="$new_path"
13288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13289$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13290  fi
13291
13292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13293
13294  path="$BOOT_JDK"
13295  has_colon=`$ECHO $path | $GREP ^.:`
13296  new_path="$path"
13297  if test "x$has_colon" = x; then
13298    # Not in mixed or Windows style, start by that.
13299    new_path=`cmd //c echo $path`
13300  fi
13301
13302
13303  input_path="$new_path"
13304  # Check if we need to convert this using DOS-style short mode. If the path
13305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13306  # take no chances and rewrite it.
13307  # Note: m4 eats our [], so we need to use [ and ] instead.
13308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13309  if test "x$has_forbidden_chars" != x; then
13310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13312  fi
13313
13314
13315  windows_path="$new_path"
13316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13317    unix_path=`$CYGPATH -u "$windows_path"`
13318    new_path="$unix_path"
13319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13321    new_path="$unix_path"
13322  fi
13323
13324  if test "x$path" != "x$new_path"; then
13325    BOOT_JDK="$new_path"
13326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13327$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13328  fi
13329
13330  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13331  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13332
13333  else
13334    # We're on a posix platform. Hooray! :)
13335    path="$BOOT_JDK"
13336
13337    if test ! -f "$path" && test ! -d "$path"; then
13338      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13339    fi
13340
13341    has_space=`$ECHO "$path" | $GREP " "`
13342    if test "x$has_space" != x; then
13343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13344$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13345      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13346    fi
13347  fi
13348
13349              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13350$as_echo_n "checking for Boot JDK... " >&6; }
13351              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13352$as_echo "$BOOT_JDK" >&6; }
13353              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13354$as_echo_n "checking Boot JDK version... " >&6; }
13355              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13356              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13357$as_echo "$BOOT_JDK_VERSION" >&6; }
13358            fi # end check jdk version
13359          fi # end check rt.jar
13360        fi # end check javac
13361      fi # end check java
13362    fi # end check boot jdk found
13363  fi
13364
13365
13366  if test "x$BOOT_JDK_FOUND" = xno; then
13367    # Now execute the test
13368
13369  if test "x$ProgramFiles" != x; then
13370    VIRTUAL_DIR="$ProgramFiles/Java"
13371
13372  windows_path="$VIRTUAL_DIR"
13373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13374    unix_path=`$CYGPATH -u "$windows_path"`
13375    VIRTUAL_DIR="$unix_path"
13376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13378    VIRTUAL_DIR="$unix_path"
13379  fi
13380
13381
13382  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13383  BOOT_JDK_SUFFIX=""
13384  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13385  if test "x$ALL_JDKS_FOUND" != x; then
13386    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13387
13388  if test "x$BOOT_JDK_FOUND" = xno; then
13389    # Now execute the test
13390
13391        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13392        if test -d "$BOOT_JDK"; then
13393          BOOT_JDK_FOUND=maybe
13394          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13395$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13396        fi
13397
13398
13399    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13400    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13401      # Do we have a bin/java?
13402      if test ! -x "$BOOT_JDK/bin/java"; then
13403        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13405        BOOT_JDK_FOUND=no
13406      else
13407        # Do we have a bin/javac?
13408        if test ! -x "$BOOT_JDK/bin/javac"; then
13409          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13411          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13412$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13413          BOOT_JDK_FOUND=no
13414        else
13415          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13416          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13417            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13419            BOOT_JDK_FOUND=no
13420          else
13421            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13422            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13423
13424            # Extra M4 quote needed to protect [] in grep expression.
13425            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13426            if test "x$FOUND_VERSION_78" = x; then
13427              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13429              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13430$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13431              BOOT_JDK_FOUND=no
13432            else
13433              # We're done! :-)
13434              BOOT_JDK_FOUND=yes
13435
13436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13437
13438  # Input might be given as Windows format, start by converting to
13439  # unix format.
13440  path="$BOOT_JDK"
13441  new_path=`$CYGPATH -u "$path"`
13442
13443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13446  # "foo.exe" is OK but "foo" is an error.
13447  #
13448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13449  # It is also a way to make sure we got the proper file name for the real test later on.
13450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13451  if test "x$test_shortpath" = x; then
13452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13453$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13454    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13455  fi
13456
13457  # Call helper function which possibly converts this using DOS-style short mode.
13458  # If so, the updated path is stored in $new_path.
13459
13460  input_path="$new_path"
13461  # Check if we need to convert this using DOS-style short mode. If the path
13462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13463  # take no chances and rewrite it.
13464  # Note: m4 eats our [], so we need to use [ and ] instead.
13465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13466  if test "x$has_forbidden_chars" != x; then
13467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13471      # Going to short mode and back again did indeed matter. Since short mode is
13472      # case insensitive, let's make it lowercase to improve readability.
13473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13474      # Now convert it back to Unix-stile (cygpath)
13475      input_path=`$CYGPATH -u "$shortmode_path"`
13476      new_path="$input_path"
13477    fi
13478  fi
13479
13480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13481  if test "x$test_cygdrive_prefix" = x; then
13482    # As a simple fix, exclude /usr/bin since it's not a real path.
13483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13485      # a path prefixed by /cygdrive for fixpath to work.
13486      new_path="$CYGWIN_ROOT_PATH$input_path"
13487    fi
13488  fi
13489
13490
13491  if test "x$path" != "x$new_path"; then
13492    BOOT_JDK="$new_path"
13493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13495  fi
13496
13497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13498
13499  path="$BOOT_JDK"
13500  has_colon=`$ECHO $path | $GREP ^.:`
13501  new_path="$path"
13502  if test "x$has_colon" = x; then
13503    # Not in mixed or Windows style, start by that.
13504    new_path=`cmd //c echo $path`
13505  fi
13506
13507
13508  input_path="$new_path"
13509  # Check if we need to convert this using DOS-style short mode. If the path
13510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13511  # take no chances and rewrite it.
13512  # Note: m4 eats our [], so we need to use [ and ] instead.
13513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13514  if test "x$has_forbidden_chars" != x; then
13515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13517  fi
13518
13519
13520  windows_path="$new_path"
13521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13522    unix_path=`$CYGPATH -u "$windows_path"`
13523    new_path="$unix_path"
13524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13526    new_path="$unix_path"
13527  fi
13528
13529  if test "x$path" != "x$new_path"; then
13530    BOOT_JDK="$new_path"
13531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13532$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13533  fi
13534
13535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13537
13538  else
13539    # We're on a posix platform. Hooray! :)
13540    path="$BOOT_JDK"
13541
13542    if test ! -f "$path" && test ! -d "$path"; then
13543      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13544    fi
13545
13546    has_space=`$ECHO "$path" | $GREP " "`
13547    if test "x$has_space" != x; then
13548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13549$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13550      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13551    fi
13552  fi
13553
13554              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13555$as_echo_n "checking for Boot JDK... " >&6; }
13556              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13557$as_echo "$BOOT_JDK" >&6; }
13558              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13559$as_echo_n "checking Boot JDK version... " >&6; }
13560              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13561              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13562$as_echo "$BOOT_JDK_VERSION" >&6; }
13563            fi # end check jdk version
13564          fi # end check rt.jar
13565        fi # end check javac
13566      fi # end check java
13567    fi # end check boot jdk found
13568  fi
13569
13570    done
13571  fi
13572
13573  fi
13574
13575
13576    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13577    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13578      # Do we have a bin/java?
13579      if test ! -x "$BOOT_JDK/bin/java"; then
13580        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13582        BOOT_JDK_FOUND=no
13583      else
13584        # Do we have a bin/javac?
13585        if test ! -x "$BOOT_JDK/bin/javac"; then
13586          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13588          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13589$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13590          BOOT_JDK_FOUND=no
13591        else
13592          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13593          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13594            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13596            BOOT_JDK_FOUND=no
13597          else
13598            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13599            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13600
13601            # Extra M4 quote needed to protect [] in grep expression.
13602            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13603            if test "x$FOUND_VERSION_78" = x; then
13604              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13606              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13607$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13608              BOOT_JDK_FOUND=no
13609            else
13610              # We're done! :-)
13611              BOOT_JDK_FOUND=yes
13612
13613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13614
13615  # Input might be given as Windows format, start by converting to
13616  # unix format.
13617  path="$BOOT_JDK"
13618  new_path=`$CYGPATH -u "$path"`
13619
13620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13623  # "foo.exe" is OK but "foo" is an error.
13624  #
13625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13626  # It is also a way to make sure we got the proper file name for the real test later on.
13627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13628  if test "x$test_shortpath" = x; then
13629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13631    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13632  fi
13633
13634  # Call helper function which possibly converts this using DOS-style short mode.
13635  # If so, the updated path is stored in $new_path.
13636
13637  input_path="$new_path"
13638  # Check if we need to convert this using DOS-style short mode. If the path
13639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13640  # take no chances and rewrite it.
13641  # Note: m4 eats our [], so we need to use [ and ] instead.
13642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13643  if test "x$has_forbidden_chars" != x; then
13644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13648      # Going to short mode and back again did indeed matter. Since short mode is
13649      # case insensitive, let's make it lowercase to improve readability.
13650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13651      # Now convert it back to Unix-stile (cygpath)
13652      input_path=`$CYGPATH -u "$shortmode_path"`
13653      new_path="$input_path"
13654    fi
13655  fi
13656
13657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13658  if test "x$test_cygdrive_prefix" = x; then
13659    # As a simple fix, exclude /usr/bin since it's not a real path.
13660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13662      # a path prefixed by /cygdrive for fixpath to work.
13663      new_path="$CYGWIN_ROOT_PATH$input_path"
13664    fi
13665  fi
13666
13667
13668  if test "x$path" != "x$new_path"; then
13669    BOOT_JDK="$new_path"
13670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13672  fi
13673
13674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13675
13676  path="$BOOT_JDK"
13677  has_colon=`$ECHO $path | $GREP ^.:`
13678  new_path="$path"
13679  if test "x$has_colon" = x; then
13680    # Not in mixed or Windows style, start by that.
13681    new_path=`cmd //c echo $path`
13682  fi
13683
13684
13685  input_path="$new_path"
13686  # Check if we need to convert this using DOS-style short mode. If the path
13687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13688  # take no chances and rewrite it.
13689  # Note: m4 eats our [], so we need to use [ and ] instead.
13690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13691  if test "x$has_forbidden_chars" != x; then
13692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13694  fi
13695
13696
13697  windows_path="$new_path"
13698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13699    unix_path=`$CYGPATH -u "$windows_path"`
13700    new_path="$unix_path"
13701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13703    new_path="$unix_path"
13704  fi
13705
13706  if test "x$path" != "x$new_path"; then
13707    BOOT_JDK="$new_path"
13708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13710  fi
13711
13712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13714
13715  else
13716    # We're on a posix platform. Hooray! :)
13717    path="$BOOT_JDK"
13718
13719    if test ! -f "$path" && test ! -d "$path"; then
13720      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13721    fi
13722
13723    has_space=`$ECHO "$path" | $GREP " "`
13724    if test "x$has_space" != x; then
13725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13727      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13728    fi
13729  fi
13730
13731              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13732$as_echo_n "checking for Boot JDK... " >&6; }
13733              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13734$as_echo "$BOOT_JDK" >&6; }
13735              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13736$as_echo_n "checking Boot JDK version... " >&6; }
13737              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13738              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13739$as_echo "$BOOT_JDK_VERSION" >&6; }
13740            fi # end check jdk version
13741          fi # end check rt.jar
13742        fi # end check javac
13743      fi # end check java
13744    fi # end check boot jdk found
13745  fi
13746
13747
13748  if test "x$BOOT_JDK_FOUND" = xno; then
13749    # Now execute the test
13750
13751  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13752  BOOT_JDK_SUFFIX=""
13753  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13754  if test "x$ALL_JDKS_FOUND" != x; then
13755    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13756
13757  if test "x$BOOT_JDK_FOUND" = xno; then
13758    # Now execute the test
13759
13760        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13761        if test -d "$BOOT_JDK"; then
13762          BOOT_JDK_FOUND=maybe
13763          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13764$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13765        fi
13766
13767
13768    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13769    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13770      # Do we have a bin/java?
13771      if test ! -x "$BOOT_JDK/bin/java"; then
13772        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13774        BOOT_JDK_FOUND=no
13775      else
13776        # Do we have a bin/javac?
13777        if test ! -x "$BOOT_JDK/bin/javac"; then
13778          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13780          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13781$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13782          BOOT_JDK_FOUND=no
13783        else
13784          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13785          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13786            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13788            BOOT_JDK_FOUND=no
13789          else
13790            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13791            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13792
13793            # Extra M4 quote needed to protect [] in grep expression.
13794            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13795            if test "x$FOUND_VERSION_78" = x; then
13796              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13798              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13799$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13800              BOOT_JDK_FOUND=no
13801            else
13802              # We're done! :-)
13803              BOOT_JDK_FOUND=yes
13804
13805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13806
13807  # Input might be given as Windows format, start by converting to
13808  # unix format.
13809  path="$BOOT_JDK"
13810  new_path=`$CYGPATH -u "$path"`
13811
13812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13815  # "foo.exe" is OK but "foo" is an error.
13816  #
13817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13818  # It is also a way to make sure we got the proper file name for the real test later on.
13819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13820  if test "x$test_shortpath" = x; then
13821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13823    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13824  fi
13825
13826  # Call helper function which possibly converts this using DOS-style short mode.
13827  # If so, the updated path is stored in $new_path.
13828
13829  input_path="$new_path"
13830  # Check if we need to convert this using DOS-style short mode. If the path
13831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13832  # take no chances and rewrite it.
13833  # Note: m4 eats our [], so we need to use [ and ] instead.
13834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13835  if test "x$has_forbidden_chars" != x; then
13836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13840      # Going to short mode and back again did indeed matter. Since short mode is
13841      # case insensitive, let's make it lowercase to improve readability.
13842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13843      # Now convert it back to Unix-stile (cygpath)
13844      input_path=`$CYGPATH -u "$shortmode_path"`
13845      new_path="$input_path"
13846    fi
13847  fi
13848
13849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13850  if test "x$test_cygdrive_prefix" = x; then
13851    # As a simple fix, exclude /usr/bin since it's not a real path.
13852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13854      # a path prefixed by /cygdrive for fixpath to work.
13855      new_path="$CYGWIN_ROOT_PATH$input_path"
13856    fi
13857  fi
13858
13859
13860  if test "x$path" != "x$new_path"; then
13861    BOOT_JDK="$new_path"
13862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13863$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13864  fi
13865
13866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13867
13868  path="$BOOT_JDK"
13869  has_colon=`$ECHO $path | $GREP ^.:`
13870  new_path="$path"
13871  if test "x$has_colon" = x; then
13872    # Not in mixed or Windows style, start by that.
13873    new_path=`cmd //c echo $path`
13874  fi
13875
13876
13877  input_path="$new_path"
13878  # Check if we need to convert this using DOS-style short mode. If the path
13879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13880  # take no chances and rewrite it.
13881  # Note: m4 eats our [], so we need to use [ and ] instead.
13882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13883  if test "x$has_forbidden_chars" != x; then
13884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13886  fi
13887
13888
13889  windows_path="$new_path"
13890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13891    unix_path=`$CYGPATH -u "$windows_path"`
13892    new_path="$unix_path"
13893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13895    new_path="$unix_path"
13896  fi
13897
13898  if test "x$path" != "x$new_path"; then
13899    BOOT_JDK="$new_path"
13900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13901$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13902  fi
13903
13904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13906
13907  else
13908    # We're on a posix platform. Hooray! :)
13909    path="$BOOT_JDK"
13910
13911    if test ! -f "$path" && test ! -d "$path"; then
13912      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13913    fi
13914
13915    has_space=`$ECHO "$path" | $GREP " "`
13916    if test "x$has_space" != x; then
13917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13919      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13920    fi
13921  fi
13922
13923              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13924$as_echo_n "checking for Boot JDK... " >&6; }
13925              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13926$as_echo "$BOOT_JDK" >&6; }
13927              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13928$as_echo_n "checking Boot JDK version... " >&6; }
13929              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13930              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13931$as_echo "$BOOT_JDK_VERSION" >&6; }
13932            fi # end check jdk version
13933          fi # end check rt.jar
13934        fi # end check javac
13935      fi # end check java
13936    fi # end check boot jdk found
13937  fi
13938
13939    done
13940  fi
13941
13942
13943    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13944    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13945      # Do we have a bin/java?
13946      if test ! -x "$BOOT_JDK/bin/java"; then
13947        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13949        BOOT_JDK_FOUND=no
13950      else
13951        # Do we have a bin/javac?
13952        if test ! -x "$BOOT_JDK/bin/javac"; then
13953          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13955          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13956$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13957          BOOT_JDK_FOUND=no
13958        else
13959          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13960          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13961            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13963            BOOT_JDK_FOUND=no
13964          else
13965            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13966            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13967
13968            # Extra M4 quote needed to protect [] in grep expression.
13969            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13970            if test "x$FOUND_VERSION_78" = x; then
13971              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13973              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13974$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13975              BOOT_JDK_FOUND=no
13976            else
13977              # We're done! :-)
13978              BOOT_JDK_FOUND=yes
13979
13980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13981
13982  # Input might be given as Windows format, start by converting to
13983  # unix format.
13984  path="$BOOT_JDK"
13985  new_path=`$CYGPATH -u "$path"`
13986
13987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13990  # "foo.exe" is OK but "foo" is an error.
13991  #
13992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13993  # It is also a way to make sure we got the proper file name for the real test later on.
13994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13995  if test "x$test_shortpath" = x; then
13996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13998    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13999  fi
14000
14001  # Call helper function which possibly converts this using DOS-style short mode.
14002  # If so, the updated path is stored in $new_path.
14003
14004  input_path="$new_path"
14005  # Check if we need to convert this using DOS-style short mode. If the path
14006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14007  # take no chances and rewrite it.
14008  # Note: m4 eats our [], so we need to use [ and ] instead.
14009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14010  if test "x$has_forbidden_chars" != x; then
14011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14015      # Going to short mode and back again did indeed matter. Since short mode is
14016      # case insensitive, let's make it lowercase to improve readability.
14017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14018      # Now convert it back to Unix-stile (cygpath)
14019      input_path=`$CYGPATH -u "$shortmode_path"`
14020      new_path="$input_path"
14021    fi
14022  fi
14023
14024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14025  if test "x$test_cygdrive_prefix" = x; then
14026    # As a simple fix, exclude /usr/bin since it's not a real path.
14027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14029      # a path prefixed by /cygdrive for fixpath to work.
14030      new_path="$CYGWIN_ROOT_PATH$input_path"
14031    fi
14032  fi
14033
14034
14035  if test "x$path" != "x$new_path"; then
14036    BOOT_JDK="$new_path"
14037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14038$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14039  fi
14040
14041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14042
14043  path="$BOOT_JDK"
14044  has_colon=`$ECHO $path | $GREP ^.:`
14045  new_path="$path"
14046  if test "x$has_colon" = x; then
14047    # Not in mixed or Windows style, start by that.
14048    new_path=`cmd //c echo $path`
14049  fi
14050
14051
14052  input_path="$new_path"
14053  # Check if we need to convert this using DOS-style short mode. If the path
14054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14055  # take no chances and rewrite it.
14056  # Note: m4 eats our [], so we need to use [ and ] instead.
14057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14058  if test "x$has_forbidden_chars" != x; then
14059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14061  fi
14062
14063
14064  windows_path="$new_path"
14065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14066    unix_path=`$CYGPATH -u "$windows_path"`
14067    new_path="$unix_path"
14068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14070    new_path="$unix_path"
14071  fi
14072
14073  if test "x$path" != "x$new_path"; then
14074    BOOT_JDK="$new_path"
14075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14077  fi
14078
14079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14081
14082  else
14083    # We're on a posix platform. Hooray! :)
14084    path="$BOOT_JDK"
14085
14086    if test ! -f "$path" && test ! -d "$path"; then
14087      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14088    fi
14089
14090    has_space=`$ECHO "$path" | $GREP " "`
14091    if test "x$has_space" != x; then
14092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14094      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14095    fi
14096  fi
14097
14098              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14099$as_echo_n "checking for Boot JDK... " >&6; }
14100              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14101$as_echo "$BOOT_JDK" >&6; }
14102              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14103$as_echo_n "checking Boot JDK version... " >&6; }
14104              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14105              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14106$as_echo "$BOOT_JDK_VERSION" >&6; }
14107            fi # end check jdk version
14108          fi # end check rt.jar
14109        fi # end check javac
14110      fi # end check java
14111    fi # end check boot jdk found
14112  fi
14113
14114  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14115
14116  if test "x$BOOT_JDK_FOUND" = xno; then
14117    # Now execute the test
14118
14119  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14120  BOOT_JDK_SUFFIX="/Contents/Home"
14121  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14122  if test "x$ALL_JDKS_FOUND" != x; then
14123    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14124
14125  if test "x$BOOT_JDK_FOUND" = xno; then
14126    # Now execute the test
14127
14128        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14129        if test -d "$BOOT_JDK"; then
14130          BOOT_JDK_FOUND=maybe
14131          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14132$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14133        fi
14134
14135
14136    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14137    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14138      # Do we have a bin/java?
14139      if test ! -x "$BOOT_JDK/bin/java"; then
14140        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14142        BOOT_JDK_FOUND=no
14143      else
14144        # Do we have a bin/javac?
14145        if test ! -x "$BOOT_JDK/bin/javac"; then
14146          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14148          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14149$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14150          BOOT_JDK_FOUND=no
14151        else
14152          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14153          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14154            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14156            BOOT_JDK_FOUND=no
14157          else
14158            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14159            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14160
14161            # Extra M4 quote needed to protect [] in grep expression.
14162            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14163            if test "x$FOUND_VERSION_78" = x; then
14164              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14166              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14167$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14168              BOOT_JDK_FOUND=no
14169            else
14170              # We're done! :-)
14171              BOOT_JDK_FOUND=yes
14172
14173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14174
14175  # Input might be given as Windows format, start by converting to
14176  # unix format.
14177  path="$BOOT_JDK"
14178  new_path=`$CYGPATH -u "$path"`
14179
14180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14183  # "foo.exe" is OK but "foo" is an error.
14184  #
14185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14186  # It is also a way to make sure we got the proper file name for the real test later on.
14187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14188  if test "x$test_shortpath" = x; then
14189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14190$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14191    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14192  fi
14193
14194  # Call helper function which possibly converts this using DOS-style short mode.
14195  # If so, the updated path is stored in $new_path.
14196
14197  input_path="$new_path"
14198  # Check if we need to convert this using DOS-style short mode. If the path
14199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14200  # take no chances and rewrite it.
14201  # Note: m4 eats our [], so we need to use [ and ] instead.
14202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14203  if test "x$has_forbidden_chars" != x; then
14204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14208      # Going to short mode and back again did indeed matter. Since short mode is
14209      # case insensitive, let's make it lowercase to improve readability.
14210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14211      # Now convert it back to Unix-stile (cygpath)
14212      input_path=`$CYGPATH -u "$shortmode_path"`
14213      new_path="$input_path"
14214    fi
14215  fi
14216
14217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14218  if test "x$test_cygdrive_prefix" = x; then
14219    # As a simple fix, exclude /usr/bin since it's not a real path.
14220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14222      # a path prefixed by /cygdrive for fixpath to work.
14223      new_path="$CYGWIN_ROOT_PATH$input_path"
14224    fi
14225  fi
14226
14227
14228  if test "x$path" != "x$new_path"; then
14229    BOOT_JDK="$new_path"
14230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14231$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14232  fi
14233
14234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14235
14236  path="$BOOT_JDK"
14237  has_colon=`$ECHO $path | $GREP ^.:`
14238  new_path="$path"
14239  if test "x$has_colon" = x; then
14240    # Not in mixed or Windows style, start by that.
14241    new_path=`cmd //c echo $path`
14242  fi
14243
14244
14245  input_path="$new_path"
14246  # Check if we need to convert this using DOS-style short mode. If the path
14247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14248  # take no chances and rewrite it.
14249  # Note: m4 eats our [], so we need to use [ and ] instead.
14250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14251  if test "x$has_forbidden_chars" != x; then
14252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14254  fi
14255
14256
14257  windows_path="$new_path"
14258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14259    unix_path=`$CYGPATH -u "$windows_path"`
14260    new_path="$unix_path"
14261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14263    new_path="$unix_path"
14264  fi
14265
14266  if test "x$path" != "x$new_path"; then
14267    BOOT_JDK="$new_path"
14268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14270  fi
14271
14272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14274
14275  else
14276    # We're on a posix platform. Hooray! :)
14277    path="$BOOT_JDK"
14278
14279    if test ! -f "$path" && test ! -d "$path"; then
14280      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14281    fi
14282
14283    has_space=`$ECHO "$path" | $GREP " "`
14284    if test "x$has_space" != x; then
14285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14286$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14287      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14288    fi
14289  fi
14290
14291              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14292$as_echo_n "checking for Boot JDK... " >&6; }
14293              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14294$as_echo "$BOOT_JDK" >&6; }
14295              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14296$as_echo_n "checking Boot JDK version... " >&6; }
14297              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14298              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14299$as_echo "$BOOT_JDK_VERSION" >&6; }
14300            fi # end check jdk version
14301          fi # end check rt.jar
14302        fi # end check javac
14303      fi # end check java
14304    fi # end check boot jdk found
14305  fi
14306
14307    done
14308  fi
14309
14310
14311    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14312    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14313      # Do we have a bin/java?
14314      if test ! -x "$BOOT_JDK/bin/java"; then
14315        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14317        BOOT_JDK_FOUND=no
14318      else
14319        # Do we have a bin/javac?
14320        if test ! -x "$BOOT_JDK/bin/javac"; then
14321          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14323          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14324$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14325          BOOT_JDK_FOUND=no
14326        else
14327          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14328          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14329            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14331            BOOT_JDK_FOUND=no
14332          else
14333            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14334            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14335
14336            # Extra M4 quote needed to protect [] in grep expression.
14337            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14338            if test "x$FOUND_VERSION_78" = x; then
14339              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14341              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14342$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14343              BOOT_JDK_FOUND=no
14344            else
14345              # We're done! :-)
14346              BOOT_JDK_FOUND=yes
14347
14348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14349
14350  # Input might be given as Windows format, start by converting to
14351  # unix format.
14352  path="$BOOT_JDK"
14353  new_path=`$CYGPATH -u "$path"`
14354
14355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14358  # "foo.exe" is OK but "foo" is an error.
14359  #
14360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14361  # It is also a way to make sure we got the proper file name for the real test later on.
14362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14363  if test "x$test_shortpath" = x; then
14364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14366    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14367  fi
14368
14369  # Call helper function which possibly converts this using DOS-style short mode.
14370  # If so, the updated path is stored in $new_path.
14371
14372  input_path="$new_path"
14373  # Check if we need to convert this using DOS-style short mode. If the path
14374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14375  # take no chances and rewrite it.
14376  # Note: m4 eats our [], so we need to use [ and ] instead.
14377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14378  if test "x$has_forbidden_chars" != x; then
14379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14383      # Going to short mode and back again did indeed matter. Since short mode is
14384      # case insensitive, let's make it lowercase to improve readability.
14385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14386      # Now convert it back to Unix-stile (cygpath)
14387      input_path=`$CYGPATH -u "$shortmode_path"`
14388      new_path="$input_path"
14389    fi
14390  fi
14391
14392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14393  if test "x$test_cygdrive_prefix" = x; then
14394    # As a simple fix, exclude /usr/bin since it's not a real path.
14395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14397      # a path prefixed by /cygdrive for fixpath to work.
14398      new_path="$CYGWIN_ROOT_PATH$input_path"
14399    fi
14400  fi
14401
14402
14403  if test "x$path" != "x$new_path"; then
14404    BOOT_JDK="$new_path"
14405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14407  fi
14408
14409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14410
14411  path="$BOOT_JDK"
14412  has_colon=`$ECHO $path | $GREP ^.:`
14413  new_path="$path"
14414  if test "x$has_colon" = x; then
14415    # Not in mixed or Windows style, start by that.
14416    new_path=`cmd //c echo $path`
14417  fi
14418
14419
14420  input_path="$new_path"
14421  # Check if we need to convert this using DOS-style short mode. If the path
14422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14423  # take no chances and rewrite it.
14424  # Note: m4 eats our [], so we need to use [ and ] instead.
14425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14426  if test "x$has_forbidden_chars" != x; then
14427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14429  fi
14430
14431
14432  windows_path="$new_path"
14433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14434    unix_path=`$CYGPATH -u "$windows_path"`
14435    new_path="$unix_path"
14436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14438    new_path="$unix_path"
14439  fi
14440
14441  if test "x$path" != "x$new_path"; then
14442    BOOT_JDK="$new_path"
14443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14445  fi
14446
14447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14449
14450  else
14451    # We're on a posix platform. Hooray! :)
14452    path="$BOOT_JDK"
14453
14454    if test ! -f "$path" && test ! -d "$path"; then
14455      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14456    fi
14457
14458    has_space=`$ECHO "$path" | $GREP " "`
14459    if test "x$has_space" != x; then
14460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14462      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14463    fi
14464  fi
14465
14466              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14467$as_echo_n "checking for Boot JDK... " >&6; }
14468              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14469$as_echo "$BOOT_JDK" >&6; }
14470              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14471$as_echo_n "checking Boot JDK version... " >&6; }
14472              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14473              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14474$as_echo "$BOOT_JDK_VERSION" >&6; }
14475            fi # end check jdk version
14476          fi # end check rt.jar
14477        fi # end check javac
14478      fi # end check java
14479    fi # end check boot jdk found
14480  fi
14481
14482
14483  if test "x$BOOT_JDK_FOUND" = xno; then
14484    # Now execute the test
14485
14486  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14487  BOOT_JDK_SUFFIX="/Contents/Home"
14488  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14489  if test "x$ALL_JDKS_FOUND" != x; then
14490    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14491
14492  if test "x$BOOT_JDK_FOUND" = xno; then
14493    # Now execute the test
14494
14495        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14496        if test -d "$BOOT_JDK"; then
14497          BOOT_JDK_FOUND=maybe
14498          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14499$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14500        fi
14501
14502
14503    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14504    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14505      # Do we have a bin/java?
14506      if test ! -x "$BOOT_JDK/bin/java"; then
14507        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14509        BOOT_JDK_FOUND=no
14510      else
14511        # Do we have a bin/javac?
14512        if test ! -x "$BOOT_JDK/bin/javac"; then
14513          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14515          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14516$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14517          BOOT_JDK_FOUND=no
14518        else
14519          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14520          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14521            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14523            BOOT_JDK_FOUND=no
14524          else
14525            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14526            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14527
14528            # Extra M4 quote needed to protect [] in grep expression.
14529            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14530            if test "x$FOUND_VERSION_78" = x; then
14531              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14533              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14534$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14535              BOOT_JDK_FOUND=no
14536            else
14537              # We're done! :-)
14538              BOOT_JDK_FOUND=yes
14539
14540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14541
14542  # Input might be given as Windows format, start by converting to
14543  # unix format.
14544  path="$BOOT_JDK"
14545  new_path=`$CYGPATH -u "$path"`
14546
14547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14550  # "foo.exe" is OK but "foo" is an error.
14551  #
14552  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14553  # It is also a way to make sure we got the proper file name for the real test later on.
14554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14555  if test "x$test_shortpath" = x; then
14556    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14557$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14558    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14559  fi
14560
14561  # Call helper function which possibly converts this using DOS-style short mode.
14562  # If so, the updated path is stored in $new_path.
14563
14564  input_path="$new_path"
14565  # Check if we need to convert this using DOS-style short mode. If the path
14566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14567  # take no chances and rewrite it.
14568  # Note: m4 eats our [], so we need to use [ and ] instead.
14569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14570  if test "x$has_forbidden_chars" != x; then
14571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14575      # Going to short mode and back again did indeed matter. Since short mode is
14576      # case insensitive, let's make it lowercase to improve readability.
14577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14578      # Now convert it back to Unix-stile (cygpath)
14579      input_path=`$CYGPATH -u "$shortmode_path"`
14580      new_path="$input_path"
14581    fi
14582  fi
14583
14584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14585  if test "x$test_cygdrive_prefix" = x; then
14586    # As a simple fix, exclude /usr/bin since it's not a real path.
14587    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14589      # a path prefixed by /cygdrive for fixpath to work.
14590      new_path="$CYGWIN_ROOT_PATH$input_path"
14591    fi
14592  fi
14593
14594
14595  if test "x$path" != "x$new_path"; then
14596    BOOT_JDK="$new_path"
14597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14598$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14599  fi
14600
14601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14602
14603  path="$BOOT_JDK"
14604  has_colon=`$ECHO $path | $GREP ^.:`
14605  new_path="$path"
14606  if test "x$has_colon" = x; then
14607    # Not in mixed or Windows style, start by that.
14608    new_path=`cmd //c echo $path`
14609  fi
14610
14611
14612  input_path="$new_path"
14613  # Check if we need to convert this using DOS-style short mode. If the path
14614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14615  # take no chances and rewrite it.
14616  # Note: m4 eats our [], so we need to use [ and ] instead.
14617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14618  if test "x$has_forbidden_chars" != x; then
14619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14620    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14621  fi
14622
14623
14624  windows_path="$new_path"
14625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14626    unix_path=`$CYGPATH -u "$windows_path"`
14627    new_path="$unix_path"
14628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14630    new_path="$unix_path"
14631  fi
14632
14633  if test "x$path" != "x$new_path"; then
14634    BOOT_JDK="$new_path"
14635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14636$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14637  fi
14638
14639  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14640  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14641
14642  else
14643    # We're on a posix platform. Hooray! :)
14644    path="$BOOT_JDK"
14645
14646    if test ! -f "$path" && test ! -d "$path"; then
14647      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14648    fi
14649
14650    has_space=`$ECHO "$path" | $GREP " "`
14651    if test "x$has_space" != x; then
14652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14654      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14655    fi
14656  fi
14657
14658              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14659$as_echo_n "checking for Boot JDK... " >&6; }
14660              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14661$as_echo "$BOOT_JDK" >&6; }
14662              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14663$as_echo_n "checking Boot JDK version... " >&6; }
14664              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14665              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14666$as_echo "$BOOT_JDK_VERSION" >&6; }
14667            fi # end check jdk version
14668          fi # end check rt.jar
14669        fi # end check javac
14670      fi # end check java
14671    fi # end check boot jdk found
14672  fi
14673
14674    done
14675  fi
14676
14677
14678    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14679    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14680      # Do we have a bin/java?
14681      if test ! -x "$BOOT_JDK/bin/java"; then
14682        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14684        BOOT_JDK_FOUND=no
14685      else
14686        # Do we have a bin/javac?
14687        if test ! -x "$BOOT_JDK/bin/javac"; then
14688          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14690          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14691$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14692          BOOT_JDK_FOUND=no
14693        else
14694          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14695          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14696            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14698            BOOT_JDK_FOUND=no
14699          else
14700            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14701            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14702
14703            # Extra M4 quote needed to protect [] in grep expression.
14704            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14705            if test "x$FOUND_VERSION_78" = x; then
14706              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14707$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14708              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14709$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14710              BOOT_JDK_FOUND=no
14711            else
14712              # We're done! :-)
14713              BOOT_JDK_FOUND=yes
14714
14715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14716
14717  # Input might be given as Windows format, start by converting to
14718  # unix format.
14719  path="$BOOT_JDK"
14720  new_path=`$CYGPATH -u "$path"`
14721
14722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14725  # "foo.exe" is OK but "foo" is an error.
14726  #
14727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14728  # It is also a way to make sure we got the proper file name for the real test later on.
14729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14730  if test "x$test_shortpath" = x; then
14731    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14733    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14734  fi
14735
14736  # Call helper function which possibly converts this using DOS-style short mode.
14737  # If so, the updated path is stored in $new_path.
14738
14739  input_path="$new_path"
14740  # Check if we need to convert this using DOS-style short mode. If the path
14741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14742  # take no chances and rewrite it.
14743  # Note: m4 eats our [], so we need to use [ and ] instead.
14744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14745  if test "x$has_forbidden_chars" != x; then
14746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14750      # Going to short mode and back again did indeed matter. Since short mode is
14751      # case insensitive, let's make it lowercase to improve readability.
14752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14753      # Now convert it back to Unix-stile (cygpath)
14754      input_path=`$CYGPATH -u "$shortmode_path"`
14755      new_path="$input_path"
14756    fi
14757  fi
14758
14759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14760  if test "x$test_cygdrive_prefix" = x; then
14761    # As a simple fix, exclude /usr/bin since it's not a real path.
14762    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14764      # a path prefixed by /cygdrive for fixpath to work.
14765      new_path="$CYGWIN_ROOT_PATH$input_path"
14766    fi
14767  fi
14768
14769
14770  if test "x$path" != "x$new_path"; then
14771    BOOT_JDK="$new_path"
14772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14773$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14774  fi
14775
14776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14777
14778  path="$BOOT_JDK"
14779  has_colon=`$ECHO $path | $GREP ^.:`
14780  new_path="$path"
14781  if test "x$has_colon" = x; then
14782    # Not in mixed or Windows style, start by that.
14783    new_path=`cmd //c echo $path`
14784  fi
14785
14786
14787  input_path="$new_path"
14788  # Check if we need to convert this using DOS-style short mode. If the path
14789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14790  # take no chances and rewrite it.
14791  # Note: m4 eats our [], so we need to use [ and ] instead.
14792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14793  if test "x$has_forbidden_chars" != x; then
14794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14796  fi
14797
14798
14799  windows_path="$new_path"
14800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14801    unix_path=`$CYGPATH -u "$windows_path"`
14802    new_path="$unix_path"
14803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14805    new_path="$unix_path"
14806  fi
14807
14808  if test "x$path" != "x$new_path"; then
14809    BOOT_JDK="$new_path"
14810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14812  fi
14813
14814  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14815  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14816
14817  else
14818    # We're on a posix platform. Hooray! :)
14819    path="$BOOT_JDK"
14820
14821    if test ! -f "$path" && test ! -d "$path"; then
14822      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14823    fi
14824
14825    has_space=`$ECHO "$path" | $GREP " "`
14826    if test "x$has_space" != x; then
14827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14829      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14830    fi
14831  fi
14832
14833              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14834$as_echo_n "checking for Boot JDK... " >&6; }
14835              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14836$as_echo "$BOOT_JDK" >&6; }
14837              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14838$as_echo_n "checking Boot JDK version... " >&6; }
14839              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14840              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14841$as_echo "$BOOT_JDK_VERSION" >&6; }
14842            fi # end check jdk version
14843          fi # end check rt.jar
14844        fi # end check javac
14845      fi # end check java
14846    fi # end check boot jdk found
14847  fi
14848
14849  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14850
14851  if test "x$BOOT_JDK_FOUND" = xno; then
14852    # Now execute the test
14853
14854  BOOT_JDK_PREFIX="/usr/lib/jvm"
14855  BOOT_JDK_SUFFIX=""
14856  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14857  if test "x$ALL_JDKS_FOUND" != x; then
14858    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14859
14860  if test "x$BOOT_JDK_FOUND" = xno; then
14861    # Now execute the test
14862
14863        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14864        if test -d "$BOOT_JDK"; then
14865          BOOT_JDK_FOUND=maybe
14866          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14867$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14868        fi
14869
14870
14871    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14872    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14873      # Do we have a bin/java?
14874      if test ! -x "$BOOT_JDK/bin/java"; then
14875        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14877        BOOT_JDK_FOUND=no
14878      else
14879        # Do we have a bin/javac?
14880        if test ! -x "$BOOT_JDK/bin/javac"; then
14881          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14883          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14884$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14885          BOOT_JDK_FOUND=no
14886        else
14887          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14888          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14889            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14891            BOOT_JDK_FOUND=no
14892          else
14893            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14894            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14895
14896            # Extra M4 quote needed to protect [] in grep expression.
14897            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14898            if test "x$FOUND_VERSION_78" = x; then
14899              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14901              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14902$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14903              BOOT_JDK_FOUND=no
14904            else
14905              # We're done! :-)
14906              BOOT_JDK_FOUND=yes
14907
14908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14909
14910  # Input might be given as Windows format, start by converting to
14911  # unix format.
14912  path="$BOOT_JDK"
14913  new_path=`$CYGPATH -u "$path"`
14914
14915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14918  # "foo.exe" is OK but "foo" is an error.
14919  #
14920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14921  # It is also a way to make sure we got the proper file name for the real test later on.
14922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14923  if test "x$test_shortpath" = x; then
14924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14925$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14926    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14927  fi
14928
14929  # Call helper function which possibly converts this using DOS-style short mode.
14930  # If so, the updated path is stored in $new_path.
14931
14932  input_path="$new_path"
14933  # Check if we need to convert this using DOS-style short mode. If the path
14934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14935  # take no chances and rewrite it.
14936  # Note: m4 eats our [], so we need to use [ and ] instead.
14937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14938  if test "x$has_forbidden_chars" != x; then
14939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14943      # Going to short mode and back again did indeed matter. Since short mode is
14944      # case insensitive, let's make it lowercase to improve readability.
14945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14946      # Now convert it back to Unix-stile (cygpath)
14947      input_path=`$CYGPATH -u "$shortmode_path"`
14948      new_path="$input_path"
14949    fi
14950  fi
14951
14952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14953  if test "x$test_cygdrive_prefix" = x; then
14954    # As a simple fix, exclude /usr/bin since it's not a real path.
14955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14957      # a path prefixed by /cygdrive for fixpath to work.
14958      new_path="$CYGWIN_ROOT_PATH$input_path"
14959    fi
14960  fi
14961
14962
14963  if test "x$path" != "x$new_path"; then
14964    BOOT_JDK="$new_path"
14965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14966$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14967  fi
14968
14969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14970
14971  path="$BOOT_JDK"
14972  has_colon=`$ECHO $path | $GREP ^.:`
14973  new_path="$path"
14974  if test "x$has_colon" = x; then
14975    # Not in mixed or Windows style, start by that.
14976    new_path=`cmd //c echo $path`
14977  fi
14978
14979
14980  input_path="$new_path"
14981  # Check if we need to convert this using DOS-style short mode. If the path
14982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14983  # take no chances and rewrite it.
14984  # Note: m4 eats our [], so we need to use [ and ] instead.
14985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14986  if test "x$has_forbidden_chars" != x; then
14987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14989  fi
14990
14991
14992  windows_path="$new_path"
14993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14994    unix_path=`$CYGPATH -u "$windows_path"`
14995    new_path="$unix_path"
14996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14998    new_path="$unix_path"
14999  fi
15000
15001  if test "x$path" != "x$new_path"; then
15002    BOOT_JDK="$new_path"
15003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15004$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15005  fi
15006
15007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15009
15010  else
15011    # We're on a posix platform. Hooray! :)
15012    path="$BOOT_JDK"
15013
15014    if test ! -f "$path" && test ! -d "$path"; then
15015      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15016    fi
15017
15018    has_space=`$ECHO "$path" | $GREP " "`
15019    if test "x$has_space" != x; then
15020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15021$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15022      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15023    fi
15024  fi
15025
15026              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15027$as_echo_n "checking for Boot JDK... " >&6; }
15028              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15029$as_echo "$BOOT_JDK" >&6; }
15030              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15031$as_echo_n "checking Boot JDK version... " >&6; }
15032              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15033              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15034$as_echo "$BOOT_JDK_VERSION" >&6; }
15035            fi # end check jdk version
15036          fi # end check rt.jar
15037        fi # end check javac
15038      fi # end check java
15039    fi # end check boot jdk found
15040  fi
15041
15042    done
15043  fi
15044
15045
15046    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15047    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15048      # Do we have a bin/java?
15049      if test ! -x "$BOOT_JDK/bin/java"; then
15050        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15052        BOOT_JDK_FOUND=no
15053      else
15054        # Do we have a bin/javac?
15055        if test ! -x "$BOOT_JDK/bin/javac"; then
15056          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15058          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15059$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15060          BOOT_JDK_FOUND=no
15061        else
15062          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15063          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15064            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15066            BOOT_JDK_FOUND=no
15067          else
15068            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15069            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15070
15071            # Extra M4 quote needed to protect [] in grep expression.
15072            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15073            if test "x$FOUND_VERSION_78" = x; then
15074              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15076              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15077$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15078              BOOT_JDK_FOUND=no
15079            else
15080              # We're done! :-)
15081              BOOT_JDK_FOUND=yes
15082
15083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15084
15085  # Input might be given as Windows format, start by converting to
15086  # unix format.
15087  path="$BOOT_JDK"
15088  new_path=`$CYGPATH -u "$path"`
15089
15090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15093  # "foo.exe" is OK but "foo" is an error.
15094  #
15095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15096  # It is also a way to make sure we got the proper file name for the real test later on.
15097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15098  if test "x$test_shortpath" = x; then
15099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15100$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15101    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15102  fi
15103
15104  # Call helper function which possibly converts this using DOS-style short mode.
15105  # If so, the updated path is stored in $new_path.
15106
15107  input_path="$new_path"
15108  # Check if we need to convert this using DOS-style short mode. If the path
15109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15110  # take no chances and rewrite it.
15111  # Note: m4 eats our [], so we need to use [ and ] instead.
15112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15113  if test "x$has_forbidden_chars" != x; then
15114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15118      # Going to short mode and back again did indeed matter. Since short mode is
15119      # case insensitive, let's make it lowercase to improve readability.
15120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15121      # Now convert it back to Unix-stile (cygpath)
15122      input_path=`$CYGPATH -u "$shortmode_path"`
15123      new_path="$input_path"
15124    fi
15125  fi
15126
15127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15128  if test "x$test_cygdrive_prefix" = x; then
15129    # As a simple fix, exclude /usr/bin since it's not a real path.
15130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15132      # a path prefixed by /cygdrive for fixpath to work.
15133      new_path="$CYGWIN_ROOT_PATH$input_path"
15134    fi
15135  fi
15136
15137
15138  if test "x$path" != "x$new_path"; then
15139    BOOT_JDK="$new_path"
15140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15142  fi
15143
15144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15145
15146  path="$BOOT_JDK"
15147  has_colon=`$ECHO $path | $GREP ^.:`
15148  new_path="$path"
15149  if test "x$has_colon" = x; then
15150    # Not in mixed or Windows style, start by that.
15151    new_path=`cmd //c echo $path`
15152  fi
15153
15154
15155  input_path="$new_path"
15156  # Check if we need to convert this using DOS-style short mode. If the path
15157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15158  # take no chances and rewrite it.
15159  # Note: m4 eats our [], so we need to use [ and ] instead.
15160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15161  if test "x$has_forbidden_chars" != x; then
15162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15164  fi
15165
15166
15167  windows_path="$new_path"
15168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15169    unix_path=`$CYGPATH -u "$windows_path"`
15170    new_path="$unix_path"
15171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15173    new_path="$unix_path"
15174  fi
15175
15176  if test "x$path" != "x$new_path"; then
15177    BOOT_JDK="$new_path"
15178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15180  fi
15181
15182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15184
15185  else
15186    # We're on a posix platform. Hooray! :)
15187    path="$BOOT_JDK"
15188
15189    if test ! -f "$path" && test ! -d "$path"; then
15190      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15191    fi
15192
15193    has_space=`$ECHO "$path" | $GREP " "`
15194    if test "x$has_space" != x; then
15195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15196$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15197      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15198    fi
15199  fi
15200
15201              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15202$as_echo_n "checking for Boot JDK... " >&6; }
15203              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15204$as_echo "$BOOT_JDK" >&6; }
15205              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15206$as_echo_n "checking Boot JDK version... " >&6; }
15207              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15208              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15209$as_echo "$BOOT_JDK_VERSION" >&6; }
15210            fi # end check jdk version
15211          fi # end check rt.jar
15212        fi # end check javac
15213      fi # end check java
15214    fi # end check boot jdk found
15215  fi
15216
15217  fi
15218
15219
15220    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15221    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15222      # Do we have a bin/java?
15223      if test ! -x "$BOOT_JDK/bin/java"; then
15224        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15225$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15226        BOOT_JDK_FOUND=no
15227      else
15228        # Do we have a bin/javac?
15229        if test ! -x "$BOOT_JDK/bin/javac"; then
15230          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15232          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15233$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15234          BOOT_JDK_FOUND=no
15235        else
15236          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15237          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15238            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15240            BOOT_JDK_FOUND=no
15241          else
15242            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15243            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15244
15245            # Extra M4 quote needed to protect [] in grep expression.
15246            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15247            if test "x$FOUND_VERSION_78" = x; then
15248              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15250              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15251$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15252              BOOT_JDK_FOUND=no
15253            else
15254              # We're done! :-)
15255              BOOT_JDK_FOUND=yes
15256
15257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15258
15259  # Input might be given as Windows format, start by converting to
15260  # unix format.
15261  path="$BOOT_JDK"
15262  new_path=`$CYGPATH -u "$path"`
15263
15264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15267  # "foo.exe" is OK but "foo" is an error.
15268  #
15269  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15270  # It is also a way to make sure we got the proper file name for the real test later on.
15271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15272  if test "x$test_shortpath" = x; then
15273    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15274$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15275    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15276  fi
15277
15278  # Call helper function which possibly converts this using DOS-style short mode.
15279  # If so, the updated path is stored in $new_path.
15280
15281  input_path="$new_path"
15282  # Check if we need to convert this using DOS-style short mode. If the path
15283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15284  # take no chances and rewrite it.
15285  # Note: m4 eats our [], so we need to use [ and ] instead.
15286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15287  if test "x$has_forbidden_chars" != x; then
15288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15292      # Going to short mode and back again did indeed matter. Since short mode is
15293      # case insensitive, let's make it lowercase to improve readability.
15294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15295      # Now convert it back to Unix-stile (cygpath)
15296      input_path=`$CYGPATH -u "$shortmode_path"`
15297      new_path="$input_path"
15298    fi
15299  fi
15300
15301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15302  if test "x$test_cygdrive_prefix" = x; then
15303    # As a simple fix, exclude /usr/bin since it's not a real path.
15304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15306      # a path prefixed by /cygdrive for fixpath to work.
15307      new_path="$CYGWIN_ROOT_PATH$input_path"
15308    fi
15309  fi
15310
15311
15312  if test "x$path" != "x$new_path"; then
15313    BOOT_JDK="$new_path"
15314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15316  fi
15317
15318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15319
15320  path="$BOOT_JDK"
15321  has_colon=`$ECHO $path | $GREP ^.:`
15322  new_path="$path"
15323  if test "x$has_colon" = x; then
15324    # Not in mixed or Windows style, start by that.
15325    new_path=`cmd //c echo $path`
15326  fi
15327
15328
15329  input_path="$new_path"
15330  # Check if we need to convert this using DOS-style short mode. If the path
15331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15332  # take no chances and rewrite it.
15333  # Note: m4 eats our [], so we need to use [ and ] instead.
15334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15335  if test "x$has_forbidden_chars" != x; then
15336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15338  fi
15339
15340
15341  windows_path="$new_path"
15342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15343    unix_path=`$CYGPATH -u "$windows_path"`
15344    new_path="$unix_path"
15345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15347    new_path="$unix_path"
15348  fi
15349
15350  if test "x$path" != "x$new_path"; then
15351    BOOT_JDK="$new_path"
15352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15353$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15354  fi
15355
15356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15358
15359  else
15360    # We're on a posix platform. Hooray! :)
15361    path="$BOOT_JDK"
15362
15363    if test ! -f "$path" && test ! -d "$path"; then
15364      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15365    fi
15366
15367    has_space=`$ECHO "$path" | $GREP " "`
15368    if test "x$has_space" != x; then
15369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15371      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15372    fi
15373  fi
15374
15375              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15376$as_echo_n "checking for Boot JDK... " >&6; }
15377              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15378$as_echo "$BOOT_JDK" >&6; }
15379              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15380$as_echo_n "checking Boot JDK version... " >&6; }
15381              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15382              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15383$as_echo "$BOOT_JDK_VERSION" >&6; }
15384            fi # end check jdk version
15385          fi # end check rt.jar
15386        fi # end check javac
15387      fi # end check java
15388    fi # end check boot jdk found
15389  fi
15390
15391
15392# If we haven't found anything yet, we've truly lost. Give up.
15393if test "x$BOOT_JDK_FOUND" = xno; then
15394
15395    # Print a helpful message on how to acquire the necessary build dependency.
15396    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15397    MISSING_DEPENDENCY=openjdk
15398    PKGHANDLER_COMMAND=
15399
15400    case $PKGHANDLER in
15401	apt-get)
15402                apt_help     $MISSING_DEPENDENCY ;;
15403    yum)
15404                yum_help     $MISSING_DEPENDENCY ;;
15405	port)
15406                port_help    $MISSING_DEPENDENCY ;;
15407	pkgutil)
15408                pkgutil_help $MISSING_DEPENDENCY ;;
15409	pkgadd)
15410                pkgadd_help  $MISSING_DEPENDENCY ;;
15411    * )
15412      break ;;
15413    esac
15414
15415    if test "x$PKGHANDLER_COMMAND" != x; then
15416        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15417    fi
15418
15419  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15420$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15421  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15422$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15423  as_fn_error $? "Cannot continue" "$LINENO" 5
15424fi
15425
15426# Setup proper paths for what we found
15427BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15428if test ! -f "$BOOT_RTJAR"; then
15429    # On MacOSX it is called classes.jar
15430    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15431    if test -f "$BOOT_RTJAR"; then
15432      # Remove the ..
15433      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15434    fi
15435fi
15436BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15437BOOT_JDK="$BOOT_JDK"
15438
15439
15440
15441
15442# Setup tools from the Boot JDK.
15443
15444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15445$as_echo_n "checking for java in Boot JDK... " >&6; }
15446  JAVA=$BOOT_JDK/bin/java
15447  if test ! -x $JAVA; then
15448      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15449$as_echo "not found" >&6; }
15450      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15451$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15452      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15453  fi
15454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15455$as_echo "ok" >&6; }
15456
15457
15458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15459$as_echo_n "checking for javac in Boot JDK... " >&6; }
15460  JAVAC=$BOOT_JDK/bin/javac
15461  if test ! -x $JAVAC; then
15462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15463$as_echo "not found" >&6; }
15464      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15465$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15466      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15467  fi
15468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15469$as_echo "ok" >&6; }
15470
15471
15472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15473$as_echo_n "checking for javah in Boot JDK... " >&6; }
15474  JAVAH=$BOOT_JDK/bin/javah
15475  if test ! -x $JAVAH; then
15476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15477$as_echo "not found" >&6; }
15478      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15479$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15480      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15481  fi
15482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15483$as_echo "ok" >&6; }
15484
15485
15486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15487$as_echo_n "checking for javap in Boot JDK... " >&6; }
15488  JAVAP=$BOOT_JDK/bin/javap
15489  if test ! -x $JAVAP; then
15490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15491$as_echo "not found" >&6; }
15492      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15493$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15494      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15495  fi
15496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15497$as_echo "ok" >&6; }
15498
15499
15500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15501$as_echo_n "checking for jar in Boot JDK... " >&6; }
15502  JAR=$BOOT_JDK/bin/jar
15503  if test ! -x $JAR; then
15504      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15505$as_echo "not found" >&6; }
15506      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15507$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15508      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15509  fi
15510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15511$as_echo "ok" >&6; }
15512
15513
15514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15515$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15516  RMIC=$BOOT_JDK/bin/rmic
15517  if test ! -x $RMIC; then
15518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15519$as_echo "not found" >&6; }
15520      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15521$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15522      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15523  fi
15524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15525$as_echo "ok" >&6; }
15526
15527
15528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15529$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15530  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15531  if test ! -x $NATIVE2ASCII; then
15532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15533$as_echo "not found" >&6; }
15534      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15535$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15536      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15537  fi
15538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15539$as_echo "ok" >&6; }
15540
15541
15542# Finally, set some other options...
15543
15544# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15545BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15546
15547
15548
15549
15550##############################################################################
15551#
15552# Specify options for anything that is run with the Boot JDK.
15553#
15554
15555# Check whether --with-boot-jdk-jvmargs was given.
15556if test "${with_boot_jdk_jvmargs+set}" = set; then :
15557  withval=$with_boot_jdk_jvmargs;
15558fi
15559
15560
15561if test "x$with_boot_jdk_jvmargs" = x; then
15562    # Not all JVM:s accept the same arguments on the command line.
15563    # OpenJDK specific increase in thread stack for JDK build,
15564    # well more specifically, when running javac.
15565    if test "x$BUILD_NUM_BITS" = x32; then
15566       STACK_SIZE=768
15567    else
15568       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15569       # since 64-bit pointers are pushed on the stach. Apparently, we need
15570       # to increase the stack space when javacing the JDK....
15571       STACK_SIZE=1536
15572    fi
15573
15574    # Minimum amount of heap memory.
15575
15576    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15577    # If so, then append -Xms64M to boot_jdk_jvmargs
15578    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15579    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15580    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15581        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15582    fi
15583
15584    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15585        # Why does macosx need more heap? Its the huge JDK batch.
15586
15587    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15588    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15589    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15590    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15591    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15592        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15593    fi
15594
15595    else
15596
15597    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15598    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15599    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15600    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15601    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15602        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15603    fi
15604
15605    fi
15606    # When is adding -client something that speeds up the JVM?
15607    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15608
15609    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15610    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15611    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15612    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15613    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15614        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15615    fi
15616
15617
15618    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15619    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15620    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15621    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15622    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15623        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15624    fi
15625
15626
15627    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15628    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15629    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15630    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15631    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15632        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15633    fi
15634
15635    # Disable special log output when a debug build is used as Boot JDK...
15636
15637    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15638    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15639    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15640    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15641    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15642        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15643    fi
15644
15645fi
15646
15647BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15648
15649
15650
15651###############################################################################
15652#
15653# Configure the sources to use. We can add or override individual directories.
15654#
15655###############################################################################
15656
15657
15658
15659# Where are the sources. Any of these can be overridden
15660# using --with-override-corba and the likes.
15661LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15662CORBA_TOPDIR="$SRC_ROOT/corba"
15663JAXP_TOPDIR="$SRC_ROOT/jaxp"
15664JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15665HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15666JDK_TOPDIR="$SRC_ROOT/jdk"
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676###############################################################################
15677#
15678# Pickup additional source for a component from outside of the source root
15679# or override source for a component.
15680#
15681
15682# Check whether --with-add-source-root was given.
15683if test "${with_add_source_root+set}" = set; then :
15684  withval=$with_add_source_root;
15685fi
15686
15687
15688
15689# Check whether --with-override-source-root was given.
15690if test "${with_override_source_root+set}" = set; then :
15691  withval=$with_override_source_root;
15692fi
15693
15694
15695
15696# Check whether --with-adds-and-overrides was given.
15697if test "${with_adds_and_overrides+set}" = set; then :
15698  withval=$with_adds_and_overrides;
15699fi
15700
15701
15702if test "x$with_adds_and_overrides" != x; then
15703    with_add_source_root="$with_adds_and_overrides/adds"
15704    with_override_source_root="$with_adds_and_overrides/overrides"
15705fi
15706
15707if test "x$with_add_source_root" != x; then
15708    if ! test -d $with_add_source_root; then
15709       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15710    fi
15711    CURDIR="$PWD"
15712    cd "$with_add_source_root"
15713    ADD_SRC_ROOT="`pwd`"
15714    cd "$CURDIR"
15715    # Verify that the addon source root does not have any root makefiles.
15716    # If it does, then it is usually an error, prevent this.
15717    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15718       test -f $with_add_source_root/langtools/make/Makefile; then
15719        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
15720    fi
15721    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15722       test -f $with_add_source_root/corba/make/Makefile; then
15723        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
15724    fi
15725    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15726       test -f $with_add_source_root/jaxp/make/Makefile; then
15727        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
15728    fi
15729    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15730       test -f $with_add_source_root/jaxws/make/Makefile; then
15731        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
15732    fi
15733    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15734       test -f $with_add_source_root/hotspot/make/Makefile; then
15735        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
15736    fi
15737    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15738       test -f $with_add_source_root/jdk/make/Makefile; then
15739        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
15740    fi
15741fi
15742
15743
15744if test "x$with_override_source_root" != x; then
15745    if ! test -d $with_override_source_root; then
15746       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15747    fi
15748    CURDIR="$PWD"
15749    cd "$with_override_source_root"
15750    OVERRIDE_SRC_ROOT="`pwd`"
15751    cd "$CURDIR"
15752    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15753       test -f $with_override_source_root/langtools/make/Makefile; then
15754        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
15755    fi
15756    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15757       test -f $with_override_source_root/corba/make/Makefile; then
15758        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
15759    fi
15760    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15761       test -f $with_override_source_root/jaxp/make/Makefile; then
15762        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
15763    fi
15764    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15765       test -f $with_override_source_root/jaxws/make/Makefile; then
15766        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
15767    fi
15768    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15769       test -f $with_override_source_root/hotspot/make/Makefile; then
15770        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
15771    fi
15772    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15773       test -f $with_override_source_root/jdk/make/Makefile; then
15774        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
15775    fi
15776fi
15777
15778
15779###############################################################################
15780#
15781# Override a repo completely, this is used for example when you have 3 small
15782# development sandboxes of the langtools sources and want to avoid having 3 full
15783# OpenJDK sources checked out on disk.
15784#
15785# Assuming that the 3 langtools sandboxes are located here:
15786# /home/fredrik/sandbox1/langtools
15787# /home/fredrik/sandbox2/langtools
15788# /home/fredrik/sandbox3/langtools
15789#
15790# From the source root you create build subdirs manually:
15791#     mkdir -p build1 build2 build3
15792# in each build directory run:
15793#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15794#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15795#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15796#
15797
15798
15799# Check whether --with-override-langtools was given.
15800if test "${with_override_langtools+set}" = set; then :
15801  withval=$with_override_langtools;
15802fi
15803
15804
15805
15806# Check whether --with-override-corba was given.
15807if test "${with_override_corba+set}" = set; then :
15808  withval=$with_override_corba;
15809fi
15810
15811
15812
15813# Check whether --with-override-jaxp was given.
15814if test "${with_override_jaxp+set}" = set; then :
15815  withval=$with_override_jaxp;
15816fi
15817
15818
15819
15820# Check whether --with-override-jaxws was given.
15821if test "${with_override_jaxws+set}" = set; then :
15822  withval=$with_override_jaxws;
15823fi
15824
15825
15826
15827# Check whether --with-override-hotspot was given.
15828if test "${with_override_hotspot+set}" = set; then :
15829  withval=$with_override_hotspot;
15830fi
15831
15832
15833
15834# Check whether --with-override-jdk was given.
15835if test "${with_override_jdk+set}" = set; then :
15836  withval=$with_override_jdk;
15837fi
15838
15839
15840if test "x$with_override_langtools" != x; then
15841    CURDIR="$PWD"
15842    cd "$with_override_langtools"
15843    LANGTOOLS_TOPDIR="`pwd`"
15844    cd "$CURDIR"
15845    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15846        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15847    fi
15848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15849$as_echo_n "checking if langtools should be overridden... " >&6; }
15850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15851$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15852fi
15853if test "x$with_override_corba" != x; then
15854    CURDIR="$PWD"
15855    cd "$with_override_corba"
15856    CORBA_TOPDIR="`pwd`"
15857    cd "$CURDIR"
15858    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15859        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15860    fi
15861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15862$as_echo_n "checking if corba should be overridden... " >&6; }
15863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15864$as_echo "yes with $CORBA_TOPDIR" >&6; }
15865fi
15866if test "x$with_override_jaxp" != x; then
15867    CURDIR="$PWD"
15868    cd "$with_override_jaxp"
15869    JAXP_TOPDIR="`pwd`"
15870    cd "$CURDIR"
15871    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15872        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15873    fi
15874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15875$as_echo_n "checking if jaxp should be overridden... " >&6; }
15876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15877$as_echo "yes with $JAXP_TOPDIR" >&6; }
15878fi
15879if test "x$with_override_jaxws" != x; then
15880    CURDIR="$PWD"
15881    cd "$with_override_jaxws"
15882    JAXWS_TOPDIR="`pwd`"
15883    cd "$CURDIR"
15884    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15885        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15886    fi
15887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15888$as_echo_n "checking if jaxws should be overridden... " >&6; }
15889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15890$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15891fi
15892if test "x$with_override_hotspot" != x; then
15893    CURDIR="$PWD"
15894    cd "$with_override_hotspot"
15895    HOTSPOT_TOPDIR="`pwd`"
15896    cd "$CURDIR"
15897    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15898       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15899        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15900    fi
15901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15902$as_echo_n "checking if hotspot should be overridden... " >&6; }
15903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15904$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15905fi
15906if test "x$with_override_jdk" != x; then
15907    CURDIR="$PWD"
15908    cd "$with_override_jdk"
15909    JDK_TOPDIR="`pwd`"
15910    cd "$CURDIR"
15911    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15912        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15913    fi
15914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15915$as_echo_n "checking if JDK should be overridden... " >&6; }
15916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15917$as_echo "yes with $JDK_TOPDIR" >&6; }
15918fi
15919
15920
15921
15922BUILD_OUTPUT="$OUTPUT_ROOT"
15923
15924
15925HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15926BUILD_HOTSPOT=true
15927
15928
15929
15930# Check whether --with-import-hotspot was given.
15931if test "${with_import_hotspot+set}" = set; then :
15932  withval=$with_import_hotspot;
15933fi
15934
15935if test "x$with_import_hotspot" != x; then
15936    CURDIR="$PWD"
15937    cd "$with_import_hotspot"
15938    HOTSPOT_DIST="`pwd`"
15939    cd "$CURDIR"
15940    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15941        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15942    fi
15943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15944$as_echo_n "checking if hotspot should be imported... " >&6; }
15945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15946$as_echo "yes from $HOTSPOT_DIST" >&6; }
15947    BUILD_HOTSPOT=false
15948fi
15949
15950JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15951
15952
15953###############################################################################
15954#
15955# Setup the toolchain (compilers etc), i.e. the tools that need to be
15956# cross-compilation aware.
15957#
15958###############################################################################
15959
15960
15961###############################################################################
15962#
15963# Configure the development tool paths and potential sysroot.
15964#
15965ac_ext=cpp
15966ac_cpp='$CXXCPP $CPPFLAGS'
15967ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15968ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15969ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15970
15971
15972# The option used to specify the target .o,.a or .so file.
15973# When compiling, how to specify the to be created object file.
15974CC_OUT_OPTION='-o$(SPACE)'
15975# When linking, how to specify the to be created executable.
15976EXE_OUT_OPTION='-o$(SPACE)'
15977# When linking, how to specify the to be created dynamically linkable library.
15978LD_OUT_OPTION='-o$(SPACE)'
15979# When archiving, how to specify the to be create static archive for object files.
15980AR_OUT_OPTION='rcs$(SPACE)'
15981
15982
15983
15984
15985
15986# Locate the actual tools
15987
15988if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15989
15990  # Store path to cygwin link.exe to help excluding it when searching for
15991  # VS linker. This must be done before changing the PATH when looking for VS.
15992  # Extract the first word of "link", so it can be a program name with args.
15993set dummy link; ac_word=$2
15994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15995$as_echo_n "checking for $ac_word... " >&6; }
15996if ${ac_cv_path_CYGWIN_LINK+:} false; then :
15997  $as_echo_n "(cached) " >&6
15998else
15999  case $CYGWIN_LINK in
16000  [\\/]* | ?:[\\/]*)
16001  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16002  ;;
16003  *)
16004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16005for as_dir in $PATH
16006do
16007  IFS=$as_save_IFS
16008  test -z "$as_dir" && as_dir=.
16009    for ac_exec_ext in '' $ac_executable_extensions; do
16010  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16011    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16013    break 2
16014  fi
16015done
16016  done
16017IFS=$as_save_IFS
16018
16019  ;;
16020esac
16021fi
16022CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16023if test -n "$CYGWIN_LINK"; then
16024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16025$as_echo "$CYGWIN_LINK" >&6; }
16026else
16027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16028$as_echo "no" >&6; }
16029fi
16030
16031
16032  if test "x$CYGWIN_LINK" != x; then
16033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16034$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16035    "$CYGWIN_LINK" --version > /dev/null
16036    if test $? -eq 0 ; then
16037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16038$as_echo "yes" >&6; }
16039    else
16040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16041$as_echo "no" >&6; }
16042      # This might be the VS linker. Don't exclude it later on.
16043      CYGWIN_LINK=""
16044    fi
16045  fi
16046
16047  # First-hand choice is to locate and run the vsvars bat file.
16048
16049  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16050    VCVARSFILE="vc/bin/vcvars32.bat"
16051  else
16052    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16053  fi
16054
16055  VS_ENV_CMD=""
16056  VS_ENV_ARGS=""
16057  if test "x$with_toolsdir" != x; then
16058
16059  if test "x$VS_ENV_CMD" = x; then
16060    VS100BASE="$with_toolsdir/../.."
16061    METHOD="--with-tools-dir"
16062
16063  windows_path="$VS100BASE"
16064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16065    unix_path=`$CYGPATH -u "$windows_path"`
16066    VS100BASE="$unix_path"
16067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16069    VS100BASE="$unix_path"
16070  fi
16071
16072    if test -d "$VS100BASE"; then
16073      if test -f "$VS100BASE/$VCVARSFILE"; then
16074        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16075$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16076        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16077      else
16078        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16079$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16080        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16081$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16082      fi
16083    fi
16084  fi
16085
16086  fi
16087
16088  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16089    # Having specified an argument which is incorrect will produce an instant failure;
16090    # we should not go on looking
16091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16092$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16093    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16094$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16095    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16096  fi
16097
16098  if test "x$ProgramW6432" != x; then
16099
16100  if test "x$VS_ENV_CMD" = x; then
16101    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16102    METHOD="well-known name"
16103
16104  windows_path="$WIN_SDK_BASE"
16105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16106    unix_path=`$CYGPATH -u "$windows_path"`
16107    WIN_SDK_BASE="$unix_path"
16108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16110    WIN_SDK_BASE="$unix_path"
16111  fi
16112
16113    if test -d "$WIN_SDK_BASE"; then
16114      # There have been cases of partial or broken SDK installations. A missing
16115      # lib dir is not going to work.
16116      if test ! -d "$WIN_SDK_BASE/../lib"; then
16117        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16118$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16119        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16120$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16121      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16122        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16123$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16124        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16125        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16126          VS_ENV_ARGS="/x86"
16127        else
16128          VS_ENV_ARGS="/x64"
16129        fi
16130      else
16131        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16132$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16133        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16134$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16135      fi
16136    fi
16137  fi
16138
16139  fi
16140  if test "x$PROGRAMW6432" != x; then
16141
16142  if test "x$VS_ENV_CMD" = x; then
16143    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16144    METHOD="well-known name"
16145
16146  windows_path="$WIN_SDK_BASE"
16147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16148    unix_path=`$CYGPATH -u "$windows_path"`
16149    WIN_SDK_BASE="$unix_path"
16150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16152    WIN_SDK_BASE="$unix_path"
16153  fi
16154
16155    if test -d "$WIN_SDK_BASE"; then
16156      # There have been cases of partial or broken SDK installations. A missing
16157      # lib dir is not going to work.
16158      if test ! -d "$WIN_SDK_BASE/../lib"; then
16159        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16160$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16161        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16162$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16163      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16164        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16165$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16166        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16167        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16168          VS_ENV_ARGS="/x86"
16169        else
16170          VS_ENV_ARGS="/x64"
16171        fi
16172      else
16173        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16174$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16175        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16176$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16177      fi
16178    fi
16179  fi
16180
16181  fi
16182  if test "x$PROGRAMFILES" != x; then
16183
16184  if test "x$VS_ENV_CMD" = x; then
16185    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16186    METHOD="well-known name"
16187
16188  windows_path="$WIN_SDK_BASE"
16189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16190    unix_path=`$CYGPATH -u "$windows_path"`
16191    WIN_SDK_BASE="$unix_path"
16192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16194    WIN_SDK_BASE="$unix_path"
16195  fi
16196
16197    if test -d "$WIN_SDK_BASE"; then
16198      # There have been cases of partial or broken SDK installations. A missing
16199      # lib dir is not going to work.
16200      if test ! -d "$WIN_SDK_BASE/../lib"; then
16201        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16202$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16203        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16204$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16205      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16206        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16207$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16208        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16209        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16210          VS_ENV_ARGS="/x86"
16211        else
16212          VS_ENV_ARGS="/x64"
16213        fi
16214      else
16215        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16216$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16217        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16218$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16219      fi
16220    fi
16221  fi
16222
16223  fi
16224
16225  if test "x$VS_ENV_CMD" = x; then
16226    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16227    METHOD="well-known name"
16228
16229  windows_path="$WIN_SDK_BASE"
16230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16231    unix_path=`$CYGPATH -u "$windows_path"`
16232    WIN_SDK_BASE="$unix_path"
16233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16235    WIN_SDK_BASE="$unix_path"
16236  fi
16237
16238    if test -d "$WIN_SDK_BASE"; then
16239      # There have been cases of partial or broken SDK installations. A missing
16240      # lib dir is not going to work.
16241      if test ! -d "$WIN_SDK_BASE/../lib"; then
16242        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16243$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16244        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16245$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16246      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16247        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16248$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16249        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16250        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16251          VS_ENV_ARGS="/x86"
16252        else
16253          VS_ENV_ARGS="/x64"
16254        fi
16255      else
16256        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16257$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16258        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16259$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16260      fi
16261    fi
16262  fi
16263
16264
16265  if test "x$VS_ENV_CMD" = x; then
16266    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16267    METHOD="well-known name"
16268
16269  windows_path="$WIN_SDK_BASE"
16270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16271    unix_path=`$CYGPATH -u "$windows_path"`
16272    WIN_SDK_BASE="$unix_path"
16273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16275    WIN_SDK_BASE="$unix_path"
16276  fi
16277
16278    if test -d "$WIN_SDK_BASE"; then
16279      # There have been cases of partial or broken SDK installations. A missing
16280      # lib dir is not going to work.
16281      if test ! -d "$WIN_SDK_BASE/../lib"; then
16282        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16283$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16284        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16285$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16286      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16287        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16288$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16289        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16290        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16291          VS_ENV_ARGS="/x86"
16292        else
16293          VS_ENV_ARGS="/x64"
16294        fi
16295      else
16296        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16297$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16298        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16299$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16300      fi
16301    fi
16302  fi
16303
16304
16305  if test "x$VS100COMNTOOLS" != x; then
16306
16307  if test "x$VS_ENV_CMD" = x; then
16308    VS100BASE="$VS100COMNTOOLS/../.."
16309    METHOD="VS100COMNTOOLS variable"
16310
16311  windows_path="$VS100BASE"
16312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16313    unix_path=`$CYGPATH -u "$windows_path"`
16314    VS100BASE="$unix_path"
16315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16317    VS100BASE="$unix_path"
16318  fi
16319
16320    if test -d "$VS100BASE"; then
16321      if test -f "$VS100BASE/$VCVARSFILE"; then
16322        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16323$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16324        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16325      else
16326        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16327$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16328        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16329$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16330      fi
16331    fi
16332  fi
16333
16334  fi
16335  if test "x$PROGRAMFILES" != x; then
16336
16337  if test "x$VS_ENV_CMD" = x; then
16338    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16339    METHOD="well-known name"
16340
16341  windows_path="$VS100BASE"
16342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16343    unix_path=`$CYGPATH -u "$windows_path"`
16344    VS100BASE="$unix_path"
16345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16347    VS100BASE="$unix_path"
16348  fi
16349
16350    if test -d "$VS100BASE"; then
16351      if test -f "$VS100BASE/$VCVARSFILE"; then
16352        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16353$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16354        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16355      else
16356        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16357$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16358        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16359$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16360      fi
16361    fi
16362  fi
16363
16364  fi
16365
16366  if test "x$VS_ENV_CMD" = x; then
16367    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16368    METHOD="well-known name"
16369
16370  windows_path="$VS100BASE"
16371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16372    unix_path=`$CYGPATH -u "$windows_path"`
16373    VS100BASE="$unix_path"
16374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16376    VS100BASE="$unix_path"
16377  fi
16378
16379    if test -d "$VS100BASE"; then
16380      if test -f "$VS100BASE/$VCVARSFILE"; then
16381        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16382$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16383        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16384      else
16385        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16386$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16387        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16388$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16389      fi
16390    fi
16391  fi
16392
16393
16394  if test "x$VS_ENV_CMD" = x; then
16395    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16396    METHOD="well-known name"
16397
16398  windows_path="$VS100BASE"
16399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16400    unix_path=`$CYGPATH -u "$windows_path"`
16401    VS100BASE="$unix_path"
16402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16404    VS100BASE="$unix_path"
16405  fi
16406
16407    if test -d "$VS100BASE"; then
16408      if test -f "$VS100BASE/$VCVARSFILE"; then
16409        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16410$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16411        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16412      else
16413        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16414$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16415        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16416$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16417      fi
16418    fi
16419  fi
16420
16421
16422  if test "x$VS_ENV_CMD" != x; then
16423    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16424
16425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16426
16427  # First separate the path from the arguments. This will split at the first
16428  # space.
16429  complete="$VS_ENV_CMD"
16430  path="${complete%% *}"
16431  tmp="$complete EOL"
16432  arguments="${tmp#* }"
16433
16434  # Input might be given as Windows format, start by converting to
16435  # unix format.
16436  new_path=`$CYGPATH -u "$path"`
16437
16438  # Now try to locate executable using which
16439  new_path=`$WHICH "$new_path" 2> /dev/null`
16440  # bat and cmd files are not always considered executable in cygwin causing which
16441  # to not find them
16442  if test "x$new_path" = x \
16443           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16444           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16445    new_path=`$CYGPATH -u "$path"`
16446  fi
16447  if test "x$new_path" = x; then
16448    # Oops. Which didn't find the executable.
16449    # The splitting of arguments from the executable at a space might have been incorrect,
16450    # since paths with space are more likely in Windows. Give it another try with the whole
16451    # argument.
16452    path="$complete"
16453    arguments="EOL"
16454    new_path=`$CYGPATH -u "$path"`
16455    new_path=`$WHICH "$new_path" 2> /dev/null`
16456    # bat and cmd files are not always considered executable in cygwin causing which
16457    # to not find them
16458    if test "x$new_path" = x \
16459             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16460             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16461      new_path=`$CYGPATH -u "$path"`
16462    fi
16463    if test "x$new_path" = x; then
16464      # It's still not found. Now this is an unrecoverable error.
16465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16466$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16467      has_space=`$ECHO "$complete" | $GREP " "`
16468      if test "x$has_space" != x; then
16469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16471      fi
16472      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16473    fi
16474  fi
16475
16476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16479  # "foo.exe" is OK but "foo" is an error.
16480  #
16481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16482  # It is also a way to make sure we got the proper file name for the real test later on.
16483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16484  if test "x$test_shortpath" = x; then
16485    # Short path failed, file does not exist as specified.
16486    # Try adding .exe or .cmd
16487    if test -f "${new_path}.exe"; then
16488       input_to_shortpath="${new_path}.exe"
16489    elif test -f "${new_path}.cmd"; then
16490       input_to_shortpath="${new_path}.cmd"
16491    else
16492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16493$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16494      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16495$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16496      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16497    fi
16498  else
16499    input_to_shortpath="$new_path"
16500  fi
16501
16502  # Call helper function which possibly converts this using DOS-style short mode.
16503  # If so, the updated path is stored in $new_path.
16504  new_path="$input_to_shortpath"
16505
16506  input_path="$input_to_shortpath"
16507  # Check if we need to convert this using DOS-style short mode. If the path
16508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16509  # take no chances and rewrite it.
16510  # Note: m4 eats our [], so we need to use [ and ] instead.
16511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16512  if test "x$has_forbidden_chars" != x; then
16513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16517      # Going to short mode and back again did indeed matter. Since short mode is
16518      # case insensitive, let's make it lowercase to improve readability.
16519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16520      # Now convert it back to Unix-stile (cygpath)
16521      input_path=`$CYGPATH -u "$shortmode_path"`
16522      new_path="$input_path"
16523    fi
16524  fi
16525
16526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16527  if test "x$test_cygdrive_prefix" = x; then
16528    # As a simple fix, exclude /usr/bin since it's not a real path.
16529    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16531      # a path prefixed by /cygdrive for fixpath to work.
16532      new_path="$CYGWIN_ROOT_PATH$input_path"
16533    fi
16534  fi
16535
16536  # remove trailing .exe if any
16537  new_path="${new_path/%.exe/}"
16538
16539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16540
16541  # First separate the path from the arguments. This will split at the first
16542  # space.
16543  complete="$VS_ENV_CMD"
16544  path="${complete%% *}"
16545  tmp="$complete EOL"
16546  arguments="${tmp#* }"
16547
16548  # Input might be given as Windows format, start by converting to
16549  # unix format.
16550  new_path="$path"
16551
16552  windows_path="$new_path"
16553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16554    unix_path=`$CYGPATH -u "$windows_path"`
16555    new_path="$unix_path"
16556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16558    new_path="$unix_path"
16559  fi
16560
16561
16562  # Now try to locate executable using which
16563  new_path=`$WHICH "$new_path" 2> /dev/null`
16564
16565  if test "x$new_path" = x; then
16566    # Oops. Which didn't find the executable.
16567    # The splitting of arguments from the executable at a space might have been incorrect,
16568    # since paths with space are more likely in Windows. Give it another try with the whole
16569    # argument.
16570    path="$complete"
16571    arguments="EOL"
16572    new_path="$path"
16573
16574  windows_path="$new_path"
16575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16576    unix_path=`$CYGPATH -u "$windows_path"`
16577    new_path="$unix_path"
16578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16580    new_path="$unix_path"
16581  fi
16582
16583
16584    new_path=`$WHICH "$new_path" 2> /dev/null`
16585
16586    if test "x$new_path" = x; then
16587      # It's still not found. Now this is an unrecoverable error.
16588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16589$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16590      has_space=`$ECHO "$complete" | $GREP " "`
16591      if test "x$has_space" != x; then
16592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16594      fi
16595      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16596    fi
16597  fi
16598
16599  # Now new_path has a complete unix path to the binary
16600  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16601    # Keep paths in /bin as-is, but remove trailing .exe if any
16602    new_path="${new_path/%.exe/}"
16603    # Do not save /bin paths to all_fixpath_prefixes!
16604  else
16605    # Not in mixed or Windows style, start by that.
16606    new_path=`cmd //c echo $new_path`
16607
16608  input_path="$new_path"
16609  # Check if we need to convert this using DOS-style short mode. If the path
16610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16611  # take no chances and rewrite it.
16612  # Note: m4 eats our [], so we need to use [ and ] instead.
16613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16614  if test "x$has_forbidden_chars" != x; then
16615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16617  fi
16618
16619    # Output is in $new_path
16620
16621  windows_path="$new_path"
16622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16623    unix_path=`$CYGPATH -u "$windows_path"`
16624    new_path="$unix_path"
16625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16627    new_path="$unix_path"
16628  fi
16629
16630    # remove trailing .exe if any
16631    new_path="${new_path/%.exe/}"
16632
16633    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16634    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16635  fi
16636
16637  else
16638    # We're on a posix platform. Hooray! :)
16639    # First separate the path from the arguments. This will split at the first
16640    # space.
16641    complete="$VS_ENV_CMD"
16642    path="${complete%% *}"
16643    tmp="$complete EOL"
16644    arguments="${tmp#* }"
16645
16646    # Cannot rely on the command "which" here since it doesn't always work.
16647    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16648    if test -z "$is_absolute_path"; then
16649      # Path to executable is not absolute. Find it.
16650      IFS_save="$IFS"
16651      IFS=:
16652      for p in $PATH; do
16653        if test -f "$p/$path" && test -x "$p/$path"; then
16654          new_path="$p/$path"
16655          break
16656        fi
16657      done
16658      IFS="$IFS_save"
16659    else
16660      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16661$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16662      new_path="$path"
16663    fi
16664
16665    if test "x$new_path" = x; then
16666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16667$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16668        has_space=`$ECHO "$complete" | $GREP " "`
16669        if test "x$has_space" != x; then
16670          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16671$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16672        fi
16673        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16674      fi
16675  fi
16676
16677      # Now join together the path and the arguments once again
16678      if test "x$arguments" != xEOL; then
16679        new_complete="$new_path ${arguments% *}"
16680      else
16681        new_complete="$new_path"
16682      fi
16683
16684  if test "x$complete" != "x$new_complete"; then
16685      VS_ENV_CMD="$new_complete"
16686      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16687$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16688    fi
16689
16690
16691    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16692    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16693$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16694    cd $OUTPUT_ROOT
16695    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16696    # to autoconf standards.
16697
16698    #----
16699
16700    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16701    # but calculate the difference in Cygwin environment before/after running it and then
16702    # apply the diff.
16703
16704    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16705      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16706      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16707      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16708    else
16709      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16710      _dosbash=`cmd //c echo \`which bash\``
16711    fi
16712
16713    # generate the set of exported vars before/after the vs10 setup
16714    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16715    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16716    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16717    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16718
16719    # Now execute the newly created bat file.
16720    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16721    cmd /c localdevenvtmp.bat | cat
16722
16723    # apply the diff (less some non-vs10 vars named by "!")
16724    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16725    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16726    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16727
16728    # cleanup
16729    $RM localdevenvtmp*
16730    #----
16731    cd $CURDIR
16732    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16734$as_echo "no" >&6; }
16735      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16736$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16737      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16738$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16739      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16740$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16741      as_fn_error $? "Cannot continue" "$LINENO" 5
16742    fi
16743
16744    # Now set all paths and other env variables. This will allow the rest of
16745    # the configure script to find and run the compiler in the proper way.
16746    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16747$as_echo "$as_me: Setting extracted environment variables" >&6;}
16748    . $OUTPUT_ROOT/localdevenv.sh
16749  else
16750    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16751    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16752$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16753  fi
16754
16755  # At this point, we should have corrent variables in the environment, or we can't continue.
16756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16757$as_echo_n "checking for Visual Studio variables... " >&6; }
16758
16759  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16760    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16762$as_echo "present but broken" >&6; }
16763      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16764    else
16765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16766$as_echo "ok" >&6; }
16767      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16768      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16769      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16770      VS_PATH="$PATH"
16771
16772
16773
16774    fi
16775  else
16776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16777$as_echo "not found" >&6; }
16778
16779    if test "x$VS_ENV_CMD" = x; then
16780      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16781$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16782      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16783$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16784    else
16785      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16786$as_echo "$as_me: Running the extraction script failed." >&6;}
16787    fi
16788    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16789$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16790    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16791$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16792    as_fn_error $? "Cannot continue" "$LINENO" 5
16793  fi
16794
16795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16796$as_echo_n "checking for msvcr100.dll... " >&6; }
16797
16798# Check whether --with-msvcr-dll was given.
16799if test "${with_msvcr_dll+set}" = set; then :
16800  withval=$with_msvcr_dll;
16801fi
16802
16803  if test "x$with_msvcr_dll" != x; then
16804    MSVCR_DLL="$with_msvcr_dll"
16805  else
16806    if test "x$VCINSTALLDIR" != x; then
16807      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16808        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16809      else
16810        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16811        if test "x$MSVCR_DLL" = x; then
16812          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16813        fi
16814      fi
16815      if test "x$MSVCR_DLL" != x; then
16816        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16817$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16818      else
16819        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16820$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16821      fi
16822    fi
16823    if test "x$MSVCR_DLL" = x; then
16824      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16825        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16826$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16827        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16828      fi
16829    fi
16830  fi
16831  if test "x$MSVCR_DLL" = x; then
16832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16833$as_echo "no" >&6; }
16834    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16835  fi
16836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16837$as_echo "$MSVCR_DLL" >&6; }
16838
16839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16840
16841  # Input might be given as Windows format, start by converting to
16842  # unix format.
16843  path="$MSVCR_DLL"
16844  new_path=`$CYGPATH -u "$path"`
16845
16846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16849  # "foo.exe" is OK but "foo" is an error.
16850  #
16851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16852  # It is also a way to make sure we got the proper file name for the real test later on.
16853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16854  if test "x$test_shortpath" = x; then
16855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16856$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16857    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16858  fi
16859
16860  # Call helper function which possibly converts this using DOS-style short mode.
16861  # If so, the updated path is stored in $new_path.
16862
16863  input_path="$new_path"
16864  # Check if we need to convert this using DOS-style short mode. If the path
16865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16866  # take no chances and rewrite it.
16867  # Note: m4 eats our [], so we need to use [ and ] instead.
16868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16869  if test "x$has_forbidden_chars" != x; then
16870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16874      # Going to short mode and back again did indeed matter. Since short mode is
16875      # case insensitive, let's make it lowercase to improve readability.
16876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16877      # Now convert it back to Unix-stile (cygpath)
16878      input_path=`$CYGPATH -u "$shortmode_path"`
16879      new_path="$input_path"
16880    fi
16881  fi
16882
16883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16884  if test "x$test_cygdrive_prefix" = x; then
16885    # As a simple fix, exclude /usr/bin since it's not a real path.
16886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16888      # a path prefixed by /cygdrive for fixpath to work.
16889      new_path="$CYGWIN_ROOT_PATH$input_path"
16890    fi
16891  fi
16892
16893
16894  if test "x$path" != "x$new_path"; then
16895    MSVCR_DLL="$new_path"
16896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16897$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16898  fi
16899
16900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16901
16902  path="$MSVCR_DLL"
16903  has_colon=`$ECHO $path | $GREP ^.:`
16904  new_path="$path"
16905  if test "x$has_colon" = x; then
16906    # Not in mixed or Windows style, start by that.
16907    new_path=`cmd //c echo $path`
16908  fi
16909
16910
16911  input_path="$new_path"
16912  # Check if we need to convert this using DOS-style short mode. If the path
16913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16914  # take no chances and rewrite it.
16915  # Note: m4 eats our [], so we need to use [ and ] instead.
16916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16917  if test "x$has_forbidden_chars" != x; then
16918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16920  fi
16921
16922
16923  windows_path="$new_path"
16924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16925    unix_path=`$CYGPATH -u "$windows_path"`
16926    new_path="$unix_path"
16927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16929    new_path="$unix_path"
16930  fi
16931
16932  if test "x$path" != "x$new_path"; then
16933    MSVCR_DLL="$new_path"
16934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16935$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16936  fi
16937
16938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16940
16941  else
16942    # We're on a posix platform. Hooray! :)
16943    path="$MSVCR_DLL"
16944
16945    if test ! -f "$path" && test ! -d "$path"; then
16946      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16947    fi
16948
16949    has_space=`$ECHO "$path" | $GREP " "`
16950    if test "x$has_space" != x; then
16951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16952$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16953      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16954    fi
16955  fi
16956
16957
16958fi
16959
16960
16961
16962# If --build AND --host is set, then the configure script will find any
16963# cross compilation tools in the PATH. Cross compilation tools
16964# follows the cross compilation standard where they are prefixed with ${host}.
16965# For example the binary i686-sun-solaris2.10-gcc
16966# will cross compile for i686-sun-solaris2.10
16967# If neither of build and host is not set, then build=host and the
16968# default compiler found in the path will be used.
16969# Setting only --host, does not seem to be really supported.
16970# Please set both --build and --host if you want to cross compile.
16971
16972if test "x$COMPILE_TYPE" = "xcross"; then
16973    # Now we to find a C/C++ compiler that can build executables for the build
16974    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16975    # once. Also, we need to do this before adding a tools dir to the path,
16976    # otherwise we might pick up cross-compilers which don't use standard naming.
16977    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16978    # to wait until they are properly discovered.
16979    for ac_prog in cl cc gcc
16980do
16981  # Extract the first word of "$ac_prog", so it can be a program name with args.
16982set dummy $ac_prog; ac_word=$2
16983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16984$as_echo_n "checking for $ac_word... " >&6; }
16985if ${ac_cv_path_BUILD_CC+:} false; then :
16986  $as_echo_n "(cached) " >&6
16987else
16988  case $BUILD_CC in
16989  [\\/]* | ?:[\\/]*)
16990  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16991  ;;
16992  *)
16993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16994for as_dir in $PATH
16995do
16996  IFS=$as_save_IFS
16997  test -z "$as_dir" && as_dir=.
16998    for ac_exec_ext in '' $ac_executable_extensions; do
16999  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17000    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17002    break 2
17003  fi
17004done
17005  done
17006IFS=$as_save_IFS
17007
17008  ;;
17009esac
17010fi
17011BUILD_CC=$ac_cv_path_BUILD_CC
17012if test -n "$BUILD_CC"; then
17013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17014$as_echo "$BUILD_CC" >&6; }
17015else
17016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17017$as_echo "no" >&6; }
17018fi
17019
17020
17021  test -n "$BUILD_CC" && break
17022done
17023
17024
17025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17026
17027  # First separate the path from the arguments. This will split at the first
17028  # space.
17029  complete="$BUILD_CC"
17030  path="${complete%% *}"
17031  tmp="$complete EOL"
17032  arguments="${tmp#* }"
17033
17034  # Input might be given as Windows format, start by converting to
17035  # unix format.
17036  new_path=`$CYGPATH -u "$path"`
17037
17038  # Now try to locate executable using which
17039  new_path=`$WHICH "$new_path" 2> /dev/null`
17040  # bat and cmd files are not always considered executable in cygwin causing which
17041  # to not find them
17042  if test "x$new_path" = x \
17043           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17044           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17045    new_path=`$CYGPATH -u "$path"`
17046  fi
17047  if test "x$new_path" = x; then
17048    # Oops. Which didn't find the executable.
17049    # The splitting of arguments from the executable at a space might have been incorrect,
17050    # since paths with space are more likely in Windows. Give it another try with the whole
17051    # argument.
17052    path="$complete"
17053    arguments="EOL"
17054    new_path=`$CYGPATH -u "$path"`
17055    new_path=`$WHICH "$new_path" 2> /dev/null`
17056    # bat and cmd files are not always considered executable in cygwin causing which
17057    # to not find them
17058    if test "x$new_path" = x \
17059             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17060             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17061      new_path=`$CYGPATH -u "$path"`
17062    fi
17063    if test "x$new_path" = x; then
17064      # It's still not found. Now this is an unrecoverable error.
17065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17066$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17067      has_space=`$ECHO "$complete" | $GREP " "`
17068      if test "x$has_space" != x; then
17069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17071      fi
17072      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17073    fi
17074  fi
17075
17076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17079  # "foo.exe" is OK but "foo" is an error.
17080  #
17081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17082  # It is also a way to make sure we got the proper file name for the real test later on.
17083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17084  if test "x$test_shortpath" = x; then
17085    # Short path failed, file does not exist as specified.
17086    # Try adding .exe or .cmd
17087    if test -f "${new_path}.exe"; then
17088       input_to_shortpath="${new_path}.exe"
17089    elif test -f "${new_path}.cmd"; then
17090       input_to_shortpath="${new_path}.cmd"
17091    else
17092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17093$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17096      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17097    fi
17098  else
17099    input_to_shortpath="$new_path"
17100  fi
17101
17102  # Call helper function which possibly converts this using DOS-style short mode.
17103  # If so, the updated path is stored in $new_path.
17104  new_path="$input_to_shortpath"
17105
17106  input_path="$input_to_shortpath"
17107  # Check if we need to convert this using DOS-style short mode. If the path
17108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17109  # take no chances and rewrite it.
17110  # Note: m4 eats our [], so we need to use [ and ] instead.
17111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17112  if test "x$has_forbidden_chars" != x; then
17113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17117      # Going to short mode and back again did indeed matter. Since short mode is
17118      # case insensitive, let's make it lowercase to improve readability.
17119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17120      # Now convert it back to Unix-stile (cygpath)
17121      input_path=`$CYGPATH -u "$shortmode_path"`
17122      new_path="$input_path"
17123    fi
17124  fi
17125
17126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17127  if test "x$test_cygdrive_prefix" = x; then
17128    # As a simple fix, exclude /usr/bin since it's not a real path.
17129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17131      # a path prefixed by /cygdrive for fixpath to work.
17132      new_path="$CYGWIN_ROOT_PATH$input_path"
17133    fi
17134  fi
17135
17136  # remove trailing .exe if any
17137  new_path="${new_path/%.exe/}"
17138
17139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17140
17141  # First separate the path from the arguments. This will split at the first
17142  # space.
17143  complete="$BUILD_CC"
17144  path="${complete%% *}"
17145  tmp="$complete EOL"
17146  arguments="${tmp#* }"
17147
17148  # Input might be given as Windows format, start by converting to
17149  # unix format.
17150  new_path="$path"
17151
17152  windows_path="$new_path"
17153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17154    unix_path=`$CYGPATH -u "$windows_path"`
17155    new_path="$unix_path"
17156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17158    new_path="$unix_path"
17159  fi
17160
17161
17162  # Now try to locate executable using which
17163  new_path=`$WHICH "$new_path" 2> /dev/null`
17164
17165  if test "x$new_path" = x; then
17166    # Oops. Which didn't find the executable.
17167    # The splitting of arguments from the executable at a space might have been incorrect,
17168    # since paths with space are more likely in Windows. Give it another try with the whole
17169    # argument.
17170    path="$complete"
17171    arguments="EOL"
17172    new_path="$path"
17173
17174  windows_path="$new_path"
17175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17176    unix_path=`$CYGPATH -u "$windows_path"`
17177    new_path="$unix_path"
17178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17180    new_path="$unix_path"
17181  fi
17182
17183
17184    new_path=`$WHICH "$new_path" 2> /dev/null`
17185
17186    if test "x$new_path" = x; then
17187      # It's still not found. Now this is an unrecoverable error.
17188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17189$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17190      has_space=`$ECHO "$complete" | $GREP " "`
17191      if test "x$has_space" != x; then
17192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17194      fi
17195      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17196    fi
17197  fi
17198
17199  # Now new_path has a complete unix path to the binary
17200  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17201    # Keep paths in /bin as-is, but remove trailing .exe if any
17202    new_path="${new_path/%.exe/}"
17203    # Do not save /bin paths to all_fixpath_prefixes!
17204  else
17205    # Not in mixed or Windows style, start by that.
17206    new_path=`cmd //c echo $new_path`
17207
17208  input_path="$new_path"
17209  # Check if we need to convert this using DOS-style short mode. If the path
17210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17211  # take no chances and rewrite it.
17212  # Note: m4 eats our [], so we need to use [ and ] instead.
17213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17214  if test "x$has_forbidden_chars" != x; then
17215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17217  fi
17218
17219    # Output is in $new_path
17220
17221  windows_path="$new_path"
17222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17223    unix_path=`$CYGPATH -u "$windows_path"`
17224    new_path="$unix_path"
17225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17227    new_path="$unix_path"
17228  fi
17229
17230    # remove trailing .exe if any
17231    new_path="${new_path/%.exe/}"
17232
17233    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17234    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17235  fi
17236
17237  else
17238    # We're on a posix platform. Hooray! :)
17239    # First separate the path from the arguments. This will split at the first
17240    # space.
17241    complete="$BUILD_CC"
17242    path="${complete%% *}"
17243    tmp="$complete EOL"
17244    arguments="${tmp#* }"
17245
17246    # Cannot rely on the command "which" here since it doesn't always work.
17247    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17248    if test -z "$is_absolute_path"; then
17249      # Path to executable is not absolute. Find it.
17250      IFS_save="$IFS"
17251      IFS=:
17252      for p in $PATH; do
17253        if test -f "$p/$path" && test -x "$p/$path"; then
17254          new_path="$p/$path"
17255          break
17256        fi
17257      done
17258      IFS="$IFS_save"
17259    else
17260      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17261$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17262      new_path="$path"
17263    fi
17264
17265    if test "x$new_path" = x; then
17266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17267$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17268        has_space=`$ECHO "$complete" | $GREP " "`
17269        if test "x$has_space" != x; then
17270          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17272        fi
17273        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17274      fi
17275  fi
17276
17277      # Now join together the path and the arguments once again
17278      if test "x$arguments" != xEOL; then
17279        new_complete="$new_path ${arguments% *}"
17280      else
17281        new_complete="$new_path"
17282      fi
17283
17284  if test "x$complete" != "x$new_complete"; then
17285      BUILD_CC="$new_complete"
17286      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17287$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17288    fi
17289
17290    for ac_prog in cl CC g++
17291do
17292  # Extract the first word of "$ac_prog", so it can be a program name with args.
17293set dummy $ac_prog; ac_word=$2
17294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17295$as_echo_n "checking for $ac_word... " >&6; }
17296if ${ac_cv_path_BUILD_CXX+:} false; then :
17297  $as_echo_n "(cached) " >&6
17298else
17299  case $BUILD_CXX in
17300  [\\/]* | ?:[\\/]*)
17301  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17302  ;;
17303  *)
17304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17305for as_dir in $PATH
17306do
17307  IFS=$as_save_IFS
17308  test -z "$as_dir" && as_dir=.
17309    for ac_exec_ext in '' $ac_executable_extensions; do
17310  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17311    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17313    break 2
17314  fi
17315done
17316  done
17317IFS=$as_save_IFS
17318
17319  ;;
17320esac
17321fi
17322BUILD_CXX=$ac_cv_path_BUILD_CXX
17323if test -n "$BUILD_CXX"; then
17324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17325$as_echo "$BUILD_CXX" >&6; }
17326else
17327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17328$as_echo "no" >&6; }
17329fi
17330
17331
17332  test -n "$BUILD_CXX" && break
17333done
17334
17335
17336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17337
17338  # First separate the path from the arguments. This will split at the first
17339  # space.
17340  complete="$BUILD_CXX"
17341  path="${complete%% *}"
17342  tmp="$complete EOL"
17343  arguments="${tmp#* }"
17344
17345  # Input might be given as Windows format, start by converting to
17346  # unix format.
17347  new_path=`$CYGPATH -u "$path"`
17348
17349  # Now try to locate executable using which
17350  new_path=`$WHICH "$new_path" 2> /dev/null`
17351  # bat and cmd files are not always considered executable in cygwin causing which
17352  # to not find them
17353  if test "x$new_path" = x \
17354           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17355           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17356    new_path=`$CYGPATH -u "$path"`
17357  fi
17358  if test "x$new_path" = x; then
17359    # Oops. Which didn't find the executable.
17360    # The splitting of arguments from the executable at a space might have been incorrect,
17361    # since paths with space are more likely in Windows. Give it another try with the whole
17362    # argument.
17363    path="$complete"
17364    arguments="EOL"
17365    new_path=`$CYGPATH -u "$path"`
17366    new_path=`$WHICH "$new_path" 2> /dev/null`
17367    # bat and cmd files are not always considered executable in cygwin causing which
17368    # to not find them
17369    if test "x$new_path" = x \
17370             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17371             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17372      new_path=`$CYGPATH -u "$path"`
17373    fi
17374    if test "x$new_path" = x; then
17375      # It's still not found. Now this is an unrecoverable error.
17376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17377$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17378      has_space=`$ECHO "$complete" | $GREP " "`
17379      if test "x$has_space" != x; then
17380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17382      fi
17383      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17384    fi
17385  fi
17386
17387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17390  # "foo.exe" is OK but "foo" is an error.
17391  #
17392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17393  # It is also a way to make sure we got the proper file name for the real test later on.
17394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17395  if test "x$test_shortpath" = x; then
17396    # Short path failed, file does not exist as specified.
17397    # Try adding .exe or .cmd
17398    if test -f "${new_path}.exe"; then
17399       input_to_shortpath="${new_path}.exe"
17400    elif test -f "${new_path}.cmd"; then
17401       input_to_shortpath="${new_path}.cmd"
17402    else
17403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17404$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17405      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17406$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17407      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17408    fi
17409  else
17410    input_to_shortpath="$new_path"
17411  fi
17412
17413  # Call helper function which possibly converts this using DOS-style short mode.
17414  # If so, the updated path is stored in $new_path.
17415  new_path="$input_to_shortpath"
17416
17417  input_path="$input_to_shortpath"
17418  # Check if we need to convert this using DOS-style short mode. If the path
17419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17420  # take no chances and rewrite it.
17421  # Note: m4 eats our [], so we need to use [ and ] instead.
17422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17423  if test "x$has_forbidden_chars" != x; then
17424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17428      # Going to short mode and back again did indeed matter. Since short mode is
17429      # case insensitive, let's make it lowercase to improve readability.
17430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17431      # Now convert it back to Unix-stile (cygpath)
17432      input_path=`$CYGPATH -u "$shortmode_path"`
17433      new_path="$input_path"
17434    fi
17435  fi
17436
17437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17438  if test "x$test_cygdrive_prefix" = x; then
17439    # As a simple fix, exclude /usr/bin since it's not a real path.
17440    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17442      # a path prefixed by /cygdrive for fixpath to work.
17443      new_path="$CYGWIN_ROOT_PATH$input_path"
17444    fi
17445  fi
17446
17447  # remove trailing .exe if any
17448  new_path="${new_path/%.exe/}"
17449
17450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17451
17452  # First separate the path from the arguments. This will split at the first
17453  # space.
17454  complete="$BUILD_CXX"
17455  path="${complete%% *}"
17456  tmp="$complete EOL"
17457  arguments="${tmp#* }"
17458
17459  # Input might be given as Windows format, start by converting to
17460  # unix format.
17461  new_path="$path"
17462
17463  windows_path="$new_path"
17464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17465    unix_path=`$CYGPATH -u "$windows_path"`
17466    new_path="$unix_path"
17467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17469    new_path="$unix_path"
17470  fi
17471
17472
17473  # Now try to locate executable using which
17474  new_path=`$WHICH "$new_path" 2> /dev/null`
17475
17476  if test "x$new_path" = x; then
17477    # Oops. Which didn't find the executable.
17478    # The splitting of arguments from the executable at a space might have been incorrect,
17479    # since paths with space are more likely in Windows. Give it another try with the whole
17480    # argument.
17481    path="$complete"
17482    arguments="EOL"
17483    new_path="$path"
17484
17485  windows_path="$new_path"
17486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17487    unix_path=`$CYGPATH -u "$windows_path"`
17488    new_path="$unix_path"
17489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17491    new_path="$unix_path"
17492  fi
17493
17494
17495    new_path=`$WHICH "$new_path" 2> /dev/null`
17496
17497    if test "x$new_path" = x; then
17498      # It's still not found. Now this is an unrecoverable error.
17499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17500$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17501      has_space=`$ECHO "$complete" | $GREP " "`
17502      if test "x$has_space" != x; then
17503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17505      fi
17506      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17507    fi
17508  fi
17509
17510  # Now new_path has a complete unix path to the binary
17511  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17512    # Keep paths in /bin as-is, but remove trailing .exe if any
17513    new_path="${new_path/%.exe/}"
17514    # Do not save /bin paths to all_fixpath_prefixes!
17515  else
17516    # Not in mixed or Windows style, start by that.
17517    new_path=`cmd //c echo $new_path`
17518
17519  input_path="$new_path"
17520  # Check if we need to convert this using DOS-style short mode. If the path
17521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17522  # take no chances and rewrite it.
17523  # Note: m4 eats our [], so we need to use [ and ] instead.
17524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17525  if test "x$has_forbidden_chars" != x; then
17526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17528  fi
17529
17530    # Output is in $new_path
17531
17532  windows_path="$new_path"
17533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17534    unix_path=`$CYGPATH -u "$windows_path"`
17535    new_path="$unix_path"
17536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17538    new_path="$unix_path"
17539  fi
17540
17541    # remove trailing .exe if any
17542    new_path="${new_path/%.exe/}"
17543
17544    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17545    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17546  fi
17547
17548  else
17549    # We're on a posix platform. Hooray! :)
17550    # First separate the path from the arguments. This will split at the first
17551    # space.
17552    complete="$BUILD_CXX"
17553    path="${complete%% *}"
17554    tmp="$complete EOL"
17555    arguments="${tmp#* }"
17556
17557    # Cannot rely on the command "which" here since it doesn't always work.
17558    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17559    if test -z "$is_absolute_path"; then
17560      # Path to executable is not absolute. Find it.
17561      IFS_save="$IFS"
17562      IFS=:
17563      for p in $PATH; do
17564        if test -f "$p/$path" && test -x "$p/$path"; then
17565          new_path="$p/$path"
17566          break
17567        fi
17568      done
17569      IFS="$IFS_save"
17570    else
17571      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17572$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17573      new_path="$path"
17574    fi
17575
17576    if test "x$new_path" = x; then
17577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17578$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17579        has_space=`$ECHO "$complete" | $GREP " "`
17580        if test "x$has_space" != x; then
17581          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17582$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17583        fi
17584        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17585      fi
17586  fi
17587
17588      # Now join together the path and the arguments once again
17589      if test "x$arguments" != xEOL; then
17590        new_complete="$new_path ${arguments% *}"
17591      else
17592        new_complete="$new_path"
17593      fi
17594
17595  if test "x$complete" != "x$new_complete"; then
17596      BUILD_CXX="$new_complete"
17597      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17598$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17599    fi
17600
17601    # Extract the first word of "ld", so it can be a program name with args.
17602set dummy ld; ac_word=$2
17603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17604$as_echo_n "checking for $ac_word... " >&6; }
17605if ${ac_cv_path_BUILD_LD+:} false; then :
17606  $as_echo_n "(cached) " >&6
17607else
17608  case $BUILD_LD in
17609  [\\/]* | ?:[\\/]*)
17610  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17611  ;;
17612  *)
17613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17614for as_dir in $PATH
17615do
17616  IFS=$as_save_IFS
17617  test -z "$as_dir" && as_dir=.
17618    for ac_exec_ext in '' $ac_executable_extensions; do
17619  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17620    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17622    break 2
17623  fi
17624done
17625  done
17626IFS=$as_save_IFS
17627
17628  ;;
17629esac
17630fi
17631BUILD_LD=$ac_cv_path_BUILD_LD
17632if test -n "$BUILD_LD"; then
17633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17634$as_echo "$BUILD_LD" >&6; }
17635else
17636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17637$as_echo "no" >&6; }
17638fi
17639
17640
17641
17642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17643
17644  # First separate the path from the arguments. This will split at the first
17645  # space.
17646  complete="$BUILD_LD"
17647  path="${complete%% *}"
17648  tmp="$complete EOL"
17649  arguments="${tmp#* }"
17650
17651  # Input might be given as Windows format, start by converting to
17652  # unix format.
17653  new_path=`$CYGPATH -u "$path"`
17654
17655  # Now try to locate executable using which
17656  new_path=`$WHICH "$new_path" 2> /dev/null`
17657  # bat and cmd files are not always considered executable in cygwin causing which
17658  # to not find them
17659  if test "x$new_path" = x \
17660           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17661           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17662    new_path=`$CYGPATH -u "$path"`
17663  fi
17664  if test "x$new_path" = x; then
17665    # Oops. Which didn't find the executable.
17666    # The splitting of arguments from the executable at a space might have been incorrect,
17667    # since paths with space are more likely in Windows. Give it another try with the whole
17668    # argument.
17669    path="$complete"
17670    arguments="EOL"
17671    new_path=`$CYGPATH -u "$path"`
17672    new_path=`$WHICH "$new_path" 2> /dev/null`
17673    # bat and cmd files are not always considered executable in cygwin causing which
17674    # to not find them
17675    if test "x$new_path" = x \
17676             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17677             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17678      new_path=`$CYGPATH -u "$path"`
17679    fi
17680    if test "x$new_path" = x; then
17681      # It's still not found. Now this is an unrecoverable error.
17682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17683$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17684      has_space=`$ECHO "$complete" | $GREP " "`
17685      if test "x$has_space" != x; then
17686        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17687$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17688      fi
17689      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17690    fi
17691  fi
17692
17693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17696  # "foo.exe" is OK but "foo" is an error.
17697  #
17698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17699  # It is also a way to make sure we got the proper file name for the real test later on.
17700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17701  if test "x$test_shortpath" = x; then
17702    # Short path failed, file does not exist as specified.
17703    # Try adding .exe or .cmd
17704    if test -f "${new_path}.exe"; then
17705       input_to_shortpath="${new_path}.exe"
17706    elif test -f "${new_path}.cmd"; then
17707       input_to_shortpath="${new_path}.cmd"
17708    else
17709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17710$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17711      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17712$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17713      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17714    fi
17715  else
17716    input_to_shortpath="$new_path"
17717  fi
17718
17719  # Call helper function which possibly converts this using DOS-style short mode.
17720  # If so, the updated path is stored in $new_path.
17721  new_path="$input_to_shortpath"
17722
17723  input_path="$input_to_shortpath"
17724  # Check if we need to convert this using DOS-style short mode. If the path
17725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17726  # take no chances and rewrite it.
17727  # Note: m4 eats our [], so we need to use [ and ] instead.
17728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17729  if test "x$has_forbidden_chars" != x; then
17730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17734      # Going to short mode and back again did indeed matter. Since short mode is
17735      # case insensitive, let's make it lowercase to improve readability.
17736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17737      # Now convert it back to Unix-stile (cygpath)
17738      input_path=`$CYGPATH -u "$shortmode_path"`
17739      new_path="$input_path"
17740    fi
17741  fi
17742
17743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17744  if test "x$test_cygdrive_prefix" = x; then
17745    # As a simple fix, exclude /usr/bin since it's not a real path.
17746    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17748      # a path prefixed by /cygdrive for fixpath to work.
17749      new_path="$CYGWIN_ROOT_PATH$input_path"
17750    fi
17751  fi
17752
17753  # remove trailing .exe if any
17754  new_path="${new_path/%.exe/}"
17755
17756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17757
17758  # First separate the path from the arguments. This will split at the first
17759  # space.
17760  complete="$BUILD_LD"
17761  path="${complete%% *}"
17762  tmp="$complete EOL"
17763  arguments="${tmp#* }"
17764
17765  # Input might be given as Windows format, start by converting to
17766  # unix format.
17767  new_path="$path"
17768
17769  windows_path="$new_path"
17770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17771    unix_path=`$CYGPATH -u "$windows_path"`
17772    new_path="$unix_path"
17773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17775    new_path="$unix_path"
17776  fi
17777
17778
17779  # Now try to locate executable using which
17780  new_path=`$WHICH "$new_path" 2> /dev/null`
17781
17782  if test "x$new_path" = x; then
17783    # Oops. Which didn't find the executable.
17784    # The splitting of arguments from the executable at a space might have been incorrect,
17785    # since paths with space are more likely in Windows. Give it another try with the whole
17786    # argument.
17787    path="$complete"
17788    arguments="EOL"
17789    new_path="$path"
17790
17791  windows_path="$new_path"
17792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17793    unix_path=`$CYGPATH -u "$windows_path"`
17794    new_path="$unix_path"
17795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17797    new_path="$unix_path"
17798  fi
17799
17800
17801    new_path=`$WHICH "$new_path" 2> /dev/null`
17802
17803    if test "x$new_path" = x; then
17804      # It's still not found. Now this is an unrecoverable error.
17805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17806$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17807      has_space=`$ECHO "$complete" | $GREP " "`
17808      if test "x$has_space" != x; then
17809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17811      fi
17812      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17813    fi
17814  fi
17815
17816  # Now new_path has a complete unix path to the binary
17817  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17818    # Keep paths in /bin as-is, but remove trailing .exe if any
17819    new_path="${new_path/%.exe/}"
17820    # Do not save /bin paths to all_fixpath_prefixes!
17821  else
17822    # Not in mixed or Windows style, start by that.
17823    new_path=`cmd //c echo $new_path`
17824
17825  input_path="$new_path"
17826  # Check if we need to convert this using DOS-style short mode. If the path
17827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17828  # take no chances and rewrite it.
17829  # Note: m4 eats our [], so we need to use [ and ] instead.
17830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17831  if test "x$has_forbidden_chars" != x; then
17832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17834  fi
17835
17836    # Output is in $new_path
17837
17838  windows_path="$new_path"
17839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17840    unix_path=`$CYGPATH -u "$windows_path"`
17841    new_path="$unix_path"
17842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17844    new_path="$unix_path"
17845  fi
17846
17847    # remove trailing .exe if any
17848    new_path="${new_path/%.exe/}"
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  fi
17853
17854  else
17855    # We're on a posix platform. Hooray! :)
17856    # First separate the path from the arguments. This will split at the first
17857    # space.
17858    complete="$BUILD_LD"
17859    path="${complete%% *}"
17860    tmp="$complete EOL"
17861    arguments="${tmp#* }"
17862
17863    # Cannot rely on the command "which" here since it doesn't always work.
17864    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17865    if test -z "$is_absolute_path"; then
17866      # Path to executable is not absolute. Find it.
17867      IFS_save="$IFS"
17868      IFS=:
17869      for p in $PATH; do
17870        if test -f "$p/$path" && test -x "$p/$path"; then
17871          new_path="$p/$path"
17872          break
17873        fi
17874      done
17875      IFS="$IFS_save"
17876    else
17877      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17878$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17879      new_path="$path"
17880    fi
17881
17882    if test "x$new_path" = x; then
17883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17884$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17885        has_space=`$ECHO "$complete" | $GREP " "`
17886        if test "x$has_space" != x; then
17887          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17888$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17889        fi
17890        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17891      fi
17892  fi
17893
17894      # Now join together the path and the arguments once again
17895      if test "x$arguments" != xEOL; then
17896        new_complete="$new_path ${arguments% *}"
17897      else
17898        new_complete="$new_path"
17899      fi
17900
17901  if test "x$complete" != "x$new_complete"; then
17902      BUILD_LD="$new_complete"
17903      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17904$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17905    fi
17906
17907fi
17908
17909
17910
17911
17912# If a devkit is found on the builddeps server, then prepend its path to the
17913# PATH variable. If there are cross compilers available in the devkit, these
17914# will be found by AC_PROG_CC et al.
17915DEVKIT=
17916
17917
17918    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17919        # Source the builddeps file again, to make sure it uses the latest variables!
17920        . $builddepsfile
17921        # Look for a target and build machine specific resource!
17922        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17923        if test "x$resource" = x; then
17924            # Ok, lets instead look for a target specific resource
17925            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17926        fi
17927        if test "x$resource" = x; then
17928            # Ok, lets instead look for a build specific resource
17929            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17930        fi
17931        if test "x$resource" = x; then
17932            # Ok, lets instead look for a generic resource
17933            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17934            resource=${builddep_devkit}
17935        fi
17936        if test "x$resource" != x; then
17937            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17938$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17939	    # If the resource in the builddeps.conf file is an existing directory,
17940	    # for example /java/linux/cups
17941	    if test -d ${resource}; then
17942	       depdir=${resource}
17943	    else
17944
17945# devkit is for example mymodule
17946# $resource is for example libs/general/libmymod_1_2_3.zip
17947# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17948# $with_builddeps_dir is for example /localhome/builddeps
17949# depdir is the name of the variable into which we store the depdir, eg MYMOD
17950# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17951# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17952    filename=`basename $resource`
17953    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17954    filebase=${filename%%.*}
17955    extension=${filename#*.}
17956    installdir=$with_builddeps_dir/$filebase
17957    if test ! -f $installdir/$filename.unpacked; then
17958        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17959$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17960        if test ! -d $installdir; then
17961            mkdir -p $installdir
17962        fi
17963        if test ! -d $installdir; then
17964            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17965        fi
17966        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17967        touch $tmpfile
17968        if test ! -f $tmpfile; then
17969            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17970        fi
17971
17972    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17973    # $tmpfile is the local file name for the downloaded file.
17974    VALID_TOOL=no
17975    if test "x$BDEPS_FTP" = xwget; then
17976       VALID_TOOL=yes
17977       wget -O $tmpfile $with_builddeps_server/$resource
17978    fi
17979    if test "x$BDEPS_FTP" = xlftp; then
17980       VALID_TOOL=yes
17981       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17982    fi
17983    if test "x$BDEPS_FTP" = xftp; then
17984        VALID_TOOL=yes
17985        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17986        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17987        FTPUSERPWD=${FTPSERVER%%@*}
17988        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17989            FTPUSER=${userpwd%%:*}
17990            FTPPWD=${userpwd#*@}
17991            FTPSERVER=${FTPSERVER#*@}
17992        else
17993            FTPUSER=ftp
17994            FTPPWD=ftp
17995        fi
17996        # the "pass" command does not work on some
17997        # ftp clients (read ftp.exe) but if it works,
17998        # passive mode is better!
17999        (\
18000            echo "user $FTPUSER $FTPPWD"        ;\
18001            echo "pass"                         ;\
18002            echo "bin"                          ;\
18003            echo "get $FTPPATH $tmpfile"              ;\
18004        ) | ftp -in $FTPSERVER
18005    fi
18006    if test "x$VALID_TOOL" != xyes; then
18007       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18008    fi
18009
18010        mv $tmpfile $installdir/$filename
18011        if test ! -s $installdir/$filename; then
18012            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18013        fi
18014        case "$extension" in
18015            zip)  echo "Unzipping $installdir/$filename..."
18016               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18017            ;;
18018            tar.gz) echo "Untaring $installdir/$filename..."
18019               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18020            ;;
18021            tgz) echo "Untaring $installdir/$filename..."
18022               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18023            ;;
18024            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18025            ;;
18026        esac
18027    fi
18028    if test -f $installdir/$filename.unpacked; then
18029        depdir=$installdir
18030    fi
18031
18032	    fi
18033            # Source the builddeps file again, because in the previous command, the depdir
18034            # was updated to point at the current build dependency install directory.
18035            . $builddepsfile
18036            # Now extract variables from the builddeps.conf files.
18037            theroot=${builddep_devkit_ROOT}
18038            thecflags=${builddep_devkit_CFLAGS}
18039            thelibs=${builddep_devkit_LIBS}
18040            if test "x$depdir" = x; then
18041                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18042            fi
18043            DEVKIT=$depdir
18044            if test "x$theroot" != x; then
18045               DEVKIT="$theroot"
18046            fi
18047            if test "x$thecflags" != x; then
18048               DEVKIT_CFLAGS="$thecflags"
18049            fi
18050            if test "x$thelibs" != x; then
18051               DEVKIT_LIBS="$thelibs"
18052            fi
18053            # Found devkit
18054                     PATH="$DEVKIT/bin:$PATH"
18055                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18056                     if test "x$x_includes" = "xNONE"; then
18057                         x_includes="$SYS_ROOT/usr/include/X11"
18058                     fi
18059                     if test "x$x_libraries" = "xNONE"; then
18060                         x_libraries="$SYS_ROOT/usr/lib"
18061                     fi
18062
18063
18064        fi
18065
18066    fi
18067
18068
18069if test "x$SYS_ROOT" != "x/" ; then
18070    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18071    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18072    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18073    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18074    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18075    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18076fi
18077
18078# Store the CFLAGS etal passed to the configure script.
18079ORG_CFLAGS="$CFLAGS"
18080ORG_CXXFLAGS="$CXXFLAGS"
18081ORG_OBJCFLAGS="$OBJCFLAGS"
18082
18083# autoconf magic only relies on PATH, so update it if tools dir is specified
18084OLD_PATH="$PATH"
18085if test "x$TOOLS_DIR" != x; then
18086  PATH=$TOOLS_DIR:$PATH
18087fi
18088
18089
18090### Locate C compiler (CC)
18091
18092# gcc is almost always present, but on Windows we
18093# prefer cl.exe and on Solaris we prefer CC.
18094# Thus test for them in this order.
18095if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18096  # Do not probe for cc on MacOSX.
18097  COMPILER_CHECK_LIST="cl gcc"
18098else
18099  COMPILER_CHECK_LIST="cl cc gcc"
18100fi
18101
18102
18103  COMPILER_NAME=C
18104
18105  CC=
18106  # If TOOLS_DIR is set, check for all compiler names in there first
18107  # before checking the rest of the PATH.
18108  if test -n "$TOOLS_DIR"; then
18109    PATH_save="$PATH"
18110    PATH="$TOOLS_DIR"
18111    for ac_prog in $COMPILER_CHECK_LIST
18112do
18113  # Extract the first word of "$ac_prog", so it can be a program name with args.
18114set dummy $ac_prog; ac_word=$2
18115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18116$as_echo_n "checking for $ac_word... " >&6; }
18117if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18118  $as_echo_n "(cached) " >&6
18119else
18120  case $TOOLS_DIR_CC in
18121  [\\/]* | ?:[\\/]*)
18122  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18123  ;;
18124  *)
18125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18126for as_dir in $PATH
18127do
18128  IFS=$as_save_IFS
18129  test -z "$as_dir" && as_dir=.
18130    for ac_exec_ext in '' $ac_executable_extensions; do
18131  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18132    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18134    break 2
18135  fi
18136done
18137  done
18138IFS=$as_save_IFS
18139
18140  ;;
18141esac
18142fi
18143TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18144if test -n "$TOOLS_DIR_CC"; then
18145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18146$as_echo "$TOOLS_DIR_CC" >&6; }
18147else
18148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18149$as_echo "no" >&6; }
18150fi
18151
18152
18153  test -n "$TOOLS_DIR_CC" && break
18154done
18155
18156    CC=$TOOLS_DIR_CC
18157    PATH="$PATH_save"
18158  fi
18159
18160  # AC_PATH_PROGS can't be run multiple times with the same variable,
18161  # so create a new name for this run.
18162  if test "x$CC" = x; then
18163    for ac_prog in $COMPILER_CHECK_LIST
18164do
18165  # Extract the first word of "$ac_prog", so it can be a program name with args.
18166set dummy $ac_prog; ac_word=$2
18167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18168$as_echo_n "checking for $ac_word... " >&6; }
18169if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18170  $as_echo_n "(cached) " >&6
18171else
18172  case $POTENTIAL_CC in
18173  [\\/]* | ?:[\\/]*)
18174  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18175  ;;
18176  *)
18177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18178for as_dir in $PATH
18179do
18180  IFS=$as_save_IFS
18181  test -z "$as_dir" && as_dir=.
18182    for ac_exec_ext in '' $ac_executable_extensions; do
18183  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18184    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18186    break 2
18187  fi
18188done
18189  done
18190IFS=$as_save_IFS
18191
18192  ;;
18193esac
18194fi
18195POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18196if test -n "$POTENTIAL_CC"; then
18197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18198$as_echo "$POTENTIAL_CC" >&6; }
18199else
18200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18201$as_echo "no" >&6; }
18202fi
18203
18204
18205  test -n "$POTENTIAL_CC" && break
18206done
18207
18208    CC=$POTENTIAL_CC
18209  fi
18210
18211  if test "x$CC" = x; then
18212
18213    # Print a helpful message on how to acquire the necessary build dependency.
18214    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18215    MISSING_DEPENDENCY=devkit
18216    PKGHANDLER_COMMAND=
18217
18218    case $PKGHANDLER in
18219	apt-get)
18220                apt_help     $MISSING_DEPENDENCY ;;
18221    yum)
18222                yum_help     $MISSING_DEPENDENCY ;;
18223	port)
18224                port_help    $MISSING_DEPENDENCY ;;
18225	pkgutil)
18226                pkgutil_help $MISSING_DEPENDENCY ;;
18227	pkgadd)
18228                pkgadd_help  $MISSING_DEPENDENCY ;;
18229    * )
18230      break ;;
18231    esac
18232
18233    if test "x$PKGHANDLER_COMMAND" != x; then
18234        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18235    fi
18236
18237      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18238  fi
18239
18240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18241
18242  # First separate the path from the arguments. This will split at the first
18243  # space.
18244  complete="$CC"
18245  path="${complete%% *}"
18246  tmp="$complete EOL"
18247  arguments="${tmp#* }"
18248
18249  # Input might be given as Windows format, start by converting to
18250  # unix format.
18251  new_path=`$CYGPATH -u "$path"`
18252
18253  # Now try to locate executable using which
18254  new_path=`$WHICH "$new_path" 2> /dev/null`
18255  # bat and cmd files are not always considered executable in cygwin causing which
18256  # to not find them
18257  if test "x$new_path" = x \
18258           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18259           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18260    new_path=`$CYGPATH -u "$path"`
18261  fi
18262  if test "x$new_path" = x; then
18263    # Oops. Which didn't find the executable.
18264    # The splitting of arguments from the executable at a space might have been incorrect,
18265    # since paths with space are more likely in Windows. Give it another try with the whole
18266    # argument.
18267    path="$complete"
18268    arguments="EOL"
18269    new_path=`$CYGPATH -u "$path"`
18270    new_path=`$WHICH "$new_path" 2> /dev/null`
18271    # bat and cmd files are not always considered executable in cygwin causing which
18272    # to not find them
18273    if test "x$new_path" = x \
18274             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18275             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18276      new_path=`$CYGPATH -u "$path"`
18277    fi
18278    if test "x$new_path" = x; then
18279      # It's still not found. Now this is an unrecoverable error.
18280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18281$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18282      has_space=`$ECHO "$complete" | $GREP " "`
18283      if test "x$has_space" != x; then
18284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18286      fi
18287      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18288    fi
18289  fi
18290
18291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18294  # "foo.exe" is OK but "foo" is an error.
18295  #
18296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18297  # It is also a way to make sure we got the proper file name for the real test later on.
18298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18299  if test "x$test_shortpath" = x; then
18300    # Short path failed, file does not exist as specified.
18301    # Try adding .exe or .cmd
18302    if test -f "${new_path}.exe"; then
18303       input_to_shortpath="${new_path}.exe"
18304    elif test -f "${new_path}.cmd"; then
18305       input_to_shortpath="${new_path}.cmd"
18306    else
18307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18308$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18311      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18312    fi
18313  else
18314    input_to_shortpath="$new_path"
18315  fi
18316
18317  # Call helper function which possibly converts this using DOS-style short mode.
18318  # If so, the updated path is stored in $new_path.
18319  new_path="$input_to_shortpath"
18320
18321  input_path="$input_to_shortpath"
18322  # Check if we need to convert this using DOS-style short mode. If the path
18323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18324  # take no chances and rewrite it.
18325  # Note: m4 eats our [], so we need to use [ and ] instead.
18326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18327  if test "x$has_forbidden_chars" != x; then
18328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18332      # Going to short mode and back again did indeed matter. Since short mode is
18333      # case insensitive, let's make it lowercase to improve readability.
18334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18335      # Now convert it back to Unix-stile (cygpath)
18336      input_path=`$CYGPATH -u "$shortmode_path"`
18337      new_path="$input_path"
18338    fi
18339  fi
18340
18341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18342  if test "x$test_cygdrive_prefix" = x; then
18343    # As a simple fix, exclude /usr/bin since it's not a real path.
18344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18346      # a path prefixed by /cygdrive for fixpath to work.
18347      new_path="$CYGWIN_ROOT_PATH$input_path"
18348    fi
18349  fi
18350
18351  # remove trailing .exe if any
18352  new_path="${new_path/%.exe/}"
18353
18354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18355
18356  # First separate the path from the arguments. This will split at the first
18357  # space.
18358  complete="$CC"
18359  path="${complete%% *}"
18360  tmp="$complete EOL"
18361  arguments="${tmp#* }"
18362
18363  # Input might be given as Windows format, start by converting to
18364  # unix format.
18365  new_path="$path"
18366
18367  windows_path="$new_path"
18368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18369    unix_path=`$CYGPATH -u "$windows_path"`
18370    new_path="$unix_path"
18371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18373    new_path="$unix_path"
18374  fi
18375
18376
18377  # Now try to locate executable using which
18378  new_path=`$WHICH "$new_path" 2> /dev/null`
18379
18380  if test "x$new_path" = x; then
18381    # Oops. Which didn't find the executable.
18382    # The splitting of arguments from the executable at a space might have been incorrect,
18383    # since paths with space are more likely in Windows. Give it another try with the whole
18384    # argument.
18385    path="$complete"
18386    arguments="EOL"
18387    new_path="$path"
18388
18389  windows_path="$new_path"
18390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18391    unix_path=`$CYGPATH -u "$windows_path"`
18392    new_path="$unix_path"
18393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18395    new_path="$unix_path"
18396  fi
18397
18398
18399    new_path=`$WHICH "$new_path" 2> /dev/null`
18400
18401    if test "x$new_path" = x; then
18402      # It's still not found. Now this is an unrecoverable error.
18403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18404$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18405      has_space=`$ECHO "$complete" | $GREP " "`
18406      if test "x$has_space" != x; then
18407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18409      fi
18410      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18411    fi
18412  fi
18413
18414  # Now new_path has a complete unix path to the binary
18415  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18416    # Keep paths in /bin as-is, but remove trailing .exe if any
18417    new_path="${new_path/%.exe/}"
18418    # Do not save /bin paths to all_fixpath_prefixes!
18419  else
18420    # Not in mixed or Windows style, start by that.
18421    new_path=`cmd //c echo $new_path`
18422
18423  input_path="$new_path"
18424  # Check if we need to convert this using DOS-style short mode. If the path
18425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18426  # take no chances and rewrite it.
18427  # Note: m4 eats our [], so we need to use [ and ] instead.
18428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18429  if test "x$has_forbidden_chars" != x; then
18430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18432  fi
18433
18434    # Output is in $new_path
18435
18436  windows_path="$new_path"
18437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18438    unix_path=`$CYGPATH -u "$windows_path"`
18439    new_path="$unix_path"
18440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18442    new_path="$unix_path"
18443  fi
18444
18445    # remove trailing .exe if any
18446    new_path="${new_path/%.exe/}"
18447
18448    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18449    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18450  fi
18451
18452  else
18453    # We're on a posix platform. Hooray! :)
18454    # First separate the path from the arguments. This will split at the first
18455    # space.
18456    complete="$CC"
18457    path="${complete%% *}"
18458    tmp="$complete EOL"
18459    arguments="${tmp#* }"
18460
18461    # Cannot rely on the command "which" here since it doesn't always work.
18462    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18463    if test -z "$is_absolute_path"; then
18464      # Path to executable is not absolute. Find it.
18465      IFS_save="$IFS"
18466      IFS=:
18467      for p in $PATH; do
18468        if test -f "$p/$path" && test -x "$p/$path"; then
18469          new_path="$p/$path"
18470          break
18471        fi
18472      done
18473      IFS="$IFS_save"
18474    else
18475      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18476$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18477      new_path="$path"
18478    fi
18479
18480    if test "x$new_path" = x; then
18481        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18482$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18483        has_space=`$ECHO "$complete" | $GREP " "`
18484        if test "x$has_space" != x; then
18485          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18486$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18487        fi
18488        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18489      fi
18490  fi
18491
18492      # Now join together the path and the arguments once again
18493      if test "x$arguments" != xEOL; then
18494        new_complete="$new_path ${arguments% *}"
18495      else
18496        new_complete="$new_path"
18497      fi
18498
18499  if test "x$complete" != "x$new_complete"; then
18500      CC="$new_complete"
18501      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18502$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18503    fi
18504
18505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18506$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18507  TEST_COMPILER="$CC"
18508
18509    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18510        # Follow a chain of symbolic links. Use readlink
18511        # where it exists, else fall back to horribly
18512        # complicated shell code.
18513        if test "x$READLINK_TESTED" != yes; then
18514            # On MacOSX there is a readlink tool with a different
18515            # purpose than the GNU readlink tool. Check the found readlink.
18516            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18517            if test "x$ISGNU" = x; then
18518                 # A readlink that we do not know how to use.
18519                 # Are there other non-GNU readlinks out there?
18520                 READLINK_TESTED=yes
18521                 READLINK=
18522            fi
18523        fi
18524
18525        if test "x$READLINK" != x; then
18526            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18527        else
18528            # Save the current directory for restoring afterwards
18529            STARTDIR=$PWD
18530            COUNTER=0
18531            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18532            sym_link_file=`$BASENAME $TEST_COMPILER`
18533            # Use the system pwd and not the shell builtin to resolve directory symlinks
18534            cd $sym_link_dir
18535            cd `$THEPWDCMD`
18536            sym_link_dir=`$THEPWDCMD`
18537            # Resolve file symlinks
18538            while test $COUNTER -lt 20; do
18539                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18540                if test "x$ISLINK" == x; then
18541                    # This is not a symbolic link! We are done!
18542                    break
18543                fi
18544                # Again resolve directory symlinks since the target of the just found
18545                # link could be in a different directory
18546                cd `$DIRNAME $ISLINK`
18547                sym_link_dir=`$THEPWDCMD`
18548                sym_link_file=`$BASENAME $ISLINK`
18549                let COUNTER=COUNTER+1
18550            done
18551            cd $STARTDIR
18552            TEST_COMPILER=$sym_link_dir/$sym_link_file
18553        fi
18554    fi
18555
18556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18557$as_echo "$TEST_COMPILER" >&6; }
18558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18559$as_echo_n "checking if CC is disguised ccache... " >&6; }
18560
18561  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18562  if test "x$COMPILER_BASENAME" = "xccache"; then
18563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18564$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18565    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18566    # We want to control ccache invocation ourselves, so ignore this cc and try
18567    # searching again.
18568
18569    # Remove the path to the fake ccache cc from the PATH
18570    RETRY_COMPILER_SAVED_PATH="$PATH"
18571    COMPILER_DIRNAME=`$DIRNAME $CC`
18572    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18573
18574    # Try again looking for our compiler
18575    if test -n "$ac_tool_prefix"; then
18576  for ac_prog in $COMPILER_CHECK_LIST
18577  do
18578    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18579set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18581$as_echo_n "checking for $ac_word... " >&6; }
18582if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
18583  $as_echo_n "(cached) " >&6
18584else
18585  if test -n "$PROPER_COMPILER_CC"; then
18586  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18587else
18588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18589for as_dir in $PATH
18590do
18591  IFS=$as_save_IFS
18592  test -z "$as_dir" && as_dir=.
18593    for ac_exec_ext in '' $ac_executable_extensions; do
18594  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18595    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18597    break 2
18598  fi
18599done
18600  done
18601IFS=$as_save_IFS
18602
18603fi
18604fi
18605PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18606if test -n "$PROPER_COMPILER_CC"; then
18607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18608$as_echo "$PROPER_COMPILER_CC" >&6; }
18609else
18610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18611$as_echo "no" >&6; }
18612fi
18613
18614
18615    test -n "$PROPER_COMPILER_CC" && break
18616  done
18617fi
18618if test -z "$PROPER_COMPILER_CC"; then
18619  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18620  for ac_prog in $COMPILER_CHECK_LIST
18621do
18622  # Extract the first word of "$ac_prog", so it can be a program name with args.
18623set dummy $ac_prog; ac_word=$2
18624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18625$as_echo_n "checking for $ac_word... " >&6; }
18626if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
18627  $as_echo_n "(cached) " >&6
18628else
18629  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18630  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18631else
18632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18633for as_dir in $PATH
18634do
18635  IFS=$as_save_IFS
18636  test -z "$as_dir" && as_dir=.
18637    for ac_exec_ext in '' $ac_executable_extensions; do
18638  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18639    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18641    break 2
18642  fi
18643done
18644  done
18645IFS=$as_save_IFS
18646
18647fi
18648fi
18649ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18650if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18652$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18653else
18654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18655$as_echo "no" >&6; }
18656fi
18657
18658
18659  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18660done
18661
18662  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18663    PROPER_COMPILER_CC=""
18664  else
18665    case $cross_compiling:$ac_tool_warned in
18666yes:)
18667{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18668$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18669ac_tool_warned=yes ;;
18670esac
18671    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18672  fi
18673fi
18674
18675
18676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18677
18678  # First separate the path from the arguments. This will split at the first
18679  # space.
18680  complete="$PROPER_COMPILER_CC"
18681  path="${complete%% *}"
18682  tmp="$complete EOL"
18683  arguments="${tmp#* }"
18684
18685  # Input might be given as Windows format, start by converting to
18686  # unix format.
18687  new_path=`$CYGPATH -u "$path"`
18688
18689  # Now try to locate executable using which
18690  new_path=`$WHICH "$new_path" 2> /dev/null`
18691  # bat and cmd files are not always considered executable in cygwin causing which
18692  # to not find them
18693  if test "x$new_path" = x \
18694           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18695           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18696    new_path=`$CYGPATH -u "$path"`
18697  fi
18698  if test "x$new_path" = x; then
18699    # Oops. Which didn't find the executable.
18700    # The splitting of arguments from the executable at a space might have been incorrect,
18701    # since paths with space are more likely in Windows. Give it another try with the whole
18702    # argument.
18703    path="$complete"
18704    arguments="EOL"
18705    new_path=`$CYGPATH -u "$path"`
18706    new_path=`$WHICH "$new_path" 2> /dev/null`
18707    # bat and cmd files are not always considered executable in cygwin causing which
18708    # to not find them
18709    if test "x$new_path" = x \
18710             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18711             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18712      new_path=`$CYGPATH -u "$path"`
18713    fi
18714    if test "x$new_path" = x; then
18715      # It's still not found. Now this is an unrecoverable error.
18716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18717$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18718      has_space=`$ECHO "$complete" | $GREP " "`
18719      if test "x$has_space" != x; then
18720        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18721$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18722      fi
18723      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18724    fi
18725  fi
18726
18727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18730  # "foo.exe" is OK but "foo" is an error.
18731  #
18732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18733  # It is also a way to make sure we got the proper file name for the real test later on.
18734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18735  if test "x$test_shortpath" = x; then
18736    # Short path failed, file does not exist as specified.
18737    # Try adding .exe or .cmd
18738    if test -f "${new_path}.exe"; then
18739       input_to_shortpath="${new_path}.exe"
18740    elif test -f "${new_path}.cmd"; then
18741       input_to_shortpath="${new_path}.cmd"
18742    else
18743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18744$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18745      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18746$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18747      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18748    fi
18749  else
18750    input_to_shortpath="$new_path"
18751  fi
18752
18753  # Call helper function which possibly converts this using DOS-style short mode.
18754  # If so, the updated path is stored in $new_path.
18755  new_path="$input_to_shortpath"
18756
18757  input_path="$input_to_shortpath"
18758  # Check if we need to convert this using DOS-style short mode. If the path
18759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18760  # take no chances and rewrite it.
18761  # Note: m4 eats our [], so we need to use [ and ] instead.
18762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18763  if test "x$has_forbidden_chars" != x; then
18764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18768      # Going to short mode and back again did indeed matter. Since short mode is
18769      # case insensitive, let's make it lowercase to improve readability.
18770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18771      # Now convert it back to Unix-stile (cygpath)
18772      input_path=`$CYGPATH -u "$shortmode_path"`
18773      new_path="$input_path"
18774    fi
18775  fi
18776
18777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18778  if test "x$test_cygdrive_prefix" = x; then
18779    # As a simple fix, exclude /usr/bin since it's not a real path.
18780    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18782      # a path prefixed by /cygdrive for fixpath to work.
18783      new_path="$CYGWIN_ROOT_PATH$input_path"
18784    fi
18785  fi
18786
18787  # remove trailing .exe if any
18788  new_path="${new_path/%.exe/}"
18789
18790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18791
18792  # First separate the path from the arguments. This will split at the first
18793  # space.
18794  complete="$PROPER_COMPILER_CC"
18795  path="${complete%% *}"
18796  tmp="$complete EOL"
18797  arguments="${tmp#* }"
18798
18799  # Input might be given as Windows format, start by converting to
18800  # unix format.
18801  new_path="$path"
18802
18803  windows_path="$new_path"
18804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18805    unix_path=`$CYGPATH -u "$windows_path"`
18806    new_path="$unix_path"
18807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18809    new_path="$unix_path"
18810  fi
18811
18812
18813  # Now try to locate executable using which
18814  new_path=`$WHICH "$new_path" 2> /dev/null`
18815
18816  if test "x$new_path" = x; then
18817    # Oops. Which didn't find the executable.
18818    # The splitting of arguments from the executable at a space might have been incorrect,
18819    # since paths with space are more likely in Windows. Give it another try with the whole
18820    # argument.
18821    path="$complete"
18822    arguments="EOL"
18823    new_path="$path"
18824
18825  windows_path="$new_path"
18826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18827    unix_path=`$CYGPATH -u "$windows_path"`
18828    new_path="$unix_path"
18829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18831    new_path="$unix_path"
18832  fi
18833
18834
18835    new_path=`$WHICH "$new_path" 2> /dev/null`
18836
18837    if test "x$new_path" = x; then
18838      # It's still not found. Now this is an unrecoverable error.
18839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18840$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18841      has_space=`$ECHO "$complete" | $GREP " "`
18842      if test "x$has_space" != x; then
18843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18845      fi
18846      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18847    fi
18848  fi
18849
18850  # Now new_path has a complete unix path to the binary
18851  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18852    # Keep paths in /bin as-is, but remove trailing .exe if any
18853    new_path="${new_path/%.exe/}"
18854    # Do not save /bin paths to all_fixpath_prefixes!
18855  else
18856    # Not in mixed or Windows style, start by that.
18857    new_path=`cmd //c echo $new_path`
18858
18859  input_path="$new_path"
18860  # Check if we need to convert this using DOS-style short mode. If the path
18861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18862  # take no chances and rewrite it.
18863  # Note: m4 eats our [], so we need to use [ and ] instead.
18864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18865  if test "x$has_forbidden_chars" != x; then
18866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18868  fi
18869
18870    # Output is in $new_path
18871
18872  windows_path="$new_path"
18873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18874    unix_path=`$CYGPATH -u "$windows_path"`
18875    new_path="$unix_path"
18876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18878    new_path="$unix_path"
18879  fi
18880
18881    # remove trailing .exe if any
18882    new_path="${new_path/%.exe/}"
18883
18884    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18885    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18886  fi
18887
18888  else
18889    # We're on a posix platform. Hooray! :)
18890    # First separate the path from the arguments. This will split at the first
18891    # space.
18892    complete="$PROPER_COMPILER_CC"
18893    path="${complete%% *}"
18894    tmp="$complete EOL"
18895    arguments="${tmp#* }"
18896
18897    # Cannot rely on the command "which" here since it doesn't always work.
18898    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18899    if test -z "$is_absolute_path"; then
18900      # Path to executable is not absolute. Find it.
18901      IFS_save="$IFS"
18902      IFS=:
18903      for p in $PATH; do
18904        if test -f "$p/$path" && test -x "$p/$path"; then
18905          new_path="$p/$path"
18906          break
18907        fi
18908      done
18909      IFS="$IFS_save"
18910    else
18911      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18912$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18913      new_path="$path"
18914    fi
18915
18916    if test "x$new_path" = x; then
18917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18918$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18919        has_space=`$ECHO "$complete" | $GREP " "`
18920        if test "x$has_space" != x; then
18921          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18922$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18923        fi
18924        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18925      fi
18926  fi
18927
18928      # Now join together the path and the arguments once again
18929      if test "x$arguments" != xEOL; then
18930        new_complete="$new_path ${arguments% *}"
18931      else
18932        new_complete="$new_path"
18933      fi
18934
18935  if test "x$complete" != "x$new_complete"; then
18936      PROPER_COMPILER_CC="$new_complete"
18937      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18938$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18939    fi
18940
18941    PATH="$RETRY_COMPILER_SAVED_PATH"
18942
18943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18944$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18945
18946    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18947        # Follow a chain of symbolic links. Use readlink
18948        # where it exists, else fall back to horribly
18949        # complicated shell code.
18950        if test "x$READLINK_TESTED" != yes; then
18951            # On MacOSX there is a readlink tool with a different
18952            # purpose than the GNU readlink tool. Check the found readlink.
18953            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18954            if test "x$ISGNU" = x; then
18955                 # A readlink that we do not know how to use.
18956                 # Are there other non-GNU readlinks out there?
18957                 READLINK_TESTED=yes
18958                 READLINK=
18959            fi
18960        fi
18961
18962        if test "x$READLINK" != x; then
18963            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18964        else
18965            # Save the current directory for restoring afterwards
18966            STARTDIR=$PWD
18967            COUNTER=0
18968            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18969            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18970            # Use the system pwd and not the shell builtin to resolve directory symlinks
18971            cd $sym_link_dir
18972            cd `$THEPWDCMD`
18973            sym_link_dir=`$THEPWDCMD`
18974            # Resolve file symlinks
18975            while test $COUNTER -lt 20; do
18976                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18977                if test "x$ISLINK" == x; then
18978                    # This is not a symbolic link! We are done!
18979                    break
18980                fi
18981                # Again resolve directory symlinks since the target of the just found
18982                # link could be in a different directory
18983                cd `$DIRNAME $ISLINK`
18984                sym_link_dir=`$THEPWDCMD`
18985                sym_link_file=`$BASENAME $ISLINK`
18986                let COUNTER=COUNTER+1
18987            done
18988            cd $STARTDIR
18989            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18990        fi
18991    fi
18992
18993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18994$as_echo "$PROPER_COMPILER_CC" >&6; }
18995    CC="$PROPER_COMPILER_CC"
18996  else
18997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18998$as_echo "no, keeping CC" >&6; }
18999    CC="$TEST_COMPILER"
19000  fi
19001
19002  COMPILER=$CC
19003  COMPILER_NAME=$COMPILER_NAME
19004
19005  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19006    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19007    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19008    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19009    if test $? -ne 0; then
19010      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19011
19012      { $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
19013$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19014      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19015$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19016      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19017    else
19018      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19019      COMPILER_VENDOR="Sun Studio"
19020    fi
19021  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19022    # First line typically looks something like:
19023    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19024    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19025    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19026    COMPILER_VENDOR="Microsoft CL.EXE"
19027    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19028    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19029      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19030        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19031      fi
19032    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19033      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19034        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19035      fi
19036    fi
19037  else
19038    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19039    # Check that this is likely to be GCC.
19040    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19041    if test $? -ne 0; then
19042      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19043$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19044      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19045$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19046      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19047    fi
19048
19049    # First line typically looks something like:
19050    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19051    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19052    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19053  fi
19054  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19055  CC_VERSION="$COMPILER_VERSION"
19056  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19057  CC_VENDOR="$COMPILER_VENDOR"
19058
19059  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19060$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19061
19062
19063# Now that we have resolved CC ourself, let autoconf have it's go at it
19064ac_ext=c
19065ac_cpp='$CPP $CPPFLAGS'
19066ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19067ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19068ac_compiler_gnu=$ac_cv_c_compiler_gnu
19069if test -n "$ac_tool_prefix"; then
19070  for ac_prog in $CC
19071  do
19072    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19073set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19075$as_echo_n "checking for $ac_word... " >&6; }
19076if ${ac_cv_prog_CC+:} false; then :
19077  $as_echo_n "(cached) " >&6
19078else
19079  if test -n "$CC"; then
19080  ac_cv_prog_CC="$CC" # Let the user override the test.
19081else
19082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19083for as_dir in $PATH
19084do
19085  IFS=$as_save_IFS
19086  test -z "$as_dir" && as_dir=.
19087    for ac_exec_ext in '' $ac_executable_extensions; do
19088  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19089    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19091    break 2
19092  fi
19093done
19094  done
19095IFS=$as_save_IFS
19096
19097fi
19098fi
19099CC=$ac_cv_prog_CC
19100if test -n "$CC"; then
19101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19102$as_echo "$CC" >&6; }
19103else
19104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19105$as_echo "no" >&6; }
19106fi
19107
19108
19109    test -n "$CC" && break
19110  done
19111fi
19112if test -z "$CC"; then
19113  ac_ct_CC=$CC
19114  for ac_prog in $CC
19115do
19116  # Extract the first word of "$ac_prog", so it can be a program name with args.
19117set dummy $ac_prog; ac_word=$2
19118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19119$as_echo_n "checking for $ac_word... " >&6; }
19120if ${ac_cv_prog_ac_ct_CC+:} false; then :
19121  $as_echo_n "(cached) " >&6
19122else
19123  if test -n "$ac_ct_CC"; then
19124  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19125else
19126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19127for as_dir in $PATH
19128do
19129  IFS=$as_save_IFS
19130  test -z "$as_dir" && as_dir=.
19131    for ac_exec_ext in '' $ac_executable_extensions; do
19132  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19133    ac_cv_prog_ac_ct_CC="$ac_prog"
19134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19135    break 2
19136  fi
19137done
19138  done
19139IFS=$as_save_IFS
19140
19141fi
19142fi
19143ac_ct_CC=$ac_cv_prog_ac_ct_CC
19144if test -n "$ac_ct_CC"; then
19145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19146$as_echo "$ac_ct_CC" >&6; }
19147else
19148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19149$as_echo "no" >&6; }
19150fi
19151
19152
19153  test -n "$ac_ct_CC" && break
19154done
19155
19156  if test "x$ac_ct_CC" = x; then
19157    CC=""
19158  else
19159    case $cross_compiling:$ac_tool_warned in
19160yes:)
19161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19163ac_tool_warned=yes ;;
19164esac
19165    CC=$ac_ct_CC
19166  fi
19167fi
19168
19169
19170test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19171$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19172as_fn_error $? "no acceptable C compiler found in \$PATH
19173See \`config.log' for more details" "$LINENO" 5; }
19174
19175# Provide some information about the compiler.
19176$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19177set X $ac_compile
19178ac_compiler=$2
19179for ac_option in --version -v -V -qversion; do
19180  { { ac_try="$ac_compiler $ac_option >&5"
19181case "(($ac_try" in
19182  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19183  *) ac_try_echo=$ac_try;;
19184esac
19185eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19186$as_echo "$ac_try_echo"; } >&5
19187  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19188  ac_status=$?
19189  if test -s conftest.err; then
19190    sed '10a\
19191... rest of stderr output deleted ...
19192         10q' conftest.err >conftest.er1
19193    cat conftest.er1 >&5
19194  fi
19195  rm -f conftest.er1 conftest.err
19196  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19197  test $ac_status = 0; }
19198done
19199
19200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19201/* end confdefs.h.  */
19202
19203int
19204main ()
19205{
19206
19207  ;
19208  return 0;
19209}
19210_ACEOF
19211ac_clean_files_save=$ac_clean_files
19212ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19213# Try to create an executable without -o first, disregard a.out.
19214# It will help us diagnose broken compilers, and finding out an intuition
19215# of exeext.
19216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19217$as_echo_n "checking whether the C compiler works... " >&6; }
19218ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19219
19220# The possible output files:
19221ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19222
19223ac_rmfiles=
19224for ac_file in $ac_files
19225do
19226  case $ac_file in
19227    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19228    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19229  esac
19230done
19231rm -f $ac_rmfiles
19232
19233if { { ac_try="$ac_link_default"
19234case "(($ac_try" in
19235  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19236  *) ac_try_echo=$ac_try;;
19237esac
19238eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19239$as_echo "$ac_try_echo"; } >&5
19240  (eval "$ac_link_default") 2>&5
19241  ac_status=$?
19242  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19243  test $ac_status = 0; }; then :
19244  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19245# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19246# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19247# so that the user can short-circuit this test for compilers unknown to
19248# Autoconf.
19249for ac_file in $ac_files ''
19250do
19251  test -f "$ac_file" || continue
19252  case $ac_file in
19253    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19254	;;
19255    [ab].out )
19256	# We found the default executable, but exeext='' is most
19257	# certainly right.
19258	break;;
19259    *.* )
19260	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19261	then :; else
19262	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19263	fi
19264	# We set ac_cv_exeext here because the later test for it is not
19265	# safe: cross compilers may not add the suffix if given an `-o'
19266	# argument, so we may need to know it at that point already.
19267	# Even if this section looks crufty: it has the advantage of
19268	# actually working.
19269	break;;
19270    * )
19271	break;;
19272  esac
19273done
19274test "$ac_cv_exeext" = no && ac_cv_exeext=
19275
19276else
19277  ac_file=''
19278fi
19279if test -z "$ac_file"; then :
19280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19281$as_echo "no" >&6; }
19282$as_echo "$as_me: failed program was:" >&5
19283sed 's/^/| /' conftest.$ac_ext >&5
19284
19285{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19286$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19287as_fn_error 77 "C compiler cannot create executables
19288See \`config.log' for more details" "$LINENO" 5; }
19289else
19290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19291$as_echo "yes" >&6; }
19292fi
19293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19294$as_echo_n "checking for C compiler default output file name... " >&6; }
19295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19296$as_echo "$ac_file" >&6; }
19297ac_exeext=$ac_cv_exeext
19298
19299rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19300ac_clean_files=$ac_clean_files_save
19301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19302$as_echo_n "checking for suffix of executables... " >&6; }
19303if { { ac_try="$ac_link"
19304case "(($ac_try" in
19305  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19306  *) ac_try_echo=$ac_try;;
19307esac
19308eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19309$as_echo "$ac_try_echo"; } >&5
19310  (eval "$ac_link") 2>&5
19311  ac_status=$?
19312  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19313  test $ac_status = 0; }; then :
19314  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19315# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19316# work properly (i.e., refer to `conftest.exe'), while it won't with
19317# `rm'.
19318for ac_file in conftest.exe conftest conftest.*; do
19319  test -f "$ac_file" || continue
19320  case $ac_file in
19321    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19322    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19323	  break;;
19324    * ) break;;
19325  esac
19326done
19327else
19328  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19329$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19330as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19331See \`config.log' for more details" "$LINENO" 5; }
19332fi
19333rm -f conftest conftest$ac_cv_exeext
19334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19335$as_echo "$ac_cv_exeext" >&6; }
19336
19337rm -f conftest.$ac_ext
19338EXEEXT=$ac_cv_exeext
19339ac_exeext=$EXEEXT
19340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19341/* end confdefs.h.  */
19342#include <stdio.h>
19343int
19344main ()
19345{
19346FILE *f = fopen ("conftest.out", "w");
19347 return ferror (f) || fclose (f) != 0;
19348
19349  ;
19350  return 0;
19351}
19352_ACEOF
19353ac_clean_files="$ac_clean_files conftest.out"
19354# Check that the compiler produces executables we can run.  If not, either
19355# the compiler is broken, or we cross compile.
19356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19357$as_echo_n "checking whether we are cross compiling... " >&6; }
19358if test "$cross_compiling" != yes; then
19359  { { ac_try="$ac_link"
19360case "(($ac_try" in
19361  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19362  *) ac_try_echo=$ac_try;;
19363esac
19364eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19365$as_echo "$ac_try_echo"; } >&5
19366  (eval "$ac_link") 2>&5
19367  ac_status=$?
19368  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19369  test $ac_status = 0; }
19370  if { ac_try='./conftest$ac_cv_exeext'
19371  { { case "(($ac_try" in
19372  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19373  *) ac_try_echo=$ac_try;;
19374esac
19375eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19376$as_echo "$ac_try_echo"; } >&5
19377  (eval "$ac_try") 2>&5
19378  ac_status=$?
19379  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19380  test $ac_status = 0; }; }; then
19381    cross_compiling=no
19382  else
19383    if test "$cross_compiling" = maybe; then
19384	cross_compiling=yes
19385    else
19386	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19388as_fn_error $? "cannot run C compiled programs.
19389If you meant to cross compile, use \`--host'.
19390See \`config.log' for more details" "$LINENO" 5; }
19391    fi
19392  fi
19393fi
19394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19395$as_echo "$cross_compiling" >&6; }
19396
19397rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19398ac_clean_files=$ac_clean_files_save
19399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19400$as_echo_n "checking for suffix of object files... " >&6; }
19401if ${ac_cv_objext+:} false; then :
19402  $as_echo_n "(cached) " >&6
19403else
19404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19405/* end confdefs.h.  */
19406
19407int
19408main ()
19409{
19410
19411  ;
19412  return 0;
19413}
19414_ACEOF
19415rm -f conftest.o conftest.obj
19416if { { ac_try="$ac_compile"
19417case "(($ac_try" in
19418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19419  *) ac_try_echo=$ac_try;;
19420esac
19421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19422$as_echo "$ac_try_echo"; } >&5
19423  (eval "$ac_compile") 2>&5
19424  ac_status=$?
19425  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19426  test $ac_status = 0; }; then :
19427  for ac_file in conftest.o conftest.obj conftest.*; do
19428  test -f "$ac_file" || continue;
19429  case $ac_file in
19430    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19431    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19432       break;;
19433  esac
19434done
19435else
19436  $as_echo "$as_me: failed program was:" >&5
19437sed 's/^/| /' conftest.$ac_ext >&5
19438
19439{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19440$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19441as_fn_error $? "cannot compute suffix of object files: cannot compile
19442See \`config.log' for more details" "$LINENO" 5; }
19443fi
19444rm -f conftest.$ac_cv_objext conftest.$ac_ext
19445fi
19446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19447$as_echo "$ac_cv_objext" >&6; }
19448OBJEXT=$ac_cv_objext
19449ac_objext=$OBJEXT
19450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19451$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19452if ${ac_cv_c_compiler_gnu+:} false; then :
19453  $as_echo_n "(cached) " >&6
19454else
19455  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19456/* end confdefs.h.  */
19457
19458int
19459main ()
19460{
19461#ifndef __GNUC__
19462       choke me
19463#endif
19464
19465  ;
19466  return 0;
19467}
19468_ACEOF
19469if ac_fn_c_try_compile "$LINENO"; then :
19470  ac_compiler_gnu=yes
19471else
19472  ac_compiler_gnu=no
19473fi
19474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19475ac_cv_c_compiler_gnu=$ac_compiler_gnu
19476
19477fi
19478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19479$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19480if test $ac_compiler_gnu = yes; then
19481  GCC=yes
19482else
19483  GCC=
19484fi
19485ac_test_CFLAGS=${CFLAGS+set}
19486ac_save_CFLAGS=$CFLAGS
19487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19488$as_echo_n "checking whether $CC accepts -g... " >&6; }
19489if ${ac_cv_prog_cc_g+:} false; then :
19490  $as_echo_n "(cached) " >&6
19491else
19492  ac_save_c_werror_flag=$ac_c_werror_flag
19493   ac_c_werror_flag=yes
19494   ac_cv_prog_cc_g=no
19495   CFLAGS="-g"
19496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19497/* end confdefs.h.  */
19498
19499int
19500main ()
19501{
19502
19503  ;
19504  return 0;
19505}
19506_ACEOF
19507if ac_fn_c_try_compile "$LINENO"; then :
19508  ac_cv_prog_cc_g=yes
19509else
19510  CFLAGS=""
19511      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19512/* end confdefs.h.  */
19513
19514int
19515main ()
19516{
19517
19518  ;
19519  return 0;
19520}
19521_ACEOF
19522if ac_fn_c_try_compile "$LINENO"; then :
19523
19524else
19525  ac_c_werror_flag=$ac_save_c_werror_flag
19526	 CFLAGS="-g"
19527	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19528/* end confdefs.h.  */
19529
19530int
19531main ()
19532{
19533
19534  ;
19535  return 0;
19536}
19537_ACEOF
19538if ac_fn_c_try_compile "$LINENO"; then :
19539  ac_cv_prog_cc_g=yes
19540fi
19541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19542fi
19543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19544fi
19545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19546   ac_c_werror_flag=$ac_save_c_werror_flag
19547fi
19548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19549$as_echo "$ac_cv_prog_cc_g" >&6; }
19550if test "$ac_test_CFLAGS" = set; then
19551  CFLAGS=$ac_save_CFLAGS
19552elif test $ac_cv_prog_cc_g = yes; then
19553  if test "$GCC" = yes; then
19554    CFLAGS="-g -O2"
19555  else
19556    CFLAGS="-g"
19557  fi
19558else
19559  if test "$GCC" = yes; then
19560    CFLAGS="-O2"
19561  else
19562    CFLAGS=
19563  fi
19564fi
19565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19566$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19567if ${ac_cv_prog_cc_c89+:} false; then :
19568  $as_echo_n "(cached) " >&6
19569else
19570  ac_cv_prog_cc_c89=no
19571ac_save_CC=$CC
19572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19573/* end confdefs.h.  */
19574#include <stdarg.h>
19575#include <stdio.h>
19576#include <sys/types.h>
19577#include <sys/stat.h>
19578/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19579struct buf { int x; };
19580FILE * (*rcsopen) (struct buf *, struct stat *, int);
19581static char *e (p, i)
19582     char **p;
19583     int i;
19584{
19585  return p[i];
19586}
19587static char *f (char * (*g) (char **, int), char **p, ...)
19588{
19589  char *s;
19590  va_list v;
19591  va_start (v,p);
19592  s = g (p, va_arg (v,int));
19593  va_end (v);
19594  return s;
19595}
19596
19597/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19598   function prototypes and stuff, but not '\xHH' hex character constants.
19599   These don't provoke an error unfortunately, instead are silently treated
19600   as 'x'.  The following induces an error, until -std is added to get
19601   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19602   array size at least.  It's necessary to write '\x00'==0 to get something
19603   that's true only with -std.  */
19604int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19605
19606/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19607   inside strings and character constants.  */
19608#define FOO(x) 'x'
19609int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19610
19611int test (int i, double x);
19612struct s1 {int (*f) (int a);};
19613struct s2 {int (*f) (double a);};
19614int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19615int argc;
19616char **argv;
19617int
19618main ()
19619{
19620return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19621  ;
19622  return 0;
19623}
19624_ACEOF
19625for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19626	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19627do
19628  CC="$ac_save_CC $ac_arg"
19629  if ac_fn_c_try_compile "$LINENO"; then :
19630  ac_cv_prog_cc_c89=$ac_arg
19631fi
19632rm -f core conftest.err conftest.$ac_objext
19633  test "x$ac_cv_prog_cc_c89" != "xno" && break
19634done
19635rm -f conftest.$ac_ext
19636CC=$ac_save_CC
19637
19638fi
19639# AC_CACHE_VAL
19640case "x$ac_cv_prog_cc_c89" in
19641  x)
19642    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19643$as_echo "none needed" >&6; } ;;
19644  xno)
19645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19646$as_echo "unsupported" >&6; } ;;
19647  *)
19648    CC="$CC $ac_cv_prog_cc_c89"
19649    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19650$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19651esac
19652if test "x$ac_cv_prog_cc_c89" != xno; then :
19653
19654fi
19655
19656ac_ext=cpp
19657ac_cpp='$CXXCPP $CPPFLAGS'
19658ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19659ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19660ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19661
19662
19663### Locate C++ compiler (CXX)
19664
19665if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19666  # Do not probe for CC on MacOSX.
19667  COMPILER_CHECK_LIST="cl g++"
19668else
19669  COMPILER_CHECK_LIST="cl CC g++"
19670fi
19671
19672  COMPILER_NAME=C++
19673
19674  CXX=
19675  # If TOOLS_DIR is set, check for all compiler names in there first
19676  # before checking the rest of the PATH.
19677  if test -n "$TOOLS_DIR"; then
19678    PATH_save="$PATH"
19679    PATH="$TOOLS_DIR"
19680    for ac_prog in $COMPILER_CHECK_LIST
19681do
19682  # Extract the first word of "$ac_prog", so it can be a program name with args.
19683set dummy $ac_prog; ac_word=$2
19684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19685$as_echo_n "checking for $ac_word... " >&6; }
19686if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
19687  $as_echo_n "(cached) " >&6
19688else
19689  case $TOOLS_DIR_CXX in
19690  [\\/]* | ?:[\\/]*)
19691  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19692  ;;
19693  *)
19694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19695for as_dir in $PATH
19696do
19697  IFS=$as_save_IFS
19698  test -z "$as_dir" && as_dir=.
19699    for ac_exec_ext in '' $ac_executable_extensions; do
19700  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19701    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19703    break 2
19704  fi
19705done
19706  done
19707IFS=$as_save_IFS
19708
19709  ;;
19710esac
19711fi
19712TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19713if test -n "$TOOLS_DIR_CXX"; then
19714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19715$as_echo "$TOOLS_DIR_CXX" >&6; }
19716else
19717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19718$as_echo "no" >&6; }
19719fi
19720
19721
19722  test -n "$TOOLS_DIR_CXX" && break
19723done
19724
19725    CXX=$TOOLS_DIR_CXX
19726    PATH="$PATH_save"
19727  fi
19728
19729  # AC_PATH_PROGS can't be run multiple times with the same variable,
19730  # so create a new name for this run.
19731  if test "x$CXX" = x; then
19732    for ac_prog in $COMPILER_CHECK_LIST
19733do
19734  # Extract the first word of "$ac_prog", so it can be a program name with args.
19735set dummy $ac_prog; ac_word=$2
19736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19737$as_echo_n "checking for $ac_word... " >&6; }
19738if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
19739  $as_echo_n "(cached) " >&6
19740else
19741  case $POTENTIAL_CXX in
19742  [\\/]* | ?:[\\/]*)
19743  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19744  ;;
19745  *)
19746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19747for as_dir in $PATH
19748do
19749  IFS=$as_save_IFS
19750  test -z "$as_dir" && as_dir=.
19751    for ac_exec_ext in '' $ac_executable_extensions; do
19752  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19753    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19755    break 2
19756  fi
19757done
19758  done
19759IFS=$as_save_IFS
19760
19761  ;;
19762esac
19763fi
19764POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19765if test -n "$POTENTIAL_CXX"; then
19766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19767$as_echo "$POTENTIAL_CXX" >&6; }
19768else
19769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19770$as_echo "no" >&6; }
19771fi
19772
19773
19774  test -n "$POTENTIAL_CXX" && break
19775done
19776
19777    CXX=$POTENTIAL_CXX
19778  fi
19779
19780  if test "x$CXX" = x; then
19781
19782    # Print a helpful message on how to acquire the necessary build dependency.
19783    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19784    MISSING_DEPENDENCY=devkit
19785    PKGHANDLER_COMMAND=
19786
19787    case $PKGHANDLER in
19788	apt-get)
19789                apt_help     $MISSING_DEPENDENCY ;;
19790    yum)
19791                yum_help     $MISSING_DEPENDENCY ;;
19792	port)
19793                port_help    $MISSING_DEPENDENCY ;;
19794	pkgutil)
19795                pkgutil_help $MISSING_DEPENDENCY ;;
19796	pkgadd)
19797                pkgadd_help  $MISSING_DEPENDENCY ;;
19798    * )
19799      break ;;
19800    esac
19801
19802    if test "x$PKGHANDLER_COMMAND" != x; then
19803        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19804    fi
19805
19806      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19807  fi
19808
19809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19810
19811  # First separate the path from the arguments. This will split at the first
19812  # space.
19813  complete="$CXX"
19814  path="${complete%% *}"
19815  tmp="$complete EOL"
19816  arguments="${tmp#* }"
19817
19818  # Input might be given as Windows format, start by converting to
19819  # unix format.
19820  new_path=`$CYGPATH -u "$path"`
19821
19822  # Now try to locate executable using which
19823  new_path=`$WHICH "$new_path" 2> /dev/null`
19824  # bat and cmd files are not always considered executable in cygwin causing which
19825  # to not find them
19826  if test "x$new_path" = x \
19827           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19828           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19829    new_path=`$CYGPATH -u "$path"`
19830  fi
19831  if test "x$new_path" = x; then
19832    # Oops. Which didn't find the executable.
19833    # The splitting of arguments from the executable at a space might have been incorrect,
19834    # since paths with space are more likely in Windows. Give it another try with the whole
19835    # argument.
19836    path="$complete"
19837    arguments="EOL"
19838    new_path=`$CYGPATH -u "$path"`
19839    new_path=`$WHICH "$new_path" 2> /dev/null`
19840    # bat and cmd files are not always considered executable in cygwin causing which
19841    # to not find them
19842    if test "x$new_path" = x \
19843             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19844             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19845      new_path=`$CYGPATH -u "$path"`
19846    fi
19847    if test "x$new_path" = x; then
19848      # It's still not found. Now this is an unrecoverable error.
19849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19850$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19851      has_space=`$ECHO "$complete" | $GREP " "`
19852      if test "x$has_space" != x; then
19853        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19854$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19855      fi
19856      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19857    fi
19858  fi
19859
19860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19863  # "foo.exe" is OK but "foo" is an error.
19864  #
19865  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19866  # It is also a way to make sure we got the proper file name for the real test later on.
19867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19868  if test "x$test_shortpath" = x; then
19869    # Short path failed, file does not exist as specified.
19870    # Try adding .exe or .cmd
19871    if test -f "${new_path}.exe"; then
19872       input_to_shortpath="${new_path}.exe"
19873    elif test -f "${new_path}.cmd"; then
19874       input_to_shortpath="${new_path}.cmd"
19875    else
19876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19877$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19878      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19879$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19880      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19881    fi
19882  else
19883    input_to_shortpath="$new_path"
19884  fi
19885
19886  # Call helper function which possibly converts this using DOS-style short mode.
19887  # If so, the updated path is stored in $new_path.
19888  new_path="$input_to_shortpath"
19889
19890  input_path="$input_to_shortpath"
19891  # Check if we need to convert this using DOS-style short mode. If the path
19892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19893  # take no chances and rewrite it.
19894  # Note: m4 eats our [], so we need to use [ and ] instead.
19895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19896  if test "x$has_forbidden_chars" != x; then
19897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19901      # Going to short mode and back again did indeed matter. Since short mode is
19902      # case insensitive, let's make it lowercase to improve readability.
19903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19904      # Now convert it back to Unix-stile (cygpath)
19905      input_path=`$CYGPATH -u "$shortmode_path"`
19906      new_path="$input_path"
19907    fi
19908  fi
19909
19910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19911  if test "x$test_cygdrive_prefix" = x; then
19912    # As a simple fix, exclude /usr/bin since it's not a real path.
19913    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19915      # a path prefixed by /cygdrive for fixpath to work.
19916      new_path="$CYGWIN_ROOT_PATH$input_path"
19917    fi
19918  fi
19919
19920  # remove trailing .exe if any
19921  new_path="${new_path/%.exe/}"
19922
19923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19924
19925  # First separate the path from the arguments. This will split at the first
19926  # space.
19927  complete="$CXX"
19928  path="${complete%% *}"
19929  tmp="$complete EOL"
19930  arguments="${tmp#* }"
19931
19932  # Input might be given as Windows format, start by converting to
19933  # unix format.
19934  new_path="$path"
19935
19936  windows_path="$new_path"
19937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19938    unix_path=`$CYGPATH -u "$windows_path"`
19939    new_path="$unix_path"
19940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19942    new_path="$unix_path"
19943  fi
19944
19945
19946  # Now try to locate executable using which
19947  new_path=`$WHICH "$new_path" 2> /dev/null`
19948
19949  if test "x$new_path" = x; then
19950    # Oops. Which didn't find the executable.
19951    # The splitting of arguments from the executable at a space might have been incorrect,
19952    # since paths with space are more likely in Windows. Give it another try with the whole
19953    # argument.
19954    path="$complete"
19955    arguments="EOL"
19956    new_path="$path"
19957
19958  windows_path="$new_path"
19959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19960    unix_path=`$CYGPATH -u "$windows_path"`
19961    new_path="$unix_path"
19962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19964    new_path="$unix_path"
19965  fi
19966
19967
19968    new_path=`$WHICH "$new_path" 2> /dev/null`
19969
19970    if test "x$new_path" = x; then
19971      # It's still not found. Now this is an unrecoverable error.
19972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19973$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19974      has_space=`$ECHO "$complete" | $GREP " "`
19975      if test "x$has_space" != x; then
19976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19978      fi
19979      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19980    fi
19981  fi
19982
19983  # Now new_path has a complete unix path to the binary
19984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19985    # Keep paths in /bin as-is, but remove trailing .exe if any
19986    new_path="${new_path/%.exe/}"
19987    # Do not save /bin paths to all_fixpath_prefixes!
19988  else
19989    # Not in mixed or Windows style, start by that.
19990    new_path=`cmd //c echo $new_path`
19991
19992  input_path="$new_path"
19993  # Check if we need to convert this using DOS-style short mode. If the path
19994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19995  # take no chances and rewrite it.
19996  # Note: m4 eats our [], so we need to use [ and ] instead.
19997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19998  if test "x$has_forbidden_chars" != x; then
19999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20001  fi
20002
20003    # Output is in $new_path
20004
20005  windows_path="$new_path"
20006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20007    unix_path=`$CYGPATH -u "$windows_path"`
20008    new_path="$unix_path"
20009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20011    new_path="$unix_path"
20012  fi
20013
20014    # remove trailing .exe if any
20015    new_path="${new_path/%.exe/}"
20016
20017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20019  fi
20020
20021  else
20022    # We're on a posix platform. Hooray! :)
20023    # First separate the path from the arguments. This will split at the first
20024    # space.
20025    complete="$CXX"
20026    path="${complete%% *}"
20027    tmp="$complete EOL"
20028    arguments="${tmp#* }"
20029
20030    # Cannot rely on the command "which" here since it doesn't always work.
20031    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20032    if test -z "$is_absolute_path"; then
20033      # Path to executable is not absolute. Find it.
20034      IFS_save="$IFS"
20035      IFS=:
20036      for p in $PATH; do
20037        if test -f "$p/$path" && test -x "$p/$path"; then
20038          new_path="$p/$path"
20039          break
20040        fi
20041      done
20042      IFS="$IFS_save"
20043    else
20044      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20045$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20046      new_path="$path"
20047    fi
20048
20049    if test "x$new_path" = x; then
20050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20051$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20052        has_space=`$ECHO "$complete" | $GREP " "`
20053        if test "x$has_space" != x; then
20054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20056        fi
20057        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20058      fi
20059  fi
20060
20061      # Now join together the path and the arguments once again
20062      if test "x$arguments" != xEOL; then
20063        new_complete="$new_path ${arguments% *}"
20064      else
20065        new_complete="$new_path"
20066      fi
20067
20068  if test "x$complete" != "x$new_complete"; then
20069      CXX="$new_complete"
20070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20071$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20072    fi
20073
20074  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20075$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20076  TEST_COMPILER="$CXX"
20077
20078    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20079        # Follow a chain of symbolic links. Use readlink
20080        # where it exists, else fall back to horribly
20081        # complicated shell code.
20082        if test "x$READLINK_TESTED" != yes; then
20083            # On MacOSX there is a readlink tool with a different
20084            # purpose than the GNU readlink tool. Check the found readlink.
20085            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20086            if test "x$ISGNU" = x; then
20087                 # A readlink that we do not know how to use.
20088                 # Are there other non-GNU readlinks out there?
20089                 READLINK_TESTED=yes
20090                 READLINK=
20091            fi
20092        fi
20093
20094        if test "x$READLINK" != x; then
20095            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20096        else
20097            # Save the current directory for restoring afterwards
20098            STARTDIR=$PWD
20099            COUNTER=0
20100            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20101            sym_link_file=`$BASENAME $TEST_COMPILER`
20102            # Use the system pwd and not the shell builtin to resolve directory symlinks
20103            cd $sym_link_dir
20104            cd `$THEPWDCMD`
20105            sym_link_dir=`$THEPWDCMD`
20106            # Resolve file symlinks
20107            while test $COUNTER -lt 20; do
20108                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20109                if test "x$ISLINK" == x; then
20110                    # This is not a symbolic link! We are done!
20111                    break
20112                fi
20113                # Again resolve directory symlinks since the target of the just found
20114                # link could be in a different directory
20115                cd `$DIRNAME $ISLINK`
20116                sym_link_dir=`$THEPWDCMD`
20117                sym_link_file=`$BASENAME $ISLINK`
20118                let COUNTER=COUNTER+1
20119            done
20120            cd $STARTDIR
20121            TEST_COMPILER=$sym_link_dir/$sym_link_file
20122        fi
20123    fi
20124
20125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20126$as_echo "$TEST_COMPILER" >&6; }
20127  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20128$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20129
20130  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20131  if test "x$COMPILER_BASENAME" = "xccache"; then
20132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20133$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20134    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20135    # We want to control ccache invocation ourselves, so ignore this cc and try
20136    # searching again.
20137
20138    # Remove the path to the fake ccache cc from the PATH
20139    RETRY_COMPILER_SAVED_PATH="$PATH"
20140    COMPILER_DIRNAME=`$DIRNAME $CXX`
20141    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20142
20143    # Try again looking for our compiler
20144    if test -n "$ac_tool_prefix"; then
20145  for ac_prog in $COMPILER_CHECK_LIST
20146  do
20147    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20148set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20150$as_echo_n "checking for $ac_word... " >&6; }
20151if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20152  $as_echo_n "(cached) " >&6
20153else
20154  if test -n "$PROPER_COMPILER_CXX"; then
20155  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20156else
20157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20158for as_dir in $PATH
20159do
20160  IFS=$as_save_IFS
20161  test -z "$as_dir" && as_dir=.
20162    for ac_exec_ext in '' $ac_executable_extensions; do
20163  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20164    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20166    break 2
20167  fi
20168done
20169  done
20170IFS=$as_save_IFS
20171
20172fi
20173fi
20174PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20175if test -n "$PROPER_COMPILER_CXX"; then
20176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20177$as_echo "$PROPER_COMPILER_CXX" >&6; }
20178else
20179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20180$as_echo "no" >&6; }
20181fi
20182
20183
20184    test -n "$PROPER_COMPILER_CXX" && break
20185  done
20186fi
20187if test -z "$PROPER_COMPILER_CXX"; then
20188  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20189  for ac_prog in $COMPILER_CHECK_LIST
20190do
20191  # Extract the first word of "$ac_prog", so it can be a program name with args.
20192set dummy $ac_prog; ac_word=$2
20193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20194$as_echo_n "checking for $ac_word... " >&6; }
20195if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20196  $as_echo_n "(cached) " >&6
20197else
20198  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20199  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20200else
20201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20202for as_dir in $PATH
20203do
20204  IFS=$as_save_IFS
20205  test -z "$as_dir" && as_dir=.
20206    for ac_exec_ext in '' $ac_executable_extensions; do
20207  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20208    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20210    break 2
20211  fi
20212done
20213  done
20214IFS=$as_save_IFS
20215
20216fi
20217fi
20218ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20219if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20221$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20222else
20223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20224$as_echo "no" >&6; }
20225fi
20226
20227
20228  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20229done
20230
20231  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20232    PROPER_COMPILER_CXX=""
20233  else
20234    case $cross_compiling:$ac_tool_warned in
20235yes:)
20236{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20237$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20238ac_tool_warned=yes ;;
20239esac
20240    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20241  fi
20242fi
20243
20244
20245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20246
20247  # First separate the path from the arguments. This will split at the first
20248  # space.
20249  complete="$PROPER_COMPILER_CXX"
20250  path="${complete%% *}"
20251  tmp="$complete EOL"
20252  arguments="${tmp#* }"
20253
20254  # Input might be given as Windows format, start by converting to
20255  # unix format.
20256  new_path=`$CYGPATH -u "$path"`
20257
20258  # Now try to locate executable using which
20259  new_path=`$WHICH "$new_path" 2> /dev/null`
20260  # bat and cmd files are not always considered executable in cygwin causing which
20261  # to not find them
20262  if test "x$new_path" = x \
20263           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20264           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20265    new_path=`$CYGPATH -u "$path"`
20266  fi
20267  if test "x$new_path" = x; then
20268    # Oops. Which didn't find the executable.
20269    # The splitting of arguments from the executable at a space might have been incorrect,
20270    # since paths with space are more likely in Windows. Give it another try with the whole
20271    # argument.
20272    path="$complete"
20273    arguments="EOL"
20274    new_path=`$CYGPATH -u "$path"`
20275    new_path=`$WHICH "$new_path" 2> /dev/null`
20276    # bat and cmd files are not always considered executable in cygwin causing which
20277    # to not find them
20278    if test "x$new_path" = x \
20279             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20280             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20281      new_path=`$CYGPATH -u "$path"`
20282    fi
20283    if test "x$new_path" = x; then
20284      # It's still not found. Now this is an unrecoverable error.
20285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20286$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20287      has_space=`$ECHO "$complete" | $GREP " "`
20288      if test "x$has_space" != x; then
20289        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20290$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20291      fi
20292      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20293    fi
20294  fi
20295
20296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20299  # "foo.exe" is OK but "foo" is an error.
20300  #
20301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20302  # It is also a way to make sure we got the proper file name for the real test later on.
20303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20304  if test "x$test_shortpath" = x; then
20305    # Short path failed, file does not exist as specified.
20306    # Try adding .exe or .cmd
20307    if test -f "${new_path}.exe"; then
20308       input_to_shortpath="${new_path}.exe"
20309    elif test -f "${new_path}.cmd"; then
20310       input_to_shortpath="${new_path}.cmd"
20311    else
20312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20313$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20314      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20315$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20316      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20317    fi
20318  else
20319    input_to_shortpath="$new_path"
20320  fi
20321
20322  # Call helper function which possibly converts this using DOS-style short mode.
20323  # If so, the updated path is stored in $new_path.
20324  new_path="$input_to_shortpath"
20325
20326  input_path="$input_to_shortpath"
20327  # Check if we need to convert this using DOS-style short mode. If the path
20328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20329  # take no chances and rewrite it.
20330  # Note: m4 eats our [], so we need to use [ and ] instead.
20331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20332  if test "x$has_forbidden_chars" != x; then
20333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20337      # Going to short mode and back again did indeed matter. Since short mode is
20338      # case insensitive, let's make it lowercase to improve readability.
20339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20340      # Now convert it back to Unix-stile (cygpath)
20341      input_path=`$CYGPATH -u "$shortmode_path"`
20342      new_path="$input_path"
20343    fi
20344  fi
20345
20346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20347  if test "x$test_cygdrive_prefix" = x; then
20348    # As a simple fix, exclude /usr/bin since it's not a real path.
20349    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20351      # a path prefixed by /cygdrive for fixpath to work.
20352      new_path="$CYGWIN_ROOT_PATH$input_path"
20353    fi
20354  fi
20355
20356  # remove trailing .exe if any
20357  new_path="${new_path/%.exe/}"
20358
20359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20360
20361  # First separate the path from the arguments. This will split at the first
20362  # space.
20363  complete="$PROPER_COMPILER_CXX"
20364  path="${complete%% *}"
20365  tmp="$complete EOL"
20366  arguments="${tmp#* }"
20367
20368  # Input might be given as Windows format, start by converting to
20369  # unix format.
20370  new_path="$path"
20371
20372  windows_path="$new_path"
20373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20374    unix_path=`$CYGPATH -u "$windows_path"`
20375    new_path="$unix_path"
20376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20378    new_path="$unix_path"
20379  fi
20380
20381
20382  # Now try to locate executable using which
20383  new_path=`$WHICH "$new_path" 2> /dev/null`
20384
20385  if test "x$new_path" = x; then
20386    # Oops. Which didn't find the executable.
20387    # The splitting of arguments from the executable at a space might have been incorrect,
20388    # since paths with space are more likely in Windows. Give it another try with the whole
20389    # argument.
20390    path="$complete"
20391    arguments="EOL"
20392    new_path="$path"
20393
20394  windows_path="$new_path"
20395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20396    unix_path=`$CYGPATH -u "$windows_path"`
20397    new_path="$unix_path"
20398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20400    new_path="$unix_path"
20401  fi
20402
20403
20404    new_path=`$WHICH "$new_path" 2> /dev/null`
20405
20406    if test "x$new_path" = x; then
20407      # It's still not found. Now this is an unrecoverable error.
20408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20409$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20410      has_space=`$ECHO "$complete" | $GREP " "`
20411      if test "x$has_space" != x; then
20412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20414      fi
20415      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20416    fi
20417  fi
20418
20419  # Now new_path has a complete unix path to the binary
20420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20421    # Keep paths in /bin as-is, but remove trailing .exe if any
20422    new_path="${new_path/%.exe/}"
20423    # Do not save /bin paths to all_fixpath_prefixes!
20424  else
20425    # Not in mixed or Windows style, start by that.
20426    new_path=`cmd //c echo $new_path`
20427
20428  input_path="$new_path"
20429  # Check if we need to convert this using DOS-style short mode. If the path
20430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20431  # take no chances and rewrite it.
20432  # Note: m4 eats our [], so we need to use [ and ] instead.
20433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20434  if test "x$has_forbidden_chars" != x; then
20435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20437  fi
20438
20439    # Output is in $new_path
20440
20441  windows_path="$new_path"
20442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20443    unix_path=`$CYGPATH -u "$windows_path"`
20444    new_path="$unix_path"
20445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20447    new_path="$unix_path"
20448  fi
20449
20450    # remove trailing .exe if any
20451    new_path="${new_path/%.exe/}"
20452
20453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20455  fi
20456
20457  else
20458    # We're on a posix platform. Hooray! :)
20459    # First separate the path from the arguments. This will split at the first
20460    # space.
20461    complete="$PROPER_COMPILER_CXX"
20462    path="${complete%% *}"
20463    tmp="$complete EOL"
20464    arguments="${tmp#* }"
20465
20466    # Cannot rely on the command "which" here since it doesn't always work.
20467    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20468    if test -z "$is_absolute_path"; then
20469      # Path to executable is not absolute. Find it.
20470      IFS_save="$IFS"
20471      IFS=:
20472      for p in $PATH; do
20473        if test -f "$p/$path" && test -x "$p/$path"; then
20474          new_path="$p/$path"
20475          break
20476        fi
20477      done
20478      IFS="$IFS_save"
20479    else
20480      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20481$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20482      new_path="$path"
20483    fi
20484
20485    if test "x$new_path" = x; then
20486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20487$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20488        has_space=`$ECHO "$complete" | $GREP " "`
20489        if test "x$has_space" != x; then
20490          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20491$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20492        fi
20493        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20494      fi
20495  fi
20496
20497      # Now join together the path and the arguments once again
20498      if test "x$arguments" != xEOL; then
20499        new_complete="$new_path ${arguments% *}"
20500      else
20501        new_complete="$new_path"
20502      fi
20503
20504  if test "x$complete" != "x$new_complete"; then
20505      PROPER_COMPILER_CXX="$new_complete"
20506      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20507$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20508    fi
20509
20510    PATH="$RETRY_COMPILER_SAVED_PATH"
20511
20512    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20513$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20514
20515    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20516        # Follow a chain of symbolic links. Use readlink
20517        # where it exists, else fall back to horribly
20518        # complicated shell code.
20519        if test "x$READLINK_TESTED" != yes; then
20520            # On MacOSX there is a readlink tool with a different
20521            # purpose than the GNU readlink tool. Check the found readlink.
20522            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20523            if test "x$ISGNU" = x; then
20524                 # A readlink that we do not know how to use.
20525                 # Are there other non-GNU readlinks out there?
20526                 READLINK_TESTED=yes
20527                 READLINK=
20528            fi
20529        fi
20530
20531        if test "x$READLINK" != x; then
20532            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20533        else
20534            # Save the current directory for restoring afterwards
20535            STARTDIR=$PWD
20536            COUNTER=0
20537            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20538            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20539            # Use the system pwd and not the shell builtin to resolve directory symlinks
20540            cd $sym_link_dir
20541            cd `$THEPWDCMD`
20542            sym_link_dir=`$THEPWDCMD`
20543            # Resolve file symlinks
20544            while test $COUNTER -lt 20; do
20545                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20546                if test "x$ISLINK" == x; then
20547                    # This is not a symbolic link! We are done!
20548                    break
20549                fi
20550                # Again resolve directory symlinks since the target of the just found
20551                # link could be in a different directory
20552                cd `$DIRNAME $ISLINK`
20553                sym_link_dir=`$THEPWDCMD`
20554                sym_link_file=`$BASENAME $ISLINK`
20555                let COUNTER=COUNTER+1
20556            done
20557            cd $STARTDIR
20558            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20559        fi
20560    fi
20561
20562    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20563$as_echo "$PROPER_COMPILER_CXX" >&6; }
20564    CXX="$PROPER_COMPILER_CXX"
20565  else
20566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20567$as_echo "no, keeping CXX" >&6; }
20568    CXX="$TEST_COMPILER"
20569  fi
20570
20571  COMPILER=$CXX
20572  COMPILER_NAME=$COMPILER_NAME
20573
20574  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20575    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20576    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20577    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20578    if test $? -ne 0; then
20579      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20580
20581      { $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
20582$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20583      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20584$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20585      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20586    else
20587      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20588      COMPILER_VENDOR="Sun Studio"
20589    fi
20590  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20591    # First line typically looks something like:
20592    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20593    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20594    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20595    COMPILER_VENDOR="Microsoft CL.EXE"
20596    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20597    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20598      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20599        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20600      fi
20601    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20602      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20603        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20604      fi
20605    fi
20606  else
20607    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20608    # Check that this is likely to be GCC.
20609    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20610    if test $? -ne 0; then
20611      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20612$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20613      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20614$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20615      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20616    fi
20617
20618    # First line typically looks something like:
20619    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20620    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20621    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20622  fi
20623  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20624  CXX_VERSION="$COMPILER_VERSION"
20625  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20626  CXX_VENDOR="$COMPILER_VENDOR"
20627
20628  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20629$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20630
20631
20632# Now that we have resolved CXX ourself, let autoconf have it's go at it
20633ac_ext=cpp
20634ac_cpp='$CXXCPP $CPPFLAGS'
20635ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20636ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20637ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20638if test -z "$CXX"; then
20639  if test -n "$CCC"; then
20640    CXX=$CCC
20641  else
20642    if test -n "$ac_tool_prefix"; then
20643  for ac_prog in $CXX
20644  do
20645    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20646set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20648$as_echo_n "checking for $ac_word... " >&6; }
20649if ${ac_cv_prog_CXX+:} false; then :
20650  $as_echo_n "(cached) " >&6
20651else
20652  if test -n "$CXX"; then
20653  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20654else
20655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20656for as_dir in $PATH
20657do
20658  IFS=$as_save_IFS
20659  test -z "$as_dir" && as_dir=.
20660    for ac_exec_ext in '' $ac_executable_extensions; do
20661  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20662    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20664    break 2
20665  fi
20666done
20667  done
20668IFS=$as_save_IFS
20669
20670fi
20671fi
20672CXX=$ac_cv_prog_CXX
20673if test -n "$CXX"; then
20674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20675$as_echo "$CXX" >&6; }
20676else
20677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20678$as_echo "no" >&6; }
20679fi
20680
20681
20682    test -n "$CXX" && break
20683  done
20684fi
20685if test -z "$CXX"; then
20686  ac_ct_CXX=$CXX
20687  for ac_prog in $CXX
20688do
20689  # Extract the first word of "$ac_prog", so it can be a program name with args.
20690set dummy $ac_prog; ac_word=$2
20691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20692$as_echo_n "checking for $ac_word... " >&6; }
20693if ${ac_cv_prog_ac_ct_CXX+:} false; then :
20694  $as_echo_n "(cached) " >&6
20695else
20696  if test -n "$ac_ct_CXX"; then
20697  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20698else
20699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20700for as_dir in $PATH
20701do
20702  IFS=$as_save_IFS
20703  test -z "$as_dir" && as_dir=.
20704    for ac_exec_ext in '' $ac_executable_extensions; do
20705  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20706    ac_cv_prog_ac_ct_CXX="$ac_prog"
20707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20708    break 2
20709  fi
20710done
20711  done
20712IFS=$as_save_IFS
20713
20714fi
20715fi
20716ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20717if test -n "$ac_ct_CXX"; then
20718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20719$as_echo "$ac_ct_CXX" >&6; }
20720else
20721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20722$as_echo "no" >&6; }
20723fi
20724
20725
20726  test -n "$ac_ct_CXX" && break
20727done
20728
20729  if test "x$ac_ct_CXX" = x; then
20730    CXX="g++"
20731  else
20732    case $cross_compiling:$ac_tool_warned in
20733yes:)
20734{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20735$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20736ac_tool_warned=yes ;;
20737esac
20738    CXX=$ac_ct_CXX
20739  fi
20740fi
20741
20742  fi
20743fi
20744# Provide some information about the compiler.
20745$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20746set X $ac_compile
20747ac_compiler=$2
20748for ac_option in --version -v -V -qversion; do
20749  { { ac_try="$ac_compiler $ac_option >&5"
20750case "(($ac_try" in
20751  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20752  *) ac_try_echo=$ac_try;;
20753esac
20754eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20755$as_echo "$ac_try_echo"; } >&5
20756  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20757  ac_status=$?
20758  if test -s conftest.err; then
20759    sed '10a\
20760... rest of stderr output deleted ...
20761         10q' conftest.err >conftest.er1
20762    cat conftest.er1 >&5
20763  fi
20764  rm -f conftest.er1 conftest.err
20765  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20766  test $ac_status = 0; }
20767done
20768
20769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20770$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20771if ${ac_cv_cxx_compiler_gnu+:} false; then :
20772  $as_echo_n "(cached) " >&6
20773else
20774  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20775/* end confdefs.h.  */
20776
20777int
20778main ()
20779{
20780#ifndef __GNUC__
20781       choke me
20782#endif
20783
20784  ;
20785  return 0;
20786}
20787_ACEOF
20788if ac_fn_cxx_try_compile "$LINENO"; then :
20789  ac_compiler_gnu=yes
20790else
20791  ac_compiler_gnu=no
20792fi
20793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20794ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20795
20796fi
20797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20798$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20799if test $ac_compiler_gnu = yes; then
20800  GXX=yes
20801else
20802  GXX=
20803fi
20804ac_test_CXXFLAGS=${CXXFLAGS+set}
20805ac_save_CXXFLAGS=$CXXFLAGS
20806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20807$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20808if ${ac_cv_prog_cxx_g+:} false; then :
20809  $as_echo_n "(cached) " >&6
20810else
20811  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20812   ac_cxx_werror_flag=yes
20813   ac_cv_prog_cxx_g=no
20814   CXXFLAGS="-g"
20815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20816/* end confdefs.h.  */
20817
20818int
20819main ()
20820{
20821
20822  ;
20823  return 0;
20824}
20825_ACEOF
20826if ac_fn_cxx_try_compile "$LINENO"; then :
20827  ac_cv_prog_cxx_g=yes
20828else
20829  CXXFLAGS=""
20830      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20831/* end confdefs.h.  */
20832
20833int
20834main ()
20835{
20836
20837  ;
20838  return 0;
20839}
20840_ACEOF
20841if ac_fn_cxx_try_compile "$LINENO"; then :
20842
20843else
20844  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20845	 CXXFLAGS="-g"
20846	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20847/* end confdefs.h.  */
20848
20849int
20850main ()
20851{
20852
20853  ;
20854  return 0;
20855}
20856_ACEOF
20857if ac_fn_cxx_try_compile "$LINENO"; then :
20858  ac_cv_prog_cxx_g=yes
20859fi
20860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20861fi
20862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20863fi
20864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20865   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20866fi
20867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20868$as_echo "$ac_cv_prog_cxx_g" >&6; }
20869if test "$ac_test_CXXFLAGS" = set; then
20870  CXXFLAGS=$ac_save_CXXFLAGS
20871elif test $ac_cv_prog_cxx_g = yes; then
20872  if test "$GXX" = yes; then
20873    CXXFLAGS="-g -O2"
20874  else
20875    CXXFLAGS="-g"
20876  fi
20877else
20878  if test "$GXX" = yes; then
20879    CXXFLAGS="-O2"
20880  else
20881    CXXFLAGS=
20882  fi
20883fi
20884ac_ext=cpp
20885ac_cpp='$CXXCPP $CPPFLAGS'
20886ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20887ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20888ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20889
20890
20891### Locate other tools
20892
20893if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20894    ac_ext=m
20895ac_cpp='$OBJCPP $CPPFLAGS'
20896ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20897ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20898ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20899if test -n "$ac_tool_prefix"; then
20900  for ac_prog in gcc objcc objc cc CC
20901  do
20902    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20903set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20905$as_echo_n "checking for $ac_word... " >&6; }
20906if ${ac_cv_prog_OBJC+:} false; then :
20907  $as_echo_n "(cached) " >&6
20908else
20909  if test -n "$OBJC"; then
20910  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20911else
20912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20913for as_dir in $PATH
20914do
20915  IFS=$as_save_IFS
20916  test -z "$as_dir" && as_dir=.
20917    for ac_exec_ext in '' $ac_executable_extensions; do
20918  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20919    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20921    break 2
20922  fi
20923done
20924  done
20925IFS=$as_save_IFS
20926
20927fi
20928fi
20929OBJC=$ac_cv_prog_OBJC
20930if test -n "$OBJC"; then
20931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20932$as_echo "$OBJC" >&6; }
20933else
20934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20935$as_echo "no" >&6; }
20936fi
20937
20938
20939    test -n "$OBJC" && break
20940  done
20941fi
20942if test -z "$OBJC"; then
20943  ac_ct_OBJC=$OBJC
20944  for ac_prog in gcc objcc objc cc CC
20945do
20946  # Extract the first word of "$ac_prog", so it can be a program name with args.
20947set dummy $ac_prog; ac_word=$2
20948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20949$as_echo_n "checking for $ac_word... " >&6; }
20950if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
20951  $as_echo_n "(cached) " >&6
20952else
20953  if test -n "$ac_ct_OBJC"; then
20954  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20955else
20956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20957for as_dir in $PATH
20958do
20959  IFS=$as_save_IFS
20960  test -z "$as_dir" && as_dir=.
20961    for ac_exec_ext in '' $ac_executable_extensions; do
20962  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20963    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20965    break 2
20966  fi
20967done
20968  done
20969IFS=$as_save_IFS
20970
20971fi
20972fi
20973ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20974if test -n "$ac_ct_OBJC"; then
20975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20976$as_echo "$ac_ct_OBJC" >&6; }
20977else
20978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20979$as_echo "no" >&6; }
20980fi
20981
20982
20983  test -n "$ac_ct_OBJC" && break
20984done
20985
20986  if test "x$ac_ct_OBJC" = x; then
20987    OBJC="gcc"
20988  else
20989    case $cross_compiling:$ac_tool_warned in
20990yes:)
20991{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20992$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20993ac_tool_warned=yes ;;
20994esac
20995    OBJC=$ac_ct_OBJC
20996  fi
20997fi
20998
20999# Provide some information about the compiler.
21000$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21001set X $ac_compile
21002ac_compiler=$2
21003for ac_option in --version -v -V -qversion; do
21004  { { ac_try="$ac_compiler $ac_option >&5"
21005case "(($ac_try" in
21006  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21007  *) ac_try_echo=$ac_try;;
21008esac
21009eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21010$as_echo "$ac_try_echo"; } >&5
21011  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21012  ac_status=$?
21013  if test -s conftest.err; then
21014    sed '10a\
21015... rest of stderr output deleted ...
21016         10q' conftest.err >conftest.er1
21017    cat conftest.er1 >&5
21018  fi
21019  rm -f conftest.er1 conftest.err
21020  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21021  test $ac_status = 0; }
21022done
21023
21024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21025$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21026if ${ac_cv_objc_compiler_gnu+:} false; then :
21027  $as_echo_n "(cached) " >&6
21028else
21029  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21030/* end confdefs.h.  */
21031
21032int
21033main ()
21034{
21035#ifndef __GNUC__
21036       choke me
21037#endif
21038
21039  ;
21040  return 0;
21041}
21042_ACEOF
21043if ac_fn_objc_try_compile "$LINENO"; then :
21044  ac_compiler_gnu=yes
21045else
21046  ac_compiler_gnu=no
21047fi
21048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21049ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21050
21051fi
21052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21053$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21054if test $ac_compiler_gnu = yes; then
21055  GOBJC=yes
21056else
21057  GOBJC=
21058fi
21059ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21060ac_save_OBJCFLAGS=$OBJCFLAGS
21061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21062$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21063if ${ac_cv_prog_objc_g+:} false; then :
21064  $as_echo_n "(cached) " >&6
21065else
21066  ac_save_objc_werror_flag=$ac_objc_werror_flag
21067   ac_objc_werror_flag=yes
21068   ac_cv_prog_objc_g=no
21069   OBJCFLAGS="-g"
21070   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21071/* end confdefs.h.  */
21072
21073int
21074main ()
21075{
21076
21077  ;
21078  return 0;
21079}
21080_ACEOF
21081if ac_fn_objc_try_compile "$LINENO"; then :
21082  ac_cv_prog_objc_g=yes
21083else
21084  OBJCFLAGS=""
21085      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21086/* end confdefs.h.  */
21087
21088int
21089main ()
21090{
21091
21092  ;
21093  return 0;
21094}
21095_ACEOF
21096if ac_fn_objc_try_compile "$LINENO"; then :
21097
21098else
21099  ac_objc_werror_flag=$ac_save_objc_werror_flag
21100	 OBJCFLAGS="-g"
21101	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21102/* end confdefs.h.  */
21103
21104int
21105main ()
21106{
21107
21108  ;
21109  return 0;
21110}
21111_ACEOF
21112if ac_fn_objc_try_compile "$LINENO"; then :
21113  ac_cv_prog_objc_g=yes
21114fi
21115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21116fi
21117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21118fi
21119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21120   ac_objc_werror_flag=$ac_save_objc_werror_flag
21121fi
21122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21123$as_echo "$ac_cv_prog_objc_g" >&6; }
21124if test "$ac_test_OBJCFLAGS" = set; then
21125  OBJCFLAGS=$ac_save_OBJCFLAGS
21126elif test $ac_cv_prog_objc_g = yes; then
21127  if test "$GOBJC" = yes; then
21128    OBJCFLAGS="-g -O2"
21129  else
21130    OBJCFLAGS="-g"
21131  fi
21132else
21133  if test "$GOBJC" = yes; then
21134    OBJCFLAGS="-O2"
21135  else
21136    OBJCFLAGS=
21137  fi
21138fi
21139ac_ext=cpp
21140ac_cpp='$CXXCPP $CPPFLAGS'
21141ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21142ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21143ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21144
21145
21146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21147
21148  # First separate the path from the arguments. This will split at the first
21149  # space.
21150  complete="$OBJC"
21151  path="${complete%% *}"
21152  tmp="$complete EOL"
21153  arguments="${tmp#* }"
21154
21155  # Input might be given as Windows format, start by converting to
21156  # unix format.
21157  new_path=`$CYGPATH -u "$path"`
21158
21159  # Now try to locate executable using which
21160  new_path=`$WHICH "$new_path" 2> /dev/null`
21161  # bat and cmd files are not always considered executable in cygwin causing which
21162  # to not find them
21163  if test "x$new_path" = x \
21164           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21165           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21166    new_path=`$CYGPATH -u "$path"`
21167  fi
21168  if test "x$new_path" = x; then
21169    # Oops. Which didn't find the executable.
21170    # The splitting of arguments from the executable at a space might have been incorrect,
21171    # since paths with space are more likely in Windows. Give it another try with the whole
21172    # argument.
21173    path="$complete"
21174    arguments="EOL"
21175    new_path=`$CYGPATH -u "$path"`
21176    new_path=`$WHICH "$new_path" 2> /dev/null`
21177    # bat and cmd files are not always considered executable in cygwin causing which
21178    # to not find them
21179    if test "x$new_path" = x \
21180             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21181             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21182      new_path=`$CYGPATH -u "$path"`
21183    fi
21184    if test "x$new_path" = x; then
21185      # It's still not found. Now this is an unrecoverable error.
21186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21187$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21188      has_space=`$ECHO "$complete" | $GREP " "`
21189      if test "x$has_space" != x; then
21190        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21191$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21192      fi
21193      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21194    fi
21195  fi
21196
21197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21200  # "foo.exe" is OK but "foo" is an error.
21201  #
21202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21203  # It is also a way to make sure we got the proper file name for the real test later on.
21204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21205  if test "x$test_shortpath" = x; then
21206    # Short path failed, file does not exist as specified.
21207    # Try adding .exe or .cmd
21208    if test -f "${new_path}.exe"; then
21209       input_to_shortpath="${new_path}.exe"
21210    elif test -f "${new_path}.cmd"; then
21211       input_to_shortpath="${new_path}.cmd"
21212    else
21213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21214$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21215      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21216$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21217      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21218    fi
21219  else
21220    input_to_shortpath="$new_path"
21221  fi
21222
21223  # Call helper function which possibly converts this using DOS-style short mode.
21224  # If so, the updated path is stored in $new_path.
21225  new_path="$input_to_shortpath"
21226
21227  input_path="$input_to_shortpath"
21228  # Check if we need to convert this using DOS-style short mode. If the path
21229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21230  # take no chances and rewrite it.
21231  # Note: m4 eats our [], so we need to use [ and ] instead.
21232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21233  if test "x$has_forbidden_chars" != x; then
21234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21238      # Going to short mode and back again did indeed matter. Since short mode is
21239      # case insensitive, let's make it lowercase to improve readability.
21240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21241      # Now convert it back to Unix-stile (cygpath)
21242      input_path=`$CYGPATH -u "$shortmode_path"`
21243      new_path="$input_path"
21244    fi
21245  fi
21246
21247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21248  if test "x$test_cygdrive_prefix" = x; then
21249    # As a simple fix, exclude /usr/bin since it's not a real path.
21250    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21252      # a path prefixed by /cygdrive for fixpath to work.
21253      new_path="$CYGWIN_ROOT_PATH$input_path"
21254    fi
21255  fi
21256
21257  # remove trailing .exe if any
21258  new_path="${new_path/%.exe/}"
21259
21260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21261
21262  # First separate the path from the arguments. This will split at the first
21263  # space.
21264  complete="$OBJC"
21265  path="${complete%% *}"
21266  tmp="$complete EOL"
21267  arguments="${tmp#* }"
21268
21269  # Input might be given as Windows format, start by converting to
21270  # unix format.
21271  new_path="$path"
21272
21273  windows_path="$new_path"
21274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21275    unix_path=`$CYGPATH -u "$windows_path"`
21276    new_path="$unix_path"
21277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21279    new_path="$unix_path"
21280  fi
21281
21282
21283  # Now try to locate executable using which
21284  new_path=`$WHICH "$new_path" 2> /dev/null`
21285
21286  if test "x$new_path" = x; then
21287    # Oops. Which didn't find the executable.
21288    # The splitting of arguments from the executable at a space might have been incorrect,
21289    # since paths with space are more likely in Windows. Give it another try with the whole
21290    # argument.
21291    path="$complete"
21292    arguments="EOL"
21293    new_path="$path"
21294
21295  windows_path="$new_path"
21296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21297    unix_path=`$CYGPATH -u "$windows_path"`
21298    new_path="$unix_path"
21299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21301    new_path="$unix_path"
21302  fi
21303
21304
21305    new_path=`$WHICH "$new_path" 2> /dev/null`
21306
21307    if test "x$new_path" = x; then
21308      # It's still not found. Now this is an unrecoverable error.
21309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21310$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21311      has_space=`$ECHO "$complete" | $GREP " "`
21312      if test "x$has_space" != x; then
21313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21315      fi
21316      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21317    fi
21318  fi
21319
21320  # Now new_path has a complete unix path to the binary
21321  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21322    # Keep paths in /bin as-is, but remove trailing .exe if any
21323    new_path="${new_path/%.exe/}"
21324    # Do not save /bin paths to all_fixpath_prefixes!
21325  else
21326    # Not in mixed or Windows style, start by that.
21327    new_path=`cmd //c echo $new_path`
21328
21329  input_path="$new_path"
21330  # Check if we need to convert this using DOS-style short mode. If the path
21331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21332  # take no chances and rewrite it.
21333  # Note: m4 eats our [], so we need to use [ and ] instead.
21334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21335  if test "x$has_forbidden_chars" != x; then
21336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21338  fi
21339
21340    # Output is in $new_path
21341
21342  windows_path="$new_path"
21343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21344    unix_path=`$CYGPATH -u "$windows_path"`
21345    new_path="$unix_path"
21346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21348    new_path="$unix_path"
21349  fi
21350
21351    # remove trailing .exe if any
21352    new_path="${new_path/%.exe/}"
21353
21354    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21355    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21356  fi
21357
21358  else
21359    # We're on a posix platform. Hooray! :)
21360    # First separate the path from the arguments. This will split at the first
21361    # space.
21362    complete="$OBJC"
21363    path="${complete%% *}"
21364    tmp="$complete EOL"
21365    arguments="${tmp#* }"
21366
21367    # Cannot rely on the command "which" here since it doesn't always work.
21368    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21369    if test -z "$is_absolute_path"; then
21370      # Path to executable is not absolute. Find it.
21371      IFS_save="$IFS"
21372      IFS=:
21373      for p in $PATH; do
21374        if test -f "$p/$path" && test -x "$p/$path"; then
21375          new_path="$p/$path"
21376          break
21377        fi
21378      done
21379      IFS="$IFS_save"
21380    else
21381      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21382$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21383      new_path="$path"
21384    fi
21385
21386    if test "x$new_path" = x; then
21387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21388$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21389        has_space=`$ECHO "$complete" | $GREP " "`
21390        if test "x$has_space" != x; then
21391          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21392$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21393        fi
21394        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21395      fi
21396  fi
21397
21398      # Now join together the path and the arguments once again
21399      if test "x$arguments" != xEOL; then
21400        new_complete="$new_path ${arguments% *}"
21401      else
21402        new_complete="$new_path"
21403      fi
21404
21405  if test "x$complete" != "x$new_complete"; then
21406      OBJC="$new_complete"
21407      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21408$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21409    fi
21410
21411else
21412    OBJC=
21413fi
21414
21415# Restore the flags to the user specified values.
21416# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21417CFLAGS="$ORG_CFLAGS"
21418CXXFLAGS="$ORG_CXXFLAGS"
21419OBJCFLAGS="$ORG_OBJCFLAGS"
21420
21421LD="$CC"
21422LDEXE="$CC"
21423LDCXX="$CXX"
21424LDEXECXX="$CXX"
21425
21426# LDEXE is the linker to use, when creating executables.
21427
21428# Linking C++ libraries.
21429
21430# Linking C++ executables.
21431
21432
21433if test "x$OPENJDK_TARGET_OS" != xwindows; then
21434    if test -n "$ac_tool_prefix"; then
21435  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21436set dummy ${ac_tool_prefix}ar; ac_word=$2
21437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21438$as_echo_n "checking for $ac_word... " >&6; }
21439if ${ac_cv_prog_AR+:} false; then :
21440  $as_echo_n "(cached) " >&6
21441else
21442  if test -n "$AR"; then
21443  ac_cv_prog_AR="$AR" # Let the user override the test.
21444else
21445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21446for as_dir in $PATH
21447do
21448  IFS=$as_save_IFS
21449  test -z "$as_dir" && as_dir=.
21450    for ac_exec_ext in '' $ac_executable_extensions; do
21451  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21452    ac_cv_prog_AR="${ac_tool_prefix}ar"
21453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21454    break 2
21455  fi
21456done
21457  done
21458IFS=$as_save_IFS
21459
21460fi
21461fi
21462AR=$ac_cv_prog_AR
21463if test -n "$AR"; then
21464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21465$as_echo "$AR" >&6; }
21466else
21467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21468$as_echo "no" >&6; }
21469fi
21470
21471
21472fi
21473if test -z "$ac_cv_prog_AR"; then
21474  ac_ct_AR=$AR
21475  # Extract the first word of "ar", so it can be a program name with args.
21476set dummy ar; ac_word=$2
21477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21478$as_echo_n "checking for $ac_word... " >&6; }
21479if ${ac_cv_prog_ac_ct_AR+:} false; then :
21480  $as_echo_n "(cached) " >&6
21481else
21482  if test -n "$ac_ct_AR"; then
21483  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21484else
21485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21486for as_dir in $PATH
21487do
21488  IFS=$as_save_IFS
21489  test -z "$as_dir" && as_dir=.
21490    for ac_exec_ext in '' $ac_executable_extensions; do
21491  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21492    ac_cv_prog_ac_ct_AR="ar"
21493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21494    break 2
21495  fi
21496done
21497  done
21498IFS=$as_save_IFS
21499
21500fi
21501fi
21502ac_ct_AR=$ac_cv_prog_ac_ct_AR
21503if test -n "$ac_ct_AR"; then
21504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21505$as_echo "$ac_ct_AR" >&6; }
21506else
21507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21508$as_echo "no" >&6; }
21509fi
21510
21511  if test "x$ac_ct_AR" = x; then
21512    AR=""
21513  else
21514    case $cross_compiling:$ac_tool_warned in
21515yes:)
21516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21518ac_tool_warned=yes ;;
21519esac
21520    AR=$ac_ct_AR
21521  fi
21522else
21523  AR="$ac_cv_prog_AR"
21524fi
21525
21526
21527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21528
21529  # First separate the path from the arguments. This will split at the first
21530  # space.
21531  complete="$AR"
21532  path="${complete%% *}"
21533  tmp="$complete EOL"
21534  arguments="${tmp#* }"
21535
21536  # Input might be given as Windows format, start by converting to
21537  # unix format.
21538  new_path=`$CYGPATH -u "$path"`
21539
21540  # Now try to locate executable using which
21541  new_path=`$WHICH "$new_path" 2> /dev/null`
21542  # bat and cmd files are not always considered executable in cygwin causing which
21543  # to not find them
21544  if test "x$new_path" = x \
21545           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21546           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21547    new_path=`$CYGPATH -u "$path"`
21548  fi
21549  if test "x$new_path" = x; then
21550    # Oops. Which didn't find the executable.
21551    # The splitting of arguments from the executable at a space might have been incorrect,
21552    # since paths with space are more likely in Windows. Give it another try with the whole
21553    # argument.
21554    path="$complete"
21555    arguments="EOL"
21556    new_path=`$CYGPATH -u "$path"`
21557    new_path=`$WHICH "$new_path" 2> /dev/null`
21558    # bat and cmd files are not always considered executable in cygwin causing which
21559    # to not find them
21560    if test "x$new_path" = x \
21561             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21562             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21563      new_path=`$CYGPATH -u "$path"`
21564    fi
21565    if test "x$new_path" = x; then
21566      # It's still not found. Now this is an unrecoverable error.
21567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21568$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21569      has_space=`$ECHO "$complete" | $GREP " "`
21570      if test "x$has_space" != x; then
21571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21573      fi
21574      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21575    fi
21576  fi
21577
21578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21581  # "foo.exe" is OK but "foo" is an error.
21582  #
21583  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21584  # It is also a way to make sure we got the proper file name for the real test later on.
21585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21586  if test "x$test_shortpath" = x; then
21587    # Short path failed, file does not exist as specified.
21588    # Try adding .exe or .cmd
21589    if test -f "${new_path}.exe"; then
21590       input_to_shortpath="${new_path}.exe"
21591    elif test -f "${new_path}.cmd"; then
21592       input_to_shortpath="${new_path}.cmd"
21593    else
21594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21595$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21598      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21599    fi
21600  else
21601    input_to_shortpath="$new_path"
21602  fi
21603
21604  # Call helper function which possibly converts this using DOS-style short mode.
21605  # If so, the updated path is stored in $new_path.
21606  new_path="$input_to_shortpath"
21607
21608  input_path="$input_to_shortpath"
21609  # Check if we need to convert this using DOS-style short mode. If the path
21610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21611  # take no chances and rewrite it.
21612  # Note: m4 eats our [], so we need to use [ and ] instead.
21613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21614  if test "x$has_forbidden_chars" != x; then
21615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21619      # Going to short mode and back again did indeed matter. Since short mode is
21620      # case insensitive, let's make it lowercase to improve readability.
21621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21622      # Now convert it back to Unix-stile (cygpath)
21623      input_path=`$CYGPATH -u "$shortmode_path"`
21624      new_path="$input_path"
21625    fi
21626  fi
21627
21628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21629  if test "x$test_cygdrive_prefix" = x; then
21630    # As a simple fix, exclude /usr/bin since it's not a real path.
21631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21633      # a path prefixed by /cygdrive for fixpath to work.
21634      new_path="$CYGWIN_ROOT_PATH$input_path"
21635    fi
21636  fi
21637
21638  # remove trailing .exe if any
21639  new_path="${new_path/%.exe/}"
21640
21641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21642
21643  # First separate the path from the arguments. This will split at the first
21644  # space.
21645  complete="$AR"
21646  path="${complete%% *}"
21647  tmp="$complete EOL"
21648  arguments="${tmp#* }"
21649
21650  # Input might be given as Windows format, start by converting to
21651  # unix format.
21652  new_path="$path"
21653
21654  windows_path="$new_path"
21655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21656    unix_path=`$CYGPATH -u "$windows_path"`
21657    new_path="$unix_path"
21658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21660    new_path="$unix_path"
21661  fi
21662
21663
21664  # Now try to locate executable using which
21665  new_path=`$WHICH "$new_path" 2> /dev/null`
21666
21667  if test "x$new_path" = x; then
21668    # Oops. Which didn't find the executable.
21669    # The splitting of arguments from the executable at a space might have been incorrect,
21670    # since paths with space are more likely in Windows. Give it another try with the whole
21671    # argument.
21672    path="$complete"
21673    arguments="EOL"
21674    new_path="$path"
21675
21676  windows_path="$new_path"
21677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21678    unix_path=`$CYGPATH -u "$windows_path"`
21679    new_path="$unix_path"
21680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21682    new_path="$unix_path"
21683  fi
21684
21685
21686    new_path=`$WHICH "$new_path" 2> /dev/null`
21687
21688    if test "x$new_path" = x; then
21689      # It's still not found. Now this is an unrecoverable error.
21690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21691$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21692      has_space=`$ECHO "$complete" | $GREP " "`
21693      if test "x$has_space" != x; then
21694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21696      fi
21697      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21698    fi
21699  fi
21700
21701  # Now new_path has a complete unix path to the binary
21702  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21703    # Keep paths in /bin as-is, but remove trailing .exe if any
21704    new_path="${new_path/%.exe/}"
21705    # Do not save /bin paths to all_fixpath_prefixes!
21706  else
21707    # Not in mixed or Windows style, start by that.
21708    new_path=`cmd //c echo $new_path`
21709
21710  input_path="$new_path"
21711  # Check if we need to convert this using DOS-style short mode. If the path
21712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21713  # take no chances and rewrite it.
21714  # Note: m4 eats our [], so we need to use [ and ] instead.
21715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21716  if test "x$has_forbidden_chars" != x; then
21717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21719  fi
21720
21721    # Output is in $new_path
21722
21723  windows_path="$new_path"
21724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21725    unix_path=`$CYGPATH -u "$windows_path"`
21726    new_path="$unix_path"
21727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21729    new_path="$unix_path"
21730  fi
21731
21732    # remove trailing .exe if any
21733    new_path="${new_path/%.exe/}"
21734
21735    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21736    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21737  fi
21738
21739  else
21740    # We're on a posix platform. Hooray! :)
21741    # First separate the path from the arguments. This will split at the first
21742    # space.
21743    complete="$AR"
21744    path="${complete%% *}"
21745    tmp="$complete EOL"
21746    arguments="${tmp#* }"
21747
21748    # Cannot rely on the command "which" here since it doesn't always work.
21749    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21750    if test -z "$is_absolute_path"; then
21751      # Path to executable is not absolute. Find it.
21752      IFS_save="$IFS"
21753      IFS=:
21754      for p in $PATH; do
21755        if test -f "$p/$path" && test -x "$p/$path"; then
21756          new_path="$p/$path"
21757          break
21758        fi
21759      done
21760      IFS="$IFS_save"
21761    else
21762      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21763$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21764      new_path="$path"
21765    fi
21766
21767    if test "x$new_path" = x; then
21768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21769$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21770        has_space=`$ECHO "$complete" | $GREP " "`
21771        if test "x$has_space" != x; then
21772          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21773$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21774        fi
21775        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21776      fi
21777  fi
21778
21779      # Now join together the path and the arguments once again
21780      if test "x$arguments" != xEOL; then
21781        new_complete="$new_path ${arguments% *}"
21782      else
21783        new_complete="$new_path"
21784      fi
21785
21786  if test "x$complete" != "x$new_complete"; then
21787      AR="$new_complete"
21788      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21789$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21790    fi
21791
21792fi
21793if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21794    ARFLAGS="-r"
21795else
21796    ARFLAGS=""
21797fi
21798
21799
21800# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21801HOTSPOT_CXX="$CXX"
21802HOTSPOT_LD="$LD"
21803
21804
21805
21806COMPILER_NAME=gcc
21807COMPILER_TYPE=CC
21808if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21809
21810    # For now, assume that we are always compiling using cl.exe.
21811    CC_OUT_OPTION=-Fo
21812    EXE_OUT_OPTION=-out:
21813    LD_OUT_OPTION=-out:
21814    AR_OUT_OPTION=-out:
21815    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21816    # program for something completely different.
21817    # Extract the first word of "link", so it can be a program name with args.
21818set dummy link; ac_word=$2
21819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21820$as_echo_n "checking for $ac_word... " >&6; }
21821if ${ac_cv_prog_WINLD+:} false; then :
21822  $as_echo_n "(cached) " >&6
21823else
21824  if test -n "$WINLD"; then
21825  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21826else
21827  ac_prog_rejected=no
21828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21829for as_dir in $PATH
21830do
21831  IFS=$as_save_IFS
21832  test -z "$as_dir" && as_dir=.
21833    for ac_exec_ext in '' $ac_executable_extensions; do
21834  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21835    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21836       ac_prog_rejected=yes
21837       continue
21838     fi
21839    ac_cv_prog_WINLD="link"
21840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21841    break 2
21842  fi
21843done
21844  done
21845IFS=$as_save_IFS
21846
21847if test $ac_prog_rejected = yes; then
21848  # We found a bogon in the path, so make sure we never use it.
21849  set dummy $ac_cv_prog_WINLD
21850  shift
21851  if test $# != 0; then
21852    # We chose a different compiler from the bogus one.
21853    # However, it has the same basename, so the bogon will be chosen
21854    # first if we set WINLD to just the basename; use the full file name.
21855    shift
21856    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21857  fi
21858fi
21859fi
21860fi
21861WINLD=$ac_cv_prog_WINLD
21862if test -n "$WINLD"; then
21863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21864$as_echo "$WINLD" >&6; }
21865else
21866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21867$as_echo "no" >&6; }
21868fi
21869
21870
21871    # Since we must ignore the first found link, WINLD will contain
21872    # the full path to the link.exe program.
21873
21874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21875
21876  # First separate the path from the arguments. This will split at the first
21877  # space.
21878  complete="$WINLD"
21879  path="${complete%% *}"
21880  tmp="$complete EOL"
21881  arguments="${tmp#* }"
21882
21883  # Input might be given as Windows format, start by converting to
21884  # unix format.
21885  new_path=`$CYGPATH -u "$path"`
21886
21887  # Now try to locate executable using which
21888  new_path=`$WHICH "$new_path" 2> /dev/null`
21889  # bat and cmd files are not always considered executable in cygwin causing which
21890  # to not find them
21891  if test "x$new_path" = x \
21892           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21893           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21894    new_path=`$CYGPATH -u "$path"`
21895  fi
21896  if test "x$new_path" = x; then
21897    # Oops. Which didn't find the executable.
21898    # The splitting of arguments from the executable at a space might have been incorrect,
21899    # since paths with space are more likely in Windows. Give it another try with the whole
21900    # argument.
21901    path="$complete"
21902    arguments="EOL"
21903    new_path=`$CYGPATH -u "$path"`
21904    new_path=`$WHICH "$new_path" 2> /dev/null`
21905    # bat and cmd files are not always considered executable in cygwin causing which
21906    # to not find them
21907    if test "x$new_path" = x \
21908             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21909             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21910      new_path=`$CYGPATH -u "$path"`
21911    fi
21912    if test "x$new_path" = x; then
21913      # It's still not found. Now this is an unrecoverable error.
21914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21915$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21916      has_space=`$ECHO "$complete" | $GREP " "`
21917      if test "x$has_space" != x; then
21918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21920      fi
21921      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21922    fi
21923  fi
21924
21925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21928  # "foo.exe" is OK but "foo" is an error.
21929  #
21930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21931  # It is also a way to make sure we got the proper file name for the real test later on.
21932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21933  if test "x$test_shortpath" = x; then
21934    # Short path failed, file does not exist as specified.
21935    # Try adding .exe or .cmd
21936    if test -f "${new_path}.exe"; then
21937       input_to_shortpath="${new_path}.exe"
21938    elif test -f "${new_path}.cmd"; then
21939       input_to_shortpath="${new_path}.cmd"
21940    else
21941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21942$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21943      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21944$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21945      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21946    fi
21947  else
21948    input_to_shortpath="$new_path"
21949  fi
21950
21951  # Call helper function which possibly converts this using DOS-style short mode.
21952  # If so, the updated path is stored in $new_path.
21953  new_path="$input_to_shortpath"
21954
21955  input_path="$input_to_shortpath"
21956  # Check if we need to convert this using DOS-style short mode. If the path
21957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21958  # take no chances and rewrite it.
21959  # Note: m4 eats our [], so we need to use [ and ] instead.
21960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21961  if test "x$has_forbidden_chars" != x; then
21962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21966      # Going to short mode and back again did indeed matter. Since short mode is
21967      # case insensitive, let's make it lowercase to improve readability.
21968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21969      # Now convert it back to Unix-stile (cygpath)
21970      input_path=`$CYGPATH -u "$shortmode_path"`
21971      new_path="$input_path"
21972    fi
21973  fi
21974
21975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21976  if test "x$test_cygdrive_prefix" = x; then
21977    # As a simple fix, exclude /usr/bin since it's not a real path.
21978    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21980      # a path prefixed by /cygdrive for fixpath to work.
21981      new_path="$CYGWIN_ROOT_PATH$input_path"
21982    fi
21983  fi
21984
21985  # remove trailing .exe if any
21986  new_path="${new_path/%.exe/}"
21987
21988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21989
21990  # First separate the path from the arguments. This will split at the first
21991  # space.
21992  complete="$WINLD"
21993  path="${complete%% *}"
21994  tmp="$complete EOL"
21995  arguments="${tmp#* }"
21996
21997  # Input might be given as Windows format, start by converting to
21998  # unix format.
21999  new_path="$path"
22000
22001  windows_path="$new_path"
22002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22003    unix_path=`$CYGPATH -u "$windows_path"`
22004    new_path="$unix_path"
22005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22007    new_path="$unix_path"
22008  fi
22009
22010
22011  # Now try to locate executable using which
22012  new_path=`$WHICH "$new_path" 2> /dev/null`
22013
22014  if test "x$new_path" = x; then
22015    # Oops. Which didn't find the executable.
22016    # The splitting of arguments from the executable at a space might have been incorrect,
22017    # since paths with space are more likely in Windows. Give it another try with the whole
22018    # argument.
22019    path="$complete"
22020    arguments="EOL"
22021    new_path="$path"
22022
22023  windows_path="$new_path"
22024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22025    unix_path=`$CYGPATH -u "$windows_path"`
22026    new_path="$unix_path"
22027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22029    new_path="$unix_path"
22030  fi
22031
22032
22033    new_path=`$WHICH "$new_path" 2> /dev/null`
22034
22035    if test "x$new_path" = x; then
22036      # It's still not found. Now this is an unrecoverable error.
22037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22038$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22039      has_space=`$ECHO "$complete" | $GREP " "`
22040      if test "x$has_space" != x; then
22041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22043      fi
22044      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22045    fi
22046  fi
22047
22048  # Now new_path has a complete unix path to the binary
22049  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22050    # Keep paths in /bin as-is, but remove trailing .exe if any
22051    new_path="${new_path/%.exe/}"
22052    # Do not save /bin paths to all_fixpath_prefixes!
22053  else
22054    # Not in mixed or Windows style, start by that.
22055    new_path=`cmd //c echo $new_path`
22056
22057  input_path="$new_path"
22058  # Check if we need to convert this using DOS-style short mode. If the path
22059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22060  # take no chances and rewrite it.
22061  # Note: m4 eats our [], so we need to use [ and ] instead.
22062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22063  if test "x$has_forbidden_chars" != x; then
22064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22066  fi
22067
22068    # Output is in $new_path
22069
22070  windows_path="$new_path"
22071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22072    unix_path=`$CYGPATH -u "$windows_path"`
22073    new_path="$unix_path"
22074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22076    new_path="$unix_path"
22077  fi
22078
22079    # remove trailing .exe if any
22080    new_path="${new_path/%.exe/}"
22081
22082    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22083    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22084  fi
22085
22086  else
22087    # We're on a posix platform. Hooray! :)
22088    # First separate the path from the arguments. This will split at the first
22089    # space.
22090    complete="$WINLD"
22091    path="${complete%% *}"
22092    tmp="$complete EOL"
22093    arguments="${tmp#* }"
22094
22095    # Cannot rely on the command "which" here since it doesn't always work.
22096    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22097    if test -z "$is_absolute_path"; then
22098      # Path to executable is not absolute. Find it.
22099      IFS_save="$IFS"
22100      IFS=:
22101      for p in $PATH; do
22102        if test -f "$p/$path" && test -x "$p/$path"; then
22103          new_path="$p/$path"
22104          break
22105        fi
22106      done
22107      IFS="$IFS_save"
22108    else
22109      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22110$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22111      new_path="$path"
22112    fi
22113
22114    if test "x$new_path" = x; then
22115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22116$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22117        has_space=`$ECHO "$complete" | $GREP " "`
22118        if test "x$has_space" != x; then
22119          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22120$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22121        fi
22122        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22123      fi
22124  fi
22125
22126      # Now join together the path and the arguments once again
22127      if test "x$arguments" != xEOL; then
22128        new_complete="$new_path ${arguments% *}"
22129      else
22130        new_complete="$new_path"
22131      fi
22132
22133  if test "x$complete" != "x$new_complete"; then
22134      WINLD="$new_complete"
22135      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22136$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22137    fi
22138
22139    printf "Windows linker was found at $WINLD\n"
22140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22141$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22142    "$WINLD" --version > /dev/null
22143    if test $? -eq 0 ; then
22144      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22145$as_echo "no" >&6; }
22146      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22147    else
22148      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22149$as_echo "yes" >&6; }
22150    fi
22151    LD="$WINLD"
22152    LDEXE="$WINLD"
22153    LDCXX="$WINLD"
22154    LDEXECXX="$WINLD"
22155
22156    # Extract the first word of "mt", so it can be a program name with args.
22157set dummy mt; ac_word=$2
22158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22159$as_echo_n "checking for $ac_word... " >&6; }
22160if ${ac_cv_prog_MT+:} false; then :
22161  $as_echo_n "(cached) " >&6
22162else
22163  if test -n "$MT"; then
22164  ac_cv_prog_MT="$MT" # Let the user override the test.
22165else
22166  ac_prog_rejected=no
22167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22168for as_dir in $PATH
22169do
22170  IFS=$as_save_IFS
22171  test -z "$as_dir" && as_dir=.
22172    for ac_exec_ext in '' $ac_executable_extensions; do
22173  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22174    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22175       ac_prog_rejected=yes
22176       continue
22177     fi
22178    ac_cv_prog_MT="mt"
22179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22180    break 2
22181  fi
22182done
22183  done
22184IFS=$as_save_IFS
22185
22186if test $ac_prog_rejected = yes; then
22187  # We found a bogon in the path, so make sure we never use it.
22188  set dummy $ac_cv_prog_MT
22189  shift
22190  if test $# != 0; then
22191    # We chose a different compiler from the bogus one.
22192    # However, it has the same basename, so the bogon will be chosen
22193    # first if we set MT to just the basename; use the full file name.
22194    shift
22195    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22196  fi
22197fi
22198fi
22199fi
22200MT=$ac_cv_prog_MT
22201if test -n "$MT"; then
22202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22203$as_echo "$MT" >&6; }
22204else
22205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22206$as_echo "no" >&6; }
22207fi
22208
22209
22210
22211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22212
22213  # First separate the path from the arguments. This will split at the first
22214  # space.
22215  complete="$MT"
22216  path="${complete%% *}"
22217  tmp="$complete EOL"
22218  arguments="${tmp#* }"
22219
22220  # Input might be given as Windows format, start by converting to
22221  # unix format.
22222  new_path=`$CYGPATH -u "$path"`
22223
22224  # Now try to locate executable using which
22225  new_path=`$WHICH "$new_path" 2> /dev/null`
22226  # bat and cmd files are not always considered executable in cygwin causing which
22227  # to not find them
22228  if test "x$new_path" = x \
22229           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22230           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22231    new_path=`$CYGPATH -u "$path"`
22232  fi
22233  if test "x$new_path" = x; then
22234    # Oops. Which didn't find the executable.
22235    # The splitting of arguments from the executable at a space might have been incorrect,
22236    # since paths with space are more likely in Windows. Give it another try with the whole
22237    # argument.
22238    path="$complete"
22239    arguments="EOL"
22240    new_path=`$CYGPATH -u "$path"`
22241    new_path=`$WHICH "$new_path" 2> /dev/null`
22242    # bat and cmd files are not always considered executable in cygwin causing which
22243    # to not find them
22244    if test "x$new_path" = x \
22245             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22246             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22247      new_path=`$CYGPATH -u "$path"`
22248    fi
22249    if test "x$new_path" = x; then
22250      # It's still not found. Now this is an unrecoverable error.
22251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22252$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22253      has_space=`$ECHO "$complete" | $GREP " "`
22254      if test "x$has_space" != x; then
22255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22257      fi
22258      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22259    fi
22260  fi
22261
22262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22265  # "foo.exe" is OK but "foo" is an error.
22266  #
22267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22268  # It is also a way to make sure we got the proper file name for the real test later on.
22269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22270  if test "x$test_shortpath" = x; then
22271    # Short path failed, file does not exist as specified.
22272    # Try adding .exe or .cmd
22273    if test -f "${new_path}.exe"; then
22274       input_to_shortpath="${new_path}.exe"
22275    elif test -f "${new_path}.cmd"; then
22276       input_to_shortpath="${new_path}.cmd"
22277    else
22278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22279$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22280      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22281$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22282      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22283    fi
22284  else
22285    input_to_shortpath="$new_path"
22286  fi
22287
22288  # Call helper function which possibly converts this using DOS-style short mode.
22289  # If so, the updated path is stored in $new_path.
22290  new_path="$input_to_shortpath"
22291
22292  input_path="$input_to_shortpath"
22293  # Check if we need to convert this using DOS-style short mode. If the path
22294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22295  # take no chances and rewrite it.
22296  # Note: m4 eats our [], so we need to use [ and ] instead.
22297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22298  if test "x$has_forbidden_chars" != x; then
22299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22303      # Going to short mode and back again did indeed matter. Since short mode is
22304      # case insensitive, let's make it lowercase to improve readability.
22305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22306      # Now convert it back to Unix-stile (cygpath)
22307      input_path=`$CYGPATH -u "$shortmode_path"`
22308      new_path="$input_path"
22309    fi
22310  fi
22311
22312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22313  if test "x$test_cygdrive_prefix" = x; then
22314    # As a simple fix, exclude /usr/bin since it's not a real path.
22315    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22317      # a path prefixed by /cygdrive for fixpath to work.
22318      new_path="$CYGWIN_ROOT_PATH$input_path"
22319    fi
22320  fi
22321
22322  # remove trailing .exe if any
22323  new_path="${new_path/%.exe/}"
22324
22325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22326
22327  # First separate the path from the arguments. This will split at the first
22328  # space.
22329  complete="$MT"
22330  path="${complete%% *}"
22331  tmp="$complete EOL"
22332  arguments="${tmp#* }"
22333
22334  # Input might be given as Windows format, start by converting to
22335  # unix format.
22336  new_path="$path"
22337
22338  windows_path="$new_path"
22339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22340    unix_path=`$CYGPATH -u "$windows_path"`
22341    new_path="$unix_path"
22342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22344    new_path="$unix_path"
22345  fi
22346
22347
22348  # Now try to locate executable using which
22349  new_path=`$WHICH "$new_path" 2> /dev/null`
22350
22351  if test "x$new_path" = x; then
22352    # Oops. Which didn't find the executable.
22353    # The splitting of arguments from the executable at a space might have been incorrect,
22354    # since paths with space are more likely in Windows. Give it another try with the whole
22355    # argument.
22356    path="$complete"
22357    arguments="EOL"
22358    new_path="$path"
22359
22360  windows_path="$new_path"
22361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22362    unix_path=`$CYGPATH -u "$windows_path"`
22363    new_path="$unix_path"
22364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22366    new_path="$unix_path"
22367  fi
22368
22369
22370    new_path=`$WHICH "$new_path" 2> /dev/null`
22371
22372    if test "x$new_path" = x; then
22373      # It's still not found. Now this is an unrecoverable error.
22374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22375$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22376      has_space=`$ECHO "$complete" | $GREP " "`
22377      if test "x$has_space" != x; then
22378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22380      fi
22381      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22382    fi
22383  fi
22384
22385  # Now new_path has a complete unix path to the binary
22386  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22387    # Keep paths in /bin as-is, but remove trailing .exe if any
22388    new_path="${new_path/%.exe/}"
22389    # Do not save /bin paths to all_fixpath_prefixes!
22390  else
22391    # Not in mixed or Windows style, start by that.
22392    new_path=`cmd //c echo $new_path`
22393
22394  input_path="$new_path"
22395  # Check if we need to convert this using DOS-style short mode. If the path
22396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22397  # take no chances and rewrite it.
22398  # Note: m4 eats our [], so we need to use [ and ] instead.
22399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22400  if test "x$has_forbidden_chars" != x; then
22401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22403  fi
22404
22405    # Output is in $new_path
22406
22407  windows_path="$new_path"
22408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22409    unix_path=`$CYGPATH -u "$windows_path"`
22410    new_path="$unix_path"
22411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22413    new_path="$unix_path"
22414  fi
22415
22416    # remove trailing .exe if any
22417    new_path="${new_path/%.exe/}"
22418
22419    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22420    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22421  fi
22422
22423  else
22424    # We're on a posix platform. Hooray! :)
22425    # First separate the path from the arguments. This will split at the first
22426    # space.
22427    complete="$MT"
22428    path="${complete%% *}"
22429    tmp="$complete EOL"
22430    arguments="${tmp#* }"
22431
22432    # Cannot rely on the command "which" here since it doesn't always work.
22433    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22434    if test -z "$is_absolute_path"; then
22435      # Path to executable is not absolute. Find it.
22436      IFS_save="$IFS"
22437      IFS=:
22438      for p in $PATH; do
22439        if test -f "$p/$path" && test -x "$p/$path"; then
22440          new_path="$p/$path"
22441          break
22442        fi
22443      done
22444      IFS="$IFS_save"
22445    else
22446      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22447$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22448      new_path="$path"
22449    fi
22450
22451    if test "x$new_path" = x; then
22452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22453$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22454        has_space=`$ECHO "$complete" | $GREP " "`
22455        if test "x$has_space" != x; then
22456          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22458        fi
22459        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22460      fi
22461  fi
22462
22463      # Now join together the path and the arguments once again
22464      if test "x$arguments" != xEOL; then
22465        new_complete="$new_path ${arguments% *}"
22466      else
22467        new_complete="$new_path"
22468      fi
22469
22470  if test "x$complete" != "x$new_complete"; then
22471      MT="$new_complete"
22472      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22473$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22474    fi
22475
22476    # The resource compiler
22477    # Extract the first word of "rc", so it can be a program name with args.
22478set dummy rc; ac_word=$2
22479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22480$as_echo_n "checking for $ac_word... " >&6; }
22481if ${ac_cv_prog_RC+:} false; then :
22482  $as_echo_n "(cached) " >&6
22483else
22484  if test -n "$RC"; then
22485  ac_cv_prog_RC="$RC" # Let the user override the test.
22486else
22487  ac_prog_rejected=no
22488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22489for as_dir in $PATH
22490do
22491  IFS=$as_save_IFS
22492  test -z "$as_dir" && as_dir=.
22493    for ac_exec_ext in '' $ac_executable_extensions; do
22494  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22495    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22496       ac_prog_rejected=yes
22497       continue
22498     fi
22499    ac_cv_prog_RC="rc"
22500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22501    break 2
22502  fi
22503done
22504  done
22505IFS=$as_save_IFS
22506
22507if test $ac_prog_rejected = yes; then
22508  # We found a bogon in the path, so make sure we never use it.
22509  set dummy $ac_cv_prog_RC
22510  shift
22511  if test $# != 0; then
22512    # We chose a different compiler from the bogus one.
22513    # However, it has the same basename, so the bogon will be chosen
22514    # first if we set RC to just the basename; use the full file name.
22515    shift
22516    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22517  fi
22518fi
22519fi
22520fi
22521RC=$ac_cv_prog_RC
22522if test -n "$RC"; then
22523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22524$as_echo "$RC" >&6; }
22525else
22526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22527$as_echo "no" >&6; }
22528fi
22529
22530
22531
22532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22533
22534  # First separate the path from the arguments. This will split at the first
22535  # space.
22536  complete="$RC"
22537  path="${complete%% *}"
22538  tmp="$complete EOL"
22539  arguments="${tmp#* }"
22540
22541  # Input might be given as Windows format, start by converting to
22542  # unix format.
22543  new_path=`$CYGPATH -u "$path"`
22544
22545  # Now try to locate executable using which
22546  new_path=`$WHICH "$new_path" 2> /dev/null`
22547  # bat and cmd files are not always considered executable in cygwin causing which
22548  # to not find them
22549  if test "x$new_path" = x \
22550           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22551           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22552    new_path=`$CYGPATH -u "$path"`
22553  fi
22554  if test "x$new_path" = x; then
22555    # Oops. Which didn't find the executable.
22556    # The splitting of arguments from the executable at a space might have been incorrect,
22557    # since paths with space are more likely in Windows. Give it another try with the whole
22558    # argument.
22559    path="$complete"
22560    arguments="EOL"
22561    new_path=`$CYGPATH -u "$path"`
22562    new_path=`$WHICH "$new_path" 2> /dev/null`
22563    # bat and cmd files are not always considered executable in cygwin causing which
22564    # to not find them
22565    if test "x$new_path" = x \
22566             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22567             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22568      new_path=`$CYGPATH -u "$path"`
22569    fi
22570    if test "x$new_path" = x; then
22571      # It's still not found. Now this is an unrecoverable error.
22572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22573$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22574      has_space=`$ECHO "$complete" | $GREP " "`
22575      if test "x$has_space" != x; then
22576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22578      fi
22579      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22580    fi
22581  fi
22582
22583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22586  # "foo.exe" is OK but "foo" is an error.
22587  #
22588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22589  # It is also a way to make sure we got the proper file name for the real test later on.
22590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22591  if test "x$test_shortpath" = x; then
22592    # Short path failed, file does not exist as specified.
22593    # Try adding .exe or .cmd
22594    if test -f "${new_path}.exe"; then
22595       input_to_shortpath="${new_path}.exe"
22596    elif test -f "${new_path}.cmd"; then
22597       input_to_shortpath="${new_path}.cmd"
22598    else
22599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22600$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22601      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22602$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22603      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22604    fi
22605  else
22606    input_to_shortpath="$new_path"
22607  fi
22608
22609  # Call helper function which possibly converts this using DOS-style short mode.
22610  # If so, the updated path is stored in $new_path.
22611  new_path="$input_to_shortpath"
22612
22613  input_path="$input_to_shortpath"
22614  # Check if we need to convert this using DOS-style short mode. If the path
22615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22616  # take no chances and rewrite it.
22617  # Note: m4 eats our [], so we need to use [ and ] instead.
22618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22619  if test "x$has_forbidden_chars" != x; then
22620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22624      # Going to short mode and back again did indeed matter. Since short mode is
22625      # case insensitive, let's make it lowercase to improve readability.
22626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22627      # Now convert it back to Unix-stile (cygpath)
22628      input_path=`$CYGPATH -u "$shortmode_path"`
22629      new_path="$input_path"
22630    fi
22631  fi
22632
22633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22634  if test "x$test_cygdrive_prefix" = x; then
22635    # As a simple fix, exclude /usr/bin since it's not a real path.
22636    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22638      # a path prefixed by /cygdrive for fixpath to work.
22639      new_path="$CYGWIN_ROOT_PATH$input_path"
22640    fi
22641  fi
22642
22643  # remove trailing .exe if any
22644  new_path="${new_path/%.exe/}"
22645
22646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22647
22648  # First separate the path from the arguments. This will split at the first
22649  # space.
22650  complete="$RC"
22651  path="${complete%% *}"
22652  tmp="$complete EOL"
22653  arguments="${tmp#* }"
22654
22655  # Input might be given as Windows format, start by converting to
22656  # unix format.
22657  new_path="$path"
22658
22659  windows_path="$new_path"
22660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22661    unix_path=`$CYGPATH -u "$windows_path"`
22662    new_path="$unix_path"
22663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22665    new_path="$unix_path"
22666  fi
22667
22668
22669  # Now try to locate executable using which
22670  new_path=`$WHICH "$new_path" 2> /dev/null`
22671
22672  if test "x$new_path" = x; then
22673    # Oops. Which didn't find the executable.
22674    # The splitting of arguments from the executable at a space might have been incorrect,
22675    # since paths with space are more likely in Windows. Give it another try with the whole
22676    # argument.
22677    path="$complete"
22678    arguments="EOL"
22679    new_path="$path"
22680
22681  windows_path="$new_path"
22682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22683    unix_path=`$CYGPATH -u "$windows_path"`
22684    new_path="$unix_path"
22685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22687    new_path="$unix_path"
22688  fi
22689
22690
22691    new_path=`$WHICH "$new_path" 2> /dev/null`
22692
22693    if test "x$new_path" = x; then
22694      # It's still not found. Now this is an unrecoverable error.
22695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22696$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22697      has_space=`$ECHO "$complete" | $GREP " "`
22698      if test "x$has_space" != x; then
22699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22701      fi
22702      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22703    fi
22704  fi
22705
22706  # Now new_path has a complete unix path to the binary
22707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22708    # Keep paths in /bin as-is, but remove trailing .exe if any
22709    new_path="${new_path/%.exe/}"
22710    # Do not save /bin paths to all_fixpath_prefixes!
22711  else
22712    # Not in mixed or Windows style, start by that.
22713    new_path=`cmd //c echo $new_path`
22714
22715  input_path="$new_path"
22716  # Check if we need to convert this using DOS-style short mode. If the path
22717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22718  # take no chances and rewrite it.
22719  # Note: m4 eats our [], so we need to use [ and ] instead.
22720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22721  if test "x$has_forbidden_chars" != x; then
22722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22724  fi
22725
22726    # Output is in $new_path
22727
22728  windows_path="$new_path"
22729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22730    unix_path=`$CYGPATH -u "$windows_path"`
22731    new_path="$unix_path"
22732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22734    new_path="$unix_path"
22735  fi
22736
22737    # remove trailing .exe if any
22738    new_path="${new_path/%.exe/}"
22739
22740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22742  fi
22743
22744  else
22745    # We're on a posix platform. Hooray! :)
22746    # First separate the path from the arguments. This will split at the first
22747    # space.
22748    complete="$RC"
22749    path="${complete%% *}"
22750    tmp="$complete EOL"
22751    arguments="${tmp#* }"
22752
22753    # Cannot rely on the command "which" here since it doesn't always work.
22754    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22755    if test -z "$is_absolute_path"; then
22756      # Path to executable is not absolute. Find it.
22757      IFS_save="$IFS"
22758      IFS=:
22759      for p in $PATH; do
22760        if test -f "$p/$path" && test -x "$p/$path"; then
22761          new_path="$p/$path"
22762          break
22763        fi
22764      done
22765      IFS="$IFS_save"
22766    else
22767      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22768$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22769      new_path="$path"
22770    fi
22771
22772    if test "x$new_path" = x; then
22773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22774$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22775        has_space=`$ECHO "$complete" | $GREP " "`
22776        if test "x$has_space" != x; then
22777          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22778$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22779        fi
22780        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22781      fi
22782  fi
22783
22784      # Now join together the path and the arguments once again
22785      if test "x$arguments" != xEOL; then
22786        new_complete="$new_path ${arguments% *}"
22787      else
22788        new_complete="$new_path"
22789      fi
22790
22791  if test "x$complete" != "x$new_complete"; then
22792      RC="$new_complete"
22793      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22794$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22795    fi
22796
22797
22798    # For hotspot, we need these in Windows mixed path,
22799    # so rewrite them all. Need added .exe suffix.
22800    HOTSPOT_CXX="$CXX.exe"
22801    HOTSPOT_LD="$LD.exe"
22802    HOTSPOT_MT="$MT.exe"
22803    HOTSPOT_RC="$RC.exe"
22804
22805  unix_path="$HOTSPOT_CXX"
22806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22807    windows_path=`$CYGPATH -m "$unix_path"`
22808    HOTSPOT_CXX="$windows_path"
22809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22810    windows_path=`cmd //c echo $unix_path`
22811    HOTSPOT_CXX="$windows_path"
22812  fi
22813
22814
22815  unix_path="$HOTSPOT_LD"
22816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22817    windows_path=`$CYGPATH -m "$unix_path"`
22818    HOTSPOT_LD="$windows_path"
22819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22820    windows_path=`cmd //c echo $unix_path`
22821    HOTSPOT_LD="$windows_path"
22822  fi
22823
22824
22825  unix_path="$HOTSPOT_MT"
22826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22827    windows_path=`$CYGPATH -m "$unix_path"`
22828    HOTSPOT_MT="$windows_path"
22829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22830    windows_path=`cmd //c echo $unix_path`
22831    HOTSPOT_MT="$windows_path"
22832  fi
22833
22834
22835  unix_path="$HOTSPOT_RC"
22836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22837    windows_path=`$CYGPATH -m "$unix_path"`
22838    HOTSPOT_RC="$windows_path"
22839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22840    windows_path=`cmd //c echo $unix_path`
22841    HOTSPOT_RC="$windows_path"
22842  fi
22843
22844
22845
22846
22847    RC_FLAGS="-nologo -l 0x409 -r"
22848    if test "x$VARIANT" = xOPT; then :
22849
22850        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22851
22852fi
22853    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22854    if test "x$JDK_UPDATE_VERSION" = x; then :
22855
22856        JDK_UPDATE_VERSION_NOTNULL=0
22857
22858fi
22859    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22860    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22861    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22862    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22863    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22864    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22865    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22866
22867    # lib.exe is used to create static libraries.
22868    # Extract the first word of "lib", so it can be a program name with args.
22869set dummy lib; ac_word=$2
22870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22871$as_echo_n "checking for $ac_word... " >&6; }
22872if ${ac_cv_prog_WINAR+:} false; then :
22873  $as_echo_n "(cached) " >&6
22874else
22875  if test -n "$WINAR"; then
22876  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22877else
22878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22879for as_dir in $PATH
22880do
22881  IFS=$as_save_IFS
22882  test -z "$as_dir" && as_dir=.
22883    for ac_exec_ext in '' $ac_executable_extensions; do
22884  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22885    ac_cv_prog_WINAR="lib"
22886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22887    break 2
22888  fi
22889done
22890  done
22891IFS=$as_save_IFS
22892
22893fi
22894fi
22895WINAR=$ac_cv_prog_WINAR
22896if test -n "$WINAR"; then
22897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22898$as_echo "$WINAR" >&6; }
22899else
22900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22901$as_echo "no" >&6; }
22902fi
22903
22904
22905
22906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22907
22908  # First separate the path from the arguments. This will split at the first
22909  # space.
22910  complete="$WINAR"
22911  path="${complete%% *}"
22912  tmp="$complete EOL"
22913  arguments="${tmp#* }"
22914
22915  # Input might be given as Windows format, start by converting to
22916  # unix format.
22917  new_path=`$CYGPATH -u "$path"`
22918
22919  # Now try to locate executable using which
22920  new_path=`$WHICH "$new_path" 2> /dev/null`
22921  # bat and cmd files are not always considered executable in cygwin causing which
22922  # to not find them
22923  if test "x$new_path" = x \
22924           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22925           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22926    new_path=`$CYGPATH -u "$path"`
22927  fi
22928  if test "x$new_path" = x; then
22929    # Oops. Which didn't find the executable.
22930    # The splitting of arguments from the executable at a space might have been incorrect,
22931    # since paths with space are more likely in Windows. Give it another try with the whole
22932    # argument.
22933    path="$complete"
22934    arguments="EOL"
22935    new_path=`$CYGPATH -u "$path"`
22936    new_path=`$WHICH "$new_path" 2> /dev/null`
22937    # bat and cmd files are not always considered executable in cygwin causing which
22938    # to not find them
22939    if test "x$new_path" = x \
22940             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22941             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22942      new_path=`$CYGPATH -u "$path"`
22943    fi
22944    if test "x$new_path" = x; then
22945      # It's still not found. Now this is an unrecoverable error.
22946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22947$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22948      has_space=`$ECHO "$complete" | $GREP " "`
22949      if test "x$has_space" != x; then
22950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22952      fi
22953      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22954    fi
22955  fi
22956
22957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22960  # "foo.exe" is OK but "foo" is an error.
22961  #
22962  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22963  # It is also a way to make sure we got the proper file name for the real test later on.
22964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22965  if test "x$test_shortpath" = x; then
22966    # Short path failed, file does not exist as specified.
22967    # Try adding .exe or .cmd
22968    if test -f "${new_path}.exe"; then
22969       input_to_shortpath="${new_path}.exe"
22970    elif test -f "${new_path}.cmd"; then
22971       input_to_shortpath="${new_path}.cmd"
22972    else
22973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22974$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22975      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22976$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22977      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22978    fi
22979  else
22980    input_to_shortpath="$new_path"
22981  fi
22982
22983  # Call helper function which possibly converts this using DOS-style short mode.
22984  # If so, the updated path is stored in $new_path.
22985  new_path="$input_to_shortpath"
22986
22987  input_path="$input_to_shortpath"
22988  # Check if we need to convert this using DOS-style short mode. If the path
22989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22990  # take no chances and rewrite it.
22991  # Note: m4 eats our [], so we need to use [ and ] instead.
22992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22993  if test "x$has_forbidden_chars" != x; then
22994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22998      # Going to short mode and back again did indeed matter. Since short mode is
22999      # case insensitive, let's make it lowercase to improve readability.
23000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23001      # Now convert it back to Unix-stile (cygpath)
23002      input_path=`$CYGPATH -u "$shortmode_path"`
23003      new_path="$input_path"
23004    fi
23005  fi
23006
23007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23008  if test "x$test_cygdrive_prefix" = x; then
23009    # As a simple fix, exclude /usr/bin since it's not a real path.
23010    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23012      # a path prefixed by /cygdrive for fixpath to work.
23013      new_path="$CYGWIN_ROOT_PATH$input_path"
23014    fi
23015  fi
23016
23017  # remove trailing .exe if any
23018  new_path="${new_path/%.exe/}"
23019
23020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23021
23022  # First separate the path from the arguments. This will split at the first
23023  # space.
23024  complete="$WINAR"
23025  path="${complete%% *}"
23026  tmp="$complete EOL"
23027  arguments="${tmp#* }"
23028
23029  # Input might be given as Windows format, start by converting to
23030  # unix format.
23031  new_path="$path"
23032
23033  windows_path="$new_path"
23034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23035    unix_path=`$CYGPATH -u "$windows_path"`
23036    new_path="$unix_path"
23037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23039    new_path="$unix_path"
23040  fi
23041
23042
23043  # Now try to locate executable using which
23044  new_path=`$WHICH "$new_path" 2> /dev/null`
23045
23046  if test "x$new_path" = x; then
23047    # Oops. Which didn't find the executable.
23048    # The splitting of arguments from the executable at a space might have been incorrect,
23049    # since paths with space are more likely in Windows. Give it another try with the whole
23050    # argument.
23051    path="$complete"
23052    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
23066
23067    if test "x$new_path" = x; then
23068      # It's still not found. Now this is an unrecoverable error.
23069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23070$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23071      has_space=`$ECHO "$complete" | $GREP " "`
23072      if test "x$has_space" != x; then
23073        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23074$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23075      fi
23076      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23077    fi
23078  fi
23079
23080  # Now new_path has a complete unix path to the binary
23081  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23082    # Keep paths in /bin as-is, but remove trailing .exe if any
23083    new_path="${new_path/%.exe/}"
23084    # Do not save /bin paths to all_fixpath_prefixes!
23085  else
23086    # Not in mixed or Windows style, start by that.
23087    new_path=`cmd //c echo $new_path`
23088
23089  input_path="$new_path"
23090  # Check if we need to convert this using DOS-style short mode. If the path
23091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23092  # take no chances and rewrite it.
23093  # Note: m4 eats our [], so we need to use [ and ] instead.
23094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23095  if test "x$has_forbidden_chars" != x; then
23096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23098  fi
23099
23100    # Output is in $new_path
23101
23102  windows_path="$new_path"
23103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23104    unix_path=`$CYGPATH -u "$windows_path"`
23105    new_path="$unix_path"
23106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23108    new_path="$unix_path"
23109  fi
23110
23111    # remove trailing .exe if any
23112    new_path="${new_path/%.exe/}"
23113
23114    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23115    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23116  fi
23117
23118  else
23119    # We're on a posix platform. Hooray! :)
23120    # First separate the path from the arguments. This will split at the first
23121    # space.
23122    complete="$WINAR"
23123    path="${complete%% *}"
23124    tmp="$complete EOL"
23125    arguments="${tmp#* }"
23126
23127    # Cannot rely on the command "which" here since it doesn't always work.
23128    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23129    if test -z "$is_absolute_path"; then
23130      # Path to executable is not absolute. Find it.
23131      IFS_save="$IFS"
23132      IFS=:
23133      for p in $PATH; do
23134        if test -f "$p/$path" && test -x "$p/$path"; then
23135          new_path="$p/$path"
23136          break
23137        fi
23138      done
23139      IFS="$IFS_save"
23140    else
23141      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23142$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23143      new_path="$path"
23144    fi
23145
23146    if test "x$new_path" = x; then
23147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23148$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23149        has_space=`$ECHO "$complete" | $GREP " "`
23150        if test "x$has_space" != x; then
23151          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23152$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23153        fi
23154        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23155      fi
23156  fi
23157
23158      # Now join together the path and the arguments once again
23159      if test "x$arguments" != xEOL; then
23160        new_complete="$new_path ${arguments% *}"
23161      else
23162        new_complete="$new_path"
23163      fi
23164
23165  if test "x$complete" != "x$new_complete"; then
23166      WINAR="$new_complete"
23167      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23168$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23169    fi
23170
23171    AR="$WINAR"
23172    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23173
23174    # Extract the first word of "dumpbin", so it can be a program name with args.
23175set dummy dumpbin; ac_word=$2
23176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23177$as_echo_n "checking for $ac_word... " >&6; }
23178if ${ac_cv_prog_DUMPBIN+:} false; then :
23179  $as_echo_n "(cached) " >&6
23180else
23181  if test -n "$DUMPBIN"; then
23182  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23183else
23184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23185for as_dir in $PATH
23186do
23187  IFS=$as_save_IFS
23188  test -z "$as_dir" && as_dir=.
23189    for ac_exec_ext in '' $ac_executable_extensions; do
23190  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23191    ac_cv_prog_DUMPBIN="dumpbin"
23192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23193    break 2
23194  fi
23195done
23196  done
23197IFS=$as_save_IFS
23198
23199fi
23200fi
23201DUMPBIN=$ac_cv_prog_DUMPBIN
23202if test -n "$DUMPBIN"; then
23203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23204$as_echo "$DUMPBIN" >&6; }
23205else
23206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23207$as_echo "no" >&6; }
23208fi
23209
23210
23211
23212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23213
23214  # First separate the path from the arguments. This will split at the first
23215  # space.
23216  complete="$DUMPBIN"
23217  path="${complete%% *}"
23218  tmp="$complete EOL"
23219  arguments="${tmp#* }"
23220
23221  # Input might be given as Windows format, start by converting to
23222  # unix format.
23223  new_path=`$CYGPATH -u "$path"`
23224
23225  # Now try to locate executable using which
23226  new_path=`$WHICH "$new_path" 2> /dev/null`
23227  # bat and cmd files are not always considered executable in cygwin causing which
23228  # to not find them
23229  if test "x$new_path" = x \
23230           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23231           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23232    new_path=`$CYGPATH -u "$path"`
23233  fi
23234  if test "x$new_path" = x; then
23235    # Oops. Which didn't find the executable.
23236    # The splitting of arguments from the executable at a space might have been incorrect,
23237    # since paths with space are more likely in Windows. Give it another try with the whole
23238    # argument.
23239    path="$complete"
23240    arguments="EOL"
23241    new_path=`$CYGPATH -u "$path"`
23242    new_path=`$WHICH "$new_path" 2> /dev/null`
23243    # bat and cmd files are not always considered executable in cygwin causing which
23244    # to not find them
23245    if test "x$new_path" = x \
23246             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23247             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23248      new_path=`$CYGPATH -u "$path"`
23249    fi
23250    if test "x$new_path" = x; then
23251      # It's still not found. Now this is an unrecoverable error.
23252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23253$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23254      has_space=`$ECHO "$complete" | $GREP " "`
23255      if test "x$has_space" != x; then
23256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23258      fi
23259      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23260    fi
23261  fi
23262
23263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23266  # "foo.exe" is OK but "foo" is an error.
23267  #
23268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23269  # It is also a way to make sure we got the proper file name for the real test later on.
23270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23271  if test "x$test_shortpath" = x; then
23272    # Short path failed, file does not exist as specified.
23273    # Try adding .exe or .cmd
23274    if test -f "${new_path}.exe"; then
23275       input_to_shortpath="${new_path}.exe"
23276    elif test -f "${new_path}.cmd"; then
23277       input_to_shortpath="${new_path}.cmd"
23278    else
23279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23280$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23281      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23282$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23283      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23284    fi
23285  else
23286    input_to_shortpath="$new_path"
23287  fi
23288
23289  # Call helper function which possibly converts this using DOS-style short mode.
23290  # If so, the updated path is stored in $new_path.
23291  new_path="$input_to_shortpath"
23292
23293  input_path="$input_to_shortpath"
23294  # Check if we need to convert this using DOS-style short mode. If the path
23295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23296  # take no chances and rewrite it.
23297  # Note: m4 eats our [], so we need to use [ and ] instead.
23298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23299  if test "x$has_forbidden_chars" != x; then
23300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23304      # Going to short mode and back again did indeed matter. Since short mode is
23305      # case insensitive, let's make it lowercase to improve readability.
23306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23307      # Now convert it back to Unix-stile (cygpath)
23308      input_path=`$CYGPATH -u "$shortmode_path"`
23309      new_path="$input_path"
23310    fi
23311  fi
23312
23313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23314  if test "x$test_cygdrive_prefix" = x; then
23315    # As a simple fix, exclude /usr/bin since it's not a real path.
23316    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23318      # a path prefixed by /cygdrive for fixpath to work.
23319      new_path="$CYGWIN_ROOT_PATH$input_path"
23320    fi
23321  fi
23322
23323  # remove trailing .exe if any
23324  new_path="${new_path/%.exe/}"
23325
23326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23327
23328  # First separate the path from the arguments. This will split at the first
23329  # space.
23330  complete="$DUMPBIN"
23331  path="${complete%% *}"
23332  tmp="$complete EOL"
23333  arguments="${tmp#* }"
23334
23335  # Input might be given as Windows format, start by converting to
23336  # unix format.
23337  new_path="$path"
23338
23339  windows_path="$new_path"
23340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23341    unix_path=`$CYGPATH -u "$windows_path"`
23342    new_path="$unix_path"
23343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23345    new_path="$unix_path"
23346  fi
23347
23348
23349  # Now try to locate executable using which
23350  new_path=`$WHICH "$new_path" 2> /dev/null`
23351
23352  if test "x$new_path" = x; then
23353    # Oops. Which didn't find the executable.
23354    # The splitting of arguments from the executable at a space might have been incorrect,
23355    # since paths with space are more likely in Windows. Give it another try with the whole
23356    # argument.
23357    path="$complete"
23358    arguments="EOL"
23359    new_path="$path"
23360
23361  windows_path="$new_path"
23362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23363    unix_path=`$CYGPATH -u "$windows_path"`
23364    new_path="$unix_path"
23365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23367    new_path="$unix_path"
23368  fi
23369
23370
23371    new_path=`$WHICH "$new_path" 2> /dev/null`
23372
23373    if test "x$new_path" = x; then
23374      # It's still not found. Now this is an unrecoverable error.
23375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23376$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23377      has_space=`$ECHO "$complete" | $GREP " "`
23378      if test "x$has_space" != x; then
23379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23381      fi
23382      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23383    fi
23384  fi
23385
23386  # Now new_path has a complete unix path to the binary
23387  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23388    # Keep paths in /bin as-is, but remove trailing .exe if any
23389    new_path="${new_path/%.exe/}"
23390    # Do not save /bin paths to all_fixpath_prefixes!
23391  else
23392    # Not in mixed or Windows style, start by that.
23393    new_path=`cmd //c echo $new_path`
23394
23395  input_path="$new_path"
23396  # Check if we need to convert this using DOS-style short mode. If the path
23397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23398  # take no chances and rewrite it.
23399  # Note: m4 eats our [], so we need to use [ and ] instead.
23400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23401  if test "x$has_forbidden_chars" != x; then
23402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23404  fi
23405
23406    # Output is in $new_path
23407
23408  windows_path="$new_path"
23409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23410    unix_path=`$CYGPATH -u "$windows_path"`
23411    new_path="$unix_path"
23412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23414    new_path="$unix_path"
23415  fi
23416
23417    # remove trailing .exe if any
23418    new_path="${new_path/%.exe/}"
23419
23420    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23421    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23422  fi
23423
23424  else
23425    # We're on a posix platform. Hooray! :)
23426    # First separate the path from the arguments. This will split at the first
23427    # space.
23428    complete="$DUMPBIN"
23429    path="${complete%% *}"
23430    tmp="$complete EOL"
23431    arguments="${tmp#* }"
23432
23433    # Cannot rely on the command "which" here since it doesn't always work.
23434    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23435    if test -z "$is_absolute_path"; then
23436      # Path to executable is not absolute. Find it.
23437      IFS_save="$IFS"
23438      IFS=:
23439      for p in $PATH; do
23440        if test -f "$p/$path" && test -x "$p/$path"; then
23441          new_path="$p/$path"
23442          break
23443        fi
23444      done
23445      IFS="$IFS_save"
23446    else
23447      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23448$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23449      new_path="$path"
23450    fi
23451
23452    if test "x$new_path" = x; then
23453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23454$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23455        has_space=`$ECHO "$complete" | $GREP " "`
23456        if test "x$has_space" != x; then
23457          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23458$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23459        fi
23460        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23461      fi
23462  fi
23463
23464      # Now join together the path and the arguments once again
23465      if test "x$arguments" != xEOL; then
23466        new_complete="$new_path ${arguments% *}"
23467      else
23468        new_complete="$new_path"
23469      fi
23470
23471  if test "x$complete" != "x$new_complete"; then
23472      DUMPBIN="$new_complete"
23473      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23474$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23475    fi
23476
23477
23478    COMPILER_TYPE=CL
23479    CCXXFLAGS="$CCXXFLAGS -nologo"
23480
23481fi
23482
23483
23484
23485ac_ext=c
23486ac_cpp='$CPP $CPPFLAGS'
23487ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23488ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23489ac_compiler_gnu=$ac_cv_c_compiler_gnu
23490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23491$as_echo_n "checking how to run the C preprocessor... " >&6; }
23492# On Suns, sometimes $CPP names a directory.
23493if test -n "$CPP" && test -d "$CPP"; then
23494  CPP=
23495fi
23496if test -z "$CPP"; then
23497  if ${ac_cv_prog_CPP+:} false; then :
23498  $as_echo_n "(cached) " >&6
23499else
23500      # Double quotes because CPP needs to be expanded
23501    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23502    do
23503      ac_preproc_ok=false
23504for ac_c_preproc_warn_flag in '' yes
23505do
23506  # Use a header file that comes with gcc, so configuring glibc
23507  # with a fresh cross-compiler works.
23508  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23509  # <limits.h> exists even on freestanding compilers.
23510  # On the NeXT, cc -E runs the code through the compiler's parser,
23511  # not just through cpp. "Syntax error" is here to catch this case.
23512  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23513/* end confdefs.h.  */
23514#ifdef __STDC__
23515# include <limits.h>
23516#else
23517# include <assert.h>
23518#endif
23519		     Syntax error
23520_ACEOF
23521if ac_fn_c_try_cpp "$LINENO"; then :
23522
23523else
23524  # Broken: fails on valid input.
23525continue
23526fi
23527rm -f conftest.err conftest.i conftest.$ac_ext
23528
23529  # OK, works on sane cases.  Now check whether nonexistent headers
23530  # can be detected and how.
23531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23532/* end confdefs.h.  */
23533#include <ac_nonexistent.h>
23534_ACEOF
23535if ac_fn_c_try_cpp "$LINENO"; then :
23536  # Broken: success on invalid input.
23537continue
23538else
23539  # Passes both tests.
23540ac_preproc_ok=:
23541break
23542fi
23543rm -f conftest.err conftest.i conftest.$ac_ext
23544
23545done
23546# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23547rm -f conftest.i conftest.err conftest.$ac_ext
23548if $ac_preproc_ok; then :
23549  break
23550fi
23551
23552    done
23553    ac_cv_prog_CPP=$CPP
23554
23555fi
23556  CPP=$ac_cv_prog_CPP
23557else
23558  ac_cv_prog_CPP=$CPP
23559fi
23560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23561$as_echo "$CPP" >&6; }
23562ac_preproc_ok=false
23563for ac_c_preproc_warn_flag in '' yes
23564do
23565  # Use a header file that comes with gcc, so configuring glibc
23566  # with a fresh cross-compiler works.
23567  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23568  # <limits.h> exists even on freestanding compilers.
23569  # On the NeXT, cc -E runs the code through the compiler's parser,
23570  # not just through cpp. "Syntax error" is here to catch this case.
23571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23572/* end confdefs.h.  */
23573#ifdef __STDC__
23574# include <limits.h>
23575#else
23576# include <assert.h>
23577#endif
23578		     Syntax error
23579_ACEOF
23580if ac_fn_c_try_cpp "$LINENO"; then :
23581
23582else
23583  # Broken: fails on valid input.
23584continue
23585fi
23586rm -f conftest.err conftest.i conftest.$ac_ext
23587
23588  # OK, works on sane cases.  Now check whether nonexistent headers
23589  # can be detected and how.
23590  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23591/* end confdefs.h.  */
23592#include <ac_nonexistent.h>
23593_ACEOF
23594if ac_fn_c_try_cpp "$LINENO"; then :
23595  # Broken: success on invalid input.
23596continue
23597else
23598  # Passes both tests.
23599ac_preproc_ok=:
23600break
23601fi
23602rm -f conftest.err conftest.i conftest.$ac_ext
23603
23604done
23605# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23606rm -f conftest.i conftest.err conftest.$ac_ext
23607if $ac_preproc_ok; then :
23608
23609else
23610  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23612as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23613See \`config.log' for more details" "$LINENO" 5; }
23614fi
23615
23616ac_ext=cpp
23617ac_cpp='$CXXCPP $CPPFLAGS'
23618ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23619ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23620ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23621
23622
23623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23624
23625  # First separate the path from the arguments. This will split at the first
23626  # space.
23627  complete="$CPP"
23628  path="${complete%% *}"
23629  tmp="$complete EOL"
23630  arguments="${tmp#* }"
23631
23632  # Input might be given as Windows format, start by converting to
23633  # unix format.
23634  new_path=`$CYGPATH -u "$path"`
23635
23636  # Now try to locate executable using which
23637  new_path=`$WHICH "$new_path" 2> /dev/null`
23638  # bat and cmd files are not always considered executable in cygwin causing which
23639  # to not find them
23640  if test "x$new_path" = x \
23641           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23642           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23643    new_path=`$CYGPATH -u "$path"`
23644  fi
23645  if test "x$new_path" = x; then
23646    # Oops. Which didn't find the executable.
23647    # The splitting of arguments from the executable at a space might have been incorrect,
23648    # since paths with space are more likely in Windows. Give it another try with the whole
23649    # argument.
23650    path="$complete"
23651    arguments="EOL"
23652    new_path=`$CYGPATH -u "$path"`
23653    new_path=`$WHICH "$new_path" 2> /dev/null`
23654    # bat and cmd files are not always considered executable in cygwin causing which
23655    # to not find them
23656    if test "x$new_path" = x \
23657             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23658             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23659      new_path=`$CYGPATH -u "$path"`
23660    fi
23661    if test "x$new_path" = x; then
23662      # It's still not found. Now this is an unrecoverable error.
23663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23664$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23665      has_space=`$ECHO "$complete" | $GREP " "`
23666      if test "x$has_space" != x; then
23667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23669      fi
23670      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23671    fi
23672  fi
23673
23674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23677  # "foo.exe" is OK but "foo" is an error.
23678  #
23679  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23680  # It is also a way to make sure we got the proper file name for the real test later on.
23681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23682  if test "x$test_shortpath" = x; then
23683    # Short path failed, file does not exist as specified.
23684    # Try adding .exe or .cmd
23685    if test -f "${new_path}.exe"; then
23686       input_to_shortpath="${new_path}.exe"
23687    elif test -f "${new_path}.cmd"; then
23688       input_to_shortpath="${new_path}.cmd"
23689    else
23690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23691$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23692      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23693$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23694      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23695    fi
23696  else
23697    input_to_shortpath="$new_path"
23698  fi
23699
23700  # Call helper function which possibly converts this using DOS-style short mode.
23701  # If so, the updated path is stored in $new_path.
23702  new_path="$input_to_shortpath"
23703
23704  input_path="$input_to_shortpath"
23705  # Check if we need to convert this using DOS-style short mode. If the path
23706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23707  # take no chances and rewrite it.
23708  # Note: m4 eats our [], so we need to use [ and ] instead.
23709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23710  if test "x$has_forbidden_chars" != x; then
23711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23715      # Going to short mode and back again did indeed matter. Since short mode is
23716      # case insensitive, let's make it lowercase to improve readability.
23717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23718      # Now convert it back to Unix-stile (cygpath)
23719      input_path=`$CYGPATH -u "$shortmode_path"`
23720      new_path="$input_path"
23721    fi
23722  fi
23723
23724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23725  if test "x$test_cygdrive_prefix" = x; then
23726    # As a simple fix, exclude /usr/bin since it's not a real path.
23727    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23729      # a path prefixed by /cygdrive for fixpath to work.
23730      new_path="$CYGWIN_ROOT_PATH$input_path"
23731    fi
23732  fi
23733
23734  # remove trailing .exe if any
23735  new_path="${new_path/%.exe/}"
23736
23737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23738
23739  # First separate the path from the arguments. This will split at the first
23740  # space.
23741  complete="$CPP"
23742  path="${complete%% *}"
23743  tmp="$complete EOL"
23744  arguments="${tmp#* }"
23745
23746  # Input might be given as Windows format, start by converting to
23747  # unix format.
23748  new_path="$path"
23749
23750  windows_path="$new_path"
23751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23752    unix_path=`$CYGPATH -u "$windows_path"`
23753    new_path="$unix_path"
23754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23756    new_path="$unix_path"
23757  fi
23758
23759
23760  # Now try to locate executable using which
23761  new_path=`$WHICH "$new_path" 2> /dev/null`
23762
23763  if test "x$new_path" = x; then
23764    # Oops. Which didn't find the executable.
23765    # The splitting of arguments from the executable at a space might have been incorrect,
23766    # since paths with space are more likely in Windows. Give it another try with the whole
23767    # argument.
23768    path="$complete"
23769    arguments="EOL"
23770    new_path="$path"
23771
23772  windows_path="$new_path"
23773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23774    unix_path=`$CYGPATH -u "$windows_path"`
23775    new_path="$unix_path"
23776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23778    new_path="$unix_path"
23779  fi
23780
23781
23782    new_path=`$WHICH "$new_path" 2> /dev/null`
23783
23784    if test "x$new_path" = x; then
23785      # It's still not found. Now this is an unrecoverable error.
23786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23787$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23788      has_space=`$ECHO "$complete" | $GREP " "`
23789      if test "x$has_space" != x; then
23790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23792      fi
23793      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23794    fi
23795  fi
23796
23797  # Now new_path has a complete unix path to the binary
23798  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23799    # Keep paths in /bin as-is, but remove trailing .exe if any
23800    new_path="${new_path/%.exe/}"
23801    # Do not save /bin paths to all_fixpath_prefixes!
23802  else
23803    # Not in mixed or Windows style, start by that.
23804    new_path=`cmd //c echo $new_path`
23805
23806  input_path="$new_path"
23807  # Check if we need to convert this using DOS-style short mode. If the path
23808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23809  # take no chances and rewrite it.
23810  # Note: m4 eats our [], so we need to use [ and ] instead.
23811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23812  if test "x$has_forbidden_chars" != x; then
23813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23815  fi
23816
23817    # Output is in $new_path
23818
23819  windows_path="$new_path"
23820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23821    unix_path=`$CYGPATH -u "$windows_path"`
23822    new_path="$unix_path"
23823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23825    new_path="$unix_path"
23826  fi
23827
23828    # remove trailing .exe if any
23829    new_path="${new_path/%.exe/}"
23830
23831    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23832    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23833  fi
23834
23835  else
23836    # We're on a posix platform. Hooray! :)
23837    # First separate the path from the arguments. This will split at the first
23838    # space.
23839    complete="$CPP"
23840    path="${complete%% *}"
23841    tmp="$complete EOL"
23842    arguments="${tmp#* }"
23843
23844    # Cannot rely on the command "which" here since it doesn't always work.
23845    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23846    if test -z "$is_absolute_path"; then
23847      # Path to executable is not absolute. Find it.
23848      IFS_save="$IFS"
23849      IFS=:
23850      for p in $PATH; do
23851        if test -f "$p/$path" && test -x "$p/$path"; then
23852          new_path="$p/$path"
23853          break
23854        fi
23855      done
23856      IFS="$IFS_save"
23857    else
23858      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23859$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23860      new_path="$path"
23861    fi
23862
23863    if test "x$new_path" = x; then
23864        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23865$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23866        has_space=`$ECHO "$complete" | $GREP " "`
23867        if test "x$has_space" != x; then
23868          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23869$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23870        fi
23871        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23872      fi
23873  fi
23874
23875      # Now join together the path and the arguments once again
23876      if test "x$arguments" != xEOL; then
23877        new_complete="$new_path ${arguments% *}"
23878      else
23879        new_complete="$new_path"
23880      fi
23881
23882  if test "x$complete" != "x$new_complete"; then
23883      CPP="$new_complete"
23884      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23885$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23886    fi
23887
23888
23889ac_ext=cpp
23890ac_cpp='$CXXCPP $CPPFLAGS'
23891ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23892ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23893ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23895$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23896if test -z "$CXXCPP"; then
23897  if ${ac_cv_prog_CXXCPP+:} false; then :
23898  $as_echo_n "(cached) " >&6
23899else
23900      # Double quotes because CXXCPP needs to be expanded
23901    for CXXCPP in "$CXX -E" "/lib/cpp"
23902    do
23903      ac_preproc_ok=false
23904for ac_cxx_preproc_warn_flag in '' yes
23905do
23906  # Use a header file that comes with gcc, so configuring glibc
23907  # with a fresh cross-compiler works.
23908  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23909  # <limits.h> exists even on freestanding compilers.
23910  # On the NeXT, cc -E runs the code through the compiler's parser,
23911  # not just through cpp. "Syntax error" is here to catch this case.
23912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23913/* end confdefs.h.  */
23914#ifdef __STDC__
23915# include <limits.h>
23916#else
23917# include <assert.h>
23918#endif
23919		     Syntax error
23920_ACEOF
23921if ac_fn_cxx_try_cpp "$LINENO"; then :
23922
23923else
23924  # Broken: fails on valid input.
23925continue
23926fi
23927rm -f conftest.err conftest.i conftest.$ac_ext
23928
23929  # OK, works on sane cases.  Now check whether nonexistent headers
23930  # can be detected and how.
23931  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23932/* end confdefs.h.  */
23933#include <ac_nonexistent.h>
23934_ACEOF
23935if ac_fn_cxx_try_cpp "$LINENO"; then :
23936  # Broken: success on invalid input.
23937continue
23938else
23939  # Passes both tests.
23940ac_preproc_ok=:
23941break
23942fi
23943rm -f conftest.err conftest.i conftest.$ac_ext
23944
23945done
23946# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23947rm -f conftest.i conftest.err conftest.$ac_ext
23948if $ac_preproc_ok; then :
23949  break
23950fi
23951
23952    done
23953    ac_cv_prog_CXXCPP=$CXXCPP
23954
23955fi
23956  CXXCPP=$ac_cv_prog_CXXCPP
23957else
23958  ac_cv_prog_CXXCPP=$CXXCPP
23959fi
23960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23961$as_echo "$CXXCPP" >&6; }
23962ac_preproc_ok=false
23963for ac_cxx_preproc_warn_flag in '' yes
23964do
23965  # Use a header file that comes with gcc, so configuring glibc
23966  # with a fresh cross-compiler works.
23967  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23968  # <limits.h> exists even on freestanding compilers.
23969  # On the NeXT, cc -E runs the code through the compiler's parser,
23970  # not just through cpp. "Syntax error" is here to catch this case.
23971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23972/* end confdefs.h.  */
23973#ifdef __STDC__
23974# include <limits.h>
23975#else
23976# include <assert.h>
23977#endif
23978		     Syntax error
23979_ACEOF
23980if ac_fn_cxx_try_cpp "$LINENO"; then :
23981
23982else
23983  # Broken: fails on valid input.
23984continue
23985fi
23986rm -f conftest.err conftest.i conftest.$ac_ext
23987
23988  # OK, works on sane cases.  Now check whether nonexistent headers
23989  # can be detected and how.
23990  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23991/* end confdefs.h.  */
23992#include <ac_nonexistent.h>
23993_ACEOF
23994if ac_fn_cxx_try_cpp "$LINENO"; then :
23995  # Broken: success on invalid input.
23996continue
23997else
23998  # Passes both tests.
23999ac_preproc_ok=:
24000break
24001fi
24002rm -f conftest.err conftest.i conftest.$ac_ext
24003
24004done
24005# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24006rm -f conftest.i conftest.err conftest.$ac_ext
24007if $ac_preproc_ok; then :
24008
24009else
24010  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24012as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24013See \`config.log' for more details" "$LINENO" 5; }
24014fi
24015
24016ac_ext=cpp
24017ac_cpp='$CXXCPP $CPPFLAGS'
24018ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24019ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24020ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24021
24022
24023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24024
24025  # First separate the path from the arguments. This will split at the first
24026  # space.
24027  complete="$CXXCPP"
24028  path="${complete%% *}"
24029  tmp="$complete EOL"
24030  arguments="${tmp#* }"
24031
24032  # Input might be given as Windows format, start by converting to
24033  # unix format.
24034  new_path=`$CYGPATH -u "$path"`
24035
24036  # Now try to locate executable using which
24037  new_path=`$WHICH "$new_path" 2> /dev/null`
24038  # bat and cmd files are not always considered executable in cygwin causing which
24039  # to not find them
24040  if test "x$new_path" = x \
24041           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24042           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24043    new_path=`$CYGPATH -u "$path"`
24044  fi
24045  if test "x$new_path" = x; then
24046    # Oops. Which didn't find the executable.
24047    # The splitting of arguments from the executable at a space might have been incorrect,
24048    # since paths with space are more likely in Windows. Give it another try with the whole
24049    # argument.
24050    path="$complete"
24051    arguments="EOL"
24052    new_path=`$CYGPATH -u "$path"`
24053    new_path=`$WHICH "$new_path" 2> /dev/null`
24054    # bat and cmd files are not always considered executable in cygwin causing which
24055    # to not find them
24056    if test "x$new_path" = x \
24057             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24058             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24059      new_path=`$CYGPATH -u "$path"`
24060    fi
24061    if test "x$new_path" = x; then
24062      # It's still not found. Now this is an unrecoverable error.
24063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24064$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24065      has_space=`$ECHO "$complete" | $GREP " "`
24066      if test "x$has_space" != x; then
24067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24069      fi
24070      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24071    fi
24072  fi
24073
24074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24077  # "foo.exe" is OK but "foo" is an error.
24078  #
24079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24080  # It is also a way to make sure we got the proper file name for the real test later on.
24081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24082  if test "x$test_shortpath" = x; then
24083    # Short path failed, file does not exist as specified.
24084    # Try adding .exe or .cmd
24085    if test -f "${new_path}.exe"; then
24086       input_to_shortpath="${new_path}.exe"
24087    elif test -f "${new_path}.cmd"; then
24088       input_to_shortpath="${new_path}.cmd"
24089    else
24090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24091$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24094      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24095    fi
24096  else
24097    input_to_shortpath="$new_path"
24098  fi
24099
24100  # Call helper function which possibly converts this using DOS-style short mode.
24101  # If so, the updated path is stored in $new_path.
24102  new_path="$input_to_shortpath"
24103
24104  input_path="$input_to_shortpath"
24105  # Check if we need to convert this using DOS-style short mode. If the path
24106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24107  # take no chances and rewrite it.
24108  # Note: m4 eats our [], so we need to use [ and ] instead.
24109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24110  if test "x$has_forbidden_chars" != x; then
24111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24115      # Going to short mode and back again did indeed matter. Since short mode is
24116      # case insensitive, let's make it lowercase to improve readability.
24117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24118      # Now convert it back to Unix-stile (cygpath)
24119      input_path=`$CYGPATH -u "$shortmode_path"`
24120      new_path="$input_path"
24121    fi
24122  fi
24123
24124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24125  if test "x$test_cygdrive_prefix" = x; then
24126    # As a simple fix, exclude /usr/bin since it's not a real path.
24127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24129      # a path prefixed by /cygdrive for fixpath to work.
24130      new_path="$CYGWIN_ROOT_PATH$input_path"
24131    fi
24132  fi
24133
24134  # remove trailing .exe if any
24135  new_path="${new_path/%.exe/}"
24136
24137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24138
24139  # First separate the path from the arguments. This will split at the first
24140  # space.
24141  complete="$CXXCPP"
24142  path="${complete%% *}"
24143  tmp="$complete EOL"
24144  arguments="${tmp#* }"
24145
24146  # Input might be given as Windows format, start by converting to
24147  # unix format.
24148  new_path="$path"
24149
24150  windows_path="$new_path"
24151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24152    unix_path=`$CYGPATH -u "$windows_path"`
24153    new_path="$unix_path"
24154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24156    new_path="$unix_path"
24157  fi
24158
24159
24160  # Now try to locate executable using which
24161  new_path=`$WHICH "$new_path" 2> /dev/null`
24162
24163  if test "x$new_path" = x; then
24164    # Oops. Which didn't find the executable.
24165    # The splitting of arguments from the executable at a space might have been incorrect,
24166    # since paths with space are more likely in Windows. Give it another try with the whole
24167    # argument.
24168    path="$complete"
24169    arguments="EOL"
24170    new_path="$path"
24171
24172  windows_path="$new_path"
24173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24174    unix_path=`$CYGPATH -u "$windows_path"`
24175    new_path="$unix_path"
24176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24178    new_path="$unix_path"
24179  fi
24180
24181
24182    new_path=`$WHICH "$new_path" 2> /dev/null`
24183
24184    if test "x$new_path" = x; then
24185      # It's still not found. Now this is an unrecoverable error.
24186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24187$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24188      has_space=`$ECHO "$complete" | $GREP " "`
24189      if test "x$has_space" != x; then
24190        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24191$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24192      fi
24193      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24194    fi
24195  fi
24196
24197  # Now new_path has a complete unix path to the binary
24198  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24199    # Keep paths in /bin as-is, but remove trailing .exe if any
24200    new_path="${new_path/%.exe/}"
24201    # Do not save /bin paths to all_fixpath_prefixes!
24202  else
24203    # Not in mixed or Windows style, start by that.
24204    new_path=`cmd //c echo $new_path`
24205
24206  input_path="$new_path"
24207  # Check if we need to convert this using DOS-style short mode. If the path
24208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24209  # take no chances and rewrite it.
24210  # Note: m4 eats our [], so we need to use [ and ] instead.
24211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24212  if test "x$has_forbidden_chars" != x; then
24213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24215  fi
24216
24217    # Output is in $new_path
24218
24219  windows_path="$new_path"
24220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24221    unix_path=`$CYGPATH -u "$windows_path"`
24222    new_path="$unix_path"
24223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24225    new_path="$unix_path"
24226  fi
24227
24228    # remove trailing .exe if any
24229    new_path="${new_path/%.exe/}"
24230
24231    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24232    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24233  fi
24234
24235  else
24236    # We're on a posix platform. Hooray! :)
24237    # First separate the path from the arguments. This will split at the first
24238    # space.
24239    complete="$CXXCPP"
24240    path="${complete%% *}"
24241    tmp="$complete EOL"
24242    arguments="${tmp#* }"
24243
24244    # Cannot rely on the command "which" here since it doesn't always work.
24245    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24246    if test -z "$is_absolute_path"; then
24247      # Path to executable is not absolute. Find it.
24248      IFS_save="$IFS"
24249      IFS=:
24250      for p in $PATH; do
24251        if test -f "$p/$path" && test -x "$p/$path"; then
24252          new_path="$p/$path"
24253          break
24254        fi
24255      done
24256      IFS="$IFS_save"
24257    else
24258      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24259$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24260      new_path="$path"
24261    fi
24262
24263    if test "x$new_path" = x; then
24264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24265$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24266        has_space=`$ECHO "$complete" | $GREP " "`
24267        if test "x$has_space" != x; then
24268          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24269$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24270        fi
24271        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24272      fi
24273  fi
24274
24275      # Now join together the path and the arguments once again
24276      if test "x$arguments" != xEOL; then
24277        new_complete="$new_path ${arguments% *}"
24278      else
24279        new_complete="$new_path"
24280      fi
24281
24282  if test "x$complete" != "x$new_complete"; then
24283      CXXCPP="$new_complete"
24284      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24285$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24286    fi
24287
24288
24289if test "x$COMPILE_TYPE" != "xcross"; then
24290    # If we are not cross compiling, use the same compilers for
24291    # building the build platform executables. The cross-compilation
24292    # case needed to be done earlier, but this can only be done after
24293    # the native tools have been localized.
24294    BUILD_CC="$CC"
24295    BUILD_CXX="$CXX"
24296    BUILD_LD="$LD"
24297fi
24298
24299# for solaris we really need solaris tools, and not gnu equivalent
24300#   these seems to normally reside in /usr/ccs/bin so add that to path before
24301#   starting to probe
24302#
24303#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24304#         so that it can be overriden --with-tools-dir
24305if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24306    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24307fi
24308
24309# Find the right assembler.
24310if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24311    # Extract the first word of "as", so it can be a program name with args.
24312set dummy as; ac_word=$2
24313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24314$as_echo_n "checking for $ac_word... " >&6; }
24315if ${ac_cv_path_AS+:} false; then :
24316  $as_echo_n "(cached) " >&6
24317else
24318  case $AS in
24319  [\\/]* | ?:[\\/]*)
24320  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24321  ;;
24322  *)
24323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24324for as_dir in $PATH
24325do
24326  IFS=$as_save_IFS
24327  test -z "$as_dir" && as_dir=.
24328    for ac_exec_ext in '' $ac_executable_extensions; do
24329  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24330    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24332    break 2
24333  fi
24334done
24335  done
24336IFS=$as_save_IFS
24337
24338  ;;
24339esac
24340fi
24341AS=$ac_cv_path_AS
24342if test -n "$AS"; then
24343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24344$as_echo "$AS" >&6; }
24345else
24346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24347$as_echo "no" >&6; }
24348fi
24349
24350
24351
24352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24353
24354  # First separate the path from the arguments. This will split at the first
24355  # space.
24356  complete="$AS"
24357  path="${complete%% *}"
24358  tmp="$complete EOL"
24359  arguments="${tmp#* }"
24360
24361  # Input might be given as Windows format, start by converting to
24362  # unix format.
24363  new_path=`$CYGPATH -u "$path"`
24364
24365  # Now try to locate executable using which
24366  new_path=`$WHICH "$new_path" 2> /dev/null`
24367  # bat and cmd files are not always considered executable in cygwin causing which
24368  # to not find them
24369  if test "x$new_path" = x \
24370           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24371           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24372    new_path=`$CYGPATH -u "$path"`
24373  fi
24374  if test "x$new_path" = x; then
24375    # Oops. Which didn't find the executable.
24376    # The splitting of arguments from the executable at a space might have been incorrect,
24377    # since paths with space are more likely in Windows. Give it another try with the whole
24378    # argument.
24379    path="$complete"
24380    arguments="EOL"
24381    new_path=`$CYGPATH -u "$path"`
24382    new_path=`$WHICH "$new_path" 2> /dev/null`
24383    # bat and cmd files are not always considered executable in cygwin causing which
24384    # to not find them
24385    if test "x$new_path" = x \
24386             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24387             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24388      new_path=`$CYGPATH -u "$path"`
24389    fi
24390    if test "x$new_path" = x; then
24391      # It's still not found. Now this is an unrecoverable error.
24392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24393$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24394      has_space=`$ECHO "$complete" | $GREP " "`
24395      if test "x$has_space" != x; then
24396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24398      fi
24399      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24400    fi
24401  fi
24402
24403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24406  # "foo.exe" is OK but "foo" is an error.
24407  #
24408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24409  # It is also a way to make sure we got the proper file name for the real test later on.
24410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24411  if test "x$test_shortpath" = x; then
24412    # Short path failed, file does not exist as specified.
24413    # Try adding .exe or .cmd
24414    if test -f "${new_path}.exe"; then
24415       input_to_shortpath="${new_path}.exe"
24416    elif test -f "${new_path}.cmd"; then
24417       input_to_shortpath="${new_path}.cmd"
24418    else
24419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24420$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24421      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24422$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24423      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24424    fi
24425  else
24426    input_to_shortpath="$new_path"
24427  fi
24428
24429  # Call helper function which possibly converts this using DOS-style short mode.
24430  # If so, the updated path is stored in $new_path.
24431  new_path="$input_to_shortpath"
24432
24433  input_path="$input_to_shortpath"
24434  # Check if we need to convert this using DOS-style short mode. If the path
24435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24436  # take no chances and rewrite it.
24437  # Note: m4 eats our [], so we need to use [ and ] instead.
24438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24439  if test "x$has_forbidden_chars" != x; then
24440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24444      # Going to short mode and back again did indeed matter. Since short mode is
24445      # case insensitive, let's make it lowercase to improve readability.
24446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24447      # Now convert it back to Unix-stile (cygpath)
24448      input_path=`$CYGPATH -u "$shortmode_path"`
24449      new_path="$input_path"
24450    fi
24451  fi
24452
24453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24454  if test "x$test_cygdrive_prefix" = x; then
24455    # As a simple fix, exclude /usr/bin since it's not a real path.
24456    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24458      # a path prefixed by /cygdrive for fixpath to work.
24459      new_path="$CYGWIN_ROOT_PATH$input_path"
24460    fi
24461  fi
24462
24463  # remove trailing .exe if any
24464  new_path="${new_path/%.exe/}"
24465
24466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24467
24468  # First separate the path from the arguments. This will split at the first
24469  # space.
24470  complete="$AS"
24471  path="${complete%% *}"
24472  tmp="$complete EOL"
24473  arguments="${tmp#* }"
24474
24475  # Input might be given as Windows format, start by converting to
24476  # unix format.
24477  new_path="$path"
24478
24479  windows_path="$new_path"
24480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24481    unix_path=`$CYGPATH -u "$windows_path"`
24482    new_path="$unix_path"
24483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24485    new_path="$unix_path"
24486  fi
24487
24488
24489  # Now try to locate executable using which
24490  new_path=`$WHICH "$new_path" 2> /dev/null`
24491
24492  if test "x$new_path" = x; then
24493    # Oops. Which didn't find the executable.
24494    # The splitting of arguments from the executable at a space might have been incorrect,
24495    # since paths with space are more likely in Windows. Give it another try with the whole
24496    # argument.
24497    path="$complete"
24498    arguments="EOL"
24499    new_path="$path"
24500
24501  windows_path="$new_path"
24502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24503    unix_path=`$CYGPATH -u "$windows_path"`
24504    new_path="$unix_path"
24505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24507    new_path="$unix_path"
24508  fi
24509
24510
24511    new_path=`$WHICH "$new_path" 2> /dev/null`
24512
24513    if test "x$new_path" = x; then
24514      # It's still not found. Now this is an unrecoverable error.
24515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24516$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24517      has_space=`$ECHO "$complete" | $GREP " "`
24518      if test "x$has_space" != x; then
24519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24521      fi
24522      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24523    fi
24524  fi
24525
24526  # Now new_path has a complete unix path to the binary
24527  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24528    # Keep paths in /bin as-is, but remove trailing .exe if any
24529    new_path="${new_path/%.exe/}"
24530    # Do not save /bin paths to all_fixpath_prefixes!
24531  else
24532    # Not in mixed or Windows style, start by that.
24533    new_path=`cmd //c echo $new_path`
24534
24535  input_path="$new_path"
24536  # Check if we need to convert this using DOS-style short mode. If the path
24537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24538  # take no chances and rewrite it.
24539  # Note: m4 eats our [], so we need to use [ and ] instead.
24540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24541  if test "x$has_forbidden_chars" != x; then
24542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24544  fi
24545
24546    # Output is in $new_path
24547
24548  windows_path="$new_path"
24549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24550    unix_path=`$CYGPATH -u "$windows_path"`
24551    new_path="$unix_path"
24552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24554    new_path="$unix_path"
24555  fi
24556
24557    # remove trailing .exe if any
24558    new_path="${new_path/%.exe/}"
24559
24560    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24561    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24562  fi
24563
24564  else
24565    # We're on a posix platform. Hooray! :)
24566    # First separate the path from the arguments. This will split at the first
24567    # space.
24568    complete="$AS"
24569    path="${complete%% *}"
24570    tmp="$complete EOL"
24571    arguments="${tmp#* }"
24572
24573    # Cannot rely on the command "which" here since it doesn't always work.
24574    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24575    if test -z "$is_absolute_path"; then
24576      # Path to executable is not absolute. Find it.
24577      IFS_save="$IFS"
24578      IFS=:
24579      for p in $PATH; do
24580        if test -f "$p/$path" && test -x "$p/$path"; then
24581          new_path="$p/$path"
24582          break
24583        fi
24584      done
24585      IFS="$IFS_save"
24586    else
24587      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24588$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24589      new_path="$path"
24590    fi
24591
24592    if test "x$new_path" = x; then
24593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24594$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24595        has_space=`$ECHO "$complete" | $GREP " "`
24596        if test "x$has_space" != x; then
24597          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24598$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24599        fi
24600        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24601      fi
24602  fi
24603
24604      # Now join together the path and the arguments once again
24605      if test "x$arguments" != xEOL; then
24606        new_complete="$new_path ${arguments% *}"
24607      else
24608        new_complete="$new_path"
24609      fi
24610
24611  if test "x$complete" != "x$new_complete"; then
24612      AS="$new_complete"
24613      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24614$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24615    fi
24616
24617else
24618    AS="$CC -c"
24619fi
24620
24621
24622if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24623    for ac_prog in gnm nm
24624do
24625  # Extract the first word of "$ac_prog", so it can be a program name with args.
24626set dummy $ac_prog; ac_word=$2
24627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24628$as_echo_n "checking for $ac_word... " >&6; }
24629if ${ac_cv_path_NM+:} false; then :
24630  $as_echo_n "(cached) " >&6
24631else
24632  case $NM in
24633  [\\/]* | ?:[\\/]*)
24634  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24635  ;;
24636  *)
24637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24638for as_dir in $PATH
24639do
24640  IFS=$as_save_IFS
24641  test -z "$as_dir" && as_dir=.
24642    for ac_exec_ext in '' $ac_executable_extensions; do
24643  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24644    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24646    break 2
24647  fi
24648done
24649  done
24650IFS=$as_save_IFS
24651
24652  ;;
24653esac
24654fi
24655NM=$ac_cv_path_NM
24656if test -n "$NM"; then
24657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24658$as_echo "$NM" >&6; }
24659else
24660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24661$as_echo "no" >&6; }
24662fi
24663
24664
24665  test -n "$NM" && break
24666done
24667
24668
24669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24670
24671  # First separate the path from the arguments. This will split at the first
24672  # space.
24673  complete="$NM"
24674  path="${complete%% *}"
24675  tmp="$complete EOL"
24676  arguments="${tmp#* }"
24677
24678  # Input might be given as Windows format, start by converting to
24679  # unix format.
24680  new_path=`$CYGPATH -u "$path"`
24681
24682  # Now try to locate executable using which
24683  new_path=`$WHICH "$new_path" 2> /dev/null`
24684  # bat and cmd files are not always considered executable in cygwin causing which
24685  # to not find them
24686  if test "x$new_path" = x \
24687           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24688           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24689    new_path=`$CYGPATH -u "$path"`
24690  fi
24691  if test "x$new_path" = x; then
24692    # Oops. Which didn't find the executable.
24693    # The splitting of arguments from the executable at a space might have been incorrect,
24694    # since paths with space are more likely in Windows. Give it another try with the whole
24695    # argument.
24696    path="$complete"
24697    arguments="EOL"
24698    new_path=`$CYGPATH -u "$path"`
24699    new_path=`$WHICH "$new_path" 2> /dev/null`
24700    # bat and cmd files are not always considered executable in cygwin causing which
24701    # to not find them
24702    if test "x$new_path" = x \
24703             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24704             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24705      new_path=`$CYGPATH -u "$path"`
24706    fi
24707    if test "x$new_path" = x; then
24708      # It's still not found. Now this is an unrecoverable error.
24709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24710$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24711      has_space=`$ECHO "$complete" | $GREP " "`
24712      if test "x$has_space" != x; then
24713        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24714$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24715      fi
24716      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24717    fi
24718  fi
24719
24720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24723  # "foo.exe" is OK but "foo" is an error.
24724  #
24725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24726  # It is also a way to make sure we got the proper file name for the real test later on.
24727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24728  if test "x$test_shortpath" = x; then
24729    # Short path failed, file does not exist as specified.
24730    # Try adding .exe or .cmd
24731    if test -f "${new_path}.exe"; then
24732       input_to_shortpath="${new_path}.exe"
24733    elif test -f "${new_path}.cmd"; then
24734       input_to_shortpath="${new_path}.cmd"
24735    else
24736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24737$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24738      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24739$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24740      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24741    fi
24742  else
24743    input_to_shortpath="$new_path"
24744  fi
24745
24746  # Call helper function which possibly converts this using DOS-style short mode.
24747  # If so, the updated path is stored in $new_path.
24748  new_path="$input_to_shortpath"
24749
24750  input_path="$input_to_shortpath"
24751  # Check if we need to convert this using DOS-style short mode. If the path
24752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24753  # take no chances and rewrite it.
24754  # Note: m4 eats our [], so we need to use [ and ] instead.
24755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24756  if test "x$has_forbidden_chars" != x; then
24757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24761      # Going to short mode and back again did indeed matter. Since short mode is
24762      # case insensitive, let's make it lowercase to improve readability.
24763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24764      # Now convert it back to Unix-stile (cygpath)
24765      input_path=`$CYGPATH -u "$shortmode_path"`
24766      new_path="$input_path"
24767    fi
24768  fi
24769
24770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24771  if test "x$test_cygdrive_prefix" = x; then
24772    # As a simple fix, exclude /usr/bin since it's not a real path.
24773    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24775      # a path prefixed by /cygdrive for fixpath to work.
24776      new_path="$CYGWIN_ROOT_PATH$input_path"
24777    fi
24778  fi
24779
24780  # remove trailing .exe if any
24781  new_path="${new_path/%.exe/}"
24782
24783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24784
24785  # First separate the path from the arguments. This will split at the first
24786  # space.
24787  complete="$NM"
24788  path="${complete%% *}"
24789  tmp="$complete EOL"
24790  arguments="${tmp#* }"
24791
24792  # Input might be given as Windows format, start by converting to
24793  # unix format.
24794  new_path="$path"
24795
24796  windows_path="$new_path"
24797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24798    unix_path=`$CYGPATH -u "$windows_path"`
24799    new_path="$unix_path"
24800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24802    new_path="$unix_path"
24803  fi
24804
24805
24806  # Now try to locate executable using which
24807  new_path=`$WHICH "$new_path" 2> /dev/null`
24808
24809  if test "x$new_path" = x; then
24810    # Oops. Which didn't find the executable.
24811    # The splitting of arguments from the executable at a space might have been incorrect,
24812    # since paths with space are more likely in Windows. Give it another try with the whole
24813    # argument.
24814    path="$complete"
24815    arguments="EOL"
24816    new_path="$path"
24817
24818  windows_path="$new_path"
24819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24820    unix_path=`$CYGPATH -u "$windows_path"`
24821    new_path="$unix_path"
24822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24824    new_path="$unix_path"
24825  fi
24826
24827
24828    new_path=`$WHICH "$new_path" 2> /dev/null`
24829
24830    if test "x$new_path" = x; then
24831      # It's still not found. Now this is an unrecoverable error.
24832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24833$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24834      has_space=`$ECHO "$complete" | $GREP " "`
24835      if test "x$has_space" != x; then
24836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24838      fi
24839      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24840    fi
24841  fi
24842
24843  # Now new_path has a complete unix path to the binary
24844  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24845    # Keep paths in /bin as-is, but remove trailing .exe if any
24846    new_path="${new_path/%.exe/}"
24847    # Do not save /bin paths to all_fixpath_prefixes!
24848  else
24849    # Not in mixed or Windows style, start by that.
24850    new_path=`cmd //c echo $new_path`
24851
24852  input_path="$new_path"
24853  # Check if we need to convert this using DOS-style short mode. If the path
24854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24855  # take no chances and rewrite it.
24856  # Note: m4 eats our [], so we need to use [ and ] instead.
24857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24858  if test "x$has_forbidden_chars" != x; then
24859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24861  fi
24862
24863    # Output is in $new_path
24864
24865  windows_path="$new_path"
24866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24867    unix_path=`$CYGPATH -u "$windows_path"`
24868    new_path="$unix_path"
24869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24871    new_path="$unix_path"
24872  fi
24873
24874    # remove trailing .exe if any
24875    new_path="${new_path/%.exe/}"
24876
24877    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24878    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24879  fi
24880
24881  else
24882    # We're on a posix platform. Hooray! :)
24883    # First separate the path from the arguments. This will split at the first
24884    # space.
24885    complete="$NM"
24886    path="${complete%% *}"
24887    tmp="$complete EOL"
24888    arguments="${tmp#* }"
24889
24890    # Cannot rely on the command "which" here since it doesn't always work.
24891    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24892    if test -z "$is_absolute_path"; then
24893      # Path to executable is not absolute. Find it.
24894      IFS_save="$IFS"
24895      IFS=:
24896      for p in $PATH; do
24897        if test -f "$p/$path" && test -x "$p/$path"; then
24898          new_path="$p/$path"
24899          break
24900        fi
24901      done
24902      IFS="$IFS_save"
24903    else
24904      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24905$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24906      new_path="$path"
24907    fi
24908
24909    if test "x$new_path" = x; then
24910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24911$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24912        has_space=`$ECHO "$complete" | $GREP " "`
24913        if test "x$has_space" != x; then
24914          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24915$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24916        fi
24917        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24918      fi
24919  fi
24920
24921      # Now join together the path and the arguments once again
24922      if test "x$arguments" != xEOL; then
24923        new_complete="$new_path ${arguments% *}"
24924      else
24925        new_complete="$new_path"
24926      fi
24927
24928  if test "x$complete" != "x$new_complete"; then
24929      NM="$new_complete"
24930      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24931$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24932    fi
24933
24934    # Extract the first word of "strip", so it can be a program name with args.
24935set dummy strip; ac_word=$2
24936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24937$as_echo_n "checking for $ac_word... " >&6; }
24938if ${ac_cv_path_STRIP+:} false; then :
24939  $as_echo_n "(cached) " >&6
24940else
24941  case $STRIP in
24942  [\\/]* | ?:[\\/]*)
24943  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24944  ;;
24945  *)
24946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24947for as_dir in $PATH
24948do
24949  IFS=$as_save_IFS
24950  test -z "$as_dir" && as_dir=.
24951    for ac_exec_ext in '' $ac_executable_extensions; do
24952  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24953    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24955    break 2
24956  fi
24957done
24958  done
24959IFS=$as_save_IFS
24960
24961  ;;
24962esac
24963fi
24964STRIP=$ac_cv_path_STRIP
24965if test -n "$STRIP"; then
24966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24967$as_echo "$STRIP" >&6; }
24968else
24969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24970$as_echo "no" >&6; }
24971fi
24972
24973
24974
24975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24976
24977  # First separate the path from the arguments. This will split at the first
24978  # space.
24979  complete="$STRIP"
24980  path="${complete%% *}"
24981  tmp="$complete EOL"
24982  arguments="${tmp#* }"
24983
24984  # Input might be given as Windows format, start by converting to
24985  # unix format.
24986  new_path=`$CYGPATH -u "$path"`
24987
24988  # Now try to locate executable using which
24989  new_path=`$WHICH "$new_path" 2> /dev/null`
24990  # bat and cmd files are not always considered executable in cygwin causing which
24991  # to not find them
24992  if test "x$new_path" = x \
24993           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24994           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24995    new_path=`$CYGPATH -u "$path"`
24996  fi
24997  if test "x$new_path" = x; then
24998    # Oops. Which didn't find the executable.
24999    # The splitting of arguments from the executable at a space might have been incorrect,
25000    # since paths with space are more likely in Windows. Give it another try with the whole
25001    # argument.
25002    path="$complete"
25003    arguments="EOL"
25004    new_path=`$CYGPATH -u "$path"`
25005    new_path=`$WHICH "$new_path" 2> /dev/null`
25006    # bat and cmd files are not always considered executable in cygwin causing which
25007    # to not find them
25008    if test "x$new_path" = x \
25009             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25010             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25011      new_path=`$CYGPATH -u "$path"`
25012    fi
25013    if test "x$new_path" = x; then
25014      # It's still not found. Now this is an unrecoverable error.
25015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25016$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25017      has_space=`$ECHO "$complete" | $GREP " "`
25018      if test "x$has_space" != x; then
25019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25021      fi
25022      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25023    fi
25024  fi
25025
25026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25029  # "foo.exe" is OK but "foo" is an error.
25030  #
25031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25032  # It is also a way to make sure we got the proper file name for the real test later on.
25033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25034  if test "x$test_shortpath" = x; then
25035    # Short path failed, file does not exist as specified.
25036    # Try adding .exe or .cmd
25037    if test -f "${new_path}.exe"; then
25038       input_to_shortpath="${new_path}.exe"
25039    elif test -f "${new_path}.cmd"; then
25040       input_to_shortpath="${new_path}.cmd"
25041    else
25042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25043$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25044      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25045$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25046      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25047    fi
25048  else
25049    input_to_shortpath="$new_path"
25050  fi
25051
25052  # Call helper function which possibly converts this using DOS-style short mode.
25053  # If so, the updated path is stored in $new_path.
25054  new_path="$input_to_shortpath"
25055
25056  input_path="$input_to_shortpath"
25057  # Check if we need to convert this using DOS-style short mode. If the path
25058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25059  # take no chances and rewrite it.
25060  # Note: m4 eats our [], so we need to use [ and ] instead.
25061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25062  if test "x$has_forbidden_chars" != x; then
25063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25067      # Going to short mode and back again did indeed matter. Since short mode is
25068      # case insensitive, let's make it lowercase to improve readability.
25069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25070      # Now convert it back to Unix-stile (cygpath)
25071      input_path=`$CYGPATH -u "$shortmode_path"`
25072      new_path="$input_path"
25073    fi
25074  fi
25075
25076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25077  if test "x$test_cygdrive_prefix" = x; then
25078    # As a simple fix, exclude /usr/bin since it's not a real path.
25079    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25081      # a path prefixed by /cygdrive for fixpath to work.
25082      new_path="$CYGWIN_ROOT_PATH$input_path"
25083    fi
25084  fi
25085
25086  # remove trailing .exe if any
25087  new_path="${new_path/%.exe/}"
25088
25089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25090
25091  # First separate the path from the arguments. This will split at the first
25092  # space.
25093  complete="$STRIP"
25094  path="${complete%% *}"
25095  tmp="$complete EOL"
25096  arguments="${tmp#* }"
25097
25098  # Input might be given as Windows format, start by converting to
25099  # unix format.
25100  new_path="$path"
25101
25102  windows_path="$new_path"
25103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25104    unix_path=`$CYGPATH -u "$windows_path"`
25105    new_path="$unix_path"
25106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25108    new_path="$unix_path"
25109  fi
25110
25111
25112  # Now try to locate executable using which
25113  new_path=`$WHICH "$new_path" 2> /dev/null`
25114
25115  if test "x$new_path" = x; then
25116    # Oops. Which didn't find the executable.
25117    # The splitting of arguments from the executable at a space might have been incorrect,
25118    # since paths with space are more likely in Windows. Give it another try with the whole
25119    # argument.
25120    path="$complete"
25121    arguments="EOL"
25122    new_path="$path"
25123
25124  windows_path="$new_path"
25125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25126    unix_path=`$CYGPATH -u "$windows_path"`
25127    new_path="$unix_path"
25128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25130    new_path="$unix_path"
25131  fi
25132
25133
25134    new_path=`$WHICH "$new_path" 2> /dev/null`
25135
25136    if test "x$new_path" = x; then
25137      # It's still not found. Now this is an unrecoverable error.
25138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25139$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25140      has_space=`$ECHO "$complete" | $GREP " "`
25141      if test "x$has_space" != x; then
25142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25144      fi
25145      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25146    fi
25147  fi
25148
25149  # Now new_path has a complete unix path to the binary
25150  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25151    # Keep paths in /bin as-is, but remove trailing .exe if any
25152    new_path="${new_path/%.exe/}"
25153    # Do not save /bin paths to all_fixpath_prefixes!
25154  else
25155    # Not in mixed or Windows style, start by that.
25156    new_path=`cmd //c echo $new_path`
25157
25158  input_path="$new_path"
25159  # Check if we need to convert this using DOS-style short mode. If the path
25160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25161  # take no chances and rewrite it.
25162  # Note: m4 eats our [], so we need to use [ and ] instead.
25163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25164  if test "x$has_forbidden_chars" != x; then
25165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25167  fi
25168
25169    # Output is in $new_path
25170
25171  windows_path="$new_path"
25172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25173    unix_path=`$CYGPATH -u "$windows_path"`
25174    new_path="$unix_path"
25175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25177    new_path="$unix_path"
25178  fi
25179
25180    # remove trailing .exe if any
25181    new_path="${new_path/%.exe/}"
25182
25183    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25184    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25185  fi
25186
25187  else
25188    # We're on a posix platform. Hooray! :)
25189    # First separate the path from the arguments. This will split at the first
25190    # space.
25191    complete="$STRIP"
25192    path="${complete%% *}"
25193    tmp="$complete EOL"
25194    arguments="${tmp#* }"
25195
25196    # Cannot rely on the command "which" here since it doesn't always work.
25197    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25198    if test -z "$is_absolute_path"; then
25199      # Path to executable is not absolute. Find it.
25200      IFS_save="$IFS"
25201      IFS=:
25202      for p in $PATH; do
25203        if test -f "$p/$path" && test -x "$p/$path"; then
25204          new_path="$p/$path"
25205          break
25206        fi
25207      done
25208      IFS="$IFS_save"
25209    else
25210      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25211$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25212      new_path="$path"
25213    fi
25214
25215    if test "x$new_path" = x; then
25216        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25217$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25218        has_space=`$ECHO "$complete" | $GREP " "`
25219        if test "x$has_space" != x; then
25220          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25221$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25222        fi
25223        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25224      fi
25225  fi
25226
25227      # Now join together the path and the arguments once again
25228      if test "x$arguments" != xEOL; then
25229        new_complete="$new_path ${arguments% *}"
25230      else
25231        new_complete="$new_path"
25232      fi
25233
25234  if test "x$complete" != "x$new_complete"; then
25235      STRIP="$new_complete"
25236      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25237$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25238    fi
25239
25240    # Extract the first word of "mcs", so it can be a program name with args.
25241set dummy mcs; ac_word=$2
25242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25243$as_echo_n "checking for $ac_word... " >&6; }
25244if ${ac_cv_path_MCS+:} false; then :
25245  $as_echo_n "(cached) " >&6
25246else
25247  case $MCS in
25248  [\\/]* | ?:[\\/]*)
25249  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25250  ;;
25251  *)
25252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25253for as_dir in $PATH
25254do
25255  IFS=$as_save_IFS
25256  test -z "$as_dir" && as_dir=.
25257    for ac_exec_ext in '' $ac_executable_extensions; do
25258  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25259    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25261    break 2
25262  fi
25263done
25264  done
25265IFS=$as_save_IFS
25266
25267  ;;
25268esac
25269fi
25270MCS=$ac_cv_path_MCS
25271if test -n "$MCS"; then
25272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25273$as_echo "$MCS" >&6; }
25274else
25275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25276$as_echo "no" >&6; }
25277fi
25278
25279
25280
25281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25282
25283  # First separate the path from the arguments. This will split at the first
25284  # space.
25285  complete="$MCS"
25286  path="${complete%% *}"
25287  tmp="$complete EOL"
25288  arguments="${tmp#* }"
25289
25290  # Input might be given as Windows format, start by converting to
25291  # unix format.
25292  new_path=`$CYGPATH -u "$path"`
25293
25294  # Now try to locate executable using which
25295  new_path=`$WHICH "$new_path" 2> /dev/null`
25296  # bat and cmd files are not always considered executable in cygwin causing which
25297  # to not find them
25298  if test "x$new_path" = x \
25299           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25300           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25301    new_path=`$CYGPATH -u "$path"`
25302  fi
25303  if test "x$new_path" = x; then
25304    # Oops. Which didn't find the executable.
25305    # The splitting of arguments from the executable at a space might have been incorrect,
25306    # since paths with space are more likely in Windows. Give it another try with the whole
25307    # argument.
25308    path="$complete"
25309    arguments="EOL"
25310    new_path=`$CYGPATH -u "$path"`
25311    new_path=`$WHICH "$new_path" 2> /dev/null`
25312    # bat and cmd files are not always considered executable in cygwin causing which
25313    # to not find them
25314    if test "x$new_path" = x \
25315             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25316             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25317      new_path=`$CYGPATH -u "$path"`
25318    fi
25319    if test "x$new_path" = x; then
25320      # It's still not found. Now this is an unrecoverable error.
25321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25322$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25323      has_space=`$ECHO "$complete" | $GREP " "`
25324      if test "x$has_space" != x; then
25325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25327      fi
25328      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25329    fi
25330  fi
25331
25332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25335  # "foo.exe" is OK but "foo" is an error.
25336  #
25337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25338  # It is also a way to make sure we got the proper file name for the real test later on.
25339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25340  if test "x$test_shortpath" = x; then
25341    # Short path failed, file does not exist as specified.
25342    # Try adding .exe or .cmd
25343    if test -f "${new_path}.exe"; then
25344       input_to_shortpath="${new_path}.exe"
25345    elif test -f "${new_path}.cmd"; then
25346       input_to_shortpath="${new_path}.cmd"
25347    else
25348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25349$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25350      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25351$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25352      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25353    fi
25354  else
25355    input_to_shortpath="$new_path"
25356  fi
25357
25358  # Call helper function which possibly converts this using DOS-style short mode.
25359  # If so, the updated path is stored in $new_path.
25360  new_path="$input_to_shortpath"
25361
25362  input_path="$input_to_shortpath"
25363  # Check if we need to convert this using DOS-style short mode. If the path
25364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25365  # take no chances and rewrite it.
25366  # Note: m4 eats our [], so we need to use [ and ] instead.
25367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25368  if test "x$has_forbidden_chars" != x; then
25369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25373      # Going to short mode and back again did indeed matter. Since short mode is
25374      # case insensitive, let's make it lowercase to improve readability.
25375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25376      # Now convert it back to Unix-stile (cygpath)
25377      input_path=`$CYGPATH -u "$shortmode_path"`
25378      new_path="$input_path"
25379    fi
25380  fi
25381
25382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25383  if test "x$test_cygdrive_prefix" = x; then
25384    # As a simple fix, exclude /usr/bin since it's not a real path.
25385    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25387      # a path prefixed by /cygdrive for fixpath to work.
25388      new_path="$CYGWIN_ROOT_PATH$input_path"
25389    fi
25390  fi
25391
25392  # remove trailing .exe if any
25393  new_path="${new_path/%.exe/}"
25394
25395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25396
25397  # First separate the path from the arguments. This will split at the first
25398  # space.
25399  complete="$MCS"
25400  path="${complete%% *}"
25401  tmp="$complete EOL"
25402  arguments="${tmp#* }"
25403
25404  # Input might be given as Windows format, start by converting to
25405  # unix format.
25406  new_path="$path"
25407
25408  windows_path="$new_path"
25409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25410    unix_path=`$CYGPATH -u "$windows_path"`
25411    new_path="$unix_path"
25412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25414    new_path="$unix_path"
25415  fi
25416
25417
25418  # Now try to locate executable using which
25419  new_path=`$WHICH "$new_path" 2> /dev/null`
25420
25421  if test "x$new_path" = x; then
25422    # Oops. Which didn't find the executable.
25423    # The splitting of arguments from the executable at a space might have been incorrect,
25424    # since paths with space are more likely in Windows. Give it another try with the whole
25425    # argument.
25426    path="$complete"
25427    arguments="EOL"
25428    new_path="$path"
25429
25430  windows_path="$new_path"
25431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25432    unix_path=`$CYGPATH -u "$windows_path"`
25433    new_path="$unix_path"
25434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25436    new_path="$unix_path"
25437  fi
25438
25439
25440    new_path=`$WHICH "$new_path" 2> /dev/null`
25441
25442    if test "x$new_path" = x; then
25443      # It's still not found. Now this is an unrecoverable error.
25444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25445$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25446      has_space=`$ECHO "$complete" | $GREP " "`
25447      if test "x$has_space" != x; then
25448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25450      fi
25451      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25452    fi
25453  fi
25454
25455  # Now new_path has a complete unix path to the binary
25456  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25457    # Keep paths in /bin as-is, but remove trailing .exe if any
25458    new_path="${new_path/%.exe/}"
25459    # Do not save /bin paths to all_fixpath_prefixes!
25460  else
25461    # Not in mixed or Windows style, start by that.
25462    new_path=`cmd //c echo $new_path`
25463
25464  input_path="$new_path"
25465  # Check if we need to convert this using DOS-style short mode. If the path
25466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25467  # take no chances and rewrite it.
25468  # Note: m4 eats our [], so we need to use [ and ] instead.
25469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25470  if test "x$has_forbidden_chars" != x; then
25471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25473  fi
25474
25475    # Output is in $new_path
25476
25477  windows_path="$new_path"
25478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25479    unix_path=`$CYGPATH -u "$windows_path"`
25480    new_path="$unix_path"
25481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25483    new_path="$unix_path"
25484  fi
25485
25486    # remove trailing .exe if any
25487    new_path="${new_path/%.exe/}"
25488
25489    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25490    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25491  fi
25492
25493  else
25494    # We're on a posix platform. Hooray! :)
25495    # First separate the path from the arguments. This will split at the first
25496    # space.
25497    complete="$MCS"
25498    path="${complete%% *}"
25499    tmp="$complete EOL"
25500    arguments="${tmp#* }"
25501
25502    # Cannot rely on the command "which" here since it doesn't always work.
25503    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25504    if test -z "$is_absolute_path"; then
25505      # Path to executable is not absolute. Find it.
25506      IFS_save="$IFS"
25507      IFS=:
25508      for p in $PATH; do
25509        if test -f "$p/$path" && test -x "$p/$path"; then
25510          new_path="$p/$path"
25511          break
25512        fi
25513      done
25514      IFS="$IFS_save"
25515    else
25516      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25517$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25518      new_path="$path"
25519    fi
25520
25521    if test "x$new_path" = x; then
25522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25523$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25524        has_space=`$ECHO "$complete" | $GREP " "`
25525        if test "x$has_space" != x; then
25526          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25527$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25528        fi
25529        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25530      fi
25531  fi
25532
25533      # Now join together the path and the arguments once again
25534      if test "x$arguments" != xEOL; then
25535        new_complete="$new_path ${arguments% *}"
25536      else
25537        new_complete="$new_path"
25538      fi
25539
25540  if test "x$complete" != "x$new_complete"; then
25541      MCS="$new_complete"
25542      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25543$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25544    fi
25545
25546elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25547    if test -n "$ac_tool_prefix"; then
25548  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25549set dummy ${ac_tool_prefix}nm; ac_word=$2
25550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25551$as_echo_n "checking for $ac_word... " >&6; }
25552if ${ac_cv_prog_NM+:} false; then :
25553  $as_echo_n "(cached) " >&6
25554else
25555  if test -n "$NM"; then
25556  ac_cv_prog_NM="$NM" # Let the user override the test.
25557else
25558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25559for as_dir in $PATH
25560do
25561  IFS=$as_save_IFS
25562  test -z "$as_dir" && as_dir=.
25563    for ac_exec_ext in '' $ac_executable_extensions; do
25564  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25565    ac_cv_prog_NM="${ac_tool_prefix}nm"
25566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25567    break 2
25568  fi
25569done
25570  done
25571IFS=$as_save_IFS
25572
25573fi
25574fi
25575NM=$ac_cv_prog_NM
25576if test -n "$NM"; then
25577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25578$as_echo "$NM" >&6; }
25579else
25580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25581$as_echo "no" >&6; }
25582fi
25583
25584
25585fi
25586if test -z "$ac_cv_prog_NM"; then
25587  ac_ct_NM=$NM
25588  # Extract the first word of "nm", so it can be a program name with args.
25589set dummy nm; ac_word=$2
25590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25591$as_echo_n "checking for $ac_word... " >&6; }
25592if ${ac_cv_prog_ac_ct_NM+:} false; then :
25593  $as_echo_n "(cached) " >&6
25594else
25595  if test -n "$ac_ct_NM"; then
25596  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25597else
25598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25599for as_dir in $PATH
25600do
25601  IFS=$as_save_IFS
25602  test -z "$as_dir" && as_dir=.
25603    for ac_exec_ext in '' $ac_executable_extensions; do
25604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25605    ac_cv_prog_ac_ct_NM="nm"
25606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25607    break 2
25608  fi
25609done
25610  done
25611IFS=$as_save_IFS
25612
25613fi
25614fi
25615ac_ct_NM=$ac_cv_prog_ac_ct_NM
25616if test -n "$ac_ct_NM"; then
25617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25618$as_echo "$ac_ct_NM" >&6; }
25619else
25620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25621$as_echo "no" >&6; }
25622fi
25623
25624  if test "x$ac_ct_NM" = x; then
25625    NM=""
25626  else
25627    case $cross_compiling:$ac_tool_warned in
25628yes:)
25629{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25630$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25631ac_tool_warned=yes ;;
25632esac
25633    NM=$ac_ct_NM
25634  fi
25635else
25636  NM="$ac_cv_prog_NM"
25637fi
25638
25639
25640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25641
25642  # First separate the path from the arguments. This will split at the first
25643  # space.
25644  complete="$NM"
25645  path="${complete%% *}"
25646  tmp="$complete EOL"
25647  arguments="${tmp#* }"
25648
25649  # Input might be given as Windows format, start by converting to
25650  # unix format.
25651  new_path=`$CYGPATH -u "$path"`
25652
25653  # Now try to locate executable using which
25654  new_path=`$WHICH "$new_path" 2> /dev/null`
25655  # bat and cmd files are not always considered executable in cygwin causing which
25656  # to not find them
25657  if test "x$new_path" = x \
25658           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25659           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25660    new_path=`$CYGPATH -u "$path"`
25661  fi
25662  if test "x$new_path" = x; then
25663    # Oops. Which didn't find the executable.
25664    # The splitting of arguments from the executable at a space might have been incorrect,
25665    # since paths with space are more likely in Windows. Give it another try with the whole
25666    # argument.
25667    path="$complete"
25668    arguments="EOL"
25669    new_path=`$CYGPATH -u "$path"`
25670    new_path=`$WHICH "$new_path" 2> /dev/null`
25671    # bat and cmd files are not always considered executable in cygwin causing which
25672    # to not find them
25673    if test "x$new_path" = x \
25674             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25675             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25676      new_path=`$CYGPATH -u "$path"`
25677    fi
25678    if test "x$new_path" = x; then
25679      # It's still not found. Now this is an unrecoverable error.
25680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25681$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25682      has_space=`$ECHO "$complete" | $GREP " "`
25683      if test "x$has_space" != x; then
25684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25686      fi
25687      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25688    fi
25689  fi
25690
25691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25694  # "foo.exe" is OK but "foo" is an error.
25695  #
25696  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25697  # It is also a way to make sure we got the proper file name for the real test later on.
25698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25699  if test "x$test_shortpath" = x; then
25700    # Short path failed, file does not exist as specified.
25701    # Try adding .exe or .cmd
25702    if test -f "${new_path}.exe"; then
25703       input_to_shortpath="${new_path}.exe"
25704    elif test -f "${new_path}.cmd"; then
25705       input_to_shortpath="${new_path}.cmd"
25706    else
25707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25708$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25711      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25712    fi
25713  else
25714    input_to_shortpath="$new_path"
25715  fi
25716
25717  # Call helper function which possibly converts this using DOS-style short mode.
25718  # If so, the updated path is stored in $new_path.
25719  new_path="$input_to_shortpath"
25720
25721  input_path="$input_to_shortpath"
25722  # Check if we need to convert this using DOS-style short mode. If the path
25723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25724  # take no chances and rewrite it.
25725  # Note: m4 eats our [], so we need to use [ and ] instead.
25726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25727  if test "x$has_forbidden_chars" != x; then
25728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25732      # Going to short mode and back again did indeed matter. Since short mode is
25733      # case insensitive, let's make it lowercase to improve readability.
25734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25735      # Now convert it back to Unix-stile (cygpath)
25736      input_path=`$CYGPATH -u "$shortmode_path"`
25737      new_path="$input_path"
25738    fi
25739  fi
25740
25741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25742  if test "x$test_cygdrive_prefix" = x; then
25743    # As a simple fix, exclude /usr/bin since it's not a real path.
25744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25746      # a path prefixed by /cygdrive for fixpath to work.
25747      new_path="$CYGWIN_ROOT_PATH$input_path"
25748    fi
25749  fi
25750
25751  # remove trailing .exe if any
25752  new_path="${new_path/%.exe/}"
25753
25754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25755
25756  # First separate the path from the arguments. This will split at the first
25757  # space.
25758  complete="$NM"
25759  path="${complete%% *}"
25760  tmp="$complete EOL"
25761  arguments="${tmp#* }"
25762
25763  # Input might be given as Windows format, start by converting to
25764  # unix format.
25765  new_path="$path"
25766
25767  windows_path="$new_path"
25768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25769    unix_path=`$CYGPATH -u "$windows_path"`
25770    new_path="$unix_path"
25771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25773    new_path="$unix_path"
25774  fi
25775
25776
25777  # Now try to locate executable using which
25778  new_path=`$WHICH "$new_path" 2> /dev/null`
25779
25780  if test "x$new_path" = x; then
25781    # Oops. Which didn't find the executable.
25782    # The splitting of arguments from the executable at a space might have been incorrect,
25783    # since paths with space are more likely in Windows. Give it another try with the whole
25784    # argument.
25785    path="$complete"
25786    arguments="EOL"
25787    new_path="$path"
25788
25789  windows_path="$new_path"
25790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25791    unix_path=`$CYGPATH -u "$windows_path"`
25792    new_path="$unix_path"
25793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25795    new_path="$unix_path"
25796  fi
25797
25798
25799    new_path=`$WHICH "$new_path" 2> /dev/null`
25800
25801    if test "x$new_path" = x; then
25802      # It's still not found. Now this is an unrecoverable error.
25803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25804$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25805      has_space=`$ECHO "$complete" | $GREP " "`
25806      if test "x$has_space" != x; then
25807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25809      fi
25810      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25811    fi
25812  fi
25813
25814  # Now new_path has a complete unix path to the binary
25815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25816    # Keep paths in /bin as-is, but remove trailing .exe if any
25817    new_path="${new_path/%.exe/}"
25818    # Do not save /bin paths to all_fixpath_prefixes!
25819  else
25820    # Not in mixed or Windows style, start by that.
25821    new_path=`cmd //c echo $new_path`
25822
25823  input_path="$new_path"
25824  # Check if we need to convert this using DOS-style short mode. If the path
25825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25826  # take no chances and rewrite it.
25827  # Note: m4 eats our [], so we need to use [ and ] instead.
25828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25829  if test "x$has_forbidden_chars" != x; then
25830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25832  fi
25833
25834    # Output is in $new_path
25835
25836  windows_path="$new_path"
25837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25838    unix_path=`$CYGPATH -u "$windows_path"`
25839    new_path="$unix_path"
25840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25842    new_path="$unix_path"
25843  fi
25844
25845    # remove trailing .exe if any
25846    new_path="${new_path/%.exe/}"
25847
25848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25850  fi
25851
25852  else
25853    # We're on a posix platform. Hooray! :)
25854    # First separate the path from the arguments. This will split at the first
25855    # space.
25856    complete="$NM"
25857    path="${complete%% *}"
25858    tmp="$complete EOL"
25859    arguments="${tmp#* }"
25860
25861    # Cannot rely on the command "which" here since it doesn't always work.
25862    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25863    if test -z "$is_absolute_path"; then
25864      # Path to executable is not absolute. Find it.
25865      IFS_save="$IFS"
25866      IFS=:
25867      for p in $PATH; do
25868        if test -f "$p/$path" && test -x "$p/$path"; then
25869          new_path="$p/$path"
25870          break
25871        fi
25872      done
25873      IFS="$IFS_save"
25874    else
25875      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25876$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25877      new_path="$path"
25878    fi
25879
25880    if test "x$new_path" = x; then
25881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25882$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25883        has_space=`$ECHO "$complete" | $GREP " "`
25884        if test "x$has_space" != x; then
25885          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25886$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25887        fi
25888        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25889      fi
25890  fi
25891
25892      # Now join together the path and the arguments once again
25893      if test "x$arguments" != xEOL; then
25894        new_complete="$new_path ${arguments% *}"
25895      else
25896        new_complete="$new_path"
25897      fi
25898
25899  if test "x$complete" != "x$new_complete"; then
25900      NM="$new_complete"
25901      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25902$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25903    fi
25904
25905    if test -n "$ac_tool_prefix"; then
25906  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25907set dummy ${ac_tool_prefix}strip; ac_word=$2
25908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25909$as_echo_n "checking for $ac_word... " >&6; }
25910if ${ac_cv_prog_STRIP+:} false; then :
25911  $as_echo_n "(cached) " >&6
25912else
25913  if test -n "$STRIP"; then
25914  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25915else
25916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25917for as_dir in $PATH
25918do
25919  IFS=$as_save_IFS
25920  test -z "$as_dir" && as_dir=.
25921    for ac_exec_ext in '' $ac_executable_extensions; do
25922  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25923    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25925    break 2
25926  fi
25927done
25928  done
25929IFS=$as_save_IFS
25930
25931fi
25932fi
25933STRIP=$ac_cv_prog_STRIP
25934if test -n "$STRIP"; then
25935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25936$as_echo "$STRIP" >&6; }
25937else
25938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25939$as_echo "no" >&6; }
25940fi
25941
25942
25943fi
25944if test -z "$ac_cv_prog_STRIP"; then
25945  ac_ct_STRIP=$STRIP
25946  # Extract the first word of "strip", so it can be a program name with args.
25947set dummy strip; ac_word=$2
25948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25949$as_echo_n "checking for $ac_word... " >&6; }
25950if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
25951  $as_echo_n "(cached) " >&6
25952else
25953  if test -n "$ac_ct_STRIP"; then
25954  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25955else
25956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25957for as_dir in $PATH
25958do
25959  IFS=$as_save_IFS
25960  test -z "$as_dir" && as_dir=.
25961    for ac_exec_ext in '' $ac_executable_extensions; do
25962  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25963    ac_cv_prog_ac_ct_STRIP="strip"
25964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25965    break 2
25966  fi
25967done
25968  done
25969IFS=$as_save_IFS
25970
25971fi
25972fi
25973ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25974if test -n "$ac_ct_STRIP"; then
25975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25976$as_echo "$ac_ct_STRIP" >&6; }
25977else
25978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25979$as_echo "no" >&6; }
25980fi
25981
25982  if test "x$ac_ct_STRIP" = x; then
25983    STRIP=""
25984  else
25985    case $cross_compiling:$ac_tool_warned in
25986yes:)
25987{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25988$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25989ac_tool_warned=yes ;;
25990esac
25991    STRIP=$ac_ct_STRIP
25992  fi
25993else
25994  STRIP="$ac_cv_prog_STRIP"
25995fi
25996
25997
25998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25999
26000  # First separate the path from the arguments. This will split at the first
26001  # space.
26002  complete="$STRIP"
26003  path="${complete%% *}"
26004  tmp="$complete EOL"
26005  arguments="${tmp#* }"
26006
26007  # Input might be given as Windows format, start by converting to
26008  # unix format.
26009  new_path=`$CYGPATH -u "$path"`
26010
26011  # Now try to locate executable using which
26012  new_path=`$WHICH "$new_path" 2> /dev/null`
26013  # bat and cmd files are not always considered executable in cygwin causing which
26014  # to not find them
26015  if test "x$new_path" = x \
26016           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26017           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26018    new_path=`$CYGPATH -u "$path"`
26019  fi
26020  if test "x$new_path" = x; then
26021    # Oops. Which didn't find the executable.
26022    # The splitting of arguments from the executable at a space might have been incorrect,
26023    # since paths with space are more likely in Windows. Give it another try with the whole
26024    # argument.
26025    path="$complete"
26026    arguments="EOL"
26027    new_path=`$CYGPATH -u "$path"`
26028    new_path=`$WHICH "$new_path" 2> /dev/null`
26029    # bat and cmd files are not always considered executable in cygwin causing which
26030    # to not find them
26031    if test "x$new_path" = x \
26032             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26033             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26034      new_path=`$CYGPATH -u "$path"`
26035    fi
26036    if test "x$new_path" = x; then
26037      # It's still not found. Now this is an unrecoverable error.
26038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26039$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26040      has_space=`$ECHO "$complete" | $GREP " "`
26041      if test "x$has_space" != x; then
26042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26044      fi
26045      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26046    fi
26047  fi
26048
26049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26052  # "foo.exe" is OK but "foo" is an error.
26053  #
26054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26055  # It is also a way to make sure we got the proper file name for the real test later on.
26056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26057  if test "x$test_shortpath" = x; then
26058    # Short path failed, file does not exist as specified.
26059    # Try adding .exe or .cmd
26060    if test -f "${new_path}.exe"; then
26061       input_to_shortpath="${new_path}.exe"
26062    elif test -f "${new_path}.cmd"; then
26063       input_to_shortpath="${new_path}.cmd"
26064    else
26065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26066$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26067      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26068$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26069      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26070    fi
26071  else
26072    input_to_shortpath="$new_path"
26073  fi
26074
26075  # Call helper function which possibly converts this using DOS-style short mode.
26076  # If so, the updated path is stored in $new_path.
26077  new_path="$input_to_shortpath"
26078
26079  input_path="$input_to_shortpath"
26080  # Check if we need to convert this using DOS-style short mode. If the path
26081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26082  # take no chances and rewrite it.
26083  # Note: m4 eats our [], so we need to use [ and ] instead.
26084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26085  if test "x$has_forbidden_chars" != x; then
26086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26090      # Going to short mode and back again did indeed matter. Since short mode is
26091      # case insensitive, let's make it lowercase to improve readability.
26092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26093      # Now convert it back to Unix-stile (cygpath)
26094      input_path=`$CYGPATH -u "$shortmode_path"`
26095      new_path="$input_path"
26096    fi
26097  fi
26098
26099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26100  if test "x$test_cygdrive_prefix" = x; then
26101    # As a simple fix, exclude /usr/bin since it's not a real path.
26102    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26104      # a path prefixed by /cygdrive for fixpath to work.
26105      new_path="$CYGWIN_ROOT_PATH$input_path"
26106    fi
26107  fi
26108
26109  # remove trailing .exe if any
26110  new_path="${new_path/%.exe/}"
26111
26112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26113
26114  # First separate the path from the arguments. This will split at the first
26115  # space.
26116  complete="$STRIP"
26117  path="${complete%% *}"
26118  tmp="$complete EOL"
26119  arguments="${tmp#* }"
26120
26121  # Input might be given as Windows format, start by converting to
26122  # unix format.
26123  new_path="$path"
26124
26125  windows_path="$new_path"
26126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26127    unix_path=`$CYGPATH -u "$windows_path"`
26128    new_path="$unix_path"
26129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26131    new_path="$unix_path"
26132  fi
26133
26134
26135  # Now try to locate executable using which
26136  new_path=`$WHICH "$new_path" 2> /dev/null`
26137
26138  if test "x$new_path" = x; then
26139    # Oops. Which didn't find the executable.
26140    # The splitting of arguments from the executable at a space might have been incorrect,
26141    # since paths with space are more likely in Windows. Give it another try with the whole
26142    # argument.
26143    path="$complete"
26144    arguments="EOL"
26145    new_path="$path"
26146
26147  windows_path="$new_path"
26148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26149    unix_path=`$CYGPATH -u "$windows_path"`
26150    new_path="$unix_path"
26151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26153    new_path="$unix_path"
26154  fi
26155
26156
26157    new_path=`$WHICH "$new_path" 2> /dev/null`
26158
26159    if test "x$new_path" = x; then
26160      # It's still not found. Now this is an unrecoverable error.
26161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26162$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26163      has_space=`$ECHO "$complete" | $GREP " "`
26164      if test "x$has_space" != x; then
26165        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26166$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26167      fi
26168      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26169    fi
26170  fi
26171
26172  # Now new_path has a complete unix path to the binary
26173  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26174    # Keep paths in /bin as-is, but remove trailing .exe if any
26175    new_path="${new_path/%.exe/}"
26176    # Do not save /bin paths to all_fixpath_prefixes!
26177  else
26178    # Not in mixed or Windows style, start by that.
26179    new_path=`cmd //c echo $new_path`
26180
26181  input_path="$new_path"
26182  # Check if we need to convert this using DOS-style short mode. If the path
26183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26184  # take no chances and rewrite it.
26185  # Note: m4 eats our [], so we need to use [ and ] instead.
26186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26187  if test "x$has_forbidden_chars" != x; then
26188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26190  fi
26191
26192    # Output is in $new_path
26193
26194  windows_path="$new_path"
26195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26196    unix_path=`$CYGPATH -u "$windows_path"`
26197    new_path="$unix_path"
26198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26200    new_path="$unix_path"
26201  fi
26202
26203    # remove trailing .exe if any
26204    new_path="${new_path/%.exe/}"
26205
26206    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26207    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26208  fi
26209
26210  else
26211    # We're on a posix platform. Hooray! :)
26212    # First separate the path from the arguments. This will split at the first
26213    # space.
26214    complete="$STRIP"
26215    path="${complete%% *}"
26216    tmp="$complete EOL"
26217    arguments="${tmp#* }"
26218
26219    # Cannot rely on the command "which" here since it doesn't always work.
26220    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26221    if test -z "$is_absolute_path"; then
26222      # Path to executable is not absolute. Find it.
26223      IFS_save="$IFS"
26224      IFS=:
26225      for p in $PATH; do
26226        if test -f "$p/$path" && test -x "$p/$path"; then
26227          new_path="$p/$path"
26228          break
26229        fi
26230      done
26231      IFS="$IFS_save"
26232    else
26233      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26234$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26235      new_path="$path"
26236    fi
26237
26238    if test "x$new_path" = x; then
26239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26240$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26241        has_space=`$ECHO "$complete" | $GREP " "`
26242        if test "x$has_space" != x; then
26243          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26244$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26245        fi
26246        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26247      fi
26248  fi
26249
26250      # Now join together the path and the arguments once again
26251      if test "x$arguments" != xEOL; then
26252        new_complete="$new_path ${arguments% *}"
26253      else
26254        new_complete="$new_path"
26255      fi
26256
26257  if test "x$complete" != "x$new_complete"; then
26258      STRIP="$new_complete"
26259      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26260$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26261    fi
26262
26263fi
26264
26265# objcopy is used for moving debug symbols to separate files when
26266# full debug symbols are enabled.
26267if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26268    if test -n "$ac_tool_prefix"; then
26269  for ac_prog in gobjcopy objcopy
26270  do
26271    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26272set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26274$as_echo_n "checking for $ac_word... " >&6; }
26275if ${ac_cv_prog_OBJCOPY+:} false; then :
26276  $as_echo_n "(cached) " >&6
26277else
26278  if test -n "$OBJCOPY"; then
26279  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26280else
26281as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26282for as_dir in $PATH
26283do
26284  IFS=$as_save_IFS
26285  test -z "$as_dir" && as_dir=.
26286    for ac_exec_ext in '' $ac_executable_extensions; do
26287  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26288    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26290    break 2
26291  fi
26292done
26293  done
26294IFS=$as_save_IFS
26295
26296fi
26297fi
26298OBJCOPY=$ac_cv_prog_OBJCOPY
26299if test -n "$OBJCOPY"; then
26300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26301$as_echo "$OBJCOPY" >&6; }
26302else
26303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26304$as_echo "no" >&6; }
26305fi
26306
26307
26308    test -n "$OBJCOPY" && break
26309  done
26310fi
26311if test -z "$OBJCOPY"; then
26312  ac_ct_OBJCOPY=$OBJCOPY
26313  for ac_prog in gobjcopy objcopy
26314do
26315  # Extract the first word of "$ac_prog", so it can be a program name with args.
26316set dummy $ac_prog; ac_word=$2
26317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26318$as_echo_n "checking for $ac_word... " >&6; }
26319if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
26320  $as_echo_n "(cached) " >&6
26321else
26322  if test -n "$ac_ct_OBJCOPY"; then
26323  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26324else
26325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26326for as_dir in $PATH
26327do
26328  IFS=$as_save_IFS
26329  test -z "$as_dir" && as_dir=.
26330    for ac_exec_ext in '' $ac_executable_extensions; do
26331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26332    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26334    break 2
26335  fi
26336done
26337  done
26338IFS=$as_save_IFS
26339
26340fi
26341fi
26342ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26343if test -n "$ac_ct_OBJCOPY"; then
26344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26345$as_echo "$ac_ct_OBJCOPY" >&6; }
26346else
26347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26348$as_echo "no" >&6; }
26349fi
26350
26351
26352  test -n "$ac_ct_OBJCOPY" && break
26353done
26354
26355  if test "x$ac_ct_OBJCOPY" = x; then
26356    OBJCOPY=""
26357  else
26358    case $cross_compiling:$ac_tool_warned in
26359yes:)
26360{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26361$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26362ac_tool_warned=yes ;;
26363esac
26364    OBJCOPY=$ac_ct_OBJCOPY
26365  fi
26366fi
26367
26368    # Only call fixup if objcopy was found.
26369    if test -n "$OBJCOPY"; then
26370
26371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26372
26373  # First separate the path from the arguments. This will split at the first
26374  # space.
26375  complete="$OBJCOPY"
26376  path="${complete%% *}"
26377  tmp="$complete EOL"
26378  arguments="${tmp#* }"
26379
26380  # Input might be given as Windows format, start by converting to
26381  # unix format.
26382  new_path=`$CYGPATH -u "$path"`
26383
26384  # Now try to locate executable using which
26385  new_path=`$WHICH "$new_path" 2> /dev/null`
26386  # bat and cmd files are not always considered executable in cygwin causing which
26387  # to not find them
26388  if test "x$new_path" = x \
26389           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26390           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26391    new_path=`$CYGPATH -u "$path"`
26392  fi
26393  if test "x$new_path" = x; then
26394    # Oops. Which didn't find the executable.
26395    # The splitting of arguments from the executable at a space might have been incorrect,
26396    # since paths with space are more likely in Windows. Give it another try with the whole
26397    # argument.
26398    path="$complete"
26399    arguments="EOL"
26400    new_path=`$CYGPATH -u "$path"`
26401    new_path=`$WHICH "$new_path" 2> /dev/null`
26402    # bat and cmd files are not always considered executable in cygwin causing which
26403    # to not find them
26404    if test "x$new_path" = x \
26405             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26406             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26407      new_path=`$CYGPATH -u "$path"`
26408    fi
26409    if test "x$new_path" = x; then
26410      # It's still not found. Now this is an unrecoverable error.
26411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26412$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26413      has_space=`$ECHO "$complete" | $GREP " "`
26414      if test "x$has_space" != x; then
26415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26417      fi
26418      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26419    fi
26420  fi
26421
26422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26425  # "foo.exe" is OK but "foo" is an error.
26426  #
26427  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26428  # It is also a way to make sure we got the proper file name for the real test later on.
26429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26430  if test "x$test_shortpath" = x; then
26431    # Short path failed, file does not exist as specified.
26432    # Try adding .exe or .cmd
26433    if test -f "${new_path}.exe"; then
26434       input_to_shortpath="${new_path}.exe"
26435    elif test -f "${new_path}.cmd"; then
26436       input_to_shortpath="${new_path}.cmd"
26437    else
26438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26439$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26440      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26441$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26442      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26443    fi
26444  else
26445    input_to_shortpath="$new_path"
26446  fi
26447
26448  # Call helper function which possibly converts this using DOS-style short mode.
26449  # If so, the updated path is stored in $new_path.
26450  new_path="$input_to_shortpath"
26451
26452  input_path="$input_to_shortpath"
26453  # Check if we need to convert this using DOS-style short mode. If the path
26454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26455  # take no chances and rewrite it.
26456  # Note: m4 eats our [], so we need to use [ and ] instead.
26457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26458  if test "x$has_forbidden_chars" != x; then
26459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26463      # Going to short mode and back again did indeed matter. Since short mode is
26464      # case insensitive, let's make it lowercase to improve readability.
26465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26466      # Now convert it back to Unix-stile (cygpath)
26467      input_path=`$CYGPATH -u "$shortmode_path"`
26468      new_path="$input_path"
26469    fi
26470  fi
26471
26472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26473  if test "x$test_cygdrive_prefix" = x; then
26474    # As a simple fix, exclude /usr/bin since it's not a real path.
26475    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26477      # a path prefixed by /cygdrive for fixpath to work.
26478      new_path="$CYGWIN_ROOT_PATH$input_path"
26479    fi
26480  fi
26481
26482  # remove trailing .exe if any
26483  new_path="${new_path/%.exe/}"
26484
26485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26486
26487  # First separate the path from the arguments. This will split at the first
26488  # space.
26489  complete="$OBJCOPY"
26490  path="${complete%% *}"
26491  tmp="$complete EOL"
26492  arguments="${tmp#* }"
26493
26494  # Input might be given as Windows format, start by converting to
26495  # unix format.
26496  new_path="$path"
26497
26498  windows_path="$new_path"
26499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26500    unix_path=`$CYGPATH -u "$windows_path"`
26501    new_path="$unix_path"
26502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26504    new_path="$unix_path"
26505  fi
26506
26507
26508  # Now try to locate executable using which
26509  new_path=`$WHICH "$new_path" 2> /dev/null`
26510
26511  if test "x$new_path" = x; then
26512    # Oops. Which didn't find the executable.
26513    # The splitting of arguments from the executable at a space might have been incorrect,
26514    # since paths with space are more likely in Windows. Give it another try with the whole
26515    # argument.
26516    path="$complete"
26517    arguments="EOL"
26518    new_path="$path"
26519
26520  windows_path="$new_path"
26521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26522    unix_path=`$CYGPATH -u "$windows_path"`
26523    new_path="$unix_path"
26524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26526    new_path="$unix_path"
26527  fi
26528
26529
26530    new_path=`$WHICH "$new_path" 2> /dev/null`
26531
26532    if test "x$new_path" = x; then
26533      # It's still not found. Now this is an unrecoverable error.
26534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26535$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26536      has_space=`$ECHO "$complete" | $GREP " "`
26537      if test "x$has_space" != x; then
26538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26540      fi
26541      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26542    fi
26543  fi
26544
26545  # Now new_path has a complete unix path to the binary
26546  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26547    # Keep paths in /bin as-is, but remove trailing .exe if any
26548    new_path="${new_path/%.exe/}"
26549    # Do not save /bin paths to all_fixpath_prefixes!
26550  else
26551    # Not in mixed or Windows style, start by that.
26552    new_path=`cmd //c echo $new_path`
26553
26554  input_path="$new_path"
26555  # Check if we need to convert this using DOS-style short mode. If the path
26556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26557  # take no chances and rewrite it.
26558  # Note: m4 eats our [], so we need to use [ and ] instead.
26559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26560  if test "x$has_forbidden_chars" != x; then
26561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26563  fi
26564
26565    # Output is in $new_path
26566
26567  windows_path="$new_path"
26568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26569    unix_path=`$CYGPATH -u "$windows_path"`
26570    new_path="$unix_path"
26571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26573    new_path="$unix_path"
26574  fi
26575
26576    # remove trailing .exe if any
26577    new_path="${new_path/%.exe/}"
26578
26579    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26580    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26581  fi
26582
26583  else
26584    # We're on a posix platform. Hooray! :)
26585    # First separate the path from the arguments. This will split at the first
26586    # space.
26587    complete="$OBJCOPY"
26588    path="${complete%% *}"
26589    tmp="$complete EOL"
26590    arguments="${tmp#* }"
26591
26592    # Cannot rely on the command "which" here since it doesn't always work.
26593    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26594    if test -z "$is_absolute_path"; then
26595      # Path to executable is not absolute. Find it.
26596      IFS_save="$IFS"
26597      IFS=:
26598      for p in $PATH; do
26599        if test -f "$p/$path" && test -x "$p/$path"; then
26600          new_path="$p/$path"
26601          break
26602        fi
26603      done
26604      IFS="$IFS_save"
26605    else
26606      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26607$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26608      new_path="$path"
26609    fi
26610
26611    if test "x$new_path" = x; then
26612        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26613$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26614        has_space=`$ECHO "$complete" | $GREP " "`
26615        if test "x$has_space" != x; then
26616          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26617$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26618        fi
26619        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26620      fi
26621  fi
26622
26623      # Now join together the path and the arguments once again
26624      if test "x$arguments" != xEOL; then
26625        new_complete="$new_path ${arguments% *}"
26626      else
26627        new_complete="$new_path"
26628      fi
26629
26630  if test "x$complete" != "x$new_complete"; then
26631      OBJCOPY="$new_complete"
26632      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26633$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26634    fi
26635
26636    fi
26637fi
26638
26639if test -n "$ac_tool_prefix"; then
26640  for ac_prog in gobjdump objdump
26641  do
26642    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26643set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26645$as_echo_n "checking for $ac_word... " >&6; }
26646if ${ac_cv_prog_OBJDUMP+:} false; then :
26647  $as_echo_n "(cached) " >&6
26648else
26649  if test -n "$OBJDUMP"; then
26650  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26651else
26652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26653for as_dir in $PATH
26654do
26655  IFS=$as_save_IFS
26656  test -z "$as_dir" && as_dir=.
26657    for ac_exec_ext in '' $ac_executable_extensions; do
26658  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26659    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26661    break 2
26662  fi
26663done
26664  done
26665IFS=$as_save_IFS
26666
26667fi
26668fi
26669OBJDUMP=$ac_cv_prog_OBJDUMP
26670if test -n "$OBJDUMP"; then
26671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26672$as_echo "$OBJDUMP" >&6; }
26673else
26674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26675$as_echo "no" >&6; }
26676fi
26677
26678
26679    test -n "$OBJDUMP" && break
26680  done
26681fi
26682if test -z "$OBJDUMP"; then
26683  ac_ct_OBJDUMP=$OBJDUMP
26684  for ac_prog in gobjdump objdump
26685do
26686  # Extract the first word of "$ac_prog", so it can be a program name with args.
26687set dummy $ac_prog; ac_word=$2
26688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26689$as_echo_n "checking for $ac_word... " >&6; }
26690if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
26691  $as_echo_n "(cached) " >&6
26692else
26693  if test -n "$ac_ct_OBJDUMP"; then
26694  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26695else
26696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26697for as_dir in $PATH
26698do
26699  IFS=$as_save_IFS
26700  test -z "$as_dir" && as_dir=.
26701    for ac_exec_ext in '' $ac_executable_extensions; do
26702  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26703    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26705    break 2
26706  fi
26707done
26708  done
26709IFS=$as_save_IFS
26710
26711fi
26712fi
26713ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26714if test -n "$ac_ct_OBJDUMP"; then
26715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26716$as_echo "$ac_ct_OBJDUMP" >&6; }
26717else
26718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26719$as_echo "no" >&6; }
26720fi
26721
26722
26723  test -n "$ac_ct_OBJDUMP" && break
26724done
26725
26726  if test "x$ac_ct_OBJDUMP" = x; then
26727    OBJDUMP=""
26728  else
26729    case $cross_compiling:$ac_tool_warned in
26730yes:)
26731{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26732$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26733ac_tool_warned=yes ;;
26734esac
26735    OBJDUMP=$ac_ct_OBJDUMP
26736  fi
26737fi
26738
26739if test "x$OBJDUMP" != x; then
26740  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26741
26742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26743
26744  # First separate the path from the arguments. This will split at the first
26745  # space.
26746  complete="$OBJDUMP"
26747  path="${complete%% *}"
26748  tmp="$complete EOL"
26749  arguments="${tmp#* }"
26750
26751  # Input might be given as Windows format, start by converting to
26752  # unix format.
26753  new_path=`$CYGPATH -u "$path"`
26754
26755  # Now try to locate executable using which
26756  new_path=`$WHICH "$new_path" 2> /dev/null`
26757  # bat and cmd files are not always considered executable in cygwin causing which
26758  # to not find them
26759  if test "x$new_path" = x \
26760           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26761           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26762    new_path=`$CYGPATH -u "$path"`
26763  fi
26764  if test "x$new_path" = x; then
26765    # Oops. Which didn't find the executable.
26766    # The splitting of arguments from the executable at a space might have been incorrect,
26767    # since paths with space are more likely in Windows. Give it another try with the whole
26768    # argument.
26769    path="$complete"
26770    arguments="EOL"
26771    new_path=`$CYGPATH -u "$path"`
26772    new_path=`$WHICH "$new_path" 2> /dev/null`
26773    # bat and cmd files are not always considered executable in cygwin causing which
26774    # to not find them
26775    if test "x$new_path" = x \
26776             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26777             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26778      new_path=`$CYGPATH -u "$path"`
26779    fi
26780    if test "x$new_path" = x; then
26781      # It's still not found. Now this is an unrecoverable error.
26782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26783$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26784      has_space=`$ECHO "$complete" | $GREP " "`
26785      if test "x$has_space" != x; then
26786        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26787$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26788      fi
26789      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26790    fi
26791  fi
26792
26793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26796  # "foo.exe" is OK but "foo" is an error.
26797  #
26798  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26799  # It is also a way to make sure we got the proper file name for the real test later on.
26800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26801  if test "x$test_shortpath" = x; then
26802    # Short path failed, file does not exist as specified.
26803    # Try adding .exe or .cmd
26804    if test -f "${new_path}.exe"; then
26805       input_to_shortpath="${new_path}.exe"
26806    elif test -f "${new_path}.cmd"; then
26807       input_to_shortpath="${new_path}.cmd"
26808    else
26809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26810$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26811      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26812$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26813      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26814    fi
26815  else
26816    input_to_shortpath="$new_path"
26817  fi
26818
26819  # Call helper function which possibly converts this using DOS-style short mode.
26820  # If so, the updated path is stored in $new_path.
26821  new_path="$input_to_shortpath"
26822
26823  input_path="$input_to_shortpath"
26824  # Check if we need to convert this using DOS-style short mode. If the path
26825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26826  # take no chances and rewrite it.
26827  # Note: m4 eats our [], so we need to use [ and ] instead.
26828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26829  if test "x$has_forbidden_chars" != x; then
26830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26834      # Going to short mode and back again did indeed matter. Since short mode is
26835      # case insensitive, let's make it lowercase to improve readability.
26836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26837      # Now convert it back to Unix-stile (cygpath)
26838      input_path=`$CYGPATH -u "$shortmode_path"`
26839      new_path="$input_path"
26840    fi
26841  fi
26842
26843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26844  if test "x$test_cygdrive_prefix" = x; then
26845    # As a simple fix, exclude /usr/bin since it's not a real path.
26846    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26848      # a path prefixed by /cygdrive for fixpath to work.
26849      new_path="$CYGWIN_ROOT_PATH$input_path"
26850    fi
26851  fi
26852
26853  # remove trailing .exe if any
26854  new_path="${new_path/%.exe/}"
26855
26856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26857
26858  # First separate the path from the arguments. This will split at the first
26859  # space.
26860  complete="$OBJDUMP"
26861  path="${complete%% *}"
26862  tmp="$complete EOL"
26863  arguments="${tmp#* }"
26864
26865  # Input might be given as Windows format, start by converting to
26866  # unix format.
26867  new_path="$path"
26868
26869  windows_path="$new_path"
26870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26871    unix_path=`$CYGPATH -u "$windows_path"`
26872    new_path="$unix_path"
26873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26875    new_path="$unix_path"
26876  fi
26877
26878
26879  # Now try to locate executable using which
26880  new_path=`$WHICH "$new_path" 2> /dev/null`
26881
26882  if test "x$new_path" = x; then
26883    # Oops. Which didn't find the executable.
26884    # The splitting of arguments from the executable at a space might have been incorrect,
26885    # since paths with space are more likely in Windows. Give it another try with the whole
26886    # argument.
26887    path="$complete"
26888    arguments="EOL"
26889    new_path="$path"
26890
26891  windows_path="$new_path"
26892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26893    unix_path=`$CYGPATH -u "$windows_path"`
26894    new_path="$unix_path"
26895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26897    new_path="$unix_path"
26898  fi
26899
26900
26901    new_path=`$WHICH "$new_path" 2> /dev/null`
26902
26903    if test "x$new_path" = x; then
26904      # It's still not found. Now this is an unrecoverable error.
26905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26906$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26907      has_space=`$ECHO "$complete" | $GREP " "`
26908      if test "x$has_space" != x; then
26909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26911      fi
26912      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26913    fi
26914  fi
26915
26916  # Now new_path has a complete unix path to the binary
26917  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26918    # Keep paths in /bin as-is, but remove trailing .exe if any
26919    new_path="${new_path/%.exe/}"
26920    # Do not save /bin paths to all_fixpath_prefixes!
26921  else
26922    # Not in mixed or Windows style, start by that.
26923    new_path=`cmd //c echo $new_path`
26924
26925  input_path="$new_path"
26926  # Check if we need to convert this using DOS-style short mode. If the path
26927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26928  # take no chances and rewrite it.
26929  # Note: m4 eats our [], so we need to use [ and ] instead.
26930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26931  if test "x$has_forbidden_chars" != x; then
26932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26934  fi
26935
26936    # Output is in $new_path
26937
26938  windows_path="$new_path"
26939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26940    unix_path=`$CYGPATH -u "$windows_path"`
26941    new_path="$unix_path"
26942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26944    new_path="$unix_path"
26945  fi
26946
26947    # remove trailing .exe if any
26948    new_path="${new_path/%.exe/}"
26949
26950    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26951    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26952  fi
26953
26954  else
26955    # We're on a posix platform. Hooray! :)
26956    # First separate the path from the arguments. This will split at the first
26957    # space.
26958    complete="$OBJDUMP"
26959    path="${complete%% *}"
26960    tmp="$complete EOL"
26961    arguments="${tmp#* }"
26962
26963    # Cannot rely on the command "which" here since it doesn't always work.
26964    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26965    if test -z "$is_absolute_path"; then
26966      # Path to executable is not absolute. Find it.
26967      IFS_save="$IFS"
26968      IFS=:
26969      for p in $PATH; do
26970        if test -f "$p/$path" && test -x "$p/$path"; then
26971          new_path="$p/$path"
26972          break
26973        fi
26974      done
26975      IFS="$IFS_save"
26976    else
26977      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26978$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26979      new_path="$path"
26980    fi
26981
26982    if test "x$new_path" = x; then
26983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26984$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26985        has_space=`$ECHO "$complete" | $GREP " "`
26986        if test "x$has_space" != x; then
26987          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26988$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26989        fi
26990        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26991      fi
26992  fi
26993
26994      # Now join together the path and the arguments once again
26995      if test "x$arguments" != xEOL; then
26996        new_complete="$new_path ${arguments% *}"
26997      else
26998        new_complete="$new_path"
26999      fi
27000
27001  if test "x$complete" != "x$new_complete"; then
27002      OBJDUMP="$new_complete"
27003      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27004$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27005    fi
27006
27007fi
27008
27009if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27010   # Extract the first word of "lipo", so it can be a program name with args.
27011set dummy lipo; ac_word=$2
27012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27013$as_echo_n "checking for $ac_word... " >&6; }
27014if ${ac_cv_path_LIPO+:} false; then :
27015  $as_echo_n "(cached) " >&6
27016else
27017  case $LIPO in
27018  [\\/]* | ?:[\\/]*)
27019  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27020  ;;
27021  *)
27022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27023for as_dir in $PATH
27024do
27025  IFS=$as_save_IFS
27026  test -z "$as_dir" && as_dir=.
27027    for ac_exec_ext in '' $ac_executable_extensions; do
27028  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27029    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27031    break 2
27032  fi
27033done
27034  done
27035IFS=$as_save_IFS
27036
27037  ;;
27038esac
27039fi
27040LIPO=$ac_cv_path_LIPO
27041if test -n "$LIPO"; then
27042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27043$as_echo "$LIPO" >&6; }
27044else
27045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27046$as_echo "no" >&6; }
27047fi
27048
27049
27050
27051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27052
27053  # First separate the path from the arguments. This will split at the first
27054  # space.
27055  complete="$LIPO"
27056  path="${complete%% *}"
27057  tmp="$complete EOL"
27058  arguments="${tmp#* }"
27059
27060  # Input might be given as Windows format, start by converting to
27061  # unix format.
27062  new_path=`$CYGPATH -u "$path"`
27063
27064  # Now try to locate executable using which
27065  new_path=`$WHICH "$new_path" 2> /dev/null`
27066  # bat and cmd files are not always considered executable in cygwin causing which
27067  # to not find them
27068  if test "x$new_path" = x \
27069           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27070           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27071    new_path=`$CYGPATH -u "$path"`
27072  fi
27073  if test "x$new_path" = x; then
27074    # Oops. Which didn't find the executable.
27075    # The splitting of arguments from the executable at a space might have been incorrect,
27076    # since paths with space are more likely in Windows. Give it another try with the whole
27077    # argument.
27078    path="$complete"
27079    arguments="EOL"
27080    new_path=`$CYGPATH -u "$path"`
27081    new_path=`$WHICH "$new_path" 2> /dev/null`
27082    # bat and cmd files are not always considered executable in cygwin causing which
27083    # to not find them
27084    if test "x$new_path" = x \
27085             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27086             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27087      new_path=`$CYGPATH -u "$path"`
27088    fi
27089    if test "x$new_path" = x; then
27090      # It's still not found. Now this is an unrecoverable error.
27091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27092$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27093      has_space=`$ECHO "$complete" | $GREP " "`
27094      if test "x$has_space" != x; then
27095        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27096$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27097      fi
27098      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27099    fi
27100  fi
27101
27102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27105  # "foo.exe" is OK but "foo" is an error.
27106  #
27107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27108  # It is also a way to make sure we got the proper file name for the real test later on.
27109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27110  if test "x$test_shortpath" = x; then
27111    # Short path failed, file does not exist as specified.
27112    # Try adding .exe or .cmd
27113    if test -f "${new_path}.exe"; then
27114       input_to_shortpath="${new_path}.exe"
27115    elif test -f "${new_path}.cmd"; then
27116       input_to_shortpath="${new_path}.cmd"
27117    else
27118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27119$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27120      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27121$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27122      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27123    fi
27124  else
27125    input_to_shortpath="$new_path"
27126  fi
27127
27128  # Call helper function which possibly converts this using DOS-style short mode.
27129  # If so, the updated path is stored in $new_path.
27130  new_path="$input_to_shortpath"
27131
27132  input_path="$input_to_shortpath"
27133  # Check if we need to convert this using DOS-style short mode. If the path
27134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27135  # take no chances and rewrite it.
27136  # Note: m4 eats our [], so we need to use [ and ] instead.
27137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27138  if test "x$has_forbidden_chars" != x; then
27139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27140    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27141    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27142    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27143      # Going to short mode and back again did indeed matter. Since short mode is
27144      # case insensitive, let's make it lowercase to improve readability.
27145      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27146      # Now convert it back to Unix-stile (cygpath)
27147      input_path=`$CYGPATH -u "$shortmode_path"`
27148      new_path="$input_path"
27149    fi
27150  fi
27151
27152  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27153  if test "x$test_cygdrive_prefix" = x; then
27154    # As a simple fix, exclude /usr/bin since it's not a real path.
27155    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27156      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27157      # a path prefixed by /cygdrive for fixpath to work.
27158      new_path="$CYGWIN_ROOT_PATH$input_path"
27159    fi
27160  fi
27161
27162  # remove trailing .exe if any
27163  new_path="${new_path/%.exe/}"
27164
27165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27166
27167  # First separate the path from the arguments. This will split at the first
27168  # space.
27169  complete="$LIPO"
27170  path="${complete%% *}"
27171  tmp="$complete EOL"
27172  arguments="${tmp#* }"
27173
27174  # Input might be given as Windows format, start by converting to
27175  # unix format.
27176  new_path="$path"
27177
27178  windows_path="$new_path"
27179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27180    unix_path=`$CYGPATH -u "$windows_path"`
27181    new_path="$unix_path"
27182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27184    new_path="$unix_path"
27185  fi
27186
27187
27188  # Now try to locate executable using which
27189  new_path=`$WHICH "$new_path" 2> /dev/null`
27190
27191  if test "x$new_path" = x; then
27192    # Oops. Which didn't find the executable.
27193    # The splitting of arguments from the executable at a space might have been incorrect,
27194    # since paths with space are more likely in Windows. Give it another try with the whole
27195    # argument.
27196    path="$complete"
27197    arguments="EOL"
27198    new_path="$path"
27199
27200  windows_path="$new_path"
27201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27202    unix_path=`$CYGPATH -u "$windows_path"`
27203    new_path="$unix_path"
27204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27206    new_path="$unix_path"
27207  fi
27208
27209
27210    new_path=`$WHICH "$new_path" 2> /dev/null`
27211
27212    if test "x$new_path" = x; then
27213      # It's still not found. Now this is an unrecoverable error.
27214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27215$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27216      has_space=`$ECHO "$complete" | $GREP " "`
27217      if test "x$has_space" != x; then
27218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27220      fi
27221      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27222    fi
27223  fi
27224
27225  # Now new_path has a complete unix path to the binary
27226  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27227    # Keep paths in /bin as-is, but remove trailing .exe if any
27228    new_path="${new_path/%.exe/}"
27229    # Do not save /bin paths to all_fixpath_prefixes!
27230  else
27231    # Not in mixed or Windows style, start by that.
27232    new_path=`cmd //c echo $new_path`
27233
27234  input_path="$new_path"
27235  # Check if we need to convert this using DOS-style short mode. If the path
27236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27237  # take no chances and rewrite it.
27238  # Note: m4 eats our [], so we need to use [ and ] instead.
27239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27240  if test "x$has_forbidden_chars" != x; then
27241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27243  fi
27244
27245    # Output is in $new_path
27246
27247  windows_path="$new_path"
27248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27249    unix_path=`$CYGPATH -u "$windows_path"`
27250    new_path="$unix_path"
27251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27253    new_path="$unix_path"
27254  fi
27255
27256    # remove trailing .exe if any
27257    new_path="${new_path/%.exe/}"
27258
27259    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27260    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27261  fi
27262
27263  else
27264    # We're on a posix platform. Hooray! :)
27265    # First separate the path from the arguments. This will split at the first
27266    # space.
27267    complete="$LIPO"
27268    path="${complete%% *}"
27269    tmp="$complete EOL"
27270    arguments="${tmp#* }"
27271
27272    # Cannot rely on the command "which" here since it doesn't always work.
27273    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27274    if test -z "$is_absolute_path"; then
27275      # Path to executable is not absolute. Find it.
27276      IFS_save="$IFS"
27277      IFS=:
27278      for p in $PATH; do
27279        if test -f "$p/$path" && test -x "$p/$path"; then
27280          new_path="$p/$path"
27281          break
27282        fi
27283      done
27284      IFS="$IFS_save"
27285    else
27286      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27287$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27288      new_path="$path"
27289    fi
27290
27291    if test "x$new_path" = x; then
27292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27293$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27294        has_space=`$ECHO "$complete" | $GREP " "`
27295        if test "x$has_space" != x; then
27296          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27297$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27298        fi
27299        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27300      fi
27301  fi
27302
27303      # Now join together the path and the arguments once again
27304      if test "x$arguments" != xEOL; then
27305        new_complete="$new_path ${arguments% *}"
27306      else
27307        new_complete="$new_path"
27308      fi
27309
27310  if test "x$complete" != "x$new_complete"; then
27311      LIPO="$new_complete"
27312      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27313$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27314    fi
27315
27316fi
27317
27318# Restore old path without tools dir
27319PATH="$OLD_PATH"
27320
27321
27322# FIXME: Currently we must test this after paths but before flags. Fix!
27323
27324# And we can test some aspects on the target using configure macros.
27325
27326
27327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27328$as_echo_n "checking for ANSI C header files... " >&6; }
27329if ${ac_cv_header_stdc+:} false; then :
27330  $as_echo_n "(cached) " >&6
27331else
27332  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27333/* end confdefs.h.  */
27334#include <stdlib.h>
27335#include <stdarg.h>
27336#include <string.h>
27337#include <float.h>
27338
27339int
27340main ()
27341{
27342
27343  ;
27344  return 0;
27345}
27346_ACEOF
27347if ac_fn_cxx_try_compile "$LINENO"; then :
27348  ac_cv_header_stdc=yes
27349else
27350  ac_cv_header_stdc=no
27351fi
27352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27353
27354if test $ac_cv_header_stdc = yes; then
27355  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27357/* end confdefs.h.  */
27358#include <string.h>
27359
27360_ACEOF
27361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27362  $EGREP "memchr" >/dev/null 2>&1; then :
27363
27364else
27365  ac_cv_header_stdc=no
27366fi
27367rm -f conftest*
27368
27369fi
27370
27371if test $ac_cv_header_stdc = yes; then
27372  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27373  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27374/* end confdefs.h.  */
27375#include <stdlib.h>
27376
27377_ACEOF
27378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27379  $EGREP "free" >/dev/null 2>&1; then :
27380
27381else
27382  ac_cv_header_stdc=no
27383fi
27384rm -f conftest*
27385
27386fi
27387
27388if test $ac_cv_header_stdc = yes; then
27389  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27390  if test "$cross_compiling" = yes; then :
27391  :
27392else
27393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27394/* end confdefs.h.  */
27395#include <ctype.h>
27396#include <stdlib.h>
27397#if ((' ' & 0x0FF) == 0x020)
27398# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27399# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27400#else
27401# define ISLOWER(c) \
27402		   (('a' <= (c) && (c) <= 'i') \
27403		     || ('j' <= (c) && (c) <= 'r') \
27404		     || ('s' <= (c) && (c) <= 'z'))
27405# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27406#endif
27407
27408#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27409int
27410main ()
27411{
27412  int i;
27413  for (i = 0; i < 256; i++)
27414    if (XOR (islower (i), ISLOWER (i))
27415	|| toupper (i) != TOUPPER (i))
27416      return 2;
27417  return 0;
27418}
27419_ACEOF
27420if ac_fn_cxx_try_run "$LINENO"; then :
27421
27422else
27423  ac_cv_header_stdc=no
27424fi
27425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27426  conftest.$ac_objext conftest.beam conftest.$ac_ext
27427fi
27428
27429fi
27430fi
27431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27432$as_echo "$ac_cv_header_stdc" >&6; }
27433if test $ac_cv_header_stdc = yes; then
27434
27435$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27436
27437fi
27438
27439# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27440for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27441		  inttypes.h stdint.h unistd.h
27442do :
27443  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27444ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27445"
27446if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27447  cat >>confdefs.h <<_ACEOF
27448#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27449_ACEOF
27450
27451fi
27452
27453done
27454
27455
27456
27457###############################################################################
27458#
27459# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27460# (The JVM can use 32 or 64 bit Java pointers but that decision
27461# is made at runtime.)
27462#
27463if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27464  # Always specify -m flags on Solaris
27465
27466  # keep track of c/cxx flags that we added outselves...
27467  #   to prevent emitting warning...
27468  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27469  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27470  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27471
27472  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27473  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27474  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27475
27476  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27477  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27478  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27479
27480elif test "x$COMPILE_TYPE" = xreduced; then
27481  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27482    # Specify -m if running reduced on other Posix platforms
27483
27484  # keep track of c/cxx flags that we added outselves...
27485  #   to prevent emitting warning...
27486  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27487  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27488  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27489
27490  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27491  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27492  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27493
27494  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27495  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27496  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27497
27498  fi
27499fi
27500
27501# Make compilation sanity check
27502for ac_header in stdio.h
27503do :
27504  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27505if test "x$ac_cv_header_stdio_h" = xyes; then :
27506  cat >>confdefs.h <<_ACEOF
27507#define HAVE_STDIO_H 1
27508_ACEOF
27509
27510else
27511
27512  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27513$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27514  if test "x$COMPILE_TYPE" = xreduced; then
27515    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27516$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27517  elif test "x$COMPILE_TYPE" = xcross; then
27518    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27519$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27520  fi
27521  as_fn_error $? "Cannot continue." "$LINENO" 5
27522
27523fi
27524
27525done
27526
27527
27528# The cast to long int works around a bug in the HP C Compiler
27529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27531# This bug is HP SR number 8606223364.
27532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27533$as_echo_n "checking size of int *... " >&6; }
27534if ${ac_cv_sizeof_int_p+:} false; then :
27535  $as_echo_n "(cached) " >&6
27536else
27537  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27538
27539else
27540  if test "$ac_cv_type_int_p" = yes; then
27541     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27543as_fn_error 77 "cannot compute sizeof (int *)
27544See \`config.log' for more details" "$LINENO" 5; }
27545   else
27546     ac_cv_sizeof_int_p=0
27547   fi
27548fi
27549
27550fi
27551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27552$as_echo "$ac_cv_sizeof_int_p" >&6; }
27553
27554
27555
27556cat >>confdefs.h <<_ACEOF
27557#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27558_ACEOF
27559
27560
27561
27562if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27563  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27564  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27565fi
27566
27567if test "x$SIZEOF_INT_P" = x; then
27568    # The test failed, lets stick to the assumed value.
27569    { $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
27570$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27571else
27572    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27573
27574    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27575        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
27576    fi
27577fi
27578
27579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27580$as_echo_n "checking for target address size... " >&6; }
27581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27582$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27583
27584
27585###############################################################################
27586#
27587# Is the target little of big endian?
27588#
27589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27590$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27591if ${ac_cv_c_bigendian+:} false; then :
27592  $as_echo_n "(cached) " >&6
27593else
27594  ac_cv_c_bigendian=unknown
27595    # See if we're dealing with a universal compiler.
27596    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27597/* end confdefs.h.  */
27598#ifndef __APPLE_CC__
27599	       not a universal capable compiler
27600	     #endif
27601	     typedef int dummy;
27602
27603_ACEOF
27604if ac_fn_cxx_try_compile "$LINENO"; then :
27605
27606	# Check for potential -arch flags.  It is not universal unless
27607	# there are at least two -arch flags with different values.
27608	ac_arch=
27609	ac_prev=
27610	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27611	 if test -n "$ac_prev"; then
27612	   case $ac_word in
27613	     i?86 | x86_64 | ppc | ppc64)
27614	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27615		 ac_arch=$ac_word
27616	       else
27617		 ac_cv_c_bigendian=universal
27618		 break
27619	       fi
27620	       ;;
27621	   esac
27622	   ac_prev=
27623	 elif test "x$ac_word" = "x-arch"; then
27624	   ac_prev=arch
27625	 fi
27626       done
27627fi
27628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27629    if test $ac_cv_c_bigendian = unknown; then
27630      # See if sys/param.h defines the BYTE_ORDER macro.
27631      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27632/* end confdefs.h.  */
27633#include <sys/types.h>
27634	     #include <sys/param.h>
27635
27636int
27637main ()
27638{
27639#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27640		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27641		     && LITTLE_ENDIAN)
27642	      bogus endian macros
27643	     #endif
27644
27645  ;
27646  return 0;
27647}
27648_ACEOF
27649if ac_fn_cxx_try_compile "$LINENO"; then :
27650  # It does; now see whether it defined to BIG_ENDIAN or not.
27651	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27652/* end confdefs.h.  */
27653#include <sys/types.h>
27654		#include <sys/param.h>
27655
27656int
27657main ()
27658{
27659#if BYTE_ORDER != BIG_ENDIAN
27660		 not big endian
27661		#endif
27662
27663  ;
27664  return 0;
27665}
27666_ACEOF
27667if ac_fn_cxx_try_compile "$LINENO"; then :
27668  ac_cv_c_bigendian=yes
27669else
27670  ac_cv_c_bigendian=no
27671fi
27672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27673fi
27674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27675    fi
27676    if test $ac_cv_c_bigendian = unknown; then
27677      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27678      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27679/* end confdefs.h.  */
27680#include <limits.h>
27681
27682int
27683main ()
27684{
27685#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27686	      bogus endian macros
27687	     #endif
27688
27689  ;
27690  return 0;
27691}
27692_ACEOF
27693if ac_fn_cxx_try_compile "$LINENO"; then :
27694  # It does; now see whether it defined to _BIG_ENDIAN or not.
27695	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27696/* end confdefs.h.  */
27697#include <limits.h>
27698
27699int
27700main ()
27701{
27702#ifndef _BIG_ENDIAN
27703		 not big endian
27704		#endif
27705
27706  ;
27707  return 0;
27708}
27709_ACEOF
27710if ac_fn_cxx_try_compile "$LINENO"; then :
27711  ac_cv_c_bigendian=yes
27712else
27713  ac_cv_c_bigendian=no
27714fi
27715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27716fi
27717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27718    fi
27719    if test $ac_cv_c_bigendian = unknown; then
27720      # Compile a test program.
27721      if test "$cross_compiling" = yes; then :
27722  # Try to guess by grepping values from an object file.
27723	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27724/* end confdefs.h.  */
27725short int ascii_mm[] =
27726		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27727		short int ascii_ii[] =
27728		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27729		int use_ascii (int i) {
27730		  return ascii_mm[i] + ascii_ii[i];
27731		}
27732		short int ebcdic_ii[] =
27733		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27734		short int ebcdic_mm[] =
27735		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27736		int use_ebcdic (int i) {
27737		  return ebcdic_mm[i] + ebcdic_ii[i];
27738		}
27739		extern int foo;
27740
27741int
27742main ()
27743{
27744return use_ascii (foo) == use_ebcdic (foo);
27745  ;
27746  return 0;
27747}
27748_ACEOF
27749if ac_fn_cxx_try_compile "$LINENO"; then :
27750  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27751	      ac_cv_c_bigendian=yes
27752	    fi
27753	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27754	      if test "$ac_cv_c_bigendian" = unknown; then
27755		ac_cv_c_bigendian=no
27756	      else
27757		# finding both strings is unlikely to happen, but who knows?
27758		ac_cv_c_bigendian=unknown
27759	      fi
27760	    fi
27761fi
27762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27763else
27764  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27765/* end confdefs.h.  */
27766$ac_includes_default
27767int
27768main ()
27769{
27770
27771	     /* Are we little or big endian?  From Harbison&Steele.  */
27772	     union
27773	     {
27774	       long int l;
27775	       char c[sizeof (long int)];
27776	     } u;
27777	     u.l = 1;
27778	     return u.c[sizeof (long int) - 1] == 1;
27779
27780  ;
27781  return 0;
27782}
27783_ACEOF
27784if ac_fn_cxx_try_run "$LINENO"; then :
27785  ac_cv_c_bigendian=no
27786else
27787  ac_cv_c_bigendian=yes
27788fi
27789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27790  conftest.$ac_objext conftest.beam conftest.$ac_ext
27791fi
27792
27793    fi
27794fi
27795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27796$as_echo "$ac_cv_c_bigendian" >&6; }
27797 case $ac_cv_c_bigendian in #(
27798   yes)
27799     ENDIAN="big";; #(
27800   no)
27801     ENDIAN="little" ;; #(
27802   universal)
27803     ENDIAN="universal_endianness"
27804     ;; #(
27805   *)
27806     ENDIAN="unknown" ;;
27807 esac
27808
27809
27810if test "x$ENDIAN" = xuniversal_endianness; then
27811    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27812fi
27813if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27814    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
27815fi
27816
27817
27818# Configure flags for the tools
27819
27820
27821###############################################################################
27822#
27823# How to compile shared libraries.
27824#
27825
27826if test "x$GCC" = xyes; then
27827    COMPILER_NAME=gcc
27828    PICFLAG="-fPIC"
27829    LIBRARY_PREFIX=lib
27830    SHARED_LIBRARY='lib$1.so'
27831    STATIC_LIBRARY='lib$1.a'
27832    SHARED_LIBRARY_FLAGS="-shared"
27833    SHARED_LIBRARY_SUFFIX='.so'
27834    STATIC_LIBRARY_SUFFIX='.a'
27835    OBJ_SUFFIX='.o'
27836    EXE_SUFFIX=''
27837    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27838    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27839    C_FLAG_REORDER=''
27840    CXX_FLAG_REORDER=''
27841    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27842    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27843    LD="$CC"
27844    LDEXE="$CC"
27845    LDCXX="$CXX"
27846    LDEXECXX="$CXX"
27847    POST_STRIP_CMD="$STRIP -g"
27848
27849    # Linking is different on MacOSX
27850    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27851        # Might change in the future to clang.
27852        COMPILER_NAME=gcc
27853        SHARED_LIBRARY='lib$1.dylib'
27854        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27855        SHARED_LIBRARY_SUFFIX='.dylib'
27856        EXE_SUFFIX=''
27857        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27858        SET_SHARED_LIBRARY_MAPFILE=''
27859        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27860        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27861        POST_STRIP_CMD="$STRIP -S"
27862    fi
27863else
27864    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27865        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27866        COMPILER_NAME=ossc
27867        PICFLAG="-KPIC"
27868        LIBRARY_PREFIX=lib
27869        SHARED_LIBRARY='lib$1.so'
27870        STATIC_LIBRARY='lib$1.a'
27871        SHARED_LIBRARY_FLAGS="-G"
27872        SHARED_LIBRARY_SUFFIX='.so'
27873        STATIC_LIBRARY_SUFFIX='.a'
27874        OBJ_SUFFIX='.o'
27875        EXE_SUFFIX=''
27876        SET_SHARED_LIBRARY_NAME=''
27877        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27878	C_FLAG_REORDER='-xF'
27879	CXX_FLAG_REORDER='-xF'
27880        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27881        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27882        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27883        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27884        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27885        POST_STRIP_CMD="$STRIP -x"
27886        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27887    fi
27888    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27889        # If it is not gcc, then assume it is the MS Visual Studio compiler
27890        COMPILER_NAME=cl
27891        PICFLAG=""
27892        LIBRARY_PREFIX=
27893        SHARED_LIBRARY='$1.dll'
27894        STATIC_LIBRARY='$1.lib'
27895        SHARED_LIBRARY_FLAGS="-LD"
27896        SHARED_LIBRARY_SUFFIX='.dll'
27897        STATIC_LIBRARY_SUFFIX='.lib'
27898        OBJ_SUFFIX='.obj'
27899        EXE_SUFFIX='.exe'
27900        SET_SHARED_LIBRARY_NAME=''
27901        SET_SHARED_LIBRARY_MAPFILE=''
27902        SET_SHARED_LIBRARY_ORIGIN=''
27903        SET_EXECUTABLE_ORIGIN=''
27904    fi
27905fi
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924# The (cross) compiler is now configured, we can now test capabilities
27925# of the target platform.
27926
27927
27928
27929###############################################################################
27930#
27931# Setup the opt flags for different compilers
27932# and different operating systems.
27933#
27934
27935#
27936# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27937#
27938if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27939    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27940    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27941    CFLAGS="$CFLAGS -mstackrealign"
27942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27943$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27944    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27945/* end confdefs.h.  */
27946int main() { return 0; }
27947_ACEOF
27948if ac_fn_cxx_try_link "$LINENO"; then :
27949
27950		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27951$as_echo "yes" >&6; }
27952
27953else
27954
27955		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27956$as_echo "no" >&6; }
27957	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27958
27959fi
27960rm -f core conftest.err conftest.$ac_objext \
27961    conftest$ac_exeext conftest.$ac_ext
27962fi
27963
27964C_FLAG_DEPS="-MMD -MF"
27965CXX_FLAG_DEPS="-MMD -MF"
27966
27967case $COMPILER_TYPE in
27968  CC )
27969    D_FLAG="-g"
27970    case $COMPILER_NAME in
27971      gcc )
27972      	case $OPENJDK_TARGET_OS in
27973	  macosx )
27974	    # On MacOSX we optimize for size, something
27975	    # we should do for all platforms?
27976	    C_O_FLAG_HI="-Os"
27977	    C_O_FLAG_NORM="-Os"
27978	    C_O_FLAG_NONE=""
27979	    ;;
27980	  *)
27981	    C_O_FLAG_HI="-O3"
27982	    C_O_FLAG_NORM="-O2"
27983	    C_O_FLAG_NONE="-O0"
27984	    CFLAGS_DEBUG_SYMBOLS="-g"
27985	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27986	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27987	       CFLAGS_DEBUG_SYMBOLS="-g1"
27988	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27989	    fi
27990	    ;;
27991	esac
27992        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27993        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27994        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27995        ;;
27996      ossc )
27997        #
27998        # Forte has different names for this with their C++ compiler...
27999        #
28000        C_FLAG_DEPS="-xMMD -xMF"
28001        CXX_FLAG_DEPS="-xMMD -xMF"
28002
28003        # Extra options used with HIGHEST
28004        #
28005        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28006        #          done with care, there are some assumptions below that need to
28007        #          be understood about the use of pointers, and IEEE behavior.
28008        #
28009        # Use non-standard floating point mode (not IEEE 754)
28010        CC_HIGHEST="$CC_HIGHEST -fns"
28011        # Do some simplification of floating point arithmetic (not IEEE 754)
28012        CC_HIGHEST="$CC_HIGHEST -fsimple"
28013        # Use single precision floating point with 'float'
28014        CC_HIGHEST="$CC_HIGHEST -fsingle"
28015        # Assume memory references via basic pointer types do not alias
28016        #   (Source with excessing pointer casting and data access with mixed
28017        #    pointer types are not recommended)
28018        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28019        # Use intrinsic or inline versions for math/std functions
28020        #   (If you expect perfect errno behavior, do not use this)
28021        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28022        # Loop data dependency optimizations (need -xO3 or higher)
28023        CC_HIGHEST="$CC_HIGHEST -xdepend"
28024        # Pointer parameters to functions do not overlap
28025        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28026        #    If you pass in multiple pointers to the same data, do not use this)
28027        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28028        # Inline some library routines
28029        #   (If you expect perfect errno behavior, do not use this)
28030        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28031        # Use optimized math routines
28032        #   (If you expect perfect errno behavior, do not use this)
28033        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28034        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28035
28036        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28037          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28038          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28039        fi
28040
28041        case $OPENJDK_TARGET_CPU_ARCH in
28042          x86)
28043            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28044            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28045            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28046            C_O_FLAG_NONE="-xregs=no%frameptr"
28047            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28048            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28049            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28050            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28051            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28052               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28053               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28054            fi
28055            ;;
28056          sparc)
28057            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28058            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28059            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28060            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28061            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28062            C_O_FLAG_NONE=""
28063            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28064            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28065            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28066            CXX_O_FLAG_NONE=""
28067            ;;
28068        esac
28069
28070    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28071    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28072    esac
28073    ;;
28074  CL )
28075    D_FLAG=
28076    C_O_FLAG_HIGHEST="-O2"
28077    C_O_FLAG_HI="-O1"
28078    C_O_FLAG_NORM="-O1"
28079    C_O_FLAG_NONE="-Od"
28080    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28081    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28082    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28083    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28084    ;;
28085esac
28086
28087if test -z "$C_O_FLAG_HIGHEST"; then
28088   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28089fi
28090
28091if test -z "$CXX_O_FLAG_HIGHEST"; then
28092   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28093fi
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28109   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28110$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28111fi
28112
28113if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28114   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28115$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28116fi
28117
28118if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28119   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28120$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28121fi
28122
28123
28124# Check whether --with-extra-cflags was given.
28125if test "${with_extra_cflags+set}" = set; then :
28126  withval=$with_extra_cflags;
28127fi
28128
28129
28130
28131# Check whether --with-extra-cxxflags was given.
28132if test "${with_extra_cxxflags+set}" = set; then :
28133  withval=$with_extra_cxxflags;
28134fi
28135
28136
28137
28138# Check whether --with-extra-ldflags was given.
28139if test "${with_extra_ldflags+set}" = set; then :
28140  withval=$with_extra_ldflags;
28141fi
28142
28143
28144CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28145CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28146LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28147
28148# Hotspot needs these set in their legacy form
28149LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28150LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28151LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28152
28153
28154
28155
28156
28157###############################################################################
28158#
28159# Now setup the CFLAGS and LDFLAGS for the JDK build.
28160# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28161#
28162case $COMPILER_NAME in
28163      gcc )
28164      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28165                          -pipe \
28166                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28167	  case $OPENJDK_TARGET_CPU_ARCH in
28168	  arm )
28169            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28170	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28171	  ;;
28172	  ppc )
28173            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28174	  ;;
28175	  * )
28176	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28177	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28178          ;;
28179	  esac
28180          ;;
28181      ossc )
28182          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28183          case $OPENJDK_TARGET_CPU_ARCH in
28184          x86 )
28185            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28186       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28187          ;;
28188          esac
28189
28190      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28191      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28192
28193          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28194          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28195          ;;
28196      cl )
28197          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28198               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28199	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28200	       -DWIN32 -DIAL"
28201          case $OPENJDK_TARGET_CPU in
28202              x86 )
28203                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28204                  ;;
28205              x86_64 )
28206                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28207                  ;;
28208          esac
28209          ;;
28210esac
28211
28212###############################################################################
28213
28214CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28215
28216# The package path is used only on macosx?
28217PACKAGE_PATH=/opt/local
28218
28219
28220if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28221    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28222    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28223    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28224    #   Note: -Dmacro         is the same as    #define macro 1
28225    #         -Dmacro=	    is the same as    #define macro
28226    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28227        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28228    else
28229        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28230    fi
28231else
28232    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28233fi
28234if test "x$OPENJDK_TARGET_OS" = xlinux; then
28235    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28236fi
28237if test "x$OPENJDK_TARGET_OS" = xwindows; then
28238    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28239fi
28240if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28241    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28242fi
28243if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28244    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28245    # Adding these macros will make it an error to link to mac APIs newer than OS version 10.7
28246    MACOSX_REQUIRED_VERSION=1070
28247
28248    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(MACOSX_REQUIRED_VERSION) -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(MACOSX_REQUIRED_VERSION)"
28249fi
28250if test "x$OPENJDK_TARGET_OS" = xbsd; then
28251    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28252fi
28253if test "x$DEBUG_LEVEL" = xrelease; then
28254    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28255    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28256        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28257    fi
28258else
28259    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28260fi
28261
28262CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28263CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28264
28265CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28266        -I${JDK_OUTPUTDIR}/include \
28267        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28268        -I${JDK_TOPDIR}/src/share/javavm/export \
28269        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28270        -I${JDK_TOPDIR}/src/share/native/common \
28271        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28272
28273# The shared libraries are compiled using the picflag.
28274CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28275CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28276
28277# Executable flags
28278CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28279CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28280
28281# Now this is odd. The JDK native libraries have to link against libjvm.so
28282# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28283# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28284# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28285# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28286# libraries will link to whatever is in memory. Yuck.
28287#
28288# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28289if test "x$COMPILER_NAME" = xcl; then
28290    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28291    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28292        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28293    fi
28294    # TODO: make -debug optional "--disable-full-debug-symbols"
28295    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28296    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28297    LDFLAGS_JDKLIB_SUFFIX=""
28298    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28299        LDFLAGS_STACK_SIZE=1048576
28300    else
28301        LDFLAGS_STACK_SIZE=327680
28302    fi
28303    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28304else
28305    if test "x$COMPILER_NAME" = xgcc; then
28306        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28307        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28308        if test -n "$HAS_GNU_HASH"; then
28309            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28310        fi
28311        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28312          # And since we now know that the linker is gnu, then add -z defs, to forbid
28313          # undefined symbols in object files.
28314          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28315          if test "x$DEBUG_LEVEL" = "xrelease"; then
28316              # When building release libraries, tell the linker optimize them.
28317              # Should this be supplied to the OSS linker as well?
28318              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28319          fi
28320        fi
28321    fi
28322    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28323                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28324
28325    # On some platforms (mac) the linker warns about non existing -L dirs.
28326    # Add server first if available. Linking aginst client does not always produce the same results.
28327    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28328    # Default to server for other variants.
28329    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28330        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28331    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28332        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28333    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28334        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28335    else
28336        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28337    fi
28338
28339    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28340    if test "x$COMPILER_NAME" = xossc; then
28341        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28342    fi
28343
28344    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28345    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28346        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28347    fi
28348fi
28349
28350# Adjust flags according to debug level.
28351case $DEBUG_LEVEL in
28352      fastdebug )
28353              CFLAGS="$CFLAGS $D_FLAG"
28354              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28355              ;;
28356      slowdebug )
28357              CFLAGS="$CFLAGS $D_FLAG"
28358	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28359	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28360	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28361	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28362              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28363              ;;
28364esac
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380# Setup debug symbols (need objcopy from the toolchain for that)
28381
28382#
28383# ENABLE_DEBUG_SYMBOLS
28384# This must be done after the toolchain is setup, since we're looking at objcopy.
28385#
28386# Check whether --enable-debug-symbols was given.
28387if test "${enable_debug_symbols+set}" = set; then :
28388  enableval=$enable_debug_symbols;
28389fi
28390
28391
28392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28393$as_echo_n "checking if we should generate debug symbols... " >&6; }
28394
28395if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28396   # explicit enabling of enable-debug-symbols and can't find objcopy
28397   #   this is an error
28398   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28399fi
28400
28401if test "x$enable_debug_symbols" = "xyes"; then
28402  ENABLE_DEBUG_SYMBOLS=true
28403elif test "x$enable_debug_symbols" = "xno"; then
28404  ENABLE_DEBUG_SYMBOLS=false
28405else
28406  # default on macosx is false
28407  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28408    ENABLE_DEBUG_SYMBOLS=false
28409  # Default is on if objcopy is found, otherwise off
28410  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28411    ENABLE_DEBUG_SYMBOLS=true
28412  else
28413    ENABLE_DEBUG_SYMBOLS=false
28414  fi
28415fi
28416
28417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28418$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28419
28420#
28421# ZIP_DEBUGINFO_FILES
28422#
28423# Check whether --enable-zip-debug-info was given.
28424if test "${enable_zip_debug_info+set}" = set; then :
28425  enableval=$enable_zip_debug_info;
28426fi
28427
28428
28429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28430$as_echo_n "checking if we should zip debug-info files... " >&6; }
28431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28432$as_echo "${enable_zip_debug_info}" >&6; }
28433
28434if test "x${enable_zip_debug_info}" = "xno"; then
28435   ZIP_DEBUGINFO_FILES=false
28436else
28437   ZIP_DEBUGINFO_FILES=true
28438fi
28439
28440
28441
28442
28443
28444
28445
28446###############################################################################
28447#
28448# Check dependencies for external and internal libraries.
28449#
28450###############################################################################
28451
28452
28453
28454###############################################################################
28455#
28456# OS specific settings that we never will need to probe.
28457#
28458if test "x$OPENJDK_TARGET_OS" = xlinux; then
28459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28460$as_echo_n "checking what is not needed on Linux?... " >&6; }
28461    PULSE_NOT_NEEDED=yes
28462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28463$as_echo "pulse" >&6; }
28464fi
28465
28466if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28468$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28469    ALSA_NOT_NEEDED=yes
28470    PULSE_NOT_NEEDED=yes
28471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28472$as_echo "alsa pulse" >&6; }
28473fi
28474
28475if test "x$OPENJDK_TARGET_OS" = xwindows; then
28476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28477$as_echo_n "checking what is not needed on Windows?... " >&6; }
28478    CUPS_NOT_NEEDED=yes
28479    ALSA_NOT_NEEDED=yes
28480    PULSE_NOT_NEEDED=yes
28481    X11_NOT_NEEDED=yes
28482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28483$as_echo "alsa cups pulse x11" >&6; }
28484fi
28485
28486if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28488$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28489    ALSA_NOT_NEEDED=yes
28490    PULSE_NOT_NEEDED=yes
28491    X11_NOT_NEEDED=yes
28492    FREETYPE2_NOT_NEEDED=yes
28493    # If the java runtime framework is disabled, then we need X11.
28494    # This will be adjusted below.
28495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28496$as_echo "alsa pulse x11" >&6; }
28497fi
28498
28499if test "x$OPENJDK_TARGET_OS" = xbsd; then
28500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28501$as_echo_n "checking what is not needed on bsd?... " >&6; }
28502    ALSA_NOT_NEEDED=yes
28503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28504$as_echo "alsa" >&6; }
28505fi
28506
28507if test "x$OPENJDK" = "xfalse"; then
28508    FREETYPE2_NOT_NEEDED=yes
28509fi
28510
28511if test "x$SUPPORT_HEADFUL" = xno; then
28512    X11_NOT_NEEDED=yes
28513fi
28514
28515###############################################################################
28516#
28517# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28518# that uses this API.
28519#
28520# Check whether --enable-macosx-runtime-support was given.
28521if test "${enable_macosx_runtime_support+set}" = set; then :
28522  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28523else
28524  MACOSX_RUNTIME_SUPPORT="no"
28525fi
28526
28527
28528USE_MACOSX_RUNTIME_SUPPORT=no
28529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28530$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28531if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28532    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28533        MACOSX_RUNTIME_SUPPORT=yes
28534        USE_MACOSX_RUNTIME_SUPPORT=yes
28535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28536$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28537    else
28538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28539$as_echo "yes, but explicitly disabled." >&6; }
28540    fi
28541else
28542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28543$as_echo "no" >&6; }
28544fi
28545
28546if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28547    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28548$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28549    X11_NOT_NEEDED=
28550    FREETYPE2_NOT_NEEDED=
28551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28552$as_echo "alsa pulse" >&6; }
28553fi
28554
28555
28556
28557
28558###############################################################################
28559#
28560# Check for X Windows
28561#
28562
28563# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28564# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28565# --x-libraries for the sysroot, if that seems to be correct.
28566if test "x$SYS_ROOT" != "x/"; then
28567  if test "x$x_includes" = xNONE; then
28568    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28569      x_includes="$SYS_ROOT/usr/X11R6/include"
28570    fi
28571  fi
28572  if test "x$x_libraries" = xNONE; then
28573    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28574      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28575    fi
28576  fi
28577fi
28578
28579# Now let autoconf do it's magic
28580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28581$as_echo_n "checking for X... " >&6; }
28582
28583
28584# Check whether --with-x was given.
28585if test "${with_x+set}" = set; then :
28586  withval=$with_x;
28587fi
28588
28589# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28590if test "x$with_x" = xno; then
28591  # The user explicitly disabled X.
28592  have_x=disabled
28593else
28594  case $x_includes,$x_libraries in #(
28595    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
28596    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
28597  $as_echo_n "(cached) " >&6
28598else
28599  # One or both of the vars are not set, and there is no cached value.
28600ac_x_includes=no ac_x_libraries=no
28601rm -f -r conftest.dir
28602if mkdir conftest.dir; then
28603  cd conftest.dir
28604  cat >Imakefile <<'_ACEOF'
28605incroot:
28606	@echo incroot='${INCROOT}'
28607usrlibdir:
28608	@echo usrlibdir='${USRLIBDIR}'
28609libdir:
28610	@echo libdir='${LIBDIR}'
28611_ACEOF
28612  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28613    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28614    for ac_var in incroot usrlibdir libdir; do
28615      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28616    done
28617    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28618    for ac_extension in a so sl dylib la dll; do
28619      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28620	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28621	ac_im_usrlibdir=$ac_im_libdir; break
28622      fi
28623    done
28624    # Screen out bogus values from the imake configuration.  They are
28625    # bogus both because they are the default anyway, and because
28626    # using them would break gcc on systems where it needs fixed includes.
28627    case $ac_im_incroot in
28628	/usr/include) ac_x_includes= ;;
28629	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28630    esac
28631    case $ac_im_usrlibdir in
28632	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28633	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28634    esac
28635  fi
28636  cd ..
28637  rm -f -r conftest.dir
28638fi
28639
28640# Standard set of common directories for X headers.
28641# Check X11 before X11Rn because it is often a symlink to the current release.
28642ac_x_header_dirs='
28643/usr/X11/include
28644/usr/X11R7/include
28645/usr/X11R6/include
28646/usr/X11R5/include
28647/usr/X11R4/include
28648
28649/usr/include/X11
28650/usr/include/X11R7
28651/usr/include/X11R6
28652/usr/include/X11R5
28653/usr/include/X11R4
28654
28655/usr/local/X11/include
28656/usr/local/X11R7/include
28657/usr/local/X11R6/include
28658/usr/local/X11R5/include
28659/usr/local/X11R4/include
28660
28661/usr/local/include/X11
28662/usr/local/include/X11R7
28663/usr/local/include/X11R6
28664/usr/local/include/X11R5
28665/usr/local/include/X11R4
28666
28667/usr/X386/include
28668/usr/x386/include
28669/usr/XFree86/include/X11
28670
28671/usr/include
28672/usr/local/include
28673/usr/unsupported/include
28674/usr/athena/include
28675/usr/local/x11r5/include
28676/usr/lpp/Xamples/include
28677
28678/usr/openwin/include
28679/usr/openwin/share/include'
28680
28681if test "$ac_x_includes" = no; then
28682  # Guess where to find include files, by looking for Xlib.h.
28683  # First, try using that file with no special directory specified.
28684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28685/* end confdefs.h.  */
28686#include <X11/Xlib.h>
28687_ACEOF
28688if ac_fn_cxx_try_cpp "$LINENO"; then :
28689  # We can compile using X headers with no special include directory.
28690ac_x_includes=
28691else
28692  for ac_dir in $ac_x_header_dirs; do
28693  if test -r "$ac_dir/X11/Xlib.h"; then
28694    ac_x_includes=$ac_dir
28695    break
28696  fi
28697done
28698fi
28699rm -f conftest.err conftest.i conftest.$ac_ext
28700fi # $ac_x_includes = no
28701
28702if test "$ac_x_libraries" = no; then
28703  # Check for the libraries.
28704  # See if we find them without any special options.
28705  # Don't add to $LIBS permanently.
28706  ac_save_LIBS=$LIBS
28707  LIBS="-lX11 $LIBS"
28708  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28709/* end confdefs.h.  */
28710#include <X11/Xlib.h>
28711int
28712main ()
28713{
28714XrmInitialize ()
28715  ;
28716  return 0;
28717}
28718_ACEOF
28719if ac_fn_cxx_try_link "$LINENO"; then :
28720  LIBS=$ac_save_LIBS
28721# We can link X programs with no special library path.
28722ac_x_libraries=
28723else
28724  LIBS=$ac_save_LIBS
28725for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28726do
28727  # Don't even attempt the hair of trying to link an X program!
28728  for ac_extension in a so sl dylib la dll; do
28729    if test -r "$ac_dir/libX11.$ac_extension"; then
28730      ac_x_libraries=$ac_dir
28731      break 2
28732    fi
28733  done
28734done
28735fi
28736rm -f core conftest.err conftest.$ac_objext \
28737    conftest$ac_exeext conftest.$ac_ext
28738fi # $ac_x_libraries = no
28739
28740case $ac_x_includes,$ac_x_libraries in #(
28741  no,* | *,no | *\'*)
28742    # Didn't find X, or a directory has "'" in its name.
28743    ac_cv_have_x="have_x=no";; #(
28744  *)
28745    # Record where we found X for the cache.
28746    ac_cv_have_x="have_x=yes\
28747	ac_x_includes='$ac_x_includes'\
28748	ac_x_libraries='$ac_x_libraries'"
28749esac
28750fi
28751;; #(
28752    *) have_x=yes;;
28753  esac
28754  eval "$ac_cv_have_x"
28755fi # $with_x != no
28756
28757if test "$have_x" != yes; then
28758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28759$as_echo "$have_x" >&6; }
28760  no_x=yes
28761else
28762  # If each of the values was on the command line, it overrides each guess.
28763  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28764  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28765  # Update the cache value to reflect the command line values.
28766  ac_cv_have_x="have_x=yes\
28767	ac_x_includes='$x_includes'\
28768	ac_x_libraries='$x_libraries'"
28769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28770$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28771fi
28772
28773if test "$no_x" = yes; then
28774  # Not all programs may use this symbol, but it does not hurt to define it.
28775
28776$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28777
28778  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28779else
28780  if test -n "$x_includes"; then
28781    X_CFLAGS="$X_CFLAGS -I$x_includes"
28782  fi
28783
28784  # It would also be nice to do this for all -L options, not just this one.
28785  if test -n "$x_libraries"; then
28786    X_LIBS="$X_LIBS -L$x_libraries"
28787    # For Solaris; some versions of Sun CC require a space after -R and
28788    # others require no space.  Words are not sufficient . . . .
28789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28790$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28791    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28792    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28793    ac_cxx_werror_flag=yes
28794    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28795/* end confdefs.h.  */
28796
28797int
28798main ()
28799{
28800
28801  ;
28802  return 0;
28803}
28804_ACEOF
28805if ac_fn_cxx_try_link "$LINENO"; then :
28806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28807$as_echo "no" >&6; }
28808       X_LIBS="$X_LIBS -R$x_libraries"
28809else
28810  LIBS="$ac_xsave_LIBS -R $x_libraries"
28811       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28812/* end confdefs.h.  */
28813
28814int
28815main ()
28816{
28817
28818  ;
28819  return 0;
28820}
28821_ACEOF
28822if ac_fn_cxx_try_link "$LINENO"; then :
28823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28824$as_echo "yes" >&6; }
28825	  X_LIBS="$X_LIBS -R $x_libraries"
28826else
28827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28828$as_echo "neither works" >&6; }
28829fi
28830rm -f core conftest.err conftest.$ac_objext \
28831    conftest$ac_exeext conftest.$ac_ext
28832fi
28833rm -f core conftest.err conftest.$ac_objext \
28834    conftest$ac_exeext conftest.$ac_ext
28835    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28836    LIBS=$ac_xsave_LIBS
28837  fi
28838
28839  # Check for system-dependent libraries X programs must link with.
28840  # Do this before checking for the system-independent R6 libraries
28841  # (-lICE), since we may need -lsocket or whatever for X linking.
28842
28843  if test "$ISC" = yes; then
28844    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28845  else
28846    # Martyn Johnson says this is needed for Ultrix, if the X
28847    # libraries were built with DECnet support.  And Karl Berry says
28848    # the Alpha needs dnet_stub (dnet does not exist).
28849    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28850    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28851/* end confdefs.h.  */
28852
28853/* Override any GCC internal prototype to avoid an error.
28854   Use char because int might match the return type of a GCC
28855   builtin and then its argument prototype would still apply.  */
28856#ifdef __cplusplus
28857extern "C"
28858#endif
28859char XOpenDisplay ();
28860int
28861main ()
28862{
28863return XOpenDisplay ();
28864  ;
28865  return 0;
28866}
28867_ACEOF
28868if ac_fn_cxx_try_link "$LINENO"; then :
28869
28870else
28871  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28872$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28873if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
28874  $as_echo_n "(cached) " >&6
28875else
28876  ac_check_lib_save_LIBS=$LIBS
28877LIBS="-ldnet  $LIBS"
28878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28879/* end confdefs.h.  */
28880
28881/* Override any GCC internal prototype to avoid an error.
28882   Use char because int might match the return type of a GCC
28883   builtin and then its argument prototype would still apply.  */
28884#ifdef __cplusplus
28885extern "C"
28886#endif
28887char dnet_ntoa ();
28888int
28889main ()
28890{
28891return dnet_ntoa ();
28892  ;
28893  return 0;
28894}
28895_ACEOF
28896if ac_fn_cxx_try_link "$LINENO"; then :
28897  ac_cv_lib_dnet_dnet_ntoa=yes
28898else
28899  ac_cv_lib_dnet_dnet_ntoa=no
28900fi
28901rm -f core conftest.err conftest.$ac_objext \
28902    conftest$ac_exeext conftest.$ac_ext
28903LIBS=$ac_check_lib_save_LIBS
28904fi
28905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28906$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28907if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
28908  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28909fi
28910
28911    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28912      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28913$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28914if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
28915  $as_echo_n "(cached) " >&6
28916else
28917  ac_check_lib_save_LIBS=$LIBS
28918LIBS="-ldnet_stub  $LIBS"
28919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28920/* end confdefs.h.  */
28921
28922/* Override any GCC internal prototype to avoid an error.
28923   Use char because int might match the return type of a GCC
28924   builtin and then its argument prototype would still apply.  */
28925#ifdef __cplusplus
28926extern "C"
28927#endif
28928char dnet_ntoa ();
28929int
28930main ()
28931{
28932return dnet_ntoa ();
28933  ;
28934  return 0;
28935}
28936_ACEOF
28937if ac_fn_cxx_try_link "$LINENO"; then :
28938  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28939else
28940  ac_cv_lib_dnet_stub_dnet_ntoa=no
28941fi
28942rm -f core conftest.err conftest.$ac_objext \
28943    conftest$ac_exeext conftest.$ac_ext
28944LIBS=$ac_check_lib_save_LIBS
28945fi
28946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28947$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28948if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
28949  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28950fi
28951
28952    fi
28953fi
28954rm -f core conftest.err conftest.$ac_objext \
28955    conftest$ac_exeext conftest.$ac_ext
28956    LIBS="$ac_xsave_LIBS"
28957
28958    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28959    # to get the SysV transport functions.
28960    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28961    # needs -lnsl.
28962    # The nsl library prevents programs from opening the X display
28963    # on Irix 5.2, according to T.E. Dickey.
28964    # The functions gethostbyname, getservbyname, and inet_addr are
28965    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28966    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28967if test "x$ac_cv_func_gethostbyname" = xyes; then :
28968
28969fi
28970
28971    if test $ac_cv_func_gethostbyname = no; then
28972      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28973$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28974if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
28975  $as_echo_n "(cached) " >&6
28976else
28977  ac_check_lib_save_LIBS=$LIBS
28978LIBS="-lnsl  $LIBS"
28979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28980/* end confdefs.h.  */
28981
28982/* Override any GCC internal prototype to avoid an error.
28983   Use char because int might match the return type of a GCC
28984   builtin and then its argument prototype would still apply.  */
28985#ifdef __cplusplus
28986extern "C"
28987#endif
28988char gethostbyname ();
28989int
28990main ()
28991{
28992return gethostbyname ();
28993  ;
28994  return 0;
28995}
28996_ACEOF
28997if ac_fn_cxx_try_link "$LINENO"; then :
28998  ac_cv_lib_nsl_gethostbyname=yes
28999else
29000  ac_cv_lib_nsl_gethostbyname=no
29001fi
29002rm -f core conftest.err conftest.$ac_objext \
29003    conftest$ac_exeext conftest.$ac_ext
29004LIBS=$ac_check_lib_save_LIBS
29005fi
29006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29007$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29008if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
29009  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29010fi
29011
29012      if test $ac_cv_lib_nsl_gethostbyname = no; then
29013	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29014$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29015if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
29016  $as_echo_n "(cached) " >&6
29017else
29018  ac_check_lib_save_LIBS=$LIBS
29019LIBS="-lbsd  $LIBS"
29020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29021/* end confdefs.h.  */
29022
29023/* Override any GCC internal prototype to avoid an error.
29024   Use char because int might match the return type of a GCC
29025   builtin and then its argument prototype would still apply.  */
29026#ifdef __cplusplus
29027extern "C"
29028#endif
29029char gethostbyname ();
29030int
29031main ()
29032{
29033return gethostbyname ();
29034  ;
29035  return 0;
29036}
29037_ACEOF
29038if ac_fn_cxx_try_link "$LINENO"; then :
29039  ac_cv_lib_bsd_gethostbyname=yes
29040else
29041  ac_cv_lib_bsd_gethostbyname=no
29042fi
29043rm -f core conftest.err conftest.$ac_objext \
29044    conftest$ac_exeext conftest.$ac_ext
29045LIBS=$ac_check_lib_save_LIBS
29046fi
29047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29048$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29049if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
29050  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29051fi
29052
29053      fi
29054    fi
29055
29056    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29057    # socket/setsockopt and other routines are undefined under SCO ODT
29058    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29059    # on later versions), says Simon Leinen: it contains gethostby*
29060    # variants that don't use the name server (or something).  -lsocket
29061    # must be given before -lnsl if both are needed.  We assume that
29062    # if connect needs -lnsl, so does gethostbyname.
29063    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29064if test "x$ac_cv_func_connect" = xyes; then :
29065
29066fi
29067
29068    if test $ac_cv_func_connect = no; then
29069      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29070$as_echo_n "checking for connect in -lsocket... " >&6; }
29071if ${ac_cv_lib_socket_connect+:} false; then :
29072  $as_echo_n "(cached) " >&6
29073else
29074  ac_check_lib_save_LIBS=$LIBS
29075LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29077/* end confdefs.h.  */
29078
29079/* Override any GCC internal prototype to avoid an error.
29080   Use char because int might match the return type of a GCC
29081   builtin and then its argument prototype would still apply.  */
29082#ifdef __cplusplus
29083extern "C"
29084#endif
29085char connect ();
29086int
29087main ()
29088{
29089return connect ();
29090  ;
29091  return 0;
29092}
29093_ACEOF
29094if ac_fn_cxx_try_link "$LINENO"; then :
29095  ac_cv_lib_socket_connect=yes
29096else
29097  ac_cv_lib_socket_connect=no
29098fi
29099rm -f core conftest.err conftest.$ac_objext \
29100    conftest$ac_exeext conftest.$ac_ext
29101LIBS=$ac_check_lib_save_LIBS
29102fi
29103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29104$as_echo "$ac_cv_lib_socket_connect" >&6; }
29105if test "x$ac_cv_lib_socket_connect" = xyes; then :
29106  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29107fi
29108
29109    fi
29110
29111    # Guillermo Gomez says -lposix is necessary on A/UX.
29112    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29113if test "x$ac_cv_func_remove" = xyes; then :
29114
29115fi
29116
29117    if test $ac_cv_func_remove = no; then
29118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29119$as_echo_n "checking for remove in -lposix... " >&6; }
29120if ${ac_cv_lib_posix_remove+:} false; then :
29121  $as_echo_n "(cached) " >&6
29122else
29123  ac_check_lib_save_LIBS=$LIBS
29124LIBS="-lposix  $LIBS"
29125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29126/* end confdefs.h.  */
29127
29128/* Override any GCC internal prototype to avoid an error.
29129   Use char because int might match the return type of a GCC
29130   builtin and then its argument prototype would still apply.  */
29131#ifdef __cplusplus
29132extern "C"
29133#endif
29134char remove ();
29135int
29136main ()
29137{
29138return remove ();
29139  ;
29140  return 0;
29141}
29142_ACEOF
29143if ac_fn_cxx_try_link "$LINENO"; then :
29144  ac_cv_lib_posix_remove=yes
29145else
29146  ac_cv_lib_posix_remove=no
29147fi
29148rm -f core conftest.err conftest.$ac_objext \
29149    conftest$ac_exeext conftest.$ac_ext
29150LIBS=$ac_check_lib_save_LIBS
29151fi
29152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29153$as_echo "$ac_cv_lib_posix_remove" >&6; }
29154if test "x$ac_cv_lib_posix_remove" = xyes; then :
29155  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29156fi
29157
29158    fi
29159
29160    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29161    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29162if test "x$ac_cv_func_shmat" = xyes; then :
29163
29164fi
29165
29166    if test $ac_cv_func_shmat = no; then
29167      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29168$as_echo_n "checking for shmat in -lipc... " >&6; }
29169if ${ac_cv_lib_ipc_shmat+:} false; then :
29170  $as_echo_n "(cached) " >&6
29171else
29172  ac_check_lib_save_LIBS=$LIBS
29173LIBS="-lipc  $LIBS"
29174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29175/* end confdefs.h.  */
29176
29177/* Override any GCC internal prototype to avoid an error.
29178   Use char because int might match the return type of a GCC
29179   builtin and then its argument prototype would still apply.  */
29180#ifdef __cplusplus
29181extern "C"
29182#endif
29183char shmat ();
29184int
29185main ()
29186{
29187return shmat ();
29188  ;
29189  return 0;
29190}
29191_ACEOF
29192if ac_fn_cxx_try_link "$LINENO"; then :
29193  ac_cv_lib_ipc_shmat=yes
29194else
29195  ac_cv_lib_ipc_shmat=no
29196fi
29197rm -f core conftest.err conftest.$ac_objext \
29198    conftest$ac_exeext conftest.$ac_ext
29199LIBS=$ac_check_lib_save_LIBS
29200fi
29201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29202$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29203if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
29204  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29205fi
29206
29207    fi
29208  fi
29209
29210  # Check for libraries that X11R6 Xt/Xaw programs need.
29211  ac_save_LDFLAGS=$LDFLAGS
29212  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29213  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29214  # check for ICE first), but we must link in the order -lSM -lICE or
29215  # we get undefined symbols.  So assume we have SM if we have ICE.
29216  # These have to be linked with before -lX11, unlike the other
29217  # libraries we check for below, so use a different variable.
29218  # John Interrante, Karl Berry
29219  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29220$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29221if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
29222  $as_echo_n "(cached) " >&6
29223else
29224  ac_check_lib_save_LIBS=$LIBS
29225LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29227/* end confdefs.h.  */
29228
29229/* Override any GCC internal prototype to avoid an error.
29230   Use char because int might match the return type of a GCC
29231   builtin and then its argument prototype would still apply.  */
29232#ifdef __cplusplus
29233extern "C"
29234#endif
29235char IceConnectionNumber ();
29236int
29237main ()
29238{
29239return IceConnectionNumber ();
29240  ;
29241  return 0;
29242}
29243_ACEOF
29244if ac_fn_cxx_try_link "$LINENO"; then :
29245  ac_cv_lib_ICE_IceConnectionNumber=yes
29246else
29247  ac_cv_lib_ICE_IceConnectionNumber=no
29248fi
29249rm -f core conftest.err conftest.$ac_objext \
29250    conftest$ac_exeext conftest.$ac_ext
29251LIBS=$ac_check_lib_save_LIBS
29252fi
29253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29254$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29255if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
29256  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29257fi
29258
29259  LDFLAGS=$ac_save_LDFLAGS
29260
29261fi
29262
29263
29264# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29265# this doesn't make sense so we remove it.
29266if test "x$COMPILE_TYPE" = xcross; then
29267  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29268fi
29269
29270if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29271
29272    # Print a helpful message on how to acquire the necessary build dependency.
29273    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29274    MISSING_DEPENDENCY=x11
29275    PKGHANDLER_COMMAND=
29276
29277    case $PKGHANDLER in
29278	apt-get)
29279                apt_help     $MISSING_DEPENDENCY ;;
29280    yum)
29281                yum_help     $MISSING_DEPENDENCY ;;
29282	port)
29283                port_help    $MISSING_DEPENDENCY ;;
29284	pkgutil)
29285                pkgutil_help $MISSING_DEPENDENCY ;;
29286	pkgadd)
29287                pkgadd_help  $MISSING_DEPENDENCY ;;
29288    * )
29289      break ;;
29290    esac
29291
29292    if test "x$PKGHANDLER_COMMAND" != x; then
29293        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29294    fi
29295
29296    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29297fi
29298
29299# Some of the old makefiles require a setting of OPENWIN_HOME
29300# Since the X11R6 directory has disappeared on later Linuxes,
29301# we need to probe for it.
29302if test "x$OPENJDK_TARGET_OS" = xlinux; then
29303    if test -d "$SYS_ROOT/usr/X11R6"; then
29304        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29305    fi
29306    if test -d "$SYS_ROOT/usr/include/X11"; then
29307        OPENWIN_HOME="$SYS_ROOT/usr"
29308    fi
29309fi
29310if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29311    OPENWIN_HOME="/usr/openwin"
29312fi
29313
29314
29315
29316#
29317# Weird Sol10 something check...TODO change to try compile
29318#
29319if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29320  if test "`uname -r`" = "5.10"; then
29321     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29322     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29323     fi
29324  fi
29325fi
29326
29327ac_ext=c
29328ac_cpp='$CPP $CPPFLAGS'
29329ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29330ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29331ac_compiler_gnu=$ac_cv_c_compiler_gnu
29332
29333OLD_CFLAGS="$CFLAGS"
29334CFLAGS="$CFLAGS $X_CFLAGS"
29335
29336# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29337for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29338do :
29339  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29340ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29341                   # include <X11/Xutil.h>
29342
29343"
29344if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29345  cat >>confdefs.h <<_ACEOF
29346#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29347_ACEOF
29348 X11_A_OK=yes
29349else
29350  X11_A_OK=no
29351fi
29352
29353done
29354
29355
29356CFLAGS="$OLD_CFLAGS"
29357ac_ext=cpp
29358ac_cpp='$CXXCPP $CPPFLAGS'
29359ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29360ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29361ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29362
29363
29364if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29365
29366    # Print a helpful message on how to acquire the necessary build dependency.
29367    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29368    MISSING_DEPENDENCY=x11
29369    PKGHANDLER_COMMAND=
29370
29371    case $PKGHANDLER in
29372	apt-get)
29373                apt_help     $MISSING_DEPENDENCY ;;
29374    yum)
29375                yum_help     $MISSING_DEPENDENCY ;;
29376	port)
29377                port_help    $MISSING_DEPENDENCY ;;
29378	pkgutil)
29379                pkgutil_help $MISSING_DEPENDENCY ;;
29380	pkgadd)
29381                pkgadd_help  $MISSING_DEPENDENCY ;;
29382    * )
29383      break ;;
29384    esac
29385
29386    if test "x$PKGHANDLER_COMMAND" != x; then
29387        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29388    fi
29389
29390    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29391fi
29392
29393
29394
29395
29396
29397
29398###############################################################################
29399#
29400# The common unix printing system cups is used to print from java.
29401#
29402
29403# Check whether --with-cups was given.
29404if test "${with_cups+set}" = set; then :
29405  withval=$with_cups;
29406fi
29407
29408
29409# Check whether --with-cups-include was given.
29410if test "${with_cups_include+set}" = set; then :
29411  withval=$with_cups_include;
29412fi
29413
29414
29415if test "x$CUPS_NOT_NEEDED" = xyes; then
29416	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29417		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29418$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29419	fi
29420	CUPS_CFLAGS=
29421else
29422	CUPS_FOUND=no
29423
29424	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29425	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29426	fi
29427
29428	if test "x${with_cups}" != x; then
29429	    CUPS_CFLAGS="-I${with_cups}/include"
29430	    CUPS_FOUND=yes
29431	fi
29432	if test "x${with_cups_include}" != x; then
29433	    CUPS_CFLAGS="-I${with_cups_include}"
29434	    CUPS_FOUND=yes
29435	fi
29436	if test "x$CUPS_FOUND" = xno; then
29437
29438
29439    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29440        # Source the builddeps file again, to make sure it uses the latest variables!
29441        . $builddepsfile
29442        # Look for a target and build machine specific resource!
29443        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29444        if test "x$resource" = x; then
29445            # Ok, lets instead look for a target specific resource
29446            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29447        fi
29448        if test "x$resource" = x; then
29449            # Ok, lets instead look for a build specific resource
29450            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29451        fi
29452        if test "x$resource" = x; then
29453            # Ok, lets instead look for a generic resource
29454            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29455            resource=${builddep_cups}
29456        fi
29457        if test "x$resource" != x; then
29458            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29459$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29460	    # If the resource in the builddeps.conf file is an existing directory,
29461	    # for example /java/linux/cups
29462	    if test -d ${resource}; then
29463	       depdir=${resource}
29464	    else
29465
29466# cups is for example mymodule
29467# $resource is for example libs/general/libmymod_1_2_3.zip
29468# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29469# $with_builddeps_dir is for example /localhome/builddeps
29470# depdir is the name of the variable into which we store the depdir, eg MYMOD
29471# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29472# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29473    filename=`basename $resource`
29474    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29475    filebase=${filename%%.*}
29476    extension=${filename#*.}
29477    installdir=$with_builddeps_dir/$filebase
29478    if test ! -f $installdir/$filename.unpacked; then
29479        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29480$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29481        if test ! -d $installdir; then
29482            mkdir -p $installdir
29483        fi
29484        if test ! -d $installdir; then
29485            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29486        fi
29487        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29488        touch $tmpfile
29489        if test ! -f $tmpfile; then
29490            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29491        fi
29492
29493    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29494    # $tmpfile is the local file name for the downloaded file.
29495    VALID_TOOL=no
29496    if test "x$BDEPS_FTP" = xwget; then
29497       VALID_TOOL=yes
29498       wget -O $tmpfile $with_builddeps_server/$resource
29499    fi
29500    if test "x$BDEPS_FTP" = xlftp; then
29501       VALID_TOOL=yes
29502       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29503    fi
29504    if test "x$BDEPS_FTP" = xftp; then
29505        VALID_TOOL=yes
29506        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29507        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29508        FTPUSERPWD=${FTPSERVER%%@*}
29509        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29510            FTPUSER=${userpwd%%:*}
29511            FTPPWD=${userpwd#*@}
29512            FTPSERVER=${FTPSERVER#*@}
29513        else
29514            FTPUSER=ftp
29515            FTPPWD=ftp
29516        fi
29517        # the "pass" command does not work on some
29518        # ftp clients (read ftp.exe) but if it works,
29519        # passive mode is better!
29520        (\
29521            echo "user $FTPUSER $FTPPWD"        ;\
29522            echo "pass"                         ;\
29523            echo "bin"                          ;\
29524            echo "get $FTPPATH $tmpfile"              ;\
29525        ) | ftp -in $FTPSERVER
29526    fi
29527    if test "x$VALID_TOOL" != xyes; then
29528       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29529    fi
29530
29531        mv $tmpfile $installdir/$filename
29532        if test ! -s $installdir/$filename; then
29533            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29534        fi
29535        case "$extension" in
29536            zip)  echo "Unzipping $installdir/$filename..."
29537               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29538            ;;
29539            tar.gz) echo "Untaring $installdir/$filename..."
29540               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29541            ;;
29542            tgz) echo "Untaring $installdir/$filename..."
29543               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29544            ;;
29545            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29546            ;;
29547        esac
29548    fi
29549    if test -f $installdir/$filename.unpacked; then
29550        depdir=$installdir
29551    fi
29552
29553	    fi
29554            # Source the builddeps file again, because in the previous command, the depdir
29555            # was updated to point at the current build dependency install directory.
29556            . $builddepsfile
29557            # Now extract variables from the builddeps.conf files.
29558            theroot=${builddep_cups_ROOT}
29559            thecflags=${builddep_cups_CFLAGS}
29560            thelibs=${builddep_cups_LIBS}
29561            if test "x$depdir" = x; then
29562                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29563            fi
29564            CUPS=$depdir
29565            if test "x$theroot" != x; then
29566               CUPS="$theroot"
29567            fi
29568            if test "x$thecflags" != x; then
29569               CUPS_CFLAGS="$thecflags"
29570            fi
29571            if test "x$thelibs" != x; then
29572               CUPS_LIBS="$thelibs"
29573            fi
29574            CUPS_FOUND=yes
29575
29576        fi
29577
29578    fi
29579
29580	fi
29581	if test "x$CUPS_FOUND" = xno; then
29582	    # Are the cups headers installed in the default /usr/include location?
29583	    for ac_header in cups/cups.h cups/ppd.h
29584do :
29585  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29586ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29587if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29588  cat >>confdefs.h <<_ACEOF
29589#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29590_ACEOF
29591 CUPS_FOUND=yes
29592	                      CUPS_CFLAGS=
29593	                      DEFAULT_CUPS=yes
29594fi
29595
29596done
29597
29598	fi
29599	if test "x$CUPS_FOUND" = xno; then
29600	    # Getting nervous now? Lets poke around for standard Solaris third-party
29601	    # package installation locations.
29602	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29603$as_echo_n "checking for cups headers... " >&6; }
29604	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29605	       # An SFW package seems to be installed!
29606	       CUPS_FOUND=yes
29607	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29608	    elif test -s /opt/csw/include/cups/cups.h; then
29609	       # A CSW package seems to be installed!
29610	       CUPS_FOUND=yes
29611	       CUPS_CFLAGS="-I/opt/csw/include"
29612	    fi
29613	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29614$as_echo "$CUPS_FOUND" >&6; }
29615	fi
29616	if test "x$CUPS_FOUND" = xno; then
29617
29618    # Print a helpful message on how to acquire the necessary build dependency.
29619    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29620    MISSING_DEPENDENCY=cups
29621    PKGHANDLER_COMMAND=
29622
29623    case $PKGHANDLER in
29624	apt-get)
29625                apt_help     $MISSING_DEPENDENCY ;;
29626    yum)
29627                yum_help     $MISSING_DEPENDENCY ;;
29628	port)
29629                port_help    $MISSING_DEPENDENCY ;;
29630	pkgutil)
29631                pkgutil_help $MISSING_DEPENDENCY ;;
29632	pkgadd)
29633                pkgadd_help  $MISSING_DEPENDENCY ;;
29634    * )
29635      break ;;
29636    esac
29637
29638    if test "x$PKGHANDLER_COMMAND" != x; then
29639        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29640    fi
29641
29642	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29643	fi
29644fi
29645
29646
29647
29648
29649
29650
29651###############################################################################
29652#
29653# The ubiquitous freetype2 library is used to render fonts.
29654#
29655
29656# Check whether --with-freetype was given.
29657if test "${with_freetype+set}" = set; then :
29658  withval=$with_freetype;
29659fi
29660
29661
29662# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29663USING_SYSTEM_FT_LIB=false
29664
29665if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29666	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29667		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29668$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29669	fi
29670	FREETYPE2_CFLAGS=
29671	FREETYPE2_LIBS=
29672        FREETYPE2_LIB_PATH=
29673else
29674	FREETYPE2_FOUND=no
29675
29676	if test "x$with_freetype" != x; then
29677
29678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29679
29680  # Input might be given as Windows format, start by converting to
29681  # unix format.
29682  path="$with_freetype"
29683  new_path=`$CYGPATH -u "$path"`
29684
29685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29688  # "foo.exe" is OK but "foo" is an error.
29689  #
29690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29691  # It is also a way to make sure we got the proper file name for the real test later on.
29692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29693  if test "x$test_shortpath" = x; then
29694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29695$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29696    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29697  fi
29698
29699  # Call helper function which possibly converts this using DOS-style short mode.
29700  # If so, the updated path is stored in $new_path.
29701
29702  input_path="$new_path"
29703  # Check if we need to convert this using DOS-style short mode. If the path
29704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29705  # take no chances and rewrite it.
29706  # Note: m4 eats our [], so we need to use [ and ] instead.
29707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29708  if test "x$has_forbidden_chars" != x; then
29709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29713      # Going to short mode and back again did indeed matter. Since short mode is
29714      # case insensitive, let's make it lowercase to improve readability.
29715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29716      # Now convert it back to Unix-stile (cygpath)
29717      input_path=`$CYGPATH -u "$shortmode_path"`
29718      new_path="$input_path"
29719    fi
29720  fi
29721
29722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29723  if test "x$test_cygdrive_prefix" = x; then
29724    # As a simple fix, exclude /usr/bin since it's not a real path.
29725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29727      # a path prefixed by /cygdrive for fixpath to work.
29728      new_path="$CYGWIN_ROOT_PATH$input_path"
29729    fi
29730  fi
29731
29732
29733  if test "x$path" != "x$new_path"; then
29734    with_freetype="$new_path"
29735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29736$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29737  fi
29738
29739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29740
29741  path="$with_freetype"
29742  has_colon=`$ECHO $path | $GREP ^.:`
29743  new_path="$path"
29744  if test "x$has_colon" = x; then
29745    # Not in mixed or Windows style, start by that.
29746    new_path=`cmd //c echo $path`
29747  fi
29748
29749
29750  input_path="$new_path"
29751  # Check if we need to convert this using DOS-style short mode. If the path
29752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29753  # take no chances and rewrite it.
29754  # Note: m4 eats our [], so we need to use [ and ] instead.
29755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29756  if test "x$has_forbidden_chars" != x; then
29757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29759  fi
29760
29761
29762  windows_path="$new_path"
29763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29764    unix_path=`$CYGPATH -u "$windows_path"`
29765    new_path="$unix_path"
29766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29768    new_path="$unix_path"
29769  fi
29770
29771  if test "x$path" != "x$new_path"; then
29772    with_freetype="$new_path"
29773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29774$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29775  fi
29776
29777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29779
29780  else
29781    # We're on a posix platform. Hooray! :)
29782    path="$with_freetype"
29783
29784    if test ! -f "$path" && test ! -d "$path"; then
29785      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29786    fi
29787
29788    has_space=`$ECHO "$path" | $GREP " "`
29789    if test "x$has_space" != x; then
29790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29791$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29792      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29793    fi
29794  fi
29795
29796	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29797            FREETYPE2_LIB_PATH="$with_freetype/lib"
29798            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29799                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29800                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29801            fi
29802            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29803                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29804            fi
29805	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29806            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29807                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29808            fi
29809 	    FREETYPE2_FOUND=yes
29810   	    if test "x$FREETYPE2_FOUND" = xyes; then
29811	        # Verify that the directories exist
29812                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29813		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29814		fi
29815	        # List the contents of the lib.
29816		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29817                if test "x$FREETYPELIB" = x; then
29818		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29819		fi
29820	        # Check one h-file
29821                if ! test -s "$with_freetype/include/ft2build.h"; then
29822		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29823		fi
29824            fi
29825        fi
29826	if test "x$FREETYPE2_FOUND" = xno; then
29827
29828
29829    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29830        # Source the builddeps file again, to make sure it uses the latest variables!
29831        . $builddepsfile
29832        # Look for a target and build machine specific resource!
29833        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29834        if test "x$resource" = x; then
29835            # Ok, lets instead look for a target specific resource
29836            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29837        fi
29838        if test "x$resource" = x; then
29839            # Ok, lets instead look for a build specific resource
29840            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29841        fi
29842        if test "x$resource" = x; then
29843            # Ok, lets instead look for a generic resource
29844            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29845            resource=${builddep_freetype2}
29846        fi
29847        if test "x$resource" != x; then
29848            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29849$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29850	    # If the resource in the builddeps.conf file is an existing directory,
29851	    # for example /java/linux/cups
29852	    if test -d ${resource}; then
29853	       depdir=${resource}
29854	    else
29855
29856# freetype2 is for example mymodule
29857# $resource is for example libs/general/libmymod_1_2_3.zip
29858# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29859# $with_builddeps_dir is for example /localhome/builddeps
29860# depdir is the name of the variable into which we store the depdir, eg MYMOD
29861# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29862# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29863    filename=`basename $resource`
29864    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29865    filebase=${filename%%.*}
29866    extension=${filename#*.}
29867    installdir=$with_builddeps_dir/$filebase
29868    if test ! -f $installdir/$filename.unpacked; then
29869        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29870$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29871        if test ! -d $installdir; then
29872            mkdir -p $installdir
29873        fi
29874        if test ! -d $installdir; then
29875            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29876        fi
29877        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29878        touch $tmpfile
29879        if test ! -f $tmpfile; then
29880            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29881        fi
29882
29883    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29884    # $tmpfile is the local file name for the downloaded file.
29885    VALID_TOOL=no
29886    if test "x$BDEPS_FTP" = xwget; then
29887       VALID_TOOL=yes
29888       wget -O $tmpfile $with_builddeps_server/$resource
29889    fi
29890    if test "x$BDEPS_FTP" = xlftp; then
29891       VALID_TOOL=yes
29892       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29893    fi
29894    if test "x$BDEPS_FTP" = xftp; then
29895        VALID_TOOL=yes
29896        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29897        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29898        FTPUSERPWD=${FTPSERVER%%@*}
29899        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29900            FTPUSER=${userpwd%%:*}
29901            FTPPWD=${userpwd#*@}
29902            FTPSERVER=${FTPSERVER#*@}
29903        else
29904            FTPUSER=ftp
29905            FTPPWD=ftp
29906        fi
29907        # the "pass" command does not work on some
29908        # ftp clients (read ftp.exe) but if it works,
29909        # passive mode is better!
29910        (\
29911            echo "user $FTPUSER $FTPPWD"        ;\
29912            echo "pass"                         ;\
29913            echo "bin"                          ;\
29914            echo "get $FTPPATH $tmpfile"              ;\
29915        ) | ftp -in $FTPSERVER
29916    fi
29917    if test "x$VALID_TOOL" != xyes; then
29918       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29919    fi
29920
29921        mv $tmpfile $installdir/$filename
29922        if test ! -s $installdir/$filename; then
29923            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29924        fi
29925        case "$extension" in
29926            zip)  echo "Unzipping $installdir/$filename..."
29927               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29928            ;;
29929            tar.gz) echo "Untaring $installdir/$filename..."
29930               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29931            ;;
29932            tgz) echo "Untaring $installdir/$filename..."
29933               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29934            ;;
29935            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29936            ;;
29937        esac
29938    fi
29939    if test -f $installdir/$filename.unpacked; then
29940        depdir=$installdir
29941    fi
29942
29943	    fi
29944            # Source the builddeps file again, because in the previous command, the depdir
29945            # was updated to point at the current build dependency install directory.
29946            . $builddepsfile
29947            # Now extract variables from the builddeps.conf files.
29948            theroot=${builddep_freetype2_ROOT}
29949            thecflags=${builddep_freetype2_CFLAGS}
29950            thelibs=${builddep_freetype2_LIBS}
29951            if test "x$depdir" = x; then
29952                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29953            fi
29954            FREETYPE2=$depdir
29955            if test "x$theroot" != x; then
29956               FREETYPE2="$theroot"
29957            fi
29958            if test "x$thecflags" != x; then
29959               FREETYPE2_CFLAGS="$thecflags"
29960            fi
29961            if test "x$thelibs" != x; then
29962               FREETYPE2_LIBS="$thelibs"
29963            fi
29964            FREETYPE2_FOUND=yes
29965            else FREETYPE2_FOUND=no
29966
29967        fi
29968        else FREETYPE2_FOUND=no
29969
29970    fi
29971
29972            USING_SYSTEM_FT_LIB=true
29973	fi
29974	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29975            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29976
29977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29978
29979  # Input might be given as Windows format, start by converting to
29980  # unix format.
29981  path="$FREETYPELOCATION"
29982  new_path=`$CYGPATH -u "$path"`
29983
29984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29987  # "foo.exe" is OK but "foo" is an error.
29988  #
29989  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29990  # It is also a way to make sure we got the proper file name for the real test later on.
29991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29992  if test "x$test_shortpath" = x; then
29993    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29994$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29995    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29996  fi
29997
29998  # Call helper function which possibly converts this using DOS-style short mode.
29999  # If so, the updated path is stored in $new_path.
30000
30001  input_path="$new_path"
30002  # Check if we need to convert this using DOS-style short mode. If the path
30003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30004  # take no chances and rewrite it.
30005  # Note: m4 eats our [], so we need to use [ and ] instead.
30006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30007  if test "x$has_forbidden_chars" != x; then
30008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30012      # Going to short mode and back again did indeed matter. Since short mode is
30013      # case insensitive, let's make it lowercase to improve readability.
30014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30015      # Now convert it back to Unix-stile (cygpath)
30016      input_path=`$CYGPATH -u "$shortmode_path"`
30017      new_path="$input_path"
30018    fi
30019  fi
30020
30021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30022  if test "x$test_cygdrive_prefix" = x; then
30023    # As a simple fix, exclude /usr/bin since it's not a real path.
30024    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30026      # a path prefixed by /cygdrive for fixpath to work.
30027      new_path="$CYGWIN_ROOT_PATH$input_path"
30028    fi
30029  fi
30030
30031
30032  if test "x$path" != "x$new_path"; then
30033    FREETYPELOCATION="$new_path"
30034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30035$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30036  fi
30037
30038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30039
30040  path="$FREETYPELOCATION"
30041  has_colon=`$ECHO $path | $GREP ^.:`
30042  new_path="$path"
30043  if test "x$has_colon" = x; then
30044    # Not in mixed or Windows style, start by that.
30045    new_path=`cmd //c echo $path`
30046  fi
30047
30048
30049  input_path="$new_path"
30050  # Check if we need to convert this using DOS-style short mode. If the path
30051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30052  # take no chances and rewrite it.
30053  # Note: m4 eats our [], so we need to use [ and ] instead.
30054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30055  if test "x$has_forbidden_chars" != x; then
30056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30058  fi
30059
30060
30061  windows_path="$new_path"
30062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30063    unix_path=`$CYGPATH -u "$windows_path"`
30064    new_path="$unix_path"
30065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30067    new_path="$unix_path"
30068  fi
30069
30070  if test "x$path" != "x$new_path"; then
30071    FREETYPELOCATION="$new_path"
30072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30073$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30074  fi
30075
30076  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30077  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30078
30079  else
30080    # We're on a posix platform. Hooray! :)
30081    path="$FREETYPELOCATION"
30082
30083    if test ! -f "$path" && test ! -d "$path"; then
30084      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30085    fi
30086
30087    has_space=`$ECHO "$path" | $GREP " "`
30088    if test "x$has_space" != x; then
30089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30090$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30091      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30092    fi
30093  fi
30094
30095	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30096$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30097	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30098	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30099	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30100 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30101                if ! test -s "$FREETYPE2_LIBS"; then
30102		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30103		fi
30104                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30105		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30106		fi
30107                USING_SYSTEM_FT_LIB=true
30108                FREETYPE2_FOUND=yes
30109	    fi
30110	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30111$as_echo "$FREETYPE2_FOUND" >&6; }
30112        fi
30113	if test "x$FREETYPE2_FOUND" = xno; then
30114
30115pkg_failed=no
30116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30117$as_echo_n "checking for FREETYPE2... " >&6; }
30118
30119if test -n "$FREETYPE2_CFLAGS"; then
30120    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30121 elif test -n "$PKG_CONFIG"; then
30122    if test -n "$PKG_CONFIG" && \
30123    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30124  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30125  ac_status=$?
30126  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30127  test $ac_status = 0; }; then
30128  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30129else
30130  pkg_failed=yes
30131fi
30132 else
30133    pkg_failed=untried
30134fi
30135if test -n "$FREETYPE2_LIBS"; then
30136    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30137 elif test -n "$PKG_CONFIG"; then
30138    if test -n "$PKG_CONFIG" && \
30139    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30140  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30141  ac_status=$?
30142  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30143  test $ac_status = 0; }; then
30144  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30145else
30146  pkg_failed=yes
30147fi
30148 else
30149    pkg_failed=untried
30150fi
30151
30152
30153
30154if test $pkg_failed = yes; then
30155
30156if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30157        _pkg_short_errors_supported=yes
30158else
30159        _pkg_short_errors_supported=no
30160fi
30161        if test $_pkg_short_errors_supported = yes; then
30162	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30163        else
30164	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30165        fi
30166	# Put the nasty error message in config.log where it belongs
30167	echo "$FREETYPE2_PKG_ERRORS" >&5
30168
30169	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30170$as_echo "no" >&6; }
30171                FREETYPE2_FOUND=no
30172elif test $pkg_failed = untried; then
30173	FREETYPE2_FOUND=no
30174else
30175	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30176	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30178$as_echo "yes" >&6; }
30179	FREETYPE2_FOUND=yes
30180fi
30181            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30182            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30183            USING_SYSTEM_FT_LIB=true
30184            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30185            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30186              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30187            fi
30188	fi
30189	if test "x$FREETYPE2_FOUND" = xno; then
30190	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30191$as_echo_n "checking for freetype in some standard locations... " >&6; }
30192
30193	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30194	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30195	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30196	    fi
30197	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30198	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30199	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30200	    fi
30201
30202	    PREV_CXXCFLAGS="$CXXFLAGS"
30203	    PREV_LDFLAGS="$LDFLAGS"
30204	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30205	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30206	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30207/* end confdefs.h.  */
30208#include<ft2build.h>
30209	                    #include FT_FREETYPE_H
30210	                   int main() { return 0; }
30211
30212_ACEOF
30213if ac_fn_cxx_try_link "$LINENO"; then :
30214
30215	                      # Yes, the default cflags and libs did the trick.
30216	                      FREETYPE2_FOUND=yes
30217	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30218	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30219
30220else
30221
30222	                      FREETYPE2_FOUND=no
30223
30224fi
30225rm -f core conftest.err conftest.$ac_objext \
30226    conftest$ac_exeext conftest.$ac_ext
30227            CXXCFLAGS="$PREV_CXXFLAGS"
30228	    LDFLAGS="$PREV_LDFLAGS"
30229	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30230$as_echo "$FREETYPE2_FOUND" >&6; }
30231            USING_SYSTEM_FT_LIB=true
30232	fi
30233	if test "x$FREETYPE2_FOUND" = xno; then
30234
30235    # Print a helpful message on how to acquire the necessary build dependency.
30236    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30237    MISSING_DEPENDENCY=freetype2
30238    PKGHANDLER_COMMAND=
30239
30240    case $PKGHANDLER in
30241	apt-get)
30242                apt_help     $MISSING_DEPENDENCY ;;
30243    yum)
30244                yum_help     $MISSING_DEPENDENCY ;;
30245	port)
30246                port_help    $MISSING_DEPENDENCY ;;
30247	pkgutil)
30248                pkgutil_help $MISSING_DEPENDENCY ;;
30249	pkgadd)
30250                pkgadd_help  $MISSING_DEPENDENCY ;;
30251    * )
30252      break ;;
30253    esac
30254
30255    if test "x$PKGHANDLER_COMMAND" != x; then
30256        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30257    fi
30258
30259		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30260	fi
30261
30262        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30263            # AC_CHECK_LIB does not support use of cl.exe
30264            PREV_LDFLAGS="$LDFLAGS"
30265            LDFLAGS="$FREETYPE2_LIBS"
30266            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30267$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30268if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
30269  $as_echo_n "(cached) " >&6
30270else
30271  ac_check_lib_save_LIBS=$LIBS
30272LIBS="-lfreetype  $LIBS"
30273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30274/* end confdefs.h.  */
30275
30276/* Override any GCC internal prototype to avoid an error.
30277   Use char because int might match the return type of a GCC
30278   builtin and then its argument prototype would still apply.  */
30279#ifdef __cplusplus
30280extern "C"
30281#endif
30282char FT_Init_FreeType ();
30283int
30284main ()
30285{
30286return FT_Init_FreeType ();
30287  ;
30288  return 0;
30289}
30290_ACEOF
30291if ac_fn_cxx_try_link "$LINENO"; then :
30292  ac_cv_lib_freetype_FT_Init_FreeType=yes
30293else
30294  ac_cv_lib_freetype_FT_Init_FreeType=no
30295fi
30296rm -f core conftest.err conftest.$ac_objext \
30297    conftest$ac_exeext conftest.$ac_ext
30298LIBS=$ac_check_lib_save_LIBS
30299fi
30300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30301$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30302if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
30303  FREETYPE2_FOUND=true
30304else
30305  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30306fi
30307
30308            LDFLAGS="$PREV_LDFLAGS"
30309        fi
30310fi
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320###############################################################################
30321#
30322# Check for alsa headers and libraries. Used on Linux/GNU systems.
30323#
30324
30325# Check whether --with-alsa was given.
30326if test "${with_alsa+set}" = set; then :
30327  withval=$with_alsa;
30328fi
30329
30330
30331# Check whether --with-alsa-include was given.
30332if test "${with_alsa_include+set}" = set; then :
30333  withval=$with_alsa_include;
30334fi
30335
30336
30337# Check whether --with-alsa-lib was given.
30338if test "${with_alsa_lib+set}" = set; then :
30339  withval=$with_alsa_lib;
30340fi
30341
30342
30343if test "x$ALSA_NOT_NEEDED" = xyes; then
30344	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30345		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30346$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30347	fi
30348	ALSA_CFLAGS=
30349	ALSA_LIBS=
30350else
30351	ALSA_FOUND=no
30352
30353	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30354	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30355	fi
30356
30357	if test "x${with_alsa}" != x; then
30358	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30359	    ALSA_CFLAGS="-I${with_alsa}/include"
30360	    ALSA_FOUND=yes
30361	fi
30362	if test "x${with_alsa_include}" != x; then
30363	    ALSA_CFLAGS="-I${with_alsa_include}"
30364	    ALSA_FOUND=yes
30365	fi
30366	if test "x${with_alsa_lib}" != x; then
30367	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30368	    ALSA_FOUND=yes
30369	fi
30370	if test "x$ALSA_FOUND" = xno; then
30371
30372
30373    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30374        # Source the builddeps file again, to make sure it uses the latest variables!
30375        . $builddepsfile
30376        # Look for a target and build machine specific resource!
30377        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30378        if test "x$resource" = x; then
30379            # Ok, lets instead look for a target specific resource
30380            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30381        fi
30382        if test "x$resource" = x; then
30383            # Ok, lets instead look for a build specific resource
30384            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30385        fi
30386        if test "x$resource" = x; then
30387            # Ok, lets instead look for a generic resource
30388            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30389            resource=${builddep_alsa}
30390        fi
30391        if test "x$resource" != x; then
30392            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30393$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30394	    # If the resource in the builddeps.conf file is an existing directory,
30395	    # for example /java/linux/cups
30396	    if test -d ${resource}; then
30397	       depdir=${resource}
30398	    else
30399
30400# alsa is for example mymodule
30401# $resource is for example libs/general/libmymod_1_2_3.zip
30402# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30403# $with_builddeps_dir is for example /localhome/builddeps
30404# depdir is the name of the variable into which we store the depdir, eg MYMOD
30405# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30406# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30407    filename=`basename $resource`
30408    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30409    filebase=${filename%%.*}
30410    extension=${filename#*.}
30411    installdir=$with_builddeps_dir/$filebase
30412    if test ! -f $installdir/$filename.unpacked; then
30413        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30414$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30415        if test ! -d $installdir; then
30416            mkdir -p $installdir
30417        fi
30418        if test ! -d $installdir; then
30419            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30420        fi
30421        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30422        touch $tmpfile
30423        if test ! -f $tmpfile; then
30424            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30425        fi
30426
30427    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30428    # $tmpfile is the local file name for the downloaded file.
30429    VALID_TOOL=no
30430    if test "x$BDEPS_FTP" = xwget; then
30431       VALID_TOOL=yes
30432       wget -O $tmpfile $with_builddeps_server/$resource
30433    fi
30434    if test "x$BDEPS_FTP" = xlftp; then
30435       VALID_TOOL=yes
30436       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30437    fi
30438    if test "x$BDEPS_FTP" = xftp; then
30439        VALID_TOOL=yes
30440        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30441        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30442        FTPUSERPWD=${FTPSERVER%%@*}
30443        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30444            FTPUSER=${userpwd%%:*}
30445            FTPPWD=${userpwd#*@}
30446            FTPSERVER=${FTPSERVER#*@}
30447        else
30448            FTPUSER=ftp
30449            FTPPWD=ftp
30450        fi
30451        # the "pass" command does not work on some
30452        # ftp clients (read ftp.exe) but if it works,
30453        # passive mode is better!
30454        (\
30455            echo "user $FTPUSER $FTPPWD"        ;\
30456            echo "pass"                         ;\
30457            echo "bin"                          ;\
30458            echo "get $FTPPATH $tmpfile"              ;\
30459        ) | ftp -in $FTPSERVER
30460    fi
30461    if test "x$VALID_TOOL" != xyes; then
30462       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30463    fi
30464
30465        mv $tmpfile $installdir/$filename
30466        if test ! -s $installdir/$filename; then
30467            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30468        fi
30469        case "$extension" in
30470            zip)  echo "Unzipping $installdir/$filename..."
30471               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30472            ;;
30473            tar.gz) echo "Untaring $installdir/$filename..."
30474               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30475            ;;
30476            tgz) echo "Untaring $installdir/$filename..."
30477               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30478            ;;
30479            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30480            ;;
30481        esac
30482    fi
30483    if test -f $installdir/$filename.unpacked; then
30484        depdir=$installdir
30485    fi
30486
30487	    fi
30488            # Source the builddeps file again, because in the previous command, the depdir
30489            # was updated to point at the current build dependency install directory.
30490            . $builddepsfile
30491            # Now extract variables from the builddeps.conf files.
30492            theroot=${builddep_alsa_ROOT}
30493            thecflags=${builddep_alsa_CFLAGS}
30494            thelibs=${builddep_alsa_LIBS}
30495            if test "x$depdir" = x; then
30496                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30497            fi
30498            ALSA=$depdir
30499            if test "x$theroot" != x; then
30500               ALSA="$theroot"
30501            fi
30502            if test "x$thecflags" != x; then
30503               ALSA_CFLAGS="$thecflags"
30504            fi
30505            if test "x$thelibs" != x; then
30506               ALSA_LIBS="$thelibs"
30507            fi
30508            ALSA_FOUND=yes
30509            else ALSA_FOUND=no
30510
30511        fi
30512        else ALSA_FOUND=no
30513
30514    fi
30515
30516	fi
30517	if test "x$ALSA_FOUND" = xno; then
30518
30519pkg_failed=no
30520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30521$as_echo_n "checking for ALSA... " >&6; }
30522
30523if test -n "$ALSA_CFLAGS"; then
30524    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30525 elif test -n "$PKG_CONFIG"; then
30526    if test -n "$PKG_CONFIG" && \
30527    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30528  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30529  ac_status=$?
30530  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30531  test $ac_status = 0; }; then
30532  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30533else
30534  pkg_failed=yes
30535fi
30536 else
30537    pkg_failed=untried
30538fi
30539if test -n "$ALSA_LIBS"; then
30540    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30541 elif test -n "$PKG_CONFIG"; then
30542    if test -n "$PKG_CONFIG" && \
30543    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30544  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30545  ac_status=$?
30546  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30547  test $ac_status = 0; }; then
30548  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30549else
30550  pkg_failed=yes
30551fi
30552 else
30553    pkg_failed=untried
30554fi
30555
30556
30557
30558if test $pkg_failed = yes; then
30559
30560if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30561        _pkg_short_errors_supported=yes
30562else
30563        _pkg_short_errors_supported=no
30564fi
30565        if test $_pkg_short_errors_supported = yes; then
30566	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30567        else
30568	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30569        fi
30570	# Put the nasty error message in config.log where it belongs
30571	echo "$ALSA_PKG_ERRORS" >&5
30572
30573	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30574$as_echo "no" >&6; }
30575                ALSA_FOUND=no
30576elif test $pkg_failed = untried; then
30577	ALSA_FOUND=no
30578else
30579	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30580	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30582$as_echo "yes" >&6; }
30583	ALSA_FOUND=yes
30584fi
30585	fi
30586	if test "x$ALSA_FOUND" = xno; then
30587	    for ac_header in alsa/asoundlib.h
30588do :
30589  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30590if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
30591  cat >>confdefs.h <<_ACEOF
30592#define HAVE_ALSA_ASOUNDLIB_H 1
30593_ACEOF
30594 ALSA_FOUND=yes
30595	                      ALSA_CFLAGS=-Iignoreme
30596	                      ALSA_LIBS=-lasound
30597	                      DEFAULT_ALSA=yes
30598else
30599  ALSA_FOUND=no
30600fi
30601
30602done
30603
30604	fi
30605	if test "x$ALSA_FOUND" = xno; then
30606
30607    # Print a helpful message on how to acquire the necessary build dependency.
30608    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30609    MISSING_DEPENDENCY=alsa
30610    PKGHANDLER_COMMAND=
30611
30612    case $PKGHANDLER in
30613	apt-get)
30614                apt_help     $MISSING_DEPENDENCY ;;
30615    yum)
30616                yum_help     $MISSING_DEPENDENCY ;;
30617	port)
30618                port_help    $MISSING_DEPENDENCY ;;
30619	pkgutil)
30620                pkgutil_help $MISSING_DEPENDENCY ;;
30621	pkgadd)
30622                pkgadd_help  $MISSING_DEPENDENCY ;;
30623    * )
30624      break ;;
30625    esac
30626
30627    if test "x$PKGHANDLER_COMMAND" != x; then
30628        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30629    fi
30630
30631	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30632	fi
30633fi
30634
30635
30636
30637
30638
30639
30640
30641###############################################################################
30642#
30643# Check for the jpeg library
30644#
30645
30646USE_EXTERNAL_LIBJPEG=true
30647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30648$as_echo_n "checking for main in -ljpeg... " >&6; }
30649if ${ac_cv_lib_jpeg_main+:} false; then :
30650  $as_echo_n "(cached) " >&6
30651else
30652  ac_check_lib_save_LIBS=$LIBS
30653LIBS="-ljpeg  $LIBS"
30654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30655/* end confdefs.h.  */
30656
30657
30658int
30659main ()
30660{
30661return main ();
30662  ;
30663  return 0;
30664}
30665_ACEOF
30666if ac_fn_cxx_try_link "$LINENO"; then :
30667  ac_cv_lib_jpeg_main=yes
30668else
30669  ac_cv_lib_jpeg_main=no
30670fi
30671rm -f core conftest.err conftest.$ac_objext \
30672    conftest$ac_exeext conftest.$ac_ext
30673LIBS=$ac_check_lib_save_LIBS
30674fi
30675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30676$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30677if test "x$ac_cv_lib_jpeg_main" = xyes; then :
30678  cat >>confdefs.h <<_ACEOF
30679#define HAVE_LIBJPEG 1
30680_ACEOF
30681
30682  LIBS="-ljpeg $LIBS"
30683
30684else
30685   USE_EXTERNAL_LIBJPEG=false
30686               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30687$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30688
30689fi
30690
30691
30692
30693###############################################################################
30694#
30695# Check for the gif library
30696#
30697
30698USE_EXTERNAL_LIBJPEG=true
30699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30700$as_echo_n "checking for main in -lgif... " >&6; }
30701if ${ac_cv_lib_gif_main+:} false; then :
30702  $as_echo_n "(cached) " >&6
30703else
30704  ac_check_lib_save_LIBS=$LIBS
30705LIBS="-lgif  $LIBS"
30706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30707/* end confdefs.h.  */
30708
30709
30710int
30711main ()
30712{
30713return main ();
30714  ;
30715  return 0;
30716}
30717_ACEOF
30718if ac_fn_cxx_try_link "$LINENO"; then :
30719  ac_cv_lib_gif_main=yes
30720else
30721  ac_cv_lib_gif_main=no
30722fi
30723rm -f core conftest.err conftest.$ac_objext \
30724    conftest$ac_exeext conftest.$ac_ext
30725LIBS=$ac_check_lib_save_LIBS
30726fi
30727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30728$as_echo "$ac_cv_lib_gif_main" >&6; }
30729if test "x$ac_cv_lib_gif_main" = xyes; then :
30730  cat >>confdefs.h <<_ACEOF
30731#define HAVE_LIBGIF 1
30732_ACEOF
30733
30734  LIBS="-lgif $LIBS"
30735
30736else
30737   USE_EXTERNAL_LIBGIF=false
30738               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30739$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30740
30741fi
30742
30743
30744
30745###############################################################################
30746#
30747# Check for the zlib library
30748#
30749
30750
30751# Check whether --with-zlib was given.
30752if test "${with_zlib+set}" = set; then :
30753  withval=$with_zlib;
30754fi
30755
30756
30757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30758$as_echo_n "checking for compress in -lz... " >&6; }
30759if ${ac_cv_lib_z_compress+:} false; then :
30760  $as_echo_n "(cached) " >&6
30761else
30762  ac_check_lib_save_LIBS=$LIBS
30763LIBS="-lz  $LIBS"
30764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30765/* end confdefs.h.  */
30766
30767/* Override any GCC internal prototype to avoid an error.
30768   Use char because int might match the return type of a GCC
30769   builtin and then its argument prototype would still apply.  */
30770#ifdef __cplusplus
30771extern "C"
30772#endif
30773char compress ();
30774int
30775main ()
30776{
30777return compress ();
30778  ;
30779  return 0;
30780}
30781_ACEOF
30782if ac_fn_cxx_try_link "$LINENO"; then :
30783  ac_cv_lib_z_compress=yes
30784else
30785  ac_cv_lib_z_compress=no
30786fi
30787rm -f core conftest.err conftest.$ac_objext \
30788    conftest$ac_exeext conftest.$ac_ext
30789LIBS=$ac_check_lib_save_LIBS
30790fi
30791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30792$as_echo "$ac_cv_lib_z_compress" >&6; }
30793if test "x$ac_cv_lib_z_compress" = xyes; then :
30794   ZLIB_FOUND=yes
30795else
30796   ZLIB_FOUND=no
30797fi
30798
30799
30800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30801$as_echo_n "checking for which zlib to use... " >&6; }
30802
30803DEFAULT_ZLIB=bundled
30804if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30805#
30806# On macosx default is system...on others default is
30807#
30808    DEFAULT_ZLIB=system
30809fi
30810
30811if test "x${ZLIB_FOUND}" != "xyes"; then
30812#
30813# If we don't find any system...set default to bundled
30814#
30815    DEFAULT_ZLIB=bundled
30816fi
30817
30818#
30819# If user didn't specify, use DEFAULT_ZLIB
30820#
30821if test "x${with_zlib}" = "x"; then
30822    with_zlib=${DEFAULT_ZLIB}
30823fi
30824
30825if test "x${with_zlib}" = "xbundled"; then
30826    USE_EXTERNAL_LIBZ=false
30827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30828$as_echo "bundled" >&6; }
30829elif test "x${with_zlib}" = "xsystem"; then
30830    if test "x${ZLIB_FOUND}" = "xyes"; then
30831        USE_EXTERNAL_LIBZ=true
30832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30833$as_echo "system" >&6; }
30834    else
30835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30836$as_echo "system not found" >&6; }
30837        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30838    fi
30839else
30840    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30841fi
30842
30843
30844
30845###############################################################################
30846LIBZIP_CAN_USE_MMAP=true
30847
30848
30849
30850###############################################################################
30851#
30852# Check if altzone exists in time.h
30853#
30854
30855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30856/* end confdefs.h.  */
30857#include <time.h>
30858int
30859main ()
30860{
30861return (int)altzone;
30862  ;
30863  return 0;
30864}
30865_ACEOF
30866if ac_fn_cxx_try_link "$LINENO"; then :
30867  has_altzone=yes
30868else
30869  has_altzone=no
30870fi
30871rm -f core conftest.err conftest.$ac_objext \
30872    conftest$ac_exeext conftest.$ac_ext
30873if test "x$has_altzone" = xyes; then
30874
30875$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30876
30877fi
30878
30879###############################################################################
30880#
30881# Check the maths library
30882#
30883
30884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30885$as_echo_n "checking for cos in -lm... " >&6; }
30886if ${ac_cv_lib_m_cos+:} false; then :
30887  $as_echo_n "(cached) " >&6
30888else
30889  ac_check_lib_save_LIBS=$LIBS
30890LIBS="-lm  $LIBS"
30891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30892/* end confdefs.h.  */
30893
30894/* Override any GCC internal prototype to avoid an error.
30895   Use char because int might match the return type of a GCC
30896   builtin and then its argument prototype would still apply.  */
30897#ifdef __cplusplus
30898extern "C"
30899#endif
30900char cos ();
30901int
30902main ()
30903{
30904return cos ();
30905  ;
30906  return 0;
30907}
30908_ACEOF
30909if ac_fn_cxx_try_link "$LINENO"; then :
30910  ac_cv_lib_m_cos=yes
30911else
30912  ac_cv_lib_m_cos=no
30913fi
30914rm -f core conftest.err conftest.$ac_objext \
30915    conftest$ac_exeext conftest.$ac_ext
30916LIBS=$ac_check_lib_save_LIBS
30917fi
30918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30919$as_echo "$ac_cv_lib_m_cos" >&6; }
30920if test "x$ac_cv_lib_m_cos" = xyes; then :
30921  cat >>confdefs.h <<_ACEOF
30922#define HAVE_LIBM 1
30923_ACEOF
30924
30925  LIBS="-lm $LIBS"
30926
30927else
30928
30929                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30930$as_echo "$as_me: Maths library was not found" >&6;}
30931
30932fi
30933
30934
30935
30936###############################################################################
30937#
30938# Check for libdl.so
30939
30940save_LIBS="$LIBS"
30941LIBS=""
30942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30943$as_echo_n "checking for dlopen in -ldl... " >&6; }
30944if ${ac_cv_lib_dl_dlopen+:} false; then :
30945  $as_echo_n "(cached) " >&6
30946else
30947  ac_check_lib_save_LIBS=$LIBS
30948LIBS="-ldl  $LIBS"
30949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30950/* end confdefs.h.  */
30951
30952/* Override any GCC internal prototype to avoid an error.
30953   Use char because int might match the return type of a GCC
30954   builtin and then its argument prototype would still apply.  */
30955#ifdef __cplusplus
30956extern "C"
30957#endif
30958char dlopen ();
30959int
30960main ()
30961{
30962return dlopen ();
30963  ;
30964  return 0;
30965}
30966_ACEOF
30967if ac_fn_cxx_try_link "$LINENO"; then :
30968  ac_cv_lib_dl_dlopen=yes
30969else
30970  ac_cv_lib_dl_dlopen=no
30971fi
30972rm -f core conftest.err conftest.$ac_objext \
30973    conftest$ac_exeext conftest.$ac_ext
30974LIBS=$ac_check_lib_save_LIBS
30975fi
30976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30977$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30978if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
30979  cat >>confdefs.h <<_ACEOF
30980#define HAVE_LIBDL 1
30981_ACEOF
30982
30983  LIBS="-ldl $LIBS"
30984
30985fi
30986
30987LIBDL="$LIBS"
30988
30989LIBS="$save_LIBS"
30990
30991
30992
30993###############################################################################
30994#
30995# statically link libstdc++ before C++ ABI is stablized on Linux unless
30996# dynamic build is configured on command line.
30997#
30998
30999# Check whether --with-stdc++lib was given.
31000if test "${with_stdc__lib+set}" = set; then :
31001  withval=$with_stdc__lib;
31002    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31003        && test "x$with_stdc__lib" != xdefault; then
31004      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31005    fi
31006
31007else
31008  with_stdc__lib=default
31009
31010fi
31011
31012
31013if test "x$OPENJDK_TARGET_OS" = xlinux; then
31014    # Test if -lstdc++ works.
31015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31016$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31017    ac_ext=cpp
31018ac_cpp='$CXXCPP $CPPFLAGS'
31019ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31020ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31021ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31022
31023    OLD_CXXFLAGS="$CXXFLAGS"
31024    CXXFLAGS="$CXXFLAGS -lstdc++"
31025    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31026/* end confdefs.h.  */
31027
31028int
31029main ()
31030{
31031return 0;
31032  ;
31033  return 0;
31034}
31035_ACEOF
31036if ac_fn_cxx_try_link "$LINENO"; then :
31037  has_dynamic_libstdcxx=yes
31038else
31039  has_dynamic_libstdcxx=no
31040fi
31041rm -f core conftest.err conftest.$ac_objext \
31042    conftest$ac_exeext conftest.$ac_ext
31043    CXXFLAGS="$OLD_CXXFLAGS"
31044    ac_ext=cpp
31045ac_cpp='$CXXCPP $CPPFLAGS'
31046ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31047ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31048ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31049
31050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31051$as_echo "$has_dynamic_libstdcxx" >&6; }
31052
31053    # Test if stdc++ can be linked statically.
31054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31055$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31056    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31057    ac_ext=cpp
31058ac_cpp='$CXXCPP $CPPFLAGS'
31059ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31060ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31061ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31062
31063    OLD_LIBS="$LIBS"
31064    OLD_CXX="$CXX"
31065    LIBS="$STATIC_STDCXX_FLAGS"
31066    CXX="$CC"
31067    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31068/* end confdefs.h.  */
31069
31070int
31071main ()
31072{
31073return 0;
31074  ;
31075  return 0;
31076}
31077_ACEOF
31078if ac_fn_cxx_try_link "$LINENO"; then :
31079  has_static_libstdcxx=yes
31080else
31081  has_static_libstdcxx=no
31082fi
31083rm -f core conftest.err conftest.$ac_objext \
31084    conftest$ac_exeext conftest.$ac_ext
31085    LIBS="$OLD_LIBS"
31086    CXX="$OLD_CXX"
31087    ac_ext=cpp
31088ac_cpp='$CXXCPP $CPPFLAGS'
31089ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31090ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31091ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31092
31093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31094$as_echo "$has_static_libstdcxx" >&6; }
31095
31096    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31097        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31098    fi
31099
31100    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31101        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31102    fi
31103
31104    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31105        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31106    fi
31107
31108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31109$as_echo_n "checking how to link with libstdc++... " >&6; }
31110    # If dynamic was requested, it's available since it would fail above otherwise.
31111    # If dynamic wasn't requested, go with static unless it isn't available.
31112    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31113        LIBCXX="$LIBCXX -lstdc++"
31114        LDCXX="$CXX"
31115        STATIC_CXX_SETTING="STATIC_CXX=false"
31116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31117$as_echo "dynamic" >&6; }
31118    else
31119        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31120        LDCXX="$CC"
31121        STATIC_CXX_SETTING="STATIC_CXX=true"
31122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31123$as_echo "static" >&6; }
31124    fi
31125fi
31126
31127
31128# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31129if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31130    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31131fi
31132
31133# TODO better (platform agnostic) test
31134if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31135    LIBCXX="-lstdc++"
31136fi
31137
31138
31139
31140
31141
31142# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31143
31144# When using cygwin or msys, we need a wrapper binary that renames
31145# /cygdrive/c/ arguments into c:/ arguments and peeks into
31146# @files and rewrites these too! This wrapper binary is
31147# called fixpath.
31148FIXPATH=
31149if test "x$OPENJDK_BUILD_OS" = xwindows; then
31150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31151$as_echo_n "checking if fixpath can be created... " >&6; }
31152    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31153    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31154    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31155      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31156      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31157      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31158      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31159    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31160      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31161      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31162
31163      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31164      # @ was chosen as separator to minimize risk of other tools messing around with it
31165      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31166      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31167
31168      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31169    fi
31170    rm -f $OUTPUT_ROOT/fixpath*
31171    cd $OUTPUT_ROOT
31172    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31173    cd $CURDIR
31174
31175    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31177$as_echo "no" >&6; }
31178        cat $OUTPUT_ROOT/fixpath1.log
31179        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31180    fi
31181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31182$as_echo "yes" >&6; }
31183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31184$as_echo_n "checking if fixpath.exe works... " >&6; }
31185    cd $OUTPUT_ROOT
31186    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31187    cd $CURDIR
31188    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31190$as_echo "no" >&6; }
31191        cat $OUTPUT_ROOT/fixpath2.log
31192        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31193    fi
31194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31195$as_echo "yes" >&6; }
31196    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31197fi
31198
31199
31200
31201
31202###############################################################################
31203#
31204# We need to do some final tweaking, when everything else is done.
31205#
31206###############################################################################
31207
31208
31209HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31210
31211
31212# The name of the Service Agent jar.
31213SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31214if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31215  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31216fi
31217
31218
31219
31220
31221###############################################################################
31222#
31223# Configure parts of the build that only affect the build performance,
31224# not the result.
31225#
31226###############################################################################
31227
31228
31229# How many cores do we have on this build system?
31230
31231# Check whether --with-num-cores was given.
31232if test "${with_num_cores+set}" = set; then :
31233  withval=$with_num_cores;
31234fi
31235
31236if test "x$with_num_cores" = x; then
31237    # The number of cores were not specified, try to probe them.
31238
31239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31240$as_echo_n "checking for number of cores... " >&6; }
31241    NUM_CORES=1
31242    FOUND_CORES=no
31243
31244    if test -f /proc/cpuinfo; then
31245        # Looks like a Linux (or cygwin) system
31246        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31247        FOUND_CORES=yes
31248    elif test -x /usr/sbin/psrinfo; then
31249        # Looks like a Solaris system
31250        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31251        FOUND_CORES=yes
31252    elif test -x /usr/sbin/system_profiler; then
31253        # Looks like a MacOSX system
31254        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31255        FOUND_CORES=yes
31256    elif test -n "$NUMBER_OF_PROCESSORS"; then
31257        # On windows, look in the env
31258        NUM_CORES=$NUMBER_OF_PROCESSORS
31259        FOUND_CORES=yes
31260    fi
31261
31262    # For c/c++ code we run twice as many concurrent build
31263    # jobs than we have cores, otherwise we will stall on io.
31264    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31265
31266    if test "x$FOUND_CORES" = xyes; then
31267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31268$as_echo "$NUM_CORES" >&6; }
31269    else
31270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31271$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31272        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31273$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31274    fi
31275
31276
31277else
31278    NUM_CORES=$with_num_cores
31279    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31280fi
31281
31282
31283
31284
31285# How much memory do we have on this build system?
31286
31287# Check whether --with-memory-size was given.
31288if test "${with_memory_size+set}" = set; then :
31289  withval=$with_memory_size;
31290fi
31291
31292if test "x$with_memory_size" = x; then
31293    # The memory size was not specified, try to probe it.
31294
31295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31296$as_echo_n "checking for memory size... " >&6; }
31297    # Default to 1024 MB
31298    MEMORY_SIZE=1024
31299    FOUND_MEM=no
31300
31301    if test -f /proc/meminfo; then
31302        # Looks like a Linux (or cygwin) system
31303        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31304        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31305        FOUND_MEM=yes
31306    elif test -x /usr/sbin/prtconf; then
31307        # Looks like a Solaris system
31308        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31309        FOUND_MEM=yes
31310    elif test -x /usr/sbin/system_profiler; then
31311        # Looks like a MacOSX system
31312        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31313        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31314        FOUND_MEM=yes
31315    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31316        # Windows, but without cygwin
31317        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31318        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31319        FOUND_MEM=yes
31320    fi
31321
31322    if test "x$FOUND_MEM" = xyes; then
31323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31324$as_echo "$MEMORY_SIZE MB" >&6; }
31325    else
31326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31327$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31328        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31329$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31330    fi
31331
31332else
31333    MEMORY_SIZE=$with_memory_size
31334fi
31335
31336
31337
31338# Setup smart javac (after cores and memory have been setup)
31339
31340
31341# Check whether --with-sjavac-server-java was given.
31342if test "${with_sjavac_server_java+set}" = set; then :
31343  withval=$with_sjavac_server_java;
31344fi
31345
31346
31347if test "x$with_sjavac_server_java" != x; then
31348    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31349    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31350    if test "x$FOUND_VERSION" = x; then
31351        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31352    fi
31353else
31354    SJAVAC_SERVER_JAVA=""
31355    # Hotspot specific options.
31356
31357    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31358    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31359    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31360    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31361    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31362        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31363    fi
31364
31365    # JRockit specific options.
31366
31367    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31368    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31369    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31370    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31371    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31372        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31373    fi
31374
31375    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31376fi
31377
31378
31379
31380# Check whether --with-sjavac-server-cores was given.
31381if test "${with_sjavac_server_cores+set}" = set; then :
31382  withval=$with_sjavac_server_cores;
31383fi
31384
31385if test "x$with_sjavac_server_cores" != x; then
31386    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31387else
31388    if test "$NUM_CORES" -gt 16; then
31389        # We set this arbitrary limit because we want to limit the heap
31390        # size of the javac server.
31391        # In the future we will make the javac compilers in the server
31392        # share more and more state, thus enabling us to use more and
31393        # more concurrent threads in the server.
31394        SJAVAC_SERVER_CORES="16"
31395    else
31396        SJAVAC_SERVER_CORES="$NUM_CORES"
31397    fi
31398
31399    if test "$MEMORY_SIZE" -gt "17000"; then
31400        MAX_HEAP_MEM=10000
31401
31402    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31403    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31404    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31405    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31406    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31407        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31408    fi
31409
31410
31411    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31412    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31413    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31414    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31415    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31416        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31417    fi
31418
31419    elif test "$MEMORY_SIZE" -gt "10000"; then
31420        MAX_HEAP_MEM=6000
31421
31422    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31423    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31424    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31425    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31426    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31427        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31428    fi
31429
31430
31431    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31432    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31433    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31434    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31435    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31436        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31437    fi
31438
31439    elif test "$MEMORY_SIZE" -gt "5000"; then
31440        MAX_HEAP_MEM=3000
31441
31442    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31443    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31444    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31445    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31446    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31447        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31448    fi
31449
31450
31451    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31452    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31453    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31454    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31455    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31456        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31457    fi
31458
31459    elif test "$MEMORY_SIZE" -gt "3800"; then
31460        MAX_HEAP_MEM=2500
31461
31462    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31463    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31464    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31465    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31466    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31467        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31468    fi
31469
31470    elif test "$MEMORY_SIZE" -gt "1900"; then
31471        MAX_HEAP_MEM=1200
31472
31473    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31474    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31475    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31476    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31477    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31478        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31479    fi
31480
31481    elif test "$MEMORY_SIZE" -gt "1000"; then
31482        MAX_HEAP_MEM=900
31483
31484    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31485    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31486    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31487    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31488    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31489        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31490    fi
31491
31492    else
31493        MAX_HEAP_MEM=512
31494
31495    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31496    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31497    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31498    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31499    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31500        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31501    fi
31502
31503    fi
31504
31505
31506    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31507    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31508    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31509    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31510    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31511        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31512    fi
31513
31514
31515    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31516    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31517    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31518    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31519    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31520        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31521    fi
31522
31523
31524    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31525    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31526    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31527    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31528    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31529        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31530    fi
31531
31532
31533    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31534    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31535        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31536$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31537        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31539$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31540    fi
31541fi
31542
31543
31544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31545$as_echo_n "checking whether to use sjavac... " >&6; }
31546# Check whether --enable-sjavac was given.
31547if test "${enable_sjavac+set}" = set; then :
31548  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31549else
31550  ENABLE_SJAVAC='no'
31551fi
31552
31553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31554$as_echo "$ENABLE_SJAVAC" >&6; }
31555
31556
31557if test "x$ENABLE_SJAVAC" = xyes; then
31558    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31559else
31560    SJAVAC_SERVER_DIR=
31561fi
31562
31563
31564
31565
31566# Can the C/C++ compiler use precompiled headers?
31567
31568
31569###############################################################################
31570#
31571# Can the C/C++ compiler use precompiled headers?
31572#
31573# Check whether --enable-precompiled-headers was given.
31574if test "${enable_precompiled_headers+set}" = set; then :
31575  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31576else
31577  ENABLE_PRECOMPH=yes
31578fi
31579
31580
31581USE_PRECOMPILED_HEADER=1
31582if test "x$ENABLE_PRECOMPH" = xno; then
31583    USE_PRECOMPILED_HEADER=0
31584fi
31585
31586if test "x$ENABLE_PRECOMPH" = xyes; then
31587    # Check that the compiler actually supports precomp headers.
31588    if test "x$GCC" = xyes; then
31589         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31590$as_echo_n "checking that precompiled headers work... " >&6; }
31591         echo "int alfa();" > conftest.h
31592         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31593         if test ! -f conftest.hpp.gch; then
31594             USE_PRECOMPILED_HEADER=0
31595             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31596$as_echo "no" >&6; }
31597         else
31598             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31599$as_echo "yes" >&6; }
31600         fi
31601         rm -f conftest.h conftest.hpp.gch
31602    fi
31603fi
31604
31605
31606
31607
31608# Setup use of ccache, if available
31609
31610    # Check whether --enable-ccache was given.
31611if test "${enable_ccache+set}" = set; then :
31612  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31613else
31614  ENABLE_CCACHE=yes
31615fi
31616
31617    if test "x$ENABLE_CCACHE" = xyes; then
31618        # Extract the first word of "ccache", so it can be a program name with args.
31619set dummy ccache; ac_word=$2
31620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31621$as_echo_n "checking for $ac_word... " >&6; }
31622if ${ac_cv_path_CCACHE+:} false; then :
31623  $as_echo_n "(cached) " >&6
31624else
31625  case $CCACHE in
31626  [\\/]* | ?:[\\/]*)
31627  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31628  ;;
31629  *)
31630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31631for as_dir in $PATH
31632do
31633  IFS=$as_save_IFS
31634  test -z "$as_dir" && as_dir=.
31635    for ac_exec_ext in '' $ac_executable_extensions; do
31636  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31637    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31639    break 2
31640  fi
31641done
31642  done
31643IFS=$as_save_IFS
31644
31645  ;;
31646esac
31647fi
31648CCACHE=$ac_cv_path_CCACHE
31649if test -n "$CCACHE"; then
31650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31651$as_echo "$CCACHE" >&6; }
31652else
31653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31654$as_echo "no" >&6; }
31655fi
31656
31657
31658    else
31659        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31660$as_echo_n "checking for ccache... " >&6; }
31661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31662$as_echo "explicitly disabled" >&6; }
31663        CCACHE=
31664    fi
31665
31666
31667
31668# Check whether --with-ccache-dir was given.
31669if test "${with_ccache_dir+set}" = set; then :
31670  withval=$with_ccache_dir;
31671fi
31672
31673
31674    if test "x$with_ccache_dir" != x; then
31675        # When using a non home ccache directory, assume the use is to share ccache files
31676        # with other users. Thus change the umask.
31677        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31678    fi
31679    CCACHE_FOUND=""
31680    if test "x$CCACHE" != x; then
31681
31682    if test "x$CCACHE" != x; then
31683        CCACHE_FOUND="true"
31684        # Only use ccache if it is 3.1.4 or later, which supports
31685        # precompiled headers.
31686        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31687$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31688        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31689        if test "x$HAS_GOOD_CCACHE" = x; then
31690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31691$as_echo "no, disabling ccache" >&6; }
31692            CCACHE=
31693        else
31694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31695$as_echo "yes" >&6; }
31696            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31697$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31698            PUSHED_FLAGS="$CXXFLAGS"
31699            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31700            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31701/* end confdefs.h.  */
31702
31703int
31704main ()
31705{
31706
31707  ;
31708  return 0;
31709}
31710_ACEOF
31711if ac_fn_cxx_try_compile "$LINENO"; then :
31712  CC_KNOWS_CCACHE_TRICK=yes
31713else
31714  CC_KNOWS_CCACHE_TRICK=no
31715fi
31716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31717            CXXFLAGS="$PUSHED_FLAGS"
31718            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31719                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31720$as_echo "yes" >&6; }
31721            else
31722                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31723$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31724                CCACHE=
31725            fi
31726        fi
31727    fi
31728
31729    if test "x$CCACHE" != x; then
31730        CCACHE_SLOPPINESS=time_macros
31731        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31732        CCACHE_FLAGS=-fpch-preprocess
31733
31734        if test "x$SET_CCACHE_DIR" != x; then
31735            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31736	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31737        fi
31738    fi
31739
31740    fi
31741
31742
31743###############################################################################
31744#
31745# And now the finish...
31746#
31747###############################################################################
31748
31749# Check for some common pitfalls
31750
31751  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31752    file_to_test="$SRC_ROOT/LICENSE"
31753    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31754      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
31755    fi
31756  fi
31757
31758
31759
31760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31761$as_echo_n "checking if build directory is on local disk... " >&6; }
31762
31763	# df -l lists only local disks; if the given directory is not found then
31764	# a non-zero exit code is given
31765  if test "x$DF" = x; then
31766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31767      # msys does not have df; use Windows "net use" instead.
31768      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31769      if test "x$IS_NETWORK_DISK" = x; then
31770        OUTPUT_DIR_IS_LOCAL="yes"
31771      else
31772        OUTPUT_DIR_IS_LOCAL="no"
31773      fi
31774    else
31775      # No df here, say it's local
31776      OUTPUT_DIR_IS_LOCAL="yes"
31777    fi
31778  else
31779    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31780      OUTPUT_DIR_IS_LOCAL="yes"
31781    else
31782      OUTPUT_DIR_IS_LOCAL="no"
31783    fi
31784  fi
31785
31786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31787$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31788
31789
31790
31791# Check if the user has any old-style ALT_ variables set.
31792FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31793
31794# Before generating output files, test if they exist. If they do, this is a reconfigure.
31795# Since we can't properly handle the dependencies for this, warn the user about the situation
31796if test -e $OUTPUT_ROOT/spec.gmk; then
31797  IS_RECONFIGURE=yes
31798else
31799  IS_RECONFIGURE=no
31800fi
31801
31802if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31803  HIDE_PERFORMANCE_HINTS=yes
31804else
31805  HIDE_PERFORMANCE_HINTS=no
31806  # Hide it the next time around...
31807  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31808fi
31809
31810
31811
31812# At the end, call the custom hook. (Dummy macro if no custom sources available)
31813
31814
31815# We're messing a bit with internal autoconf variables to put the config.status
31816# in the output directory instead of the current directory.
31817CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31818# Create the actual output files. Now the main work of configure is done.
31819cat >confcache <<\_ACEOF
31820# This file is a shell script that caches the results of configure
31821# tests run on this system so they can be shared between configure
31822# scripts and configure runs, see configure's option --config-cache.
31823# It is not useful on other systems.  If it contains results you don't
31824# want to keep, you may remove or edit it.
31825#
31826# config.status only pays attention to the cache file if you give it
31827# the --recheck option to rerun configure.
31828#
31829# `ac_cv_env_foo' variables (set or unset) will be overridden when
31830# loading this file, other *unset* `ac_cv_foo' will be assigned the
31831# following values.
31832
31833_ACEOF
31834
31835# The following way of writing the cache mishandles newlines in values,
31836# but we know of no workaround that is simple, portable, and efficient.
31837# So, we kill variables containing newlines.
31838# Ultrix sh set writes to stderr and can't be redirected directly,
31839# and sets the high bit in the cache file unless we assign to the vars.
31840(
31841  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31842    eval ac_val=\$$ac_var
31843    case $ac_val in #(
31844    *${as_nl}*)
31845      case $ac_var in #(
31846      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31847$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31848      esac
31849      case $ac_var in #(
31850      _ | IFS | as_nl) ;; #(
31851      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31852      *) { eval $ac_var=; unset $ac_var;} ;;
31853      esac ;;
31854    esac
31855  done
31856
31857  (set) 2>&1 |
31858    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31859    *${as_nl}ac_space=\ *)
31860      # `set' does not quote correctly, so add quotes: double-quote
31861      # substitution turns \\\\ into \\, and sed turns \\ into \.
31862      sed -n \
31863	"s/'/'\\\\''/g;
31864	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31865      ;; #(
31866    *)
31867      # `set' quotes correctly as required by POSIX, so do not add quotes.
31868      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31869      ;;
31870    esac |
31871    sort
31872) |
31873  sed '
31874     /^ac_cv_env_/b end
31875     t clear
31876     :clear
31877     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31878     t end
31879     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31880     :end' >>confcache
31881if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31882  if test -w "$cache_file"; then
31883    if test "x$cache_file" != "x/dev/null"; then
31884      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31885$as_echo "$as_me: updating cache $cache_file" >&6;}
31886      if test ! -f "$cache_file" || test -h "$cache_file"; then
31887	cat confcache >"$cache_file"
31888      else
31889        case $cache_file in #(
31890        */* | ?:*)
31891	  mv -f confcache "$cache_file"$$ &&
31892	  mv -f "$cache_file"$$ "$cache_file" ;; #(
31893        *)
31894	  mv -f confcache "$cache_file" ;;
31895	esac
31896      fi
31897    fi
31898  else
31899    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31900$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31901  fi
31902fi
31903rm -f confcache
31904
31905test "x$prefix" = xNONE && prefix=$ac_default_prefix
31906# Let make expand exec_prefix.
31907test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31908
31909DEFS=-DHAVE_CONFIG_H
31910
31911ac_libobjs=
31912ac_ltlibobjs=
31913U=
31914for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31915  # 1. Remove the extension, and $U if already installed.
31916  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31917  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31918  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31919  #    will be set to the directory where LIBOBJS objects are built.
31920  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31921  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31922done
31923LIBOBJS=$ac_libobjs
31924
31925LTLIBOBJS=$ac_ltlibobjs
31926
31927
31928
31929: "${CONFIG_STATUS=./config.status}"
31930ac_write_fail=0
31931ac_clean_files_save=$ac_clean_files
31932ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31933{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31934$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31935as_write_fail=0
31936cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31937#! $SHELL
31938# Generated by $as_me.
31939# Run this file to recreate the current configuration.
31940# Compiler output produced by configure, useful for debugging
31941# configure, is in config.log if it exists.
31942
31943debug=false
31944ac_cs_recheck=false
31945ac_cs_silent=false
31946
31947SHELL=\${CONFIG_SHELL-$SHELL}
31948export SHELL
31949_ASEOF
31950cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31951## -------------------- ##
31952## M4sh Initialization. ##
31953## -------------------- ##
31954
31955# Be more Bourne compatible
31956DUALCASE=1; export DUALCASE # for MKS sh
31957if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31958  emulate sh
31959  NULLCMD=:
31960  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31961  # is contrary to our usage.  Disable this feature.
31962  alias -g '${1+"$@"}'='"$@"'
31963  setopt NO_GLOB_SUBST
31964else
31965  case `(set -o) 2>/dev/null` in #(
31966  *posix*) :
31967    set -o posix ;; #(
31968  *) :
31969     ;;
31970esac
31971fi
31972
31973
31974as_nl='
31975'
31976export as_nl
31977# Printing a long string crashes Solaris 7 /usr/bin/printf.
31978as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31979as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31980as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31981# Prefer a ksh shell builtin over an external printf program on Solaris,
31982# but without wasting forks for bash or zsh.
31983if test -z "$BASH_VERSION$ZSH_VERSION" \
31984    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31985  as_echo='print -r --'
31986  as_echo_n='print -rn --'
31987elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31988  as_echo='printf %s\n'
31989  as_echo_n='printf %s'
31990else
31991  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31992    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31993    as_echo_n='/usr/ucb/echo -n'
31994  else
31995    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31996    as_echo_n_body='eval
31997      arg=$1;
31998      case $arg in #(
31999      *"$as_nl"*)
32000	expr "X$arg" : "X\\(.*\\)$as_nl";
32001	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32002      esac;
32003      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32004    '
32005    export as_echo_n_body
32006    as_echo_n='sh -c $as_echo_n_body as_echo'
32007  fi
32008  export as_echo_body
32009  as_echo='sh -c $as_echo_body as_echo'
32010fi
32011
32012# The user is always right.
32013if test "${PATH_SEPARATOR+set}" != set; then
32014  PATH_SEPARATOR=:
32015  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32016    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32017      PATH_SEPARATOR=';'
32018  }
32019fi
32020
32021
32022# IFS
32023# We need space, tab and new line, in precisely that order.  Quoting is
32024# there to prevent editors from complaining about space-tab.
32025# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32026# splitting by setting IFS to empty value.)
32027IFS=" ""	$as_nl"
32028
32029# Find who we are.  Look in the path if we contain no directory separator.
32030as_myself=
32031case $0 in #((
32032  *[\\/]* ) as_myself=$0 ;;
32033  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32034for as_dir in $PATH
32035do
32036  IFS=$as_save_IFS
32037  test -z "$as_dir" && as_dir=.
32038    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32039  done
32040IFS=$as_save_IFS
32041
32042     ;;
32043esac
32044# We did not find ourselves, most probably we were run as `sh COMMAND'
32045# in which case we are not to be found in the path.
32046if test "x$as_myself" = x; then
32047  as_myself=$0
32048fi
32049if test ! -f "$as_myself"; then
32050  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32051  exit 1
32052fi
32053
32054# Unset variables that we do not need and which cause bugs (e.g. in
32055# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32056# suppresses any "Segmentation fault" message there.  '((' could
32057# trigger a bug in pdksh 5.2.14.
32058for as_var in BASH_ENV ENV MAIL MAILPATH
32059do eval test x\${$as_var+set} = xset \
32060  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32061done
32062PS1='$ '
32063PS2='> '
32064PS4='+ '
32065
32066# NLS nuisances.
32067LC_ALL=C
32068export LC_ALL
32069LANGUAGE=C
32070export LANGUAGE
32071
32072# CDPATH.
32073(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32074
32075
32076# as_fn_error STATUS ERROR [LINENO LOG_FD]
32077# ----------------------------------------
32078# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32079# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32080# script with STATUS, using 1 if that was 0.
32081as_fn_error ()
32082{
32083  as_status=$1; test $as_status -eq 0 && as_status=1
32084  if test "$4"; then
32085    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32086    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32087  fi
32088  $as_echo "$as_me: error: $2" >&2
32089  as_fn_exit $as_status
32090} # as_fn_error
32091
32092
32093# as_fn_set_status STATUS
32094# -----------------------
32095# Set $? to STATUS, without forking.
32096as_fn_set_status ()
32097{
32098  return $1
32099} # as_fn_set_status
32100
32101# as_fn_exit STATUS
32102# -----------------
32103# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32104as_fn_exit ()
32105{
32106  set +e
32107  as_fn_set_status $1
32108  exit $1
32109} # as_fn_exit
32110
32111# as_fn_unset VAR
32112# ---------------
32113# Portably unset VAR.
32114as_fn_unset ()
32115{
32116  { eval $1=; unset $1;}
32117}
32118as_unset=as_fn_unset
32119# as_fn_append VAR VALUE
32120# ----------------------
32121# Append the text in VALUE to the end of the definition contained in VAR. Take
32122# advantage of any shell optimizations that allow amortized linear growth over
32123# repeated appends, instead of the typical quadratic growth present in naive
32124# implementations.
32125if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32126  eval 'as_fn_append ()
32127  {
32128    eval $1+=\$2
32129  }'
32130else
32131  as_fn_append ()
32132  {
32133    eval $1=\$$1\$2
32134  }
32135fi # as_fn_append
32136
32137# as_fn_arith ARG...
32138# ------------------
32139# Perform arithmetic evaluation on the ARGs, and store the result in the
32140# global $as_val. Take advantage of shells that can avoid forks. The arguments
32141# must be portable across $(()) and expr.
32142if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32143  eval 'as_fn_arith ()
32144  {
32145    as_val=$(( $* ))
32146  }'
32147else
32148  as_fn_arith ()
32149  {
32150    as_val=`expr "$@" || test $? -eq 1`
32151  }
32152fi # as_fn_arith
32153
32154
32155if expr a : '\(a\)' >/dev/null 2>&1 &&
32156   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32157  as_expr=expr
32158else
32159  as_expr=false
32160fi
32161
32162if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32163  as_basename=basename
32164else
32165  as_basename=false
32166fi
32167
32168if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32169  as_dirname=dirname
32170else
32171  as_dirname=false
32172fi
32173
32174as_me=`$as_basename -- "$0" ||
32175$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32176	 X"$0" : 'X\(//\)$' \| \
32177	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32178$as_echo X/"$0" |
32179    sed '/^.*\/\([^/][^/]*\)\/*$/{
32180	    s//\1/
32181	    q
32182	  }
32183	  /^X\/\(\/\/\)$/{
32184	    s//\1/
32185	    q
32186	  }
32187	  /^X\/\(\/\).*/{
32188	    s//\1/
32189	    q
32190	  }
32191	  s/.*/./; q'`
32192
32193# Avoid depending upon Character Ranges.
32194as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32195as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32196as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32197as_cr_digits='0123456789'
32198as_cr_alnum=$as_cr_Letters$as_cr_digits
32199
32200ECHO_C= ECHO_N= ECHO_T=
32201case `echo -n x` in #(((((
32202-n*)
32203  case `echo 'xy\c'` in
32204  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32205  xy)  ECHO_C='\c';;
32206  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32207       ECHO_T='	';;
32208  esac;;
32209*)
32210  ECHO_N='-n';;
32211esac
32212
32213rm -f conf$$ conf$$.exe conf$$.file
32214if test -d conf$$.dir; then
32215  rm -f conf$$.dir/conf$$.file
32216else
32217  rm -f conf$$.dir
32218  mkdir conf$$.dir 2>/dev/null
32219fi
32220if (echo >conf$$.file) 2>/dev/null; then
32221  if ln -s conf$$.file conf$$ 2>/dev/null; then
32222    as_ln_s='ln -s'
32223    # ... but there are two gotchas:
32224    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32225    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32226    # In both cases, we have to default to `cp -p'.
32227    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32228      as_ln_s='cp -p'
32229  elif ln conf$$.file conf$$ 2>/dev/null; then
32230    as_ln_s=ln
32231  else
32232    as_ln_s='cp -p'
32233  fi
32234else
32235  as_ln_s='cp -p'
32236fi
32237rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32238rmdir conf$$.dir 2>/dev/null
32239
32240
32241# as_fn_mkdir_p
32242# -------------
32243# Create "$as_dir" as a directory, including parents if necessary.
32244as_fn_mkdir_p ()
32245{
32246
32247  case $as_dir in #(
32248  -*) as_dir=./$as_dir;;
32249  esac
32250  test -d "$as_dir" || eval $as_mkdir_p || {
32251    as_dirs=
32252    while :; do
32253      case $as_dir in #(
32254      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32255      *) as_qdir=$as_dir;;
32256      esac
32257      as_dirs="'$as_qdir' $as_dirs"
32258      as_dir=`$as_dirname -- "$as_dir" ||
32259$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32260	 X"$as_dir" : 'X\(//\)[^/]' \| \
32261	 X"$as_dir" : 'X\(//\)$' \| \
32262	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32263$as_echo X"$as_dir" |
32264    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32265	    s//\1/
32266	    q
32267	  }
32268	  /^X\(\/\/\)[^/].*/{
32269	    s//\1/
32270	    q
32271	  }
32272	  /^X\(\/\/\)$/{
32273	    s//\1/
32274	    q
32275	  }
32276	  /^X\(\/\).*/{
32277	    s//\1/
32278	    q
32279	  }
32280	  s/.*/./; q'`
32281      test -d "$as_dir" && break
32282    done
32283    test -z "$as_dirs" || eval "mkdir $as_dirs"
32284  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32285
32286
32287} # as_fn_mkdir_p
32288if mkdir -p . 2>/dev/null; then
32289  as_mkdir_p='mkdir -p "$as_dir"'
32290else
32291  test -d ./-p && rmdir ./-p
32292  as_mkdir_p=false
32293fi
32294
32295if test -x / >/dev/null 2>&1; then
32296  as_test_x='test -x'
32297else
32298  if ls -dL / >/dev/null 2>&1; then
32299    as_ls_L_option=L
32300  else
32301    as_ls_L_option=
32302  fi
32303  as_test_x='
32304    eval sh -c '\''
32305      if test -d "$1"; then
32306	test -d "$1/.";
32307      else
32308	case $1 in #(
32309	-*)set "./$1";;
32310	esac;
32311	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32312	???[sx]*):;;*)false;;esac;fi
32313    '\'' sh
32314  '
32315fi
32316as_executable_p=$as_test_x
32317
32318# Sed expression to map a string onto a valid CPP name.
32319as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32320
32321# Sed expression to map a string onto a valid variable name.
32322as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32323
32324
32325exec 6>&1
32326## ----------------------------------- ##
32327## Main body of $CONFIG_STATUS script. ##
32328## ----------------------------------- ##
32329_ASEOF
32330test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32331
32332cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32333# Save the log message, to keep $0 and so on meaningful, and to
32334# report actual input values of CONFIG_FILES etc. instead of their
32335# values after options handling.
32336ac_log="
32337This file was extended by OpenJDK $as_me jdk8, which was
32338generated by GNU Autoconf 2.68.  Invocation command line was
32339
32340  CONFIG_FILES    = $CONFIG_FILES
32341  CONFIG_HEADERS  = $CONFIG_HEADERS
32342  CONFIG_LINKS    = $CONFIG_LINKS
32343  CONFIG_COMMANDS = $CONFIG_COMMANDS
32344  $ $0 $@
32345
32346on `(hostname || uname -n) 2>/dev/null | sed 1q`
32347"
32348
32349_ACEOF
32350
32351case $ac_config_files in *"
32352"*) set x $ac_config_files; shift; ac_config_files=$*;;
32353esac
32354
32355case $ac_config_headers in *"
32356"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32357esac
32358
32359
32360cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32361# Files that config.status was made for.
32362config_files="$ac_config_files"
32363config_headers="$ac_config_headers"
32364
32365_ACEOF
32366
32367cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32368ac_cs_usage="\
32369\`$as_me' instantiates files and other configuration actions
32370from templates according to the current configuration.  Unless the files
32371and actions are specified as TAGs, all are instantiated by default.
32372
32373Usage: $0 [OPTION]... [TAG]...
32374
32375  -h, --help       print this help, then exit
32376  -V, --version    print version number and configuration settings, then exit
32377      --config     print configuration, then exit
32378  -q, --quiet, --silent
32379                   do not print progress messages
32380  -d, --debug      don't remove temporary files
32381      --recheck    update $as_me by reconfiguring in the same conditions
32382      --file=FILE[:TEMPLATE]
32383                   instantiate the configuration file FILE
32384      --header=FILE[:TEMPLATE]
32385                   instantiate the configuration header FILE
32386
32387Configuration files:
32388$config_files
32389
32390Configuration headers:
32391$config_headers
32392
32393Report bugs to <build-dev@openjdk.java.net>.
32394OpenJDK home page: <http://openjdk.java.net>."
32395
32396_ACEOF
32397cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32398ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32399ac_cs_version="\\
32400OpenJDK config.status jdk8
32401configured by $0, generated by GNU Autoconf 2.68,
32402  with options \\"\$ac_cs_config\\"
32403
32404Copyright (C) 2010 Free Software Foundation, Inc.
32405This config.status script is free software; the Free Software Foundation
32406gives unlimited permission to copy, distribute and modify it."
32407
32408ac_pwd='$ac_pwd'
32409srcdir='$srcdir'
32410AWK='$AWK'
32411test -n "\$AWK" || AWK=awk
32412_ACEOF
32413
32414cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32415# The default lists apply if the user does not specify any file.
32416ac_need_defaults=:
32417while test $# != 0
32418do
32419  case $1 in
32420  --*=?*)
32421    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32422    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32423    ac_shift=:
32424    ;;
32425  --*=)
32426    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32427    ac_optarg=
32428    ac_shift=:
32429    ;;
32430  *)
32431    ac_option=$1
32432    ac_optarg=$2
32433    ac_shift=shift
32434    ;;
32435  esac
32436
32437  case $ac_option in
32438  # Handling of the options.
32439  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32440    ac_cs_recheck=: ;;
32441  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32442    $as_echo "$ac_cs_version"; exit ;;
32443  --config | --confi | --conf | --con | --co | --c )
32444    $as_echo "$ac_cs_config"; exit ;;
32445  --debug | --debu | --deb | --de | --d | -d )
32446    debug=: ;;
32447  --file | --fil | --fi | --f )
32448    $ac_shift
32449    case $ac_optarg in
32450    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32451    '') as_fn_error $? "missing file argument" ;;
32452    esac
32453    as_fn_append CONFIG_FILES " '$ac_optarg'"
32454    ac_need_defaults=false;;
32455  --header | --heade | --head | --hea )
32456    $ac_shift
32457    case $ac_optarg in
32458    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32459    esac
32460    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32461    ac_need_defaults=false;;
32462  --he | --h)
32463    # Conflict between --help and --header
32464    as_fn_error $? "ambiguous option: \`$1'
32465Try \`$0 --help' for more information.";;
32466  --help | --hel | -h )
32467    $as_echo "$ac_cs_usage"; exit ;;
32468  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32469  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32470    ac_cs_silent=: ;;
32471
32472  # This is an error.
32473  -*) as_fn_error $? "unrecognized option: \`$1'
32474Try \`$0 --help' for more information." ;;
32475
32476  *) as_fn_append ac_config_targets " $1"
32477     ac_need_defaults=false ;;
32478
32479  esac
32480  shift
32481done
32482
32483ac_configure_extra_args=
32484
32485if $ac_cs_silent; then
32486  exec 6>/dev/null
32487  ac_configure_extra_args="$ac_configure_extra_args --silent"
32488fi
32489
32490_ACEOF
32491cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32492if \$ac_cs_recheck; then
32493  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32494  shift
32495  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32496  CONFIG_SHELL='$SHELL'
32497  export CONFIG_SHELL
32498  exec "\$@"
32499fi
32500
32501_ACEOF
32502cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32503exec 5>>config.log
32504{
32505  echo
32506  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32507## Running $as_me. ##
32508_ASBOX
32509  $as_echo "$ac_log"
32510} >&5
32511
32512_ACEOF
32513cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32514_ACEOF
32515
32516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32517
32518# Handling of arguments.
32519for ac_config_target in $ac_config_targets
32520do
32521  case $ac_config_target in
32522    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32523    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32524    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32525    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32526    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32527    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32528    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32529
32530  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
32531  esac
32532done
32533
32534
32535# If the user did not use the arguments to specify the items to instantiate,
32536# then the envvar interface is used.  Set only those that are not.
32537# We use the long form for the default assignment because of an extremely
32538# bizarre bug on SunOS 4.1.3.
32539if $ac_need_defaults; then
32540  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32541  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32542fi
32543
32544# Have a temporary directory for convenience.  Make it in the build tree
32545# simply because there is no reason against having it here, and in addition,
32546# creating and moving files from /tmp can sometimes cause problems.
32547# Hook for its removal unless debugging.
32548# Note that there is a small window in which the directory will not be cleaned:
32549# after its creation but before its name has been assigned to `$tmp'.
32550$debug ||
32551{
32552  tmp= ac_tmp=
32553  trap 'exit_status=$?
32554  : "${ac_tmp:=$tmp}"
32555  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
32556' 0
32557  trap 'as_fn_exit 1' 1 2 13 15
32558}
32559# Create a (secure) tmp directory for tmp files.
32560
32561{
32562  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32563  test -d "$tmp"
32564}  ||
32565{
32566  tmp=./conf$$-$RANDOM
32567  (umask 077 && mkdir "$tmp")
32568} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32569ac_tmp=$tmp
32570
32571# Set up the scripts for CONFIG_FILES section.
32572# No need to generate them if there are no CONFIG_FILES.
32573# This happens for instance with `./config.status config.h'.
32574if test -n "$CONFIG_FILES"; then
32575
32576
32577ac_cr=`echo X | tr X '\015'`
32578# On cygwin, bash can eat \r inside `` if the user requested igncr.
32579# But we know of no other shell where ac_cr would be empty at this
32580# point, so we can use a bashism as a fallback.
32581if test "x$ac_cr" = x; then
32582  eval ac_cr=\$\'\\r\'
32583fi
32584ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32585if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32586  ac_cs_awk_cr='\\r'
32587else
32588  ac_cs_awk_cr=$ac_cr
32589fi
32590
32591echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
32592_ACEOF
32593
32594
32595{
32596  echo "cat >conf$$subs.awk <<_ACEOF" &&
32597  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32598  echo "_ACEOF"
32599} >conf$$subs.sh ||
32600  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32601ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32602ac_delim='%!_!# '
32603for ac_last_try in false false false false false :; do
32604  . ./conf$$subs.sh ||
32605    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32606
32607  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32608  if test $ac_delim_n = $ac_delim_num; then
32609    break
32610  elif $ac_last_try; then
32611    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32612  else
32613    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32614  fi
32615done
32616rm -f conf$$subs.sh
32617
32618cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32619cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
32620_ACEOF
32621sed -n '
32622h
32623s/^/S["/; s/!.*/"]=/
32624p
32625g
32626s/^[^!]*!//
32627:repl
32628t repl
32629s/'"$ac_delim"'$//
32630t delim
32631:nl
32632h
32633s/\(.\{148\}\)..*/\1/
32634t more1
32635s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32636p
32637n
32638b repl
32639:more1
32640s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32641p
32642g
32643s/.\{148\}//
32644t nl
32645:delim
32646h
32647s/\(.\{148\}\)..*/\1/
32648t more2
32649s/["\\]/\\&/g; s/^/"/; s/$/"/
32650p
32651b
32652:more2
32653s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32654p
32655g
32656s/.\{148\}//
32657t delim
32658' <conf$$subs.awk | sed '
32659/^[^""]/{
32660  N
32661  s/\n//
32662}
32663' >>$CONFIG_STATUS || ac_write_fail=1
32664rm -f conf$$subs.awk
32665cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32666_ACAWK
32667cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
32668  for (key in S) S_is_set[key] = 1
32669  FS = ""
32670
32671}
32672{
32673  line = $ 0
32674  nfields = split(line, field, "@")
32675  substed = 0
32676  len = length(field[1])
32677  for (i = 2; i < nfields; i++) {
32678    key = field[i]
32679    keylen = length(key)
32680    if (S_is_set[key]) {
32681      value = S[key]
32682      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32683      len += length(value) + length(field[++i])
32684      substed = 1
32685    } else
32686      len += 1 + keylen
32687  }
32688
32689  print line
32690}
32691
32692_ACAWK
32693_ACEOF
32694cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32695if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32696  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32697else
32698  cat
32699fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
32700  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32701_ACEOF
32702
32703# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32704# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32705# trailing colons and then remove the whole line if VPATH becomes empty
32706# (actually we leave an empty line to preserve line numbers).
32707if test "x$srcdir" = x.; then
32708  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32709h
32710s///
32711s/^/:/
32712s/[	 ]*$/:/
32713s/:\$(srcdir):/:/g
32714s/:\${srcdir}:/:/g
32715s/:@srcdir@:/:/g
32716s/^:*//
32717s/:*$//
32718x
32719s/\(=[	 ]*\).*/\1/
32720G
32721s/\n//
32722s/^[^=]*=[	 ]*$//
32723}'
32724fi
32725
32726cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32727fi # test -n "$CONFIG_FILES"
32728
32729# Set up the scripts for CONFIG_HEADERS section.
32730# No need to generate them if there are no CONFIG_HEADERS.
32731# This happens for instance with `./config.status Makefile'.
32732if test -n "$CONFIG_HEADERS"; then
32733cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
32734BEGIN {
32735_ACEOF
32736
32737# Transform confdefs.h into an awk script `defines.awk', embedded as
32738# here-document in config.status, that substitutes the proper values into
32739# config.h.in to produce config.h.
32740
32741# Create a delimiter string that does not exist in confdefs.h, to ease
32742# handling of long lines.
32743ac_delim='%!_!# '
32744for ac_last_try in false false :; do
32745  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
32746  if test -z "$ac_tt"; then
32747    break
32748  elif $ac_last_try; then
32749    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32750  else
32751    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32752  fi
32753done
32754
32755# For the awk script, D is an array of macro values keyed by name,
32756# likewise P contains macro parameters if any.  Preserve backslash
32757# newline sequences.
32758
32759ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32760sed -n '
32761s/.\{148\}/&'"$ac_delim"'/g
32762t rset
32763:rset
32764s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32765t def
32766d
32767:def
32768s/\\$//
32769t bsnl
32770s/["\\]/\\&/g
32771s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32772D["\1"]=" \3"/p
32773s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32774d
32775:bsnl
32776s/["\\]/\\&/g
32777s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32778D["\1"]=" \3\\\\\\n"\\/p
32779t cont
32780s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32781t cont
32782d
32783:cont
32784n
32785s/.\{148\}/&'"$ac_delim"'/g
32786t clear
32787:clear
32788s/\\$//
32789t bsnlc
32790s/["\\]/\\&/g; s/^/"/; s/$/"/p
32791d
32792:bsnlc
32793s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32794b cont
32795' <confdefs.h | sed '
32796s/'"$ac_delim"'/"\\\
32797"/g' >>$CONFIG_STATUS || ac_write_fail=1
32798
32799cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32800  for (key in D) D_is_set[key] = 1
32801  FS = ""
32802}
32803/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32804  line = \$ 0
32805  split(line, arg, " ")
32806  if (arg[1] == "#") {
32807    defundef = arg[2]
32808    mac1 = arg[3]
32809  } else {
32810    defundef = substr(arg[1], 2)
32811    mac1 = arg[2]
32812  }
32813  split(mac1, mac2, "(") #)
32814  macro = mac2[1]
32815  prefix = substr(line, 1, index(line, defundef) - 1)
32816  if (D_is_set[macro]) {
32817    # Preserve the white space surrounding the "#".
32818    print prefix "define", macro P[macro] D[macro]
32819    next
32820  } else {
32821    # Replace #undef with comments.  This is necessary, for example,
32822    # in the case of _POSIX_SOURCE, which is predefined and required
32823    # on some systems where configure will not decide to define it.
32824    if (defundef == "undef") {
32825      print "/*", prefix defundef, macro, "*/"
32826      next
32827    }
32828  }
32829}
32830{ print }
32831_ACAWK
32832_ACEOF
32833cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32834  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32835fi # test -n "$CONFIG_HEADERS"
32836
32837
32838eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32839shift
32840for ac_tag
32841do
32842  case $ac_tag in
32843  :[FHLC]) ac_mode=$ac_tag; continue;;
32844  esac
32845  case $ac_mode$ac_tag in
32846  :[FHL]*:*);;
32847  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32848  :[FH]-) ac_tag=-:-;;
32849  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32850  esac
32851  ac_save_IFS=$IFS
32852  IFS=:
32853  set x $ac_tag
32854  IFS=$ac_save_IFS
32855  shift
32856  ac_file=$1
32857  shift
32858
32859  case $ac_mode in
32860  :L) ac_source=$1;;
32861  :[FH])
32862    ac_file_inputs=
32863    for ac_f
32864    do
32865      case $ac_f in
32866      -) ac_f="$ac_tmp/stdin";;
32867      *) # Look for the file first in the build tree, then in the source tree
32868	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32869	 # because $ac_f cannot contain `:'.
32870	 test -f "$ac_f" ||
32871	   case $ac_f in
32872	   [\\/$]*) false;;
32873	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32874	   esac ||
32875	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32876      esac
32877      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32878      as_fn_append ac_file_inputs " '$ac_f'"
32879    done
32880
32881    # Let's still pretend it is `configure' which instantiates (i.e., don't
32882    # use $as_me), people would be surprised to read:
32883    #    /* config.h.  Generated by config.status.  */
32884    configure_input='Generated from '`
32885	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32886	`' by configure.'
32887    if test x"$ac_file" != x-; then
32888      configure_input="$ac_file.  $configure_input"
32889      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32890$as_echo "$as_me: creating $ac_file" >&6;}
32891    fi
32892    # Neutralize special characters interpreted by sed in replacement strings.
32893    case $configure_input in #(
32894    *\&* | *\|* | *\\* )
32895       ac_sed_conf_input=`$as_echo "$configure_input" |
32896       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32897    *) ac_sed_conf_input=$configure_input;;
32898    esac
32899
32900    case $ac_tag in
32901    *:-:* | *:-) cat >"$ac_tmp/stdin" \
32902      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32903    esac
32904    ;;
32905  esac
32906
32907  ac_dir=`$as_dirname -- "$ac_file" ||
32908$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32909	 X"$ac_file" : 'X\(//\)[^/]' \| \
32910	 X"$ac_file" : 'X\(//\)$' \| \
32911	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32912$as_echo X"$ac_file" |
32913    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32914	    s//\1/
32915	    q
32916	  }
32917	  /^X\(\/\/\)[^/].*/{
32918	    s//\1/
32919	    q
32920	  }
32921	  /^X\(\/\/\)$/{
32922	    s//\1/
32923	    q
32924	  }
32925	  /^X\(\/\).*/{
32926	    s//\1/
32927	    q
32928	  }
32929	  s/.*/./; q'`
32930  as_dir="$ac_dir"; as_fn_mkdir_p
32931  ac_builddir=.
32932
32933case "$ac_dir" in
32934.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32935*)
32936  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32937  # A ".." for each directory in $ac_dir_suffix.
32938  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32939  case $ac_top_builddir_sub in
32940  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32941  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32942  esac ;;
32943esac
32944ac_abs_top_builddir=$ac_pwd
32945ac_abs_builddir=$ac_pwd$ac_dir_suffix
32946# for backward compatibility:
32947ac_top_builddir=$ac_top_build_prefix
32948
32949case $srcdir in
32950  .)  # We are building in place.
32951    ac_srcdir=.
32952    ac_top_srcdir=$ac_top_builddir_sub
32953    ac_abs_top_srcdir=$ac_pwd ;;
32954  [\\/]* | ?:[\\/]* )  # Absolute name.
32955    ac_srcdir=$srcdir$ac_dir_suffix;
32956    ac_top_srcdir=$srcdir
32957    ac_abs_top_srcdir=$srcdir ;;
32958  *) # Relative name.
32959    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32960    ac_top_srcdir=$ac_top_build_prefix$srcdir
32961    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32962esac
32963ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32964
32965
32966  case $ac_mode in
32967  :F)
32968  #
32969  # CONFIG_FILE
32970  #
32971
32972_ACEOF
32973
32974cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32975# If the template does not know about datarootdir, expand it.
32976# FIXME: This hack should be removed a few years after 2.60.
32977ac_datarootdir_hack=; ac_datarootdir_seen=
32978ac_sed_dataroot='
32979/datarootdir/ {
32980  p
32981  q
32982}
32983/@datadir@/p
32984/@docdir@/p
32985/@infodir@/p
32986/@localedir@/p
32987/@mandir@/p'
32988case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32989*datarootdir*) ac_datarootdir_seen=yes;;
32990*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32991  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32992$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32993_ACEOF
32994cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32995  ac_datarootdir_hack='
32996  s&@datadir@&$datadir&g
32997  s&@docdir@&$docdir&g
32998  s&@infodir@&$infodir&g
32999  s&@localedir@&$localedir&g
33000  s&@mandir@&$mandir&g
33001  s&\\\${datarootdir}&$datarootdir&g' ;;
33002esac
33003_ACEOF
33004
33005# Neutralize VPATH when `$srcdir' = `.'.
33006# Shell code in configure.ac might set extrasub.
33007# FIXME: do we really want to maintain this feature?
33008cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33009ac_sed_extra="$ac_vpsub
33010$extrasub
33011_ACEOF
33012cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33013:t
33014/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33015s|@configure_input@|$ac_sed_conf_input|;t t
33016s&@top_builddir@&$ac_top_builddir_sub&;t t
33017s&@top_build_prefix@&$ac_top_build_prefix&;t t
33018s&@srcdir@&$ac_srcdir&;t t
33019s&@abs_srcdir@&$ac_abs_srcdir&;t t
33020s&@top_srcdir@&$ac_top_srcdir&;t t
33021s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33022s&@builddir@&$ac_builddir&;t t
33023s&@abs_builddir@&$ac_abs_builddir&;t t
33024s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33025$ac_datarootdir_hack
33026"
33027eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
33028  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33029
33030test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33031  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
33032  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
33033      "$ac_tmp/out"`; test -z "$ac_out"; } &&
33034  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33035which seems to be undefined.  Please make sure it is defined" >&5
33036$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33037which seems to be undefined.  Please make sure it is defined" >&2;}
33038
33039  rm -f "$ac_tmp/stdin"
33040  case $ac_file in
33041  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33042  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33043  esac \
33044  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33045 ;;
33046  :H)
33047  #
33048  # CONFIG_HEADER
33049  #
33050  if test x"$ac_file" != x-; then
33051    {
33052      $as_echo "/* $configure_input  */" \
33053      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33054    } >"$ac_tmp/config.h" \
33055      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33056    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33057      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33058$as_echo "$as_me: $ac_file is unchanged" >&6;}
33059    else
33060      rm -f "$ac_file"
33061      mv "$ac_tmp/config.h" "$ac_file" \
33062	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33063    fi
33064  else
33065    $as_echo "/* $configure_input  */" \
33066      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33067      || as_fn_error $? "could not create -" "$LINENO" 5
33068  fi
33069 ;;
33070
33071
33072  esac
33073
33074done # for ac_tag
33075
33076
33077as_fn_exit 0
33078_ACEOF
33079ac_clean_files=$ac_clean_files_save
33080
33081test $ac_write_fail = 0 ||
33082  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33083
33084
33085# configure is writing to config.log, and then calls config.status.
33086# config.status does its own redirection, appending to config.log.
33087# Unfortunately, on DOS this fails, as config.log is still kept open
33088# by configure, so config.status won't be able to write to it; its
33089# output is simply discarded.  So we exec the FD to /dev/null,
33090# effectively closing config.log, so it can be properly (re)opened and
33091# appended to by config.status.  When coming back to configure, we
33092# need to make the FD available again.
33093if test "$no_create" != yes; then
33094  ac_cs_success=:
33095  ac_config_status_args=
33096  test "$silent" = yes &&
33097    ac_config_status_args="$ac_config_status_args --quiet"
33098  exec 5>/dev/null
33099  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33100  exec 5>>config.log
33101  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33102  # would make configure fail if this is the last instruction.
33103  $ac_cs_success || as_fn_exit 1
33104fi
33105if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33106  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33107$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33108fi
33109
33110
33111# Make the compare script executable
33112$CHMOD +x $OUTPUT_ROOT/compare.sh
33113
33114# Finally output some useful information to the user
33115
33116# Finally output some useful information to the user
33117
33118if test "x$CCACHE_FOUND" != x; then
33119	if  test "x$HAS_GOOD_CCACHE" = x; then
33120		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33121		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33122	else
33123		CCACHE_STATUS="installed and in use"
33124	fi
33125else
33126	if test "x$GCC" = xyes; then
33127		CCACHE_STATUS="not installed (consider installing)"
33128		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33129	else
33130		CCACHE_STATUS="not available for your system"
33131	fi
33132fi
33133
33134printf "\n"
33135printf "====================================================\n"
33136printf "A new configuration has been successfully created in\n"
33137printf "$OUTPUT_ROOT\n"
33138if test "x$CONFIGURE_COMMAND_LINE" != x; then
33139	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33140else
33141	printf "using default settings.\n"
33142fi
33143
33144printf "\n"
33145printf "Configuration summary:\n"
33146printf "* Debug level:    $DEBUG_LEVEL\n"
33147printf "* JDK variant:    $JDK_VARIANT\n"
33148printf "* JVM variants:   $with_jvm_variants\n"
33149printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33150
33151printf "\n"
33152printf "Tools summary:\n"
33153if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33154  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33155fi
33156printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33157printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33158printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33159
33160printf "\n"
33161printf "Build performance summary:\n"
33162printf "* Cores to use:   $NUM_CORES\n"
33163printf "* Memory limit:   $MEMORY_SIZE MB\n"
33164printf "* ccache status:  $CCACHE_STATUS\n"
33165printf "\n"
33166
33167if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33168	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33169	printf "$CCACHE_HELP_MSG\n"
33170
33171    # Print a helpful message on how to acquire the necessary build dependency.
33172    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33173    MISSING_DEPENDENCY=ccache
33174    PKGHANDLER_COMMAND=
33175
33176    case $PKGHANDLER in
33177	apt-get)
33178                apt_help     $MISSING_DEPENDENCY ;;
33179    yum)
33180                yum_help     $MISSING_DEPENDENCY ;;
33181	port)
33182                port_help    $MISSING_DEPENDENCY ;;
33183	pkgutil)
33184                pkgutil_help $MISSING_DEPENDENCY ;;
33185	pkgadd)
33186                pkgadd_help  $MISSING_DEPENDENCY ;;
33187    * )
33188      break ;;
33189    esac
33190
33191    if test "x$PKGHANDLER_COMMAND" != x; then
33192        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33193    fi
33194
33195	printf "$HELP_MSG\n"
33196	printf "\n"
33197fi
33198
33199if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33200	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33201	printf "will result in longer build times.\n"
33202	printf "\n"
33203fi
33204
33205if test "x$FOUND_ALT_VARIABLES" != "x"; then
33206	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33207	printf "These are not respected, and will be ignored. It is recommended\n"
33208	printf "that you clean your environment. The following variables are set:\n"
33209	printf "$FOUND_ALT_VARIABLES\n"
33210	printf "\n"
33211fi
33212
33213if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33214	printf "WARNING: Your build output directory is not on a local disk.\n"
33215	printf "This will severely degrade build performance!\n"
33216	printf "It is recommended that you create an output directory on a local disk,\n"
33217	printf "and run the configure script again from that directory.\n"
33218	printf "\n"
33219fi
33220
33221if test "x$IS_RECONFIGURE" = "xyes"; then
33222	printf "WARNING: The result of this configuration has overridden an older\n"
33223	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33224	printf "proper build. Failure to do so might result in strange build problems.\n"
33225	printf "\n"
33226fi
33227
33228