generated-configure.sh revision 663:f3cdfb3d360d
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
612JOBS
613MEMORY_SIZE
614NUM_CORES
615ENABLE_INTREE_EC
616SALIB_NAME
617HOTSPOT_MAKE_ARGS
618FIXPATH
619LIBCXX
620STATIC_CXX_SETTING
621LIBDL
622LIBM
623LIBZIP_CAN_USE_MMAP
624USE_EXTERNAL_LIBZ
625USE_EXTERNAL_LIBGIF
626USE_EXTERNAL_LIBJPEG
627ALSA_LIBS
628ALSA_CFLAGS
629FREETYPE2_LIB_PATH
630USING_SYSTEM_FT_LIB
631FREETYPE2_LIBS
632FREETYPE2_CFLAGS
633CUPS_CFLAGS
634OPENWIN_HOME
635X_EXTRA_LIBS
636X_LIBS
637X_PRE_LIBS
638X_CFLAGS
639XMKMF
640CXXFLAGS_DEBUG_SYMBOLS
641CFLAGS_DEBUG_SYMBOLS
642ZIP_DEBUGINFO_FILES
643ENABLE_DEBUG_SYMBOLS
644LDFLAGS_CXX_JDK
645LDFLAGS_JDKEXE_SUFFIX
646LDFLAGS_JDKLIB_SUFFIX
647LDFLAGS_JDKEXE
648LDFLAGS_JDKLIB
649CXXFLAGS_JDKEXE
650CXXFLAGS_JDKLIB
651CFLAGS_JDKEXE
652CFLAGS_JDKLIB
653MACOSX_VERSION_MIN
654PACKAGE_PATH
655LEGACY_EXTRA_LDFLAGS
656LEGACY_EXTRA_CXXFLAGS
657LEGACY_EXTRA_CFLAGS
658CXX_FLAG_DEPS
659C_FLAG_DEPS
660CXX_O_FLAG_NONE
661CXX_O_FLAG_NORM
662CXX_O_FLAG_HI
663CXX_O_FLAG_HIGHEST
664C_O_FLAG_NONE
665C_O_FLAG_NORM
666C_O_FLAG_HI
667C_O_FLAG_HIGHEST
668POST_MCS_CMD
669POST_STRIP_CMD
670SET_EXECUTABLE_ORIGIN
671SET_SHARED_LIBRARY_ORIGIN
672CXX_FLAG_REORDER
673C_FLAG_REORDER
674SET_SHARED_LIBRARY_MAPFILE
675SET_SHARED_LIBRARY_NAME
676SHARED_LIBRARY_FLAGS
677EXE_SUFFIX
678STATIC_LIBRARY_SUFFIX
679SHARED_LIBRARY_SUFFIX
680LIBRARY_PREFIX
681STATIC_LIBRARY
682SHARED_LIBRARY
683OBJ_SUFFIX
684LIPO
685ac_ct_OBJDUMP
686OBJDUMP
687ac_ct_OBJCOPY
688OBJCOPY
689MCS
690STRIP
691NM
692AS
693CXXCPP
694CPP
695COMPILER_TYPE
696RC_FLAGS
697DUMPBIN
698WINAR
699HOTSPOT_RC
700HOTSPOT_MT
701RC
702MT
703WINLD
704HOTSPOT_LD
705HOTSPOT_CXX
706ARFLAGS
707AR
708LDEXECXX
709LDCXX
710LDEXE
711LD
712ac_ct_OBJC
713OBJCFLAGS
714OBJC
715ac_ct_CXX
716CXXFLAGS
717CXX
718ac_ct_PROPER_COMPILER_CXX
719PROPER_COMPILER_CXX
720POTENTIAL_CXX
721TOOLS_DIR_CXX
722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729ac_ct_PROPER_COMPILER_CC
730PROPER_COMPILER_CC
731POTENTIAL_CC
732TOOLS_DIR_CC
733BUILD_LD
734BUILD_CXX
735BUILD_CC
736MSVCR_DLL
737DXSDK_INCLUDE_PATH
738DXSDK_LIB_PATH
739VS_PATH
740VS_LIB
741VS_INCLUDE
742CYGWIN_LINK
743AR_OUT_OPTION
744LD_OUT_OPTION
745EXE_OUT_OPTION
746CC_OUT_OPTION
747BUILD_HOTSPOT
748HOTSPOT_DIST
749BUILD_OUTPUT
750OVERRIDE_SRC_ROOT
751ADD_SRC_ROOT
752JDK_TOPDIR
753NASHORN_TOPDIR
754HOTSPOT_TOPDIR
755JAXWS_TOPDIR
756JAXP_TOPDIR
757CORBA_TOPDIR
758LANGTOOLS_TOPDIR
759BOOT_JDK_JVMARGS
760JAVAC_FLAGS
761BOOT_JDK_SOURCETARGET
762BOOT_JDK
763BOOT_TOOLSJAR
764BOOT_RTJAR
765JAVA_CHECK
766JAVAC_CHECK
767COOKED_BUILD_NUMBER
768JDK_VERSION
769COPYRIGHT_YEAR
770MACOSX_BUNDLE_ID_BASE
771MACOSX_BUNDLE_NAME_BASE
772COMPANY_NAME
773JDK_RC_PLATFORM_NAME
774PRODUCT_SUFFIX
775PRODUCT_NAME
776LAUNCHER_NAME
777MILESTONE
778JDK_BUILD_NUMBER
779JDK_UPDATE_VERSION
780JDK_MICRO_VERSION
781JDK_MINOR_VERSION
782JDK_MAJOR_VERSION
783USER_RELEASE_SUFFIX
784COMPRESS_JARS
785UNLIMITED_CRYPTO
786CACERTS_FILE
787TEST_IN_BUILD
788BUILD_HEADLESS
789SUPPORT_HEADFUL
790SUPPORT_HEADLESS
791BDEPS_FTP
792BDEPS_UNZIP
793OS_VERSION_MICRO
794OS_VERSION_MINOR
795OS_VERSION_MAJOR
796PKG_CONFIG
797TIME
798STAT
799HG
800READELF
801OTOOL
802LDD
803ZIP
804UNZIP
805FIND_DELETE
806MAKE
807CHECK_TOOLSDIR_MAKE
808CHECK_TOOLSDIR_GMAKE
809CHECK_MAKE
810CHECK_GMAKE
811PKGHANDLER
812OUTPUT_ROOT
813CONF_NAME
814SPEC
815BUILD_VARIANT_RELEASE
816DEBUG_CLASSFILES
817FASTDEBUG
818VARIANT
819DEBUG_LEVEL
820MACOSX_UNIVERSAL
821JVM_VARIANT_ZEROSHARK
822JVM_VARIANT_ZERO
823JVM_VARIANT_KERNEL
824JVM_VARIANT_MINIMAL1
825JVM_VARIANT_CLIENT
826JVM_VARIANT_SERVER
827JVM_VARIANTS
828JDK_VARIANT
829SET_OPENJDK
830BUILD_LOG_WRAPPER
831BUILD_LOG_PREVIOUS
832BUILD_LOG
833SYS_ROOT
834PATH_SEP
835SRC_ROOT
836DEFINE_CROSS_COMPILE_ARCH
837LP64
838OPENJDK_TARGET_OS_API_DIR
839OPENJDK_TARGET_CPU_JLI_CFLAGS
840OPENJDK_TARGET_CPU_OSARCH
841OPENJDK_TARGET_CPU_ISADIR
842OPENJDK_TARGET_CPU_LIBDIR
843OPENJDK_TARGET_CPU_LEGACY_LIB
844OPENJDK_TARGET_CPU_LEGACY
845REQUIRED_OS_VERSION
846REQUIRED_OS_NAME
847COMPILE_TYPE
848OPENJDK_TARGET_CPU_ENDIAN
849OPENJDK_TARGET_CPU_BITS
850OPENJDK_TARGET_CPU_ARCH
851OPENJDK_TARGET_CPU
852OPENJDK_TARGET_OS_API
853OPENJDK_TARGET_OS
854OPENJDK_BUILD_CPU_ENDIAN
855OPENJDK_BUILD_CPU_BITS
856OPENJDK_BUILD_CPU_ARCH
857OPENJDK_BUILD_CPU
858OPENJDK_BUILD_OS_API
859OPENJDK_BUILD_OS
860OPENJDK_BUILD_AUTOCONF_NAME
861OPENJDK_TARGET_AUTOCONF_NAME
862target_os
863target_vendor
864target_cpu
865target
866host_os
867host_vendor
868host_cpu
869host
870build_os
871build_vendor
872build_cpu
873build
874SETFILE
875DF
876READLINK
877CYGPATH
878NAWK
879SED
880FGREP
881EGREP
882GREP
883AWK
884XARGS
885WHICH
886WC
887UNIQ
888UNAME
889TR
890TOUCH
891TEE
892TAR
893TAIL
894SORT
895SH
896RM
897THEPWDCMD
898PRINTF
899MV
900MKTEMP
901MKDIR
902LS
903LN
904HEAD
905FIND
906FILE
907EXPR
908ECHO
909DIRNAME
910DIFF
911DATE
912CUT
913CPIO
914CP
915COMM
916CMP
917CHMOD
918CAT
919BASH
920BASENAME
921DATE_WHEN_CONFIGURED
922CONFIGURE_COMMAND_LINE
923CUSTOM_MAKE_DIR
924target_alias
925host_alias
926build_alias
927LIBS
928ECHO_T
929ECHO_N
930ECHO_C
931DEFS
932mandir
933localedir
934libdir
935psdir
936pdfdir
937dvidir
938htmldir
939infodir
940docdir
941oldincludedir
942includedir
943localstatedir
944sharedstatedir
945sysconfdir
946datadir
947datarootdir
948libexecdir
949sbindir
950bindir
951program_transform_name
952prefix
953exec_prefix
954PACKAGE_URL
955PACKAGE_BUGREPORT
956PACKAGE_STRING
957PACKAGE_VERSION
958PACKAGE_TARNAME
959PACKAGE_NAME
960PATH_SEPARATOR
961SHELL'
962ac_subst_files=''
963ac_user_opts='
964enable_option_checking
965with_custom_make_dir
966with_target_bits
967with_sys_root
968with_tools_dir
969with_devkit
970enable_openjdk_only
971with_jdk_variant
972with_jvm_variants
973enable_debug
974with_debug_level
975with_conf_name
976with_builddeps_conf
977with_builddeps_server
978with_builddeps_dir
979with_builddeps_group
980enable_headful
981enable_hotspot_test_in_build
982with_cacerts_file
983enable_unlimited_crypto
984with_milestone
985with_build_number
986with_user_release_suffix
987with_boot_jdk
988with_boot_jdk_jvmargs
989with_add_source_root
990with_override_source_root
991with_adds_and_overrides
992with_override_langtools
993with_override_corba
994with_override_jaxp
995with_override_jaxws
996with_override_hotspot
997with_override_jdk
998with_import_hotspot
999with_msvcr_dll
1000with_dxsdk
1001with_dxsdk_lib
1002with_dxsdk_include
1003with_extra_cflags
1004with_extra_cxxflags
1005with_extra_ldflags
1006enable_debug_symbols
1007enable_zip_debug_info
1008enable_macosx_runtime_support
1009with_x
1010with_cups
1011with_cups_include
1012with_freetype
1013with_alsa
1014with_alsa_include
1015with_alsa_lib
1016with_giflib
1017with_zlib
1018with_stdc__lib
1019with_num_cores
1020with_memory_size
1021with_jobs
1022with_sjavac_server_java
1023with_sjavac_server_cores
1024enable_sjavac
1025enable_precompiled_headers
1026enable_ccache
1027with_ccache_dir
1028'
1029      ac_precious_vars='build_alias
1030host_alias
1031target_alias
1032PKG_CONFIG
1033CC
1034CFLAGS
1035LDFLAGS
1036LIBS
1037CPPFLAGS
1038CXX
1039CXXFLAGS
1040CCC
1041OBJC
1042OBJCFLAGS
1043CPP
1044CXXCPP
1045XMKMF
1046FREETYPE2_CFLAGS
1047FREETYPE2_LIBS
1048ALSA_CFLAGS
1049ALSA_LIBS'
1050
1051
1052# Initialize some variables set by options.
1053ac_init_help=
1054ac_init_version=false
1055ac_unrecognized_opts=
1056ac_unrecognized_sep=
1057# The variables have the same names as the options, with
1058# dashes changed to underlines.
1059cache_file=/dev/null
1060exec_prefix=NONE
1061no_create=
1062no_recursion=
1063prefix=NONE
1064program_prefix=NONE
1065program_suffix=NONE
1066program_transform_name=s,x,x,
1067silent=
1068site=
1069srcdir=
1070verbose=
1071x_includes=NONE
1072x_libraries=NONE
1073
1074# Installation directory options.
1075# These are left unexpanded so users can "make install exec_prefix=/foo"
1076# and all the variables that are supposed to be based on exec_prefix
1077# by default will actually change.
1078# Use braces instead of parens because sh, perl, etc. also accept them.
1079# (The list follows the same order as the GNU Coding Standards.)
1080bindir='${exec_prefix}/bin'
1081sbindir='${exec_prefix}/sbin'
1082libexecdir='${exec_prefix}/libexec'
1083datarootdir='${prefix}/share'
1084datadir='${datarootdir}'
1085sysconfdir='${prefix}/etc'
1086sharedstatedir='${prefix}/com'
1087localstatedir='${prefix}/var'
1088includedir='${prefix}/include'
1089oldincludedir='/usr/include'
1090docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1091infodir='${datarootdir}/info'
1092htmldir='${docdir}'
1093dvidir='${docdir}'
1094pdfdir='${docdir}'
1095psdir='${docdir}'
1096libdir='${exec_prefix}/lib'
1097localedir='${datarootdir}/locale'
1098mandir='${datarootdir}/man'
1099
1100ac_prev=
1101ac_dashdash=
1102for ac_option
1103do
1104  # If the previous option needs an argument, assign it.
1105  if test -n "$ac_prev"; then
1106    eval $ac_prev=\$ac_option
1107    ac_prev=
1108    continue
1109  fi
1110
1111  case $ac_option in
1112  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1113  *=)   ac_optarg= ;;
1114  *)    ac_optarg=yes ;;
1115  esac
1116
1117  # Accept the important Cygnus configure options, so we can diagnose typos.
1118
1119  case $ac_dashdash$ac_option in
1120  --)
1121    ac_dashdash=yes ;;
1122
1123  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1124    ac_prev=bindir ;;
1125  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1126    bindir=$ac_optarg ;;
1127
1128  -build | --build | --buil | --bui | --bu)
1129    ac_prev=build_alias ;;
1130  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1131    build_alias=$ac_optarg ;;
1132
1133  -cache-file | --cache-file | --cache-fil | --cache-fi \
1134  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1135    ac_prev=cache_file ;;
1136  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1137  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1138    cache_file=$ac_optarg ;;
1139
1140  --config-cache | -C)
1141    cache_file=config.cache ;;
1142
1143  -datadir | --datadir | --datadi | --datad)
1144    ac_prev=datadir ;;
1145  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1146    datadir=$ac_optarg ;;
1147
1148  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1149  | --dataroo | --dataro | --datar)
1150    ac_prev=datarootdir ;;
1151  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1152  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1153    datarootdir=$ac_optarg ;;
1154
1155  -disable-* | --disable-*)
1156    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1157    # Reject names that are not valid shell variable names.
1158    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1159      as_fn_error $? "invalid feature name: $ac_useropt"
1160    ac_useropt_orig=$ac_useropt
1161    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162    case $ac_user_opts in
1163      *"
1164"enable_$ac_useropt"
1165"*) ;;
1166      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1167	 ac_unrecognized_sep=', ';;
1168    esac
1169    eval enable_$ac_useropt=no ;;
1170
1171  -docdir | --docdir | --docdi | --doc | --do)
1172    ac_prev=docdir ;;
1173  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1174    docdir=$ac_optarg ;;
1175
1176  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1177    ac_prev=dvidir ;;
1178  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1179    dvidir=$ac_optarg ;;
1180
1181  -enable-* | --enable-*)
1182    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1183    # Reject names that are not valid shell variable names.
1184    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1185      as_fn_error $? "invalid feature name: $ac_useropt"
1186    ac_useropt_orig=$ac_useropt
1187    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1188    case $ac_user_opts in
1189      *"
1190"enable_$ac_useropt"
1191"*) ;;
1192      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1193	 ac_unrecognized_sep=', ';;
1194    esac
1195    eval enable_$ac_useropt=\$ac_optarg ;;
1196
1197  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1198  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1199  | --exec | --exe | --ex)
1200    ac_prev=exec_prefix ;;
1201  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1202  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1203  | --exec=* | --exe=* | --ex=*)
1204    exec_prefix=$ac_optarg ;;
1205
1206  -gas | --gas | --ga | --g)
1207    # Obsolete; use --with-gas.
1208    with_gas=yes ;;
1209
1210  -help | --help | --hel | --he | -h)
1211    ac_init_help=long ;;
1212  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1213    ac_init_help=recursive ;;
1214  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1215    ac_init_help=short ;;
1216
1217  -host | --host | --hos | --ho)
1218    ac_prev=host_alias ;;
1219  -host=* | --host=* | --hos=* | --ho=*)
1220    host_alias=$ac_optarg ;;
1221
1222  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1223    ac_prev=htmldir ;;
1224  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1225  | --ht=*)
1226    htmldir=$ac_optarg ;;
1227
1228  -includedir | --includedir | --includedi | --included | --include \
1229  | --includ | --inclu | --incl | --inc)
1230    ac_prev=includedir ;;
1231  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1232  | --includ=* | --inclu=* | --incl=* | --inc=*)
1233    includedir=$ac_optarg ;;
1234
1235  -infodir | --infodir | --infodi | --infod | --info | --inf)
1236    ac_prev=infodir ;;
1237  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1238    infodir=$ac_optarg ;;
1239
1240  -libdir | --libdir | --libdi | --libd)
1241    ac_prev=libdir ;;
1242  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1243    libdir=$ac_optarg ;;
1244
1245  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1246  | --libexe | --libex | --libe)
1247    ac_prev=libexecdir ;;
1248  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1249  | --libexe=* | --libex=* | --libe=*)
1250    libexecdir=$ac_optarg ;;
1251
1252  -localedir | --localedir | --localedi | --localed | --locale)
1253    ac_prev=localedir ;;
1254  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1255    localedir=$ac_optarg ;;
1256
1257  -localstatedir | --localstatedir | --localstatedi | --localstated \
1258  | --localstate | --localstat | --localsta | --localst | --locals)
1259    ac_prev=localstatedir ;;
1260  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1261  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1262    localstatedir=$ac_optarg ;;
1263
1264  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1265    ac_prev=mandir ;;
1266  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1267    mandir=$ac_optarg ;;
1268
1269  -nfp | --nfp | --nf)
1270    # Obsolete; use --without-fp.
1271    with_fp=no ;;
1272
1273  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1274  | --no-cr | --no-c | -n)
1275    no_create=yes ;;
1276
1277  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1278  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1279    no_recursion=yes ;;
1280
1281  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1282  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1283  | --oldin | --oldi | --old | --ol | --o)
1284    ac_prev=oldincludedir ;;
1285  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1286  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1287  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1288    oldincludedir=$ac_optarg ;;
1289
1290  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1291    ac_prev=prefix ;;
1292  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1293    prefix=$ac_optarg ;;
1294
1295  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1296  | --program-pre | --program-pr | --program-p)
1297    ac_prev=program_prefix ;;
1298  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1299  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1300    program_prefix=$ac_optarg ;;
1301
1302  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1303  | --program-suf | --program-su | --program-s)
1304    ac_prev=program_suffix ;;
1305  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1306  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1307    program_suffix=$ac_optarg ;;
1308
1309  -program-transform-name | --program-transform-name \
1310  | --program-transform-nam | --program-transform-na \
1311  | --program-transform-n | --program-transform- \
1312  | --program-transform | --program-transfor \
1313  | --program-transfo | --program-transf \
1314  | --program-trans | --program-tran \
1315  | --progr-tra | --program-tr | --program-t)
1316    ac_prev=program_transform_name ;;
1317  -program-transform-name=* | --program-transform-name=* \
1318  | --program-transform-nam=* | --program-transform-na=* \
1319  | --program-transform-n=* | --program-transform-=* \
1320  | --program-transform=* | --program-transfor=* \
1321  | --program-transfo=* | --program-transf=* \
1322  | --program-trans=* | --program-tran=* \
1323  | --progr-tra=* | --program-tr=* | --program-t=*)
1324    program_transform_name=$ac_optarg ;;
1325
1326  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1327    ac_prev=pdfdir ;;
1328  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1329    pdfdir=$ac_optarg ;;
1330
1331  -psdir | --psdir | --psdi | --psd | --ps)
1332    ac_prev=psdir ;;
1333  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1334    psdir=$ac_optarg ;;
1335
1336  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1337  | -silent | --silent | --silen | --sile | --sil)
1338    silent=yes ;;
1339
1340  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1341    ac_prev=sbindir ;;
1342  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1343  | --sbi=* | --sb=*)
1344    sbindir=$ac_optarg ;;
1345
1346  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1347  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1348  | --sharedst | --shareds | --shared | --share | --shar \
1349  | --sha | --sh)
1350    ac_prev=sharedstatedir ;;
1351  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1352  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1353  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1354  | --sha=* | --sh=*)
1355    sharedstatedir=$ac_optarg ;;
1356
1357  -site | --site | --sit)
1358    ac_prev=site ;;
1359  -site=* | --site=* | --sit=*)
1360    site=$ac_optarg ;;
1361
1362  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1363    ac_prev=srcdir ;;
1364  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1365    srcdir=$ac_optarg ;;
1366
1367  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1368  | --syscon | --sysco | --sysc | --sys | --sy)
1369    ac_prev=sysconfdir ;;
1370  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1371  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1372    sysconfdir=$ac_optarg ;;
1373
1374  -target | --target | --targe | --targ | --tar | --ta | --t)
1375    ac_prev=target_alias ;;
1376  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1377    target_alias=$ac_optarg ;;
1378
1379  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1380    verbose=yes ;;
1381
1382  -version | --version | --versio | --versi | --vers | -V)
1383    ac_init_version=: ;;
1384
1385  -with-* | --with-*)
1386    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1387    # Reject names that are not valid shell variable names.
1388    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1389      as_fn_error $? "invalid package name: $ac_useropt"
1390    ac_useropt_orig=$ac_useropt
1391    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1392    case $ac_user_opts in
1393      *"
1394"with_$ac_useropt"
1395"*) ;;
1396      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1397	 ac_unrecognized_sep=', ';;
1398    esac
1399    eval with_$ac_useropt=\$ac_optarg ;;
1400
1401  -without-* | --without-*)
1402    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1403    # Reject names that are not valid shell variable names.
1404    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1405      as_fn_error $? "invalid package name: $ac_useropt"
1406    ac_useropt_orig=$ac_useropt
1407    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1408    case $ac_user_opts in
1409      *"
1410"with_$ac_useropt"
1411"*) ;;
1412      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1413	 ac_unrecognized_sep=', ';;
1414    esac
1415    eval with_$ac_useropt=no ;;
1416
1417  --x)
1418    # Obsolete; use --with-x.
1419    with_x=yes ;;
1420
1421  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1422  | --x-incl | --x-inc | --x-in | --x-i)
1423    ac_prev=x_includes ;;
1424  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1425  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1426    x_includes=$ac_optarg ;;
1427
1428  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1429  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1430    ac_prev=x_libraries ;;
1431  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1432  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1433    x_libraries=$ac_optarg ;;
1434
1435  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1436Try \`$0 --help' for more information"
1437    ;;
1438
1439  *=*)
1440    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1441    # Reject names that are not valid shell variable names.
1442    case $ac_envvar in #(
1443      '' | [0-9]* | *[!_$as_cr_alnum]* )
1444      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1445    esac
1446    eval $ac_envvar=\$ac_optarg
1447    export $ac_envvar ;;
1448
1449  *)
1450    # FIXME: should be removed in autoconf 3.0.
1451    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1452    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1453      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1454    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1455    ;;
1456
1457  esac
1458done
1459
1460if test -n "$ac_prev"; then
1461  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1462  as_fn_error $? "missing argument to $ac_option"
1463fi
1464
1465if test -n "$ac_unrecognized_opts"; then
1466  case $enable_option_checking in
1467    no) ;;
1468    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1469    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1470  esac
1471fi
1472
1473# Check all directory arguments for consistency.
1474for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1475		datadir sysconfdir sharedstatedir localstatedir includedir \
1476		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1477		libdir localedir mandir
1478do
1479  eval ac_val=\$$ac_var
1480  # Remove trailing slashes.
1481  case $ac_val in
1482    */ )
1483      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1484      eval $ac_var=\$ac_val;;
1485  esac
1486  # Be sure to have absolute directory names.
1487  case $ac_val in
1488    [\\/$]* | ?:[\\/]* )  continue;;
1489    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1490  esac
1491  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1492done
1493
1494# There might be people who depend on the old broken behavior: `$host'
1495# used to hold the argument of --host etc.
1496# FIXME: To remove some day.
1497build=$build_alias
1498host=$host_alias
1499target=$target_alias
1500
1501# FIXME: To remove some day.
1502if test "x$host_alias" != x; then
1503  if test "x$build_alias" = x; then
1504    cross_compiling=maybe
1505    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1506    If a cross compiler is detected then cross compile mode will be used" >&2
1507  elif test "x$build_alias" != "x$host_alias"; then
1508    cross_compiling=yes
1509  fi
1510fi
1511
1512ac_tool_prefix=
1513test -n "$host_alias" && ac_tool_prefix=$host_alias-
1514
1515test "$silent" = yes && exec 6>/dev/null
1516
1517
1518ac_pwd=`pwd` && test -n "$ac_pwd" &&
1519ac_ls_di=`ls -di .` &&
1520ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1521  as_fn_error $? "working directory cannot be determined"
1522test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1523  as_fn_error $? "pwd does not report name of working directory"
1524
1525
1526# Find the source files, if location was not specified.
1527if test -z "$srcdir"; then
1528  ac_srcdir_defaulted=yes
1529  # Try the directory containing this script, then the parent directory.
1530  ac_confdir=`$as_dirname -- "$as_myself" ||
1531$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1532	 X"$as_myself" : 'X\(//\)[^/]' \| \
1533	 X"$as_myself" : 'X\(//\)$' \| \
1534	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1535$as_echo X"$as_myself" |
1536    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1537	    s//\1/
1538	    q
1539	  }
1540	  /^X\(\/\/\)[^/].*/{
1541	    s//\1/
1542	    q
1543	  }
1544	  /^X\(\/\/\)$/{
1545	    s//\1/
1546	    q
1547	  }
1548	  /^X\(\/\).*/{
1549	    s//\1/
1550	    q
1551	  }
1552	  s/.*/./; q'`
1553  srcdir=$ac_confdir
1554  if test ! -r "$srcdir/$ac_unique_file"; then
1555    srcdir=..
1556  fi
1557else
1558  ac_srcdir_defaulted=no
1559fi
1560if test ! -r "$srcdir/$ac_unique_file"; then
1561  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1562  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1563fi
1564ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1565ac_abs_confdir=`(
1566	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1567	pwd)`
1568# When building in place, set srcdir=.
1569if test "$ac_abs_confdir" = "$ac_pwd"; then
1570  srcdir=.
1571fi
1572# Remove unnecessary trailing slashes from srcdir.
1573# Double slashes in file names in object file debugging info
1574# mess up M-x gdb in Emacs.
1575case $srcdir in
1576*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1577esac
1578for ac_var in $ac_precious_vars; do
1579  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1580  eval ac_env_${ac_var}_value=\$${ac_var}
1581  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1582  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1583done
1584
1585#
1586# Report the --help message.
1587#
1588if test "$ac_init_help" = "long"; then
1589  # Omit some internal or obsolete options to make the list less imposing.
1590  # This message is too long to be a string in the A/UX 3.1 sh.
1591  cat <<_ACEOF
1592\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1593
1594Usage: $0 [OPTION]... [VAR=VALUE]...
1595
1596To assign environment variables (e.g., CC, CFLAGS...), specify them as
1597VAR=VALUE.  See below for descriptions of some of the useful variables.
1598
1599Defaults for the options are specified in brackets.
1600
1601Configuration:
1602  -h, --help              display this help and exit
1603      --help=short        display options specific to this package
1604      --help=recursive    display the short help of all the included packages
1605  -V, --version           display version information and exit
1606  -q, --quiet, --silent   do not print \`checking ...' messages
1607      --cache-file=FILE   cache test results in FILE [disabled]
1608  -C, --config-cache      alias for \`--cache-file=config.cache'
1609  -n, --no-create         do not create output files
1610      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1611
1612Installation directories:
1613  --prefix=PREFIX         install architecture-independent files in PREFIX
1614                          [$ac_default_prefix]
1615  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1616                          [PREFIX]
1617
1618By default, \`make install' will install all the files in
1619\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1620an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1621for instance \`--prefix=\$HOME'.
1622
1623For better control, use the options below.
1624
1625Fine tuning of the installation directories:
1626  --bindir=DIR            user executables [EPREFIX/bin]
1627  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1628  --libexecdir=DIR        program executables [EPREFIX/libexec]
1629  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1630  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1631  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1632  --libdir=DIR            object code libraries [EPREFIX/lib]
1633  --includedir=DIR        C header files [PREFIX/include]
1634  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1635  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1636  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1637  --infodir=DIR           info documentation [DATAROOTDIR/info]
1638  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1639  --mandir=DIR            man documentation [DATAROOTDIR/man]
1640  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1641  --htmldir=DIR           html documentation [DOCDIR]
1642  --dvidir=DIR            dvi documentation [DOCDIR]
1643  --pdfdir=DIR            pdf documentation [DOCDIR]
1644  --psdir=DIR             ps documentation [DOCDIR]
1645_ACEOF
1646
1647  cat <<\_ACEOF
1648
1649X features:
1650  --x-includes=DIR    X include files are in DIR
1651  --x-libraries=DIR   X library files are in DIR
1652
1653System types:
1654  --build=BUILD     configure for building on BUILD [guessed]
1655  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1656  --target=TARGET   configure for building compilers for TARGET [HOST]
1657_ACEOF
1658fi
1659
1660if test -n "$ac_init_help"; then
1661  case $ac_init_help in
1662     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1663   esac
1664  cat <<\_ACEOF
1665
1666Optional Features:
1667  --disable-option-checking  ignore unrecognized --enable/--with options
1668  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1669  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1670  --enable-openjdk-only   suppress building custom source even if present
1671                          [disabled]
1672  --enable-debug          set the debug level to fastdebug (shorthand for
1673                          --with-debug-level=fastdebug) [disabled]
1674  --disable-headful       disable building headful support (graphical UI
1675                          support) [enabled]
1676  --enable-hotspot-test-in-build
1677                          run the Queens test after Hotspot build [disabled]
1678  --enable-unlimited-crypto
1679                          Enable unlimited crypto policy [disabled]
1680  --disable-debug-symbols disable generation of debug symbols [enabled]
1681  --disable-zip-debug-info
1682                          disable zipping of debug-info files [enabled]
1683  --disable-macosx-runtime-support
1684                          disable the use of MacOSX Java runtime support
1685                          framework [enabled]
1686  --enable-sjavac         use sjavac to do fast incremental compiles
1687                          [disabled]
1688  --disable-precompiled-headers
1689                          disable using precompiled headers when compiling C++
1690                          [enabled]
1691  --disable-ccache        disable using ccache to speed up recompilations
1692                          [enabled]
1693
1694Optional Packages:
1695  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1696  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1697  --with-custom-make-dir  use this directory for custom build/make files
1698  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1699                          support it), e.g. --with-target-bits=32 [guessed]
1700  --with-sys-root         pass this sys-root to the compilers and tools (for
1701                          cross-compiling)
1702  --with-tools-dir        search this directory for compilers and tools (for
1703                          cross-compiling)
1704  --with-devkit           use this directory as base for tools-dir and
1705                          sys-root (for cross-compiling)
1706  --with-jdk-variant      JDK variant to build (normal) [normal]
1707  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1708                          client, minimal1, kernel, zero, zeroshark) [server]
1709  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1710                          [release]
1711  --with-conf-name        use this as the name of the configuration [generated
1712                          from important configuration options]
1713  --with-builddeps-conf   use this configuration file for the builddeps
1714  --with-builddeps-server download and use build dependencies from this server
1715                          url
1716  --with-builddeps-dir    store downloaded build dependencies here
1717                          [/localhome/builddeps]
1718  --with-builddeps-group  chgrp the downloaded build dependencies to this
1719                          group
1720  --with-cacerts-file     specify alternative cacerts file
1721  --with-milestone        Set milestone value for build [internal]
1722  --with-build-number     Set build number value for build [b00]
1723  --with-user-release-suffix
1724                          Add a custom string to the version string if build
1725                          number isn't set.[username_builddateb00]
1726  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1727  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1728                          invocations of the Boot JDK, overriding the default
1729                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1730                          -enableassertions"
1731  --with-add-source-root  for each and every source directory, look in this
1732                          additional source root for the same directory; if it
1733                          exists and have files in it, include it in the build
1734  --with-override-source-root
1735                          for each and every source directory, look in this
1736                          override source root for the same directory; if it
1737                          exists, use that directory instead and ignore the
1738                          directory in the original source root
1739  --with-adds-and-overrides
1740                          use the subdirs 'adds' and 'overrides' in the
1741                          specified directory as add-source-root and
1742                          override-source-root
1743  --with-override-langtools
1744                          use this langtools dir for the build
1745  --with-override-corba   use this corba dir for the build
1746  --with-override-jaxp    use this jaxp dir for the build
1747  --with-override-jaxws   use this jaxws dir for the build
1748  --with-override-hotspot use this hotspot dir for the build
1749  --with-override-jdk     use this jdk dir for the build
1750  --with-import-hotspot   import hotspot binaries from this jdk image or
1751                          hotspot build dist dir instead of building from
1752                          source
1753  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1754                          only) [probed]
1755  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1756  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1757                          [probed]
1758  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1759                          [probed]
1760  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1761  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1762  --with-extra-ldflags    extra flags to be used when linking jdk
1763  --with-x                use the X Window System
1764  --with-cups             specify prefix directory for the cups package
1765                          (expecting the headers under PATH/include)
1766  --with-cups-include     specify directory for the cups include files
1767  --with-freetype         specify prefix directory for the freetype2 package
1768                          (expecting the libraries under PATH/lib and the
1769                          headers under PATH/include)
1770  --with-alsa             specify prefix directory for the alsa package
1771                          (expecting the libraries under PATH/lib and the
1772                          headers under PATH/include)
1773  --with-alsa-include     specify directory for the alsa include files
1774  --with-alsa-lib         specify directory for the alsa library
1775  --with-giflib           use giflib from build system or OpenJDK source
1776                          (system, bundled) [bundled]
1777  --with-zlib             use zlib from build system or OpenJDK source
1778                          (system, bundled) [bundled]
1779  --with-stdc++lib=<static>,<dynamic>,<default>
1780                          force linking of the C++ runtime on Linux to either
1781                          static or dynamic, default is static with dynamic as
1782                          fallback
1783  --with-num-cores        number of cores in the build system, e.g.
1784                          --with-num-cores=8 [probed]
1785  --with-memory-size      memory (in MB) available in the build system, e.g.
1786                          --with-memory-size=1024 [probed]
1787  --with-jobs             number of parallel jobs to let make run [calculated
1788                          based on cores and memory]
1789  --with-sjavac-server-java
1790                          use this java binary for running the sjavac
1791                          background server [Boot JDK java]
1792  --with-sjavac-server-cores
1793                          use at most this number of concurrent threads on the
1794                          sjavac server [probed]
1795  --with-ccache-dir       where to store ccache files [~/.ccache]
1796
1797Some influential environment variables:
1798  PKG_CONFIG  path to pkg-config utility
1799  CC          C compiler command
1800  CFLAGS      C compiler flags
1801  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1802              nonstandard directory <lib dir>
1803  LIBS        libraries to pass to the linker, e.g. -l<library>
1804  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1805              you have headers in a nonstandard directory <include dir>
1806  CXX         C++ compiler command
1807  CXXFLAGS    C++ compiler flags
1808  OBJC        Objective C compiler command
1809  OBJCFLAGS   Objective C compiler flags
1810  CPP         C preprocessor
1811  CXXCPP      C++ preprocessor
1812  XMKMF       Path to xmkmf, Makefile generator for X Window System
1813  FREETYPE2_CFLAGS
1814              C compiler flags for FREETYPE2, overriding pkg-config
1815  FREETYPE2_LIBS
1816              linker flags for FREETYPE2, overriding pkg-config
1817  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1818  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1819
1820Use these variables to override the choices made by `configure' or to help
1821it to find libraries and programs with nonstandard names/locations.
1822
1823Report bugs to <build-dev@openjdk.java.net>.
1824OpenJDK home page: <http://openjdk.java.net>.
1825_ACEOF
1826ac_status=$?
1827fi
1828
1829if test "$ac_init_help" = "recursive"; then
1830  # If there are subdirs, report their specific --help.
1831  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1832    test -d "$ac_dir" ||
1833      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1834      continue
1835    ac_builddir=.
1836
1837case "$ac_dir" in
1838.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1839*)
1840  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1841  # A ".." for each directory in $ac_dir_suffix.
1842  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1843  case $ac_top_builddir_sub in
1844  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1845  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1846  esac ;;
1847esac
1848ac_abs_top_builddir=$ac_pwd
1849ac_abs_builddir=$ac_pwd$ac_dir_suffix
1850# for backward compatibility:
1851ac_top_builddir=$ac_top_build_prefix
1852
1853case $srcdir in
1854  .)  # We are building in place.
1855    ac_srcdir=.
1856    ac_top_srcdir=$ac_top_builddir_sub
1857    ac_abs_top_srcdir=$ac_pwd ;;
1858  [\\/]* | ?:[\\/]* )  # Absolute name.
1859    ac_srcdir=$srcdir$ac_dir_suffix;
1860    ac_top_srcdir=$srcdir
1861    ac_abs_top_srcdir=$srcdir ;;
1862  *) # Relative name.
1863    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1864    ac_top_srcdir=$ac_top_build_prefix$srcdir
1865    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1866esac
1867ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1868
1869    cd "$ac_dir" || { ac_status=$?; continue; }
1870    # Check for guested configure.
1871    if test -f "$ac_srcdir/configure.gnu"; then
1872      echo &&
1873      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1874    elif test -f "$ac_srcdir/configure"; then
1875      echo &&
1876      $SHELL "$ac_srcdir/configure" --help=recursive
1877    else
1878      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1879    fi || ac_status=$?
1880    cd "$ac_pwd" || { ac_status=$?; break; }
1881  done
1882fi
1883
1884test -n "$ac_init_help" && exit $ac_status
1885if $ac_init_version; then
1886  cat <<\_ACEOF
1887OpenJDK configure jdk8
1888generated by GNU Autoconf 2.68
1889
1890Copyright (C) 2010 Free Software Foundation, Inc.
1891This configure script is free software; the Free Software Foundation
1892gives unlimited permission to copy, distribute and modify it.
1893_ACEOF
1894  exit
1895fi
1896
1897## ------------------------ ##
1898## Autoconf initialization. ##
1899## ------------------------ ##
1900
1901# ac_fn_c_try_compile LINENO
1902# --------------------------
1903# Try to compile conftest.$ac_ext, and return whether this succeeded.
1904ac_fn_c_try_compile ()
1905{
1906  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1907  rm -f conftest.$ac_objext
1908  if { { ac_try="$ac_compile"
1909case "(($ac_try" in
1910  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1911  *) ac_try_echo=$ac_try;;
1912esac
1913eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1914$as_echo "$ac_try_echo"; } >&5
1915  (eval "$ac_compile") 2>conftest.err
1916  ac_status=$?
1917  if test -s conftest.err; then
1918    grep -v '^ *+' conftest.err >conftest.er1
1919    cat conftest.er1 >&5
1920    mv -f conftest.er1 conftest.err
1921  fi
1922  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1923  test $ac_status = 0; } && {
1924	 test -z "$ac_c_werror_flag" ||
1925	 test ! -s conftest.err
1926       } && test -s conftest.$ac_objext; then :
1927  ac_retval=0
1928else
1929  $as_echo "$as_me: failed program was:" >&5
1930sed 's/^/| /' conftest.$ac_ext >&5
1931
1932	ac_retval=1
1933fi
1934  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1935  as_fn_set_status $ac_retval
1936
1937} # ac_fn_c_try_compile
1938
1939# ac_fn_cxx_try_compile LINENO
1940# ----------------------------
1941# Try to compile conftest.$ac_ext, and return whether this succeeded.
1942ac_fn_cxx_try_compile ()
1943{
1944  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1945  rm -f conftest.$ac_objext
1946  if { { ac_try="$ac_compile"
1947case "(($ac_try" in
1948  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1949  *) ac_try_echo=$ac_try;;
1950esac
1951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1952$as_echo "$ac_try_echo"; } >&5
1953  (eval "$ac_compile") 2>conftest.err
1954  ac_status=$?
1955  if test -s conftest.err; then
1956    grep -v '^ *+' conftest.err >conftest.er1
1957    cat conftest.er1 >&5
1958    mv -f conftest.er1 conftest.err
1959  fi
1960  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1961  test $ac_status = 0; } && {
1962	 test -z "$ac_cxx_werror_flag" ||
1963	 test ! -s conftest.err
1964       } && test -s conftest.$ac_objext; then :
1965  ac_retval=0
1966else
1967  $as_echo "$as_me: failed program was:" >&5
1968sed 's/^/| /' conftest.$ac_ext >&5
1969
1970	ac_retval=1
1971fi
1972  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1973  as_fn_set_status $ac_retval
1974
1975} # ac_fn_cxx_try_compile
1976
1977# ac_fn_objc_try_compile LINENO
1978# -----------------------------
1979# Try to compile conftest.$ac_ext, and return whether this succeeded.
1980ac_fn_objc_try_compile ()
1981{
1982  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1983  rm -f conftest.$ac_objext
1984  if { { ac_try="$ac_compile"
1985case "(($ac_try" in
1986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1987  *) ac_try_echo=$ac_try;;
1988esac
1989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1990$as_echo "$ac_try_echo"; } >&5
1991  (eval "$ac_compile") 2>conftest.err
1992  ac_status=$?
1993  if test -s conftest.err; then
1994    grep -v '^ *+' conftest.err >conftest.er1
1995    cat conftest.er1 >&5
1996    mv -f conftest.er1 conftest.err
1997  fi
1998  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1999  test $ac_status = 0; } && {
2000	 test -z "$ac_objc_werror_flag" ||
2001	 test ! -s conftest.err
2002       } && test -s conftest.$ac_objext; then :
2003  ac_retval=0
2004else
2005  $as_echo "$as_me: failed program was:" >&5
2006sed 's/^/| /' conftest.$ac_ext >&5
2007
2008	ac_retval=1
2009fi
2010  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2011  as_fn_set_status $ac_retval
2012
2013} # ac_fn_objc_try_compile
2014
2015# ac_fn_c_try_cpp LINENO
2016# ----------------------
2017# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2018ac_fn_c_try_cpp ()
2019{
2020  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2021  if { { ac_try="$ac_cpp conftest.$ac_ext"
2022case "(($ac_try" in
2023  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2024  *) ac_try_echo=$ac_try;;
2025esac
2026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2027$as_echo "$ac_try_echo"; } >&5
2028  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2029  ac_status=$?
2030  if test -s conftest.err; then
2031    grep -v '^ *+' conftest.err >conftest.er1
2032    cat conftest.er1 >&5
2033    mv -f conftest.er1 conftest.err
2034  fi
2035  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2036  test $ac_status = 0; } > conftest.i && {
2037	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2038	 test ! -s conftest.err
2039       }; then :
2040  ac_retval=0
2041else
2042  $as_echo "$as_me: failed program was:" >&5
2043sed 's/^/| /' conftest.$ac_ext >&5
2044
2045    ac_retval=1
2046fi
2047  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2048  as_fn_set_status $ac_retval
2049
2050} # ac_fn_c_try_cpp
2051
2052# ac_fn_cxx_try_cpp LINENO
2053# ------------------------
2054# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2055ac_fn_cxx_try_cpp ()
2056{
2057  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2058  if { { ac_try="$ac_cpp conftest.$ac_ext"
2059case "(($ac_try" in
2060  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2061  *) ac_try_echo=$ac_try;;
2062esac
2063eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2064$as_echo "$ac_try_echo"; } >&5
2065  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2066  ac_status=$?
2067  if test -s conftest.err; then
2068    grep -v '^ *+' conftest.err >conftest.er1
2069    cat conftest.er1 >&5
2070    mv -f conftest.er1 conftest.err
2071  fi
2072  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2073  test $ac_status = 0; } > conftest.i && {
2074	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2075	 test ! -s conftest.err
2076       }; then :
2077  ac_retval=0
2078else
2079  $as_echo "$as_me: failed program was:" >&5
2080sed 's/^/| /' conftest.$ac_ext >&5
2081
2082    ac_retval=1
2083fi
2084  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2085  as_fn_set_status $ac_retval
2086
2087} # ac_fn_cxx_try_cpp
2088
2089# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2090# ---------------------------------------------------------
2091# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2092# the include files in INCLUDES and setting the cache variable VAR
2093# accordingly.
2094ac_fn_cxx_check_header_mongrel ()
2095{
2096  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2097  if eval \${$3+:} false; then :
2098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2099$as_echo_n "checking for $2... " >&6; }
2100if eval \${$3+:} false; then :
2101  $as_echo_n "(cached) " >&6
2102fi
2103eval ac_res=\$$3
2104	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2105$as_echo "$ac_res" >&6; }
2106else
2107  # Is the header compilable?
2108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2109$as_echo_n "checking $2 usability... " >&6; }
2110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111/* end confdefs.h.  */
2112$4
2113#include <$2>
2114_ACEOF
2115if ac_fn_cxx_try_compile "$LINENO"; then :
2116  ac_header_compiler=yes
2117else
2118  ac_header_compiler=no
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2122$as_echo "$ac_header_compiler" >&6; }
2123
2124# Is the header present?
2125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2126$as_echo_n "checking $2 presence... " >&6; }
2127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h.  */
2129#include <$2>
2130_ACEOF
2131if ac_fn_cxx_try_cpp "$LINENO"; then :
2132  ac_header_preproc=yes
2133else
2134  ac_header_preproc=no
2135fi
2136rm -f conftest.err conftest.i conftest.$ac_ext
2137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2138$as_echo "$ac_header_preproc" >&6; }
2139
2140# So?  What about this header?
2141case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2142  yes:no: )
2143    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2144$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2145    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2146$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2147    ;;
2148  no:yes:* )
2149    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2150$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2151    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2152$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2153    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2154$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2155    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2156$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2157    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2158$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2159( $as_echo "## ----------------------------------------- ##
2160## Report this to build-dev@openjdk.java.net ##
2161## ----------------------------------------- ##"
2162     ) | sed "s/^/$as_me: WARNING:     /" >&2
2163    ;;
2164esac
2165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2166$as_echo_n "checking for $2... " >&6; }
2167if eval \${$3+:} false; then :
2168  $as_echo_n "(cached) " >&6
2169else
2170  eval "$3=\$ac_header_compiler"
2171fi
2172eval ac_res=\$$3
2173	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2174$as_echo "$ac_res" >&6; }
2175fi
2176  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2177
2178} # ac_fn_cxx_check_header_mongrel
2179
2180# ac_fn_cxx_try_run LINENO
2181# ------------------------
2182# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2183# that executables *can* be run.
2184ac_fn_cxx_try_run ()
2185{
2186  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187  if { { ac_try="$ac_link"
2188case "(($ac_try" in
2189  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2190  *) ac_try_echo=$ac_try;;
2191esac
2192eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2193$as_echo "$ac_try_echo"; } >&5
2194  (eval "$ac_link") 2>&5
2195  ac_status=$?
2196  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2197  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2198  { { case "(($ac_try" in
2199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2200  *) ac_try_echo=$ac_try;;
2201esac
2202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2203$as_echo "$ac_try_echo"; } >&5
2204  (eval "$ac_try") 2>&5
2205  ac_status=$?
2206  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2207  test $ac_status = 0; }; }; then :
2208  ac_retval=0
2209else
2210  $as_echo "$as_me: program exited with status $ac_status" >&5
2211       $as_echo "$as_me: failed program was:" >&5
2212sed 's/^/| /' conftest.$ac_ext >&5
2213
2214       ac_retval=$ac_status
2215fi
2216  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2217  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2218  as_fn_set_status $ac_retval
2219
2220} # ac_fn_cxx_try_run
2221
2222# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2223# ---------------------------------------------------------
2224# Tests whether HEADER exists and can be compiled using the include files in
2225# INCLUDES, setting the cache variable VAR accordingly.
2226ac_fn_cxx_check_header_compile ()
2227{
2228  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2230$as_echo_n "checking for $2... " >&6; }
2231if eval \${$3+:} false; then :
2232  $as_echo_n "(cached) " >&6
2233else
2234  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235/* end confdefs.h.  */
2236$4
2237#include <$2>
2238_ACEOF
2239if ac_fn_cxx_try_compile "$LINENO"; then :
2240  eval "$3=yes"
2241else
2242  eval "$3=no"
2243fi
2244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2245fi
2246eval ac_res=\$$3
2247	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2248$as_echo "$ac_res" >&6; }
2249  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2250
2251} # ac_fn_cxx_check_header_compile
2252
2253# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2254# ----------------------------------------------
2255# Tries to find the compile-time value of EXPR in a program that includes
2256# INCLUDES, setting VAR accordingly. Returns whether the value could be
2257# computed
2258ac_fn_cxx_compute_int ()
2259{
2260  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2261  if test "$cross_compiling" = yes; then
2262    # Depending upon the size, compute the lo and hi bounds.
2263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264/* end confdefs.h.  */
2265$4
2266int
2267main ()
2268{
2269static int test_array [1 - 2 * !(($2) >= 0)];
2270test_array [0] = 0
2271
2272  ;
2273  return 0;
2274}
2275_ACEOF
2276if ac_fn_cxx_try_compile "$LINENO"; then :
2277  ac_lo=0 ac_mid=0
2278  while :; do
2279    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280/* end confdefs.h.  */
2281$4
2282int
2283main ()
2284{
2285static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2286test_array [0] = 0
2287
2288  ;
2289  return 0;
2290}
2291_ACEOF
2292if ac_fn_cxx_try_compile "$LINENO"; then :
2293  ac_hi=$ac_mid; break
2294else
2295  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2296			if test $ac_lo -le $ac_mid; then
2297			  ac_lo= ac_hi=
2298			  break
2299			fi
2300			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2301fi
2302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2303  done
2304else
2305  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306/* end confdefs.h.  */
2307$4
2308int
2309main ()
2310{
2311static int test_array [1 - 2 * !(($2) < 0)];
2312test_array [0] = 0
2313
2314  ;
2315  return 0;
2316}
2317_ACEOF
2318if ac_fn_cxx_try_compile "$LINENO"; then :
2319  ac_hi=-1 ac_mid=-1
2320  while :; do
2321    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2322/* end confdefs.h.  */
2323$4
2324int
2325main ()
2326{
2327static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2328test_array [0] = 0
2329
2330  ;
2331  return 0;
2332}
2333_ACEOF
2334if ac_fn_cxx_try_compile "$LINENO"; then :
2335  ac_lo=$ac_mid; break
2336else
2337  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2338			if test $ac_mid -le $ac_hi; then
2339			  ac_lo= ac_hi=
2340			  break
2341			fi
2342			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2343fi
2344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2345  done
2346else
2347  ac_lo= ac_hi=
2348fi
2349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2350fi
2351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2352# Binary search between lo and hi bounds.
2353while test "x$ac_lo" != "x$ac_hi"; do
2354  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2355  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356/* end confdefs.h.  */
2357$4
2358int
2359main ()
2360{
2361static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2362test_array [0] = 0
2363
2364  ;
2365  return 0;
2366}
2367_ACEOF
2368if ac_fn_cxx_try_compile "$LINENO"; then :
2369  ac_hi=$ac_mid
2370else
2371  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2372fi
2373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2374done
2375case $ac_lo in #((
2376?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2377'') ac_retval=1 ;;
2378esac
2379  else
2380    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381/* end confdefs.h.  */
2382$4
2383static long int longval () { return $2; }
2384static unsigned long int ulongval () { return $2; }
2385#include <stdio.h>
2386#include <stdlib.h>
2387int
2388main ()
2389{
2390
2391  FILE *f = fopen ("conftest.val", "w");
2392  if (! f)
2393    return 1;
2394  if (($2) < 0)
2395    {
2396      long int i = longval ();
2397      if (i != ($2))
2398	return 1;
2399      fprintf (f, "%ld", i);
2400    }
2401  else
2402    {
2403      unsigned long int i = ulongval ();
2404      if (i != ($2))
2405	return 1;
2406      fprintf (f, "%lu", i);
2407    }
2408  /* Do not output a trailing newline, as this causes \r\n confusion
2409     on some platforms.  */
2410  return ferror (f) || fclose (f) != 0;
2411
2412  ;
2413  return 0;
2414}
2415_ACEOF
2416if ac_fn_cxx_try_run "$LINENO"; then :
2417  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2418else
2419  ac_retval=1
2420fi
2421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2422  conftest.$ac_objext conftest.beam conftest.$ac_ext
2423rm -f conftest.val
2424
2425  fi
2426  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2427  as_fn_set_status $ac_retval
2428
2429} # ac_fn_cxx_compute_int
2430
2431# ac_fn_cxx_try_link LINENO
2432# -------------------------
2433# Try to link conftest.$ac_ext, and return whether this succeeded.
2434ac_fn_cxx_try_link ()
2435{
2436  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2437  rm -f conftest.$ac_objext conftest$ac_exeext
2438  if { { ac_try="$ac_link"
2439case "(($ac_try" in
2440  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2441  *) ac_try_echo=$ac_try;;
2442esac
2443eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2444$as_echo "$ac_try_echo"; } >&5
2445  (eval "$ac_link") 2>conftest.err
2446  ac_status=$?
2447  if test -s conftest.err; then
2448    grep -v '^ *+' conftest.err >conftest.er1
2449    cat conftest.er1 >&5
2450    mv -f conftest.er1 conftest.err
2451  fi
2452  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2453  test $ac_status = 0; } && {
2454	 test -z "$ac_cxx_werror_flag" ||
2455	 test ! -s conftest.err
2456       } && test -s conftest$ac_exeext && {
2457	 test "$cross_compiling" = yes ||
2458	 $as_test_x conftest$ac_exeext
2459       }; then :
2460  ac_retval=0
2461else
2462  $as_echo "$as_me: failed program was:" >&5
2463sed 's/^/| /' conftest.$ac_ext >&5
2464
2465	ac_retval=1
2466fi
2467  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2468  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2469  # interfere with the next link command; also delete a directory that is
2470  # left behind by Apple's compiler.  We do this before executing the actions.
2471  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2472  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2473  as_fn_set_status $ac_retval
2474
2475} # ac_fn_cxx_try_link
2476
2477# ac_fn_cxx_check_func LINENO FUNC VAR
2478# ------------------------------------
2479# Tests whether FUNC exists, setting the cache variable VAR accordingly
2480ac_fn_cxx_check_func ()
2481{
2482  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2484$as_echo_n "checking for $2... " >&6; }
2485if eval \${$3+:} false; then :
2486  $as_echo_n "(cached) " >&6
2487else
2488  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2489/* end confdefs.h.  */
2490/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2491   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2492#define $2 innocuous_$2
2493
2494/* System header to define __stub macros and hopefully few prototypes,
2495    which can conflict with char $2 (); below.
2496    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2497    <limits.h> exists even on freestanding compilers.  */
2498
2499#ifdef __STDC__
2500# include <limits.h>
2501#else
2502# include <assert.h>
2503#endif
2504
2505#undef $2
2506
2507/* Override any GCC internal prototype to avoid an error.
2508   Use char because int might match the return type of a GCC
2509   builtin and then its argument prototype would still apply.  */
2510#ifdef __cplusplus
2511extern "C"
2512#endif
2513char $2 ();
2514/* The GNU C library defines this for functions which it implements
2515    to always fail with ENOSYS.  Some functions are actually named
2516    something starting with __ and the normal name is an alias.  */
2517#if defined __stub_$2 || defined __stub___$2
2518choke me
2519#endif
2520
2521int
2522main ()
2523{
2524return $2 ();
2525  ;
2526  return 0;
2527}
2528_ACEOF
2529if ac_fn_cxx_try_link "$LINENO"; then :
2530  eval "$3=yes"
2531else
2532  eval "$3=no"
2533fi
2534rm -f core conftest.err conftest.$ac_objext \
2535    conftest$ac_exeext conftest.$ac_ext
2536fi
2537eval ac_res=\$$3
2538	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2539$as_echo "$ac_res" >&6; }
2540  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2541
2542} # ac_fn_cxx_check_func
2543
2544# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2545# -------------------------------------------------------
2546# Tests whether HEADER exists and can be compiled using the include files in
2547# INCLUDES, setting the cache variable VAR accordingly.
2548ac_fn_c_check_header_compile ()
2549{
2550  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2551  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2552$as_echo_n "checking for $2... " >&6; }
2553if eval \${$3+:} false; then :
2554  $as_echo_n "(cached) " >&6
2555else
2556  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2557/* end confdefs.h.  */
2558$4
2559#include <$2>
2560_ACEOF
2561if ac_fn_c_try_compile "$LINENO"; then :
2562  eval "$3=yes"
2563else
2564  eval "$3=no"
2565fi
2566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2567fi
2568eval ac_res=\$$3
2569	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2570$as_echo "$ac_res" >&6; }
2571  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2572
2573} # ac_fn_c_check_header_compile
2574cat >config.log <<_ACEOF
2575This file contains any messages produced by compilers while
2576running configure, to aid debugging if configure makes a mistake.
2577
2578It was created by OpenJDK $as_me jdk8, which was
2579generated by GNU Autoconf 2.68.  Invocation command line was
2580
2581  $ $0 $@
2582
2583_ACEOF
2584exec 5>>config.log
2585{
2586cat <<_ASUNAME
2587## --------- ##
2588## Platform. ##
2589## --------- ##
2590
2591hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2592uname -m = `(uname -m) 2>/dev/null || echo unknown`
2593uname -r = `(uname -r) 2>/dev/null || echo unknown`
2594uname -s = `(uname -s) 2>/dev/null || echo unknown`
2595uname -v = `(uname -v) 2>/dev/null || echo unknown`
2596
2597/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2598/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2599
2600/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2601/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2602/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2603/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2604/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2605/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2606/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2607
2608_ASUNAME
2609
2610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2611for as_dir in $PATH
2612do
2613  IFS=$as_save_IFS
2614  test -z "$as_dir" && as_dir=.
2615    $as_echo "PATH: $as_dir"
2616  done
2617IFS=$as_save_IFS
2618
2619} >&5
2620
2621cat >&5 <<_ACEOF
2622
2623
2624## ----------- ##
2625## Core tests. ##
2626## ----------- ##
2627
2628_ACEOF
2629
2630
2631# Keep a trace of the command line.
2632# Strip out --no-create and --no-recursion so they do not pile up.
2633# Strip out --silent because we don't want to record it for future runs.
2634# Also quote any args containing shell meta-characters.
2635# Make two passes to allow for proper duplicate-argument suppression.
2636ac_configure_args=
2637ac_configure_args0=
2638ac_configure_args1=
2639ac_must_keep_next=false
2640for ac_pass in 1 2
2641do
2642  for ac_arg
2643  do
2644    case $ac_arg in
2645    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2646    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2647    | -silent | --silent | --silen | --sile | --sil)
2648      continue ;;
2649    *\'*)
2650      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2651    esac
2652    case $ac_pass in
2653    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2654    2)
2655      as_fn_append ac_configure_args1 " '$ac_arg'"
2656      if test $ac_must_keep_next = true; then
2657	ac_must_keep_next=false # Got value, back to normal.
2658      else
2659	case $ac_arg in
2660	  *=* | --config-cache | -C | -disable-* | --disable-* \
2661	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2662	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2663	  | -with-* | --with-* | -without-* | --without-* | --x)
2664	    case "$ac_configure_args0 " in
2665	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2666	    esac
2667	    ;;
2668	  -* ) ac_must_keep_next=true ;;
2669	esac
2670      fi
2671      as_fn_append ac_configure_args " '$ac_arg'"
2672      ;;
2673    esac
2674  done
2675done
2676{ ac_configure_args0=; unset ac_configure_args0;}
2677{ ac_configure_args1=; unset ac_configure_args1;}
2678
2679# When interrupted or exit'd, cleanup temporary files, and complete
2680# config.log.  We remove comments because anyway the quotes in there
2681# would cause problems or look ugly.
2682# WARNING: Use '\'' to represent an apostrophe within the trap.
2683# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2684trap 'exit_status=$?
2685  # Save into config.log some information that might help in debugging.
2686  {
2687    echo
2688
2689    $as_echo "## ---------------- ##
2690## Cache variables. ##
2691## ---------------- ##"
2692    echo
2693    # The following way of writing the cache mishandles newlines in values,
2694(
2695  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2696    eval ac_val=\$$ac_var
2697    case $ac_val in #(
2698    *${as_nl}*)
2699      case $ac_var in #(
2700      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2701$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2702      esac
2703      case $ac_var in #(
2704      _ | IFS | as_nl) ;; #(
2705      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2706      *) { eval $ac_var=; unset $ac_var;} ;;
2707      esac ;;
2708    esac
2709  done
2710  (set) 2>&1 |
2711    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2712    *${as_nl}ac_space=\ *)
2713      sed -n \
2714	"s/'\''/'\''\\\\'\'''\''/g;
2715	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2716      ;; #(
2717    *)
2718      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2719      ;;
2720    esac |
2721    sort
2722)
2723    echo
2724
2725    $as_echo "## ----------------- ##
2726## Output variables. ##
2727## ----------------- ##"
2728    echo
2729    for ac_var in $ac_subst_vars
2730    do
2731      eval ac_val=\$$ac_var
2732      case $ac_val in
2733      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2734      esac
2735      $as_echo "$ac_var='\''$ac_val'\''"
2736    done | sort
2737    echo
2738
2739    if test -n "$ac_subst_files"; then
2740      $as_echo "## ------------------- ##
2741## File substitutions. ##
2742## ------------------- ##"
2743      echo
2744      for ac_var in $ac_subst_files
2745      do
2746	eval ac_val=\$$ac_var
2747	case $ac_val in
2748	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2749	esac
2750	$as_echo "$ac_var='\''$ac_val'\''"
2751      done | sort
2752      echo
2753    fi
2754
2755    if test -s confdefs.h; then
2756      $as_echo "## ----------- ##
2757## confdefs.h. ##
2758## ----------- ##"
2759      echo
2760      cat confdefs.h
2761      echo
2762    fi
2763    test "$ac_signal" != 0 &&
2764      $as_echo "$as_me: caught signal $ac_signal"
2765    $as_echo "$as_me: exit $exit_status"
2766  } >&5
2767  rm -f core *.core core.conftest.* &&
2768    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2769    exit $exit_status
2770' 0
2771for ac_signal in 1 2 13 15; do
2772  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2773done
2774ac_signal=0
2775
2776# confdefs.h avoids OS command line length limits that DEFS can exceed.
2777rm -f -r conftest* confdefs.h
2778
2779$as_echo "/* confdefs.h */" > confdefs.h
2780
2781# Predefined preprocessor variables.
2782
2783cat >>confdefs.h <<_ACEOF
2784#define PACKAGE_NAME "$PACKAGE_NAME"
2785_ACEOF
2786
2787cat >>confdefs.h <<_ACEOF
2788#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2789_ACEOF
2790
2791cat >>confdefs.h <<_ACEOF
2792#define PACKAGE_VERSION "$PACKAGE_VERSION"
2793_ACEOF
2794
2795cat >>confdefs.h <<_ACEOF
2796#define PACKAGE_STRING "$PACKAGE_STRING"
2797_ACEOF
2798
2799cat >>confdefs.h <<_ACEOF
2800#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2801_ACEOF
2802
2803cat >>confdefs.h <<_ACEOF
2804#define PACKAGE_URL "$PACKAGE_URL"
2805_ACEOF
2806
2807
2808# Let the site file select an alternate cache file if it wants to.
2809# Prefer an explicitly selected file to automatically selected ones.
2810ac_site_file1=NONE
2811ac_site_file2=NONE
2812if test -n "$CONFIG_SITE"; then
2813  # We do not want a PATH search for config.site.
2814  case $CONFIG_SITE in #((
2815    -*)  ac_site_file1=./$CONFIG_SITE;;
2816    */*) ac_site_file1=$CONFIG_SITE;;
2817    *)   ac_site_file1=./$CONFIG_SITE;;
2818  esac
2819elif test "x$prefix" != xNONE; then
2820  ac_site_file1=$prefix/share/config.site
2821  ac_site_file2=$prefix/etc/config.site
2822else
2823  ac_site_file1=$ac_default_prefix/share/config.site
2824  ac_site_file2=$ac_default_prefix/etc/config.site
2825fi
2826for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2827do
2828  test "x$ac_site_file" = xNONE && continue
2829  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2830    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2831$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2832    sed 's/^/| /' "$ac_site_file" >&5
2833    . "$ac_site_file" \
2834      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2836as_fn_error $? "failed to load site script $ac_site_file
2837See \`config.log' for more details" "$LINENO" 5; }
2838  fi
2839done
2840
2841if test -r "$cache_file"; then
2842  # Some versions of bash will fail to source /dev/null (special files
2843  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2844  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2845    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2846$as_echo "$as_me: loading cache $cache_file" >&6;}
2847    case $cache_file in
2848      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2849      *)                      . "./$cache_file";;
2850    esac
2851  fi
2852else
2853  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2854$as_echo "$as_me: creating cache $cache_file" >&6;}
2855  >$cache_file
2856fi
2857
2858# Check that the precious variables saved in the cache have kept the same
2859# value.
2860ac_cache_corrupted=false
2861for ac_var in $ac_precious_vars; do
2862  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2863  eval ac_new_set=\$ac_env_${ac_var}_set
2864  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2865  eval ac_new_val=\$ac_env_${ac_var}_value
2866  case $ac_old_set,$ac_new_set in
2867    set,)
2868      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2869$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2870      ac_cache_corrupted=: ;;
2871    ,set)
2872      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2873$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2874      ac_cache_corrupted=: ;;
2875    ,);;
2876    *)
2877      if test "x$ac_old_val" != "x$ac_new_val"; then
2878	# differences in whitespace do not lead to failure.
2879	ac_old_val_w=`echo x $ac_old_val`
2880	ac_new_val_w=`echo x $ac_new_val`
2881	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2882	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2883$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2884	  ac_cache_corrupted=:
2885	else
2886	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2887$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2888	  eval $ac_var=\$ac_old_val
2889	fi
2890	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2891$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2892	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2893$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2894      fi;;
2895  esac
2896  # Pass precious variables to config.status.
2897  if test "$ac_new_set" = set; then
2898    case $ac_new_val in
2899    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2900    *) ac_arg=$ac_var=$ac_new_val ;;
2901    esac
2902    case " $ac_configure_args " in
2903      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2904      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2905    esac
2906  fi
2907done
2908if $ac_cache_corrupted; then
2909  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2911  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2912$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2913  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2914fi
2915## -------------------- ##
2916## Main body of script. ##
2917## -------------------- ##
2918
2919ac_ext=c
2920ac_cpp='$CPP $CPPFLAGS'
2921ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2922ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2923ac_compiler_gnu=$ac_cv_c_compiler_gnu
2924
2925
2926
2927ac_aux_dir=
2928for ac_dir in build-aux "$srcdir"/build-aux; do
2929  if test -f "$ac_dir/install-sh"; then
2930    ac_aux_dir=$ac_dir
2931    ac_install_sh="$ac_aux_dir/install-sh -c"
2932    break
2933  elif test -f "$ac_dir/install.sh"; then
2934    ac_aux_dir=$ac_dir
2935    ac_install_sh="$ac_aux_dir/install.sh -c"
2936    break
2937  elif test -f "$ac_dir/shtool"; then
2938    ac_aux_dir=$ac_dir
2939    ac_install_sh="$ac_aux_dir/shtool install -c"
2940    break
2941  fi
2942done
2943if test -z "$ac_aux_dir"; then
2944  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2945fi
2946
2947# These three variables are undocumented and unsupported,
2948# and are intended to be withdrawn in a future Autoconf release.
2949# They can cause serious problems if a builder's source tree is in a directory
2950# whose full name contains unusual characters.
2951ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2952ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2953ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2954
2955
2956# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2957
2958#
2959# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2960# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2961#
2962# This code is free software; you can redistribute it and/or modify it
2963# under the terms of the GNU General Public License version 2 only, as
2964# published by the Free Software Foundation.  Oracle designates this
2965# particular file as subject to the "Classpath" exception as provided
2966# by Oracle in the LICENSE file that accompanied this code.
2967#
2968# This code is distributed in the hope that it will be useful, but WITHOUT
2969# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2970# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2971# version 2 for more details (a copy is included in the LICENSE file that
2972# accompanied this code).
2973#
2974# You should have received a copy of the GNU General Public License version
2975# 2 along with this work; if not, write to the Free Software Foundation,
2976# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2977#
2978# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2979# or visit www.oracle.com if you need additional information or have any
2980# questions.
2981#
2982
2983#
2984# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2985#
2986# This program is free software; you can redistribute it and/or modify
2987# it under the terms of the GNU General Public License as published by
2988# the Free Software Foundation; either version 2 of the License, or
2989# (at your option) any later version.
2990#
2991# This program is distributed in the hope that it will be useful, but
2992# WITHOUT ANY WARRANTY; without even the implied warranty of
2993# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2994# General Public License for more details.
2995#
2996# You should have received a copy of the GNU General Public License
2997# along with this program; if not, write to the Free Software
2998# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2999#
3000# As a special exception to the GNU General Public License, if you
3001# distribute this file as part of a program that contains a
3002# configuration script generated by Autoconf, you may include it under
3003# the same distribution terms that you use for the rest of that program.
3004
3005# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3006# ----------------------------------
3007# PKG_PROG_PKG_CONFIG
3008
3009# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3010#
3011# Check to see whether a particular set of modules exists.  Similar
3012# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3013#
3014#
3015# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3016# this or PKG_CHECK_MODULES is called, or make sure to call
3017# PKG_CHECK_EXISTS manually
3018# --------------------------------------------------------------
3019
3020
3021
3022# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3023# ---------------------------------------------
3024# _PKG_CONFIG
3025
3026# _PKG_SHORT_ERRORS_SUPPORTED
3027# -----------------------------
3028# _PKG_SHORT_ERRORS_SUPPORTED
3029
3030
3031# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3032# [ACTION-IF-NOT-FOUND])
3033#
3034#
3035# Note that if there is a possibility the first call to
3036# PKG_CHECK_MODULES might not happen, you should be sure to include an
3037# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3038#
3039#
3040# --------------------------------------------------------------
3041# PKG_CHECK_MODULES
3042
3043
3044# Include these first...
3045#
3046# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3047# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3048#
3049# This code is free software; you can redistribute it and/or modify it
3050# under the terms of the GNU General Public License version 2 only, as
3051# published by the Free Software Foundation.  Oracle designates this
3052# particular file as subject to the "Classpath" exception as provided
3053# by Oracle in the LICENSE file that accompanied this code.
3054#
3055# This code is distributed in the hope that it will be useful, but WITHOUT
3056# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3057# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3058# version 2 for more details (a copy is included in the LICENSE file that
3059# accompanied this code).
3060#
3061# You should have received a copy of the GNU General Public License version
3062# 2 along with this work; if not, write to the Free Software Foundation,
3063# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3064#
3065# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3066# or visit www.oracle.com if you need additional information or have any
3067# questions.
3068#
3069
3070
3071
3072# This will make sure the given variable points to a full and proper
3073# path. This means:
3074# 1) There will be no spaces in the path. On posix platforms,
3075#    spaces in the path will result in an error. On Windows,
3076#    the path will be rewritten using short-style to be space-free.
3077# 2) The path will be absolute, and it will be in unix-style (on
3078#     cygwin).
3079# $1: The name of the variable to fix
3080
3081
3082# This will make sure the given variable points to a executable
3083# with a full and proper path. This means:
3084# 1) There will be no spaces in the path. On posix platforms,
3085#    spaces in the path will result in an error. On Windows,
3086#    the path will be rewritten using short-style to be space-free.
3087# 2) The path will be absolute, and it will be in unix-style (on
3088#     cygwin).
3089# Any arguments given to the executable is preserved.
3090# If the input variable does not have a directory specification, then
3091# it need to be in the PATH.
3092# $1: The name of the variable to fix
3093
3094
3095
3096
3097
3098
3099# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3100# $1: variable to check
3101# $2: executable name to print in warning (optional)
3102
3103
3104# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3105# Arguments as AC_PATH_PROG:
3106# $1: variable to set
3107# $2: executable name to look for
3108
3109
3110# Setup the most fundamental tools that relies on not much else to set up,
3111# but is used by much of the early bootstrap code.
3112
3113
3114# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3115
3116
3117
3118
3119
3120
3121
3122#%%% Simple tools %%%
3123
3124# Check if we have found a usable version of make
3125# $1: the path to a potential make binary (or empty)
3126# $2: the description on how we found this
3127
3128
3129# Goes looking for a usable version of GNU make.
3130
3131
3132
3133
3134
3135
3136# Check if build directory is on local disk. If not possible to determine,
3137# we prefer to claim it's local.
3138# Argument 1: directory to test
3139# Argument 2: what to do if it is on local disk
3140# Argument 3: what to do otherwise (remote disk or failure)
3141
3142
3143# Check that source files have basic read permissions set. This might
3144# not be the case in cygwin in certain conditions.
3145
3146
3147
3148
3149#
3150# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3151# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3152#
3153# This code is free software; you can redistribute it and/or modify it
3154# under the terms of the GNU General Public License version 2 only, as
3155# published by the Free Software Foundation.  Oracle designates this
3156# particular file as subject to the "Classpath" exception as provided
3157# by Oracle in the LICENSE file that accompanied this code.
3158#
3159# This code is distributed in the hope that it will be useful, but WITHOUT
3160# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3161# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3162# version 2 for more details (a copy is included in the LICENSE file that
3163# accompanied this code).
3164#
3165# You should have received a copy of the GNU General Public License version
3166# 2 along with this work; if not, write to the Free Software Foundation,
3167# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3168#
3169# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3170# or visit www.oracle.com if you need additional information or have any
3171# questions.
3172#
3173
3174
3175
3176
3177
3178# Helper function which possibly converts a path using DOS-style short mode.
3179# If so, the updated path is stored in $new_path.
3180# $1: The path to check
3181
3182
3183# Helper function which possibly converts a path using DOS-style short mode.
3184# If so, the updated path is stored in $new_path.
3185# $1: The path to check
3186
3187
3188# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3189# and could probably be heavily simplified. However, all changes in this
3190# area tend to need lot of testing in different scenarios, and in lack of
3191# proper unit testing, cleaning this up has not been deemed worth the effort
3192# at the moment.
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3203
3204
3205
3206
3207#
3208# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3209# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3210#
3211# This code is free software; you can redistribute it and/or modify it
3212# under the terms of the GNU General Public License version 2 only, as
3213# published by the Free Software Foundation.  Oracle designates this
3214# particular file as subject to the "Classpath" exception as provided
3215# by Oracle in the LICENSE file that accompanied this code.
3216#
3217# This code is distributed in the hope that it will be useful, but WITHOUT
3218# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3219# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3220# version 2 for more details (a copy is included in the LICENSE file that
3221# accompanied this code).
3222#
3223# You should have received a copy of the GNU General Public License version
3224# 2 along with this work; if not, write to the Free Software Foundation,
3225# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3226#
3227# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3228# or visit www.oracle.com if you need additional information or have any
3229# questions.
3230#
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242# ... then the rest
3243#
3244# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3245# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3246#
3247# This code is free software; you can redistribute it and/or modify it
3248# under the terms of the GNU General Public License version 2 only, as
3249# published by the Free Software Foundation.  Oracle designates this
3250# particular file as subject to the "Classpath" exception as provided
3251# by Oracle in the LICENSE file that accompanied this code.
3252#
3253# This code is distributed in the hope that it will be useful, but WITHOUT
3254# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3255# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3256# version 2 for more details (a copy is included in the LICENSE file that
3257# accompanied this code).
3258#
3259# You should have received a copy of the GNU General Public License version
3260# 2 along with this work; if not, write to the Free Software Foundation,
3261# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3262#
3263# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3264# or visit www.oracle.com if you need additional information or have any
3265# questions.
3266#
3267
3268# Execute the check given as argument, and verify the result
3269# If the Boot JDK was previously found, do nothing
3270# $1 A command line (typically autoconf macro) to execute
3271
3272
3273# Test: Is bootjdk explicitely set by command line arguments?
3274
3275
3276# Test: Is bootjdk available from builddeps?
3277
3278
3279# Test: Is $JAVA_HOME set?
3280
3281
3282# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3283
3284
3285# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3286
3287
3288# Look for a jdk in the given path. If there are multiple, try to select the newest.
3289# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3290# $1 = Path to directory containing jdk installations.
3291# $2 = String to append to the found JDK directory to get the proper JDK home
3292
3293
3294# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3295# environmental variable as base for where to look.
3296# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3297
3298
3299# Test: Is there a JDK installed in default, well-known locations?
3300
3301
3302# Check that a command-line tool in the Boot JDK is correct
3303# $1 = name of variable to assign
3304# $2 = name of binary
3305
3306
3307###############################################################################
3308#
3309# We need a Boot JDK to bootstrap the build.
3310#
3311
3312
3313
3314
3315
3316#
3317# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3318# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3319#
3320# This code is free software; you can redistribute it and/or modify it
3321# under the terms of the GNU General Public License version 2 only, as
3322# published by the Free Software Foundation.  Oracle designates this
3323# particular file as subject to the "Classpath" exception as provided
3324# by Oracle in the LICENSE file that accompanied this code.
3325#
3326# This code is distributed in the hope that it will be useful, but WITHOUT
3327# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3328# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3329# version 2 for more details (a copy is included in the LICENSE file that
3330# accompanied this code).
3331#
3332# You should have received a copy of the GNU General Public License version
3333# 2 along with this work; if not, write to the Free Software Foundation,
3334# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3335#
3336# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3337# or visit www.oracle.com if you need additional information or have any
3338# questions.
3339#
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360#
3361# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3362# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3363#
3364# This code is free software; you can redistribute it and/or modify it
3365# under the terms of the GNU General Public License version 2 only, as
3366# published by the Free Software Foundation.  Oracle designates this
3367# particular file as subject to the "Classpath" exception as provided
3368# by Oracle in the LICENSE file that accompanied this code.
3369#
3370# This code is distributed in the hope that it will be useful, but WITHOUT
3371# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3372# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3373# version 2 for more details (a copy is included in the LICENSE file that
3374# accompanied this code).
3375#
3376# You should have received a copy of the GNU General Public License version
3377# 2 along with this work; if not, write to the Free Software Foundation,
3378# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3379#
3380# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3381# or visit www.oracle.com if you need additional information or have any
3382# questions.
3383#
3384
3385
3386
3387
3388
3389cygwin_help() {
3390    case $1 in
3391    unzip)
3392        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3393    zip)
3394        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3395    make)
3396        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3397    * )
3398       break ;;
3399    esac
3400}
3401
3402apt_help() {
3403    case $1 in
3404    devkit)
3405        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3406    openjdk)
3407        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3408    alsa)
3409        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3410    cups)
3411        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3412    freetype2)
3413        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3414    pulse)
3415        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3416    x11)
3417        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3418    ccache)
3419        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3420    * )
3421       break ;;
3422    esac
3423}
3424
3425yum_help() {
3426    case $1 in
3427    devkit)
3428        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3429    openjdk)
3430        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3431    alsa)
3432        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3433    cups)
3434        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3435    freetype2)
3436        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3437    pulse)
3438        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3439    x11)
3440        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3441    ccache)
3442        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3443    * )
3444       break ;;
3445    esac
3446}
3447
3448port_help() {
3449    PKGHANDLER_COMMAND=""
3450}
3451
3452pkgutil_help() {
3453    PKGHANDLER_COMMAND=""
3454}
3455
3456pkgadd_help() {
3457    PKGHANDLER_COMMAND=""
3458}
3459
3460
3461
3462#
3463# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3464# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3465#
3466# This code is free software; you can redistribute it and/or modify it
3467# under the terms of the GNU General Public License version 2 only, as
3468# published by the Free Software Foundation.  Oracle designates this
3469# particular file as subject to the "Classpath" exception as provided
3470# by Oracle in the LICENSE file that accompanied this code.
3471#
3472# This code is distributed in the hope that it will be useful, but WITHOUT
3473# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3474# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3475# version 2 for more details (a copy is included in the LICENSE file that
3476# accompanied this code).
3477#
3478# You should have received a copy of the GNU General Public License version
3479# 2 along with this work; if not, write to the Free Software Foundation,
3480# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3481#
3482# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3483# or visit www.oracle.com if you need additional information or have any
3484# questions.
3485#
3486
3487
3488
3489
3490
3491
3492
3493
3494###############################################################################
3495#
3496# Should we build only OpenJDK even if closed sources are present?
3497#
3498
3499
3500
3501
3502###############################################################################
3503#
3504# Setup version numbers
3505#
3506
3507
3508
3509
3510
3511
3512# Support for customization of the build process. Some build files
3513# will include counterparts from this location, if they exist. This allows
3514# for a degree of customization of the build targets and the rules/recipes
3515# to create them
3516
3517# Check whether --with-custom-make-dir was given.
3518if test "${with_custom_make_dir+set}" = set; then :
3519  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3520fi
3521
3522
3523
3524#
3525# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3526# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3527#
3528# This code is free software; you can redistribute it and/or modify it
3529# under the terms of the GNU General Public License version 2 only, as
3530# published by the Free Software Foundation.  Oracle designates this
3531# particular file as subject to the "Classpath" exception as provided
3532# by Oracle in the LICENSE file that accompanied this code.
3533#
3534# This code is distributed in the hope that it will be useful, but WITHOUT
3535# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3536# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3537# version 2 for more details (a copy is included in the LICENSE file that
3538# accompanied this code).
3539#
3540# You should have received a copy of the GNU General Public License version
3541# 2 along with this work; if not, write to the Free Software Foundation,
3542# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3543#
3544# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3545# or visit www.oracle.com if you need additional information or have any
3546# questions.
3547#
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563#
3564# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3565# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3566#
3567# This code is free software; you can redistribute it and/or modify it
3568# under the terms of the GNU General Public License version 2 only, as
3569# published by the Free Software Foundation.  Oracle designates this
3570# particular file as subject to the "Classpath" exception as provided
3571# by Oracle in the LICENSE file that accompanied this code.
3572#
3573# This code is distributed in the hope that it will be useful, but WITHOUT
3574# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3575# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3576# version 2 for more details (a copy is included in the LICENSE file that
3577# accompanied this code).
3578#
3579# You should have received a copy of the GNU General Public License version
3580# 2 along with this work; if not, write to the Free Software Foundation,
3581# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3582#
3583# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3584# or visit www.oracle.com if you need additional information or have any
3585# questions.
3586#
3587
3588# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3589# Converts autoconf style CPU name to OpenJDK style, into
3590# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3591
3592
3593# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3594# Converts autoconf style OS name to OpenJDK style, into
3595# VAR_OS and VAR_OS_API.
3596
3597
3598# Expects $host_os $host_cpu $build_os and $build_cpu
3599# and $with_target_bits to have been setup!
3600#
3601# Translate the standard triplet(quadruplet) definition
3602# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3603# OPENJDK_BUILD_OS, etc.
3604
3605
3606# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3607# accordingly. Must be done after setting up build and target system, but before
3608# doing anything else with these values.
3609
3610
3611    # Setup the legacy variables, for controlling the old makefiles.
3612    #
3613
3614
3615
3616
3617#%%% Build and target systems %%%
3618
3619
3620
3621
3622# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3623# Add -mX to various FLAGS variables.
3624
3625
3626
3627
3628
3629
3630#
3631# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3632# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3633#
3634# This code is free software; you can redistribute it and/or modify it
3635# under the terms of the GNU General Public License version 2 only, as
3636# published by the Free Software Foundation.  Oracle designates this
3637# particular file as subject to the "Classpath" exception as provided
3638# by Oracle in the LICENSE file that accompanied this code.
3639#
3640# This code is distributed in the hope that it will be useful, but WITHOUT
3641# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3642# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3643# version 2 for more details (a copy is included in the LICENSE file that
3644# accompanied this code).
3645#
3646# You should have received a copy of the GNU General Public License version
3647# 2 along with this work; if not, write to the Free Software Foundation,
3648# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3649#
3650# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3651# or visit www.oracle.com if you need additional information or have any
3652# questions.
3653#
3654
3655
3656
3657
3658
3659
3660
3661
3662#
3663# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3664# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3665#
3666# This code is free software; you can redistribute it and/or modify it
3667# under the terms of the GNU General Public License version 2 only, as
3668# published by the Free Software Foundation.  Oracle designates this
3669# particular file as subject to the "Classpath" exception as provided
3670# by Oracle in the LICENSE file that accompanied this code.
3671#
3672# This code is distributed in the hope that it will be useful, but WITHOUT
3673# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3674# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3675# version 2 for more details (a copy is included in the LICENSE file that
3676# accompanied this code).
3677#
3678# You should have received a copy of the GNU General Public License version
3679# 2 along with this work; if not, write to the Free Software Foundation,
3680# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3681#
3682# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3683# or visit www.oracle.com if you need additional information or have any
3684# questions.
3685#
3686
3687# $1 = compiler to test (CC or CXX)
3688# $2 = human readable name of compiler (C or C++)
3689
3690
3691
3692
3693
3694# $1 = compiler to test (CC or CXX)
3695# $2 = human readable name of compiler (C or C++)
3696# $3 = list of compiler names to search for
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709#
3710# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3711# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3712#
3713# This code is free software; you can redistribute it and/or modify it
3714# under the terms of the GNU General Public License version 2 only, as
3715# published by the Free Software Foundation.  Oracle designates this
3716# particular file as subject to the "Classpath" exception as provided
3717# by Oracle in the LICENSE file that accompanied this code.
3718#
3719# This code is distributed in the hope that it will be useful, but WITHOUT
3720# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3721# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3722# version 2 for more details (a copy is included in the LICENSE file that
3723# accompanied this code).
3724#
3725# You should have received a copy of the GNU General Public License version
3726# 2 along with this work; if not, write to the Free Software Foundation,
3727# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3728#
3729# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3730# or visit www.oracle.com if you need additional information or have any
3731# questions.
3732#
3733
3734
3735
3736
3737
3738
3739
3740# Check if the VS env variables were setup prior to running configure.
3741# If not, then find vcvarsall.bat and run it automatically, and integrate
3742# the set env variables into the spec file.
3743
3744
3745
3746# Setup the DXSDK paths
3747
3748
3749
3750
3751
3752
3753# This line needs to be here, verbatim, after all includes and the dummy hook
3754# definitions. It is replaced with custom functionality when building
3755# custom sources.
3756#CUSTOM_AUTOCONF_INCLUDE
3757
3758# Do not change or remove the following line, it is needed for consistency checks:
3759DATE_WHEN_GENERATED=1364922883
3760
3761###############################################################################
3762#
3763# Initialization / Boot-strapping
3764#
3765# The bootstrapping process needs to solve the "chicken or the egg" problem,
3766# thus it jumps back and forth, each time gaining something needed later on.
3767#
3768###############################################################################
3769
3770# Basic initialization that must happen first of all
3771
3772# Save the original command line. This is passed to us by the wrapper configure script.
3773
3774DATE_WHEN_CONFIGURED=`LANG=C date`
3775
3776{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3777$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3778{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3779$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3780
3781
3782
3783# Start with tools that do not need have cross compilation support
3784# and can be expected to be found in the default PATH. These tools are
3785# used by configure. Nor are these tools expected to be found in the
3786# devkit from the builddeps server either, since they are
3787# needed to download the devkit.
3788
3789# First are all the simple required tools.
3790
3791    for ac_prog in basename
3792do
3793  # Extract the first word of "$ac_prog", so it can be a program name with args.
3794set dummy $ac_prog; ac_word=$2
3795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3796$as_echo_n "checking for $ac_word... " >&6; }
3797if ${ac_cv_path_BASENAME+:} false; then :
3798  $as_echo_n "(cached) " >&6
3799else
3800  case $BASENAME in
3801  [\\/]* | ?:[\\/]*)
3802  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3803  ;;
3804  *)
3805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3806for as_dir in $PATH
3807do
3808  IFS=$as_save_IFS
3809  test -z "$as_dir" && as_dir=.
3810    for ac_exec_ext in '' $ac_executable_extensions; do
3811  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3812    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3814    break 2
3815  fi
3816done
3817  done
3818IFS=$as_save_IFS
3819
3820  ;;
3821esac
3822fi
3823BASENAME=$ac_cv_path_BASENAME
3824if test -n "$BASENAME"; then
3825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3826$as_echo "$BASENAME" >&6; }
3827else
3828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3829$as_echo "no" >&6; }
3830fi
3831
3832
3833  test -n "$BASENAME" && break
3834done
3835
3836
3837    if test "x$BASENAME" = x; then
3838        if test "xbasename" = x; then
3839          PROG_NAME=basename
3840        else
3841          PROG_NAME=basename
3842        fi
3843        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3844$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3845        as_fn_error $? "Cannot continue" "$LINENO" 5
3846    fi
3847
3848
3849
3850    for ac_prog in bash
3851do
3852  # Extract the first word of "$ac_prog", so it can be a program name with args.
3853set dummy $ac_prog; ac_word=$2
3854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3855$as_echo_n "checking for $ac_word... " >&6; }
3856if ${ac_cv_path_BASH+:} false; then :
3857  $as_echo_n "(cached) " >&6
3858else
3859  case $BASH in
3860  [\\/]* | ?:[\\/]*)
3861  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3862  ;;
3863  *)
3864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3865for as_dir in $PATH
3866do
3867  IFS=$as_save_IFS
3868  test -z "$as_dir" && as_dir=.
3869    for ac_exec_ext in '' $ac_executable_extensions; do
3870  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3871    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3873    break 2
3874  fi
3875done
3876  done
3877IFS=$as_save_IFS
3878
3879  ;;
3880esac
3881fi
3882BASH=$ac_cv_path_BASH
3883if test -n "$BASH"; then
3884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3885$as_echo "$BASH" >&6; }
3886else
3887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3888$as_echo "no" >&6; }
3889fi
3890
3891
3892  test -n "$BASH" && break
3893done
3894
3895
3896    if test "x$BASH" = x; then
3897        if test "xbash" = x; then
3898          PROG_NAME=bash
3899        else
3900          PROG_NAME=bash
3901        fi
3902        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3903$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3904        as_fn_error $? "Cannot continue" "$LINENO" 5
3905    fi
3906
3907
3908
3909    for ac_prog in cat
3910do
3911  # Extract the first word of "$ac_prog", so it can be a program name with args.
3912set dummy $ac_prog; ac_word=$2
3913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3914$as_echo_n "checking for $ac_word... " >&6; }
3915if ${ac_cv_path_CAT+:} false; then :
3916  $as_echo_n "(cached) " >&6
3917else
3918  case $CAT in
3919  [\\/]* | ?:[\\/]*)
3920  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3921  ;;
3922  *)
3923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3924for as_dir in $PATH
3925do
3926  IFS=$as_save_IFS
3927  test -z "$as_dir" && as_dir=.
3928    for ac_exec_ext in '' $ac_executable_extensions; do
3929  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3930    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3932    break 2
3933  fi
3934done
3935  done
3936IFS=$as_save_IFS
3937
3938  ;;
3939esac
3940fi
3941CAT=$ac_cv_path_CAT
3942if test -n "$CAT"; then
3943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3944$as_echo "$CAT" >&6; }
3945else
3946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3947$as_echo "no" >&6; }
3948fi
3949
3950
3951  test -n "$CAT" && break
3952done
3953
3954
3955    if test "x$CAT" = x; then
3956        if test "xcat" = x; then
3957          PROG_NAME=cat
3958        else
3959          PROG_NAME=cat
3960        fi
3961        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3962$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3963        as_fn_error $? "Cannot continue" "$LINENO" 5
3964    fi
3965
3966
3967
3968    for ac_prog in chmod
3969do
3970  # Extract the first word of "$ac_prog", so it can be a program name with args.
3971set dummy $ac_prog; ac_word=$2
3972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3973$as_echo_n "checking for $ac_word... " >&6; }
3974if ${ac_cv_path_CHMOD+:} false; then :
3975  $as_echo_n "(cached) " >&6
3976else
3977  case $CHMOD in
3978  [\\/]* | ?:[\\/]*)
3979  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3980  ;;
3981  *)
3982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3983for as_dir in $PATH
3984do
3985  IFS=$as_save_IFS
3986  test -z "$as_dir" && as_dir=.
3987    for ac_exec_ext in '' $ac_executable_extensions; do
3988  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3989    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3991    break 2
3992  fi
3993done
3994  done
3995IFS=$as_save_IFS
3996
3997  ;;
3998esac
3999fi
4000CHMOD=$ac_cv_path_CHMOD
4001if test -n "$CHMOD"; then
4002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4003$as_echo "$CHMOD" >&6; }
4004else
4005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4006$as_echo "no" >&6; }
4007fi
4008
4009
4010  test -n "$CHMOD" && break
4011done
4012
4013
4014    if test "x$CHMOD" = x; then
4015        if test "xchmod" = x; then
4016          PROG_NAME=chmod
4017        else
4018          PROG_NAME=chmod
4019        fi
4020        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4021$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4022        as_fn_error $? "Cannot continue" "$LINENO" 5
4023    fi
4024
4025
4026
4027    for ac_prog in cmp
4028do
4029  # Extract the first word of "$ac_prog", so it can be a program name with args.
4030set dummy $ac_prog; ac_word=$2
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4032$as_echo_n "checking for $ac_word... " >&6; }
4033if ${ac_cv_path_CMP+:} false; then :
4034  $as_echo_n "(cached) " >&6
4035else
4036  case $CMP in
4037  [\\/]* | ?:[\\/]*)
4038  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4039  ;;
4040  *)
4041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4042for as_dir in $PATH
4043do
4044  IFS=$as_save_IFS
4045  test -z "$as_dir" && as_dir=.
4046    for ac_exec_ext in '' $ac_executable_extensions; do
4047  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4048    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4050    break 2
4051  fi
4052done
4053  done
4054IFS=$as_save_IFS
4055
4056  ;;
4057esac
4058fi
4059CMP=$ac_cv_path_CMP
4060if test -n "$CMP"; then
4061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4062$as_echo "$CMP" >&6; }
4063else
4064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4065$as_echo "no" >&6; }
4066fi
4067
4068
4069  test -n "$CMP" && break
4070done
4071
4072
4073    if test "x$CMP" = x; then
4074        if test "xcmp" = x; then
4075          PROG_NAME=cmp
4076        else
4077          PROG_NAME=cmp
4078        fi
4079        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4080$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4081        as_fn_error $? "Cannot continue" "$LINENO" 5
4082    fi
4083
4084
4085
4086    for ac_prog in comm
4087do
4088  # Extract the first word of "$ac_prog", so it can be a program name with args.
4089set dummy $ac_prog; ac_word=$2
4090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4091$as_echo_n "checking for $ac_word... " >&6; }
4092if ${ac_cv_path_COMM+:} false; then :
4093  $as_echo_n "(cached) " >&6
4094else
4095  case $COMM in
4096  [\\/]* | ?:[\\/]*)
4097  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4098  ;;
4099  *)
4100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4101for as_dir in $PATH
4102do
4103  IFS=$as_save_IFS
4104  test -z "$as_dir" && as_dir=.
4105    for ac_exec_ext in '' $ac_executable_extensions; do
4106  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4107    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4109    break 2
4110  fi
4111done
4112  done
4113IFS=$as_save_IFS
4114
4115  ;;
4116esac
4117fi
4118COMM=$ac_cv_path_COMM
4119if test -n "$COMM"; then
4120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4121$as_echo "$COMM" >&6; }
4122else
4123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4124$as_echo "no" >&6; }
4125fi
4126
4127
4128  test -n "$COMM" && break
4129done
4130
4131
4132    if test "x$COMM" = x; then
4133        if test "xcomm" = x; then
4134          PROG_NAME=comm
4135        else
4136          PROG_NAME=comm
4137        fi
4138        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4139$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4140        as_fn_error $? "Cannot continue" "$LINENO" 5
4141    fi
4142
4143
4144
4145    for ac_prog in cp
4146do
4147  # Extract the first word of "$ac_prog", so it can be a program name with args.
4148set dummy $ac_prog; ac_word=$2
4149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4150$as_echo_n "checking for $ac_word... " >&6; }
4151if ${ac_cv_path_CP+:} false; then :
4152  $as_echo_n "(cached) " >&6
4153else
4154  case $CP in
4155  [\\/]* | ?:[\\/]*)
4156  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4157  ;;
4158  *)
4159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4160for as_dir in $PATH
4161do
4162  IFS=$as_save_IFS
4163  test -z "$as_dir" && as_dir=.
4164    for ac_exec_ext in '' $ac_executable_extensions; do
4165  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4166    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4168    break 2
4169  fi
4170done
4171  done
4172IFS=$as_save_IFS
4173
4174  ;;
4175esac
4176fi
4177CP=$ac_cv_path_CP
4178if test -n "$CP"; then
4179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4180$as_echo "$CP" >&6; }
4181else
4182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4183$as_echo "no" >&6; }
4184fi
4185
4186
4187  test -n "$CP" && break
4188done
4189
4190
4191    if test "x$CP" = x; then
4192        if test "xcp" = x; then
4193          PROG_NAME=cp
4194        else
4195          PROG_NAME=cp
4196        fi
4197        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4198$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4199        as_fn_error $? "Cannot continue" "$LINENO" 5
4200    fi
4201
4202
4203
4204    for ac_prog in cpio
4205do
4206  # Extract the first word of "$ac_prog", so it can be a program name with args.
4207set dummy $ac_prog; ac_word=$2
4208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4209$as_echo_n "checking for $ac_word... " >&6; }
4210if ${ac_cv_path_CPIO+:} false; then :
4211  $as_echo_n "(cached) " >&6
4212else
4213  case $CPIO in
4214  [\\/]* | ?:[\\/]*)
4215  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4216  ;;
4217  *)
4218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4219for as_dir in $PATH
4220do
4221  IFS=$as_save_IFS
4222  test -z "$as_dir" && as_dir=.
4223    for ac_exec_ext in '' $ac_executable_extensions; do
4224  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4225    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4227    break 2
4228  fi
4229done
4230  done
4231IFS=$as_save_IFS
4232
4233  ;;
4234esac
4235fi
4236CPIO=$ac_cv_path_CPIO
4237if test -n "$CPIO"; then
4238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4239$as_echo "$CPIO" >&6; }
4240else
4241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4242$as_echo "no" >&6; }
4243fi
4244
4245
4246  test -n "$CPIO" && break
4247done
4248
4249
4250    if test "x$CPIO" = x; then
4251        if test "xcpio" = x; then
4252          PROG_NAME=cpio
4253        else
4254          PROG_NAME=cpio
4255        fi
4256        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4257$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4258        as_fn_error $? "Cannot continue" "$LINENO" 5
4259    fi
4260
4261
4262
4263    for ac_prog in cut
4264do
4265  # Extract the first word of "$ac_prog", so it can be a program name with args.
4266set dummy $ac_prog; ac_word=$2
4267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4268$as_echo_n "checking for $ac_word... " >&6; }
4269if ${ac_cv_path_CUT+:} false; then :
4270  $as_echo_n "(cached) " >&6
4271else
4272  case $CUT in
4273  [\\/]* | ?:[\\/]*)
4274  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4275  ;;
4276  *)
4277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4278for as_dir in $PATH
4279do
4280  IFS=$as_save_IFS
4281  test -z "$as_dir" && as_dir=.
4282    for ac_exec_ext in '' $ac_executable_extensions; do
4283  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4284    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4286    break 2
4287  fi
4288done
4289  done
4290IFS=$as_save_IFS
4291
4292  ;;
4293esac
4294fi
4295CUT=$ac_cv_path_CUT
4296if test -n "$CUT"; then
4297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4298$as_echo "$CUT" >&6; }
4299else
4300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4301$as_echo "no" >&6; }
4302fi
4303
4304
4305  test -n "$CUT" && break
4306done
4307
4308
4309    if test "x$CUT" = x; then
4310        if test "xcut" = x; then
4311          PROG_NAME=cut
4312        else
4313          PROG_NAME=cut
4314        fi
4315        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4316$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4317        as_fn_error $? "Cannot continue" "$LINENO" 5
4318    fi
4319
4320
4321
4322    for ac_prog in date
4323do
4324  # Extract the first word of "$ac_prog", so it can be a program name with args.
4325set dummy $ac_prog; ac_word=$2
4326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4327$as_echo_n "checking for $ac_word... " >&6; }
4328if ${ac_cv_path_DATE+:} false; then :
4329  $as_echo_n "(cached) " >&6
4330else
4331  case $DATE in
4332  [\\/]* | ?:[\\/]*)
4333  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4334  ;;
4335  *)
4336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4337for as_dir in $PATH
4338do
4339  IFS=$as_save_IFS
4340  test -z "$as_dir" && as_dir=.
4341    for ac_exec_ext in '' $ac_executable_extensions; do
4342  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4343    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4345    break 2
4346  fi
4347done
4348  done
4349IFS=$as_save_IFS
4350
4351  ;;
4352esac
4353fi
4354DATE=$ac_cv_path_DATE
4355if test -n "$DATE"; then
4356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4357$as_echo "$DATE" >&6; }
4358else
4359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4360$as_echo "no" >&6; }
4361fi
4362
4363
4364  test -n "$DATE" && break
4365done
4366
4367
4368    if test "x$DATE" = x; then
4369        if test "xdate" = x; then
4370          PROG_NAME=date
4371        else
4372          PROG_NAME=date
4373        fi
4374        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4375$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4376        as_fn_error $? "Cannot continue" "$LINENO" 5
4377    fi
4378
4379
4380
4381    for ac_prog in gdiff diff
4382do
4383  # Extract the first word of "$ac_prog", so it can be a program name with args.
4384set dummy $ac_prog; ac_word=$2
4385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4386$as_echo_n "checking for $ac_word... " >&6; }
4387if ${ac_cv_path_DIFF+:} false; then :
4388  $as_echo_n "(cached) " >&6
4389else
4390  case $DIFF in
4391  [\\/]* | ?:[\\/]*)
4392  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4393  ;;
4394  *)
4395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4396for as_dir in $PATH
4397do
4398  IFS=$as_save_IFS
4399  test -z "$as_dir" && as_dir=.
4400    for ac_exec_ext in '' $ac_executable_extensions; do
4401  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4402    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4404    break 2
4405  fi
4406done
4407  done
4408IFS=$as_save_IFS
4409
4410  ;;
4411esac
4412fi
4413DIFF=$ac_cv_path_DIFF
4414if test -n "$DIFF"; then
4415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4416$as_echo "$DIFF" >&6; }
4417else
4418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4419$as_echo "no" >&6; }
4420fi
4421
4422
4423  test -n "$DIFF" && break
4424done
4425
4426
4427    if test "x$DIFF" = x; then
4428        if test "xgdiff diff" = x; then
4429          PROG_NAME=diff
4430        else
4431          PROG_NAME=gdiff diff
4432        fi
4433        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4434$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4435        as_fn_error $? "Cannot continue" "$LINENO" 5
4436    fi
4437
4438
4439
4440    for ac_prog in dirname
4441do
4442  # Extract the first word of "$ac_prog", so it can be a program name with args.
4443set dummy $ac_prog; ac_word=$2
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4445$as_echo_n "checking for $ac_word... " >&6; }
4446if ${ac_cv_path_DIRNAME+:} false; then :
4447  $as_echo_n "(cached) " >&6
4448else
4449  case $DIRNAME in
4450  [\\/]* | ?:[\\/]*)
4451  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4452  ;;
4453  *)
4454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4455for as_dir in $PATH
4456do
4457  IFS=$as_save_IFS
4458  test -z "$as_dir" && as_dir=.
4459    for ac_exec_ext in '' $ac_executable_extensions; do
4460  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4461    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4463    break 2
4464  fi
4465done
4466  done
4467IFS=$as_save_IFS
4468
4469  ;;
4470esac
4471fi
4472DIRNAME=$ac_cv_path_DIRNAME
4473if test -n "$DIRNAME"; then
4474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4475$as_echo "$DIRNAME" >&6; }
4476else
4477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4478$as_echo "no" >&6; }
4479fi
4480
4481
4482  test -n "$DIRNAME" && break
4483done
4484
4485
4486    if test "x$DIRNAME" = x; then
4487        if test "xdirname" = x; then
4488          PROG_NAME=dirname
4489        else
4490          PROG_NAME=dirname
4491        fi
4492        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4493$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4494        as_fn_error $? "Cannot continue" "$LINENO" 5
4495    fi
4496
4497
4498
4499    for ac_prog in echo
4500do
4501  # Extract the first word of "$ac_prog", so it can be a program name with args.
4502set dummy $ac_prog; ac_word=$2
4503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4504$as_echo_n "checking for $ac_word... " >&6; }
4505if ${ac_cv_path_ECHO+:} false; then :
4506  $as_echo_n "(cached) " >&6
4507else
4508  case $ECHO in
4509  [\\/]* | ?:[\\/]*)
4510  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4511  ;;
4512  *)
4513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4514for as_dir in $PATH
4515do
4516  IFS=$as_save_IFS
4517  test -z "$as_dir" && as_dir=.
4518    for ac_exec_ext in '' $ac_executable_extensions; do
4519  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4520    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4522    break 2
4523  fi
4524done
4525  done
4526IFS=$as_save_IFS
4527
4528  ;;
4529esac
4530fi
4531ECHO=$ac_cv_path_ECHO
4532if test -n "$ECHO"; then
4533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4534$as_echo "$ECHO" >&6; }
4535else
4536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4537$as_echo "no" >&6; }
4538fi
4539
4540
4541  test -n "$ECHO" && break
4542done
4543
4544
4545    if test "x$ECHO" = x; then
4546        if test "xecho" = x; then
4547          PROG_NAME=echo
4548        else
4549          PROG_NAME=echo
4550        fi
4551        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4552$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4553        as_fn_error $? "Cannot continue" "$LINENO" 5
4554    fi
4555
4556
4557
4558    for ac_prog in expr
4559do
4560  # Extract the first word of "$ac_prog", so it can be a program name with args.
4561set dummy $ac_prog; ac_word=$2
4562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4563$as_echo_n "checking for $ac_word... " >&6; }
4564if ${ac_cv_path_EXPR+:} false; then :
4565  $as_echo_n "(cached) " >&6
4566else
4567  case $EXPR in
4568  [\\/]* | ?:[\\/]*)
4569  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4570  ;;
4571  *)
4572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4573for as_dir in $PATH
4574do
4575  IFS=$as_save_IFS
4576  test -z "$as_dir" && as_dir=.
4577    for ac_exec_ext in '' $ac_executable_extensions; do
4578  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4579    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4581    break 2
4582  fi
4583done
4584  done
4585IFS=$as_save_IFS
4586
4587  ;;
4588esac
4589fi
4590EXPR=$ac_cv_path_EXPR
4591if test -n "$EXPR"; then
4592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4593$as_echo "$EXPR" >&6; }
4594else
4595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4596$as_echo "no" >&6; }
4597fi
4598
4599
4600  test -n "$EXPR" && break
4601done
4602
4603
4604    if test "x$EXPR" = x; then
4605        if test "xexpr" = x; then
4606          PROG_NAME=expr
4607        else
4608          PROG_NAME=expr
4609        fi
4610        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4611$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4612        as_fn_error $? "Cannot continue" "$LINENO" 5
4613    fi
4614
4615
4616
4617    for ac_prog in file
4618do
4619  # Extract the first word of "$ac_prog", so it can be a program name with args.
4620set dummy $ac_prog; ac_word=$2
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4622$as_echo_n "checking for $ac_word... " >&6; }
4623if ${ac_cv_path_FILE+:} false; then :
4624  $as_echo_n "(cached) " >&6
4625else
4626  case $FILE in
4627  [\\/]* | ?:[\\/]*)
4628  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4629  ;;
4630  *)
4631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4632for as_dir in $PATH
4633do
4634  IFS=$as_save_IFS
4635  test -z "$as_dir" && as_dir=.
4636    for ac_exec_ext in '' $ac_executable_extensions; do
4637  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4638    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4640    break 2
4641  fi
4642done
4643  done
4644IFS=$as_save_IFS
4645
4646  ;;
4647esac
4648fi
4649FILE=$ac_cv_path_FILE
4650if test -n "$FILE"; then
4651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4652$as_echo "$FILE" >&6; }
4653else
4654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4655$as_echo "no" >&6; }
4656fi
4657
4658
4659  test -n "$FILE" && break
4660done
4661
4662
4663    if test "x$FILE" = x; then
4664        if test "xfile" = x; then
4665          PROG_NAME=file
4666        else
4667          PROG_NAME=file
4668        fi
4669        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4670$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4671        as_fn_error $? "Cannot continue" "$LINENO" 5
4672    fi
4673
4674
4675
4676    for ac_prog in find
4677do
4678  # Extract the first word of "$ac_prog", so it can be a program name with args.
4679set dummy $ac_prog; ac_word=$2
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4681$as_echo_n "checking for $ac_word... " >&6; }
4682if ${ac_cv_path_FIND+:} false; then :
4683  $as_echo_n "(cached) " >&6
4684else
4685  case $FIND in
4686  [\\/]* | ?:[\\/]*)
4687  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4688  ;;
4689  *)
4690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691for as_dir in $PATH
4692do
4693  IFS=$as_save_IFS
4694  test -z "$as_dir" && as_dir=.
4695    for ac_exec_ext in '' $ac_executable_extensions; do
4696  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4697    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699    break 2
4700  fi
4701done
4702  done
4703IFS=$as_save_IFS
4704
4705  ;;
4706esac
4707fi
4708FIND=$ac_cv_path_FIND
4709if test -n "$FIND"; then
4710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4711$as_echo "$FIND" >&6; }
4712else
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717
4718  test -n "$FIND" && break
4719done
4720
4721
4722    if test "x$FIND" = x; then
4723        if test "xfind" = x; then
4724          PROG_NAME=find
4725        else
4726          PROG_NAME=find
4727        fi
4728        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4729$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4730        as_fn_error $? "Cannot continue" "$LINENO" 5
4731    fi
4732
4733
4734
4735    for ac_prog in head
4736do
4737  # Extract the first word of "$ac_prog", so it can be a program name with args.
4738set dummy $ac_prog; ac_word=$2
4739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4740$as_echo_n "checking for $ac_word... " >&6; }
4741if ${ac_cv_path_HEAD+:} false; then :
4742  $as_echo_n "(cached) " >&6
4743else
4744  case $HEAD in
4745  [\\/]* | ?:[\\/]*)
4746  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4747  ;;
4748  *)
4749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4750for as_dir in $PATH
4751do
4752  IFS=$as_save_IFS
4753  test -z "$as_dir" && as_dir=.
4754    for ac_exec_ext in '' $ac_executable_extensions; do
4755  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4756    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4758    break 2
4759  fi
4760done
4761  done
4762IFS=$as_save_IFS
4763
4764  ;;
4765esac
4766fi
4767HEAD=$ac_cv_path_HEAD
4768if test -n "$HEAD"; then
4769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4770$as_echo "$HEAD" >&6; }
4771else
4772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4773$as_echo "no" >&6; }
4774fi
4775
4776
4777  test -n "$HEAD" && break
4778done
4779
4780
4781    if test "x$HEAD" = x; then
4782        if test "xhead" = x; then
4783          PROG_NAME=head
4784        else
4785          PROG_NAME=head
4786        fi
4787        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4788$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4789        as_fn_error $? "Cannot continue" "$LINENO" 5
4790    fi
4791
4792
4793
4794    for ac_prog in ln
4795do
4796  # Extract the first word of "$ac_prog", so it can be a program name with args.
4797set dummy $ac_prog; ac_word=$2
4798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4799$as_echo_n "checking for $ac_word... " >&6; }
4800if ${ac_cv_path_LN+:} false; then :
4801  $as_echo_n "(cached) " >&6
4802else
4803  case $LN in
4804  [\\/]* | ?:[\\/]*)
4805  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4806  ;;
4807  *)
4808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4809for as_dir in $PATH
4810do
4811  IFS=$as_save_IFS
4812  test -z "$as_dir" && as_dir=.
4813    for ac_exec_ext in '' $ac_executable_extensions; do
4814  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4815    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4817    break 2
4818  fi
4819done
4820  done
4821IFS=$as_save_IFS
4822
4823  ;;
4824esac
4825fi
4826LN=$ac_cv_path_LN
4827if test -n "$LN"; then
4828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4829$as_echo "$LN" >&6; }
4830else
4831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
4833fi
4834
4835
4836  test -n "$LN" && break
4837done
4838
4839
4840    if test "x$LN" = x; then
4841        if test "xln" = x; then
4842          PROG_NAME=ln
4843        else
4844          PROG_NAME=ln
4845        fi
4846        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4847$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4848        as_fn_error $? "Cannot continue" "$LINENO" 5
4849    fi
4850
4851
4852
4853    for ac_prog in ls
4854do
4855  # Extract the first word of "$ac_prog", so it can be a program name with args.
4856set dummy $ac_prog; ac_word=$2
4857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4858$as_echo_n "checking for $ac_word... " >&6; }
4859if ${ac_cv_path_LS+:} false; then :
4860  $as_echo_n "(cached) " >&6
4861else
4862  case $LS in
4863  [\\/]* | ?:[\\/]*)
4864  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4865  ;;
4866  *)
4867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4868for as_dir in $PATH
4869do
4870  IFS=$as_save_IFS
4871  test -z "$as_dir" && as_dir=.
4872    for ac_exec_ext in '' $ac_executable_extensions; do
4873  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4874    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4876    break 2
4877  fi
4878done
4879  done
4880IFS=$as_save_IFS
4881
4882  ;;
4883esac
4884fi
4885LS=$ac_cv_path_LS
4886if test -n "$LS"; then
4887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4888$as_echo "$LS" >&6; }
4889else
4890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4891$as_echo "no" >&6; }
4892fi
4893
4894
4895  test -n "$LS" && break
4896done
4897
4898
4899    if test "x$LS" = x; then
4900        if test "xls" = x; then
4901          PROG_NAME=ls
4902        else
4903          PROG_NAME=ls
4904        fi
4905        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4906$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4907        as_fn_error $? "Cannot continue" "$LINENO" 5
4908    fi
4909
4910
4911
4912    for ac_prog in mkdir
4913do
4914  # Extract the first word of "$ac_prog", so it can be a program name with args.
4915set dummy $ac_prog; ac_word=$2
4916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4917$as_echo_n "checking for $ac_word... " >&6; }
4918if ${ac_cv_path_MKDIR+:} false; then :
4919  $as_echo_n "(cached) " >&6
4920else
4921  case $MKDIR in
4922  [\\/]* | ?:[\\/]*)
4923  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4924  ;;
4925  *)
4926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4927for as_dir in $PATH
4928do
4929  IFS=$as_save_IFS
4930  test -z "$as_dir" && as_dir=.
4931    for ac_exec_ext in '' $ac_executable_extensions; do
4932  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4933    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4935    break 2
4936  fi
4937done
4938  done
4939IFS=$as_save_IFS
4940
4941  ;;
4942esac
4943fi
4944MKDIR=$ac_cv_path_MKDIR
4945if test -n "$MKDIR"; then
4946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4947$as_echo "$MKDIR" >&6; }
4948else
4949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4950$as_echo "no" >&6; }
4951fi
4952
4953
4954  test -n "$MKDIR" && break
4955done
4956
4957
4958    if test "x$MKDIR" = x; then
4959        if test "xmkdir" = x; then
4960          PROG_NAME=mkdir
4961        else
4962          PROG_NAME=mkdir
4963        fi
4964        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4965$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4966        as_fn_error $? "Cannot continue" "$LINENO" 5
4967    fi
4968
4969
4970
4971    for ac_prog in mktemp
4972do
4973  # Extract the first word of "$ac_prog", so it can be a program name with args.
4974set dummy $ac_prog; ac_word=$2
4975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4976$as_echo_n "checking for $ac_word... " >&6; }
4977if ${ac_cv_path_MKTEMP+:} false; then :
4978  $as_echo_n "(cached) " >&6
4979else
4980  case $MKTEMP in
4981  [\\/]* | ?:[\\/]*)
4982  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4983  ;;
4984  *)
4985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4986for as_dir in $PATH
4987do
4988  IFS=$as_save_IFS
4989  test -z "$as_dir" && as_dir=.
4990    for ac_exec_ext in '' $ac_executable_extensions; do
4991  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4992    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4994    break 2
4995  fi
4996done
4997  done
4998IFS=$as_save_IFS
4999
5000  ;;
5001esac
5002fi
5003MKTEMP=$ac_cv_path_MKTEMP
5004if test -n "$MKTEMP"; then
5005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5006$as_echo "$MKTEMP" >&6; }
5007else
5008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5009$as_echo "no" >&6; }
5010fi
5011
5012
5013  test -n "$MKTEMP" && break
5014done
5015
5016
5017    if test "x$MKTEMP" = x; then
5018        if test "xmktemp" = x; then
5019          PROG_NAME=mktemp
5020        else
5021          PROG_NAME=mktemp
5022        fi
5023        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5024$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5025        as_fn_error $? "Cannot continue" "$LINENO" 5
5026    fi
5027
5028
5029
5030    for ac_prog in mv
5031do
5032  # Extract the first word of "$ac_prog", so it can be a program name with args.
5033set dummy $ac_prog; ac_word=$2
5034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5035$as_echo_n "checking for $ac_word... " >&6; }
5036if ${ac_cv_path_MV+:} false; then :
5037  $as_echo_n "(cached) " >&6
5038else
5039  case $MV in
5040  [\\/]* | ?:[\\/]*)
5041  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5042  ;;
5043  *)
5044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5045for as_dir in $PATH
5046do
5047  IFS=$as_save_IFS
5048  test -z "$as_dir" && as_dir=.
5049    for ac_exec_ext in '' $ac_executable_extensions; do
5050  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5051    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5053    break 2
5054  fi
5055done
5056  done
5057IFS=$as_save_IFS
5058
5059  ;;
5060esac
5061fi
5062MV=$ac_cv_path_MV
5063if test -n "$MV"; then
5064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5065$as_echo "$MV" >&6; }
5066else
5067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5068$as_echo "no" >&6; }
5069fi
5070
5071
5072  test -n "$MV" && break
5073done
5074
5075
5076    if test "x$MV" = x; then
5077        if test "xmv" = x; then
5078          PROG_NAME=mv
5079        else
5080          PROG_NAME=mv
5081        fi
5082        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5083$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5084        as_fn_error $? "Cannot continue" "$LINENO" 5
5085    fi
5086
5087
5088
5089    for ac_prog in printf
5090do
5091  # Extract the first word of "$ac_prog", so it can be a program name with args.
5092set dummy $ac_prog; ac_word=$2
5093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5094$as_echo_n "checking for $ac_word... " >&6; }
5095if ${ac_cv_path_PRINTF+:} false; then :
5096  $as_echo_n "(cached) " >&6
5097else
5098  case $PRINTF in
5099  [\\/]* | ?:[\\/]*)
5100  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5101  ;;
5102  *)
5103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5104for as_dir in $PATH
5105do
5106  IFS=$as_save_IFS
5107  test -z "$as_dir" && as_dir=.
5108    for ac_exec_ext in '' $ac_executable_extensions; do
5109  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5110    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5112    break 2
5113  fi
5114done
5115  done
5116IFS=$as_save_IFS
5117
5118  ;;
5119esac
5120fi
5121PRINTF=$ac_cv_path_PRINTF
5122if test -n "$PRINTF"; then
5123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5124$as_echo "$PRINTF" >&6; }
5125else
5126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5127$as_echo "no" >&6; }
5128fi
5129
5130
5131  test -n "$PRINTF" && break
5132done
5133
5134
5135    if test "x$PRINTF" = x; then
5136        if test "xprintf" = x; then
5137          PROG_NAME=printf
5138        else
5139          PROG_NAME=printf
5140        fi
5141        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5142$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5143        as_fn_error $? "Cannot continue" "$LINENO" 5
5144    fi
5145
5146
5147
5148    for ac_prog in pwd
5149do
5150  # Extract the first word of "$ac_prog", so it can be a program name with args.
5151set dummy $ac_prog; ac_word=$2
5152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5153$as_echo_n "checking for $ac_word... " >&6; }
5154if ${ac_cv_path_THEPWDCMD+:} false; then :
5155  $as_echo_n "(cached) " >&6
5156else
5157  case $THEPWDCMD in
5158  [\\/]* | ?:[\\/]*)
5159  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5160  ;;
5161  *)
5162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5163for as_dir in $PATH
5164do
5165  IFS=$as_save_IFS
5166  test -z "$as_dir" && as_dir=.
5167    for ac_exec_ext in '' $ac_executable_extensions; do
5168  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5169    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5171    break 2
5172  fi
5173done
5174  done
5175IFS=$as_save_IFS
5176
5177  ;;
5178esac
5179fi
5180THEPWDCMD=$ac_cv_path_THEPWDCMD
5181if test -n "$THEPWDCMD"; then
5182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5183$as_echo "$THEPWDCMD" >&6; }
5184else
5185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5186$as_echo "no" >&6; }
5187fi
5188
5189
5190  test -n "$THEPWDCMD" && break
5191done
5192
5193
5194    if test "x$THEPWDCMD" = x; then
5195        if test "xpwd" = x; then
5196          PROG_NAME=thepwdcmd
5197        else
5198          PROG_NAME=pwd
5199        fi
5200        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5201$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5202        as_fn_error $? "Cannot continue" "$LINENO" 5
5203    fi
5204
5205
5206
5207    for ac_prog in rm
5208do
5209  # Extract the first word of "$ac_prog", so it can be a program name with args.
5210set dummy $ac_prog; ac_word=$2
5211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5212$as_echo_n "checking for $ac_word... " >&6; }
5213if ${ac_cv_path_RM+:} false; then :
5214  $as_echo_n "(cached) " >&6
5215else
5216  case $RM in
5217  [\\/]* | ?:[\\/]*)
5218  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5219  ;;
5220  *)
5221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5222for as_dir in $PATH
5223do
5224  IFS=$as_save_IFS
5225  test -z "$as_dir" && as_dir=.
5226    for ac_exec_ext in '' $ac_executable_extensions; do
5227  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5228    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5230    break 2
5231  fi
5232done
5233  done
5234IFS=$as_save_IFS
5235
5236  ;;
5237esac
5238fi
5239RM=$ac_cv_path_RM
5240if test -n "$RM"; then
5241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5242$as_echo "$RM" >&6; }
5243else
5244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5245$as_echo "no" >&6; }
5246fi
5247
5248
5249  test -n "$RM" && break
5250done
5251
5252
5253    if test "x$RM" = x; then
5254        if test "xrm" = x; then
5255          PROG_NAME=rm
5256        else
5257          PROG_NAME=rm
5258        fi
5259        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5260$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5261        as_fn_error $? "Cannot continue" "$LINENO" 5
5262    fi
5263
5264
5265
5266    for ac_prog in sh
5267do
5268  # Extract the first word of "$ac_prog", so it can be a program name with args.
5269set dummy $ac_prog; ac_word=$2
5270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5271$as_echo_n "checking for $ac_word... " >&6; }
5272if ${ac_cv_path_SH+:} false; then :
5273  $as_echo_n "(cached) " >&6
5274else
5275  case $SH in
5276  [\\/]* | ?:[\\/]*)
5277  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5278  ;;
5279  *)
5280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5281for as_dir in $PATH
5282do
5283  IFS=$as_save_IFS
5284  test -z "$as_dir" && as_dir=.
5285    for ac_exec_ext in '' $ac_executable_extensions; do
5286  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5287    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5289    break 2
5290  fi
5291done
5292  done
5293IFS=$as_save_IFS
5294
5295  ;;
5296esac
5297fi
5298SH=$ac_cv_path_SH
5299if test -n "$SH"; then
5300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5301$as_echo "$SH" >&6; }
5302else
5303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5304$as_echo "no" >&6; }
5305fi
5306
5307
5308  test -n "$SH" && break
5309done
5310
5311
5312    if test "x$SH" = x; then
5313        if test "xsh" = x; then
5314          PROG_NAME=sh
5315        else
5316          PROG_NAME=sh
5317        fi
5318        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5319$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5320        as_fn_error $? "Cannot continue" "$LINENO" 5
5321    fi
5322
5323
5324
5325    for ac_prog in sort
5326do
5327  # Extract the first word of "$ac_prog", so it can be a program name with args.
5328set dummy $ac_prog; ac_word=$2
5329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5330$as_echo_n "checking for $ac_word... " >&6; }
5331if ${ac_cv_path_SORT+:} false; then :
5332  $as_echo_n "(cached) " >&6
5333else
5334  case $SORT in
5335  [\\/]* | ?:[\\/]*)
5336  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5337  ;;
5338  *)
5339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5340for as_dir in $PATH
5341do
5342  IFS=$as_save_IFS
5343  test -z "$as_dir" && as_dir=.
5344    for ac_exec_ext in '' $ac_executable_extensions; do
5345  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5346    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5348    break 2
5349  fi
5350done
5351  done
5352IFS=$as_save_IFS
5353
5354  ;;
5355esac
5356fi
5357SORT=$ac_cv_path_SORT
5358if test -n "$SORT"; then
5359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5360$as_echo "$SORT" >&6; }
5361else
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5363$as_echo "no" >&6; }
5364fi
5365
5366
5367  test -n "$SORT" && break
5368done
5369
5370
5371    if test "x$SORT" = x; then
5372        if test "xsort" = x; then
5373          PROG_NAME=sort
5374        else
5375          PROG_NAME=sort
5376        fi
5377        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5378$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5379        as_fn_error $? "Cannot continue" "$LINENO" 5
5380    fi
5381
5382
5383
5384    for ac_prog in tail
5385do
5386  # Extract the first word of "$ac_prog", so it can be a program name with args.
5387set dummy $ac_prog; ac_word=$2
5388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5389$as_echo_n "checking for $ac_word... " >&6; }
5390if ${ac_cv_path_TAIL+:} false; then :
5391  $as_echo_n "(cached) " >&6
5392else
5393  case $TAIL in
5394  [\\/]* | ?:[\\/]*)
5395  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5396  ;;
5397  *)
5398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5399for as_dir in $PATH
5400do
5401  IFS=$as_save_IFS
5402  test -z "$as_dir" && as_dir=.
5403    for ac_exec_ext in '' $ac_executable_extensions; do
5404  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5405    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5407    break 2
5408  fi
5409done
5410  done
5411IFS=$as_save_IFS
5412
5413  ;;
5414esac
5415fi
5416TAIL=$ac_cv_path_TAIL
5417if test -n "$TAIL"; then
5418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5419$as_echo "$TAIL" >&6; }
5420else
5421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5422$as_echo "no" >&6; }
5423fi
5424
5425
5426  test -n "$TAIL" && break
5427done
5428
5429
5430    if test "x$TAIL" = x; then
5431        if test "xtail" = x; then
5432          PROG_NAME=tail
5433        else
5434          PROG_NAME=tail
5435        fi
5436        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5437$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5438        as_fn_error $? "Cannot continue" "$LINENO" 5
5439    fi
5440
5441
5442
5443    for ac_prog in tar
5444do
5445  # Extract the first word of "$ac_prog", so it can be a program name with args.
5446set dummy $ac_prog; ac_word=$2
5447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5448$as_echo_n "checking for $ac_word... " >&6; }
5449if ${ac_cv_path_TAR+:} false; then :
5450  $as_echo_n "(cached) " >&6
5451else
5452  case $TAR in
5453  [\\/]* | ?:[\\/]*)
5454  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5455  ;;
5456  *)
5457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5458for as_dir in $PATH
5459do
5460  IFS=$as_save_IFS
5461  test -z "$as_dir" && as_dir=.
5462    for ac_exec_ext in '' $ac_executable_extensions; do
5463  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5464    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5466    break 2
5467  fi
5468done
5469  done
5470IFS=$as_save_IFS
5471
5472  ;;
5473esac
5474fi
5475TAR=$ac_cv_path_TAR
5476if test -n "$TAR"; then
5477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5478$as_echo "$TAR" >&6; }
5479else
5480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5481$as_echo "no" >&6; }
5482fi
5483
5484
5485  test -n "$TAR" && break
5486done
5487
5488
5489    if test "x$TAR" = x; then
5490        if test "xtar" = x; then
5491          PROG_NAME=tar
5492        else
5493          PROG_NAME=tar
5494        fi
5495        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5496$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5497        as_fn_error $? "Cannot continue" "$LINENO" 5
5498    fi
5499
5500
5501
5502    for ac_prog in tee
5503do
5504  # Extract the first word of "$ac_prog", so it can be a program name with args.
5505set dummy $ac_prog; ac_word=$2
5506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5507$as_echo_n "checking for $ac_word... " >&6; }
5508if ${ac_cv_path_TEE+:} false; then :
5509  $as_echo_n "(cached) " >&6
5510else
5511  case $TEE in
5512  [\\/]* | ?:[\\/]*)
5513  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5514  ;;
5515  *)
5516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5517for as_dir in $PATH
5518do
5519  IFS=$as_save_IFS
5520  test -z "$as_dir" && as_dir=.
5521    for ac_exec_ext in '' $ac_executable_extensions; do
5522  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5523    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5525    break 2
5526  fi
5527done
5528  done
5529IFS=$as_save_IFS
5530
5531  ;;
5532esac
5533fi
5534TEE=$ac_cv_path_TEE
5535if test -n "$TEE"; then
5536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5537$as_echo "$TEE" >&6; }
5538else
5539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5540$as_echo "no" >&6; }
5541fi
5542
5543
5544  test -n "$TEE" && break
5545done
5546
5547
5548    if test "x$TEE" = x; then
5549        if test "xtee" = x; then
5550          PROG_NAME=tee
5551        else
5552          PROG_NAME=tee
5553        fi
5554        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5555$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5556        as_fn_error $? "Cannot continue" "$LINENO" 5
5557    fi
5558
5559
5560
5561    for ac_prog in touch
5562do
5563  # Extract the first word of "$ac_prog", so it can be a program name with args.
5564set dummy $ac_prog; ac_word=$2
5565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5566$as_echo_n "checking for $ac_word... " >&6; }
5567if ${ac_cv_path_TOUCH+:} false; then :
5568  $as_echo_n "(cached) " >&6
5569else
5570  case $TOUCH in
5571  [\\/]* | ?:[\\/]*)
5572  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5573  ;;
5574  *)
5575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5576for as_dir in $PATH
5577do
5578  IFS=$as_save_IFS
5579  test -z "$as_dir" && as_dir=.
5580    for ac_exec_ext in '' $ac_executable_extensions; do
5581  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5582    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5584    break 2
5585  fi
5586done
5587  done
5588IFS=$as_save_IFS
5589
5590  ;;
5591esac
5592fi
5593TOUCH=$ac_cv_path_TOUCH
5594if test -n "$TOUCH"; then
5595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5596$as_echo "$TOUCH" >&6; }
5597else
5598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5599$as_echo "no" >&6; }
5600fi
5601
5602
5603  test -n "$TOUCH" && break
5604done
5605
5606
5607    if test "x$TOUCH" = x; then
5608        if test "xtouch" = x; then
5609          PROG_NAME=touch
5610        else
5611          PROG_NAME=touch
5612        fi
5613        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5614$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5615        as_fn_error $? "Cannot continue" "$LINENO" 5
5616    fi
5617
5618
5619
5620    for ac_prog in tr
5621do
5622  # Extract the first word of "$ac_prog", so it can be a program name with args.
5623set dummy $ac_prog; ac_word=$2
5624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5625$as_echo_n "checking for $ac_word... " >&6; }
5626if ${ac_cv_path_TR+:} false; then :
5627  $as_echo_n "(cached) " >&6
5628else
5629  case $TR in
5630  [\\/]* | ?:[\\/]*)
5631  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5632  ;;
5633  *)
5634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5635for as_dir in $PATH
5636do
5637  IFS=$as_save_IFS
5638  test -z "$as_dir" && as_dir=.
5639    for ac_exec_ext in '' $ac_executable_extensions; do
5640  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5641    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5643    break 2
5644  fi
5645done
5646  done
5647IFS=$as_save_IFS
5648
5649  ;;
5650esac
5651fi
5652TR=$ac_cv_path_TR
5653if test -n "$TR"; then
5654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5655$as_echo "$TR" >&6; }
5656else
5657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5658$as_echo "no" >&6; }
5659fi
5660
5661
5662  test -n "$TR" && break
5663done
5664
5665
5666    if test "x$TR" = x; then
5667        if test "xtr" = x; then
5668          PROG_NAME=tr
5669        else
5670          PROG_NAME=tr
5671        fi
5672        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5673$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5674        as_fn_error $? "Cannot continue" "$LINENO" 5
5675    fi
5676
5677
5678
5679    for ac_prog in uname
5680do
5681  # Extract the first word of "$ac_prog", so it can be a program name with args.
5682set dummy $ac_prog; ac_word=$2
5683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5684$as_echo_n "checking for $ac_word... " >&6; }
5685if ${ac_cv_path_UNAME+:} false; then :
5686  $as_echo_n "(cached) " >&6
5687else
5688  case $UNAME in
5689  [\\/]* | ?:[\\/]*)
5690  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5691  ;;
5692  *)
5693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5694for as_dir in $PATH
5695do
5696  IFS=$as_save_IFS
5697  test -z "$as_dir" && as_dir=.
5698    for ac_exec_ext in '' $ac_executable_extensions; do
5699  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5700    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5702    break 2
5703  fi
5704done
5705  done
5706IFS=$as_save_IFS
5707
5708  ;;
5709esac
5710fi
5711UNAME=$ac_cv_path_UNAME
5712if test -n "$UNAME"; then
5713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5714$as_echo "$UNAME" >&6; }
5715else
5716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5717$as_echo "no" >&6; }
5718fi
5719
5720
5721  test -n "$UNAME" && break
5722done
5723
5724
5725    if test "x$UNAME" = x; then
5726        if test "xuname" = x; then
5727          PROG_NAME=uname
5728        else
5729          PROG_NAME=uname
5730        fi
5731        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5732$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5733        as_fn_error $? "Cannot continue" "$LINENO" 5
5734    fi
5735
5736
5737
5738    for ac_prog in uniq
5739do
5740  # Extract the first word of "$ac_prog", so it can be a program name with args.
5741set dummy $ac_prog; ac_word=$2
5742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5743$as_echo_n "checking for $ac_word... " >&6; }
5744if ${ac_cv_path_UNIQ+:} false; then :
5745  $as_echo_n "(cached) " >&6
5746else
5747  case $UNIQ in
5748  [\\/]* | ?:[\\/]*)
5749  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5750  ;;
5751  *)
5752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5753for as_dir in $PATH
5754do
5755  IFS=$as_save_IFS
5756  test -z "$as_dir" && as_dir=.
5757    for ac_exec_ext in '' $ac_executable_extensions; do
5758  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5759    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5761    break 2
5762  fi
5763done
5764  done
5765IFS=$as_save_IFS
5766
5767  ;;
5768esac
5769fi
5770UNIQ=$ac_cv_path_UNIQ
5771if test -n "$UNIQ"; then
5772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5773$as_echo "$UNIQ" >&6; }
5774else
5775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5776$as_echo "no" >&6; }
5777fi
5778
5779
5780  test -n "$UNIQ" && break
5781done
5782
5783
5784    if test "x$UNIQ" = x; then
5785        if test "xuniq" = x; then
5786          PROG_NAME=uniq
5787        else
5788          PROG_NAME=uniq
5789        fi
5790        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5791$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5792        as_fn_error $? "Cannot continue" "$LINENO" 5
5793    fi
5794
5795
5796
5797    for ac_prog in wc
5798do
5799  # Extract the first word of "$ac_prog", so it can be a program name with args.
5800set dummy $ac_prog; ac_word=$2
5801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5802$as_echo_n "checking for $ac_word... " >&6; }
5803if ${ac_cv_path_WC+:} false; then :
5804  $as_echo_n "(cached) " >&6
5805else
5806  case $WC in
5807  [\\/]* | ?:[\\/]*)
5808  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5809  ;;
5810  *)
5811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5812for as_dir in $PATH
5813do
5814  IFS=$as_save_IFS
5815  test -z "$as_dir" && as_dir=.
5816    for ac_exec_ext in '' $ac_executable_extensions; do
5817  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5818    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5820    break 2
5821  fi
5822done
5823  done
5824IFS=$as_save_IFS
5825
5826  ;;
5827esac
5828fi
5829WC=$ac_cv_path_WC
5830if test -n "$WC"; then
5831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5832$as_echo "$WC" >&6; }
5833else
5834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5835$as_echo "no" >&6; }
5836fi
5837
5838
5839  test -n "$WC" && break
5840done
5841
5842
5843    if test "x$WC" = x; then
5844        if test "xwc" = x; then
5845          PROG_NAME=wc
5846        else
5847          PROG_NAME=wc
5848        fi
5849        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5850$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5851        as_fn_error $? "Cannot continue" "$LINENO" 5
5852    fi
5853
5854
5855
5856    for ac_prog in which
5857do
5858  # Extract the first word of "$ac_prog", so it can be a program name with args.
5859set dummy $ac_prog; ac_word=$2
5860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5861$as_echo_n "checking for $ac_word... " >&6; }
5862if ${ac_cv_path_WHICH+:} false; then :
5863  $as_echo_n "(cached) " >&6
5864else
5865  case $WHICH in
5866  [\\/]* | ?:[\\/]*)
5867  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5868  ;;
5869  *)
5870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5871for as_dir in $PATH
5872do
5873  IFS=$as_save_IFS
5874  test -z "$as_dir" && as_dir=.
5875    for ac_exec_ext in '' $ac_executable_extensions; do
5876  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5877    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5879    break 2
5880  fi
5881done
5882  done
5883IFS=$as_save_IFS
5884
5885  ;;
5886esac
5887fi
5888WHICH=$ac_cv_path_WHICH
5889if test -n "$WHICH"; then
5890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5891$as_echo "$WHICH" >&6; }
5892else
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894$as_echo "no" >&6; }
5895fi
5896
5897
5898  test -n "$WHICH" && break
5899done
5900
5901
5902    if test "x$WHICH" = x; then
5903        if test "xwhich" = x; then
5904          PROG_NAME=which
5905        else
5906          PROG_NAME=which
5907        fi
5908        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5909$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5910        as_fn_error $? "Cannot continue" "$LINENO" 5
5911    fi
5912
5913
5914
5915    for ac_prog in xargs
5916do
5917  # Extract the first word of "$ac_prog", so it can be a program name with args.
5918set dummy $ac_prog; ac_word=$2
5919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5920$as_echo_n "checking for $ac_word... " >&6; }
5921if ${ac_cv_path_XARGS+:} false; then :
5922  $as_echo_n "(cached) " >&6
5923else
5924  case $XARGS in
5925  [\\/]* | ?:[\\/]*)
5926  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5927  ;;
5928  *)
5929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5930for as_dir in $PATH
5931do
5932  IFS=$as_save_IFS
5933  test -z "$as_dir" && as_dir=.
5934    for ac_exec_ext in '' $ac_executable_extensions; do
5935  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5936    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5938    break 2
5939  fi
5940done
5941  done
5942IFS=$as_save_IFS
5943
5944  ;;
5945esac
5946fi
5947XARGS=$ac_cv_path_XARGS
5948if test -n "$XARGS"; then
5949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5950$as_echo "$XARGS" >&6; }
5951else
5952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5953$as_echo "no" >&6; }
5954fi
5955
5956
5957  test -n "$XARGS" && break
5958done
5959
5960
5961    if test "x$XARGS" = x; then
5962        if test "xxargs" = x; then
5963          PROG_NAME=xargs
5964        else
5965          PROG_NAME=xargs
5966        fi
5967        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5968$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5969        as_fn_error $? "Cannot continue" "$LINENO" 5
5970    fi
5971
5972
5973
5974# Then required tools that require some special treatment.
5975for ac_prog in gawk mawk nawk awk
5976do
5977  # Extract the first word of "$ac_prog", so it can be a program name with args.
5978set dummy $ac_prog; ac_word=$2
5979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5980$as_echo_n "checking for $ac_word... " >&6; }
5981if ${ac_cv_prog_AWK+:} false; then :
5982  $as_echo_n "(cached) " >&6
5983else
5984  if test -n "$AWK"; then
5985  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5986else
5987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5988for as_dir in $PATH
5989do
5990  IFS=$as_save_IFS
5991  test -z "$as_dir" && as_dir=.
5992    for ac_exec_ext in '' $ac_executable_extensions; do
5993  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5994    ac_cv_prog_AWK="$ac_prog"
5995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5996    break 2
5997  fi
5998done
5999  done
6000IFS=$as_save_IFS
6001
6002fi
6003fi
6004AWK=$ac_cv_prog_AWK
6005if test -n "$AWK"; then
6006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6007$as_echo "$AWK" >&6; }
6008else
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6010$as_echo "no" >&6; }
6011fi
6012
6013
6014  test -n "$AWK" && break
6015done
6016
6017
6018    if test "x$AWK" = x; then
6019        if test "x" = x; then
6020          PROG_NAME=awk
6021        else
6022          PROG_NAME=
6023        fi
6024        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6025$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6026        as_fn_error $? "Cannot continue" "$LINENO" 5
6027    fi
6028
6029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6030$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6031if ${ac_cv_path_GREP+:} false; then :
6032  $as_echo_n "(cached) " >&6
6033else
6034  if test -z "$GREP"; then
6035  ac_path_GREP_found=false
6036  # Loop through the user's path and test for each of PROGNAME-LIST
6037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6038for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6039do
6040  IFS=$as_save_IFS
6041  test -z "$as_dir" && as_dir=.
6042    for ac_prog in grep ggrep; do
6043    for ac_exec_ext in '' $ac_executable_extensions; do
6044      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6045      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6046# Check for GNU ac_path_GREP and select it if it is found.
6047  # Check for GNU $ac_path_GREP
6048case `"$ac_path_GREP" --version 2>&1` in
6049*GNU*)
6050  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6051*)
6052  ac_count=0
6053  $as_echo_n 0123456789 >"conftest.in"
6054  while :
6055  do
6056    cat "conftest.in" "conftest.in" >"conftest.tmp"
6057    mv "conftest.tmp" "conftest.in"
6058    cp "conftest.in" "conftest.nl"
6059    $as_echo 'GREP' >> "conftest.nl"
6060    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6061    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6062    as_fn_arith $ac_count + 1 && ac_count=$as_val
6063    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6064      # Best one so far, save it but keep looking for a better one
6065      ac_cv_path_GREP="$ac_path_GREP"
6066      ac_path_GREP_max=$ac_count
6067    fi
6068    # 10*(2^10) chars as input seems more than enough
6069    test $ac_count -gt 10 && break
6070  done
6071  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6072esac
6073
6074      $ac_path_GREP_found && break 3
6075    done
6076  done
6077  done
6078IFS=$as_save_IFS
6079  if test -z "$ac_cv_path_GREP"; then
6080    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6081  fi
6082else
6083  ac_cv_path_GREP=$GREP
6084fi
6085
6086fi
6087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6088$as_echo "$ac_cv_path_GREP" >&6; }
6089 GREP="$ac_cv_path_GREP"
6090
6091
6092
6093    if test "x$GREP" = x; then
6094        if test "x" = x; then
6095          PROG_NAME=grep
6096        else
6097          PROG_NAME=
6098        fi
6099        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6100$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6101        as_fn_error $? "Cannot continue" "$LINENO" 5
6102    fi
6103
6104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6105$as_echo_n "checking for egrep... " >&6; }
6106if ${ac_cv_path_EGREP+:} false; then :
6107  $as_echo_n "(cached) " >&6
6108else
6109  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6110   then ac_cv_path_EGREP="$GREP -E"
6111   else
6112     if test -z "$EGREP"; then
6113  ac_path_EGREP_found=false
6114  # Loop through the user's path and test for each of PROGNAME-LIST
6115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6116for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6117do
6118  IFS=$as_save_IFS
6119  test -z "$as_dir" && as_dir=.
6120    for ac_prog in egrep; do
6121    for ac_exec_ext in '' $ac_executable_extensions; do
6122      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6123      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6124# Check for GNU ac_path_EGREP and select it if it is found.
6125  # Check for GNU $ac_path_EGREP
6126case `"$ac_path_EGREP" --version 2>&1` in
6127*GNU*)
6128  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6129*)
6130  ac_count=0
6131  $as_echo_n 0123456789 >"conftest.in"
6132  while :
6133  do
6134    cat "conftest.in" "conftest.in" >"conftest.tmp"
6135    mv "conftest.tmp" "conftest.in"
6136    cp "conftest.in" "conftest.nl"
6137    $as_echo 'EGREP' >> "conftest.nl"
6138    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6139    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6140    as_fn_arith $ac_count + 1 && ac_count=$as_val
6141    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6142      # Best one so far, save it but keep looking for a better one
6143      ac_cv_path_EGREP="$ac_path_EGREP"
6144      ac_path_EGREP_max=$ac_count
6145    fi
6146    # 10*(2^10) chars as input seems more than enough
6147    test $ac_count -gt 10 && break
6148  done
6149  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6150esac
6151
6152      $ac_path_EGREP_found && break 3
6153    done
6154  done
6155  done
6156IFS=$as_save_IFS
6157  if test -z "$ac_cv_path_EGREP"; then
6158    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6159  fi
6160else
6161  ac_cv_path_EGREP=$EGREP
6162fi
6163
6164   fi
6165fi
6166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6167$as_echo "$ac_cv_path_EGREP" >&6; }
6168 EGREP="$ac_cv_path_EGREP"
6169
6170
6171
6172    if test "x$EGREP" = x; then
6173        if test "x" = x; then
6174          PROG_NAME=egrep
6175        else
6176          PROG_NAME=
6177        fi
6178        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6179$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6180        as_fn_error $? "Cannot continue" "$LINENO" 5
6181    fi
6182
6183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6184$as_echo_n "checking for fgrep... " >&6; }
6185if ${ac_cv_path_FGREP+:} false; then :
6186  $as_echo_n "(cached) " >&6
6187else
6188  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6189   then ac_cv_path_FGREP="$GREP -F"
6190   else
6191     if test -z "$FGREP"; then
6192  ac_path_FGREP_found=false
6193  # Loop through the user's path and test for each of PROGNAME-LIST
6194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6195for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6196do
6197  IFS=$as_save_IFS
6198  test -z "$as_dir" && as_dir=.
6199    for ac_prog in fgrep; do
6200    for ac_exec_ext in '' $ac_executable_extensions; do
6201      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6202      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6203# Check for GNU ac_path_FGREP and select it if it is found.
6204  # Check for GNU $ac_path_FGREP
6205case `"$ac_path_FGREP" --version 2>&1` in
6206*GNU*)
6207  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6208*)
6209  ac_count=0
6210  $as_echo_n 0123456789 >"conftest.in"
6211  while :
6212  do
6213    cat "conftest.in" "conftest.in" >"conftest.tmp"
6214    mv "conftest.tmp" "conftest.in"
6215    cp "conftest.in" "conftest.nl"
6216    $as_echo 'FGREP' >> "conftest.nl"
6217    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6218    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6219    as_fn_arith $ac_count + 1 && ac_count=$as_val
6220    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6221      # Best one so far, save it but keep looking for a better one
6222      ac_cv_path_FGREP="$ac_path_FGREP"
6223      ac_path_FGREP_max=$ac_count
6224    fi
6225    # 10*(2^10) chars as input seems more than enough
6226    test $ac_count -gt 10 && break
6227  done
6228  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6229esac
6230
6231      $ac_path_FGREP_found && break 3
6232    done
6233  done
6234  done
6235IFS=$as_save_IFS
6236  if test -z "$ac_cv_path_FGREP"; then
6237    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6238  fi
6239else
6240  ac_cv_path_FGREP=$FGREP
6241fi
6242
6243   fi
6244fi
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6246$as_echo "$ac_cv_path_FGREP" >&6; }
6247 FGREP="$ac_cv_path_FGREP"
6248
6249
6250
6251    if test "x$FGREP" = x; then
6252        if test "x" = x; then
6253          PROG_NAME=fgrep
6254        else
6255          PROG_NAME=
6256        fi
6257        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6258$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6259        as_fn_error $? "Cannot continue" "$LINENO" 5
6260    fi
6261
6262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6263$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6264if ${ac_cv_path_SED+:} false; then :
6265  $as_echo_n "(cached) " >&6
6266else
6267            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6268     for ac_i in 1 2 3 4 5 6 7; do
6269       ac_script="$ac_script$as_nl$ac_script"
6270     done
6271     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6272     { ac_script=; unset ac_script;}
6273     if test -z "$SED"; then
6274  ac_path_SED_found=false
6275  # Loop through the user's path and test for each of PROGNAME-LIST
6276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6277for as_dir in $PATH
6278do
6279  IFS=$as_save_IFS
6280  test -z "$as_dir" && as_dir=.
6281    for ac_prog in sed gsed; do
6282    for ac_exec_ext in '' $ac_executable_extensions; do
6283      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6284      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6285# Check for GNU ac_path_SED and select it if it is found.
6286  # Check for GNU $ac_path_SED
6287case `"$ac_path_SED" --version 2>&1` in
6288*GNU*)
6289  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6290*)
6291  ac_count=0
6292  $as_echo_n 0123456789 >"conftest.in"
6293  while :
6294  do
6295    cat "conftest.in" "conftest.in" >"conftest.tmp"
6296    mv "conftest.tmp" "conftest.in"
6297    cp "conftest.in" "conftest.nl"
6298    $as_echo '' >> "conftest.nl"
6299    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6300    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6301    as_fn_arith $ac_count + 1 && ac_count=$as_val
6302    if test $ac_count -gt ${ac_path_SED_max-0}; then
6303      # Best one so far, save it but keep looking for a better one
6304      ac_cv_path_SED="$ac_path_SED"
6305      ac_path_SED_max=$ac_count
6306    fi
6307    # 10*(2^10) chars as input seems more than enough
6308    test $ac_count -gt 10 && break
6309  done
6310  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6311esac
6312
6313      $ac_path_SED_found && break 3
6314    done
6315  done
6316  done
6317IFS=$as_save_IFS
6318  if test -z "$ac_cv_path_SED"; then
6319    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6320  fi
6321else
6322  ac_cv_path_SED=$SED
6323fi
6324
6325fi
6326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6327$as_echo "$ac_cv_path_SED" >&6; }
6328 SED="$ac_cv_path_SED"
6329  rm -f conftest.sed
6330
6331
6332    if test "x$SED" = x; then
6333        if test "x" = x; then
6334          PROG_NAME=sed
6335        else
6336          PROG_NAME=
6337        fi
6338        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6339$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6340        as_fn_error $? "Cannot continue" "$LINENO" 5
6341    fi
6342
6343
6344for ac_prog in nawk gawk awk
6345do
6346  # Extract the first word of "$ac_prog", so it can be a program name with args.
6347set dummy $ac_prog; ac_word=$2
6348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6349$as_echo_n "checking for $ac_word... " >&6; }
6350if ${ac_cv_path_NAWK+:} false; then :
6351  $as_echo_n "(cached) " >&6
6352else
6353  case $NAWK in
6354  [\\/]* | ?:[\\/]*)
6355  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6356  ;;
6357  *)
6358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6359for as_dir in $PATH
6360do
6361  IFS=$as_save_IFS
6362  test -z "$as_dir" && as_dir=.
6363    for ac_exec_ext in '' $ac_executable_extensions; do
6364  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6365    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6367    break 2
6368  fi
6369done
6370  done
6371IFS=$as_save_IFS
6372
6373  ;;
6374esac
6375fi
6376NAWK=$ac_cv_path_NAWK
6377if test -n "$NAWK"; then
6378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6379$as_echo "$NAWK" >&6; }
6380else
6381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6382$as_echo "no" >&6; }
6383fi
6384
6385
6386  test -n "$NAWK" && break
6387done
6388
6389
6390    if test "x$NAWK" = x; then
6391        if test "x" = x; then
6392          PROG_NAME=nawk
6393        else
6394          PROG_NAME=
6395        fi
6396        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6397$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6398        as_fn_error $? "Cannot continue" "$LINENO" 5
6399    fi
6400
6401
6402# Always force rm.
6403RM="$RM -f"
6404
6405# These are not required on all platforms
6406# Extract the first word of "cygpath", so it can be a program name with args.
6407set dummy cygpath; ac_word=$2
6408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6409$as_echo_n "checking for $ac_word... " >&6; }
6410if ${ac_cv_path_CYGPATH+:} false; then :
6411  $as_echo_n "(cached) " >&6
6412else
6413  case $CYGPATH in
6414  [\\/]* | ?:[\\/]*)
6415  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6416  ;;
6417  *)
6418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6419for as_dir in $PATH
6420do
6421  IFS=$as_save_IFS
6422  test -z "$as_dir" && as_dir=.
6423    for ac_exec_ext in '' $ac_executable_extensions; do
6424  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6425    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6427    break 2
6428  fi
6429done
6430  done
6431IFS=$as_save_IFS
6432
6433  ;;
6434esac
6435fi
6436CYGPATH=$ac_cv_path_CYGPATH
6437if test -n "$CYGPATH"; then
6438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6439$as_echo "$CYGPATH" >&6; }
6440else
6441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6442$as_echo "no" >&6; }
6443fi
6444
6445
6446# Extract the first word of "readlink", so it can be a program name with args.
6447set dummy readlink; ac_word=$2
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6449$as_echo_n "checking for $ac_word... " >&6; }
6450if ${ac_cv_path_READLINK+:} false; then :
6451  $as_echo_n "(cached) " >&6
6452else
6453  case $READLINK in
6454  [\\/]* | ?:[\\/]*)
6455  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6456  ;;
6457  *)
6458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6459for as_dir in $PATH
6460do
6461  IFS=$as_save_IFS
6462  test -z "$as_dir" && as_dir=.
6463    for ac_exec_ext in '' $ac_executable_extensions; do
6464  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6465    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6467    break 2
6468  fi
6469done
6470  done
6471IFS=$as_save_IFS
6472
6473  ;;
6474esac
6475fi
6476READLINK=$ac_cv_path_READLINK
6477if test -n "$READLINK"; then
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6479$as_echo "$READLINK" >&6; }
6480else
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485
6486# Extract the first word of "df", so it can be a program name with args.
6487set dummy df; ac_word=$2
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6489$as_echo_n "checking for $ac_word... " >&6; }
6490if ${ac_cv_path_DF+:} false; then :
6491  $as_echo_n "(cached) " >&6
6492else
6493  case $DF in
6494  [\\/]* | ?:[\\/]*)
6495  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6496  ;;
6497  *)
6498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6499for as_dir in $PATH
6500do
6501  IFS=$as_save_IFS
6502  test -z "$as_dir" && as_dir=.
6503    for ac_exec_ext in '' $ac_executable_extensions; do
6504  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6505    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6507    break 2
6508  fi
6509done
6510  done
6511IFS=$as_save_IFS
6512
6513  ;;
6514esac
6515fi
6516DF=$ac_cv_path_DF
6517if test -n "$DF"; then
6518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6519$as_echo "$DF" >&6; }
6520else
6521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6522$as_echo "no" >&6; }
6523fi
6524
6525
6526# Extract the first word of "SetFile", so it can be a program name with args.
6527set dummy SetFile; ac_word=$2
6528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6529$as_echo_n "checking for $ac_word... " >&6; }
6530if ${ac_cv_path_SETFILE+:} false; then :
6531  $as_echo_n "(cached) " >&6
6532else
6533  case $SETFILE in
6534  [\\/]* | ?:[\\/]*)
6535  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6536  ;;
6537  *)
6538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6539for as_dir in $PATH
6540do
6541  IFS=$as_save_IFS
6542  test -z "$as_dir" && as_dir=.
6543    for ac_exec_ext in '' $ac_executable_extensions; do
6544  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6545    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6547    break 2
6548  fi
6549done
6550  done
6551IFS=$as_save_IFS
6552
6553  ;;
6554esac
6555fi
6556SETFILE=$ac_cv_path_SETFILE
6557if test -n "$SETFILE"; then
6558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6559$as_echo "$SETFILE" >&6; }
6560else
6561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6562$as_echo "no" >&6; }
6563fi
6564
6565
6566
6567
6568# Now we can determine OpenJDK build and target platforms. This is required to
6569# have early on.
6570# Make sure we can run config.sub.
6571$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6572  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6573
6574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6575$as_echo_n "checking build system type... " >&6; }
6576if ${ac_cv_build+:} false; then :
6577  $as_echo_n "(cached) " >&6
6578else
6579  ac_build_alias=$build_alias
6580test "x$ac_build_alias" = x &&
6581  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6582test "x$ac_build_alias" = x &&
6583  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6584ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6585  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6586
6587fi
6588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6589$as_echo "$ac_cv_build" >&6; }
6590case $ac_cv_build in
6591*-*-*) ;;
6592*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6593esac
6594build=$ac_cv_build
6595ac_save_IFS=$IFS; IFS='-'
6596set x $ac_cv_build
6597shift
6598build_cpu=$1
6599build_vendor=$2
6600shift; shift
6601# Remember, the first character of IFS is used to create $*,
6602# except with old shells:
6603build_os=$*
6604IFS=$ac_save_IFS
6605case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6606
6607
6608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6609$as_echo_n "checking host system type... " >&6; }
6610if ${ac_cv_host+:} false; then :
6611  $as_echo_n "(cached) " >&6
6612else
6613  if test "x$host_alias" = x; then
6614  ac_cv_host=$ac_cv_build
6615else
6616  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6617    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6618fi
6619
6620fi
6621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6622$as_echo "$ac_cv_host" >&6; }
6623case $ac_cv_host in
6624*-*-*) ;;
6625*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6626esac
6627host=$ac_cv_host
6628ac_save_IFS=$IFS; IFS='-'
6629set x $ac_cv_host
6630shift
6631host_cpu=$1
6632host_vendor=$2
6633shift; shift
6634# Remember, the first character of IFS is used to create $*,
6635# except with old shells:
6636host_os=$*
6637IFS=$ac_save_IFS
6638case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6639
6640
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6642$as_echo_n "checking target system type... " >&6; }
6643if ${ac_cv_target+:} false; then :
6644  $as_echo_n "(cached) " >&6
6645else
6646  if test "x$target_alias" = x; then
6647  ac_cv_target=$ac_cv_host
6648else
6649  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6650    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6651fi
6652
6653fi
6654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6655$as_echo "$ac_cv_target" >&6; }
6656case $ac_cv_target in
6657*-*-*) ;;
6658*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6659esac
6660target=$ac_cv_target
6661ac_save_IFS=$IFS; IFS='-'
6662set x $ac_cv_target
6663shift
6664target_cpu=$1
6665target_vendor=$2
6666shift; shift
6667# Remember, the first character of IFS is used to create $*,
6668# except with old shells:
6669target_os=$*
6670IFS=$ac_save_IFS
6671case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6672
6673
6674# The aliases save the names the user supplied, while $host etc.
6675# will get canonicalized.
6676test -n "$target_alias" &&
6677  test "$program_prefix$program_suffix$program_transform_name" = \
6678    NONENONEs,x,x, &&
6679  program_prefix=${target_alias}-
6680
6681# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6682# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6683# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6684# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6685# to use the configure naming style.
6686
6687
6688
6689
6690
6691    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6692    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6693    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6694    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6695    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6696    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6697
6698
6699
6700    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6701
6702  case "$build_os" in
6703    *linux*)
6704      VAR_OS=linux
6705      VAR_OS_API=posix
6706      VAR_OS_ENV=linux
6707      ;;
6708    *solaris*)
6709      VAR_OS=solaris
6710      VAR_OS_API=posix
6711      VAR_OS_ENV=solaris
6712      ;;
6713    *darwin*)
6714      VAR_OS=macosx
6715      VAR_OS_API=posix
6716      VAR_OS_ENV=macosx
6717      ;;
6718    *bsd*)
6719      VAR_OS=bsd
6720      VAR_OS_API=posix
6721      VAR_OS_ENV=bsd
6722      ;;
6723    *cygwin*)
6724      VAR_OS=windows
6725      VAR_OS_API=winapi
6726      VAR_OS_ENV=windows.cygwin
6727      ;;
6728    *mingw*)
6729      VAR_OS=windows
6730      VAR_OS_API=winapi
6731      VAR_OS_ENV=windows.msys
6732      ;;
6733    *)
6734      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6735      ;;
6736  esac
6737
6738
6739  # First argument is the cpu name from the trip/quad
6740  case "$build_cpu" in
6741    x86_64)
6742      VAR_CPU=x86_64
6743      VAR_CPU_ARCH=x86
6744      VAR_CPU_BITS=64
6745      VAR_CPU_ENDIAN=little
6746      ;;
6747    i?86)
6748      VAR_CPU=x86
6749      VAR_CPU_ARCH=x86
6750      VAR_CPU_BITS=32
6751      VAR_CPU_ENDIAN=little
6752      ;;
6753    arm*)
6754      VAR_CPU=arm
6755      VAR_CPU_ARCH=arm
6756      VAR_CPU_BITS=32
6757      VAR_CPU_ENDIAN=little
6758      ;;
6759    powerpc)
6760      VAR_CPU=ppc
6761      VAR_CPU_ARCH=ppc
6762      VAR_CPU_BITS=32
6763      VAR_CPU_ENDIAN=big
6764       ;;
6765    powerpc64)
6766      VAR_CPU=ppc64
6767      VAR_CPU_ARCH=ppc
6768      VAR_CPU_BITS=64
6769      VAR_CPU_ENDIAN=big
6770       ;;
6771    sparc)
6772      VAR_CPU=sparc
6773      VAR_CPU_ARCH=sparc
6774      VAR_CPU_BITS=32
6775      VAR_CPU_ENDIAN=big
6776       ;;
6777    sparcv9)
6778      VAR_CPU=sparcv9
6779      VAR_CPU_ARCH=sparc
6780      VAR_CPU_BITS=64
6781      VAR_CPU_ENDIAN=big
6782       ;;
6783    *)
6784      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6785      ;;
6786  esac
6787
6788    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6789    OPENJDK_BUILD_OS="$VAR_OS"
6790    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6791    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6792    OPENJDK_BUILD_CPU="$VAR_CPU"
6793    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6794    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6795    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6796
6797
6798
6799
6800
6801
6802
6803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6804$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6806$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6807
6808    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6809
6810  case "$host_os" in
6811    *linux*)
6812      VAR_OS=linux
6813      VAR_OS_API=posix
6814      VAR_OS_ENV=linux
6815      ;;
6816    *solaris*)
6817      VAR_OS=solaris
6818      VAR_OS_API=posix
6819      VAR_OS_ENV=solaris
6820      ;;
6821    *darwin*)
6822      VAR_OS=macosx
6823      VAR_OS_API=posix
6824      VAR_OS_ENV=macosx
6825      ;;
6826    *bsd*)
6827      VAR_OS=bsd
6828      VAR_OS_API=posix
6829      VAR_OS_ENV=bsd
6830      ;;
6831    *cygwin*)
6832      VAR_OS=windows
6833      VAR_OS_API=winapi
6834      VAR_OS_ENV=windows.cygwin
6835      ;;
6836    *mingw*)
6837      VAR_OS=windows
6838      VAR_OS_API=winapi
6839      VAR_OS_ENV=windows.msys
6840      ;;
6841    *)
6842      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6843      ;;
6844  esac
6845
6846
6847  # First argument is the cpu name from the trip/quad
6848  case "$host_cpu" in
6849    x86_64)
6850      VAR_CPU=x86_64
6851      VAR_CPU_ARCH=x86
6852      VAR_CPU_BITS=64
6853      VAR_CPU_ENDIAN=little
6854      ;;
6855    i?86)
6856      VAR_CPU=x86
6857      VAR_CPU_ARCH=x86
6858      VAR_CPU_BITS=32
6859      VAR_CPU_ENDIAN=little
6860      ;;
6861    arm*)
6862      VAR_CPU=arm
6863      VAR_CPU_ARCH=arm
6864      VAR_CPU_BITS=32
6865      VAR_CPU_ENDIAN=little
6866      ;;
6867    powerpc)
6868      VAR_CPU=ppc
6869      VAR_CPU_ARCH=ppc
6870      VAR_CPU_BITS=32
6871      VAR_CPU_ENDIAN=big
6872       ;;
6873    powerpc64)
6874      VAR_CPU=ppc64
6875      VAR_CPU_ARCH=ppc
6876      VAR_CPU_BITS=64
6877      VAR_CPU_ENDIAN=big
6878       ;;
6879    sparc)
6880      VAR_CPU=sparc
6881      VAR_CPU_ARCH=sparc
6882      VAR_CPU_BITS=32
6883      VAR_CPU_ENDIAN=big
6884       ;;
6885    sparcv9)
6886      VAR_CPU=sparcv9
6887      VAR_CPU_ARCH=sparc
6888      VAR_CPU_BITS=64
6889      VAR_CPU_ENDIAN=big
6890       ;;
6891    *)
6892      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6893      ;;
6894  esac
6895
6896    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6897    OPENJDK_TARGET_OS="$VAR_OS"
6898    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6899    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6900    OPENJDK_TARGET_CPU="$VAR_CPU"
6901    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6902    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6903    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6904
6905
6906
6907
6908
6909
6910
6911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6912$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6914$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6915
6916
6917
6918# Check whether --with-target-bits was given.
6919if test "${with_target_bits+set}" = set; then :
6920  withval=$with_target_bits;
6921fi
6922
6923
6924  # We have three types of compiles:
6925  # native  == normal compilation, target system == build system
6926  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6927  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6928  #
6929  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6930    # We're doing a proper cross-compilation
6931    COMPILE_TYPE="cross"
6932  else
6933    COMPILE_TYPE="native"
6934  fi
6935
6936  if test "x$with_target_bits" != x; then
6937    if test "x$COMPILE_TYPE" = "xcross"; then
6938      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6939    fi
6940
6941    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6942      # A reduced build is requested
6943      COMPILE_TYPE="reduced"
6944      OPENJDK_TARGET_CPU_BITS=32
6945      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6946        OPENJDK_TARGET_CPU=x86
6947      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6948        OPENJDK_TARGET_CPU=sparc
6949      else
6950        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6951      fi
6952    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6953      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
6954    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6955      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6956$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6957    else
6958      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6959    fi
6960  fi
6961
6962
6963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6964$as_echo_n "checking compilation type... " >&6; }
6965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6966$as_echo "$COMPILE_TYPE" >&6; }
6967
6968
6969    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6970       REQUIRED_OS_NAME=SunOS
6971       REQUIRED_OS_VERSION=5.10
6972    fi
6973    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6974       REQUIRED_OS_NAME=Linux
6975       REQUIRED_OS_VERSION=2.6
6976    fi
6977    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6978        REQUIRED_OS_NAME=Windows
6979        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6980            REQUIRED_OS_VERSION=5.2
6981        else
6982            REQUIRED_OS_VERSION=5.1
6983        fi
6984    fi
6985    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6986        REQUIRED_OS_NAME=Darwin
6987        REQUIRED_OS_VERSION=11.2
6988    fi
6989
6990
6991
6992
6993
6994    # Also store the legacy naming of the cpu.
6995    # Ie i586 and amd64 instead of x86 and x86_64
6996    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6997    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6998      OPENJDK_TARGET_CPU_LEGACY="i586"
6999    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7000      # On all platforms except MacOSX replace x86_64 with amd64.
7001      OPENJDK_TARGET_CPU_LEGACY="amd64"
7002    fi
7003
7004
7005    # And the second legacy naming of the cpu.
7006    # Ie i386 and amd64 instead of x86 and x86_64.
7007    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7008    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7009      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7010    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7011      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7012    fi
7013
7014
7015    # This is the name of the cpu (but using i386 and amd64 instead of
7016    # x86 and x86_64, respectively), preceeded by a /, to be used when
7017    # locating libraries. On macosx, it's empty, though.
7018    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7019    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7020        OPENJDK_TARGET_CPU_LIBDIR=""
7021    fi
7022
7023
7024    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7025    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7026    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7027    OPENJDK_TARGET_CPU_ISADIR=""
7028    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7029      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7030          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7031      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7032          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7033      fi
7034    fi
7035
7036
7037    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7038    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7039    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7040      # On linux only, we replace x86 with i386.
7041      OPENJDK_TARGET_CPU_OSARCH="i386"
7042    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7043      # On all platforms except macosx, we replace x86_64 with amd64.
7044      OPENJDK_TARGET_CPU_OSARCH="amd64"
7045    fi
7046
7047
7048    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7049    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7050      OPENJDK_TARGET_CPU_JLI="i386"
7051    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7052      # On all platforms except macosx, we replace x86_64 with amd64.
7053      OPENJDK_TARGET_CPU_JLI="amd64"
7054    fi
7055    # Now setup the -D flags for building libjli.
7056    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7057    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7058      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7059        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7060      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7061        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7062      fi
7063    fi
7064
7065
7066    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7067    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7068        OPENJDK_TARGET_OS_API_DIR="solaris"
7069    fi
7070    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7071        OPENJDK_TARGET_OS_API_DIR="windows"
7072    fi
7073
7074
7075    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7076        A_LP64="LP64:="
7077        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7078        # unpack200.exe
7079        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7080            ADD_LP64="-D_LP64=1"
7081        fi
7082    fi
7083    LP64=$A_LP64
7084
7085
7086    if test "x$COMPILE_TYPE" = "xcross"; then
7087      # FIXME: ... or should this include reduced builds..?
7088      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7089    else
7090      DEFINE_CROSS_COMPILE_ARCH=""
7091    fi
7092
7093
7094
7095
7096# Continue setting up basic stuff. Most remaining code require fundamental tools.
7097
7098# Locate the directory of this script.
7099SCRIPT="$0"
7100
7101    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7102        # Follow a chain of symbolic links. Use readlink
7103        # where it exists, else fall back to horribly
7104        # complicated shell code.
7105        if test "x$READLINK_TESTED" != yes; then
7106            # On MacOSX there is a readlink tool with a different
7107            # purpose than the GNU readlink tool. Check the found readlink.
7108            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7109            if test "x$ISGNU" = x; then
7110                 # A readlink that we do not know how to use.
7111                 # Are there other non-GNU readlinks out there?
7112                 READLINK_TESTED=yes
7113                 READLINK=
7114            fi
7115        fi
7116
7117        if test "x$READLINK" != x; then
7118            SCRIPT=`$READLINK -f $SCRIPT`
7119        else
7120            # Save the current directory for restoring afterwards
7121            STARTDIR=$PWD
7122            COUNTER=0
7123            sym_link_dir=`$DIRNAME $SCRIPT`
7124            sym_link_file=`$BASENAME $SCRIPT`
7125            # Use the system pwd and not the shell builtin to resolve directory symlinks
7126            cd $sym_link_dir
7127            cd `$THEPWDCMD`
7128            sym_link_dir=`$THEPWDCMD`
7129            # Resolve file symlinks
7130            while test $COUNTER -lt 20; do
7131                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7132                if test "x$ISLINK" == x; then
7133                    # This is not a symbolic link! We are done!
7134                    break
7135                fi
7136                # Again resolve directory symlinks since the target of the just found
7137                # link could be in a different directory
7138                cd `$DIRNAME $ISLINK`
7139                sym_link_dir=`$THEPWDCMD`
7140                sym_link_file=`$BASENAME $ISLINK`
7141                let COUNTER=COUNTER+1
7142            done
7143            cd $STARTDIR
7144            SCRIPT=$sym_link_dir/$sym_link_file
7145        fi
7146    fi
7147
7148AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7149
7150# Where is the source? It is located two levels above the configure script.
7151CURDIR="$PWD"
7152cd "$AUTOCONF_DIR/../.."
7153SRC_ROOT="`$THEPWDCMD`"
7154
7155if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7156  PATH_SEP=";"
7157
7158  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7159  if test $SRC_ROOT_LENGTH -gt 100; then
7160      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7161  fi
7162
7163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7165$as_echo_n "checking cygwin release... " >&6; }
7166    CYGWIN_VERSION=`$UNAME -r`
7167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7168$as_echo "$CYGWIN_VERSION" >&6; }
7169    WINDOWS_ENV_VENDOR='cygwin'
7170    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7171
7172    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7173    if test "x$CYGWIN_VERSION_OK" = x; then
7174      { $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
7175$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;}
7176      as_fn_error $? "Cannot continue" "$LINENO" 5
7177    fi
7178    if test "x$CYGPATH" = x; then
7179        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7180    fi
7181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7182$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7183    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7184    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7185    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7186    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7188$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7189    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7190    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7191    if test "x$test_cygdrive_prefix" = x; then
7192        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7193    fi
7194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7195    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7196$as_echo_n "checking msys release... " >&6; }
7197    MSYS_VERSION=`$UNAME -r`
7198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7199$as_echo "$MSYS_VERSION" >&6; }
7200
7201    WINDOWS_ENV_VENDOR='msys'
7202    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7203
7204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7205$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7206    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7207    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7208
7209  windows_path="$MSYS_ROOT_PATH"
7210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7211    unix_path=`$CYGPATH -u "$windows_path"`
7212    MSYS_ROOT_PATH="$unix_path"
7213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7215    MSYS_ROOT_PATH="$unix_path"
7216  fi
7217
7218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7219$as_echo "$MSYS_ROOT_PATH" >&6; }
7220    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7221  else
7222    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7223  fi
7224
7225  # Test if windows or unix (cygwin/msys) find is first in path.
7226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7227$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7228  FIND_BINARY_OUTPUT=`find --version 2>&1`
7229  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7231$as_echo "unix style" >&6; }
7232  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7234$as_echo "Windows" >&6; }
7235    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7236$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7237    { $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
7238$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7239    as_fn_error $? "Cannot continue" "$LINENO" 5
7240  else
7241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7242$as_echo "unknown" >&6; }
7243    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7244$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7245  fi
7246
7247else
7248  PATH_SEP=":"
7249fi
7250
7251
7252
7253cd "$CURDIR"
7254
7255
7256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7257
7258  # Input might be given as Windows format, start by converting to
7259  # unix format.
7260  path="$SRC_ROOT"
7261  new_path=`$CYGPATH -u "$path"`
7262
7263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7266  # "foo.exe" is OK but "foo" is an error.
7267  #
7268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7269  # It is also a way to make sure we got the proper file name for the real test later on.
7270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7271  if test "x$test_shortpath" = x; then
7272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7273$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7274    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7275  fi
7276
7277  # Call helper function which possibly converts this using DOS-style short mode.
7278  # If so, the updated path is stored in $new_path.
7279
7280  input_path="$new_path"
7281  # Check if we need to convert this using DOS-style short mode. If the path
7282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7283  # take no chances and rewrite it.
7284  # Note: m4 eats our [], so we need to use [ and ] instead.
7285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7286  if test "x$has_forbidden_chars" != x; then
7287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7291      # Going to short mode and back again did indeed matter. Since short mode is
7292      # case insensitive, let's make it lowercase to improve readability.
7293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7294      # Now convert it back to Unix-stile (cygpath)
7295      input_path=`$CYGPATH -u "$shortmode_path"`
7296      new_path="$input_path"
7297    fi
7298  fi
7299
7300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7301  if test "x$test_cygdrive_prefix" = x; then
7302    # As a simple fix, exclude /usr/bin since it's not a real path.
7303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7305      # a path prefixed by /cygdrive for fixpath to work.
7306      new_path="$CYGWIN_ROOT_PATH$input_path"
7307    fi
7308  fi
7309
7310
7311  if test "x$path" != "x$new_path"; then
7312    SRC_ROOT="$new_path"
7313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7314$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7315  fi
7316
7317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7318
7319  path="$SRC_ROOT"
7320  has_colon=`$ECHO $path | $GREP ^.:`
7321  new_path="$path"
7322  if test "x$has_colon" = x; then
7323    # Not in mixed or Windows style, start by that.
7324    new_path=`cmd //c echo $path`
7325  fi
7326
7327
7328  input_path="$new_path"
7329  # Check if we need to convert this using DOS-style short mode. If the path
7330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7331  # take no chances and rewrite it.
7332  # Note: m4 eats our [], so we need to use [ and ] instead.
7333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7334  if test "x$has_forbidden_chars" != x; then
7335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7337  fi
7338
7339
7340  windows_path="$new_path"
7341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7342    unix_path=`$CYGPATH -u "$windows_path"`
7343    new_path="$unix_path"
7344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7346    new_path="$unix_path"
7347  fi
7348
7349  if test "x$path" != "x$new_path"; then
7350    SRC_ROOT="$new_path"
7351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7352$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7353  fi
7354
7355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7357
7358  else
7359    # We're on a posix platform. Hooray! :)
7360    path="$SRC_ROOT"
7361
7362    if test ! -f "$path" && test ! -d "$path"; then
7363      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7364    fi
7365
7366    has_space=`$ECHO "$path" | $GREP " "`
7367    if test "x$has_space" != x; then
7368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7369$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7370      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7371    fi
7372  fi
7373
7374
7375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7376
7377  # Input might be given as Windows format, start by converting to
7378  # unix format.
7379  path="$CURDIR"
7380  new_path=`$CYGPATH -u "$path"`
7381
7382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7385  # "foo.exe" is OK but "foo" is an error.
7386  #
7387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7388  # It is also a way to make sure we got the proper file name for the real test later on.
7389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7390  if test "x$test_shortpath" = x; then
7391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7392$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7393    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7394  fi
7395
7396  # Call helper function which possibly converts this using DOS-style short mode.
7397  # If so, the updated path is stored in $new_path.
7398
7399  input_path="$new_path"
7400  # Check if we need to convert this using DOS-style short mode. If the path
7401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7402  # take no chances and rewrite it.
7403  # Note: m4 eats our [], so we need to use [ and ] instead.
7404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7405  if test "x$has_forbidden_chars" != x; then
7406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7410      # Going to short mode and back again did indeed matter. Since short mode is
7411      # case insensitive, let's make it lowercase to improve readability.
7412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7413      # Now convert it back to Unix-stile (cygpath)
7414      input_path=`$CYGPATH -u "$shortmode_path"`
7415      new_path="$input_path"
7416    fi
7417  fi
7418
7419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7420  if test "x$test_cygdrive_prefix" = x; then
7421    # As a simple fix, exclude /usr/bin since it's not a real path.
7422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7424      # a path prefixed by /cygdrive for fixpath to work.
7425      new_path="$CYGWIN_ROOT_PATH$input_path"
7426    fi
7427  fi
7428
7429
7430  if test "x$path" != "x$new_path"; then
7431    CURDIR="$new_path"
7432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7433$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7434  fi
7435
7436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7437
7438  path="$CURDIR"
7439  has_colon=`$ECHO $path | $GREP ^.:`
7440  new_path="$path"
7441  if test "x$has_colon" = x; then
7442    # Not in mixed or Windows style, start by that.
7443    new_path=`cmd //c echo $path`
7444  fi
7445
7446
7447  input_path="$new_path"
7448  # Check if we need to convert this using DOS-style short mode. If the path
7449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7450  # take no chances and rewrite it.
7451  # Note: m4 eats our [], so we need to use [ and ] instead.
7452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7453  if test "x$has_forbidden_chars" != x; then
7454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7456  fi
7457
7458
7459  windows_path="$new_path"
7460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7461    unix_path=`$CYGPATH -u "$windows_path"`
7462    new_path="$unix_path"
7463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7465    new_path="$unix_path"
7466  fi
7467
7468  if test "x$path" != "x$new_path"; then
7469    CURDIR="$new_path"
7470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7471$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7472  fi
7473
7474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7476
7477  else
7478    # We're on a posix platform. Hooray! :)
7479    path="$CURDIR"
7480
7481    if test ! -f "$path" && test ! -d "$path"; then
7482      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7483    fi
7484
7485    has_space=`$ECHO "$path" | $GREP " "`
7486    if test "x$has_space" != x; then
7487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7488$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7489      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7490    fi
7491  fi
7492
7493
7494if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7495    # Add extra search paths on solaris for utilities like ar and as etc...
7496    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7497fi
7498
7499# You can force the sys-root if the sys-root encoded into the cross compiler tools
7500# is not correct.
7501
7502# Check whether --with-sys-root was given.
7503if test "${with_sys_root+set}" = set; then :
7504  withval=$with_sys_root;
7505fi
7506
7507
7508if test "x$with_sys_root" != x; then
7509  SYS_ROOT=$with_sys_root
7510else
7511  SYS_ROOT=/
7512fi
7513
7514
7515
7516# Check whether --with-tools-dir was given.
7517if test "${with_tools_dir+set}" = set; then :
7518  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7519fi
7520
7521
7522
7523# Check whether --with-devkit was given.
7524if test "${with_devkit+set}" = set; then :
7525  withval=$with_devkit;
7526    if test "x$with_sys_root" != x; then
7527      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7528    fi
7529    if test "x$with_tools_dir" != x; then
7530      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7531    fi
7532    TOOLS_DIR=$with_devkit/bin
7533    SYS_ROOT=$with_devkit/$host_alias/libc
7534
7535fi
7536
7537
7538
7539
7540# Setup default logging of stdout and stderr to build.log in the output root.
7541BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7542BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7543BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7544
7545
7546
7547
7548
7549# Check if it's a pure open build or if custom sources are to be used.
7550
7551  # Check whether --enable-openjdk-only was given.
7552if test "${enable_openjdk_only+set}" = set; then :
7553  enableval=$enable_openjdk_only;
7554else
7555  enable_openjdk_only="no"
7556fi
7557
7558
7559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7560$as_echo_n "checking for presence of closed sources... " >&6; }
7561  if test -d "$SRC_ROOT/jdk/src/closed"; then
7562    CLOSED_SOURCE_PRESENT=yes
7563  else
7564    CLOSED_SOURCE_PRESENT=no
7565  fi
7566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7567$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7568
7569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7570$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7571  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7573$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7574
7575  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7576    OPENJDK=true
7577    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7578      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7579$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7580    fi
7581  else
7582    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7583      OPENJDK=true
7584    else
7585      OPENJDK=false
7586    fi
7587  fi
7588
7589  if test "x$OPENJDK" = "xtrue"; then
7590    SET_OPENJDK="OPENJDK=true"
7591  fi
7592
7593
7594
7595
7596# These are needed to be able to create a configuration name (and thus the output directory)
7597
7598###############################################################################
7599#
7600# Check which variant of the JDK that we want to build.
7601# Currently we have:
7602#    normal:   standard edition
7603# but the custom make system may add other variants
7604#
7605# Effectively the JDK variant gives a name to a specific set of
7606# modules to compile into the JDK. In the future, these modules
7607# might even be Jigsaw modules.
7608#
7609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7610$as_echo_n "checking which variant of the JDK to build... " >&6; }
7611
7612# Check whether --with-jdk-variant was given.
7613if test "${with_jdk_variant+set}" = set; then :
7614  withval=$with_jdk_variant;
7615fi
7616
7617
7618if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7619    JDK_VARIANT="normal"
7620else
7621    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7622fi
7623
7624
7625
7626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7627$as_echo "$JDK_VARIANT" >&6; }
7628
7629
7630
7631###############################################################################
7632#
7633# Check which variants of the JVM that we want to build.
7634# Currently we have:
7635#    server: normal interpreter and a tiered C1/C2 compiler
7636#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7637#    minimal1: reduced form of client with optional VM services and features stripped out
7638#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7639#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7640#    zero: no machine code interpreter, no compiler
7641#    zeroshark: zero interpreter and shark/llvm compiler backend
7642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7643$as_echo_n "checking which variants of the JVM to build... " >&6; }
7644
7645# Check whether --with-jvm-variants was given.
7646if test "${with_jvm_variants+set}" = set; then :
7647  withval=$with_jvm_variants;
7648fi
7649
7650
7651if test "x$with_jvm_variants" = x; then
7652     with_jvm_variants="server"
7653fi
7654
7655JVM_VARIANTS=",$with_jvm_variants,"
7656TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7657
7658if test "x$TEST_VARIANTS" != "x,"; then
7659   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7660fi
7661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7662$as_echo "$with_jvm_variants" >&6; }
7663
7664JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7665JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7666JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7667JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7668JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7669JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7670
7671if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7672    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7673        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7674    fi
7675fi
7676if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7677    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7678        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7679    fi
7680fi
7681if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7682    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7683        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7684    fi
7685fi
7686
7687# Replace the commas with AND for use in the build directory name.
7688ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7689COUNT_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/'`
7690if test "x$COUNT_VARIANTS" != "x,1"; then
7691    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7692else
7693    BUILDING_MULTIPLE_JVM_VARIANTS=no
7694fi
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7705   MACOSX_UNIVERSAL="true"
7706fi
7707
7708
7709
7710
7711
7712###############################################################################
7713#
7714# Set the debug level
7715#    release: no debug information, all optimizations, no asserts.
7716#    fastdebug: debug information (-g), all optimizations, all asserts
7717#    slowdebug: debug information (-g), no optimizations, all asserts
7718#
7719DEBUG_LEVEL="release"
7720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7721$as_echo_n "checking which debug level to use... " >&6; }
7722# Check whether --enable-debug was given.
7723if test "${enable_debug+set}" = set; then :
7724  enableval=$enable_debug;
7725        ENABLE_DEBUG="${enableval}"
7726        DEBUG_LEVEL="fastdebug"
7727
7728else
7729  ENABLE_DEBUG="no"
7730fi
7731
7732
7733
7734# Check whether --with-debug-level was given.
7735if test "${with_debug_level+set}" = set; then :
7736  withval=$with_debug_level;
7737        DEBUG_LEVEL="${withval}"
7738        if test "x$ENABLE_DEBUG" = xyes; then
7739			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7740        fi
7741
7742fi
7743
7744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7745$as_echo "$DEBUG_LEVEL" >&6; }
7746
7747if test "x$DEBUG_LEVEL" != xrelease && \
7748   test "x$DEBUG_LEVEL" != xfastdebug && \
7749   test "x$DEBUG_LEVEL" != xslowdebug; then
7750   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7751fi
7752
7753
7754###############################################################################
7755#
7756# Setup legacy vars/targets and new vars to deal with different debug levels.
7757#
7758
7759case $DEBUG_LEVEL in
7760      release )
7761          VARIANT="OPT"
7762          FASTDEBUG="false"
7763          DEBUG_CLASSFILES="false"
7764          BUILD_VARIANT_RELEASE=""
7765          HOTSPOT_DEBUG_LEVEL="product"
7766          HOTSPOT_EXPORT="product"
7767           ;;
7768      fastdebug )
7769          VARIANT="DBG"
7770          FASTDEBUG="true"
7771          DEBUG_CLASSFILES="true"
7772          BUILD_VARIANT_RELEASE="-fastdebug"
7773          HOTSPOT_DEBUG_LEVEL="fastdebug"
7774          HOTSPOT_EXPORT="fastdebug"
7775           ;;
7776      slowdebug )
7777          VARIANT="DBG"
7778          FASTDEBUG="false"
7779          DEBUG_CLASSFILES="true"
7780          BUILD_VARIANT_RELEASE="-debug"
7781          HOTSPOT_DEBUG_LEVEL="jvmg"
7782          HOTSPOT_EXPORT="debug"
7783           ;;
7784esac
7785
7786#####
7787# Generate the legacy makefile targets for hotspot.
7788# The hotspot api for selecting the build artifacts, really, needs to be improved.
7789# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7790# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7791# But until then ...
7792HOTSPOT_TARGET=""
7793
7794if test "x$JVM_VARIANT_SERVER" = xtrue; then
7795    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7796fi
7797
7798if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7799    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7800fi
7801
7802if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7803    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7804fi
7805
7806if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7807    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7808fi
7809
7810if test "x$JVM_VARIANT_ZERO" = xtrue; then
7811    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7812fi
7813
7814if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7815    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7816fi
7817
7818HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7819
7820# On Macosx universal binaries are produced, but they only contain
7821# 64 bit intel. This invalidates control of which jvms are built
7822# from configure, but only server is valid anyway. Fix this
7823# when hotspot makefiles are rewritten.
7824if test "x$MACOSX_UNIVERSAL" = xtrue; then
7825    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7826fi
7827
7828#####
7829
7830
7831
7832
7833
7834
7835
7836
7837# With basic setup done, call the custom early hook.
7838
7839
7840# To properly create a configuration name, we need to have the OpenJDK target
7841# and options (variants and debug level) parsed.
7842
7843
7844
7845# Check whether --with-conf-name was given.
7846if test "${with_conf_name+set}" = set; then :
7847  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7848fi
7849
7850
7851# Test from where we are running configure, in or outside of src root.
7852# To enable comparison of directories, CURDIR needs to be symlink free
7853# just like SRC_ROOT already is
7854NOSYM_CURDIR="$CURDIR"
7855
7856    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7857        # Follow a chain of symbolic links. Use readlink
7858        # where it exists, else fall back to horribly
7859        # complicated shell code.
7860        if test "x$READLINK_TESTED" != yes; then
7861            # On MacOSX there is a readlink tool with a different
7862            # purpose than the GNU readlink tool. Check the found readlink.
7863            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7864            if test "x$ISGNU" = x; then
7865                 # A readlink that we do not know how to use.
7866                 # Are there other non-GNU readlinks out there?
7867                 READLINK_TESTED=yes
7868                 READLINK=
7869            fi
7870        fi
7871
7872        if test "x$READLINK" != x; then
7873            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7874        else
7875            # Save the current directory for restoring afterwards
7876            STARTDIR=$PWD
7877            COUNTER=0
7878            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7879            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7880            # Use the system pwd and not the shell builtin to resolve directory symlinks
7881            cd $sym_link_dir
7882            cd `$THEPWDCMD`
7883            sym_link_dir=`$THEPWDCMD`
7884            # Resolve file symlinks
7885            while test $COUNTER -lt 20; do
7886                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7887                if test "x$ISLINK" == x; then
7888                    # This is not a symbolic link! We are done!
7889                    break
7890                fi
7891                # Again resolve directory symlinks since the target of the just found
7892                # link could be in a different directory
7893                cd `$DIRNAME $ISLINK`
7894                sym_link_dir=`$THEPWDCMD`
7895                sym_link_file=`$BASENAME $ISLINK`
7896                let COUNTER=COUNTER+1
7897            done
7898            cd $STARTDIR
7899            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7900        fi
7901    fi
7902
7903if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7904        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7905        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7906    # We are running configure from the src root.
7907    # Create a default ./build/target-variant-debuglevel output root.
7908    if test "x${CONF_NAME}" = x; then
7909        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7910    fi
7911    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7912    $MKDIR -p "$OUTPUT_ROOT"
7913    if test ! -d "$OUTPUT_ROOT"; then
7914        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7915    fi
7916else
7917    # We are running configure from outside of the src dir.
7918    # Then use the current directory as output dir!
7919    # If configuration is situated in normal build directory, just use the build
7920    # directory name as configuration name, otherwise use the complete path.
7921    if test "x${CONF_NAME}" = x; then
7922        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7923    fi
7924    OUTPUT_ROOT="$CURDIR"
7925
7926    # WARNING: This might be a bad thing to do. You need to be sure you want to
7927    # have a configuration in this directory. Do some sanity checks!
7928
7929    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7930      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7931      # other files
7932      files_present=`$LS $OUTPUT_ROOT`
7933      # Configure has already touched config.log and confdefs.h in the current dir when this check
7934      # is performed.
7935      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7936                                             | $TR -d '\n'`
7937      if test "x$filtered_files" != x; then
7938        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7939$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7940        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7941$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7942        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7943$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7944        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7945$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7946        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7947$as_echo "$as_me: seriously mess up just about everything." >&6;}
7948        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7949$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7950        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7951$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7952        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7953      fi
7954    fi
7955fi
7956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7957$as_echo_n "checking what configuration name to use... " >&6; }
7958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7959$as_echo "$CONF_NAME" >&6; }
7960
7961
7962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7963
7964  # Input might be given as Windows format, start by converting to
7965  # unix format.
7966  path="$OUTPUT_ROOT"
7967  new_path=`$CYGPATH -u "$path"`
7968
7969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7972  # "foo.exe" is OK but "foo" is an error.
7973  #
7974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7975  # It is also a way to make sure we got the proper file name for the real test later on.
7976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7977  if test "x$test_shortpath" = x; then
7978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7979$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7980    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7981  fi
7982
7983  # Call helper function which possibly converts this using DOS-style short mode.
7984  # If so, the updated path is stored in $new_path.
7985
7986  input_path="$new_path"
7987  # Check if we need to convert this using DOS-style short mode. If the path
7988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7989  # take no chances and rewrite it.
7990  # Note: m4 eats our [], so we need to use [ and ] instead.
7991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7992  if test "x$has_forbidden_chars" != x; then
7993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7997      # Going to short mode and back again did indeed matter. Since short mode is
7998      # case insensitive, let's make it lowercase to improve readability.
7999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8000      # Now convert it back to Unix-stile (cygpath)
8001      input_path=`$CYGPATH -u "$shortmode_path"`
8002      new_path="$input_path"
8003    fi
8004  fi
8005
8006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8007  if test "x$test_cygdrive_prefix" = x; then
8008    # As a simple fix, exclude /usr/bin since it's not a real path.
8009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8011      # a path prefixed by /cygdrive for fixpath to work.
8012      new_path="$CYGWIN_ROOT_PATH$input_path"
8013    fi
8014  fi
8015
8016
8017  if test "x$path" != "x$new_path"; then
8018    OUTPUT_ROOT="$new_path"
8019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8020$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8021  fi
8022
8023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8024
8025  path="$OUTPUT_ROOT"
8026  has_colon=`$ECHO $path | $GREP ^.:`
8027  new_path="$path"
8028  if test "x$has_colon" = x; then
8029    # Not in mixed or Windows style, start by that.
8030    new_path=`cmd //c echo $path`
8031  fi
8032
8033
8034  input_path="$new_path"
8035  # Check if we need to convert this using DOS-style short mode. If the path
8036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8037  # take no chances and rewrite it.
8038  # Note: m4 eats our [], so we need to use [ and ] instead.
8039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8040  if test "x$has_forbidden_chars" != x; then
8041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8043  fi
8044
8045
8046  windows_path="$new_path"
8047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8048    unix_path=`$CYGPATH -u "$windows_path"`
8049    new_path="$unix_path"
8050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8052    new_path="$unix_path"
8053  fi
8054
8055  if test "x$path" != "x$new_path"; then
8056    OUTPUT_ROOT="$new_path"
8057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8058$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8059  fi
8060
8061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8063
8064  else
8065    # We're on a posix platform. Hooray! :)
8066    path="$OUTPUT_ROOT"
8067
8068    if test ! -f "$path" && test ! -d "$path"; then
8069      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8070    fi
8071
8072    has_space=`$ECHO "$path" | $GREP " "`
8073    if test "x$has_space" != x; then
8074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8075$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8076      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8077    fi
8078  fi
8079
8080
8081SPEC=$OUTPUT_ROOT/spec.gmk
8082
8083CONF_NAME=$CONF_NAME
8084
8085OUTPUT_ROOT=$OUTPUT_ROOT
8086
8087
8088# Most of the probed defines are put into config.h
8089ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8090
8091# The spec.gmk file contains all variables for the make system.
8092ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8093
8094# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8095ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8096
8097# The bootcycle-spec.gmk file contains support for boot cycle builds.
8098ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8099
8100# The compare.sh is used to compare the build output to other builds.
8101ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8102
8103# Spec.sh is currently used by compare-objects.sh
8104ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8105
8106# The generated Makefile knows where the spec.gmk is and where the source is.
8107# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8108# which will look for generated configurations
8109ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8110
8111
8112# Save the arguments given to us
8113echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8114
8115
8116# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8117
8118    for ac_prog in apt-get yum port pkgutil pkgadd
8119do
8120  # Extract the first word of "$ac_prog", so it can be a program name with args.
8121set dummy $ac_prog; ac_word=$2
8122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8123$as_echo_n "checking for $ac_word... " >&6; }
8124if ${ac_cv_prog_PKGHANDLER+:} false; then :
8125  $as_echo_n "(cached) " >&6
8126else
8127  if test -n "$PKGHANDLER"; then
8128  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8129else
8130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8131for as_dir in $PATH
8132do
8133  IFS=$as_save_IFS
8134  test -z "$as_dir" && as_dir=.
8135    for ac_exec_ext in '' $ac_executable_extensions; do
8136  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8137    ac_cv_prog_PKGHANDLER="$ac_prog"
8138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8139    break 2
8140  fi
8141done
8142  done
8143IFS=$as_save_IFS
8144
8145fi
8146fi
8147PKGHANDLER=$ac_cv_prog_PKGHANDLER
8148if test -n "$PKGHANDLER"; then
8149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8150$as_echo "$PKGHANDLER" >&6; }
8151else
8152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8153$as_echo "no" >&6; }
8154fi
8155
8156
8157  test -n "$PKGHANDLER" && break
8158done
8159
8160
8161
8162# Setup tools that requires more complex handling, or that is not needed by the configure script.
8163
8164
8165  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8166  if test "x$MAKE" != x; then
8167    # User has supplied a make, test it.
8168    if test ! -f "$MAKE"; then
8169      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8170    fi
8171
8172  MAKE_CANDIDATE=""$MAKE""
8173  DESCRIPTION="user supplied MAKE=$MAKE"
8174  if test "x$MAKE_CANDIDATE" != x; then
8175    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8176$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8177    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8178    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8179    if test "x$IS_GNU_MAKE" = x; then
8180      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8181$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8182    else
8183      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8184      if test "x$IS_MODERN_MAKE" = x; then
8185        { $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
8186$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;}
8187      else
8188        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8189          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8190            MAKE_EXPECTED_ENV='cygwin'
8191          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8192            MAKE_EXPECTED_ENV='msys'
8193          else
8194            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8195          fi
8196          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8197          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8198        else
8199          # Not relevant for non-Windows
8200          IS_MAKE_CORRECT_ENV=true
8201        fi
8202        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8203          { $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
8204$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;}
8205        else
8206          FOUND_MAKE=$MAKE_CANDIDATE
8207
8208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8209
8210  # First separate the path from the arguments. This will split at the first
8211  # space.
8212  complete="$FOUND_MAKE"
8213  path="${complete%% *}"
8214  tmp="$complete EOL"
8215  arguments="${tmp#* }"
8216
8217  # Input might be given as Windows format, start by converting to
8218  # unix format.
8219  new_path=`$CYGPATH -u "$path"`
8220
8221  # Now try to locate executable using which
8222  new_path=`$WHICH "$new_path" 2> /dev/null`
8223  # bat and cmd files are not always considered executable in cygwin causing which
8224  # to not find them
8225  if test "x$new_path" = x \
8226           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8227           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8228    new_path=`$CYGPATH -u "$path"`
8229  fi
8230  if test "x$new_path" = x; then
8231    # Oops. Which didn't find the executable.
8232    # The splitting of arguments from the executable at a space might have been incorrect,
8233    # since paths with space are more likely in Windows. Give it another try with the whole
8234    # argument.
8235    path="$complete"
8236    arguments="EOL"
8237    new_path=`$CYGPATH -u "$path"`
8238    new_path=`$WHICH "$new_path" 2> /dev/null`
8239    # bat and cmd files are not always considered executable in cygwin causing which
8240    # to not find them
8241    if test "x$new_path" = x \
8242             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8243             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8244      new_path=`$CYGPATH -u "$path"`
8245    fi
8246    if test "x$new_path" = x; then
8247      # It's still not found. Now this is an unrecoverable error.
8248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8249$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8250      has_space=`$ECHO "$complete" | $GREP " "`
8251      if test "x$has_space" != x; then
8252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8254      fi
8255      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8256    fi
8257  fi
8258
8259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8262  # "foo.exe" is OK but "foo" is an error.
8263  #
8264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8265  # It is also a way to make sure we got the proper file name for the real test later on.
8266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8267  if test "x$test_shortpath" = x; then
8268    # Short path failed, file does not exist as specified.
8269    # Try adding .exe or .cmd
8270    if test -f "${new_path}.exe"; then
8271       input_to_shortpath="${new_path}.exe"
8272    elif test -f "${new_path}.cmd"; then
8273       input_to_shortpath="${new_path}.cmd"
8274    else
8275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8276$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8277      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8278$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8279      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8280    fi
8281  else
8282    input_to_shortpath="$new_path"
8283  fi
8284
8285  # Call helper function which possibly converts this using DOS-style short mode.
8286  # If so, the updated path is stored in $new_path.
8287  new_path="$input_to_shortpath"
8288
8289  input_path="$input_to_shortpath"
8290  # Check if we need to convert this using DOS-style short mode. If the path
8291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8292  # take no chances and rewrite it.
8293  # Note: m4 eats our [], so we need to use [ and ] instead.
8294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8295  if test "x$has_forbidden_chars" != x; then
8296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8300      # Going to short mode and back again did indeed matter. Since short mode is
8301      # case insensitive, let's make it lowercase to improve readability.
8302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8303      # Now convert it back to Unix-stile (cygpath)
8304      input_path=`$CYGPATH -u "$shortmode_path"`
8305      new_path="$input_path"
8306    fi
8307  fi
8308
8309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8310  if test "x$test_cygdrive_prefix" = x; then
8311    # As a simple fix, exclude /usr/bin since it's not a real path.
8312    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8314      # a path prefixed by /cygdrive for fixpath to work.
8315      new_path="$CYGWIN_ROOT_PATH$input_path"
8316    fi
8317  fi
8318
8319  # remove trailing .exe if any
8320  new_path="${new_path/%.exe/}"
8321
8322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8323
8324  # First separate the path from the arguments. This will split at the first
8325  # space.
8326  complete="$FOUND_MAKE"
8327  path="${complete%% *}"
8328  tmp="$complete EOL"
8329  arguments="${tmp#* }"
8330
8331  # Input might be given as Windows format, start by converting to
8332  # unix format.
8333  new_path="$path"
8334
8335  windows_path="$new_path"
8336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8337    unix_path=`$CYGPATH -u "$windows_path"`
8338    new_path="$unix_path"
8339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8341    new_path="$unix_path"
8342  fi
8343
8344
8345  # Now try to locate executable using which
8346  new_path=`$WHICH "$new_path" 2> /dev/null`
8347
8348  if test "x$new_path" = x; then
8349    # Oops. Which didn't find the executable.
8350    # The splitting of arguments from the executable at a space might have been incorrect,
8351    # since paths with space are more likely in Windows. Give it another try with the whole
8352    # argument.
8353    path="$complete"
8354    arguments="EOL"
8355    new_path="$path"
8356
8357  windows_path="$new_path"
8358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8359    unix_path=`$CYGPATH -u "$windows_path"`
8360    new_path="$unix_path"
8361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8363    new_path="$unix_path"
8364  fi
8365
8366
8367    new_path=`$WHICH "$new_path" 2> /dev/null`
8368
8369    if test "x$new_path" = x; then
8370      # It's still not found. Now this is an unrecoverable error.
8371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8372$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8373      has_space=`$ECHO "$complete" | $GREP " "`
8374      if test "x$has_space" != x; then
8375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8377      fi
8378      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8379    fi
8380  fi
8381
8382  # Now new_path has a complete unix path to the binary
8383  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8384    # Keep paths in /bin as-is, but remove trailing .exe if any
8385    new_path="${new_path/%.exe/}"
8386    # Do not save /bin paths to all_fixpath_prefixes!
8387  else
8388    # Not in mixed or Windows style, start by that.
8389    new_path=`cmd //c echo $new_path`
8390
8391  input_path="$new_path"
8392  # Check if we need to convert this using DOS-style short mode. If the path
8393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8394  # take no chances and rewrite it.
8395  # Note: m4 eats our [], so we need to use [ and ] instead.
8396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8397  if test "x$has_forbidden_chars" != x; then
8398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8400  fi
8401
8402    # Output is in $new_path
8403
8404  windows_path="$new_path"
8405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8406    unix_path=`$CYGPATH -u "$windows_path"`
8407    new_path="$unix_path"
8408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8410    new_path="$unix_path"
8411  fi
8412
8413    # remove trailing .exe if any
8414    new_path="${new_path/%.exe/}"
8415
8416    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8417    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8418  fi
8419
8420  else
8421    # We're on a posix platform. Hooray! :)
8422    # First separate the path from the arguments. This will split at the first
8423    # space.
8424    complete="$FOUND_MAKE"
8425    path="${complete%% *}"
8426    tmp="$complete EOL"
8427    arguments="${tmp#* }"
8428
8429    # Cannot rely on the command "which" here since it doesn't always work.
8430    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8431    if test -z "$is_absolute_path"; then
8432      # Path to executable is not absolute. Find it.
8433      IFS_save="$IFS"
8434      IFS=:
8435      for p in $PATH; do
8436        if test -f "$p/$path" && test -x "$p/$path"; then
8437          new_path="$p/$path"
8438          break
8439        fi
8440      done
8441      IFS="$IFS_save"
8442    else
8443      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8444$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8445      new_path="$path"
8446    fi
8447
8448    if test "x$new_path" = x; then
8449        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8450$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8451        has_space=`$ECHO "$complete" | $GREP " "`
8452        if test "x$has_space" != x; then
8453          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8454$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8455        fi
8456        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8457      fi
8458  fi
8459
8460      # Now join together the path and the arguments once again
8461      if test "x$arguments" != xEOL; then
8462        new_complete="$new_path ${arguments% *}"
8463      else
8464        new_complete="$new_path"
8465      fi
8466
8467  if test "x$complete" != "x$new_complete"; then
8468      FOUND_MAKE="$new_complete"
8469      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8470$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8471    fi
8472
8473        fi
8474      fi
8475    fi
8476  fi
8477
8478    if test "x$FOUND_MAKE" = x; then
8479      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8480    fi
8481  else
8482    # Try our hardest to locate a correct version of GNU make
8483    for ac_prog in gmake
8484do
8485  # Extract the first word of "$ac_prog", so it can be a program name with args.
8486set dummy $ac_prog; ac_word=$2
8487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8488$as_echo_n "checking for $ac_word... " >&6; }
8489if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8490  $as_echo_n "(cached) " >&6
8491else
8492  case $CHECK_GMAKE in
8493  [\\/]* | ?:[\\/]*)
8494  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8495  ;;
8496  *)
8497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8498for as_dir in $PATH
8499do
8500  IFS=$as_save_IFS
8501  test -z "$as_dir" && as_dir=.
8502    for ac_exec_ext in '' $ac_executable_extensions; do
8503  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8504    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8506    break 2
8507  fi
8508done
8509  done
8510IFS=$as_save_IFS
8511
8512  ;;
8513esac
8514fi
8515CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8516if test -n "$CHECK_GMAKE"; then
8517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8518$as_echo "$CHECK_GMAKE" >&6; }
8519else
8520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8521$as_echo "no" >&6; }
8522fi
8523
8524
8525  test -n "$CHECK_GMAKE" && break
8526done
8527
8528
8529  MAKE_CANDIDATE=""$CHECK_GMAKE""
8530  DESCRIPTION="gmake in PATH"
8531  if test "x$MAKE_CANDIDATE" != x; then
8532    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8533$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8534    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8535    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8536    if test "x$IS_GNU_MAKE" = x; then
8537      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8538$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8539    else
8540      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8541      if test "x$IS_MODERN_MAKE" = x; then
8542        { $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
8543$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;}
8544      else
8545        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8546          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8547            MAKE_EXPECTED_ENV='cygwin'
8548          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8549            MAKE_EXPECTED_ENV='msys'
8550          else
8551            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8552          fi
8553          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8554          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8555        else
8556          # Not relevant for non-Windows
8557          IS_MAKE_CORRECT_ENV=true
8558        fi
8559        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8560          { $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
8561$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;}
8562        else
8563          FOUND_MAKE=$MAKE_CANDIDATE
8564
8565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8566
8567  # First separate the path from the arguments. This will split at the first
8568  # space.
8569  complete="$FOUND_MAKE"
8570  path="${complete%% *}"
8571  tmp="$complete EOL"
8572  arguments="${tmp#* }"
8573
8574  # Input might be given as Windows format, start by converting to
8575  # unix format.
8576  new_path=`$CYGPATH -u "$path"`
8577
8578  # Now try to locate executable using which
8579  new_path=`$WHICH "$new_path" 2> /dev/null`
8580  # bat and cmd files are not always considered executable in cygwin causing which
8581  # to not find them
8582  if test "x$new_path" = x \
8583           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8584           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8585    new_path=`$CYGPATH -u "$path"`
8586  fi
8587  if test "x$new_path" = x; then
8588    # Oops. Which didn't find the executable.
8589    # The splitting of arguments from the executable at a space might have been incorrect,
8590    # since paths with space are more likely in Windows. Give it another try with the whole
8591    # argument.
8592    path="$complete"
8593    arguments="EOL"
8594    new_path=`$CYGPATH -u "$path"`
8595    new_path=`$WHICH "$new_path" 2> /dev/null`
8596    # bat and cmd files are not always considered executable in cygwin causing which
8597    # to not find them
8598    if test "x$new_path" = x \
8599             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8600             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8601      new_path=`$CYGPATH -u "$path"`
8602    fi
8603    if test "x$new_path" = x; then
8604      # It's still not found. Now this is an unrecoverable error.
8605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8606$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8607      has_space=`$ECHO "$complete" | $GREP " "`
8608      if test "x$has_space" != x; then
8609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8611      fi
8612      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8613    fi
8614  fi
8615
8616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8619  # "foo.exe" is OK but "foo" is an error.
8620  #
8621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8622  # It is also a way to make sure we got the proper file name for the real test later on.
8623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8624  if test "x$test_shortpath" = x; then
8625    # Short path failed, file does not exist as specified.
8626    # Try adding .exe or .cmd
8627    if test -f "${new_path}.exe"; then
8628       input_to_shortpath="${new_path}.exe"
8629    elif test -f "${new_path}.cmd"; then
8630       input_to_shortpath="${new_path}.cmd"
8631    else
8632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8633$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8634      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8635$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8636      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8637    fi
8638  else
8639    input_to_shortpath="$new_path"
8640  fi
8641
8642  # Call helper function which possibly converts this using DOS-style short mode.
8643  # If so, the updated path is stored in $new_path.
8644  new_path="$input_to_shortpath"
8645
8646  input_path="$input_to_shortpath"
8647  # Check if we need to convert this using DOS-style short mode. If the path
8648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8649  # take no chances and rewrite it.
8650  # Note: m4 eats our [], so we need to use [ and ] instead.
8651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8652  if test "x$has_forbidden_chars" != x; then
8653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8657      # Going to short mode and back again did indeed matter. Since short mode is
8658      # case insensitive, let's make it lowercase to improve readability.
8659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8660      # Now convert it back to Unix-stile (cygpath)
8661      input_path=`$CYGPATH -u "$shortmode_path"`
8662      new_path="$input_path"
8663    fi
8664  fi
8665
8666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8667  if test "x$test_cygdrive_prefix" = x; then
8668    # As a simple fix, exclude /usr/bin since it's not a real path.
8669    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8671      # a path prefixed by /cygdrive for fixpath to work.
8672      new_path="$CYGWIN_ROOT_PATH$input_path"
8673    fi
8674  fi
8675
8676  # remove trailing .exe if any
8677  new_path="${new_path/%.exe/}"
8678
8679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8680
8681  # First separate the path from the arguments. This will split at the first
8682  # space.
8683  complete="$FOUND_MAKE"
8684  path="${complete%% *}"
8685  tmp="$complete EOL"
8686  arguments="${tmp#* }"
8687
8688  # Input might be given as Windows format, start by converting to
8689  # unix format.
8690  new_path="$path"
8691
8692  windows_path="$new_path"
8693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8694    unix_path=`$CYGPATH -u "$windows_path"`
8695    new_path="$unix_path"
8696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8698    new_path="$unix_path"
8699  fi
8700
8701
8702  # Now try to locate executable using which
8703  new_path=`$WHICH "$new_path" 2> /dev/null`
8704
8705  if test "x$new_path" = x; then
8706    # Oops. Which didn't find the executable.
8707    # The splitting of arguments from the executable at a space might have been incorrect,
8708    # since paths with space are more likely in Windows. Give it another try with the whole
8709    # argument.
8710    path="$complete"
8711    arguments="EOL"
8712    new_path="$path"
8713
8714  windows_path="$new_path"
8715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8716    unix_path=`$CYGPATH -u "$windows_path"`
8717    new_path="$unix_path"
8718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8720    new_path="$unix_path"
8721  fi
8722
8723
8724    new_path=`$WHICH "$new_path" 2> /dev/null`
8725
8726    if test "x$new_path" = x; then
8727      # It's still not found. Now this is an unrecoverable error.
8728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8729$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8730      has_space=`$ECHO "$complete" | $GREP " "`
8731      if test "x$has_space" != x; then
8732        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8733$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8734      fi
8735      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8736    fi
8737  fi
8738
8739  # Now new_path has a complete unix path to the binary
8740  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8741    # Keep paths in /bin as-is, but remove trailing .exe if any
8742    new_path="${new_path/%.exe/}"
8743    # Do not save /bin paths to all_fixpath_prefixes!
8744  else
8745    # Not in mixed or Windows style, start by that.
8746    new_path=`cmd //c echo $new_path`
8747
8748  input_path="$new_path"
8749  # Check if we need to convert this using DOS-style short mode. If the path
8750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8751  # take no chances and rewrite it.
8752  # Note: m4 eats our [], so we need to use [ and ] instead.
8753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8754  if test "x$has_forbidden_chars" != x; then
8755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8757  fi
8758
8759    # Output is in $new_path
8760
8761  windows_path="$new_path"
8762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8763    unix_path=`$CYGPATH -u "$windows_path"`
8764    new_path="$unix_path"
8765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8767    new_path="$unix_path"
8768  fi
8769
8770    # remove trailing .exe if any
8771    new_path="${new_path/%.exe/}"
8772
8773    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8774    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8775  fi
8776
8777  else
8778    # We're on a posix platform. Hooray! :)
8779    # First separate the path from the arguments. This will split at the first
8780    # space.
8781    complete="$FOUND_MAKE"
8782    path="${complete%% *}"
8783    tmp="$complete EOL"
8784    arguments="${tmp#* }"
8785
8786    # Cannot rely on the command "which" here since it doesn't always work.
8787    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8788    if test -z "$is_absolute_path"; then
8789      # Path to executable is not absolute. Find it.
8790      IFS_save="$IFS"
8791      IFS=:
8792      for p in $PATH; do
8793        if test -f "$p/$path" && test -x "$p/$path"; then
8794          new_path="$p/$path"
8795          break
8796        fi
8797      done
8798      IFS="$IFS_save"
8799    else
8800      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8801$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8802      new_path="$path"
8803    fi
8804
8805    if test "x$new_path" = x; then
8806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8807$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8808        has_space=`$ECHO "$complete" | $GREP " "`
8809        if test "x$has_space" != x; then
8810          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8811$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8812        fi
8813        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8814      fi
8815  fi
8816
8817      # Now join together the path and the arguments once again
8818      if test "x$arguments" != xEOL; then
8819        new_complete="$new_path ${arguments% *}"
8820      else
8821        new_complete="$new_path"
8822      fi
8823
8824  if test "x$complete" != "x$new_complete"; then
8825      FOUND_MAKE="$new_complete"
8826      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8827$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8828    fi
8829
8830        fi
8831      fi
8832    fi
8833  fi
8834
8835
8836    if test "x$FOUND_MAKE" = x; then
8837      for ac_prog in make
8838do
8839  # Extract the first word of "$ac_prog", so it can be a program name with args.
8840set dummy $ac_prog; ac_word=$2
8841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8842$as_echo_n "checking for $ac_word... " >&6; }
8843if ${ac_cv_path_CHECK_MAKE+:} false; then :
8844  $as_echo_n "(cached) " >&6
8845else
8846  case $CHECK_MAKE in
8847  [\\/]* | ?:[\\/]*)
8848  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8849  ;;
8850  *)
8851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8852for as_dir in $PATH
8853do
8854  IFS=$as_save_IFS
8855  test -z "$as_dir" && as_dir=.
8856    for ac_exec_ext in '' $ac_executable_extensions; do
8857  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8858    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8860    break 2
8861  fi
8862done
8863  done
8864IFS=$as_save_IFS
8865
8866  ;;
8867esac
8868fi
8869CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8870if test -n "$CHECK_MAKE"; then
8871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8872$as_echo "$CHECK_MAKE" >&6; }
8873else
8874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8875$as_echo "no" >&6; }
8876fi
8877
8878
8879  test -n "$CHECK_MAKE" && break
8880done
8881
8882
8883  MAKE_CANDIDATE=""$CHECK_MAKE""
8884  DESCRIPTION="make in PATH"
8885  if test "x$MAKE_CANDIDATE" != x; then
8886    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8887$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8888    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8889    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8890    if test "x$IS_GNU_MAKE" = x; then
8891      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8892$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8893    else
8894      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8895      if test "x$IS_MODERN_MAKE" = x; then
8896        { $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
8897$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;}
8898      else
8899        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8900          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8901            MAKE_EXPECTED_ENV='cygwin'
8902          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8903            MAKE_EXPECTED_ENV='msys'
8904          else
8905            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8906          fi
8907          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8908          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8909        else
8910          # Not relevant for non-Windows
8911          IS_MAKE_CORRECT_ENV=true
8912        fi
8913        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8914          { $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
8915$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;}
8916        else
8917          FOUND_MAKE=$MAKE_CANDIDATE
8918
8919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8920
8921  # First separate the path from the arguments. This will split at the first
8922  # space.
8923  complete="$FOUND_MAKE"
8924  path="${complete%% *}"
8925  tmp="$complete EOL"
8926  arguments="${tmp#* }"
8927
8928  # Input might be given as Windows format, start by converting to
8929  # unix format.
8930  new_path=`$CYGPATH -u "$path"`
8931
8932  # Now try to locate executable using which
8933  new_path=`$WHICH "$new_path" 2> /dev/null`
8934  # bat and cmd files are not always considered executable in cygwin causing which
8935  # to not find them
8936  if test "x$new_path" = x \
8937           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8938           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8939    new_path=`$CYGPATH -u "$path"`
8940  fi
8941  if test "x$new_path" = x; then
8942    # Oops. Which didn't find the executable.
8943    # The splitting of arguments from the executable at a space might have been incorrect,
8944    # since paths with space are more likely in Windows. Give it another try with the whole
8945    # argument.
8946    path="$complete"
8947    arguments="EOL"
8948    new_path=`$CYGPATH -u "$path"`
8949    new_path=`$WHICH "$new_path" 2> /dev/null`
8950    # bat and cmd files are not always considered executable in cygwin causing which
8951    # to not find them
8952    if test "x$new_path" = x \
8953             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8954             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8955      new_path=`$CYGPATH -u "$path"`
8956    fi
8957    if test "x$new_path" = x; then
8958      # It's still not found. Now this is an unrecoverable error.
8959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8960$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8961      has_space=`$ECHO "$complete" | $GREP " "`
8962      if test "x$has_space" != x; then
8963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8965      fi
8966      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8967    fi
8968  fi
8969
8970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8973  # "foo.exe" is OK but "foo" is an error.
8974  #
8975  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8976  # It is also a way to make sure we got the proper file name for the real test later on.
8977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8978  if test "x$test_shortpath" = x; then
8979    # Short path failed, file does not exist as specified.
8980    # Try adding .exe or .cmd
8981    if test -f "${new_path}.exe"; then
8982       input_to_shortpath="${new_path}.exe"
8983    elif test -f "${new_path}.cmd"; then
8984       input_to_shortpath="${new_path}.cmd"
8985    else
8986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8987$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8988      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8989$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8990      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8991    fi
8992  else
8993    input_to_shortpath="$new_path"
8994  fi
8995
8996  # Call helper function which possibly converts this using DOS-style short mode.
8997  # If so, the updated path is stored in $new_path.
8998  new_path="$input_to_shortpath"
8999
9000  input_path="$input_to_shortpath"
9001  # Check if we need to convert this using DOS-style short mode. If the path
9002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9003  # take no chances and rewrite it.
9004  # Note: m4 eats our [], so we need to use [ and ] instead.
9005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9006  if test "x$has_forbidden_chars" != x; then
9007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9011      # Going to short mode and back again did indeed matter. Since short mode is
9012      # case insensitive, let's make it lowercase to improve readability.
9013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9014      # Now convert it back to Unix-stile (cygpath)
9015      input_path=`$CYGPATH -u "$shortmode_path"`
9016      new_path="$input_path"
9017    fi
9018  fi
9019
9020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9021  if test "x$test_cygdrive_prefix" = x; then
9022    # As a simple fix, exclude /usr/bin since it's not a real path.
9023    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9025      # a path prefixed by /cygdrive for fixpath to work.
9026      new_path="$CYGWIN_ROOT_PATH$input_path"
9027    fi
9028  fi
9029
9030  # remove trailing .exe if any
9031  new_path="${new_path/%.exe/}"
9032
9033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9034
9035  # First separate the path from the arguments. This will split at the first
9036  # space.
9037  complete="$FOUND_MAKE"
9038  path="${complete%% *}"
9039  tmp="$complete EOL"
9040  arguments="${tmp#* }"
9041
9042  # Input might be given as Windows format, start by converting to
9043  # unix format.
9044  new_path="$path"
9045
9046  windows_path="$new_path"
9047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9048    unix_path=`$CYGPATH -u "$windows_path"`
9049    new_path="$unix_path"
9050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9052    new_path="$unix_path"
9053  fi
9054
9055
9056  # Now try to locate executable using which
9057  new_path=`$WHICH "$new_path" 2> /dev/null`
9058
9059  if test "x$new_path" = x; then
9060    # Oops. Which didn't find the executable.
9061    # The splitting of arguments from the executable at a space might have been incorrect,
9062    # since paths with space are more likely in Windows. Give it another try with the whole
9063    # argument.
9064    path="$complete"
9065    arguments="EOL"
9066    new_path="$path"
9067
9068  windows_path="$new_path"
9069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9070    unix_path=`$CYGPATH -u "$windows_path"`
9071    new_path="$unix_path"
9072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9074    new_path="$unix_path"
9075  fi
9076
9077
9078    new_path=`$WHICH "$new_path" 2> /dev/null`
9079
9080    if test "x$new_path" = x; then
9081      # It's still not found. Now this is an unrecoverable error.
9082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9083$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9084      has_space=`$ECHO "$complete" | $GREP " "`
9085      if test "x$has_space" != x; then
9086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9088      fi
9089      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9090    fi
9091  fi
9092
9093  # Now new_path has a complete unix path to the binary
9094  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9095    # Keep paths in /bin as-is, but remove trailing .exe if any
9096    new_path="${new_path/%.exe/}"
9097    # Do not save /bin paths to all_fixpath_prefixes!
9098  else
9099    # Not in mixed or Windows style, start by that.
9100    new_path=`cmd //c echo $new_path`
9101
9102  input_path="$new_path"
9103  # Check if we need to convert this using DOS-style short mode. If the path
9104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9105  # take no chances and rewrite it.
9106  # Note: m4 eats our [], so we need to use [ and ] instead.
9107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9108  if test "x$has_forbidden_chars" != x; then
9109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9111  fi
9112
9113    # Output is in $new_path
9114
9115  windows_path="$new_path"
9116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9117    unix_path=`$CYGPATH -u "$windows_path"`
9118    new_path="$unix_path"
9119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9121    new_path="$unix_path"
9122  fi
9123
9124    # remove trailing .exe if any
9125    new_path="${new_path/%.exe/}"
9126
9127    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9128    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9129  fi
9130
9131  else
9132    # We're on a posix platform. Hooray! :)
9133    # First separate the path from the arguments. This will split at the first
9134    # space.
9135    complete="$FOUND_MAKE"
9136    path="${complete%% *}"
9137    tmp="$complete EOL"
9138    arguments="${tmp#* }"
9139
9140    # Cannot rely on the command "which" here since it doesn't always work.
9141    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9142    if test -z "$is_absolute_path"; then
9143      # Path to executable is not absolute. Find it.
9144      IFS_save="$IFS"
9145      IFS=:
9146      for p in $PATH; do
9147        if test -f "$p/$path" && test -x "$p/$path"; then
9148          new_path="$p/$path"
9149          break
9150        fi
9151      done
9152      IFS="$IFS_save"
9153    else
9154      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9155$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9156      new_path="$path"
9157    fi
9158
9159    if test "x$new_path" = x; then
9160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9161$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9162        has_space=`$ECHO "$complete" | $GREP " "`
9163        if test "x$has_space" != x; then
9164          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9165$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9166        fi
9167        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9168      fi
9169  fi
9170
9171      # Now join together the path and the arguments once again
9172      if test "x$arguments" != xEOL; then
9173        new_complete="$new_path ${arguments% *}"
9174      else
9175        new_complete="$new_path"
9176      fi
9177
9178  if test "x$complete" != "x$new_complete"; then
9179      FOUND_MAKE="$new_complete"
9180      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9181$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9182    fi
9183
9184        fi
9185      fi
9186    fi
9187  fi
9188
9189    fi
9190
9191    if test "x$FOUND_MAKE" = x; then
9192      if test "x$TOOLS_DIR" != x; then
9193        # We have a tools-dir, check that as well before giving up.
9194        OLD_PATH=$PATH
9195        PATH=$TOOLS_DIR:$PATH
9196        for ac_prog in gmake
9197do
9198  # Extract the first word of "$ac_prog", so it can be a program name with args.
9199set dummy $ac_prog; ac_word=$2
9200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9201$as_echo_n "checking for $ac_word... " >&6; }
9202if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9203  $as_echo_n "(cached) " >&6
9204else
9205  case $CHECK_TOOLSDIR_GMAKE in
9206  [\\/]* | ?:[\\/]*)
9207  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9208  ;;
9209  *)
9210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9211for as_dir in $PATH
9212do
9213  IFS=$as_save_IFS
9214  test -z "$as_dir" && as_dir=.
9215    for ac_exec_ext in '' $ac_executable_extensions; do
9216  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9217    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9219    break 2
9220  fi
9221done
9222  done
9223IFS=$as_save_IFS
9224
9225  ;;
9226esac
9227fi
9228CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9229if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9231$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9232else
9233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9234$as_echo "no" >&6; }
9235fi
9236
9237
9238  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9239done
9240
9241
9242  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9243  DESCRIPTION="gmake in tools-dir"
9244  if test "x$MAKE_CANDIDATE" != x; then
9245    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9246$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9247    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9248    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9249    if test "x$IS_GNU_MAKE" = x; then
9250      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9251$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9252    else
9253      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9254      if test "x$IS_MODERN_MAKE" = x; then
9255        { $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
9256$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;}
9257      else
9258        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9259          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9260            MAKE_EXPECTED_ENV='cygwin'
9261          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9262            MAKE_EXPECTED_ENV='msys'
9263          else
9264            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9265          fi
9266          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9267          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9268        else
9269          # Not relevant for non-Windows
9270          IS_MAKE_CORRECT_ENV=true
9271        fi
9272        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9273          { $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
9274$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;}
9275        else
9276          FOUND_MAKE=$MAKE_CANDIDATE
9277
9278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9279
9280  # First separate the path from the arguments. This will split at the first
9281  # space.
9282  complete="$FOUND_MAKE"
9283  path="${complete%% *}"
9284  tmp="$complete EOL"
9285  arguments="${tmp#* }"
9286
9287  # Input might be given as Windows format, start by converting to
9288  # unix format.
9289  new_path=`$CYGPATH -u "$path"`
9290
9291  # Now try to locate executable using which
9292  new_path=`$WHICH "$new_path" 2> /dev/null`
9293  # bat and cmd files are not always considered executable in cygwin causing which
9294  # to not find them
9295  if test "x$new_path" = x \
9296           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9297           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9298    new_path=`$CYGPATH -u "$path"`
9299  fi
9300  if test "x$new_path" = x; then
9301    # Oops. Which didn't find the executable.
9302    # The splitting of arguments from the executable at a space might have been incorrect,
9303    # since paths with space are more likely in Windows. Give it another try with the whole
9304    # argument.
9305    path="$complete"
9306    arguments="EOL"
9307    new_path=`$CYGPATH -u "$path"`
9308    new_path=`$WHICH "$new_path" 2> /dev/null`
9309    # bat and cmd files are not always considered executable in cygwin causing which
9310    # to not find them
9311    if test "x$new_path" = x \
9312             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9313             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9314      new_path=`$CYGPATH -u "$path"`
9315    fi
9316    if test "x$new_path" = x; then
9317      # It's still not found. Now this is an unrecoverable error.
9318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9319$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9320      has_space=`$ECHO "$complete" | $GREP " "`
9321      if test "x$has_space" != x; then
9322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9324      fi
9325      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9326    fi
9327  fi
9328
9329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9332  # "foo.exe" is OK but "foo" is an error.
9333  #
9334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9335  # It is also a way to make sure we got the proper file name for the real test later on.
9336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9337  if test "x$test_shortpath" = x; then
9338    # Short path failed, file does not exist as specified.
9339    # Try adding .exe or .cmd
9340    if test -f "${new_path}.exe"; then
9341       input_to_shortpath="${new_path}.exe"
9342    elif test -f "${new_path}.cmd"; then
9343       input_to_shortpath="${new_path}.cmd"
9344    else
9345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9346$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9347      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9348$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9349      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9350    fi
9351  else
9352    input_to_shortpath="$new_path"
9353  fi
9354
9355  # Call helper function which possibly converts this using DOS-style short mode.
9356  # If so, the updated path is stored in $new_path.
9357  new_path="$input_to_shortpath"
9358
9359  input_path="$input_to_shortpath"
9360  # Check if we need to convert this using DOS-style short mode. If the path
9361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9362  # take no chances and rewrite it.
9363  # Note: m4 eats our [], so we need to use [ and ] instead.
9364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9365  if test "x$has_forbidden_chars" != x; then
9366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9370      # Going to short mode and back again did indeed matter. Since short mode is
9371      # case insensitive, let's make it lowercase to improve readability.
9372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9373      # Now convert it back to Unix-stile (cygpath)
9374      input_path=`$CYGPATH -u "$shortmode_path"`
9375      new_path="$input_path"
9376    fi
9377  fi
9378
9379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9380  if test "x$test_cygdrive_prefix" = x; then
9381    # As a simple fix, exclude /usr/bin since it's not a real path.
9382    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9384      # a path prefixed by /cygdrive for fixpath to work.
9385      new_path="$CYGWIN_ROOT_PATH$input_path"
9386    fi
9387  fi
9388
9389  # remove trailing .exe if any
9390  new_path="${new_path/%.exe/}"
9391
9392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9393
9394  # First separate the path from the arguments. This will split at the first
9395  # space.
9396  complete="$FOUND_MAKE"
9397  path="${complete%% *}"
9398  tmp="$complete EOL"
9399  arguments="${tmp#* }"
9400
9401  # Input might be given as Windows format, start by converting to
9402  # unix format.
9403  new_path="$path"
9404
9405  windows_path="$new_path"
9406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9407    unix_path=`$CYGPATH -u "$windows_path"`
9408    new_path="$unix_path"
9409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9411    new_path="$unix_path"
9412  fi
9413
9414
9415  # Now try to locate executable using which
9416  new_path=`$WHICH "$new_path" 2> /dev/null`
9417
9418  if test "x$new_path" = x; then
9419    # Oops. Which didn't find the executable.
9420    # The splitting of arguments from the executable at a space might have been incorrect,
9421    # since paths with space are more likely in Windows. Give it another try with the whole
9422    # argument.
9423    path="$complete"
9424    arguments="EOL"
9425    new_path="$path"
9426
9427  windows_path="$new_path"
9428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9429    unix_path=`$CYGPATH -u "$windows_path"`
9430    new_path="$unix_path"
9431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9433    new_path="$unix_path"
9434  fi
9435
9436
9437    new_path=`$WHICH "$new_path" 2> /dev/null`
9438
9439    if test "x$new_path" = x; then
9440      # It's still not found. Now this is an unrecoverable error.
9441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9442$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9443      has_space=`$ECHO "$complete" | $GREP " "`
9444      if test "x$has_space" != x; then
9445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9447      fi
9448      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9449    fi
9450  fi
9451
9452  # Now new_path has a complete unix path to the binary
9453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9454    # Keep paths in /bin as-is, but remove trailing .exe if any
9455    new_path="${new_path/%.exe/}"
9456    # Do not save /bin paths to all_fixpath_prefixes!
9457  else
9458    # Not in mixed or Windows style, start by that.
9459    new_path=`cmd //c echo $new_path`
9460
9461  input_path="$new_path"
9462  # Check if we need to convert this using DOS-style short mode. If the path
9463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9464  # take no chances and rewrite it.
9465  # Note: m4 eats our [], so we need to use [ and ] instead.
9466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9467  if test "x$has_forbidden_chars" != x; then
9468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9470  fi
9471
9472    # Output is in $new_path
9473
9474  windows_path="$new_path"
9475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9476    unix_path=`$CYGPATH -u "$windows_path"`
9477    new_path="$unix_path"
9478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9480    new_path="$unix_path"
9481  fi
9482
9483    # remove trailing .exe if any
9484    new_path="${new_path/%.exe/}"
9485
9486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9488  fi
9489
9490  else
9491    # We're on a posix platform. Hooray! :)
9492    # First separate the path from the arguments. This will split at the first
9493    # space.
9494    complete="$FOUND_MAKE"
9495    path="${complete%% *}"
9496    tmp="$complete EOL"
9497    arguments="${tmp#* }"
9498
9499    # Cannot rely on the command "which" here since it doesn't always work.
9500    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9501    if test -z "$is_absolute_path"; then
9502      # Path to executable is not absolute. Find it.
9503      IFS_save="$IFS"
9504      IFS=:
9505      for p in $PATH; do
9506        if test -f "$p/$path" && test -x "$p/$path"; then
9507          new_path="$p/$path"
9508          break
9509        fi
9510      done
9511      IFS="$IFS_save"
9512    else
9513      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9514$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9515      new_path="$path"
9516    fi
9517
9518    if test "x$new_path" = x; then
9519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9520$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9521        has_space=`$ECHO "$complete" | $GREP " "`
9522        if test "x$has_space" != x; then
9523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9525        fi
9526        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9527      fi
9528  fi
9529
9530      # Now join together the path and the arguments once again
9531      if test "x$arguments" != xEOL; then
9532        new_complete="$new_path ${arguments% *}"
9533      else
9534        new_complete="$new_path"
9535      fi
9536
9537  if test "x$complete" != "x$new_complete"; then
9538      FOUND_MAKE="$new_complete"
9539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9540$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9541    fi
9542
9543        fi
9544      fi
9545    fi
9546  fi
9547
9548        if test "x$FOUND_MAKE" = x; then
9549          for ac_prog in make
9550do
9551  # Extract the first word of "$ac_prog", so it can be a program name with args.
9552set dummy $ac_prog; ac_word=$2
9553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9554$as_echo_n "checking for $ac_word... " >&6; }
9555if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9556  $as_echo_n "(cached) " >&6
9557else
9558  case $CHECK_TOOLSDIR_MAKE in
9559  [\\/]* | ?:[\\/]*)
9560  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9561  ;;
9562  *)
9563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9564for as_dir in $PATH
9565do
9566  IFS=$as_save_IFS
9567  test -z "$as_dir" && as_dir=.
9568    for ac_exec_ext in '' $ac_executable_extensions; do
9569  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9570    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9572    break 2
9573  fi
9574done
9575  done
9576IFS=$as_save_IFS
9577
9578  ;;
9579esac
9580fi
9581CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9582if test -n "$CHECK_TOOLSDIR_MAKE"; then
9583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9584$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9585else
9586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9587$as_echo "no" >&6; }
9588fi
9589
9590
9591  test -n "$CHECK_TOOLSDIR_MAKE" && break
9592done
9593
9594
9595  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9596  DESCRIPTION="make in tools-dir"
9597  if test "x$MAKE_CANDIDATE" != x; then
9598    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9599$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9600    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9601    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9602    if test "x$IS_GNU_MAKE" = x; then
9603      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9604$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9605    else
9606      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9607      if test "x$IS_MODERN_MAKE" = x; then
9608        { $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
9609$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;}
9610      else
9611        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9612          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9613            MAKE_EXPECTED_ENV='cygwin'
9614          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9615            MAKE_EXPECTED_ENV='msys'
9616          else
9617            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9618          fi
9619          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9620          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9621        else
9622          # Not relevant for non-Windows
9623          IS_MAKE_CORRECT_ENV=true
9624        fi
9625        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9626          { $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
9627$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;}
9628        else
9629          FOUND_MAKE=$MAKE_CANDIDATE
9630
9631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9632
9633  # First separate the path from the arguments. This will split at the first
9634  # space.
9635  complete="$FOUND_MAKE"
9636  path="${complete%% *}"
9637  tmp="$complete EOL"
9638  arguments="${tmp#* }"
9639
9640  # Input might be given as Windows format, start by converting to
9641  # unix format.
9642  new_path=`$CYGPATH -u "$path"`
9643
9644  # Now try to locate executable using which
9645  new_path=`$WHICH "$new_path" 2> /dev/null`
9646  # bat and cmd files are not always considered executable in cygwin causing which
9647  # to not find them
9648  if test "x$new_path" = x \
9649           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9650           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9651    new_path=`$CYGPATH -u "$path"`
9652  fi
9653  if test "x$new_path" = x; then
9654    # Oops. Which didn't find the executable.
9655    # The splitting of arguments from the executable at a space might have been incorrect,
9656    # since paths with space are more likely in Windows. Give it another try with the whole
9657    # argument.
9658    path="$complete"
9659    arguments="EOL"
9660    new_path=`$CYGPATH -u "$path"`
9661    new_path=`$WHICH "$new_path" 2> /dev/null`
9662    # bat and cmd files are not always considered executable in cygwin causing which
9663    # to not find them
9664    if test "x$new_path" = x \
9665             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9666             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9667      new_path=`$CYGPATH -u "$path"`
9668    fi
9669    if test "x$new_path" = x; then
9670      # It's still not found. Now this is an unrecoverable error.
9671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9672$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9673      has_space=`$ECHO "$complete" | $GREP " "`
9674      if test "x$has_space" != x; then
9675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9677      fi
9678      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9679    fi
9680  fi
9681
9682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9685  # "foo.exe" is OK but "foo" is an error.
9686  #
9687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9688  # It is also a way to make sure we got the proper file name for the real test later on.
9689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9690  if test "x$test_shortpath" = x; then
9691    # Short path failed, file does not exist as specified.
9692    # Try adding .exe or .cmd
9693    if test -f "${new_path}.exe"; then
9694       input_to_shortpath="${new_path}.exe"
9695    elif test -f "${new_path}.cmd"; then
9696       input_to_shortpath="${new_path}.cmd"
9697    else
9698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9699$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9700      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9701$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9702      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9703    fi
9704  else
9705    input_to_shortpath="$new_path"
9706  fi
9707
9708  # Call helper function which possibly converts this using DOS-style short mode.
9709  # If so, the updated path is stored in $new_path.
9710  new_path="$input_to_shortpath"
9711
9712  input_path="$input_to_shortpath"
9713  # Check if we need to convert this using DOS-style short mode. If the path
9714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9715  # take no chances and rewrite it.
9716  # Note: m4 eats our [], so we need to use [ and ] instead.
9717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9718  if test "x$has_forbidden_chars" != x; then
9719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9723      # Going to short mode and back again did indeed matter. Since short mode is
9724      # case insensitive, let's make it lowercase to improve readability.
9725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9726      # Now convert it back to Unix-stile (cygpath)
9727      input_path=`$CYGPATH -u "$shortmode_path"`
9728      new_path="$input_path"
9729    fi
9730  fi
9731
9732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9733  if test "x$test_cygdrive_prefix" = x; then
9734    # As a simple fix, exclude /usr/bin since it's not a real path.
9735    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9737      # a path prefixed by /cygdrive for fixpath to work.
9738      new_path="$CYGWIN_ROOT_PATH$input_path"
9739    fi
9740  fi
9741
9742  # remove trailing .exe if any
9743  new_path="${new_path/%.exe/}"
9744
9745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9746
9747  # First separate the path from the arguments. This will split at the first
9748  # space.
9749  complete="$FOUND_MAKE"
9750  path="${complete%% *}"
9751  tmp="$complete EOL"
9752  arguments="${tmp#* }"
9753
9754  # Input might be given as Windows format, start by converting to
9755  # unix format.
9756  new_path="$path"
9757
9758  windows_path="$new_path"
9759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9760    unix_path=`$CYGPATH -u "$windows_path"`
9761    new_path="$unix_path"
9762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9764    new_path="$unix_path"
9765  fi
9766
9767
9768  # Now try to locate executable using which
9769  new_path=`$WHICH "$new_path" 2> /dev/null`
9770
9771  if test "x$new_path" = x; then
9772    # Oops. Which didn't find the executable.
9773    # The splitting of arguments from the executable at a space might have been incorrect,
9774    # since paths with space are more likely in Windows. Give it another try with the whole
9775    # argument.
9776    path="$complete"
9777    arguments="EOL"
9778    new_path="$path"
9779
9780  windows_path="$new_path"
9781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9782    unix_path=`$CYGPATH -u "$windows_path"`
9783    new_path="$unix_path"
9784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9786    new_path="$unix_path"
9787  fi
9788
9789
9790    new_path=`$WHICH "$new_path" 2> /dev/null`
9791
9792    if test "x$new_path" = x; then
9793      # It's still not found. Now this is an unrecoverable error.
9794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9795$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9796      has_space=`$ECHO "$complete" | $GREP " "`
9797      if test "x$has_space" != x; then
9798        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9799$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9800      fi
9801      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9802    fi
9803  fi
9804
9805  # Now new_path has a complete unix path to the binary
9806  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9807    # Keep paths in /bin as-is, but remove trailing .exe if any
9808    new_path="${new_path/%.exe/}"
9809    # Do not save /bin paths to all_fixpath_prefixes!
9810  else
9811    # Not in mixed or Windows style, start by that.
9812    new_path=`cmd //c echo $new_path`
9813
9814  input_path="$new_path"
9815  # Check if we need to convert this using DOS-style short mode. If the path
9816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9817  # take no chances and rewrite it.
9818  # Note: m4 eats our [], so we need to use [ and ] instead.
9819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9820  if test "x$has_forbidden_chars" != x; then
9821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9823  fi
9824
9825    # Output is in $new_path
9826
9827  windows_path="$new_path"
9828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9829    unix_path=`$CYGPATH -u "$windows_path"`
9830    new_path="$unix_path"
9831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9833    new_path="$unix_path"
9834  fi
9835
9836    # remove trailing .exe if any
9837    new_path="${new_path/%.exe/}"
9838
9839    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9840    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9841  fi
9842
9843  else
9844    # We're on a posix platform. Hooray! :)
9845    # First separate the path from the arguments. This will split at the first
9846    # space.
9847    complete="$FOUND_MAKE"
9848    path="${complete%% *}"
9849    tmp="$complete EOL"
9850    arguments="${tmp#* }"
9851
9852    # Cannot rely on the command "which" here since it doesn't always work.
9853    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9854    if test -z "$is_absolute_path"; then
9855      # Path to executable is not absolute. Find it.
9856      IFS_save="$IFS"
9857      IFS=:
9858      for p in $PATH; do
9859        if test -f "$p/$path" && test -x "$p/$path"; then
9860          new_path="$p/$path"
9861          break
9862        fi
9863      done
9864      IFS="$IFS_save"
9865    else
9866      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9867$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9868      new_path="$path"
9869    fi
9870
9871    if test "x$new_path" = x; then
9872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9873$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9874        has_space=`$ECHO "$complete" | $GREP " "`
9875        if test "x$has_space" != x; then
9876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9878        fi
9879        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9880      fi
9881  fi
9882
9883      # Now join together the path and the arguments once again
9884      if test "x$arguments" != xEOL; then
9885        new_complete="$new_path ${arguments% *}"
9886      else
9887        new_complete="$new_path"
9888      fi
9889
9890  if test "x$complete" != "x$new_complete"; then
9891      FOUND_MAKE="$new_complete"
9892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9893$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9894    fi
9895
9896        fi
9897      fi
9898    fi
9899  fi
9900
9901        fi
9902        PATH=$OLD_PATH
9903      fi
9904    fi
9905
9906    if test "x$FOUND_MAKE" = x; then
9907      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
9908    fi
9909  fi
9910
9911  MAKE=$FOUND_MAKE
9912
9913  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9914$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9915
9916
9917
9918    # Test if find supports -delete
9919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9920$as_echo_n "checking if find supports -delete... " >&6; }
9921    FIND_DELETE="-delete"
9922
9923    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9924
9925    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9926
9927    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9928    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9929        # No, it does not.
9930        rm $DELETEDIR/TestIfFindSupportsDelete
9931        FIND_DELETE="-exec rm \{\} \+"
9932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9933$as_echo "no" >&6; }
9934    else
9935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9936$as_echo "yes" >&6; }
9937    fi
9938    rmdir $DELETEDIR
9939
9940
9941
9942# These tools might not be installed by default,
9943# need hint on how to install them.
9944
9945    for ac_prog in unzip
9946do
9947  # Extract the first word of "$ac_prog", so it can be a program name with args.
9948set dummy $ac_prog; ac_word=$2
9949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9950$as_echo_n "checking for $ac_word... " >&6; }
9951if ${ac_cv_path_UNZIP+:} false; then :
9952  $as_echo_n "(cached) " >&6
9953else
9954  case $UNZIP in
9955  [\\/]* | ?:[\\/]*)
9956  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9957  ;;
9958  *)
9959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9960for as_dir in $PATH
9961do
9962  IFS=$as_save_IFS
9963  test -z "$as_dir" && as_dir=.
9964    for ac_exec_ext in '' $ac_executable_extensions; do
9965  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9966    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9968    break 2
9969  fi
9970done
9971  done
9972IFS=$as_save_IFS
9973
9974  ;;
9975esac
9976fi
9977UNZIP=$ac_cv_path_UNZIP
9978if test -n "$UNZIP"; then
9979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9980$as_echo "$UNZIP" >&6; }
9981else
9982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9983$as_echo "no" >&6; }
9984fi
9985
9986
9987  test -n "$UNZIP" && break
9988done
9989
9990
9991    if test "x$UNZIP" = x; then
9992        if test "xunzip" = x; then
9993          PROG_NAME=unzip
9994        else
9995          PROG_NAME=unzip
9996        fi
9997        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9998$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9999        as_fn_error $? "Cannot continue" "$LINENO" 5
10000    fi
10001
10002
10003
10004    for ac_prog in zip
10005do
10006  # Extract the first word of "$ac_prog", so it can be a program name with args.
10007set dummy $ac_prog; ac_word=$2
10008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10009$as_echo_n "checking for $ac_word... " >&6; }
10010if ${ac_cv_path_ZIP+:} false; then :
10011  $as_echo_n "(cached) " >&6
10012else
10013  case $ZIP in
10014  [\\/]* | ?:[\\/]*)
10015  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10016  ;;
10017  *)
10018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10019for as_dir in $PATH
10020do
10021  IFS=$as_save_IFS
10022  test -z "$as_dir" && as_dir=.
10023    for ac_exec_ext in '' $ac_executable_extensions; do
10024  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10025    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10027    break 2
10028  fi
10029done
10030  done
10031IFS=$as_save_IFS
10032
10033  ;;
10034esac
10035fi
10036ZIP=$ac_cv_path_ZIP
10037if test -n "$ZIP"; then
10038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10039$as_echo "$ZIP" >&6; }
10040else
10041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
10043fi
10044
10045
10046  test -n "$ZIP" && break
10047done
10048
10049
10050    if test "x$ZIP" = x; then
10051        if test "xzip" = x; then
10052          PROG_NAME=zip
10053        else
10054          PROG_NAME=zip
10055        fi
10056        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10057$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10058        as_fn_error $? "Cannot continue" "$LINENO" 5
10059    fi
10060
10061
10062
10063# Non-required basic tools
10064
10065# Extract the first word of "ldd", so it can be a program name with args.
10066set dummy ldd; ac_word=$2
10067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10068$as_echo_n "checking for $ac_word... " >&6; }
10069if ${ac_cv_path_LDD+:} false; then :
10070  $as_echo_n "(cached) " >&6
10071else
10072  case $LDD in
10073  [\\/]* | ?:[\\/]*)
10074  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10075  ;;
10076  *)
10077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10078for as_dir in $PATH
10079do
10080  IFS=$as_save_IFS
10081  test -z "$as_dir" && as_dir=.
10082    for ac_exec_ext in '' $ac_executable_extensions; do
10083  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10084    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10086    break 2
10087  fi
10088done
10089  done
10090IFS=$as_save_IFS
10091
10092  ;;
10093esac
10094fi
10095LDD=$ac_cv_path_LDD
10096if test -n "$LDD"; then
10097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10098$as_echo "$LDD" >&6; }
10099else
10100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10101$as_echo "no" >&6; }
10102fi
10103
10104
10105if test "x$LDD" = "x"; then
10106    # List shared lib dependencies is used for
10107    # debug output and checking for forbidden dependencies.
10108    # We can build without it.
10109    LDD="true"
10110fi
10111# Extract the first word of "otool", so it can be a program name with args.
10112set dummy otool; ac_word=$2
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10114$as_echo_n "checking for $ac_word... " >&6; }
10115if ${ac_cv_path_OTOOL+:} false; then :
10116  $as_echo_n "(cached) " >&6
10117else
10118  case $OTOOL in
10119  [\\/]* | ?:[\\/]*)
10120  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10121  ;;
10122  *)
10123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10124for as_dir in $PATH
10125do
10126  IFS=$as_save_IFS
10127  test -z "$as_dir" && as_dir=.
10128    for ac_exec_ext in '' $ac_executable_extensions; do
10129  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10130    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10132    break 2
10133  fi
10134done
10135  done
10136IFS=$as_save_IFS
10137
10138  ;;
10139esac
10140fi
10141OTOOL=$ac_cv_path_OTOOL
10142if test -n "$OTOOL"; then
10143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10144$as_echo "$OTOOL" >&6; }
10145else
10146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10147$as_echo "no" >&6; }
10148fi
10149
10150
10151if test "x$OTOOL" = "x"; then
10152   OTOOL="true"
10153fi
10154for ac_prog in readelf greadelf
10155do
10156  # Extract the first word of "$ac_prog", so it can be a program name with args.
10157set dummy $ac_prog; ac_word=$2
10158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10159$as_echo_n "checking for $ac_word... " >&6; }
10160if ${ac_cv_path_READELF+:} false; then :
10161  $as_echo_n "(cached) " >&6
10162else
10163  case $READELF in
10164  [\\/]* | ?:[\\/]*)
10165  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10166  ;;
10167  *)
10168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10169for as_dir in $PATH
10170do
10171  IFS=$as_save_IFS
10172  test -z "$as_dir" && as_dir=.
10173    for ac_exec_ext in '' $ac_executable_extensions; do
10174  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10175    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10177    break 2
10178  fi
10179done
10180  done
10181IFS=$as_save_IFS
10182
10183  ;;
10184esac
10185fi
10186READELF=$ac_cv_path_READELF
10187if test -n "$READELF"; then
10188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10189$as_echo "$READELF" >&6; }
10190else
10191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10192$as_echo "no" >&6; }
10193fi
10194
10195
10196  test -n "$READELF" && break
10197done
10198
10199# Extract the first word of "hg", so it can be a program name with args.
10200set dummy hg; ac_word=$2
10201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10202$as_echo_n "checking for $ac_word... " >&6; }
10203if ${ac_cv_path_HG+:} false; then :
10204  $as_echo_n "(cached) " >&6
10205else
10206  case $HG in
10207  [\\/]* | ?:[\\/]*)
10208  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10209  ;;
10210  *)
10211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10212for as_dir in $PATH
10213do
10214  IFS=$as_save_IFS
10215  test -z "$as_dir" && as_dir=.
10216    for ac_exec_ext in '' $ac_executable_extensions; do
10217  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10218    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10220    break 2
10221  fi
10222done
10223  done
10224IFS=$as_save_IFS
10225
10226  ;;
10227esac
10228fi
10229HG=$ac_cv_path_HG
10230if test -n "$HG"; then
10231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10232$as_echo "$HG" >&6; }
10233else
10234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10235$as_echo "no" >&6; }
10236fi
10237
10238
10239# Extract the first word of "stat", so it can be a program name with args.
10240set dummy stat; ac_word=$2
10241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10242$as_echo_n "checking for $ac_word... " >&6; }
10243if ${ac_cv_path_STAT+:} false; then :
10244  $as_echo_n "(cached) " >&6
10245else
10246  case $STAT in
10247  [\\/]* | ?:[\\/]*)
10248  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10249  ;;
10250  *)
10251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10252for as_dir in $PATH
10253do
10254  IFS=$as_save_IFS
10255  test -z "$as_dir" && as_dir=.
10256    for ac_exec_ext in '' $ac_executable_extensions; do
10257  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10258    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10260    break 2
10261  fi
10262done
10263  done
10264IFS=$as_save_IFS
10265
10266  ;;
10267esac
10268fi
10269STAT=$ac_cv_path_STAT
10270if test -n "$STAT"; then
10271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10272$as_echo "$STAT" >&6; }
10273else
10274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10275$as_echo "no" >&6; }
10276fi
10277
10278
10279# Extract the first word of "time", so it can be a program name with args.
10280set dummy time; ac_word=$2
10281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10282$as_echo_n "checking for $ac_word... " >&6; }
10283if ${ac_cv_path_TIME+:} false; then :
10284  $as_echo_n "(cached) " >&6
10285else
10286  case $TIME in
10287  [\\/]* | ?:[\\/]*)
10288  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10289  ;;
10290  *)
10291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10292for as_dir in $PATH
10293do
10294  IFS=$as_save_IFS
10295  test -z "$as_dir" && as_dir=.
10296    for ac_exec_ext in '' $ac_executable_extensions; do
10297  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10298    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10300    break 2
10301  fi
10302done
10303  done
10304IFS=$as_save_IFS
10305
10306  ;;
10307esac
10308fi
10309TIME=$ac_cv_path_TIME
10310if test -n "$TIME"; then
10311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10312$as_echo "$TIME" >&6; }
10313else
10314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10315$as_echo "no" >&6; }
10316fi
10317
10318
10319
10320if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10321
10322    for ac_prog in comm
10323do
10324  # Extract the first word of "$ac_prog", so it can be a program name with args.
10325set dummy $ac_prog; ac_word=$2
10326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10327$as_echo_n "checking for $ac_word... " >&6; }
10328if ${ac_cv_path_COMM+:} false; then :
10329  $as_echo_n "(cached) " >&6
10330else
10331  case $COMM in
10332  [\\/]* | ?:[\\/]*)
10333  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10334  ;;
10335  *)
10336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10337for as_dir in $PATH
10338do
10339  IFS=$as_save_IFS
10340  test -z "$as_dir" && as_dir=.
10341    for ac_exec_ext in '' $ac_executable_extensions; do
10342  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10343    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10345    break 2
10346  fi
10347done
10348  done
10349IFS=$as_save_IFS
10350
10351  ;;
10352esac
10353fi
10354COMM=$ac_cv_path_COMM
10355if test -n "$COMM"; then
10356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10357$as_echo "$COMM" >&6; }
10358else
10359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360$as_echo "no" >&6; }
10361fi
10362
10363
10364  test -n "$COMM" && break
10365done
10366
10367
10368    if test "x$COMM" = x; then
10369        if test "xcomm" = x; then
10370          PROG_NAME=comm
10371        else
10372          PROG_NAME=comm
10373        fi
10374        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10375$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10376        as_fn_error $? "Cannot continue" "$LINENO" 5
10377    fi
10378
10379
10380fi
10381
10382
10383# Check if pkg-config is available.
10384
10385
10386if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10387	if test -n "$ac_tool_prefix"; then
10388  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10389set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10391$as_echo_n "checking for $ac_word... " >&6; }
10392if ${ac_cv_path_PKG_CONFIG+:} false; then :
10393  $as_echo_n "(cached) " >&6
10394else
10395  case $PKG_CONFIG in
10396  [\\/]* | ?:[\\/]*)
10397  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10398  ;;
10399  *)
10400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10401for as_dir in $PATH
10402do
10403  IFS=$as_save_IFS
10404  test -z "$as_dir" && as_dir=.
10405    for ac_exec_ext in '' $ac_executable_extensions; do
10406  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10407    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10409    break 2
10410  fi
10411done
10412  done
10413IFS=$as_save_IFS
10414
10415  ;;
10416esac
10417fi
10418PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10419if test -n "$PKG_CONFIG"; then
10420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10421$as_echo "$PKG_CONFIG" >&6; }
10422else
10423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10424$as_echo "no" >&6; }
10425fi
10426
10427
10428fi
10429if test -z "$ac_cv_path_PKG_CONFIG"; then
10430  ac_pt_PKG_CONFIG=$PKG_CONFIG
10431  # Extract the first word of "pkg-config", so it can be a program name with args.
10432set dummy pkg-config; ac_word=$2
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434$as_echo_n "checking for $ac_word... " >&6; }
10435if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10436  $as_echo_n "(cached) " >&6
10437else
10438  case $ac_pt_PKG_CONFIG in
10439  [\\/]* | ?:[\\/]*)
10440  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10441  ;;
10442  *)
10443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444for as_dir in $PATH
10445do
10446  IFS=$as_save_IFS
10447  test -z "$as_dir" && as_dir=.
10448    for ac_exec_ext in '' $ac_executable_extensions; do
10449  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10450    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452    break 2
10453  fi
10454done
10455  done
10456IFS=$as_save_IFS
10457
10458  ;;
10459esac
10460fi
10461ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10462if test -n "$ac_pt_PKG_CONFIG"; then
10463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10464$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10465else
10466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
10468fi
10469
10470  if test "x$ac_pt_PKG_CONFIG" = x; then
10471    PKG_CONFIG=""
10472  else
10473    case $cross_compiling:$ac_tool_warned in
10474yes:)
10475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10477ac_tool_warned=yes ;;
10478esac
10479    PKG_CONFIG=$ac_pt_PKG_CONFIG
10480  fi
10481else
10482  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10483fi
10484
10485fi
10486if test -n "$PKG_CONFIG"; then
10487	_pkg_min_version=0.9.0
10488	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10489$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10490	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10491		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10492$as_echo "yes" >&6; }
10493	else
10494		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10495$as_echo "no" >&6; }
10496		PKG_CONFIG=""
10497	fi
10498
10499fi
10500
10501# After basic tools have been setup, we can check build os specific details.
10502
10503###############################################################################
10504
10505# Note that this is the build platform OS version!
10506
10507OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10508OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10509OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10510OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10511
10512
10513
10514
10515
10516# Setup builddeps, for automatic downloading of tools we need.
10517# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10518# boot-jdk setup, but we need to have basic tools setup first.
10519
10520
10521# Check whether --with-builddeps-conf was given.
10522if test "${with_builddeps_conf+set}" = set; then :
10523  withval=$with_builddeps_conf;
10524fi
10525
10526
10527
10528# Check whether --with-builddeps-server was given.
10529if test "${with_builddeps_server+set}" = set; then :
10530  withval=$with_builddeps_server;
10531fi
10532
10533
10534
10535# Check whether --with-builddeps-dir was given.
10536if test "${with_builddeps_dir+set}" = set; then :
10537  withval=$with_builddeps_dir;
10538else
10539  with_builddeps_dir=/localhome/builddeps
10540fi
10541
10542
10543
10544# Check whether --with-builddeps-group was given.
10545if test "${with_builddeps_group+set}" = set; then :
10546  withval=$with_builddeps_group;
10547fi
10548
10549
10550
10551
10552    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10553        if test "x$with_builddeps_conf" != x; then
10554            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10555$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10556            builddepsfile=$with_builddeps_conf
10557            if test -s $builddepsfile; then
10558                . $builddepsfile
10559                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10560$as_echo "loaded!" >&6; }
10561            else
10562               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10563           fi
10564        else
10565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10566$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10567            builddepsfile=`mktemp`
10568            touch $builddepsfile
10569            # Put all found confs into a single file.
10570            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10571            # Source the file to acquire the variables
10572            if test -s $builddepsfile; then
10573                . $builddepsfile
10574                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10575$as_echo "found at least one!" >&6; }
10576            else
10577               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10578           fi
10579        fi
10580        # Create build and target names that use _ instead of "-" and ".".
10581        # This is necessary to use them in variable names.
10582        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10583        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10584        # Extract rewrite information for build and target
10585        eval rewritten_build=\${REWRITE_${build_var}}
10586        if test "x$rewritten_build" = x; then
10587            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10588            echo Build stays the same $rewritten_build
10589        else
10590            echo Rewriting build for builddeps into $rewritten_build
10591        fi
10592        eval rewritten_target=\${REWRITE_${target_var}}
10593        if test "x$rewritten_target" = x; then
10594            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10595            echo Target stays the same $rewritten_target
10596        else
10597            echo Rewriting target for builddeps into $rewritten_target
10598        fi
10599        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10600        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10601    fi
10602    for ac_prog in 7z unzip
10603do
10604  # Extract the first word of "$ac_prog", so it can be a program name with args.
10605set dummy $ac_prog; ac_word=$2
10606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10607$as_echo_n "checking for $ac_word... " >&6; }
10608if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10609  $as_echo_n "(cached) " >&6
10610else
10611  if test -n "$BDEPS_UNZIP"; then
10612  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10613else
10614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10615for as_dir in $PATH
10616do
10617  IFS=$as_save_IFS
10618  test -z "$as_dir" && as_dir=.
10619    for ac_exec_ext in '' $ac_executable_extensions; do
10620  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10621    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10623    break 2
10624  fi
10625done
10626  done
10627IFS=$as_save_IFS
10628
10629fi
10630fi
10631BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10632if test -n "$BDEPS_UNZIP"; then
10633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10634$as_echo "$BDEPS_UNZIP" >&6; }
10635else
10636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10637$as_echo "no" >&6; }
10638fi
10639
10640
10641  test -n "$BDEPS_UNZIP" && break
10642done
10643
10644    if test "x$BDEPS_UNZIP" = x7z; then
10645        BDEPS_UNZIP="7z x"
10646    fi
10647
10648    for ac_prog in wget lftp ftp
10649do
10650  # Extract the first word of "$ac_prog", so it can be a program name with args.
10651set dummy $ac_prog; ac_word=$2
10652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10653$as_echo_n "checking for $ac_word... " >&6; }
10654if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10655  $as_echo_n "(cached) " >&6
10656else
10657  if test -n "$BDEPS_FTP"; then
10658  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10659else
10660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10661for as_dir in $PATH
10662do
10663  IFS=$as_save_IFS
10664  test -z "$as_dir" && as_dir=.
10665    for ac_exec_ext in '' $ac_executable_extensions; do
10666  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10667    ac_cv_prog_BDEPS_FTP="$ac_prog"
10668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10669    break 2
10670  fi
10671done
10672  done
10673IFS=$as_save_IFS
10674
10675fi
10676fi
10677BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10678if test -n "$BDEPS_FTP"; then
10679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10680$as_echo "$BDEPS_FTP" >&6; }
10681else
10682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10683$as_echo "no" >&6; }
10684fi
10685
10686
10687  test -n "$BDEPS_FTP" && break
10688done
10689
10690
10691
10692###############################################################################
10693#
10694# Determine OpenJDK variants, options and version numbers.
10695#
10696###############################################################################
10697
10698# We need build & target for this.
10699
10700
10701###############################################################################
10702#
10703# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10704# We always build headless support.
10705#
10706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10707$as_echo_n "checking headful support... " >&6; }
10708# Check whether --enable-headful was given.
10709if test "${enable_headful+set}" = set; then :
10710  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10711else
10712  SUPPORT_HEADFUL=yes
10713fi
10714
10715
10716SUPPORT_HEADLESS=yes
10717BUILD_HEADLESS="BUILD_HEADLESS:=true"
10718
10719if test "x$SUPPORT_HEADFUL" = xyes; then
10720    # We are building both headful and headless.
10721    headful_msg="inlude support for both headful and headless"
10722fi
10723
10724if test "x$SUPPORT_HEADFUL" = xno; then
10725    # Thus we are building headless only.
10726    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10727    headful_msg="headless only"
10728fi
10729
10730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10731$as_echo "$headful_msg" >&6; }
10732
10733
10734
10735
10736
10737# Control wether Hotspot runs Queens test after build.
10738# Check whether --enable-hotspot-test-in-build was given.
10739if test "${enable_hotspot_test_in_build+set}" = set; then :
10740  enableval=$enable_hotspot_test_in_build;
10741else
10742  enable_hotspot_test_in_build=no
10743fi
10744
10745if test "x$enable_hotspot_test_in_build" = "xyes"; then
10746    TEST_IN_BUILD=true
10747else
10748    TEST_IN_BUILD=false
10749fi
10750
10751
10752###############################################################################
10753#
10754# Choose cacerts source file
10755#
10756
10757# Check whether --with-cacerts-file was given.
10758if test "${with_cacerts_file+set}" = set; then :
10759  withval=$with_cacerts_file;
10760fi
10761
10762if test "x$with_cacerts_file" != x; then
10763    CACERTS_FILE=$with_cacerts_file
10764else
10765    if test "x$OPENJDK" = "xtrue"; then
10766        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10767    else
10768        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10769    fi
10770fi
10771
10772
10773###############################################################################
10774#
10775# Enable or disable unlimited crypto
10776#
10777# Check whether --enable-unlimited-crypto was given.
10778if test "${enable_unlimited_crypto+set}" = set; then :
10779  enableval=$enable_unlimited_crypto;
10780else
10781  enable_unlimited_crypto=no
10782fi
10783
10784if test "x$enable_unlimited_crypto" = "xyes"; then
10785    UNLIMITED_CRYPTO=true
10786else
10787    UNLIMITED_CRYPTO=false
10788fi
10789
10790
10791###############################################################################
10792#
10793# Enable or disable the elliptic curve crypto implementation
10794#
10795
10796
10797###############################################################################
10798#
10799# Compress jars
10800#
10801COMPRESS_JARS=false
10802
10803
10804
10805
10806# Source the version numbers
10807. $AUTOCONF_DIR/version-numbers
10808
10809# Get the settings from parameters
10810
10811# Check whether --with-milestone was given.
10812if test "${with_milestone+set}" = set; then :
10813  withval=$with_milestone;
10814fi
10815
10816if test "x$with_milestone" = xyes; then
10817  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10818elif test "x$with_milestone" != x; then
10819    MILESTONE="$with_milestone"
10820fi
10821if test "x$MILESTONE" = x; then
10822  MILESTONE=internal
10823fi
10824
10825
10826# Check whether --with-build-number was given.
10827if test "${with_build_number+set}" = set; then :
10828  withval=$with_build_number;
10829fi
10830
10831if test "x$with_build_number" = xyes; then
10832  as_fn_error $? "Build number must have a value" "$LINENO" 5
10833elif test "x$with_build_number" != x; then
10834  JDK_BUILD_NUMBER="$with_build_number"
10835fi
10836if test "x$JDK_BUILD_NUMBER" = x; then
10837  JDK_BUILD_NUMBER=b00
10838fi
10839
10840
10841# Check whether --with-user-release-suffix was given.
10842if test "${with_user_release_suffix+set}" = set; then :
10843  withval=$with_user_release_suffix;
10844fi
10845
10846if test "x$with_user_release_suffix" = xyes; then
10847  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10848elif test "x$with_user_release_suffix" != x; then
10849  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10850else
10851  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10852  # Avoid [:alnum:] since it depends on the locale.
10853  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10854  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10855fi
10856
10857
10858# Now set the JDK version, milestone, build number etc.
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873COPYRIGHT_YEAR=`date +'%Y'`
10874
10875
10876if test "x$JDK_UPDATE_VERSION" != x; then
10877  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10878else
10879  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10880fi
10881
10882
10883COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10884
10885
10886
10887###############################################################################
10888#
10889# Setup BootJDK, used to bootstrap the build.
10890#
10891###############################################################################
10892
10893
10894BOOT_JDK_FOUND=no
10895
10896# Check whether --with-boot-jdk was given.
10897if test "${with_boot_jdk+set}" = set; then :
10898  withval=$with_boot_jdk;
10899fi
10900
10901
10902# We look for the Boot JDK through various means, going from more certain to
10903# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10904# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10905# must check if this is indeed valid; otherwise we'll continue looking.
10906
10907# Test: Is bootjdk explicitely set by command line arguments?
10908
10909  if test "x$BOOT_JDK_FOUND" = xno; then
10910    # Now execute the test
10911
10912if test "x$with_boot_jdk" != x; then
10913    BOOT_JDK=$with_boot_jdk
10914    BOOT_JDK_FOUND=maybe
10915    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10916$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10917fi
10918
10919
10920    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10921    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10922      # Do we have a bin/java?
10923      if test ! -x "$BOOT_JDK/bin/java"; then
10924        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10926        BOOT_JDK_FOUND=no
10927      else
10928        # Do we have a bin/javac?
10929        if test ! -x "$BOOT_JDK/bin/javac"; then
10930          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10931$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10932          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10933$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10934          BOOT_JDK_FOUND=no
10935        else
10936          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10937          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10938            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10940            BOOT_JDK_FOUND=no
10941          else
10942            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10943            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10944
10945            # Extra M4 quote needed to protect [] in grep expression.
10946            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10947            if test "x$FOUND_VERSION_78" = x; then
10948              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10950              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10951$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10952              BOOT_JDK_FOUND=no
10953            else
10954              # We're done! :-)
10955              BOOT_JDK_FOUND=yes
10956
10957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10958
10959  # Input might be given as Windows format, start by converting to
10960  # unix format.
10961  path="$BOOT_JDK"
10962  new_path=`$CYGPATH -u "$path"`
10963
10964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10967  # "foo.exe" is OK but "foo" is an error.
10968  #
10969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10970  # It is also a way to make sure we got the proper file name for the real test later on.
10971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10972  if test "x$test_shortpath" = x; then
10973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10974$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10975    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10976  fi
10977
10978  # Call helper function which possibly converts this using DOS-style short mode.
10979  # If so, the updated path is stored in $new_path.
10980
10981  input_path="$new_path"
10982  # Check if we need to convert this using DOS-style short mode. If the path
10983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10984  # take no chances and rewrite it.
10985  # Note: m4 eats our [], so we need to use [ and ] instead.
10986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10987  if test "x$has_forbidden_chars" != x; then
10988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10992      # Going to short mode and back again did indeed matter. Since short mode is
10993      # case insensitive, let's make it lowercase to improve readability.
10994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10995      # Now convert it back to Unix-stile (cygpath)
10996      input_path=`$CYGPATH -u "$shortmode_path"`
10997      new_path="$input_path"
10998    fi
10999  fi
11000
11001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11002  if test "x$test_cygdrive_prefix" = x; then
11003    # As a simple fix, exclude /usr/bin since it's not a real path.
11004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11006      # a path prefixed by /cygdrive for fixpath to work.
11007      new_path="$CYGWIN_ROOT_PATH$input_path"
11008    fi
11009  fi
11010
11011
11012  if test "x$path" != "x$new_path"; then
11013    BOOT_JDK="$new_path"
11014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11015$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11016  fi
11017
11018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11019
11020  path="$BOOT_JDK"
11021  has_colon=`$ECHO $path | $GREP ^.:`
11022  new_path="$path"
11023  if test "x$has_colon" = x; then
11024    # Not in mixed or Windows style, start by that.
11025    new_path=`cmd //c echo $path`
11026  fi
11027
11028
11029  input_path="$new_path"
11030  # Check if we need to convert this using DOS-style short mode. If the path
11031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11032  # take no chances and rewrite it.
11033  # Note: m4 eats our [], so we need to use [ and ] instead.
11034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11035  if test "x$has_forbidden_chars" != x; then
11036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11038  fi
11039
11040
11041  windows_path="$new_path"
11042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11043    unix_path=`$CYGPATH -u "$windows_path"`
11044    new_path="$unix_path"
11045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11047    new_path="$unix_path"
11048  fi
11049
11050  if test "x$path" != "x$new_path"; then
11051    BOOT_JDK="$new_path"
11052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11053$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11054  fi
11055
11056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11058
11059  else
11060    # We're on a posix platform. Hooray! :)
11061    path="$BOOT_JDK"
11062
11063    if test ! -f "$path" && test ! -d "$path"; then
11064      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11065    fi
11066
11067    has_space=`$ECHO "$path" | $GREP " "`
11068    if test "x$has_space" != x; then
11069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11070$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11071      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11072    fi
11073  fi
11074
11075              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11076$as_echo_n "checking for Boot JDK... " >&6; }
11077              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11078$as_echo "$BOOT_JDK" >&6; }
11079              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11080$as_echo_n "checking Boot JDK version... " >&6; }
11081              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11082              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11083$as_echo "$BOOT_JDK_VERSION" >&6; }
11084            fi # end check jdk version
11085          fi # end check rt.jar
11086        fi # end check javac
11087      fi # end check java
11088    fi # end check boot jdk found
11089  fi
11090
11091if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11092  # Having specified an argument which is incorrect will produce an instant failure;
11093  # we should not go on looking
11094  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11095fi
11096
11097# Test: Is bootjdk available from builddeps?
11098
11099  if test "x$BOOT_JDK_FOUND" = xno; then
11100    # Now execute the test
11101
11102
11103
11104    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11105        # Source the builddeps file again, to make sure it uses the latest variables!
11106        . $builddepsfile
11107        # Look for a target and build machine specific resource!
11108        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11109        if test "x$resource" = x; then
11110            # Ok, lets instead look for a target specific resource
11111            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11112        fi
11113        if test "x$resource" = x; then
11114            # Ok, lets instead look for a build specific resource
11115            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11116        fi
11117        if test "x$resource" = x; then
11118            # Ok, lets instead look for a generic resource
11119            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11120            resource=${builddep_bootjdk}
11121        fi
11122        if test "x$resource" != x; then
11123            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11124$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11125	    # If the resource in the builddeps.conf file is an existing directory,
11126	    # for example /java/linux/cups
11127	    if test -d ${resource}; then
11128	       depdir=${resource}
11129	    else
11130
11131# bootjdk is for example mymodule
11132# $resource is for example libs/general/libmymod_1_2_3.zip
11133# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11134# $with_builddeps_dir is for example /localhome/builddeps
11135# depdir is the name of the variable into which we store the depdir, eg MYMOD
11136# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11137# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11138    filename=`basename $resource`
11139    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11140    filebase=${filename%%.*}
11141    extension=${filename#*.}
11142    installdir=$with_builddeps_dir/$filebase
11143    if test ! -f $installdir/$filename.unpacked; then
11144        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11145$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11146        if test ! -d $installdir; then
11147            mkdir -p $installdir
11148        fi
11149        if test ! -d $installdir; then
11150            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11151        fi
11152        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11153        touch $tmpfile
11154        if test ! -f $tmpfile; then
11155            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11156        fi
11157
11158    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11159    # $tmpfile is the local file name for the downloaded file.
11160    VALID_TOOL=no
11161    if test "x$BDEPS_FTP" = xwget; then
11162       VALID_TOOL=yes
11163       wget -O $tmpfile $with_builddeps_server/$resource
11164    fi
11165    if test "x$BDEPS_FTP" = xlftp; then
11166       VALID_TOOL=yes
11167       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11168    fi
11169    if test "x$BDEPS_FTP" = xftp; then
11170        VALID_TOOL=yes
11171        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11172        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11173        FTPUSERPWD=${FTPSERVER%%@*}
11174        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11175            FTPUSER=${userpwd%%:*}
11176            FTPPWD=${userpwd#*@}
11177            FTPSERVER=${FTPSERVER#*@}
11178        else
11179            FTPUSER=ftp
11180            FTPPWD=ftp
11181        fi
11182        # the "pass" command does not work on some
11183        # ftp clients (read ftp.exe) but if it works,
11184        # passive mode is better!
11185        (\
11186            echo "user $FTPUSER $FTPPWD"        ;\
11187            echo "pass"                         ;\
11188            echo "bin"                          ;\
11189            echo "get $FTPPATH $tmpfile"              ;\
11190        ) | ftp -in $FTPSERVER
11191    fi
11192    if test "x$VALID_TOOL" != xyes; then
11193       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11194    fi
11195
11196        mv $tmpfile $installdir/$filename
11197        if test ! -s $installdir/$filename; then
11198            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11199        fi
11200        case "$extension" in
11201            zip)  echo "Unzipping $installdir/$filename..."
11202               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11203            ;;
11204            tar.gz) echo "Untaring $installdir/$filename..."
11205               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11206            ;;
11207            tgz) echo "Untaring $installdir/$filename..."
11208               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11209            ;;
11210            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11211            ;;
11212        esac
11213    fi
11214    if test -f $installdir/$filename.unpacked; then
11215        depdir=$installdir
11216    fi
11217
11218	    fi
11219            # Source the builddeps file again, because in the previous command, the depdir
11220            # was updated to point at the current build dependency install directory.
11221            . $builddepsfile
11222            # Now extract variables from the builddeps.conf files.
11223            theroot=${builddep_bootjdk_ROOT}
11224            thecflags=${builddep_bootjdk_CFLAGS}
11225            thelibs=${builddep_bootjdk_LIBS}
11226            if test "x$depdir" = x; then
11227                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11228            fi
11229            BOOT_JDK=$depdir
11230            if test "x$theroot" != x; then
11231               BOOT_JDK="$theroot"
11232            fi
11233            if test "x$thecflags" != x; then
11234               BOOT_JDK_CFLAGS="$thecflags"
11235            fi
11236            if test "x$thelibs" != x; then
11237               BOOT_JDK_LIBS="$thelibs"
11238            fi
11239            BOOT_JDK_FOUND=maybe
11240            else BOOT_JDK_FOUND=no
11241
11242        fi
11243        else BOOT_JDK_FOUND=no
11244
11245    fi
11246
11247
11248
11249    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11250    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11251      # Do we have a bin/java?
11252      if test ! -x "$BOOT_JDK/bin/java"; then
11253        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11255        BOOT_JDK_FOUND=no
11256      else
11257        # Do we have a bin/javac?
11258        if test ! -x "$BOOT_JDK/bin/javac"; then
11259          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11261          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11262$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11263          BOOT_JDK_FOUND=no
11264        else
11265          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11266          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11267            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11269            BOOT_JDK_FOUND=no
11270          else
11271            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11272            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11273
11274            # Extra M4 quote needed to protect [] in grep expression.
11275            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11276            if test "x$FOUND_VERSION_78" = x; then
11277              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11279              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11280$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11281              BOOT_JDK_FOUND=no
11282            else
11283              # We're done! :-)
11284              BOOT_JDK_FOUND=yes
11285
11286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11287
11288  # Input might be given as Windows format, start by converting to
11289  # unix format.
11290  path="$BOOT_JDK"
11291  new_path=`$CYGPATH -u "$path"`
11292
11293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11296  # "foo.exe" is OK but "foo" is an error.
11297  #
11298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11299  # It is also a way to make sure we got the proper file name for the real test later on.
11300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11301  if test "x$test_shortpath" = x; then
11302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11303$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11304    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11305  fi
11306
11307  # Call helper function which possibly converts this using DOS-style short mode.
11308  # If so, the updated path is stored in $new_path.
11309
11310  input_path="$new_path"
11311  # Check if we need to convert this using DOS-style short mode. If the path
11312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11313  # take no chances and rewrite it.
11314  # Note: m4 eats our [], so we need to use [ and ] instead.
11315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11316  if test "x$has_forbidden_chars" != x; then
11317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11321      # Going to short mode and back again did indeed matter. Since short mode is
11322      # case insensitive, let's make it lowercase to improve readability.
11323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11324      # Now convert it back to Unix-stile (cygpath)
11325      input_path=`$CYGPATH -u "$shortmode_path"`
11326      new_path="$input_path"
11327    fi
11328  fi
11329
11330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11331  if test "x$test_cygdrive_prefix" = x; then
11332    # As a simple fix, exclude /usr/bin since it's not a real path.
11333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11335      # a path prefixed by /cygdrive for fixpath to work.
11336      new_path="$CYGWIN_ROOT_PATH$input_path"
11337    fi
11338  fi
11339
11340
11341  if test "x$path" != "x$new_path"; then
11342    BOOT_JDK="$new_path"
11343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11344$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11345  fi
11346
11347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11348
11349  path="$BOOT_JDK"
11350  has_colon=`$ECHO $path | $GREP ^.:`
11351  new_path="$path"
11352  if test "x$has_colon" = x; then
11353    # Not in mixed or Windows style, start by that.
11354    new_path=`cmd //c echo $path`
11355  fi
11356
11357
11358  input_path="$new_path"
11359  # Check if we need to convert this using DOS-style short mode. If the path
11360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11361  # take no chances and rewrite it.
11362  # Note: m4 eats our [], so we need to use [ and ] instead.
11363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11364  if test "x$has_forbidden_chars" != x; then
11365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11367  fi
11368
11369
11370  windows_path="$new_path"
11371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11372    unix_path=`$CYGPATH -u "$windows_path"`
11373    new_path="$unix_path"
11374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11376    new_path="$unix_path"
11377  fi
11378
11379  if test "x$path" != "x$new_path"; then
11380    BOOT_JDK="$new_path"
11381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11382$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11383  fi
11384
11385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11387
11388  else
11389    # We're on a posix platform. Hooray! :)
11390    path="$BOOT_JDK"
11391
11392    if test ! -f "$path" && test ! -d "$path"; then
11393      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11394    fi
11395
11396    has_space=`$ECHO "$path" | $GREP " "`
11397    if test "x$has_space" != x; then
11398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11399$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11400      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11401    fi
11402  fi
11403
11404              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11405$as_echo_n "checking for Boot JDK... " >&6; }
11406              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11407$as_echo "$BOOT_JDK" >&6; }
11408              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11409$as_echo_n "checking Boot JDK version... " >&6; }
11410              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11411              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11412$as_echo "$BOOT_JDK_VERSION" >&6; }
11413            fi # end check jdk version
11414          fi # end check rt.jar
11415        fi # end check javac
11416      fi # end check java
11417    fi # end check boot jdk found
11418  fi
11419
11420
11421# Test: Is $JAVA_HOME set?
11422
11423  if test "x$BOOT_JDK_FOUND" = xno; then
11424    # Now execute the test
11425
11426    if test "x$JAVA_HOME" != x; then
11427        JAVA_HOME_PROCESSED="$JAVA_HOME"
11428
11429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11430
11431  # Input might be given as Windows format, start by converting to
11432  # unix format.
11433  path="$JAVA_HOME_PROCESSED"
11434  new_path=`$CYGPATH -u "$path"`
11435
11436  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11437  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11438  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11439  # "foo.exe" is OK but "foo" is an error.
11440  #
11441  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11442  # It is also a way to make sure we got the proper file name for the real test later on.
11443  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11444  if test "x$test_shortpath" = x; then
11445    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11446$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11447    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11448  fi
11449
11450  # Call helper function which possibly converts this using DOS-style short mode.
11451  # If so, the updated path is stored in $new_path.
11452
11453  input_path="$new_path"
11454  # Check if we need to convert this using DOS-style short mode. If the path
11455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11456  # take no chances and rewrite it.
11457  # Note: m4 eats our [], so we need to use [ and ] instead.
11458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11459  if test "x$has_forbidden_chars" != x; then
11460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11464      # Going to short mode and back again did indeed matter. Since short mode is
11465      # case insensitive, let's make it lowercase to improve readability.
11466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11467      # Now convert it back to Unix-stile (cygpath)
11468      input_path=`$CYGPATH -u "$shortmode_path"`
11469      new_path="$input_path"
11470    fi
11471  fi
11472
11473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11474  if test "x$test_cygdrive_prefix" = x; then
11475    # As a simple fix, exclude /usr/bin since it's not a real path.
11476    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11478      # a path prefixed by /cygdrive for fixpath to work.
11479      new_path="$CYGWIN_ROOT_PATH$input_path"
11480    fi
11481  fi
11482
11483
11484  if test "x$path" != "x$new_path"; then
11485    JAVA_HOME_PROCESSED="$new_path"
11486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11487$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11488  fi
11489
11490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11491
11492  path="$JAVA_HOME_PROCESSED"
11493  has_colon=`$ECHO $path | $GREP ^.:`
11494  new_path="$path"
11495  if test "x$has_colon" = x; then
11496    # Not in mixed or Windows style, start by that.
11497    new_path=`cmd //c echo $path`
11498  fi
11499
11500
11501  input_path="$new_path"
11502  # Check if we need to convert this using DOS-style short mode. If the path
11503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11504  # take no chances and rewrite it.
11505  # Note: m4 eats our [], so we need to use [ and ] instead.
11506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11507  if test "x$has_forbidden_chars" != x; then
11508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11510  fi
11511
11512
11513  windows_path="$new_path"
11514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11515    unix_path=`$CYGPATH -u "$windows_path"`
11516    new_path="$unix_path"
11517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11519    new_path="$unix_path"
11520  fi
11521
11522  if test "x$path" != "x$new_path"; then
11523    JAVA_HOME_PROCESSED="$new_path"
11524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11525$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11526  fi
11527
11528  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11529  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11530
11531  else
11532    # We're on a posix platform. Hooray! :)
11533    path="$JAVA_HOME_PROCESSED"
11534
11535    if test ! -f "$path" && test ! -d "$path"; then
11536      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11537    fi
11538
11539    has_space=`$ECHO "$path" | $GREP " "`
11540    if test "x$has_space" != x; then
11541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11542$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11543      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11544    fi
11545  fi
11546
11547        if test ! -d "$JAVA_HOME_PROCESSED"; then
11548            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11549$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11550        else
11551          # Aha, the user has set a JAVA_HOME
11552          # let us use that as the Boot JDK.
11553          BOOT_JDK="$JAVA_HOME_PROCESSED"
11554          BOOT_JDK_FOUND=maybe
11555          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11556$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11557        fi
11558    fi
11559
11560
11561    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11562    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11563      # Do we have a bin/java?
11564      if test ! -x "$BOOT_JDK/bin/java"; then
11565        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11567        BOOT_JDK_FOUND=no
11568      else
11569        # Do we have a bin/javac?
11570        if test ! -x "$BOOT_JDK/bin/javac"; then
11571          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11573          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11574$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11575          BOOT_JDK_FOUND=no
11576        else
11577          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11578          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11579            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11581            BOOT_JDK_FOUND=no
11582          else
11583            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11584            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11585
11586            # Extra M4 quote needed to protect [] in grep expression.
11587            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11588            if test "x$FOUND_VERSION_78" = x; then
11589              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11591              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11592$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11593              BOOT_JDK_FOUND=no
11594            else
11595              # We're done! :-)
11596              BOOT_JDK_FOUND=yes
11597
11598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11599
11600  # Input might be given as Windows format, start by converting to
11601  # unix format.
11602  path="$BOOT_JDK"
11603  new_path=`$CYGPATH -u "$path"`
11604
11605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11608  # "foo.exe" is OK but "foo" is an error.
11609  #
11610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11611  # It is also a way to make sure we got the proper file name for the real test later on.
11612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11613  if test "x$test_shortpath" = x; then
11614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11615$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11616    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11617  fi
11618
11619  # Call helper function which possibly converts this using DOS-style short mode.
11620  # If so, the updated path is stored in $new_path.
11621
11622  input_path="$new_path"
11623  # Check if we need to convert this using DOS-style short mode. If the path
11624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11625  # take no chances and rewrite it.
11626  # Note: m4 eats our [], so we need to use [ and ] instead.
11627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11628  if test "x$has_forbidden_chars" != x; then
11629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11633      # Going to short mode and back again did indeed matter. Since short mode is
11634      # case insensitive, let's make it lowercase to improve readability.
11635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11636      # Now convert it back to Unix-stile (cygpath)
11637      input_path=`$CYGPATH -u "$shortmode_path"`
11638      new_path="$input_path"
11639    fi
11640  fi
11641
11642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11643  if test "x$test_cygdrive_prefix" = x; then
11644    # As a simple fix, exclude /usr/bin since it's not a real path.
11645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11647      # a path prefixed by /cygdrive for fixpath to work.
11648      new_path="$CYGWIN_ROOT_PATH$input_path"
11649    fi
11650  fi
11651
11652
11653  if test "x$path" != "x$new_path"; then
11654    BOOT_JDK="$new_path"
11655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11656$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11657  fi
11658
11659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11660
11661  path="$BOOT_JDK"
11662  has_colon=`$ECHO $path | $GREP ^.:`
11663  new_path="$path"
11664  if test "x$has_colon" = x; then
11665    # Not in mixed or Windows style, start by that.
11666    new_path=`cmd //c echo $path`
11667  fi
11668
11669
11670  input_path="$new_path"
11671  # Check if we need to convert this using DOS-style short mode. If the path
11672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11673  # take no chances and rewrite it.
11674  # Note: m4 eats our [], so we need to use [ and ] instead.
11675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11676  if test "x$has_forbidden_chars" != x; then
11677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11679  fi
11680
11681
11682  windows_path="$new_path"
11683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11684    unix_path=`$CYGPATH -u "$windows_path"`
11685    new_path="$unix_path"
11686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11688    new_path="$unix_path"
11689  fi
11690
11691  if test "x$path" != "x$new_path"; then
11692    BOOT_JDK="$new_path"
11693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11695  fi
11696
11697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11699
11700  else
11701    # We're on a posix platform. Hooray! :)
11702    path="$BOOT_JDK"
11703
11704    if test ! -f "$path" && test ! -d "$path"; then
11705      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11706    fi
11707
11708    has_space=`$ECHO "$path" | $GREP " "`
11709    if test "x$has_space" != x; then
11710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11711$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11712      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11713    fi
11714  fi
11715
11716              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11717$as_echo_n "checking for Boot JDK... " >&6; }
11718              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11719$as_echo "$BOOT_JDK" >&6; }
11720              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11721$as_echo_n "checking Boot JDK version... " >&6; }
11722              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11723              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11724$as_echo "$BOOT_JDK_VERSION" >&6; }
11725            fi # end check jdk version
11726          fi # end check rt.jar
11727        fi # end check javac
11728      fi # end check java
11729    fi # end check boot jdk found
11730  fi
11731
11732
11733# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11734
11735  if test "x$BOOT_JDK_FOUND" = xno; then
11736    # Now execute the test
11737
11738    if test -x /usr/libexec/java_home; then
11739        BOOT_JDK=`/usr/libexec/java_home`
11740        BOOT_JDK_FOUND=maybe
11741        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11742$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11743    fi
11744
11745
11746    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11747    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11748      # Do we have a bin/java?
11749      if test ! -x "$BOOT_JDK/bin/java"; then
11750        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11752        BOOT_JDK_FOUND=no
11753      else
11754        # Do we have a bin/javac?
11755        if test ! -x "$BOOT_JDK/bin/javac"; then
11756          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11757$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11758          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11759$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11760          BOOT_JDK_FOUND=no
11761        else
11762          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11763          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11764            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11766            BOOT_JDK_FOUND=no
11767          else
11768            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11769            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11770
11771            # Extra M4 quote needed to protect [] in grep expression.
11772            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11773            if test "x$FOUND_VERSION_78" = x; then
11774              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11775$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11776              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11777$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11778              BOOT_JDK_FOUND=no
11779            else
11780              # We're done! :-)
11781              BOOT_JDK_FOUND=yes
11782
11783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11784
11785  # Input might be given as Windows format, start by converting to
11786  # unix format.
11787  path="$BOOT_JDK"
11788  new_path=`$CYGPATH -u "$path"`
11789
11790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11793  # "foo.exe" is OK but "foo" is an error.
11794  #
11795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11796  # It is also a way to make sure we got the proper file name for the real test later on.
11797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11798  if test "x$test_shortpath" = x; then
11799    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11800$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11801    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11802  fi
11803
11804  # Call helper function which possibly converts this using DOS-style short mode.
11805  # If so, the updated path is stored in $new_path.
11806
11807  input_path="$new_path"
11808  # Check if we need to convert this using DOS-style short mode. If the path
11809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11810  # take no chances and rewrite it.
11811  # Note: m4 eats our [], so we need to use [ and ] instead.
11812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11813  if test "x$has_forbidden_chars" != x; then
11814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11818      # Going to short mode and back again did indeed matter. Since short mode is
11819      # case insensitive, let's make it lowercase to improve readability.
11820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11821      # Now convert it back to Unix-stile (cygpath)
11822      input_path=`$CYGPATH -u "$shortmode_path"`
11823      new_path="$input_path"
11824    fi
11825  fi
11826
11827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11828  if test "x$test_cygdrive_prefix" = x; then
11829    # As a simple fix, exclude /usr/bin since it's not a real path.
11830    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11832      # a path prefixed by /cygdrive for fixpath to work.
11833      new_path="$CYGWIN_ROOT_PATH$input_path"
11834    fi
11835  fi
11836
11837
11838  if test "x$path" != "x$new_path"; then
11839    BOOT_JDK="$new_path"
11840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11842  fi
11843
11844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11845
11846  path="$BOOT_JDK"
11847  has_colon=`$ECHO $path | $GREP ^.:`
11848  new_path="$path"
11849  if test "x$has_colon" = x; then
11850    # Not in mixed or Windows style, start by that.
11851    new_path=`cmd //c echo $path`
11852  fi
11853
11854
11855  input_path="$new_path"
11856  # Check if we need to convert this using DOS-style short mode. If the path
11857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11858  # take no chances and rewrite it.
11859  # Note: m4 eats our [], so we need to use [ and ] instead.
11860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11861  if test "x$has_forbidden_chars" != x; then
11862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11863    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11864  fi
11865
11866
11867  windows_path="$new_path"
11868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11869    unix_path=`$CYGPATH -u "$windows_path"`
11870    new_path="$unix_path"
11871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11873    new_path="$unix_path"
11874  fi
11875
11876  if test "x$path" != "x$new_path"; then
11877    BOOT_JDK="$new_path"
11878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11879$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11880  fi
11881
11882  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11883  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11884
11885  else
11886    # We're on a posix platform. Hooray! :)
11887    path="$BOOT_JDK"
11888
11889    if test ! -f "$path" && test ! -d "$path"; then
11890      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11891    fi
11892
11893    has_space=`$ECHO "$path" | $GREP " "`
11894    if test "x$has_space" != x; then
11895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11897      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11898    fi
11899  fi
11900
11901              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11902$as_echo_n "checking for Boot JDK... " >&6; }
11903              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11904$as_echo "$BOOT_JDK" >&6; }
11905              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11906$as_echo_n "checking Boot JDK version... " >&6; }
11907              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11908              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11909$as_echo "$BOOT_JDK_VERSION" >&6; }
11910            fi # end check jdk version
11911          fi # end check rt.jar
11912        fi # end check javac
11913      fi # end check java
11914    fi # end check boot jdk found
11915  fi
11916
11917
11918# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11919
11920  if test "x$BOOT_JDK_FOUND" = xno; then
11921    # Now execute the test
11922
11923    # Extract the first word of "javac", so it can be a program name with args.
11924set dummy javac; ac_word=$2
11925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11926$as_echo_n "checking for $ac_word... " >&6; }
11927if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11928  $as_echo_n "(cached) " >&6
11929else
11930  case $JAVAC_CHECK in
11931  [\\/]* | ?:[\\/]*)
11932  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11933  ;;
11934  *)
11935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11936for as_dir in $PATH
11937do
11938  IFS=$as_save_IFS
11939  test -z "$as_dir" && as_dir=.
11940    for ac_exec_ext in '' $ac_executable_extensions; do
11941  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11942    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11944    break 2
11945  fi
11946done
11947  done
11948IFS=$as_save_IFS
11949
11950  ;;
11951esac
11952fi
11953JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11954if test -n "$JAVAC_CHECK"; then
11955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11956$as_echo "$JAVAC_CHECK" >&6; }
11957else
11958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11959$as_echo "no" >&6; }
11960fi
11961
11962
11963    # Extract the first word of "java", so it can be a program name with args.
11964set dummy java; ac_word=$2
11965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11966$as_echo_n "checking for $ac_word... " >&6; }
11967if ${ac_cv_path_JAVA_CHECK+:} false; then :
11968  $as_echo_n "(cached) " >&6
11969else
11970  case $JAVA_CHECK in
11971  [\\/]* | ?:[\\/]*)
11972  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11973  ;;
11974  *)
11975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11976for as_dir in $PATH
11977do
11978  IFS=$as_save_IFS
11979  test -z "$as_dir" && as_dir=.
11980    for ac_exec_ext in '' $ac_executable_extensions; do
11981  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11982    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11984    break 2
11985  fi
11986done
11987  done
11988IFS=$as_save_IFS
11989
11990  ;;
11991esac
11992fi
11993JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11994if test -n "$JAVA_CHECK"; then
11995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11996$as_echo "$JAVA_CHECK" >&6; }
11997else
11998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11999$as_echo "no" >&6; }
12000fi
12001
12002
12003    BINARY="$JAVAC_CHECK"
12004    if test "x$JAVAC_CHECK" = x; then
12005        BINARY="$JAVA_CHECK"
12006    fi
12007    if test "x$BINARY" != x; then
12008        # So there is a java(c) binary, it might be part of a JDK.
12009        # Lets find the JDK/JRE directory by following symbolic links.
12010        # Linux/GNU systems often have links from /usr/bin/java to
12011        # /etc/alternatives/java to the real JDK binary.
12012
12013    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12014        # Follow a chain of symbolic links. Use readlink
12015        # where it exists, else fall back to horribly
12016        # complicated shell code.
12017        if test "x$READLINK_TESTED" != yes; then
12018            # On MacOSX there is a readlink tool with a different
12019            # purpose than the GNU readlink tool. Check the found readlink.
12020            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12021            if test "x$ISGNU" = x; then
12022                 # A readlink that we do not know how to use.
12023                 # Are there other non-GNU readlinks out there?
12024                 READLINK_TESTED=yes
12025                 READLINK=
12026            fi
12027        fi
12028
12029        if test "x$READLINK" != x; then
12030            BINARY=`$READLINK -f $BINARY`
12031        else
12032            # Save the current directory for restoring afterwards
12033            STARTDIR=$PWD
12034            COUNTER=0
12035            sym_link_dir=`$DIRNAME $BINARY`
12036            sym_link_file=`$BASENAME $BINARY`
12037            # Use the system pwd and not the shell builtin to resolve directory symlinks
12038            cd $sym_link_dir
12039            cd `$THEPWDCMD`
12040            sym_link_dir=`$THEPWDCMD`
12041            # Resolve file symlinks
12042            while test $COUNTER -lt 20; do
12043                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12044                if test "x$ISLINK" == x; then
12045                    # This is not a symbolic link! We are done!
12046                    break
12047                fi
12048                # Again resolve directory symlinks since the target of the just found
12049                # link could be in a different directory
12050                cd `$DIRNAME $ISLINK`
12051                sym_link_dir=`$THEPWDCMD`
12052                sym_link_file=`$BASENAME $ISLINK`
12053                let COUNTER=COUNTER+1
12054            done
12055            cd $STARTDIR
12056            BINARY=$sym_link_dir/$sym_link_file
12057        fi
12058    fi
12059
12060        BOOT_JDK=`dirname "$BINARY"`
12061        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12062        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12063            # Looks like we found ourselves an JDK
12064            BOOT_JDK_FOUND=maybe
12065            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12066$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12067        fi
12068    fi
12069
12070
12071    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12072    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12073      # Do we have a bin/java?
12074      if test ! -x "$BOOT_JDK/bin/java"; then
12075        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12077        BOOT_JDK_FOUND=no
12078      else
12079        # Do we have a bin/javac?
12080        if test ! -x "$BOOT_JDK/bin/javac"; then
12081          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12082$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12083          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12084$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12085          BOOT_JDK_FOUND=no
12086        else
12087          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12088          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12089            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12091            BOOT_JDK_FOUND=no
12092          else
12093            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12094            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12095
12096            # Extra M4 quote needed to protect [] in grep expression.
12097            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12098            if test "x$FOUND_VERSION_78" = x; then
12099              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12101              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12102$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12103              BOOT_JDK_FOUND=no
12104            else
12105              # We're done! :-)
12106              BOOT_JDK_FOUND=yes
12107
12108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12109
12110  # Input might be given as Windows format, start by converting to
12111  # unix format.
12112  path="$BOOT_JDK"
12113  new_path=`$CYGPATH -u "$path"`
12114
12115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12118  # "foo.exe" is OK but "foo" is an error.
12119  #
12120  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12121  # It is also a way to make sure we got the proper file name for the real test later on.
12122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12123  if test "x$test_shortpath" = x; then
12124    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12126    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12127  fi
12128
12129  # Call helper function which possibly converts this using DOS-style short mode.
12130  # If so, the updated path is stored in $new_path.
12131
12132  input_path="$new_path"
12133  # Check if we need to convert this using DOS-style short mode. If the path
12134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12135  # take no chances and rewrite it.
12136  # Note: m4 eats our [], so we need to use [ and ] instead.
12137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12138  if test "x$has_forbidden_chars" != x; then
12139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12140    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12141    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12142    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12143      # Going to short mode and back again did indeed matter. Since short mode is
12144      # case insensitive, let's make it lowercase to improve readability.
12145      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12146      # Now convert it back to Unix-stile (cygpath)
12147      input_path=`$CYGPATH -u "$shortmode_path"`
12148      new_path="$input_path"
12149    fi
12150  fi
12151
12152  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12153  if test "x$test_cygdrive_prefix" = x; then
12154    # As a simple fix, exclude /usr/bin since it's not a real path.
12155    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12156      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12157      # a path prefixed by /cygdrive for fixpath to work.
12158      new_path="$CYGWIN_ROOT_PATH$input_path"
12159    fi
12160  fi
12161
12162
12163  if test "x$path" != "x$new_path"; then
12164    BOOT_JDK="$new_path"
12165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12166$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12167  fi
12168
12169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12170
12171  path="$BOOT_JDK"
12172  has_colon=`$ECHO $path | $GREP ^.:`
12173  new_path="$path"
12174  if test "x$has_colon" = x; then
12175    # Not in mixed or Windows style, start by that.
12176    new_path=`cmd //c echo $path`
12177  fi
12178
12179
12180  input_path="$new_path"
12181  # Check if we need to convert this using DOS-style short mode. If the path
12182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12183  # take no chances and rewrite it.
12184  # Note: m4 eats our [], so we need to use [ and ] instead.
12185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12186  if test "x$has_forbidden_chars" != x; then
12187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12189  fi
12190
12191
12192  windows_path="$new_path"
12193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12194    unix_path=`$CYGPATH -u "$windows_path"`
12195    new_path="$unix_path"
12196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12198    new_path="$unix_path"
12199  fi
12200
12201  if test "x$path" != "x$new_path"; then
12202    BOOT_JDK="$new_path"
12203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12204$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12205  fi
12206
12207  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12208  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12209
12210  else
12211    # We're on a posix platform. Hooray! :)
12212    path="$BOOT_JDK"
12213
12214    if test ! -f "$path" && test ! -d "$path"; then
12215      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12216    fi
12217
12218    has_space=`$ECHO "$path" | $GREP " "`
12219    if test "x$has_space" != x; then
12220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12221$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12222      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12223    fi
12224  fi
12225
12226              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12227$as_echo_n "checking for Boot JDK... " >&6; }
12228              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12229$as_echo "$BOOT_JDK" >&6; }
12230              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12231$as_echo_n "checking Boot JDK version... " >&6; }
12232              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12233              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12234$as_echo "$BOOT_JDK_VERSION" >&6; }
12235            fi # end check jdk version
12236          fi # end check rt.jar
12237        fi # end check javac
12238      fi # end check java
12239    fi # end check boot jdk found
12240  fi
12241
12242
12243# Test: Is there a JDK installed in default, well-known locations?
12244
12245  if test "x$BOOT_JDK_FOUND" = xno; then
12246    # Now execute the test
12247
12248  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12249
12250  if test "x$BOOT_JDK_FOUND" = xno; then
12251    # Now execute the test
12252
12253  if test "x$ProgramW6432" != x; then
12254    VIRTUAL_DIR="$ProgramW6432/Java"
12255
12256  windows_path="$VIRTUAL_DIR"
12257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12258    unix_path=`$CYGPATH -u "$windows_path"`
12259    VIRTUAL_DIR="$unix_path"
12260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12262    VIRTUAL_DIR="$unix_path"
12263  fi
12264
12265
12266  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12267  BOOT_JDK_SUFFIX=""
12268  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12269  if test "x$ALL_JDKS_FOUND" != x; then
12270    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12271
12272  if test "x$BOOT_JDK_FOUND" = xno; then
12273    # Now execute the test
12274
12275        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12276        if test -d "$BOOT_JDK"; then
12277          BOOT_JDK_FOUND=maybe
12278          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12279$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12280        fi
12281
12282
12283    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12284    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12285      # Do we have a bin/java?
12286      if test ! -x "$BOOT_JDK/bin/java"; then
12287        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12289        BOOT_JDK_FOUND=no
12290      else
12291        # Do we have a bin/javac?
12292        if test ! -x "$BOOT_JDK/bin/javac"; then
12293          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12294$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12295          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12296$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12297          BOOT_JDK_FOUND=no
12298        else
12299          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12300          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12301            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12302$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12303            BOOT_JDK_FOUND=no
12304          else
12305            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12306            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12307
12308            # Extra M4 quote needed to protect [] in grep expression.
12309            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12310            if test "x$FOUND_VERSION_78" = x; then
12311              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12312$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12313              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12314$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12315              BOOT_JDK_FOUND=no
12316            else
12317              # We're done! :-)
12318              BOOT_JDK_FOUND=yes
12319
12320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12321
12322  # Input might be given as Windows format, start by converting to
12323  # unix format.
12324  path="$BOOT_JDK"
12325  new_path=`$CYGPATH -u "$path"`
12326
12327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12330  # "foo.exe" is OK but "foo" is an error.
12331  #
12332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12333  # It is also a way to make sure we got the proper file name for the real test later on.
12334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12335  if test "x$test_shortpath" = x; then
12336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12338    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12339  fi
12340
12341  # Call helper function which possibly converts this using DOS-style short mode.
12342  # If so, the updated path is stored in $new_path.
12343
12344  input_path="$new_path"
12345  # Check if we need to convert this using DOS-style short mode. If the path
12346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12347  # take no chances and rewrite it.
12348  # Note: m4 eats our [], so we need to use [ and ] instead.
12349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12350  if test "x$has_forbidden_chars" != x; then
12351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12355      # Going to short mode and back again did indeed matter. Since short mode is
12356      # case insensitive, let's make it lowercase to improve readability.
12357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12358      # Now convert it back to Unix-stile (cygpath)
12359      input_path=`$CYGPATH -u "$shortmode_path"`
12360      new_path="$input_path"
12361    fi
12362  fi
12363
12364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12365  if test "x$test_cygdrive_prefix" = x; then
12366    # As a simple fix, exclude /usr/bin since it's not a real path.
12367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12369      # a path prefixed by /cygdrive for fixpath to work.
12370      new_path="$CYGWIN_ROOT_PATH$input_path"
12371    fi
12372  fi
12373
12374
12375  if test "x$path" != "x$new_path"; then
12376    BOOT_JDK="$new_path"
12377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12379  fi
12380
12381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12382
12383  path="$BOOT_JDK"
12384  has_colon=`$ECHO $path | $GREP ^.:`
12385  new_path="$path"
12386  if test "x$has_colon" = x; then
12387    # Not in mixed or Windows style, start by that.
12388    new_path=`cmd //c echo $path`
12389  fi
12390
12391
12392  input_path="$new_path"
12393  # Check if we need to convert this using DOS-style short mode. If the path
12394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12395  # take no chances and rewrite it.
12396  # Note: m4 eats our [], so we need to use [ and ] instead.
12397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12398  if test "x$has_forbidden_chars" != x; then
12399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12401  fi
12402
12403
12404  windows_path="$new_path"
12405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12406    unix_path=`$CYGPATH -u "$windows_path"`
12407    new_path="$unix_path"
12408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12410    new_path="$unix_path"
12411  fi
12412
12413  if test "x$path" != "x$new_path"; then
12414    BOOT_JDK="$new_path"
12415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12417  fi
12418
12419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12421
12422  else
12423    # We're on a posix platform. Hooray! :)
12424    path="$BOOT_JDK"
12425
12426    if test ! -f "$path" && test ! -d "$path"; then
12427      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12428    fi
12429
12430    has_space=`$ECHO "$path" | $GREP " "`
12431    if test "x$has_space" != x; then
12432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12433$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12434      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12435    fi
12436  fi
12437
12438              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12439$as_echo_n "checking for Boot JDK... " >&6; }
12440              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12441$as_echo "$BOOT_JDK" >&6; }
12442              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12443$as_echo_n "checking Boot JDK version... " >&6; }
12444              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12445              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12446$as_echo "$BOOT_JDK_VERSION" >&6; }
12447            fi # end check jdk version
12448          fi # end check rt.jar
12449        fi # end check javac
12450      fi # end check java
12451    fi # end check boot jdk found
12452  fi
12453
12454    done
12455  fi
12456
12457  fi
12458
12459
12460    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12461    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12462      # Do we have a bin/java?
12463      if test ! -x "$BOOT_JDK/bin/java"; then
12464        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12466        BOOT_JDK_FOUND=no
12467      else
12468        # Do we have a bin/javac?
12469        if test ! -x "$BOOT_JDK/bin/javac"; then
12470          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12472          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12473$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12474          BOOT_JDK_FOUND=no
12475        else
12476          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12477          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12478            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12480            BOOT_JDK_FOUND=no
12481          else
12482            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12483            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12484
12485            # Extra M4 quote needed to protect [] in grep expression.
12486            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12487            if test "x$FOUND_VERSION_78" = x; then
12488              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12490              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12491$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12492              BOOT_JDK_FOUND=no
12493            else
12494              # We're done! :-)
12495              BOOT_JDK_FOUND=yes
12496
12497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12498
12499  # Input might be given as Windows format, start by converting to
12500  # unix format.
12501  path="$BOOT_JDK"
12502  new_path=`$CYGPATH -u "$path"`
12503
12504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12507  # "foo.exe" is OK but "foo" is an error.
12508  #
12509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12510  # It is also a way to make sure we got the proper file name for the real test later on.
12511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12512  if test "x$test_shortpath" = x; then
12513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12514$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12515    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12516  fi
12517
12518  # Call helper function which possibly converts this using DOS-style short mode.
12519  # If so, the updated path is stored in $new_path.
12520
12521  input_path="$new_path"
12522  # Check if we need to convert this using DOS-style short mode. If the path
12523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12524  # take no chances and rewrite it.
12525  # Note: m4 eats our [], so we need to use [ and ] instead.
12526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12527  if test "x$has_forbidden_chars" != x; then
12528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12532      # Going to short mode and back again did indeed matter. Since short mode is
12533      # case insensitive, let's make it lowercase to improve readability.
12534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12535      # Now convert it back to Unix-stile (cygpath)
12536      input_path=`$CYGPATH -u "$shortmode_path"`
12537      new_path="$input_path"
12538    fi
12539  fi
12540
12541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12542  if test "x$test_cygdrive_prefix" = x; then
12543    # As a simple fix, exclude /usr/bin since it's not a real path.
12544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12546      # a path prefixed by /cygdrive for fixpath to work.
12547      new_path="$CYGWIN_ROOT_PATH$input_path"
12548    fi
12549  fi
12550
12551
12552  if test "x$path" != "x$new_path"; then
12553    BOOT_JDK="$new_path"
12554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12555$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12556  fi
12557
12558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12559
12560  path="$BOOT_JDK"
12561  has_colon=`$ECHO $path | $GREP ^.:`
12562  new_path="$path"
12563  if test "x$has_colon" = x; then
12564    # Not in mixed or Windows style, start by that.
12565    new_path=`cmd //c echo $path`
12566  fi
12567
12568
12569  input_path="$new_path"
12570  # Check if we need to convert this using DOS-style short mode. If the path
12571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12572  # take no chances and rewrite it.
12573  # Note: m4 eats our [], so we need to use [ and ] instead.
12574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12575  if test "x$has_forbidden_chars" != x; then
12576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12578  fi
12579
12580
12581  windows_path="$new_path"
12582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12583    unix_path=`$CYGPATH -u "$windows_path"`
12584    new_path="$unix_path"
12585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12587    new_path="$unix_path"
12588  fi
12589
12590  if test "x$path" != "x$new_path"; then
12591    BOOT_JDK="$new_path"
12592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12594  fi
12595
12596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12598
12599  else
12600    # We're on a posix platform. Hooray! :)
12601    path="$BOOT_JDK"
12602
12603    if test ! -f "$path" && test ! -d "$path"; then
12604      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12605    fi
12606
12607    has_space=`$ECHO "$path" | $GREP " "`
12608    if test "x$has_space" != x; then
12609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12610$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12611      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12612    fi
12613  fi
12614
12615              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12616$as_echo_n "checking for Boot JDK... " >&6; }
12617              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12618$as_echo "$BOOT_JDK" >&6; }
12619              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12620$as_echo_n "checking Boot JDK version... " >&6; }
12621              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12622              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12623$as_echo "$BOOT_JDK_VERSION" >&6; }
12624            fi # end check jdk version
12625          fi # end check rt.jar
12626        fi # end check javac
12627      fi # end check java
12628    fi # end check boot jdk found
12629  fi
12630
12631
12632  if test "x$BOOT_JDK_FOUND" = xno; then
12633    # Now execute the test
12634
12635  if test "x$PROGRAMW6432" != x; then
12636    VIRTUAL_DIR="$PROGRAMW6432/Java"
12637
12638  windows_path="$VIRTUAL_DIR"
12639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12640    unix_path=`$CYGPATH -u "$windows_path"`
12641    VIRTUAL_DIR="$unix_path"
12642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12644    VIRTUAL_DIR="$unix_path"
12645  fi
12646
12647
12648  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12649  BOOT_JDK_SUFFIX=""
12650  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12651  if test "x$ALL_JDKS_FOUND" != x; then
12652    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12653
12654  if test "x$BOOT_JDK_FOUND" = xno; then
12655    # Now execute the test
12656
12657        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12658        if test -d "$BOOT_JDK"; then
12659          BOOT_JDK_FOUND=maybe
12660          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12661$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12662        fi
12663
12664
12665    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12666    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12667      # Do we have a bin/java?
12668      if test ! -x "$BOOT_JDK/bin/java"; then
12669        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12671        BOOT_JDK_FOUND=no
12672      else
12673        # Do we have a bin/javac?
12674        if test ! -x "$BOOT_JDK/bin/javac"; then
12675          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12677          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12678$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12679          BOOT_JDK_FOUND=no
12680        else
12681          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12682          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12683            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12685            BOOT_JDK_FOUND=no
12686          else
12687            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12688            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12689
12690            # Extra M4 quote needed to protect [] in grep expression.
12691            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12692            if test "x$FOUND_VERSION_78" = x; then
12693              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12695              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12696$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12697              BOOT_JDK_FOUND=no
12698            else
12699              # We're done! :-)
12700              BOOT_JDK_FOUND=yes
12701
12702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12703
12704  # Input might be given as Windows format, start by converting to
12705  # unix format.
12706  path="$BOOT_JDK"
12707  new_path=`$CYGPATH -u "$path"`
12708
12709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12712  # "foo.exe" is OK but "foo" is an error.
12713  #
12714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12715  # It is also a way to make sure we got the proper file name for the real test later on.
12716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12717  if test "x$test_shortpath" = x; then
12718    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12719$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12720    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12721  fi
12722
12723  # Call helper function which possibly converts this using DOS-style short mode.
12724  # If so, the updated path is stored in $new_path.
12725
12726  input_path="$new_path"
12727  # Check if we need to convert this using DOS-style short mode. If the path
12728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12729  # take no chances and rewrite it.
12730  # Note: m4 eats our [], so we need to use [ and ] instead.
12731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12732  if test "x$has_forbidden_chars" != x; then
12733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12737      # Going to short mode and back again did indeed matter. Since short mode is
12738      # case insensitive, let's make it lowercase to improve readability.
12739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12740      # Now convert it back to Unix-stile (cygpath)
12741      input_path=`$CYGPATH -u "$shortmode_path"`
12742      new_path="$input_path"
12743    fi
12744  fi
12745
12746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12747  if test "x$test_cygdrive_prefix" = x; then
12748    # As a simple fix, exclude /usr/bin since it's not a real path.
12749    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12751      # a path prefixed by /cygdrive for fixpath to work.
12752      new_path="$CYGWIN_ROOT_PATH$input_path"
12753    fi
12754  fi
12755
12756
12757  if test "x$path" != "x$new_path"; then
12758    BOOT_JDK="$new_path"
12759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12760$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12761  fi
12762
12763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12764
12765  path="$BOOT_JDK"
12766  has_colon=`$ECHO $path | $GREP ^.:`
12767  new_path="$path"
12768  if test "x$has_colon" = x; then
12769    # Not in mixed or Windows style, start by that.
12770    new_path=`cmd //c echo $path`
12771  fi
12772
12773
12774  input_path="$new_path"
12775  # Check if we need to convert this using DOS-style short mode. If the path
12776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12777  # take no chances and rewrite it.
12778  # Note: m4 eats our [], so we need to use [ and ] instead.
12779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12780  if test "x$has_forbidden_chars" != x; then
12781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12783  fi
12784
12785
12786  windows_path="$new_path"
12787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12788    unix_path=`$CYGPATH -u "$windows_path"`
12789    new_path="$unix_path"
12790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12792    new_path="$unix_path"
12793  fi
12794
12795  if test "x$path" != "x$new_path"; then
12796    BOOT_JDK="$new_path"
12797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12799  fi
12800
12801  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12802  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12803
12804  else
12805    # We're on a posix platform. Hooray! :)
12806    path="$BOOT_JDK"
12807
12808    if test ! -f "$path" && test ! -d "$path"; then
12809      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12810    fi
12811
12812    has_space=`$ECHO "$path" | $GREP " "`
12813    if test "x$has_space" != x; then
12814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12815$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12816      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12817    fi
12818  fi
12819
12820              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12821$as_echo_n "checking for Boot JDK... " >&6; }
12822              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12823$as_echo "$BOOT_JDK" >&6; }
12824              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12825$as_echo_n "checking Boot JDK version... " >&6; }
12826              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12827              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12828$as_echo "$BOOT_JDK_VERSION" >&6; }
12829            fi # end check jdk version
12830          fi # end check rt.jar
12831        fi # end check javac
12832      fi # end check java
12833    fi # end check boot jdk found
12834  fi
12835
12836    done
12837  fi
12838
12839  fi
12840
12841
12842    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12843    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12844      # Do we have a bin/java?
12845      if test ! -x "$BOOT_JDK/bin/java"; then
12846        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12847$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12848        BOOT_JDK_FOUND=no
12849      else
12850        # Do we have a bin/javac?
12851        if test ! -x "$BOOT_JDK/bin/javac"; then
12852          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12853$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12854          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12855$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12856          BOOT_JDK_FOUND=no
12857        else
12858          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12859          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12860            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12862            BOOT_JDK_FOUND=no
12863          else
12864            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12865            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12866
12867            # Extra M4 quote needed to protect [] in grep expression.
12868            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12869            if test "x$FOUND_VERSION_78" = x; then
12870              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12872              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12873$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12874              BOOT_JDK_FOUND=no
12875            else
12876              # We're done! :-)
12877              BOOT_JDK_FOUND=yes
12878
12879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12880
12881  # Input might be given as Windows format, start by converting to
12882  # unix format.
12883  path="$BOOT_JDK"
12884  new_path=`$CYGPATH -u "$path"`
12885
12886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12889  # "foo.exe" is OK but "foo" is an error.
12890  #
12891  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12892  # It is also a way to make sure we got the proper file name for the real test later on.
12893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12894  if test "x$test_shortpath" = x; then
12895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12897    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12898  fi
12899
12900  # Call helper function which possibly converts this using DOS-style short mode.
12901  # If so, the updated path is stored in $new_path.
12902
12903  input_path="$new_path"
12904  # Check if we need to convert this using DOS-style short mode. If the path
12905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12906  # take no chances and rewrite it.
12907  # Note: m4 eats our [], so we need to use [ and ] instead.
12908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12909  if test "x$has_forbidden_chars" != x; then
12910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12914      # Going to short mode and back again did indeed matter. Since short mode is
12915      # case insensitive, let's make it lowercase to improve readability.
12916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12917      # Now convert it back to Unix-stile (cygpath)
12918      input_path=`$CYGPATH -u "$shortmode_path"`
12919      new_path="$input_path"
12920    fi
12921  fi
12922
12923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12924  if test "x$test_cygdrive_prefix" = x; then
12925    # As a simple fix, exclude /usr/bin since it's not a real path.
12926    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12928      # a path prefixed by /cygdrive for fixpath to work.
12929      new_path="$CYGWIN_ROOT_PATH$input_path"
12930    fi
12931  fi
12932
12933
12934  if test "x$path" != "x$new_path"; then
12935    BOOT_JDK="$new_path"
12936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12937$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12938  fi
12939
12940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12941
12942  path="$BOOT_JDK"
12943  has_colon=`$ECHO $path | $GREP ^.:`
12944  new_path="$path"
12945  if test "x$has_colon" = x; then
12946    # Not in mixed or Windows style, start by that.
12947    new_path=`cmd //c echo $path`
12948  fi
12949
12950
12951  input_path="$new_path"
12952  # Check if we need to convert this using DOS-style short mode. If the path
12953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12954  # take no chances and rewrite it.
12955  # Note: m4 eats our [], so we need to use [ and ] instead.
12956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12957  if test "x$has_forbidden_chars" != x; then
12958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12960  fi
12961
12962
12963  windows_path="$new_path"
12964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12965    unix_path=`$CYGPATH -u "$windows_path"`
12966    new_path="$unix_path"
12967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12969    new_path="$unix_path"
12970  fi
12971
12972  if test "x$path" != "x$new_path"; then
12973    BOOT_JDK="$new_path"
12974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12975$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12976  fi
12977
12978  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12979  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12980
12981  else
12982    # We're on a posix platform. Hooray! :)
12983    path="$BOOT_JDK"
12984
12985    if test ! -f "$path" && test ! -d "$path"; then
12986      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12987    fi
12988
12989    has_space=`$ECHO "$path" | $GREP " "`
12990    if test "x$has_space" != x; then
12991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12992$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12993      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12994    fi
12995  fi
12996
12997              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12998$as_echo_n "checking for Boot JDK... " >&6; }
12999              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13000$as_echo "$BOOT_JDK" >&6; }
13001              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13002$as_echo_n "checking Boot JDK version... " >&6; }
13003              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13004              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13005$as_echo "$BOOT_JDK_VERSION" >&6; }
13006            fi # end check jdk version
13007          fi # end check rt.jar
13008        fi # end check javac
13009      fi # end check java
13010    fi # end check boot jdk found
13011  fi
13012
13013
13014  if test "x$BOOT_JDK_FOUND" = xno; then
13015    # Now execute the test
13016
13017  if test "x$PROGRAMFILES" != x; then
13018    VIRTUAL_DIR="$PROGRAMFILES/Java"
13019
13020  windows_path="$VIRTUAL_DIR"
13021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13022    unix_path=`$CYGPATH -u "$windows_path"`
13023    VIRTUAL_DIR="$unix_path"
13024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13026    VIRTUAL_DIR="$unix_path"
13027  fi
13028
13029
13030  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13031  BOOT_JDK_SUFFIX=""
13032  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13033  if test "x$ALL_JDKS_FOUND" != x; then
13034    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13035
13036  if test "x$BOOT_JDK_FOUND" = xno; then
13037    # Now execute the test
13038
13039        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13040        if test -d "$BOOT_JDK"; then
13041          BOOT_JDK_FOUND=maybe
13042          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13043$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13044        fi
13045
13046
13047    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13048    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13049      # Do we have a bin/java?
13050      if test ! -x "$BOOT_JDK/bin/java"; then
13051        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13053        BOOT_JDK_FOUND=no
13054      else
13055        # Do we have a bin/javac?
13056        if test ! -x "$BOOT_JDK/bin/javac"; then
13057          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13059          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13060$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13061          BOOT_JDK_FOUND=no
13062        else
13063          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13064          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13065            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13067            BOOT_JDK_FOUND=no
13068          else
13069            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13070            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13071
13072            # Extra M4 quote needed to protect [] in grep expression.
13073            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13074            if test "x$FOUND_VERSION_78" = x; then
13075              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13077              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13078$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13079              BOOT_JDK_FOUND=no
13080            else
13081              # We're done! :-)
13082              BOOT_JDK_FOUND=yes
13083
13084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13085
13086  # Input might be given as Windows format, start by converting to
13087  # unix format.
13088  path="$BOOT_JDK"
13089  new_path=`$CYGPATH -u "$path"`
13090
13091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13094  # "foo.exe" is OK but "foo" is an error.
13095  #
13096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13097  # It is also a way to make sure we got the proper file name for the real test later on.
13098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13099  if test "x$test_shortpath" = x; then
13100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13102    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13103  fi
13104
13105  # Call helper function which possibly converts this using DOS-style short mode.
13106  # If so, the updated path is stored in $new_path.
13107
13108  input_path="$new_path"
13109  # Check if we need to convert this using DOS-style short mode. If the path
13110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13111  # take no chances and rewrite it.
13112  # Note: m4 eats our [], so we need to use [ and ] instead.
13113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13114  if test "x$has_forbidden_chars" != x; then
13115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13119      # Going to short mode and back again did indeed matter. Since short mode is
13120      # case insensitive, let's make it lowercase to improve readability.
13121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13122      # Now convert it back to Unix-stile (cygpath)
13123      input_path=`$CYGPATH -u "$shortmode_path"`
13124      new_path="$input_path"
13125    fi
13126  fi
13127
13128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13129  if test "x$test_cygdrive_prefix" = x; then
13130    # As a simple fix, exclude /usr/bin since it's not a real path.
13131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13133      # a path prefixed by /cygdrive for fixpath to work.
13134      new_path="$CYGWIN_ROOT_PATH$input_path"
13135    fi
13136  fi
13137
13138
13139  if test "x$path" != "x$new_path"; then
13140    BOOT_JDK="$new_path"
13141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13143  fi
13144
13145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13146
13147  path="$BOOT_JDK"
13148  has_colon=`$ECHO $path | $GREP ^.:`
13149  new_path="$path"
13150  if test "x$has_colon" = x; then
13151    # Not in mixed or Windows style, start by that.
13152    new_path=`cmd //c echo $path`
13153  fi
13154
13155
13156  input_path="$new_path"
13157  # Check if we need to convert this using DOS-style short mode. If the path
13158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13159  # take no chances and rewrite it.
13160  # Note: m4 eats our [], so we need to use [ and ] instead.
13161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13162  if test "x$has_forbidden_chars" != x; then
13163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13165  fi
13166
13167
13168  windows_path="$new_path"
13169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13170    unix_path=`$CYGPATH -u "$windows_path"`
13171    new_path="$unix_path"
13172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13174    new_path="$unix_path"
13175  fi
13176
13177  if test "x$path" != "x$new_path"; then
13178    BOOT_JDK="$new_path"
13179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13181  fi
13182
13183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13185
13186  else
13187    # We're on a posix platform. Hooray! :)
13188    path="$BOOT_JDK"
13189
13190    if test ! -f "$path" && test ! -d "$path"; then
13191      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13192    fi
13193
13194    has_space=`$ECHO "$path" | $GREP " "`
13195    if test "x$has_space" != x; then
13196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13198      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13199    fi
13200  fi
13201
13202              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13203$as_echo_n "checking for Boot JDK... " >&6; }
13204              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13205$as_echo "$BOOT_JDK" >&6; }
13206              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13207$as_echo_n "checking Boot JDK version... " >&6; }
13208              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13209              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13210$as_echo "$BOOT_JDK_VERSION" >&6; }
13211            fi # end check jdk version
13212          fi # end check rt.jar
13213        fi # end check javac
13214      fi # end check java
13215    fi # end check boot jdk found
13216  fi
13217
13218    done
13219  fi
13220
13221  fi
13222
13223
13224    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13225    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13226      # Do we have a bin/java?
13227      if test ! -x "$BOOT_JDK/bin/java"; then
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13230        BOOT_JDK_FOUND=no
13231      else
13232        # Do we have a bin/javac?
13233        if test ! -x "$BOOT_JDK/bin/javac"; then
13234          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13236          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13237$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13238          BOOT_JDK_FOUND=no
13239        else
13240          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13241          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13242            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13244            BOOT_JDK_FOUND=no
13245          else
13246            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13247            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13248
13249            # Extra M4 quote needed to protect [] in grep expression.
13250            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13251            if test "x$FOUND_VERSION_78" = x; then
13252              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13254              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13255$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13256              BOOT_JDK_FOUND=no
13257            else
13258              # We're done! :-)
13259              BOOT_JDK_FOUND=yes
13260
13261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13262
13263  # Input might be given as Windows format, start by converting to
13264  # unix format.
13265  path="$BOOT_JDK"
13266  new_path=`$CYGPATH -u "$path"`
13267
13268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13271  # "foo.exe" is OK but "foo" is an error.
13272  #
13273  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13274  # It is also a way to make sure we got the proper file name for the real test later on.
13275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13276  if test "x$test_shortpath" = x; then
13277    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13278$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13279    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13280  fi
13281
13282  # Call helper function which possibly converts this using DOS-style short mode.
13283  # If so, the updated path is stored in $new_path.
13284
13285  input_path="$new_path"
13286  # Check if we need to convert this using DOS-style short mode. If the path
13287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13288  # take no chances and rewrite it.
13289  # Note: m4 eats our [], so we need to use [ and ] instead.
13290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13291  if test "x$has_forbidden_chars" != x; then
13292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13296      # Going to short mode and back again did indeed matter. Since short mode is
13297      # case insensitive, let's make it lowercase to improve readability.
13298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13299      # Now convert it back to Unix-stile (cygpath)
13300      input_path=`$CYGPATH -u "$shortmode_path"`
13301      new_path="$input_path"
13302    fi
13303  fi
13304
13305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13306  if test "x$test_cygdrive_prefix" = x; then
13307    # As a simple fix, exclude /usr/bin since it's not a real path.
13308    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13310      # a path prefixed by /cygdrive for fixpath to work.
13311      new_path="$CYGWIN_ROOT_PATH$input_path"
13312    fi
13313  fi
13314
13315
13316  if test "x$path" != "x$new_path"; then
13317    BOOT_JDK="$new_path"
13318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13319$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13320  fi
13321
13322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13323
13324  path="$BOOT_JDK"
13325  has_colon=`$ECHO $path | $GREP ^.:`
13326  new_path="$path"
13327  if test "x$has_colon" = x; then
13328    # Not in mixed or Windows style, start by that.
13329    new_path=`cmd //c echo $path`
13330  fi
13331
13332
13333  input_path="$new_path"
13334  # Check if we need to convert this using DOS-style short mode. If the path
13335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13336  # take no chances and rewrite it.
13337  # Note: m4 eats our [], so we need to use [ and ] instead.
13338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13339  if test "x$has_forbidden_chars" != x; then
13340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13342  fi
13343
13344
13345  windows_path="$new_path"
13346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13347    unix_path=`$CYGPATH -u "$windows_path"`
13348    new_path="$unix_path"
13349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13351    new_path="$unix_path"
13352  fi
13353
13354  if test "x$path" != "x$new_path"; then
13355    BOOT_JDK="$new_path"
13356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13357$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13358  fi
13359
13360  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13361  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13362
13363  else
13364    # We're on a posix platform. Hooray! :)
13365    path="$BOOT_JDK"
13366
13367    if test ! -f "$path" && test ! -d "$path"; then
13368      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13369    fi
13370
13371    has_space=`$ECHO "$path" | $GREP " "`
13372    if test "x$has_space" != x; then
13373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13374$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13375      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13376    fi
13377  fi
13378
13379              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13380$as_echo_n "checking for Boot JDK... " >&6; }
13381              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13382$as_echo "$BOOT_JDK" >&6; }
13383              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13384$as_echo_n "checking Boot JDK version... " >&6; }
13385              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13386              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13387$as_echo "$BOOT_JDK_VERSION" >&6; }
13388            fi # end check jdk version
13389          fi # end check rt.jar
13390        fi # end check javac
13391      fi # end check java
13392    fi # end check boot jdk found
13393  fi
13394
13395
13396  if test "x$BOOT_JDK_FOUND" = xno; then
13397    # Now execute the test
13398
13399  if test "x$ProgramFiles" != x; then
13400    VIRTUAL_DIR="$ProgramFiles/Java"
13401
13402  windows_path="$VIRTUAL_DIR"
13403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13404    unix_path=`$CYGPATH -u "$windows_path"`
13405    VIRTUAL_DIR="$unix_path"
13406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13408    VIRTUAL_DIR="$unix_path"
13409  fi
13410
13411
13412  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13413  BOOT_JDK_SUFFIX=""
13414  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13415  if test "x$ALL_JDKS_FOUND" != x; then
13416    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13417
13418  if test "x$BOOT_JDK_FOUND" = xno; then
13419    # Now execute the test
13420
13421        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13422        if test -d "$BOOT_JDK"; then
13423          BOOT_JDK_FOUND=maybe
13424          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13425$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13426        fi
13427
13428
13429    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13430    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13431      # Do we have a bin/java?
13432      if test ! -x "$BOOT_JDK/bin/java"; then
13433        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13435        BOOT_JDK_FOUND=no
13436      else
13437        # Do we have a bin/javac?
13438        if test ! -x "$BOOT_JDK/bin/javac"; then
13439          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13441          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13442$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13443          BOOT_JDK_FOUND=no
13444        else
13445          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13446          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13447            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13449            BOOT_JDK_FOUND=no
13450          else
13451            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13452            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13453
13454            # Extra M4 quote needed to protect [] in grep expression.
13455            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13456            if test "x$FOUND_VERSION_78" = x; then
13457              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13459              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13460$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13461              BOOT_JDK_FOUND=no
13462            else
13463              # We're done! :-)
13464              BOOT_JDK_FOUND=yes
13465
13466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13467
13468  # Input might be given as Windows format, start by converting to
13469  # unix format.
13470  path="$BOOT_JDK"
13471  new_path=`$CYGPATH -u "$path"`
13472
13473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13476  # "foo.exe" is OK but "foo" is an error.
13477  #
13478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13479  # It is also a way to make sure we got the proper file name for the real test later on.
13480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13481  if test "x$test_shortpath" = x; then
13482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13483$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13484    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13485  fi
13486
13487  # Call helper function which possibly converts this using DOS-style short mode.
13488  # If so, the updated path is stored in $new_path.
13489
13490  input_path="$new_path"
13491  # Check if we need to convert this using DOS-style short mode. If the path
13492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13493  # take no chances and rewrite it.
13494  # Note: m4 eats our [], so we need to use [ and ] instead.
13495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13496  if test "x$has_forbidden_chars" != x; then
13497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13501      # Going to short mode and back again did indeed matter. Since short mode is
13502      # case insensitive, let's make it lowercase to improve readability.
13503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13504      # Now convert it back to Unix-stile (cygpath)
13505      input_path=`$CYGPATH -u "$shortmode_path"`
13506      new_path="$input_path"
13507    fi
13508  fi
13509
13510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13511  if test "x$test_cygdrive_prefix" = x; then
13512    # As a simple fix, exclude /usr/bin since it's not a real path.
13513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13515      # a path prefixed by /cygdrive for fixpath to work.
13516      new_path="$CYGWIN_ROOT_PATH$input_path"
13517    fi
13518  fi
13519
13520
13521  if test "x$path" != "x$new_path"; then
13522    BOOT_JDK="$new_path"
13523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13525  fi
13526
13527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13528
13529  path="$BOOT_JDK"
13530  has_colon=`$ECHO $path | $GREP ^.:`
13531  new_path="$path"
13532  if test "x$has_colon" = x; then
13533    # Not in mixed or Windows style, start by that.
13534    new_path=`cmd //c echo $path`
13535  fi
13536
13537
13538  input_path="$new_path"
13539  # Check if we need to convert this using DOS-style short mode. If the path
13540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13541  # take no chances and rewrite it.
13542  # Note: m4 eats our [], so we need to use [ and ] instead.
13543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13544  if test "x$has_forbidden_chars" != x; then
13545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13547  fi
13548
13549
13550  windows_path="$new_path"
13551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13552    unix_path=`$CYGPATH -u "$windows_path"`
13553    new_path="$unix_path"
13554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13556    new_path="$unix_path"
13557  fi
13558
13559  if test "x$path" != "x$new_path"; then
13560    BOOT_JDK="$new_path"
13561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13563  fi
13564
13565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13567
13568  else
13569    # We're on a posix platform. Hooray! :)
13570    path="$BOOT_JDK"
13571
13572    if test ! -f "$path" && test ! -d "$path"; then
13573      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13574    fi
13575
13576    has_space=`$ECHO "$path" | $GREP " "`
13577    if test "x$has_space" != x; then
13578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13579$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13580      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13581    fi
13582  fi
13583
13584              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13585$as_echo_n "checking for Boot JDK... " >&6; }
13586              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13587$as_echo "$BOOT_JDK" >&6; }
13588              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13589$as_echo_n "checking Boot JDK version... " >&6; }
13590              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13591              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13592$as_echo "$BOOT_JDK_VERSION" >&6; }
13593            fi # end check jdk version
13594          fi # end check rt.jar
13595        fi # end check javac
13596      fi # end check java
13597    fi # end check boot jdk found
13598  fi
13599
13600    done
13601  fi
13602
13603  fi
13604
13605
13606    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13607    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13608      # Do we have a bin/java?
13609      if test ! -x "$BOOT_JDK/bin/java"; then
13610        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13612        BOOT_JDK_FOUND=no
13613      else
13614        # Do we have a bin/javac?
13615        if test ! -x "$BOOT_JDK/bin/javac"; then
13616          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13618          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13619$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13620          BOOT_JDK_FOUND=no
13621        else
13622          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13623          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13624            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13626            BOOT_JDK_FOUND=no
13627          else
13628            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13629            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13630
13631            # Extra M4 quote needed to protect [] in grep expression.
13632            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13633            if test "x$FOUND_VERSION_78" = x; then
13634              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13636              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13637$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13638              BOOT_JDK_FOUND=no
13639            else
13640              # We're done! :-)
13641              BOOT_JDK_FOUND=yes
13642
13643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13644
13645  # Input might be given as Windows format, start by converting to
13646  # unix format.
13647  path="$BOOT_JDK"
13648  new_path=`$CYGPATH -u "$path"`
13649
13650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13653  # "foo.exe" is OK but "foo" is an error.
13654  #
13655  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13656  # It is also a way to make sure we got the proper file name for the real test later on.
13657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13658  if test "x$test_shortpath" = x; then
13659    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13660$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13661    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13662  fi
13663
13664  # Call helper function which possibly converts this using DOS-style short mode.
13665  # If so, the updated path is stored in $new_path.
13666
13667  input_path="$new_path"
13668  # Check if we need to convert this using DOS-style short mode. If the path
13669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13670  # take no chances and rewrite it.
13671  # Note: m4 eats our [], so we need to use [ and ] instead.
13672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13673  if test "x$has_forbidden_chars" != x; then
13674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13678      # Going to short mode and back again did indeed matter. Since short mode is
13679      # case insensitive, let's make it lowercase to improve readability.
13680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13681      # Now convert it back to Unix-stile (cygpath)
13682      input_path=`$CYGPATH -u "$shortmode_path"`
13683      new_path="$input_path"
13684    fi
13685  fi
13686
13687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13688  if test "x$test_cygdrive_prefix" = x; then
13689    # As a simple fix, exclude /usr/bin since it's not a real path.
13690    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13692      # a path prefixed by /cygdrive for fixpath to work.
13693      new_path="$CYGWIN_ROOT_PATH$input_path"
13694    fi
13695  fi
13696
13697
13698  if test "x$path" != "x$new_path"; then
13699    BOOT_JDK="$new_path"
13700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13701$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13702  fi
13703
13704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13705
13706  path="$BOOT_JDK"
13707  has_colon=`$ECHO $path | $GREP ^.:`
13708  new_path="$path"
13709  if test "x$has_colon" = x; then
13710    # Not in mixed or Windows style, start by that.
13711    new_path=`cmd //c echo $path`
13712  fi
13713
13714
13715  input_path="$new_path"
13716  # Check if we need to convert this using DOS-style short mode. If the path
13717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13718  # take no chances and rewrite it.
13719  # Note: m4 eats our [], so we need to use [ and ] instead.
13720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13721  if test "x$has_forbidden_chars" != x; then
13722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13724  fi
13725
13726
13727  windows_path="$new_path"
13728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13729    unix_path=`$CYGPATH -u "$windows_path"`
13730    new_path="$unix_path"
13731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13733    new_path="$unix_path"
13734  fi
13735
13736  if test "x$path" != "x$new_path"; then
13737    BOOT_JDK="$new_path"
13738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13740  fi
13741
13742  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13743  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13744
13745  else
13746    # We're on a posix platform. Hooray! :)
13747    path="$BOOT_JDK"
13748
13749    if test ! -f "$path" && test ! -d "$path"; then
13750      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13751    fi
13752
13753    has_space=`$ECHO "$path" | $GREP " "`
13754    if test "x$has_space" != x; then
13755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13756$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13757      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13758    fi
13759  fi
13760
13761              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13762$as_echo_n "checking for Boot JDK... " >&6; }
13763              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13764$as_echo "$BOOT_JDK" >&6; }
13765              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13766$as_echo_n "checking Boot JDK version... " >&6; }
13767              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13768              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13769$as_echo "$BOOT_JDK_VERSION" >&6; }
13770            fi # end check jdk version
13771          fi # end check rt.jar
13772        fi # end check javac
13773      fi # end check java
13774    fi # end check boot jdk found
13775  fi
13776
13777
13778  if test "x$BOOT_JDK_FOUND" = xno; then
13779    # Now execute the test
13780
13781  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13782  BOOT_JDK_SUFFIX=""
13783  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13784  if test "x$ALL_JDKS_FOUND" != x; then
13785    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13786
13787  if test "x$BOOT_JDK_FOUND" = xno; then
13788    # Now execute the test
13789
13790        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13791        if test -d "$BOOT_JDK"; then
13792          BOOT_JDK_FOUND=maybe
13793          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13794$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13795        fi
13796
13797
13798    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13799    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13800      # Do we have a bin/java?
13801      if test ! -x "$BOOT_JDK/bin/java"; then
13802        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13804        BOOT_JDK_FOUND=no
13805      else
13806        # Do we have a bin/javac?
13807        if test ! -x "$BOOT_JDK/bin/javac"; then
13808          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13810          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13811$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13812          BOOT_JDK_FOUND=no
13813        else
13814          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13815          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13816            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13818            BOOT_JDK_FOUND=no
13819          else
13820            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13821            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13822
13823            # Extra M4 quote needed to protect [] in grep expression.
13824            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13825            if test "x$FOUND_VERSION_78" = x; then
13826              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13828              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13829$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13830              BOOT_JDK_FOUND=no
13831            else
13832              # We're done! :-)
13833              BOOT_JDK_FOUND=yes
13834
13835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13836
13837  # Input might be given as Windows format, start by converting to
13838  # unix format.
13839  path="$BOOT_JDK"
13840  new_path=`$CYGPATH -u "$path"`
13841
13842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13845  # "foo.exe" is OK but "foo" is an error.
13846  #
13847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13848  # It is also a way to make sure we got the proper file name for the real test later on.
13849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13850  if test "x$test_shortpath" = x; then
13851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13852$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13853    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13854  fi
13855
13856  # Call helper function which possibly converts this using DOS-style short mode.
13857  # If so, the updated path is stored in $new_path.
13858
13859  input_path="$new_path"
13860  # Check if we need to convert this using DOS-style short mode. If the path
13861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13862  # take no chances and rewrite it.
13863  # Note: m4 eats our [], so we need to use [ and ] instead.
13864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13865  if test "x$has_forbidden_chars" != x; then
13866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13870      # Going to short mode and back again did indeed matter. Since short mode is
13871      # case insensitive, let's make it lowercase to improve readability.
13872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13873      # Now convert it back to Unix-stile (cygpath)
13874      input_path=`$CYGPATH -u "$shortmode_path"`
13875      new_path="$input_path"
13876    fi
13877  fi
13878
13879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13880  if test "x$test_cygdrive_prefix" = x; then
13881    # As a simple fix, exclude /usr/bin since it's not a real path.
13882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13884      # a path prefixed by /cygdrive for fixpath to work.
13885      new_path="$CYGWIN_ROOT_PATH$input_path"
13886    fi
13887  fi
13888
13889
13890  if test "x$path" != "x$new_path"; then
13891    BOOT_JDK="$new_path"
13892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13894  fi
13895
13896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13897
13898  path="$BOOT_JDK"
13899  has_colon=`$ECHO $path | $GREP ^.:`
13900  new_path="$path"
13901  if test "x$has_colon" = x; then
13902    # Not in mixed or Windows style, start by that.
13903    new_path=`cmd //c echo $path`
13904  fi
13905
13906
13907  input_path="$new_path"
13908  # Check if we need to convert this using DOS-style short mode. If the path
13909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13910  # take no chances and rewrite it.
13911  # Note: m4 eats our [], so we need to use [ and ] instead.
13912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13913  if test "x$has_forbidden_chars" != x; then
13914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13916  fi
13917
13918
13919  windows_path="$new_path"
13920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13921    unix_path=`$CYGPATH -u "$windows_path"`
13922    new_path="$unix_path"
13923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13925    new_path="$unix_path"
13926  fi
13927
13928  if test "x$path" != "x$new_path"; then
13929    BOOT_JDK="$new_path"
13930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13931$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13932  fi
13933
13934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13936
13937  else
13938    # We're on a posix platform. Hooray! :)
13939    path="$BOOT_JDK"
13940
13941    if test ! -f "$path" && test ! -d "$path"; then
13942      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13943    fi
13944
13945    has_space=`$ECHO "$path" | $GREP " "`
13946    if test "x$has_space" != x; then
13947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13948$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13949      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13950    fi
13951  fi
13952
13953              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13954$as_echo_n "checking for Boot JDK... " >&6; }
13955              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13956$as_echo "$BOOT_JDK" >&6; }
13957              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13958$as_echo_n "checking Boot JDK version... " >&6; }
13959              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13960              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13961$as_echo "$BOOT_JDK_VERSION" >&6; }
13962            fi # end check jdk version
13963          fi # end check rt.jar
13964        fi # end check javac
13965      fi # end check java
13966    fi # end check boot jdk found
13967  fi
13968
13969    done
13970  fi
13971
13972
13973    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13974    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13975      # Do we have a bin/java?
13976      if test ! -x "$BOOT_JDK/bin/java"; then
13977        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13979        BOOT_JDK_FOUND=no
13980      else
13981        # Do we have a bin/javac?
13982        if test ! -x "$BOOT_JDK/bin/javac"; then
13983          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13985          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13986$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13987          BOOT_JDK_FOUND=no
13988        else
13989          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13990          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13991            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13993            BOOT_JDK_FOUND=no
13994          else
13995            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13996            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13997
13998            # Extra M4 quote needed to protect [] in grep expression.
13999            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14000            if test "x$FOUND_VERSION_78" = x; then
14001              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14003              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14004$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14005              BOOT_JDK_FOUND=no
14006            else
14007              # We're done! :-)
14008              BOOT_JDK_FOUND=yes
14009
14010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14011
14012  # Input might be given as Windows format, start by converting to
14013  # unix format.
14014  path="$BOOT_JDK"
14015  new_path=`$CYGPATH -u "$path"`
14016
14017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14020  # "foo.exe" is OK but "foo" is an error.
14021  #
14022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14023  # It is also a way to make sure we got the proper file name for the real test later on.
14024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14025  if test "x$test_shortpath" = x; then
14026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14027$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14028    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14029  fi
14030
14031  # Call helper function which possibly converts this using DOS-style short mode.
14032  # If so, the updated path is stored in $new_path.
14033
14034  input_path="$new_path"
14035  # Check if we need to convert this using DOS-style short mode. If the path
14036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14037  # take no chances and rewrite it.
14038  # Note: m4 eats our [], so we need to use [ and ] instead.
14039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14040  if test "x$has_forbidden_chars" != x; then
14041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14045      # Going to short mode and back again did indeed matter. Since short mode is
14046      # case insensitive, let's make it lowercase to improve readability.
14047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14048      # Now convert it back to Unix-stile (cygpath)
14049      input_path=`$CYGPATH -u "$shortmode_path"`
14050      new_path="$input_path"
14051    fi
14052  fi
14053
14054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14055  if test "x$test_cygdrive_prefix" = x; then
14056    # As a simple fix, exclude /usr/bin since it's not a real path.
14057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14059      # a path prefixed by /cygdrive for fixpath to work.
14060      new_path="$CYGWIN_ROOT_PATH$input_path"
14061    fi
14062  fi
14063
14064
14065  if test "x$path" != "x$new_path"; then
14066    BOOT_JDK="$new_path"
14067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14069  fi
14070
14071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14072
14073  path="$BOOT_JDK"
14074  has_colon=`$ECHO $path | $GREP ^.:`
14075  new_path="$path"
14076  if test "x$has_colon" = x; then
14077    # Not in mixed or Windows style, start by that.
14078    new_path=`cmd //c echo $path`
14079  fi
14080
14081
14082  input_path="$new_path"
14083  # Check if we need to convert this using DOS-style short mode. If the path
14084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14085  # take no chances and rewrite it.
14086  # Note: m4 eats our [], so we need to use [ and ] instead.
14087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14088  if test "x$has_forbidden_chars" != x; then
14089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14091  fi
14092
14093
14094  windows_path="$new_path"
14095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14096    unix_path=`$CYGPATH -u "$windows_path"`
14097    new_path="$unix_path"
14098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14100    new_path="$unix_path"
14101  fi
14102
14103  if test "x$path" != "x$new_path"; then
14104    BOOT_JDK="$new_path"
14105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14106$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14107  fi
14108
14109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14111
14112  else
14113    # We're on a posix platform. Hooray! :)
14114    path="$BOOT_JDK"
14115
14116    if test ! -f "$path" && test ! -d "$path"; then
14117      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14118    fi
14119
14120    has_space=`$ECHO "$path" | $GREP " "`
14121    if test "x$has_space" != x; then
14122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14123$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14124      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14125    fi
14126  fi
14127
14128              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14129$as_echo_n "checking for Boot JDK... " >&6; }
14130              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14131$as_echo "$BOOT_JDK" >&6; }
14132              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14133$as_echo_n "checking Boot JDK version... " >&6; }
14134              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14135              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14136$as_echo "$BOOT_JDK_VERSION" >&6; }
14137            fi # end check jdk version
14138          fi # end check rt.jar
14139        fi # end check javac
14140      fi # end check java
14141    fi # end check boot jdk found
14142  fi
14143
14144  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14145
14146  if test "x$BOOT_JDK_FOUND" = xno; then
14147    # Now execute the test
14148
14149  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14150  BOOT_JDK_SUFFIX="/Contents/Home"
14151  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14152  if test "x$ALL_JDKS_FOUND" != x; then
14153    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14154
14155  if test "x$BOOT_JDK_FOUND" = xno; then
14156    # Now execute the test
14157
14158        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14159        if test -d "$BOOT_JDK"; then
14160          BOOT_JDK_FOUND=maybe
14161          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14162$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14163        fi
14164
14165
14166    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14167    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14168      # Do we have a bin/java?
14169      if test ! -x "$BOOT_JDK/bin/java"; then
14170        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14172        BOOT_JDK_FOUND=no
14173      else
14174        # Do we have a bin/javac?
14175        if test ! -x "$BOOT_JDK/bin/javac"; then
14176          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14178          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14179$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14180          BOOT_JDK_FOUND=no
14181        else
14182          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14183          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14184            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14186            BOOT_JDK_FOUND=no
14187          else
14188            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14189            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14190
14191            # Extra M4 quote needed to protect [] in grep expression.
14192            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14193            if test "x$FOUND_VERSION_78" = x; then
14194              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14196              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14197$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14198              BOOT_JDK_FOUND=no
14199            else
14200              # We're done! :-)
14201              BOOT_JDK_FOUND=yes
14202
14203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14204
14205  # Input might be given as Windows format, start by converting to
14206  # unix format.
14207  path="$BOOT_JDK"
14208  new_path=`$CYGPATH -u "$path"`
14209
14210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14213  # "foo.exe" is OK but "foo" is an error.
14214  #
14215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14216  # It is also a way to make sure we got the proper file name for the real test later on.
14217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14218  if test "x$test_shortpath" = x; then
14219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14220$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14221    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14222  fi
14223
14224  # Call helper function which possibly converts this using DOS-style short mode.
14225  # If so, the updated path is stored in $new_path.
14226
14227  input_path="$new_path"
14228  # Check if we need to convert this using DOS-style short mode. If the path
14229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14230  # take no chances and rewrite it.
14231  # Note: m4 eats our [], so we need to use [ and ] instead.
14232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14233  if test "x$has_forbidden_chars" != x; then
14234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14238      # Going to short mode and back again did indeed matter. Since short mode is
14239      # case insensitive, let's make it lowercase to improve readability.
14240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14241      # Now convert it back to Unix-stile (cygpath)
14242      input_path=`$CYGPATH -u "$shortmode_path"`
14243      new_path="$input_path"
14244    fi
14245  fi
14246
14247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14248  if test "x$test_cygdrive_prefix" = x; then
14249    # As a simple fix, exclude /usr/bin since it's not a real path.
14250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14252      # a path prefixed by /cygdrive for fixpath to work.
14253      new_path="$CYGWIN_ROOT_PATH$input_path"
14254    fi
14255  fi
14256
14257
14258  if test "x$path" != "x$new_path"; then
14259    BOOT_JDK="$new_path"
14260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14261$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14262  fi
14263
14264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14265
14266  path="$BOOT_JDK"
14267  has_colon=`$ECHO $path | $GREP ^.:`
14268  new_path="$path"
14269  if test "x$has_colon" = x; then
14270    # Not in mixed or Windows style, start by that.
14271    new_path=`cmd //c echo $path`
14272  fi
14273
14274
14275  input_path="$new_path"
14276  # Check if we need to convert this using DOS-style short mode. If the path
14277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14278  # take no chances and rewrite it.
14279  # Note: m4 eats our [], so we need to use [ and ] instead.
14280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14281  if test "x$has_forbidden_chars" != x; then
14282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14284  fi
14285
14286
14287  windows_path="$new_path"
14288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14289    unix_path=`$CYGPATH -u "$windows_path"`
14290    new_path="$unix_path"
14291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14293    new_path="$unix_path"
14294  fi
14295
14296  if test "x$path" != "x$new_path"; then
14297    BOOT_JDK="$new_path"
14298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14299$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14300  fi
14301
14302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14304
14305  else
14306    # We're on a posix platform. Hooray! :)
14307    path="$BOOT_JDK"
14308
14309    if test ! -f "$path" && test ! -d "$path"; then
14310      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14311    fi
14312
14313    has_space=`$ECHO "$path" | $GREP " "`
14314    if test "x$has_space" != x; then
14315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14317      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14318    fi
14319  fi
14320
14321              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14322$as_echo_n "checking for Boot JDK... " >&6; }
14323              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14324$as_echo "$BOOT_JDK" >&6; }
14325              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14326$as_echo_n "checking Boot JDK version... " >&6; }
14327              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14328              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14329$as_echo "$BOOT_JDK_VERSION" >&6; }
14330            fi # end check jdk version
14331          fi # end check rt.jar
14332        fi # end check javac
14333      fi # end check java
14334    fi # end check boot jdk found
14335  fi
14336
14337    done
14338  fi
14339
14340
14341    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14342    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14343      # Do we have a bin/java?
14344      if test ! -x "$BOOT_JDK/bin/java"; then
14345        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14347        BOOT_JDK_FOUND=no
14348      else
14349        # Do we have a bin/javac?
14350        if test ! -x "$BOOT_JDK/bin/javac"; then
14351          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14353          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14354$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14355          BOOT_JDK_FOUND=no
14356        else
14357          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14358          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14359            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14361            BOOT_JDK_FOUND=no
14362          else
14363            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14364            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14365
14366            # Extra M4 quote needed to protect [] in grep expression.
14367            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14368            if test "x$FOUND_VERSION_78" = x; then
14369              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14371              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14372$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14373              BOOT_JDK_FOUND=no
14374            else
14375              # We're done! :-)
14376              BOOT_JDK_FOUND=yes
14377
14378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14379
14380  # Input might be given as Windows format, start by converting to
14381  # unix format.
14382  path="$BOOT_JDK"
14383  new_path=`$CYGPATH -u "$path"`
14384
14385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14388  # "foo.exe" is OK but "foo" is an error.
14389  #
14390  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14391  # It is also a way to make sure we got the proper file name for the real test later on.
14392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14393  if test "x$test_shortpath" = x; then
14394    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14396    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14397  fi
14398
14399  # Call helper function which possibly converts this using DOS-style short mode.
14400  # If so, the updated path is stored in $new_path.
14401
14402  input_path="$new_path"
14403  # Check if we need to convert this using DOS-style short mode. If the path
14404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14405  # take no chances and rewrite it.
14406  # Note: m4 eats our [], so we need to use [ and ] instead.
14407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14408  if test "x$has_forbidden_chars" != x; then
14409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14413      # Going to short mode and back again did indeed matter. Since short mode is
14414      # case insensitive, let's make it lowercase to improve readability.
14415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14416      # Now convert it back to Unix-stile (cygpath)
14417      input_path=`$CYGPATH -u "$shortmode_path"`
14418      new_path="$input_path"
14419    fi
14420  fi
14421
14422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14423  if test "x$test_cygdrive_prefix" = x; then
14424    # As a simple fix, exclude /usr/bin since it's not a real path.
14425    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14427      # a path prefixed by /cygdrive for fixpath to work.
14428      new_path="$CYGWIN_ROOT_PATH$input_path"
14429    fi
14430  fi
14431
14432
14433  if test "x$path" != "x$new_path"; then
14434    BOOT_JDK="$new_path"
14435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14436$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14437  fi
14438
14439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14440
14441  path="$BOOT_JDK"
14442  has_colon=`$ECHO $path | $GREP ^.:`
14443  new_path="$path"
14444  if test "x$has_colon" = x; then
14445    # Not in mixed or Windows style, start by that.
14446    new_path=`cmd //c echo $path`
14447  fi
14448
14449
14450  input_path="$new_path"
14451  # Check if we need to convert this using DOS-style short mode. If the path
14452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14453  # take no chances and rewrite it.
14454  # Note: m4 eats our [], so we need to use [ and ] instead.
14455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14456  if test "x$has_forbidden_chars" != x; then
14457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14459  fi
14460
14461
14462  windows_path="$new_path"
14463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14464    unix_path=`$CYGPATH -u "$windows_path"`
14465    new_path="$unix_path"
14466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14468    new_path="$unix_path"
14469  fi
14470
14471  if test "x$path" != "x$new_path"; then
14472    BOOT_JDK="$new_path"
14473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14474$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14475  fi
14476
14477  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14478  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14479
14480  else
14481    # We're on a posix platform. Hooray! :)
14482    path="$BOOT_JDK"
14483
14484    if test ! -f "$path" && test ! -d "$path"; then
14485      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14486    fi
14487
14488    has_space=`$ECHO "$path" | $GREP " "`
14489    if test "x$has_space" != x; then
14490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14491$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14492      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14493    fi
14494  fi
14495
14496              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14497$as_echo_n "checking for Boot JDK... " >&6; }
14498              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14499$as_echo "$BOOT_JDK" >&6; }
14500              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14501$as_echo_n "checking Boot JDK version... " >&6; }
14502              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14503              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14504$as_echo "$BOOT_JDK_VERSION" >&6; }
14505            fi # end check jdk version
14506          fi # end check rt.jar
14507        fi # end check javac
14508      fi # end check java
14509    fi # end check boot jdk found
14510  fi
14511
14512
14513  if test "x$BOOT_JDK_FOUND" = xno; then
14514    # Now execute the test
14515
14516  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14517  BOOT_JDK_SUFFIX="/Contents/Home"
14518  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14519  if test "x$ALL_JDKS_FOUND" != x; then
14520    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14521
14522  if test "x$BOOT_JDK_FOUND" = xno; then
14523    # Now execute the test
14524
14525        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14526        if test -d "$BOOT_JDK"; then
14527          BOOT_JDK_FOUND=maybe
14528          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14529$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14530        fi
14531
14532
14533    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14534    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14535      # Do we have a bin/java?
14536      if test ! -x "$BOOT_JDK/bin/java"; then
14537        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14539        BOOT_JDK_FOUND=no
14540      else
14541        # Do we have a bin/javac?
14542        if test ! -x "$BOOT_JDK/bin/javac"; then
14543          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14545          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14546$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14547          BOOT_JDK_FOUND=no
14548        else
14549          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14550          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14551            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14553            BOOT_JDK_FOUND=no
14554          else
14555            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14556            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14557
14558            # Extra M4 quote needed to protect [] in grep expression.
14559            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14560            if test "x$FOUND_VERSION_78" = x; then
14561              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14563              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14564$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14565              BOOT_JDK_FOUND=no
14566            else
14567              # We're done! :-)
14568              BOOT_JDK_FOUND=yes
14569
14570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14571
14572  # Input might be given as Windows format, start by converting to
14573  # unix format.
14574  path="$BOOT_JDK"
14575  new_path=`$CYGPATH -u "$path"`
14576
14577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14580  # "foo.exe" is OK but "foo" is an error.
14581  #
14582  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14583  # It is also a way to make sure we got the proper file name for the real test later on.
14584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14585  if test "x$test_shortpath" = x; then
14586    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14587$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14588    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14589  fi
14590
14591  # Call helper function which possibly converts this using DOS-style short mode.
14592  # If so, the updated path is stored in $new_path.
14593
14594  input_path="$new_path"
14595  # Check if we need to convert this using DOS-style short mode. If the path
14596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14597  # take no chances and rewrite it.
14598  # Note: m4 eats our [], so we need to use [ and ] instead.
14599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14600  if test "x$has_forbidden_chars" != x; then
14601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14605      # Going to short mode and back again did indeed matter. Since short mode is
14606      # case insensitive, let's make it lowercase to improve readability.
14607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14608      # Now convert it back to Unix-stile (cygpath)
14609      input_path=`$CYGPATH -u "$shortmode_path"`
14610      new_path="$input_path"
14611    fi
14612  fi
14613
14614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14615  if test "x$test_cygdrive_prefix" = x; then
14616    # As a simple fix, exclude /usr/bin since it's not a real path.
14617    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14619      # a path prefixed by /cygdrive for fixpath to work.
14620      new_path="$CYGWIN_ROOT_PATH$input_path"
14621    fi
14622  fi
14623
14624
14625  if test "x$path" != "x$new_path"; then
14626    BOOT_JDK="$new_path"
14627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14628$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14629  fi
14630
14631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14632
14633  path="$BOOT_JDK"
14634  has_colon=`$ECHO $path | $GREP ^.:`
14635  new_path="$path"
14636  if test "x$has_colon" = x; then
14637    # Not in mixed or Windows style, start by that.
14638    new_path=`cmd //c echo $path`
14639  fi
14640
14641
14642  input_path="$new_path"
14643  # Check if we need to convert this using DOS-style short mode. If the path
14644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14645  # take no chances and rewrite it.
14646  # Note: m4 eats our [], so we need to use [ and ] instead.
14647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14648  if test "x$has_forbidden_chars" != x; then
14649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14651  fi
14652
14653
14654  windows_path="$new_path"
14655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14656    unix_path=`$CYGPATH -u "$windows_path"`
14657    new_path="$unix_path"
14658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14660    new_path="$unix_path"
14661  fi
14662
14663  if test "x$path" != "x$new_path"; then
14664    BOOT_JDK="$new_path"
14665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14666$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14667  fi
14668
14669  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14670  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14671
14672  else
14673    # We're on a posix platform. Hooray! :)
14674    path="$BOOT_JDK"
14675
14676    if test ! -f "$path" && test ! -d "$path"; then
14677      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14678    fi
14679
14680    has_space=`$ECHO "$path" | $GREP " "`
14681    if test "x$has_space" != x; then
14682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14683$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14684      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14685    fi
14686  fi
14687
14688              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14689$as_echo_n "checking for Boot JDK... " >&6; }
14690              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14691$as_echo "$BOOT_JDK" >&6; }
14692              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14693$as_echo_n "checking Boot JDK version... " >&6; }
14694              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14695              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14696$as_echo "$BOOT_JDK_VERSION" >&6; }
14697            fi # end check jdk version
14698          fi # end check rt.jar
14699        fi # end check javac
14700      fi # end check java
14701    fi # end check boot jdk found
14702  fi
14703
14704    done
14705  fi
14706
14707
14708    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14709    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14710      # Do we have a bin/java?
14711      if test ! -x "$BOOT_JDK/bin/java"; then
14712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14714        BOOT_JDK_FOUND=no
14715      else
14716        # Do we have a bin/javac?
14717        if test ! -x "$BOOT_JDK/bin/javac"; then
14718          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14720          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14721$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14722          BOOT_JDK_FOUND=no
14723        else
14724          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14725          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14728            BOOT_JDK_FOUND=no
14729          else
14730            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14731            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14732
14733            # Extra M4 quote needed to protect [] in grep expression.
14734            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14735            if test "x$FOUND_VERSION_78" = x; then
14736              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14738              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14739$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14740              BOOT_JDK_FOUND=no
14741            else
14742              # We're done! :-)
14743              BOOT_JDK_FOUND=yes
14744
14745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14746
14747  # Input might be given as Windows format, start by converting to
14748  # unix format.
14749  path="$BOOT_JDK"
14750  new_path=`$CYGPATH -u "$path"`
14751
14752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14755  # "foo.exe" is OK but "foo" is an error.
14756  #
14757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14758  # It is also a way to make sure we got the proper file name for the real test later on.
14759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14760  if test "x$test_shortpath" = x; then
14761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14763    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14764  fi
14765
14766  # Call helper function which possibly converts this using DOS-style short mode.
14767  # If so, the updated path is stored in $new_path.
14768
14769  input_path="$new_path"
14770  # Check if we need to convert this using DOS-style short mode. If the path
14771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14772  # take no chances and rewrite it.
14773  # Note: m4 eats our [], so we need to use [ and ] instead.
14774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14775  if test "x$has_forbidden_chars" != x; then
14776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14780      # Going to short mode and back again did indeed matter. Since short mode is
14781      # case insensitive, let's make it lowercase to improve readability.
14782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14783      # Now convert it back to Unix-stile (cygpath)
14784      input_path=`$CYGPATH -u "$shortmode_path"`
14785      new_path="$input_path"
14786    fi
14787  fi
14788
14789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14790  if test "x$test_cygdrive_prefix" = x; then
14791    # As a simple fix, exclude /usr/bin since it's not a real path.
14792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14794      # a path prefixed by /cygdrive for fixpath to work.
14795      new_path="$CYGWIN_ROOT_PATH$input_path"
14796    fi
14797  fi
14798
14799
14800  if test "x$path" != "x$new_path"; then
14801    BOOT_JDK="$new_path"
14802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14804  fi
14805
14806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14807
14808  path="$BOOT_JDK"
14809  has_colon=`$ECHO $path | $GREP ^.:`
14810  new_path="$path"
14811  if test "x$has_colon" = x; then
14812    # Not in mixed or Windows style, start by that.
14813    new_path=`cmd //c echo $path`
14814  fi
14815
14816
14817  input_path="$new_path"
14818  # Check if we need to convert this using DOS-style short mode. If the path
14819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14820  # take no chances and rewrite it.
14821  # Note: m4 eats our [], so we need to use [ and ] instead.
14822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14823  if test "x$has_forbidden_chars" != x; then
14824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14826  fi
14827
14828
14829  windows_path="$new_path"
14830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14831    unix_path=`$CYGPATH -u "$windows_path"`
14832    new_path="$unix_path"
14833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14835    new_path="$unix_path"
14836  fi
14837
14838  if test "x$path" != "x$new_path"; then
14839    BOOT_JDK="$new_path"
14840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14842  fi
14843
14844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14846
14847  else
14848    # We're on a posix platform. Hooray! :)
14849    path="$BOOT_JDK"
14850
14851    if test ! -f "$path" && test ! -d "$path"; then
14852      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14853    fi
14854
14855    has_space=`$ECHO "$path" | $GREP " "`
14856    if test "x$has_space" != x; then
14857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14858$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14859      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14860    fi
14861  fi
14862
14863              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14864$as_echo_n "checking for Boot JDK... " >&6; }
14865              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14866$as_echo "$BOOT_JDK" >&6; }
14867              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14868$as_echo_n "checking Boot JDK version... " >&6; }
14869              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14870              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14871$as_echo "$BOOT_JDK_VERSION" >&6; }
14872            fi # end check jdk version
14873          fi # end check rt.jar
14874        fi # end check javac
14875      fi # end check java
14876    fi # end check boot jdk found
14877  fi
14878
14879  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14880
14881  if test "x$BOOT_JDK_FOUND" = xno; then
14882    # Now execute the test
14883
14884  BOOT_JDK_PREFIX="/usr/lib/jvm"
14885  BOOT_JDK_SUFFIX=""
14886  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14887  if test "x$ALL_JDKS_FOUND" != x; then
14888    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14889
14890  if test "x$BOOT_JDK_FOUND" = xno; then
14891    # Now execute the test
14892
14893        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14894        if test -d "$BOOT_JDK"; then
14895          BOOT_JDK_FOUND=maybe
14896          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14897$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14898        fi
14899
14900
14901    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14902    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14903      # Do we have a bin/java?
14904      if test ! -x "$BOOT_JDK/bin/java"; then
14905        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14907        BOOT_JDK_FOUND=no
14908      else
14909        # Do we have a bin/javac?
14910        if test ! -x "$BOOT_JDK/bin/javac"; then
14911          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14913          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14914$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14915          BOOT_JDK_FOUND=no
14916        else
14917          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14918          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14919            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14921            BOOT_JDK_FOUND=no
14922          else
14923            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14924            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14925
14926            # Extra M4 quote needed to protect [] in grep expression.
14927            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14928            if test "x$FOUND_VERSION_78" = x; then
14929              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14931              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14932$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14933              BOOT_JDK_FOUND=no
14934            else
14935              # We're done! :-)
14936              BOOT_JDK_FOUND=yes
14937
14938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14939
14940  # Input might be given as Windows format, start by converting to
14941  # unix format.
14942  path="$BOOT_JDK"
14943  new_path=`$CYGPATH -u "$path"`
14944
14945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14948  # "foo.exe" is OK but "foo" is an error.
14949  #
14950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14951  # It is also a way to make sure we got the proper file name for the real test later on.
14952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14953  if test "x$test_shortpath" = x; then
14954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14955$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14956    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14957  fi
14958
14959  # Call helper function which possibly converts this using DOS-style short mode.
14960  # If so, the updated path is stored in $new_path.
14961
14962  input_path="$new_path"
14963  # Check if we need to convert this using DOS-style short mode. If the path
14964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14965  # take no chances and rewrite it.
14966  # Note: m4 eats our [], so we need to use [ and ] instead.
14967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14968  if test "x$has_forbidden_chars" != x; then
14969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14973      # Going to short mode and back again did indeed matter. Since short mode is
14974      # case insensitive, let's make it lowercase to improve readability.
14975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14976      # Now convert it back to Unix-stile (cygpath)
14977      input_path=`$CYGPATH -u "$shortmode_path"`
14978      new_path="$input_path"
14979    fi
14980  fi
14981
14982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14983  if test "x$test_cygdrive_prefix" = x; then
14984    # As a simple fix, exclude /usr/bin since it's not a real path.
14985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14987      # a path prefixed by /cygdrive for fixpath to work.
14988      new_path="$CYGWIN_ROOT_PATH$input_path"
14989    fi
14990  fi
14991
14992
14993  if test "x$path" != "x$new_path"; then
14994    BOOT_JDK="$new_path"
14995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14997  fi
14998
14999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15000
15001  path="$BOOT_JDK"
15002  has_colon=`$ECHO $path | $GREP ^.:`
15003  new_path="$path"
15004  if test "x$has_colon" = x; then
15005    # Not in mixed or Windows style, start by that.
15006    new_path=`cmd //c echo $path`
15007  fi
15008
15009
15010  input_path="$new_path"
15011  # Check if we need to convert this using DOS-style short mode. If the path
15012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15013  # take no chances and rewrite it.
15014  # Note: m4 eats our [], so we need to use [ and ] instead.
15015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15016  if test "x$has_forbidden_chars" != x; then
15017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15019  fi
15020
15021
15022  windows_path="$new_path"
15023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15024    unix_path=`$CYGPATH -u "$windows_path"`
15025    new_path="$unix_path"
15026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15028    new_path="$unix_path"
15029  fi
15030
15031  if test "x$path" != "x$new_path"; then
15032    BOOT_JDK="$new_path"
15033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15035  fi
15036
15037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15039
15040  else
15041    # We're on a posix platform. Hooray! :)
15042    path="$BOOT_JDK"
15043
15044    if test ! -f "$path" && test ! -d "$path"; then
15045      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15046    fi
15047
15048    has_space=`$ECHO "$path" | $GREP " "`
15049    if test "x$has_space" != x; then
15050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15051$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15052      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15053    fi
15054  fi
15055
15056              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15057$as_echo_n "checking for Boot JDK... " >&6; }
15058              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15059$as_echo "$BOOT_JDK" >&6; }
15060              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15061$as_echo_n "checking Boot JDK version... " >&6; }
15062              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15063              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15064$as_echo "$BOOT_JDK_VERSION" >&6; }
15065            fi # end check jdk version
15066          fi # end check rt.jar
15067        fi # end check javac
15068      fi # end check java
15069    fi # end check boot jdk found
15070  fi
15071
15072    done
15073  fi
15074
15075
15076    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15077    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15078      # Do we have a bin/java?
15079      if test ! -x "$BOOT_JDK/bin/java"; then
15080        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15082        BOOT_JDK_FOUND=no
15083      else
15084        # Do we have a bin/javac?
15085        if test ! -x "$BOOT_JDK/bin/javac"; then
15086          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15088          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15089$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15090          BOOT_JDK_FOUND=no
15091        else
15092          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15093          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15094            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15096            BOOT_JDK_FOUND=no
15097          else
15098            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15099            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15100
15101            # Extra M4 quote needed to protect [] in grep expression.
15102            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15103            if test "x$FOUND_VERSION_78" = x; then
15104              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15106              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15107$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15108              BOOT_JDK_FOUND=no
15109            else
15110              # We're done! :-)
15111              BOOT_JDK_FOUND=yes
15112
15113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15114
15115  # Input might be given as Windows format, start by converting to
15116  # unix format.
15117  path="$BOOT_JDK"
15118  new_path=`$CYGPATH -u "$path"`
15119
15120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15123  # "foo.exe" is OK but "foo" is an error.
15124  #
15125  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15126  # It is also a way to make sure we got the proper file name for the real test later on.
15127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15128  if test "x$test_shortpath" = x; then
15129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15130$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15131    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15132  fi
15133
15134  # Call helper function which possibly converts this using DOS-style short mode.
15135  # If so, the updated path is stored in $new_path.
15136
15137  input_path="$new_path"
15138  # Check if we need to convert this using DOS-style short mode. If the path
15139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15140  # take no chances and rewrite it.
15141  # Note: m4 eats our [], so we need to use [ and ] instead.
15142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15143  if test "x$has_forbidden_chars" != x; then
15144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15148      # Going to short mode and back again did indeed matter. Since short mode is
15149      # case insensitive, let's make it lowercase to improve readability.
15150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15151      # Now convert it back to Unix-stile (cygpath)
15152      input_path=`$CYGPATH -u "$shortmode_path"`
15153      new_path="$input_path"
15154    fi
15155  fi
15156
15157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15158  if test "x$test_cygdrive_prefix" = x; then
15159    # As a simple fix, exclude /usr/bin since it's not a real path.
15160    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15162      # a path prefixed by /cygdrive for fixpath to work.
15163      new_path="$CYGWIN_ROOT_PATH$input_path"
15164    fi
15165  fi
15166
15167
15168  if test "x$path" != "x$new_path"; then
15169    BOOT_JDK="$new_path"
15170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15171$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15172  fi
15173
15174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15175
15176  path="$BOOT_JDK"
15177  has_colon=`$ECHO $path | $GREP ^.:`
15178  new_path="$path"
15179  if test "x$has_colon" = x; then
15180    # Not in mixed or Windows style, start by that.
15181    new_path=`cmd //c echo $path`
15182  fi
15183
15184
15185  input_path="$new_path"
15186  # Check if we need to convert this using DOS-style short mode. If the path
15187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15188  # take no chances and rewrite it.
15189  # Note: m4 eats our [], so we need to use [ and ] instead.
15190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15191  if test "x$has_forbidden_chars" != x; then
15192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15194  fi
15195
15196
15197  windows_path="$new_path"
15198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15199    unix_path=`$CYGPATH -u "$windows_path"`
15200    new_path="$unix_path"
15201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15203    new_path="$unix_path"
15204  fi
15205
15206  if test "x$path" != "x$new_path"; then
15207    BOOT_JDK="$new_path"
15208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15209$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15210  fi
15211
15212  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15213  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15214
15215  else
15216    # We're on a posix platform. Hooray! :)
15217    path="$BOOT_JDK"
15218
15219    if test ! -f "$path" && test ! -d "$path"; then
15220      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15221    fi
15222
15223    has_space=`$ECHO "$path" | $GREP " "`
15224    if test "x$has_space" != x; then
15225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15227      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15228    fi
15229  fi
15230
15231              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15232$as_echo_n "checking for Boot JDK... " >&6; }
15233              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15234$as_echo "$BOOT_JDK" >&6; }
15235              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15236$as_echo_n "checking Boot JDK version... " >&6; }
15237              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15238              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15239$as_echo "$BOOT_JDK_VERSION" >&6; }
15240            fi # end check jdk version
15241          fi # end check rt.jar
15242        fi # end check javac
15243      fi # end check java
15244    fi # end check boot jdk found
15245  fi
15246
15247  fi
15248
15249
15250    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15251    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15252      # Do we have a bin/java?
15253      if test ! -x "$BOOT_JDK/bin/java"; then
15254        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15256        BOOT_JDK_FOUND=no
15257      else
15258        # Do we have a bin/javac?
15259        if test ! -x "$BOOT_JDK/bin/javac"; then
15260          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15262          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15263$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15264          BOOT_JDK_FOUND=no
15265        else
15266          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15267          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15268            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15270            BOOT_JDK_FOUND=no
15271          else
15272            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15273            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15274
15275            # Extra M4 quote needed to protect [] in grep expression.
15276            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15277            if test "x$FOUND_VERSION_78" = x; then
15278              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15280              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15281$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15282              BOOT_JDK_FOUND=no
15283            else
15284              # We're done! :-)
15285              BOOT_JDK_FOUND=yes
15286
15287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15288
15289  # Input might be given as Windows format, start by converting to
15290  # unix format.
15291  path="$BOOT_JDK"
15292  new_path=`$CYGPATH -u "$path"`
15293
15294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15297  # "foo.exe" is OK but "foo" is an error.
15298  #
15299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15300  # It is also a way to make sure we got the proper file name for the real test later on.
15301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15302  if test "x$test_shortpath" = x; then
15303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15305    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15306  fi
15307
15308  # Call helper function which possibly converts this using DOS-style short mode.
15309  # If so, the updated path is stored in $new_path.
15310
15311  input_path="$new_path"
15312  # Check if we need to convert this using DOS-style short mode. If the path
15313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15314  # take no chances and rewrite it.
15315  # Note: m4 eats our [], so we need to use [ and ] instead.
15316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15317  if test "x$has_forbidden_chars" != x; then
15318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15322      # Going to short mode and back again did indeed matter. Since short mode is
15323      # case insensitive, let's make it lowercase to improve readability.
15324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15325      # Now convert it back to Unix-stile (cygpath)
15326      input_path=`$CYGPATH -u "$shortmode_path"`
15327      new_path="$input_path"
15328    fi
15329  fi
15330
15331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15332  if test "x$test_cygdrive_prefix" = x; then
15333    # As a simple fix, exclude /usr/bin since it's not a real path.
15334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15336      # a path prefixed by /cygdrive for fixpath to work.
15337      new_path="$CYGWIN_ROOT_PATH$input_path"
15338    fi
15339  fi
15340
15341
15342  if test "x$path" != "x$new_path"; then
15343    BOOT_JDK="$new_path"
15344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15345$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15346  fi
15347
15348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15349
15350  path="$BOOT_JDK"
15351  has_colon=`$ECHO $path | $GREP ^.:`
15352  new_path="$path"
15353  if test "x$has_colon" = x; then
15354    # Not in mixed or Windows style, start by that.
15355    new_path=`cmd //c echo $path`
15356  fi
15357
15358
15359  input_path="$new_path"
15360  # Check if we need to convert this using DOS-style short mode. If the path
15361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15362  # take no chances and rewrite it.
15363  # Note: m4 eats our [], so we need to use [ and ] instead.
15364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15365  if test "x$has_forbidden_chars" != x; then
15366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15368  fi
15369
15370
15371  windows_path="$new_path"
15372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15373    unix_path=`$CYGPATH -u "$windows_path"`
15374    new_path="$unix_path"
15375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15377    new_path="$unix_path"
15378  fi
15379
15380  if test "x$path" != "x$new_path"; then
15381    BOOT_JDK="$new_path"
15382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15383$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15384  fi
15385
15386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15388
15389  else
15390    # We're on a posix platform. Hooray! :)
15391    path="$BOOT_JDK"
15392
15393    if test ! -f "$path" && test ! -d "$path"; then
15394      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15395    fi
15396
15397    has_space=`$ECHO "$path" | $GREP " "`
15398    if test "x$has_space" != x; then
15399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15400$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15401      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15402    fi
15403  fi
15404
15405              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15406$as_echo_n "checking for Boot JDK... " >&6; }
15407              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15408$as_echo "$BOOT_JDK" >&6; }
15409              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15410$as_echo_n "checking Boot JDK version... " >&6; }
15411              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15412              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15413$as_echo "$BOOT_JDK_VERSION" >&6; }
15414            fi # end check jdk version
15415          fi # end check rt.jar
15416        fi # end check javac
15417      fi # end check java
15418    fi # end check boot jdk found
15419  fi
15420
15421
15422# If we haven't found anything yet, we've truly lost. Give up.
15423if test "x$BOOT_JDK_FOUND" = xno; then
15424
15425    # Print a helpful message on how to acquire the necessary build dependency.
15426    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15427    MISSING_DEPENDENCY=openjdk
15428    PKGHANDLER_COMMAND=
15429
15430    case $PKGHANDLER in
15431	apt-get)
15432                apt_help     $MISSING_DEPENDENCY ;;
15433    yum)
15434                yum_help     $MISSING_DEPENDENCY ;;
15435	port)
15436                port_help    $MISSING_DEPENDENCY ;;
15437	pkgutil)
15438                pkgutil_help $MISSING_DEPENDENCY ;;
15439	pkgadd)
15440                pkgadd_help  $MISSING_DEPENDENCY ;;
15441    * )
15442      break ;;
15443    esac
15444
15445    if test "x$PKGHANDLER_COMMAND" != x; then
15446        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15447    fi
15448
15449  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15450$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15451  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15452$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15453  as_fn_error $? "Cannot continue" "$LINENO" 5
15454fi
15455
15456# Setup proper paths for what we found
15457BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15458if test ! -f "$BOOT_RTJAR"; then
15459    # On MacOSX it is called classes.jar
15460    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15461    if test -f "$BOOT_RTJAR"; then
15462      # Remove the ..
15463      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15464    fi
15465fi
15466BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15467BOOT_JDK="$BOOT_JDK"
15468
15469
15470
15471
15472# Setup tools from the Boot JDK.
15473
15474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15475$as_echo_n "checking for java in Boot JDK... " >&6; }
15476  JAVA=$BOOT_JDK/bin/java
15477  if test ! -x $JAVA; then
15478      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15479$as_echo "not found" >&6; }
15480      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15481$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15482      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15483  fi
15484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15485$as_echo "ok" >&6; }
15486
15487
15488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15489$as_echo_n "checking for javac in Boot JDK... " >&6; }
15490  JAVAC=$BOOT_JDK/bin/javac
15491  if test ! -x $JAVAC; then
15492      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15493$as_echo "not found" >&6; }
15494      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15495$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15496      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15497  fi
15498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15499$as_echo "ok" >&6; }
15500
15501
15502  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15503$as_echo_n "checking for javah in Boot JDK... " >&6; }
15504  JAVAH=$BOOT_JDK/bin/javah
15505  if test ! -x $JAVAH; then
15506      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15507$as_echo "not found" >&6; }
15508      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15509$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15510      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15511  fi
15512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15513$as_echo "ok" >&6; }
15514
15515
15516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15517$as_echo_n "checking for javap in Boot JDK... " >&6; }
15518  JAVAP=$BOOT_JDK/bin/javap
15519  if test ! -x $JAVAP; then
15520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15521$as_echo "not found" >&6; }
15522      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15523$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15524      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15525  fi
15526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15527$as_echo "ok" >&6; }
15528
15529
15530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15531$as_echo_n "checking for jar in Boot JDK... " >&6; }
15532  JAR=$BOOT_JDK/bin/jar
15533  if test ! -x $JAR; then
15534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15535$as_echo "not found" >&6; }
15536      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15537$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15538      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15539  fi
15540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15541$as_echo "ok" >&6; }
15542
15543
15544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15545$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15546  RMIC=$BOOT_JDK/bin/rmic
15547  if test ! -x $RMIC; then
15548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15549$as_echo "not found" >&6; }
15550      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15551$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15552      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15553  fi
15554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15555$as_echo "ok" >&6; }
15556
15557
15558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15559$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15560  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15561  if test ! -x $NATIVE2ASCII; then
15562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15563$as_echo "not found" >&6; }
15564      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15565$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15566      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15567  fi
15568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15569$as_echo "ok" >&6; }
15570
15571
15572# Finally, set some other options...
15573
15574# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15575BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15576
15577
15578
15579
15580##############################################################################
15581#
15582# Specify options for anything that is run with the Boot JDK.
15583#
15584
15585# Check whether --with-boot-jdk-jvmargs was given.
15586if test "${with_boot_jdk_jvmargs+set}" = set; then :
15587  withval=$with_boot_jdk_jvmargs;
15588fi
15589
15590
15591if test "x$with_boot_jdk_jvmargs" = x; then
15592    # Not all JVM:s accept the same arguments on the command line.
15593    # OpenJDK specific increase in thread stack for JDK build,
15594    # well more specifically, when running javac.
15595    if test "x$BUILD_NUM_BITS" = x32; then
15596       STACK_SIZE=768
15597    else
15598       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15599       # since 64-bit pointers are pushed on the stach. Apparently, we need
15600       # to increase the stack space when javacing the JDK....
15601       STACK_SIZE=1536
15602    fi
15603
15604    # Minimum amount of heap memory.
15605
15606    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15607    # If so, then append -Xms64M to boot_jdk_jvmargs
15608    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15609    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15610    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15611        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15612    fi
15613
15614    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15615        # Why does macosx need more heap? Its the huge JDK batch.
15616
15617    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15618    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15619    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15620    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15621    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15622        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15623    fi
15624
15625    else
15626
15627    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15628    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15629    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15630    FOUND_VERSION=`$JAVA -Xmx1100M -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 -Xmx1100M"
15633    fi
15634
15635    fi
15636    # When is adding -client something that speeds up the JVM?
15637    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15638
15639    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15640    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15641    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15642    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15643    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15644        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15645    fi
15646
15647
15648    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15649    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15650    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15651    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15652    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15653        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15654    fi
15655
15656
15657    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15658    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15659    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15660    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15661    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15662        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15663    fi
15664
15665    # Disable special log output when a debug build is used as Boot JDK...
15666
15667    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15668    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15669    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15670    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15671    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15672        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15673    fi
15674
15675fi
15676
15677BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15678
15679
15680
15681###############################################################################
15682#
15683# Configure the sources to use. We can add or override individual directories.
15684#
15685###############################################################################
15686
15687
15688
15689# Where are the sources. Any of these can be overridden
15690# using --with-override-corba and the likes.
15691LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15692CORBA_TOPDIR="$SRC_ROOT/corba"
15693JAXP_TOPDIR="$SRC_ROOT/jaxp"
15694JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15695HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15696NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15697JDK_TOPDIR="$SRC_ROOT/jdk"
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708###############################################################################
15709#
15710# Pickup additional source for a component from outside of the source root
15711# or override source for a component.
15712#
15713
15714# Check whether --with-add-source-root was given.
15715if test "${with_add_source_root+set}" = set; then :
15716  withval=$with_add_source_root;
15717fi
15718
15719
15720
15721# Check whether --with-override-source-root was given.
15722if test "${with_override_source_root+set}" = set; then :
15723  withval=$with_override_source_root;
15724fi
15725
15726
15727
15728# Check whether --with-adds-and-overrides was given.
15729if test "${with_adds_and_overrides+set}" = set; then :
15730  withval=$with_adds_and_overrides;
15731fi
15732
15733
15734if test "x$with_adds_and_overrides" != x; then
15735    with_add_source_root="$with_adds_and_overrides/adds"
15736    with_override_source_root="$with_adds_and_overrides/overrides"
15737fi
15738
15739if test "x$with_add_source_root" != x; then
15740    if ! test -d $with_add_source_root; then
15741       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15742    fi
15743    CURDIR="$PWD"
15744    cd "$with_add_source_root"
15745    ADD_SRC_ROOT="`pwd`"
15746    cd "$CURDIR"
15747    # Verify that the addon source root does not have any root makefiles.
15748    # If it does, then it is usually an error, prevent this.
15749    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15750       test -f $with_add_source_root/langtools/make/Makefile; then
15751        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
15752    fi
15753    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15754       test -f $with_add_source_root/corba/make/Makefile; then
15755        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
15756    fi
15757    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15758       test -f $with_add_source_root/jaxp/make/Makefile; then
15759        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
15760    fi
15761    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15762       test -f $with_add_source_root/jaxws/make/Makefile; then
15763        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
15764    fi
15765    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15766       test -f $with_add_source_root/hotspot/make/Makefile; then
15767        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
15768    fi
15769    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15770       test -f $with_add_source_root/jdk/make/Makefile; then
15771        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
15772    fi
15773fi
15774
15775
15776if test "x$with_override_source_root" != x; then
15777    if ! test -d $with_override_source_root; then
15778       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15779    fi
15780    CURDIR="$PWD"
15781    cd "$with_override_source_root"
15782    OVERRIDE_SRC_ROOT="`pwd`"
15783    cd "$CURDIR"
15784    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15785       test -f $with_override_source_root/langtools/make/Makefile; then
15786        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
15787    fi
15788    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15789       test -f $with_override_source_root/corba/make/Makefile; then
15790        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
15791    fi
15792    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15793       test -f $with_override_source_root/jaxp/make/Makefile; then
15794        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
15795    fi
15796    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15797       test -f $with_override_source_root/jaxws/make/Makefile; then
15798        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
15799    fi
15800    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15801       test -f $with_override_source_root/hotspot/make/Makefile; then
15802        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
15803    fi
15804    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15805       test -f $with_override_source_root/jdk/make/Makefile; then
15806        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
15807    fi
15808fi
15809
15810
15811###############################################################################
15812#
15813# Override a repo completely, this is used for example when you have 3 small
15814# development sandboxes of the langtools sources and want to avoid having 3 full
15815# OpenJDK sources checked out on disk.
15816#
15817# Assuming that the 3 langtools sandboxes are located here:
15818# /home/fredrik/sandbox1/langtools
15819# /home/fredrik/sandbox2/langtools
15820# /home/fredrik/sandbox3/langtools
15821#
15822# From the source root you create build subdirs manually:
15823#     mkdir -p build1 build2 build3
15824# in each build directory run:
15825#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15826#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15827#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15828#
15829
15830
15831# Check whether --with-override-langtools was given.
15832if test "${with_override_langtools+set}" = set; then :
15833  withval=$with_override_langtools;
15834fi
15835
15836
15837
15838# Check whether --with-override-corba was given.
15839if test "${with_override_corba+set}" = set; then :
15840  withval=$with_override_corba;
15841fi
15842
15843
15844
15845# Check whether --with-override-jaxp was given.
15846if test "${with_override_jaxp+set}" = set; then :
15847  withval=$with_override_jaxp;
15848fi
15849
15850
15851
15852# Check whether --with-override-jaxws was given.
15853if test "${with_override_jaxws+set}" = set; then :
15854  withval=$with_override_jaxws;
15855fi
15856
15857
15858
15859# Check whether --with-override-hotspot was given.
15860if test "${with_override_hotspot+set}" = set; then :
15861  withval=$with_override_hotspot;
15862fi
15863
15864
15865
15866# Check whether --with-override-jdk was given.
15867if test "${with_override_jdk+set}" = set; then :
15868  withval=$with_override_jdk;
15869fi
15870
15871
15872if test "x$with_override_langtools" != x; then
15873    CURDIR="$PWD"
15874    cd "$with_override_langtools"
15875    LANGTOOLS_TOPDIR="`pwd`"
15876    cd "$CURDIR"
15877    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15878        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15879    fi
15880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15881$as_echo_n "checking if langtools should be overridden... " >&6; }
15882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15883$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15884fi
15885if test "x$with_override_corba" != x; then
15886    CURDIR="$PWD"
15887    cd "$with_override_corba"
15888    CORBA_TOPDIR="`pwd`"
15889    cd "$CURDIR"
15890    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15891        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15892    fi
15893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15894$as_echo_n "checking if corba should be overridden... " >&6; }
15895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15896$as_echo "yes with $CORBA_TOPDIR" >&6; }
15897fi
15898if test "x$with_override_jaxp" != x; then
15899    CURDIR="$PWD"
15900    cd "$with_override_jaxp"
15901    JAXP_TOPDIR="`pwd`"
15902    cd "$CURDIR"
15903    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15904        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15905    fi
15906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15907$as_echo_n "checking if jaxp should be overridden... " >&6; }
15908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15909$as_echo "yes with $JAXP_TOPDIR" >&6; }
15910fi
15911if test "x$with_override_jaxws" != x; then
15912    CURDIR="$PWD"
15913    cd "$with_override_jaxws"
15914    JAXWS_TOPDIR="`pwd`"
15915    cd "$CURDIR"
15916    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15917        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15918    fi
15919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15920$as_echo_n "checking if jaxws should be overridden... " >&6; }
15921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15922$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15923fi
15924if test "x$with_override_hotspot" != x; then
15925    CURDIR="$PWD"
15926    cd "$with_override_hotspot"
15927    HOTSPOT_TOPDIR="`pwd`"
15928    cd "$CURDIR"
15929    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15930       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15931        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15932    fi
15933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15934$as_echo_n "checking if hotspot should be overridden... " >&6; }
15935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15936$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15937fi
15938if test "x$with_override_nashorn" != x; then
15939    CURDIR="$PWD"
15940    cd "$with_override_nashorn"
15941    NASHORN_TOPDIR="`pwd`"
15942    cd "$CURDIR"
15943    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
15944        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
15945    fi
15946    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
15947$as_echo_n "checking if nashorn should be overridden... " >&6; }
15948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
15949$as_echo "yes with $NASHORN_TOPDIR" >&6; }
15950fi
15951if test "x$with_override_jdk" != x; then
15952    CURDIR="$PWD"
15953    cd "$with_override_jdk"
15954    JDK_TOPDIR="`pwd`"
15955    cd "$CURDIR"
15956    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15957        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15958    fi
15959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15960$as_echo_n "checking if JDK should be overridden... " >&6; }
15961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15962$as_echo "yes with $JDK_TOPDIR" >&6; }
15963fi
15964
15965
15966
15967BUILD_OUTPUT="$OUTPUT_ROOT"
15968
15969
15970HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15971BUILD_HOTSPOT=true
15972
15973
15974
15975# Check whether --with-import-hotspot was given.
15976if test "${with_import_hotspot+set}" = set; then :
15977  withval=$with_import_hotspot;
15978fi
15979
15980if test "x$with_import_hotspot" != x; then
15981    CURDIR="$PWD"
15982    cd "$with_import_hotspot"
15983    HOTSPOT_DIST="`pwd`"
15984    cd "$CURDIR"
15985    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15986        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15987    fi
15988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15989$as_echo_n "checking if hotspot should be imported... " >&6; }
15990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15991$as_echo "yes from $HOTSPOT_DIST" >&6; }
15992    BUILD_HOTSPOT=false
15993fi
15994
15995JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15996
15997
15998###############################################################################
15999#
16000# Setup the toolchain (compilers etc), i.e. the tools that need to be
16001# cross-compilation aware.
16002#
16003###############################################################################
16004
16005
16006###############################################################################
16007#
16008# Configure the development tool paths and potential sysroot.
16009#
16010ac_ext=cpp
16011ac_cpp='$CXXCPP $CPPFLAGS'
16012ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16013ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16014ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16015
16016
16017# The option used to specify the target .o,.a or .so file.
16018# When compiling, how to specify the to be created object file.
16019CC_OUT_OPTION='-o$(SPACE)'
16020# When linking, how to specify the to be created executable.
16021EXE_OUT_OPTION='-o$(SPACE)'
16022# When linking, how to specify the to be created dynamically linkable library.
16023LD_OUT_OPTION='-o$(SPACE)'
16024# When archiving, how to specify the to be create static archive for object files.
16025AR_OUT_OPTION='rcs$(SPACE)'
16026
16027
16028
16029
16030
16031# Locate the actual tools
16032
16033if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16034
16035  # Store path to cygwin link.exe to help excluding it when searching for
16036  # VS linker. This must be done before changing the PATH when looking for VS.
16037  # Extract the first word of "link", so it can be a program name with args.
16038set dummy link; ac_word=$2
16039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16040$as_echo_n "checking for $ac_word... " >&6; }
16041if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16042  $as_echo_n "(cached) " >&6
16043else
16044  case $CYGWIN_LINK in
16045  [\\/]* | ?:[\\/]*)
16046  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16047  ;;
16048  *)
16049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16050for as_dir in $PATH
16051do
16052  IFS=$as_save_IFS
16053  test -z "$as_dir" && as_dir=.
16054    for ac_exec_ext in '' $ac_executable_extensions; do
16055  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16056    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16058    break 2
16059  fi
16060done
16061  done
16062IFS=$as_save_IFS
16063
16064  ;;
16065esac
16066fi
16067CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16068if test -n "$CYGWIN_LINK"; then
16069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16070$as_echo "$CYGWIN_LINK" >&6; }
16071else
16072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16073$as_echo "no" >&6; }
16074fi
16075
16076
16077  if test "x$CYGWIN_LINK" != x; then
16078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16079$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16080    "$CYGWIN_LINK" --version > /dev/null
16081    if test $? -eq 0 ; then
16082      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16083$as_echo "yes" >&6; }
16084    else
16085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16086$as_echo "no" >&6; }
16087      # This might be the VS linker. Don't exclude it later on.
16088      CYGWIN_LINK=""
16089    fi
16090  fi
16091
16092  # First-hand choice is to locate and run the vsvars bat file.
16093
16094  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16095    VCVARSFILE="vc/bin/vcvars32.bat"
16096  else
16097    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16098  fi
16099
16100  VS_ENV_CMD=""
16101  VS_ENV_ARGS=""
16102  if test "x$with_toolsdir" != x; then
16103
16104  if test "x$VS_ENV_CMD" = x; then
16105    VS100BASE="$with_toolsdir/../.."
16106    METHOD="--with-tools-dir"
16107
16108  windows_path="$VS100BASE"
16109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16110    unix_path=`$CYGPATH -u "$windows_path"`
16111    VS100BASE="$unix_path"
16112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16114    VS100BASE="$unix_path"
16115  fi
16116
16117    if test -d "$VS100BASE"; then
16118      if test -f "$VS100BASE/$VCVARSFILE"; then
16119        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16120$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16121        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16122      else
16123        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16124$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16125        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16126$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16127      fi
16128    fi
16129  fi
16130
16131  fi
16132
16133  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16134    # Having specified an argument which is incorrect will produce an instant failure;
16135    # we should not go on looking
16136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16137$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16138    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16139$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16140    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16141  fi
16142
16143  if test "x$ProgramW6432" != x; then
16144
16145  if test "x$VS_ENV_CMD" = x; then
16146    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16147    METHOD="well-known name"
16148
16149  windows_path="$WIN_SDK_BASE"
16150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16151    unix_path=`$CYGPATH -u "$windows_path"`
16152    WIN_SDK_BASE="$unix_path"
16153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16155    WIN_SDK_BASE="$unix_path"
16156  fi
16157
16158    if test -d "$WIN_SDK_BASE"; then
16159      # There have been cases of partial or broken SDK installations. A missing
16160      # lib dir is not going to work.
16161      if test ! -d "$WIN_SDK_BASE/../lib"; then
16162        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16163$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16164        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16165$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16166      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16167        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16168$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16169        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16170        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16171          VS_ENV_ARGS="/x86"
16172        else
16173          VS_ENV_ARGS="/x64"
16174        fi
16175      else
16176        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16177$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16178        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16179$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16180      fi
16181    fi
16182  fi
16183
16184  fi
16185  if test "x$PROGRAMW6432" != x; then
16186
16187  if test "x$VS_ENV_CMD" = x; then
16188    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16189    METHOD="well-known name"
16190
16191  windows_path="$WIN_SDK_BASE"
16192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16193    unix_path=`$CYGPATH -u "$windows_path"`
16194    WIN_SDK_BASE="$unix_path"
16195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16197    WIN_SDK_BASE="$unix_path"
16198  fi
16199
16200    if test -d "$WIN_SDK_BASE"; then
16201      # There have been cases of partial or broken SDK installations. A missing
16202      # lib dir is not going to work.
16203      if test ! -d "$WIN_SDK_BASE/../lib"; then
16204        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16205$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16206        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16207$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16208      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16209        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16210$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16211        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16212        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16213          VS_ENV_ARGS="/x86"
16214        else
16215          VS_ENV_ARGS="/x64"
16216        fi
16217      else
16218        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16219$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16220        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16221$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16222      fi
16223    fi
16224  fi
16225
16226  fi
16227  if test "x$PROGRAMFILES" != x; then
16228
16229  if test "x$VS_ENV_CMD" = x; then
16230    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16231    METHOD="well-known name"
16232
16233  windows_path="$WIN_SDK_BASE"
16234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16235    unix_path=`$CYGPATH -u "$windows_path"`
16236    WIN_SDK_BASE="$unix_path"
16237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16239    WIN_SDK_BASE="$unix_path"
16240  fi
16241
16242    if test -d "$WIN_SDK_BASE"; then
16243      # There have been cases of partial or broken SDK installations. A missing
16244      # lib dir is not going to work.
16245      if test ! -d "$WIN_SDK_BASE/../lib"; then
16246        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16247$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16248        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16249$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16250      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16251        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16252$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16253        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16254        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16255          VS_ENV_ARGS="/x86"
16256        else
16257          VS_ENV_ARGS="/x64"
16258        fi
16259      else
16260        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16261$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16262        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16263$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16264      fi
16265    fi
16266  fi
16267
16268  fi
16269
16270  if test "x$VS_ENV_CMD" = x; then
16271    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16272    METHOD="well-known name"
16273
16274  windows_path="$WIN_SDK_BASE"
16275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16276    unix_path=`$CYGPATH -u "$windows_path"`
16277    WIN_SDK_BASE="$unix_path"
16278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16280    WIN_SDK_BASE="$unix_path"
16281  fi
16282
16283    if test -d "$WIN_SDK_BASE"; then
16284      # There have been cases of partial or broken SDK installations. A missing
16285      # lib dir is not going to work.
16286      if test ! -d "$WIN_SDK_BASE/../lib"; 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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16290$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16291      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16292        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16293$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16294        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16295        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16296          VS_ENV_ARGS="/x86"
16297        else
16298          VS_ENV_ARGS="/x64"
16299        fi
16300      else
16301        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16302$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16303        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16304$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16305      fi
16306    fi
16307  fi
16308
16309
16310  if test "x$VS_ENV_CMD" = x; then
16311    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16312    METHOD="well-known name"
16313
16314  windows_path="$WIN_SDK_BASE"
16315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16316    unix_path=`$CYGPATH -u "$windows_path"`
16317    WIN_SDK_BASE="$unix_path"
16318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16320    WIN_SDK_BASE="$unix_path"
16321  fi
16322
16323    if test -d "$WIN_SDK_BASE"; then
16324      # There have been cases of partial or broken SDK installations. A missing
16325      # lib dir is not going to work.
16326      if test ! -d "$WIN_SDK_BASE/../lib"; then
16327        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16328$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16329        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16330$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16331      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16332        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16333$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16334        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16335        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16336          VS_ENV_ARGS="/x86"
16337        else
16338          VS_ENV_ARGS="/x64"
16339        fi
16340      else
16341        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16342$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16343        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16344$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16345      fi
16346    fi
16347  fi
16348
16349
16350  if test "x$VS100COMNTOOLS" != x; then
16351
16352  if test "x$VS_ENV_CMD" = x; then
16353    VS100BASE="$VS100COMNTOOLS/../.."
16354    METHOD="VS100COMNTOOLS variable"
16355
16356  windows_path="$VS100BASE"
16357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16358    unix_path=`$CYGPATH -u "$windows_path"`
16359    VS100BASE="$unix_path"
16360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16362    VS100BASE="$unix_path"
16363  fi
16364
16365    if test -d "$VS100BASE"; then
16366      if test -f "$VS100BASE/$VCVARSFILE"; then
16367        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16368$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16369        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16370      else
16371        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16372$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16373        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16374$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16375      fi
16376    fi
16377  fi
16378
16379  fi
16380  if test "x$PROGRAMFILES" != x; then
16381
16382  if test "x$VS_ENV_CMD" = x; then
16383    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16384    METHOD="well-known name"
16385
16386  windows_path="$VS100BASE"
16387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16388    unix_path=`$CYGPATH -u "$windows_path"`
16389    VS100BASE="$unix_path"
16390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16392    VS100BASE="$unix_path"
16393  fi
16394
16395    if test -d "$VS100BASE"; then
16396      if test -f "$VS100BASE/$VCVARSFILE"; then
16397        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16398$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16399        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16400      else
16401        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16402$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16403        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16404$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16405      fi
16406    fi
16407  fi
16408
16409  fi
16410
16411  if test "x$VS_ENV_CMD" = x; then
16412    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16413    METHOD="well-known name"
16414
16415  windows_path="$VS100BASE"
16416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16417    unix_path=`$CYGPATH -u "$windows_path"`
16418    VS100BASE="$unix_path"
16419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16421    VS100BASE="$unix_path"
16422  fi
16423
16424    if test -d "$VS100BASE"; then
16425      if test -f "$VS100BASE/$VCVARSFILE"; then
16426        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16427$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16428        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16429      else
16430        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16431$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16432        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16433$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16434      fi
16435    fi
16436  fi
16437
16438
16439  if test "x$VS_ENV_CMD" = x; then
16440    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16441    METHOD="well-known name"
16442
16443  windows_path="$VS100BASE"
16444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16445    unix_path=`$CYGPATH -u "$windows_path"`
16446    VS100BASE="$unix_path"
16447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16449    VS100BASE="$unix_path"
16450  fi
16451
16452    if test -d "$VS100BASE"; then
16453      if test -f "$VS100BASE/$VCVARSFILE"; then
16454        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16455$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16456        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16457      else
16458        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16459$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16460        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16461$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16462      fi
16463    fi
16464  fi
16465
16466
16467  if test "x$VS_ENV_CMD" != x; then
16468    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16469
16470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16471
16472  # First separate the path from the arguments. This will split at the first
16473  # space.
16474  complete="$VS_ENV_CMD"
16475  path="${complete%% *}"
16476  tmp="$complete EOL"
16477  arguments="${tmp#* }"
16478
16479  # Input might be given as Windows format, start by converting to
16480  # unix format.
16481  new_path=`$CYGPATH -u "$path"`
16482
16483  # Now try to locate executable using which
16484  new_path=`$WHICH "$new_path" 2> /dev/null`
16485  # bat and cmd files are not always considered executable in cygwin causing which
16486  # to not find them
16487  if test "x$new_path" = x \
16488           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16489           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16490    new_path=`$CYGPATH -u "$path"`
16491  fi
16492  if test "x$new_path" = x; then
16493    # Oops. Which didn't find the executable.
16494    # The splitting of arguments from the executable at a space might have been incorrect,
16495    # since paths with space are more likely in Windows. Give it another try with the whole
16496    # argument.
16497    path="$complete"
16498    arguments="EOL"
16499    new_path=`$CYGPATH -u "$path"`
16500    new_path=`$WHICH "$new_path" 2> /dev/null`
16501    # bat and cmd files are not always considered executable in cygwin causing which
16502    # to not find them
16503    if test "x$new_path" = x \
16504             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16505             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16506      new_path=`$CYGPATH -u "$path"`
16507    fi
16508    if test "x$new_path" = x; then
16509      # It's still not found. Now this is an unrecoverable error.
16510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16511$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16512      has_space=`$ECHO "$complete" | $GREP " "`
16513      if test "x$has_space" != x; then
16514        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16515$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16516      fi
16517      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16518    fi
16519  fi
16520
16521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16524  # "foo.exe" is OK but "foo" is an error.
16525  #
16526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16527  # It is also a way to make sure we got the proper file name for the real test later on.
16528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16529  if test "x$test_shortpath" = x; then
16530    # Short path failed, file does not exist as specified.
16531    # Try adding .exe or .cmd
16532    if test -f "${new_path}.exe"; then
16533       input_to_shortpath="${new_path}.exe"
16534    elif test -f "${new_path}.cmd"; then
16535       input_to_shortpath="${new_path}.cmd"
16536    else
16537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16538$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16539      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16540$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16541      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16542    fi
16543  else
16544    input_to_shortpath="$new_path"
16545  fi
16546
16547  # Call helper function which possibly converts this using DOS-style short mode.
16548  # If so, the updated path is stored in $new_path.
16549  new_path="$input_to_shortpath"
16550
16551  input_path="$input_to_shortpath"
16552  # Check if we need to convert this using DOS-style short mode. If the path
16553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16554  # take no chances and rewrite it.
16555  # Note: m4 eats our [], so we need to use [ and ] instead.
16556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16557  if test "x$has_forbidden_chars" != x; then
16558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16562      # Going to short mode and back again did indeed matter. Since short mode is
16563      # case insensitive, let's make it lowercase to improve readability.
16564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16565      # Now convert it back to Unix-stile (cygpath)
16566      input_path=`$CYGPATH -u "$shortmode_path"`
16567      new_path="$input_path"
16568    fi
16569  fi
16570
16571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16572  if test "x$test_cygdrive_prefix" = x; then
16573    # As a simple fix, exclude /usr/bin since it's not a real path.
16574    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16576      # a path prefixed by /cygdrive for fixpath to work.
16577      new_path="$CYGWIN_ROOT_PATH$input_path"
16578    fi
16579  fi
16580
16581  # remove trailing .exe if any
16582  new_path="${new_path/%.exe/}"
16583
16584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16585
16586  # First separate the path from the arguments. This will split at the first
16587  # space.
16588  complete="$VS_ENV_CMD"
16589  path="${complete%% *}"
16590  tmp="$complete EOL"
16591  arguments="${tmp#* }"
16592
16593  # Input might be given as Windows format, start by converting to
16594  # unix format.
16595  new_path="$path"
16596
16597  windows_path="$new_path"
16598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16599    unix_path=`$CYGPATH -u "$windows_path"`
16600    new_path="$unix_path"
16601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16603    new_path="$unix_path"
16604  fi
16605
16606
16607  # Now try to locate executable using which
16608  new_path=`$WHICH "$new_path" 2> /dev/null`
16609
16610  if test "x$new_path" = x; then
16611    # Oops. Which didn't find the executable.
16612    # The splitting of arguments from the executable at a space might have been incorrect,
16613    # since paths with space are more likely in Windows. Give it another try with the whole
16614    # argument.
16615    path="$complete"
16616    arguments="EOL"
16617    new_path="$path"
16618
16619  windows_path="$new_path"
16620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16621    unix_path=`$CYGPATH -u "$windows_path"`
16622    new_path="$unix_path"
16623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16625    new_path="$unix_path"
16626  fi
16627
16628
16629    new_path=`$WHICH "$new_path" 2> /dev/null`
16630
16631    if test "x$new_path" = x; then
16632      # It's still not found. Now this is an unrecoverable error.
16633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16634$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16635      has_space=`$ECHO "$complete" | $GREP " "`
16636      if test "x$has_space" != x; then
16637        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16638$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16639      fi
16640      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16641    fi
16642  fi
16643
16644  # Now new_path has a complete unix path to the binary
16645  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16646    # Keep paths in /bin as-is, but remove trailing .exe if any
16647    new_path="${new_path/%.exe/}"
16648    # Do not save /bin paths to all_fixpath_prefixes!
16649  else
16650    # Not in mixed or Windows style, start by that.
16651    new_path=`cmd //c echo $new_path`
16652
16653  input_path="$new_path"
16654  # Check if we need to convert this using DOS-style short mode. If the path
16655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16656  # take no chances and rewrite it.
16657  # Note: m4 eats our [], so we need to use [ and ] instead.
16658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16659  if test "x$has_forbidden_chars" != x; then
16660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16662  fi
16663
16664    # Output is in $new_path
16665
16666  windows_path="$new_path"
16667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16668    unix_path=`$CYGPATH -u "$windows_path"`
16669    new_path="$unix_path"
16670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16672    new_path="$unix_path"
16673  fi
16674
16675    # remove trailing .exe if any
16676    new_path="${new_path/%.exe/}"
16677
16678    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16679    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16680  fi
16681
16682  else
16683    # We're on a posix platform. Hooray! :)
16684    # First separate the path from the arguments. This will split at the first
16685    # space.
16686    complete="$VS_ENV_CMD"
16687    path="${complete%% *}"
16688    tmp="$complete EOL"
16689    arguments="${tmp#* }"
16690
16691    # Cannot rely on the command "which" here since it doesn't always work.
16692    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16693    if test -z "$is_absolute_path"; then
16694      # Path to executable is not absolute. Find it.
16695      IFS_save="$IFS"
16696      IFS=:
16697      for p in $PATH; do
16698        if test -f "$p/$path" && test -x "$p/$path"; then
16699          new_path="$p/$path"
16700          break
16701        fi
16702      done
16703      IFS="$IFS_save"
16704    else
16705      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16706$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16707      new_path="$path"
16708    fi
16709
16710    if test "x$new_path" = x; then
16711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16712$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16713        has_space=`$ECHO "$complete" | $GREP " "`
16714        if test "x$has_space" != x; then
16715          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16716$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16717        fi
16718        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16719      fi
16720  fi
16721
16722      # Now join together the path and the arguments once again
16723      if test "x$arguments" != xEOL; then
16724        new_complete="$new_path ${arguments% *}"
16725      else
16726        new_complete="$new_path"
16727      fi
16728
16729  if test "x$complete" != "x$new_complete"; then
16730      VS_ENV_CMD="$new_complete"
16731      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16732$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16733    fi
16734
16735
16736    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16737    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16738$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16739    cd $OUTPUT_ROOT
16740    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16741    # to autoconf standards.
16742
16743    #----
16744
16745    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16746    # but calculate the difference in Cygwin environment before/after running it and then
16747    # apply the diff.
16748
16749    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16750      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16751      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16752      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16753    else
16754      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16755      _dosbash=`cmd //c echo \`which bash\``
16756    fi
16757
16758    # generate the set of exported vars before/after the vs10 setup
16759    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16760    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16761    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16762    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16763
16764    # Now execute the newly created bat file.
16765    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16766    cmd /c localdevenvtmp.bat | cat
16767
16768    # apply the diff (less some non-vs10 vars named by "!")
16769    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16770    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16771    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16772
16773    # cleanup
16774    $RM localdevenvtmp*
16775    #----
16776    cd $CURDIR
16777    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16779$as_echo "no" >&6; }
16780      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16781$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16782      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16783$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16784      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16785$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16786      as_fn_error $? "Cannot continue" "$LINENO" 5
16787    fi
16788
16789    # Now set all paths and other env variables. This will allow the rest of
16790    # the configure script to find and run the compiler in the proper way.
16791    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16792$as_echo "$as_me: Setting extracted environment variables" >&6;}
16793    . $OUTPUT_ROOT/localdevenv.sh
16794  else
16795    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16796    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16797$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16798  fi
16799
16800  # At this point, we should have corrent variables in the environment, or we can't continue.
16801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16802$as_echo_n "checking for Visual Studio variables... " >&6; }
16803
16804  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16805    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16807$as_echo "present but broken" >&6; }
16808      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16809    else
16810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16811$as_echo "ok" >&6; }
16812      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16813      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16814      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16815      VS_PATH="$PATH"
16816
16817
16818
16819    fi
16820  else
16821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16822$as_echo "not found" >&6; }
16823
16824    if test "x$VS_ENV_CMD" = x; then
16825      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16826$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16827      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16828$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16829    else
16830      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16831$as_echo "$as_me: Running the extraction script failed." >&6;}
16832    fi
16833    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16834$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16835    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16836$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16837    as_fn_error $? "Cannot continue" "$LINENO" 5
16838  fi
16839
16840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16841$as_echo_n "checking for msvcr100.dll... " >&6; }
16842
16843# Check whether --with-msvcr-dll was given.
16844if test "${with_msvcr_dll+set}" = set; then :
16845  withval=$with_msvcr_dll;
16846fi
16847
16848  if test "x$with_msvcr_dll" != x; then
16849    MSVCR_DLL="$with_msvcr_dll"
16850  else
16851    if test "x$VCINSTALLDIR" != x; then
16852      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16853        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16854      else
16855        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16856        if test "x$MSVCR_DLL" = x; then
16857          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16858        fi
16859      fi
16860      if test "x$MSVCR_DLL" != x; then
16861        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16862$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16863      else
16864        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16865$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16866      fi
16867    fi
16868    if test "x$MSVCR_DLL" = x; then
16869      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16870        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16871$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16872        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16873      fi
16874    fi
16875  fi
16876  if test "x$MSVCR_DLL" = x; then
16877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16878$as_echo "no" >&6; }
16879    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16880  fi
16881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16882$as_echo "$MSVCR_DLL" >&6; }
16883
16884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16885
16886  # Input might be given as Windows format, start by converting to
16887  # unix format.
16888  path="$MSVCR_DLL"
16889  new_path=`$CYGPATH -u "$path"`
16890
16891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16894  # "foo.exe" is OK but "foo" is an error.
16895  #
16896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16897  # It is also a way to make sure we got the proper file name for the real test later on.
16898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16899  if test "x$test_shortpath" = x; then
16900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16901$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16902    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16903  fi
16904
16905  # Call helper function which possibly converts this using DOS-style short mode.
16906  # If so, the updated path is stored in $new_path.
16907
16908  input_path="$new_path"
16909  # Check if we need to convert this using DOS-style short mode. If the path
16910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16911  # take no chances and rewrite it.
16912  # Note: m4 eats our [], so we need to use [ and ] instead.
16913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16914  if test "x$has_forbidden_chars" != x; then
16915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16919      # Going to short mode and back again did indeed matter. Since short mode is
16920      # case insensitive, let's make it lowercase to improve readability.
16921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16922      # Now convert it back to Unix-stile (cygpath)
16923      input_path=`$CYGPATH -u "$shortmode_path"`
16924      new_path="$input_path"
16925    fi
16926  fi
16927
16928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16929  if test "x$test_cygdrive_prefix" = x; then
16930    # As a simple fix, exclude /usr/bin since it's not a real path.
16931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16933      # a path prefixed by /cygdrive for fixpath to work.
16934      new_path="$CYGWIN_ROOT_PATH$input_path"
16935    fi
16936  fi
16937
16938
16939  if test "x$path" != "x$new_path"; then
16940    MSVCR_DLL="$new_path"
16941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16942$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16943  fi
16944
16945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16946
16947  path="$MSVCR_DLL"
16948  has_colon=`$ECHO $path | $GREP ^.:`
16949  new_path="$path"
16950  if test "x$has_colon" = x; then
16951    # Not in mixed or Windows style, start by that.
16952    new_path=`cmd //c echo $path`
16953  fi
16954
16955
16956  input_path="$new_path"
16957  # Check if we need to convert this using DOS-style short mode. If the path
16958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16959  # take no chances and rewrite it.
16960  # Note: m4 eats our [], so we need to use [ and ] instead.
16961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16962  if test "x$has_forbidden_chars" != x; then
16963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16965  fi
16966
16967
16968  windows_path="$new_path"
16969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16970    unix_path=`$CYGPATH -u "$windows_path"`
16971    new_path="$unix_path"
16972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16974    new_path="$unix_path"
16975  fi
16976
16977  if test "x$path" != "x$new_path"; then
16978    MSVCR_DLL="$new_path"
16979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16980$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16981  fi
16982
16983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16985
16986  else
16987    # We're on a posix platform. Hooray! :)
16988    path="$MSVCR_DLL"
16989
16990    if test ! -f "$path" && test ! -d "$path"; then
16991      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16992    fi
16993
16994    has_space=`$ECHO "$path" | $GREP " "`
16995    if test "x$has_space" != x; then
16996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16997$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16998      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16999    fi
17000  fi
17001
17002
17003
17004
17005# Check whether --with-dxsdk was given.
17006if test "${with_dxsdk+set}" = set; then :
17007  withval=$with_dxsdk;
17008fi
17009
17010
17011# Check whether --with-dxsdk-lib was given.
17012if test "${with_dxsdk_lib+set}" = set; then :
17013  withval=$with_dxsdk_lib;
17014fi
17015
17016
17017# Check whether --with-dxsdk-include was given.
17018if test "${with_dxsdk_include+set}" = set; then :
17019  withval=$with_dxsdk_include;
17020fi
17021
17022
17023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17024$as_echo_n "checking for DirectX SDK... " >&6; }
17025
17026  if test "x$with_dxsdk" != x; then
17027    dxsdk_path="$with_dxsdk"
17028  elif test "x$DXSDK_DIR" != x; then
17029    dxsdk_path="$DXSDK_DIR"
17030  elif test -d "C:/DXSDK"; then
17031    dxsdk_path="C:/DXSDK"
17032  else
17033    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17034  fi
17035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17036$as_echo "$dxsdk_path" >&6; }
17037
17038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17039
17040  # Input might be given as Windows format, start by converting to
17041  # unix format.
17042  path="$dxsdk_path"
17043  new_path=`$CYGPATH -u "$path"`
17044
17045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17048  # "foo.exe" is OK but "foo" is an error.
17049  #
17050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17051  # It is also a way to make sure we got the proper file name for the real test later on.
17052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17053  if test "x$test_shortpath" = x; then
17054    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17055$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17056    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17057  fi
17058
17059  # Call helper function which possibly converts this using DOS-style short mode.
17060  # If so, the updated path is stored in $new_path.
17061
17062  input_path="$new_path"
17063  # Check if we need to convert this using DOS-style short mode. If the path
17064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17065  # take no chances and rewrite it.
17066  # Note: m4 eats our [], so we need to use [ and ] instead.
17067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17068  if test "x$has_forbidden_chars" != x; then
17069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17073      # Going to short mode and back again did indeed matter. Since short mode is
17074      # case insensitive, let's make it lowercase to improve readability.
17075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17076      # Now convert it back to Unix-stile (cygpath)
17077      input_path=`$CYGPATH -u "$shortmode_path"`
17078      new_path="$input_path"
17079    fi
17080  fi
17081
17082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17083  if test "x$test_cygdrive_prefix" = x; then
17084    # As a simple fix, exclude /usr/bin since it's not a real path.
17085    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17087      # a path prefixed by /cygdrive for fixpath to work.
17088      new_path="$CYGWIN_ROOT_PATH$input_path"
17089    fi
17090  fi
17091
17092
17093  if test "x$path" != "x$new_path"; then
17094    dxsdk_path="$new_path"
17095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17096$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17097  fi
17098
17099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17100
17101  path="$dxsdk_path"
17102  has_colon=`$ECHO $path | $GREP ^.:`
17103  new_path="$path"
17104  if test "x$has_colon" = x; then
17105    # Not in mixed or Windows style, start by that.
17106    new_path=`cmd //c echo $path`
17107  fi
17108
17109
17110  input_path="$new_path"
17111  # Check if we need to convert this using DOS-style short mode. If the path
17112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17113  # take no chances and rewrite it.
17114  # Note: m4 eats our [], so we need to use [ and ] instead.
17115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17116  if test "x$has_forbidden_chars" != x; then
17117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17119  fi
17120
17121
17122  windows_path="$new_path"
17123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17124    unix_path=`$CYGPATH -u "$windows_path"`
17125    new_path="$unix_path"
17126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17128    new_path="$unix_path"
17129  fi
17130
17131  if test "x$path" != "x$new_path"; then
17132    dxsdk_path="$new_path"
17133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17134$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17135  fi
17136
17137  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17138  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17139
17140  else
17141    # We're on a posix platform. Hooray! :)
17142    path="$dxsdk_path"
17143
17144    if test ! -f "$path" && test ! -d "$path"; then
17145      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17146    fi
17147
17148    has_space=`$ECHO "$path" | $GREP " "`
17149    if test "x$has_space" != x; then
17150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17151$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17152      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17153    fi
17154  fi
17155
17156
17157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17158$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17159  if test "x$with_dxsdk_lib" != x; then
17160    DXSDK_LIB_PATH="$with_dxsdk_lib"
17161  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17162    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17163  else
17164    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17165  fi
17166  # dsound.lib is linked to in jsoundds
17167  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17168    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17169  fi
17170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17171$as_echo "$DXSDK_LIB_PATH" >&6; }
17172
17173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17174
17175  # Input might be given as Windows format, start by converting to
17176  # unix format.
17177  path="$DXSDK_LIB_PATH"
17178  new_path=`$CYGPATH -u "$path"`
17179
17180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17183  # "foo.exe" is OK but "foo" is an error.
17184  #
17185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17186  # It is also a way to make sure we got the proper file name for the real test later on.
17187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17188  if test "x$test_shortpath" = x; then
17189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17190$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17191    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17192  fi
17193
17194  # Call helper function which possibly converts this using DOS-style short mode.
17195  # If so, the updated path is stored in $new_path.
17196
17197  input_path="$new_path"
17198  # Check if we need to convert this using DOS-style short mode. If the path
17199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17200  # take no chances and rewrite it.
17201  # Note: m4 eats our [], so we need to use [ and ] instead.
17202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17203  if test "x$has_forbidden_chars" != x; then
17204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17208      # Going to short mode and back again did indeed matter. Since short mode is
17209      # case insensitive, let's make it lowercase to improve readability.
17210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17211      # Now convert it back to Unix-stile (cygpath)
17212      input_path=`$CYGPATH -u "$shortmode_path"`
17213      new_path="$input_path"
17214    fi
17215  fi
17216
17217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17218  if test "x$test_cygdrive_prefix" = x; then
17219    # As a simple fix, exclude /usr/bin since it's not a real path.
17220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17222      # a path prefixed by /cygdrive for fixpath to work.
17223      new_path="$CYGWIN_ROOT_PATH$input_path"
17224    fi
17225  fi
17226
17227
17228  if test "x$path" != "x$new_path"; then
17229    DXSDK_LIB_PATH="$new_path"
17230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17231$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17232  fi
17233
17234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17235
17236  path="$DXSDK_LIB_PATH"
17237  has_colon=`$ECHO $path | $GREP ^.:`
17238  new_path="$path"
17239  if test "x$has_colon" = x; then
17240    # Not in mixed or Windows style, start by that.
17241    new_path=`cmd //c echo $path`
17242  fi
17243
17244
17245  input_path="$new_path"
17246  # Check if we need to convert this using DOS-style short mode. If the path
17247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17248  # take no chances and rewrite it.
17249  # Note: m4 eats our [], so we need to use [ and ] instead.
17250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17251  if test "x$has_forbidden_chars" != x; then
17252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17254  fi
17255
17256
17257  windows_path="$new_path"
17258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17259    unix_path=`$CYGPATH -u "$windows_path"`
17260    new_path="$unix_path"
17261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17263    new_path="$unix_path"
17264  fi
17265
17266  if test "x$path" != "x$new_path"; then
17267    DXSDK_LIB_PATH="$new_path"
17268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17269$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17270  fi
17271
17272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17274
17275  else
17276    # We're on a posix platform. Hooray! :)
17277    path="$DXSDK_LIB_PATH"
17278
17279    if test ! -f "$path" && test ! -d "$path"; then
17280      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17281    fi
17282
17283    has_space=`$ECHO "$path" | $GREP " "`
17284    if test "x$has_space" != x; then
17285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17286$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17287      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17288    fi
17289  fi
17290
17291
17292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17293$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17294  if test "x$with_dxsdk_include" != x; then
17295    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17296  else
17297    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17298  fi
17299  # dsound.h is included in jsoundds
17300  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17301    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17302  fi
17303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17304$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17305
17306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17307
17308  # Input might be given as Windows format, start by converting to
17309  # unix format.
17310  path="$DXSDK_INCLUDE_PATH"
17311  new_path=`$CYGPATH -u "$path"`
17312
17313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17316  # "foo.exe" is OK but "foo" is an error.
17317  #
17318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17319  # It is also a way to make sure we got the proper file name for the real test later on.
17320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17321  if test "x$test_shortpath" = x; then
17322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17323$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17324    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17325  fi
17326
17327  # Call helper function which possibly converts this using DOS-style short mode.
17328  # If so, the updated path is stored in $new_path.
17329
17330  input_path="$new_path"
17331  # Check if we need to convert this using DOS-style short mode. If the path
17332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17333  # take no chances and rewrite it.
17334  # Note: m4 eats our [], so we need to use [ and ] instead.
17335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17336  if test "x$has_forbidden_chars" != x; then
17337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17341      # Going to short mode and back again did indeed matter. Since short mode is
17342      # case insensitive, let's make it lowercase to improve readability.
17343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17344      # Now convert it back to Unix-stile (cygpath)
17345      input_path=`$CYGPATH -u "$shortmode_path"`
17346      new_path="$input_path"
17347    fi
17348  fi
17349
17350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17351  if test "x$test_cygdrive_prefix" = x; then
17352    # As a simple fix, exclude /usr/bin since it's not a real path.
17353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17355      # a path prefixed by /cygdrive for fixpath to work.
17356      new_path="$CYGWIN_ROOT_PATH$input_path"
17357    fi
17358  fi
17359
17360
17361  if test "x$path" != "x$new_path"; then
17362    DXSDK_INCLUDE_PATH="$new_path"
17363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17364$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17365  fi
17366
17367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17368
17369  path="$DXSDK_INCLUDE_PATH"
17370  has_colon=`$ECHO $path | $GREP ^.:`
17371  new_path="$path"
17372  if test "x$has_colon" = x; then
17373    # Not in mixed or Windows style, start by that.
17374    new_path=`cmd //c echo $path`
17375  fi
17376
17377
17378  input_path="$new_path"
17379  # Check if we need to convert this using DOS-style short mode. If the path
17380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17381  # take no chances and rewrite it.
17382  # Note: m4 eats our [], so we need to use [ and ] instead.
17383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17384  if test "x$has_forbidden_chars" != x; then
17385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17387  fi
17388
17389
17390  windows_path="$new_path"
17391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17392    unix_path=`$CYGPATH -u "$windows_path"`
17393    new_path="$unix_path"
17394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17396    new_path="$unix_path"
17397  fi
17398
17399  if test "x$path" != "x$new_path"; then
17400    DXSDK_INCLUDE_PATH="$new_path"
17401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17402$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17403  fi
17404
17405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17407
17408  else
17409    # We're on a posix platform. Hooray! :)
17410    path="$DXSDK_INCLUDE_PATH"
17411
17412    if test ! -f "$path" && test ! -d "$path"; then
17413      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17414    fi
17415
17416    has_space=`$ECHO "$path" | $GREP " "`
17417    if test "x$has_space" != x; then
17418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17419$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17420      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17421    fi
17422  fi
17423
17424
17425
17426
17427  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17428
17429fi
17430
17431
17432
17433# If --build AND --host is set, then the configure script will find any
17434# cross compilation tools in the PATH. Cross compilation tools
17435# follows the cross compilation standard where they are prefixed with ${host}.
17436# For example the binary i686-sun-solaris2.10-gcc
17437# will cross compile for i686-sun-solaris2.10
17438# If neither of build and host is not set, then build=host and the
17439# default compiler found in the path will be used.
17440# Setting only --host, does not seem to be really supported.
17441# Please set both --build and --host if you want to cross compile.
17442
17443if test "x$COMPILE_TYPE" = "xcross"; then
17444    # Now we to find a C/C++ compiler that can build executables for the build
17445    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17446    # once. Also, we need to do this before adding a tools dir to the path,
17447    # otherwise we might pick up cross-compilers which don't use standard naming.
17448    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17449    # to wait until they are properly discovered.
17450    for ac_prog in cl cc gcc
17451do
17452  # Extract the first word of "$ac_prog", so it can be a program name with args.
17453set dummy $ac_prog; ac_word=$2
17454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17455$as_echo_n "checking for $ac_word... " >&6; }
17456if ${ac_cv_path_BUILD_CC+:} false; then :
17457  $as_echo_n "(cached) " >&6
17458else
17459  case $BUILD_CC in
17460  [\\/]* | ?:[\\/]*)
17461  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17462  ;;
17463  *)
17464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17465for as_dir in $PATH
17466do
17467  IFS=$as_save_IFS
17468  test -z "$as_dir" && as_dir=.
17469    for ac_exec_ext in '' $ac_executable_extensions; do
17470  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17471    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17473    break 2
17474  fi
17475done
17476  done
17477IFS=$as_save_IFS
17478
17479  ;;
17480esac
17481fi
17482BUILD_CC=$ac_cv_path_BUILD_CC
17483if test -n "$BUILD_CC"; then
17484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17485$as_echo "$BUILD_CC" >&6; }
17486else
17487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17488$as_echo "no" >&6; }
17489fi
17490
17491
17492  test -n "$BUILD_CC" && break
17493done
17494
17495
17496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17497
17498  # First separate the path from the arguments. This will split at the first
17499  # space.
17500  complete="$BUILD_CC"
17501  path="${complete%% *}"
17502  tmp="$complete EOL"
17503  arguments="${tmp#* }"
17504
17505  # Input might be given as Windows format, start by converting to
17506  # unix format.
17507  new_path=`$CYGPATH -u "$path"`
17508
17509  # Now try to locate executable using which
17510  new_path=`$WHICH "$new_path" 2> /dev/null`
17511  # bat and cmd files are not always considered executable in cygwin causing which
17512  # to not find them
17513  if test "x$new_path" = x \
17514           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17515           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17516    new_path=`$CYGPATH -u "$path"`
17517  fi
17518  if test "x$new_path" = x; then
17519    # Oops. Which didn't find the executable.
17520    # The splitting of arguments from the executable at a space might have been incorrect,
17521    # since paths with space are more likely in Windows. Give it another try with the whole
17522    # argument.
17523    path="$complete"
17524    arguments="EOL"
17525    new_path=`$CYGPATH -u "$path"`
17526    new_path=`$WHICH "$new_path" 2> /dev/null`
17527    # bat and cmd files are not always considered executable in cygwin causing which
17528    # to not find them
17529    if test "x$new_path" = x \
17530             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17531             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17532      new_path=`$CYGPATH -u "$path"`
17533    fi
17534    if test "x$new_path" = x; then
17535      # It's still not found. Now this is an unrecoverable error.
17536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17537$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17538      has_space=`$ECHO "$complete" | $GREP " "`
17539      if test "x$has_space" != x; then
17540        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17541$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17542      fi
17543      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17544    fi
17545  fi
17546
17547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17550  # "foo.exe" is OK but "foo" is an error.
17551  #
17552  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17553  # It is also a way to make sure we got the proper file name for the real test later on.
17554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17555  if test "x$test_shortpath" = x; then
17556    # Short path failed, file does not exist as specified.
17557    # Try adding .exe or .cmd
17558    if test -f "${new_path}.exe"; then
17559       input_to_shortpath="${new_path}.exe"
17560    elif test -f "${new_path}.cmd"; then
17561       input_to_shortpath="${new_path}.cmd"
17562    else
17563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17564$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17565      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17566$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17567      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17568    fi
17569  else
17570    input_to_shortpath="$new_path"
17571  fi
17572
17573  # Call helper function which possibly converts this using DOS-style short mode.
17574  # If so, the updated path is stored in $new_path.
17575  new_path="$input_to_shortpath"
17576
17577  input_path="$input_to_shortpath"
17578  # Check if we need to convert this using DOS-style short mode. If the path
17579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17580  # take no chances and rewrite it.
17581  # Note: m4 eats our [], so we need to use [ and ] instead.
17582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17583  if test "x$has_forbidden_chars" != x; then
17584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17588      # Going to short mode and back again did indeed matter. Since short mode is
17589      # case insensitive, let's make it lowercase to improve readability.
17590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17591      # Now convert it back to Unix-stile (cygpath)
17592      input_path=`$CYGPATH -u "$shortmode_path"`
17593      new_path="$input_path"
17594    fi
17595  fi
17596
17597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17598  if test "x$test_cygdrive_prefix" = x; then
17599    # As a simple fix, exclude /usr/bin since it's not a real path.
17600    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17602      # a path prefixed by /cygdrive for fixpath to work.
17603      new_path="$CYGWIN_ROOT_PATH$input_path"
17604    fi
17605  fi
17606
17607  # remove trailing .exe if any
17608  new_path="${new_path/%.exe/}"
17609
17610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17611
17612  # First separate the path from the arguments. This will split at the first
17613  # space.
17614  complete="$BUILD_CC"
17615  path="${complete%% *}"
17616  tmp="$complete EOL"
17617  arguments="${tmp#* }"
17618
17619  # Input might be given as Windows format, start by converting to
17620  # unix format.
17621  new_path="$path"
17622
17623  windows_path="$new_path"
17624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17625    unix_path=`$CYGPATH -u "$windows_path"`
17626    new_path="$unix_path"
17627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17629    new_path="$unix_path"
17630  fi
17631
17632
17633  # Now try to locate executable using which
17634  new_path=`$WHICH "$new_path" 2> /dev/null`
17635
17636  if test "x$new_path" = x; then
17637    # Oops. Which didn't find the executable.
17638    # The splitting of arguments from the executable at a space might have been incorrect,
17639    # since paths with space are more likely in Windows. Give it another try with the whole
17640    # argument.
17641    path="$complete"
17642    arguments="EOL"
17643    new_path="$path"
17644
17645  windows_path="$new_path"
17646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17647    unix_path=`$CYGPATH -u "$windows_path"`
17648    new_path="$unix_path"
17649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17651    new_path="$unix_path"
17652  fi
17653
17654
17655    new_path=`$WHICH "$new_path" 2> /dev/null`
17656
17657    if test "x$new_path" = x; then
17658      # It's still not found. Now this is an unrecoverable error.
17659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17660$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17661      has_space=`$ECHO "$complete" | $GREP " "`
17662      if test "x$has_space" != x; then
17663        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17664$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17665      fi
17666      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17667    fi
17668  fi
17669
17670  # Now new_path has a complete unix path to the binary
17671  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17672    # Keep paths in /bin as-is, but remove trailing .exe if any
17673    new_path="${new_path/%.exe/}"
17674    # Do not save /bin paths to all_fixpath_prefixes!
17675  else
17676    # Not in mixed or Windows style, start by that.
17677    new_path=`cmd //c echo $new_path`
17678
17679  input_path="$new_path"
17680  # Check if we need to convert this using DOS-style short mode. If the path
17681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17682  # take no chances and rewrite it.
17683  # Note: m4 eats our [], so we need to use [ and ] instead.
17684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17685  if test "x$has_forbidden_chars" != x; then
17686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17688  fi
17689
17690    # Output is in $new_path
17691
17692  windows_path="$new_path"
17693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17694    unix_path=`$CYGPATH -u "$windows_path"`
17695    new_path="$unix_path"
17696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17698    new_path="$unix_path"
17699  fi
17700
17701    # remove trailing .exe if any
17702    new_path="${new_path/%.exe/}"
17703
17704    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17705    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17706  fi
17707
17708  else
17709    # We're on a posix platform. Hooray! :)
17710    # First separate the path from the arguments. This will split at the first
17711    # space.
17712    complete="$BUILD_CC"
17713    path="${complete%% *}"
17714    tmp="$complete EOL"
17715    arguments="${tmp#* }"
17716
17717    # Cannot rely on the command "which" here since it doesn't always work.
17718    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17719    if test -z "$is_absolute_path"; then
17720      # Path to executable is not absolute. Find it.
17721      IFS_save="$IFS"
17722      IFS=:
17723      for p in $PATH; do
17724        if test -f "$p/$path" && test -x "$p/$path"; then
17725          new_path="$p/$path"
17726          break
17727        fi
17728      done
17729      IFS="$IFS_save"
17730    else
17731      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17732$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17733      new_path="$path"
17734    fi
17735
17736    if test "x$new_path" = x; then
17737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17738$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17739        has_space=`$ECHO "$complete" | $GREP " "`
17740        if test "x$has_space" != x; then
17741          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17742$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17743        fi
17744        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17745      fi
17746  fi
17747
17748      # Now join together the path and the arguments once again
17749      if test "x$arguments" != xEOL; then
17750        new_complete="$new_path ${arguments% *}"
17751      else
17752        new_complete="$new_path"
17753      fi
17754
17755  if test "x$complete" != "x$new_complete"; then
17756      BUILD_CC="$new_complete"
17757      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17758$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17759    fi
17760
17761    for ac_prog in cl CC g++
17762do
17763  # Extract the first word of "$ac_prog", so it can be a program name with args.
17764set dummy $ac_prog; ac_word=$2
17765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17766$as_echo_n "checking for $ac_word... " >&6; }
17767if ${ac_cv_path_BUILD_CXX+:} false; then :
17768  $as_echo_n "(cached) " >&6
17769else
17770  case $BUILD_CXX in
17771  [\\/]* | ?:[\\/]*)
17772  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17773  ;;
17774  *)
17775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17776for as_dir in $PATH
17777do
17778  IFS=$as_save_IFS
17779  test -z "$as_dir" && as_dir=.
17780    for ac_exec_ext in '' $ac_executable_extensions; do
17781  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17782    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17784    break 2
17785  fi
17786done
17787  done
17788IFS=$as_save_IFS
17789
17790  ;;
17791esac
17792fi
17793BUILD_CXX=$ac_cv_path_BUILD_CXX
17794if test -n "$BUILD_CXX"; then
17795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17796$as_echo "$BUILD_CXX" >&6; }
17797else
17798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17799$as_echo "no" >&6; }
17800fi
17801
17802
17803  test -n "$BUILD_CXX" && break
17804done
17805
17806
17807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17808
17809  # First separate the path from the arguments. This will split at the first
17810  # space.
17811  complete="$BUILD_CXX"
17812  path="${complete%% *}"
17813  tmp="$complete EOL"
17814  arguments="${tmp#* }"
17815
17816  # Input might be given as Windows format, start by converting to
17817  # unix format.
17818  new_path=`$CYGPATH -u "$path"`
17819
17820  # Now try to locate executable using which
17821  new_path=`$WHICH "$new_path" 2> /dev/null`
17822  # bat and cmd files are not always considered executable in cygwin causing which
17823  # to not find them
17824  if test "x$new_path" = x \
17825           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17826           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17827    new_path=`$CYGPATH -u "$path"`
17828  fi
17829  if test "x$new_path" = x; then
17830    # Oops. Which didn't find the executable.
17831    # The splitting of arguments from the executable at a space might have been incorrect,
17832    # since paths with space are more likely in Windows. Give it another try with the whole
17833    # argument.
17834    path="$complete"
17835    arguments="EOL"
17836    new_path=`$CYGPATH -u "$path"`
17837    new_path=`$WHICH "$new_path" 2> /dev/null`
17838    # bat and cmd files are not always considered executable in cygwin causing which
17839    # to not find them
17840    if test "x$new_path" = x \
17841             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17842             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17843      new_path=`$CYGPATH -u "$path"`
17844    fi
17845    if test "x$new_path" = x; then
17846      # It's still not found. Now this is an unrecoverable error.
17847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17848$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17849      has_space=`$ECHO "$complete" | $GREP " "`
17850      if test "x$has_space" != x; then
17851        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17852$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17853      fi
17854      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17855    fi
17856  fi
17857
17858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17861  # "foo.exe" is OK but "foo" is an error.
17862  #
17863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17864  # It is also a way to make sure we got the proper file name for the real test later on.
17865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17866  if test "x$test_shortpath" = x; then
17867    # Short path failed, file does not exist as specified.
17868    # Try adding .exe or .cmd
17869    if test -f "${new_path}.exe"; then
17870       input_to_shortpath="${new_path}.exe"
17871    elif test -f "${new_path}.cmd"; then
17872       input_to_shortpath="${new_path}.cmd"
17873    else
17874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17875$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17876      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17877$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17878      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17879    fi
17880  else
17881    input_to_shortpath="$new_path"
17882  fi
17883
17884  # Call helper function which possibly converts this using DOS-style short mode.
17885  # If so, the updated path is stored in $new_path.
17886  new_path="$input_to_shortpath"
17887
17888  input_path="$input_to_shortpath"
17889  # Check if we need to convert this using DOS-style short mode. If the path
17890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17891  # take no chances and rewrite it.
17892  # Note: m4 eats our [], so we need to use [ and ] instead.
17893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17894  if test "x$has_forbidden_chars" != x; then
17895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17899      # Going to short mode and back again did indeed matter. Since short mode is
17900      # case insensitive, let's make it lowercase to improve readability.
17901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17902      # Now convert it back to Unix-stile (cygpath)
17903      input_path=`$CYGPATH -u "$shortmode_path"`
17904      new_path="$input_path"
17905    fi
17906  fi
17907
17908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17909  if test "x$test_cygdrive_prefix" = x; then
17910    # As a simple fix, exclude /usr/bin since it's not a real path.
17911    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17913      # a path prefixed by /cygdrive for fixpath to work.
17914      new_path="$CYGWIN_ROOT_PATH$input_path"
17915    fi
17916  fi
17917
17918  # remove trailing .exe if any
17919  new_path="${new_path/%.exe/}"
17920
17921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17922
17923  # First separate the path from the arguments. This will split at the first
17924  # space.
17925  complete="$BUILD_CXX"
17926  path="${complete%% *}"
17927  tmp="$complete EOL"
17928  arguments="${tmp#* }"
17929
17930  # Input might be given as Windows format, start by converting to
17931  # unix format.
17932  new_path="$path"
17933
17934  windows_path="$new_path"
17935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17936    unix_path=`$CYGPATH -u "$windows_path"`
17937    new_path="$unix_path"
17938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17940    new_path="$unix_path"
17941  fi
17942
17943
17944  # Now try to locate executable using which
17945  new_path=`$WHICH "$new_path" 2> /dev/null`
17946
17947  if test "x$new_path" = x; then
17948    # Oops. Which didn't find the executable.
17949    # The splitting of arguments from the executable at a space might have been incorrect,
17950    # since paths with space are more likely in Windows. Give it another try with the whole
17951    # argument.
17952    path="$complete"
17953    arguments="EOL"
17954    new_path="$path"
17955
17956  windows_path="$new_path"
17957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17958    unix_path=`$CYGPATH -u "$windows_path"`
17959    new_path="$unix_path"
17960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17962    new_path="$unix_path"
17963  fi
17964
17965
17966    new_path=`$WHICH "$new_path" 2> /dev/null`
17967
17968    if test "x$new_path" = x; then
17969      # It's still not found. Now this is an unrecoverable error.
17970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17971$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17972      has_space=`$ECHO "$complete" | $GREP " "`
17973      if test "x$has_space" != x; then
17974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17976      fi
17977      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17978    fi
17979  fi
17980
17981  # Now new_path has a complete unix path to the binary
17982  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17983    # Keep paths in /bin as-is, but remove trailing .exe if any
17984    new_path="${new_path/%.exe/}"
17985    # Do not save /bin paths to all_fixpath_prefixes!
17986  else
17987    # Not in mixed or Windows style, start by that.
17988    new_path=`cmd //c echo $new_path`
17989
17990  input_path="$new_path"
17991  # Check if we need to convert this using DOS-style short mode. If the path
17992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17993  # take no chances and rewrite it.
17994  # Note: m4 eats our [], so we need to use [ and ] instead.
17995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17996  if test "x$has_forbidden_chars" != x; then
17997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17999  fi
18000
18001    # Output is in $new_path
18002
18003  windows_path="$new_path"
18004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18005    unix_path=`$CYGPATH -u "$windows_path"`
18006    new_path="$unix_path"
18007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18009    new_path="$unix_path"
18010  fi
18011
18012    # remove trailing .exe if any
18013    new_path="${new_path/%.exe/}"
18014
18015    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18016    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18017  fi
18018
18019  else
18020    # We're on a posix platform. Hooray! :)
18021    # First separate the path from the arguments. This will split at the first
18022    # space.
18023    complete="$BUILD_CXX"
18024    path="${complete%% *}"
18025    tmp="$complete EOL"
18026    arguments="${tmp#* }"
18027
18028    # Cannot rely on the command "which" here since it doesn't always work.
18029    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18030    if test -z "$is_absolute_path"; then
18031      # Path to executable is not absolute. Find it.
18032      IFS_save="$IFS"
18033      IFS=:
18034      for p in $PATH; do
18035        if test -f "$p/$path" && test -x "$p/$path"; then
18036          new_path="$p/$path"
18037          break
18038        fi
18039      done
18040      IFS="$IFS_save"
18041    else
18042      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18043$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18044      new_path="$path"
18045    fi
18046
18047    if test "x$new_path" = x; then
18048        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18049$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18050        has_space=`$ECHO "$complete" | $GREP " "`
18051        if test "x$has_space" != x; then
18052          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18053$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18054        fi
18055        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18056      fi
18057  fi
18058
18059      # Now join together the path and the arguments once again
18060      if test "x$arguments" != xEOL; then
18061        new_complete="$new_path ${arguments% *}"
18062      else
18063        new_complete="$new_path"
18064      fi
18065
18066  if test "x$complete" != "x$new_complete"; then
18067      BUILD_CXX="$new_complete"
18068      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18069$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18070    fi
18071
18072    # Extract the first word of "ld", so it can be a program name with args.
18073set dummy ld; ac_word=$2
18074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18075$as_echo_n "checking for $ac_word... " >&6; }
18076if ${ac_cv_path_BUILD_LD+:} false; then :
18077  $as_echo_n "(cached) " >&6
18078else
18079  case $BUILD_LD in
18080  [\\/]* | ?:[\\/]*)
18081  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18082  ;;
18083  *)
18084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18085for as_dir in $PATH
18086do
18087  IFS=$as_save_IFS
18088  test -z "$as_dir" && as_dir=.
18089    for ac_exec_ext in '' $ac_executable_extensions; do
18090  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18091    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18093    break 2
18094  fi
18095done
18096  done
18097IFS=$as_save_IFS
18098
18099  ;;
18100esac
18101fi
18102BUILD_LD=$ac_cv_path_BUILD_LD
18103if test -n "$BUILD_LD"; then
18104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18105$as_echo "$BUILD_LD" >&6; }
18106else
18107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18108$as_echo "no" >&6; }
18109fi
18110
18111
18112
18113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18114
18115  # First separate the path from the arguments. This will split at the first
18116  # space.
18117  complete="$BUILD_LD"
18118  path="${complete%% *}"
18119  tmp="$complete EOL"
18120  arguments="${tmp#* }"
18121
18122  # Input might be given as Windows format, start by converting to
18123  # unix format.
18124  new_path=`$CYGPATH -u "$path"`
18125
18126  # Now try to locate executable using which
18127  new_path=`$WHICH "$new_path" 2> /dev/null`
18128  # bat and cmd files are not always considered executable in cygwin causing which
18129  # to not find them
18130  if test "x$new_path" = x \
18131           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18132           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18133    new_path=`$CYGPATH -u "$path"`
18134  fi
18135  if test "x$new_path" = x; then
18136    # Oops. Which didn't find the executable.
18137    # The splitting of arguments from the executable at a space might have been incorrect,
18138    # since paths with space are more likely in Windows. Give it another try with the whole
18139    # argument.
18140    path="$complete"
18141    arguments="EOL"
18142    new_path=`$CYGPATH -u "$path"`
18143    new_path=`$WHICH "$new_path" 2> /dev/null`
18144    # bat and cmd files are not always considered executable in cygwin causing which
18145    # to not find them
18146    if test "x$new_path" = x \
18147             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18148             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18149      new_path=`$CYGPATH -u "$path"`
18150    fi
18151    if test "x$new_path" = x; then
18152      # It's still not found. Now this is an unrecoverable error.
18153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18154$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18155      has_space=`$ECHO "$complete" | $GREP " "`
18156      if test "x$has_space" != x; then
18157        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18158$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18159      fi
18160      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18161    fi
18162  fi
18163
18164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18167  # "foo.exe" is OK but "foo" is an error.
18168  #
18169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18170  # It is also a way to make sure we got the proper file name for the real test later on.
18171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18172  if test "x$test_shortpath" = x; then
18173    # Short path failed, file does not exist as specified.
18174    # Try adding .exe or .cmd
18175    if test -f "${new_path}.exe"; then
18176       input_to_shortpath="${new_path}.exe"
18177    elif test -f "${new_path}.cmd"; then
18178       input_to_shortpath="${new_path}.cmd"
18179    else
18180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18181$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18182      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18183$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18184      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18185    fi
18186  else
18187    input_to_shortpath="$new_path"
18188  fi
18189
18190  # Call helper function which possibly converts this using DOS-style short mode.
18191  # If so, the updated path is stored in $new_path.
18192  new_path="$input_to_shortpath"
18193
18194  input_path="$input_to_shortpath"
18195  # Check if we need to convert this using DOS-style short mode. If the path
18196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18197  # take no chances and rewrite it.
18198  # Note: m4 eats our [], so we need to use [ and ] instead.
18199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18200  if test "x$has_forbidden_chars" != x; then
18201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18205      # Going to short mode and back again did indeed matter. Since short mode is
18206      # case insensitive, let's make it lowercase to improve readability.
18207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18208      # Now convert it back to Unix-stile (cygpath)
18209      input_path=`$CYGPATH -u "$shortmode_path"`
18210      new_path="$input_path"
18211    fi
18212  fi
18213
18214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18215  if test "x$test_cygdrive_prefix" = x; then
18216    # As a simple fix, exclude /usr/bin since it's not a real path.
18217    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18219      # a path prefixed by /cygdrive for fixpath to work.
18220      new_path="$CYGWIN_ROOT_PATH$input_path"
18221    fi
18222  fi
18223
18224  # remove trailing .exe if any
18225  new_path="${new_path/%.exe/}"
18226
18227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18228
18229  # First separate the path from the arguments. This will split at the first
18230  # space.
18231  complete="$BUILD_LD"
18232  path="${complete%% *}"
18233  tmp="$complete EOL"
18234  arguments="${tmp#* }"
18235
18236  # Input might be given as Windows format, start by converting to
18237  # unix format.
18238  new_path="$path"
18239
18240  windows_path="$new_path"
18241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18242    unix_path=`$CYGPATH -u "$windows_path"`
18243    new_path="$unix_path"
18244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18246    new_path="$unix_path"
18247  fi
18248
18249
18250  # Now try to locate executable using which
18251  new_path=`$WHICH "$new_path" 2> /dev/null`
18252
18253  if test "x$new_path" = x; then
18254    # Oops. Which didn't find the executable.
18255    # The splitting of arguments from the executable at a space might have been incorrect,
18256    # since paths with space are more likely in Windows. Give it another try with the whole
18257    # argument.
18258    path="$complete"
18259    arguments="EOL"
18260    new_path="$path"
18261
18262  windows_path="$new_path"
18263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18264    unix_path=`$CYGPATH -u "$windows_path"`
18265    new_path="$unix_path"
18266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18268    new_path="$unix_path"
18269  fi
18270
18271
18272    new_path=`$WHICH "$new_path" 2> /dev/null`
18273
18274    if test "x$new_path" = x; then
18275      # It's still not found. Now this is an unrecoverable error.
18276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18277$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18278      has_space=`$ECHO "$complete" | $GREP " "`
18279      if test "x$has_space" != x; then
18280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18282      fi
18283      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18284    fi
18285  fi
18286
18287  # Now new_path has a complete unix path to the binary
18288  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18289    # Keep paths in /bin as-is, but remove trailing .exe if any
18290    new_path="${new_path/%.exe/}"
18291    # Do not save /bin paths to all_fixpath_prefixes!
18292  else
18293    # Not in mixed or Windows style, start by that.
18294    new_path=`cmd //c echo $new_path`
18295
18296  input_path="$new_path"
18297  # Check if we need to convert this using DOS-style short mode. If the path
18298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18299  # take no chances and rewrite it.
18300  # Note: m4 eats our [], so we need to use [ and ] instead.
18301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18302  if test "x$has_forbidden_chars" != x; then
18303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18305  fi
18306
18307    # Output is in $new_path
18308
18309  windows_path="$new_path"
18310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18311    unix_path=`$CYGPATH -u "$windows_path"`
18312    new_path="$unix_path"
18313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18315    new_path="$unix_path"
18316  fi
18317
18318    # remove trailing .exe if any
18319    new_path="${new_path/%.exe/}"
18320
18321    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18322    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18323  fi
18324
18325  else
18326    # We're on a posix platform. Hooray! :)
18327    # First separate the path from the arguments. This will split at the first
18328    # space.
18329    complete="$BUILD_LD"
18330    path="${complete%% *}"
18331    tmp="$complete EOL"
18332    arguments="${tmp#* }"
18333
18334    # Cannot rely on the command "which" here since it doesn't always work.
18335    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18336    if test -z "$is_absolute_path"; then
18337      # Path to executable is not absolute. Find it.
18338      IFS_save="$IFS"
18339      IFS=:
18340      for p in $PATH; do
18341        if test -f "$p/$path" && test -x "$p/$path"; then
18342          new_path="$p/$path"
18343          break
18344        fi
18345      done
18346      IFS="$IFS_save"
18347    else
18348      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18349$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18350      new_path="$path"
18351    fi
18352
18353    if test "x$new_path" = x; then
18354        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18355$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18356        has_space=`$ECHO "$complete" | $GREP " "`
18357        if test "x$has_space" != x; then
18358          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18359$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18360        fi
18361        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18362      fi
18363  fi
18364
18365      # Now join together the path and the arguments once again
18366      if test "x$arguments" != xEOL; then
18367        new_complete="$new_path ${arguments% *}"
18368      else
18369        new_complete="$new_path"
18370      fi
18371
18372  if test "x$complete" != "x$new_complete"; then
18373      BUILD_LD="$new_complete"
18374      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18375$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18376    fi
18377
18378fi
18379
18380
18381
18382
18383# If a devkit is found on the builddeps server, then prepend its path to the
18384# PATH variable. If there are cross compilers available in the devkit, these
18385# will be found by AC_PROG_CC et al.
18386DEVKIT=
18387
18388
18389    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18390        # Source the builddeps file again, to make sure it uses the latest variables!
18391        . $builddepsfile
18392        # Look for a target and build machine specific resource!
18393        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18394        if test "x$resource" = x; then
18395            # Ok, lets instead look for a target specific resource
18396            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18397        fi
18398        if test "x$resource" = x; then
18399            # Ok, lets instead look for a build specific resource
18400            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18401        fi
18402        if test "x$resource" = x; then
18403            # Ok, lets instead look for a generic resource
18404            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18405            resource=${builddep_devkit}
18406        fi
18407        if test "x$resource" != x; then
18408            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18409$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18410	    # If the resource in the builddeps.conf file is an existing directory,
18411	    # for example /java/linux/cups
18412	    if test -d ${resource}; then
18413	       depdir=${resource}
18414	    else
18415
18416# devkit is for example mymodule
18417# $resource is for example libs/general/libmymod_1_2_3.zip
18418# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18419# $with_builddeps_dir is for example /localhome/builddeps
18420# depdir is the name of the variable into which we store the depdir, eg MYMOD
18421# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18422# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18423    filename=`basename $resource`
18424    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18425    filebase=${filename%%.*}
18426    extension=${filename#*.}
18427    installdir=$with_builddeps_dir/$filebase
18428    if test ! -f $installdir/$filename.unpacked; then
18429        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18430$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18431        if test ! -d $installdir; then
18432            mkdir -p $installdir
18433        fi
18434        if test ! -d $installdir; then
18435            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18436        fi
18437        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18438        touch $tmpfile
18439        if test ! -f $tmpfile; then
18440            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18441        fi
18442
18443    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18444    # $tmpfile is the local file name for the downloaded file.
18445    VALID_TOOL=no
18446    if test "x$BDEPS_FTP" = xwget; then
18447       VALID_TOOL=yes
18448       wget -O $tmpfile $with_builddeps_server/$resource
18449    fi
18450    if test "x$BDEPS_FTP" = xlftp; then
18451       VALID_TOOL=yes
18452       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18453    fi
18454    if test "x$BDEPS_FTP" = xftp; then
18455        VALID_TOOL=yes
18456        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18457        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18458        FTPUSERPWD=${FTPSERVER%%@*}
18459        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18460            FTPUSER=${userpwd%%:*}
18461            FTPPWD=${userpwd#*@}
18462            FTPSERVER=${FTPSERVER#*@}
18463        else
18464            FTPUSER=ftp
18465            FTPPWD=ftp
18466        fi
18467        # the "pass" command does not work on some
18468        # ftp clients (read ftp.exe) but if it works,
18469        # passive mode is better!
18470        (\
18471            echo "user $FTPUSER $FTPPWD"        ;\
18472            echo "pass"                         ;\
18473            echo "bin"                          ;\
18474            echo "get $FTPPATH $tmpfile"              ;\
18475        ) | ftp -in $FTPSERVER
18476    fi
18477    if test "x$VALID_TOOL" != xyes; then
18478       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18479    fi
18480
18481        mv $tmpfile $installdir/$filename
18482        if test ! -s $installdir/$filename; then
18483            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18484        fi
18485        case "$extension" in
18486            zip)  echo "Unzipping $installdir/$filename..."
18487               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18488            ;;
18489            tar.gz) echo "Untaring $installdir/$filename..."
18490               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18491            ;;
18492            tgz) echo "Untaring $installdir/$filename..."
18493               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18494            ;;
18495            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18496            ;;
18497        esac
18498    fi
18499    if test -f $installdir/$filename.unpacked; then
18500        depdir=$installdir
18501    fi
18502
18503	    fi
18504            # Source the builddeps file again, because in the previous command, the depdir
18505            # was updated to point at the current build dependency install directory.
18506            . $builddepsfile
18507            # Now extract variables from the builddeps.conf files.
18508            theroot=${builddep_devkit_ROOT}
18509            thecflags=${builddep_devkit_CFLAGS}
18510            thelibs=${builddep_devkit_LIBS}
18511            if test "x$depdir" = x; then
18512                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18513            fi
18514            DEVKIT=$depdir
18515            if test "x$theroot" != x; then
18516               DEVKIT="$theroot"
18517            fi
18518            if test "x$thecflags" != x; then
18519               DEVKIT_CFLAGS="$thecflags"
18520            fi
18521            if test "x$thelibs" != x; then
18522               DEVKIT_LIBS="$thelibs"
18523            fi
18524            # Found devkit
18525                     PATH="$DEVKIT/bin:$PATH"
18526                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18527                     if test "x$x_includes" = "xNONE"; then
18528                         x_includes="$SYS_ROOT/usr/include/X11"
18529                     fi
18530                     if test "x$x_libraries" = "xNONE"; then
18531                         x_libraries="$SYS_ROOT/usr/lib"
18532                     fi
18533
18534
18535        fi
18536
18537    fi
18538
18539
18540if test "x$SYS_ROOT" != "x/" ; then
18541    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18542    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18543    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18544    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18545    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18546    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18547fi
18548
18549# Store the CFLAGS etal passed to the configure script.
18550ORG_CFLAGS="$CFLAGS"
18551ORG_CXXFLAGS="$CXXFLAGS"
18552ORG_OBJCFLAGS="$OBJCFLAGS"
18553
18554# autoconf magic only relies on PATH, so update it if tools dir is specified
18555OLD_PATH="$PATH"
18556if test "x$TOOLS_DIR" != x; then
18557  PATH=$TOOLS_DIR:$PATH
18558fi
18559
18560
18561### Locate C compiler (CC)
18562
18563# On windows, only cl.exe is supported.
18564# On Solaris, cc is preferred to gcc.
18565# Elsewhere, gcc is preferred to cc.
18566
18567if test "x$CC" != x; then
18568  COMPILER_CHECK_LIST="$CC"
18569elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18570  COMPILER_CHECK_LIST="cl"
18571elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18572  COMPILER_CHECK_LIST="cc gcc"
18573else
18574  COMPILER_CHECK_LIST="gcc cc"
18575fi
18576
18577
18578  COMPILER_NAME=C
18579
18580  CC=
18581  # If TOOLS_DIR is set, check for all compiler names in there first
18582  # before checking the rest of the PATH.
18583  if test -n "$TOOLS_DIR"; then
18584    PATH_save="$PATH"
18585    PATH="$TOOLS_DIR"
18586    for ac_prog in $COMPILER_CHECK_LIST
18587do
18588  # Extract the first word of "$ac_prog", so it can be a program name with args.
18589set dummy $ac_prog; ac_word=$2
18590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18591$as_echo_n "checking for $ac_word... " >&6; }
18592if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18593  $as_echo_n "(cached) " >&6
18594else
18595  case $TOOLS_DIR_CC in
18596  [\\/]* | ?:[\\/]*)
18597  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18598  ;;
18599  *)
18600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18601for as_dir in $PATH
18602do
18603  IFS=$as_save_IFS
18604  test -z "$as_dir" && as_dir=.
18605    for ac_exec_ext in '' $ac_executable_extensions; do
18606  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18607    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18609    break 2
18610  fi
18611done
18612  done
18613IFS=$as_save_IFS
18614
18615  ;;
18616esac
18617fi
18618TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18619if test -n "$TOOLS_DIR_CC"; then
18620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18621$as_echo "$TOOLS_DIR_CC" >&6; }
18622else
18623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18624$as_echo "no" >&6; }
18625fi
18626
18627
18628  test -n "$TOOLS_DIR_CC" && break
18629done
18630
18631    CC=$TOOLS_DIR_CC
18632    PATH="$PATH_save"
18633  fi
18634
18635  # AC_PATH_PROGS can't be run multiple times with the same variable,
18636  # so create a new name for this run.
18637  if test "x$CC" = x; then
18638    for ac_prog in $COMPILER_CHECK_LIST
18639do
18640  # Extract the first word of "$ac_prog", so it can be a program name with args.
18641set dummy $ac_prog; ac_word=$2
18642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18643$as_echo_n "checking for $ac_word... " >&6; }
18644if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18645  $as_echo_n "(cached) " >&6
18646else
18647  case $POTENTIAL_CC in
18648  [\\/]* | ?:[\\/]*)
18649  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18650  ;;
18651  *)
18652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18653for as_dir in $PATH
18654do
18655  IFS=$as_save_IFS
18656  test -z "$as_dir" && as_dir=.
18657    for ac_exec_ext in '' $ac_executable_extensions; do
18658  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18659    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18661    break 2
18662  fi
18663done
18664  done
18665IFS=$as_save_IFS
18666
18667  ;;
18668esac
18669fi
18670POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18671if test -n "$POTENTIAL_CC"; then
18672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18673$as_echo "$POTENTIAL_CC" >&6; }
18674else
18675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18676$as_echo "no" >&6; }
18677fi
18678
18679
18680  test -n "$POTENTIAL_CC" && break
18681done
18682
18683    CC=$POTENTIAL_CC
18684  fi
18685
18686  if test "x$CC" = x; then
18687
18688    # Print a helpful message on how to acquire the necessary build dependency.
18689    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18690    MISSING_DEPENDENCY=devkit
18691    PKGHANDLER_COMMAND=
18692
18693    case $PKGHANDLER in
18694	apt-get)
18695                apt_help     $MISSING_DEPENDENCY ;;
18696    yum)
18697                yum_help     $MISSING_DEPENDENCY ;;
18698	port)
18699                port_help    $MISSING_DEPENDENCY ;;
18700	pkgutil)
18701                pkgutil_help $MISSING_DEPENDENCY ;;
18702	pkgadd)
18703                pkgadd_help  $MISSING_DEPENDENCY ;;
18704    * )
18705      break ;;
18706    esac
18707
18708    if test "x$PKGHANDLER_COMMAND" != x; then
18709        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18710    fi
18711
18712      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18713  fi
18714
18715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18716
18717  # First separate the path from the arguments. This will split at the first
18718  # space.
18719  complete="$CC"
18720  path="${complete%% *}"
18721  tmp="$complete EOL"
18722  arguments="${tmp#* }"
18723
18724  # Input might be given as Windows format, start by converting to
18725  # unix format.
18726  new_path=`$CYGPATH -u "$path"`
18727
18728  # Now try to locate executable using which
18729  new_path=`$WHICH "$new_path" 2> /dev/null`
18730  # bat and cmd files are not always considered executable in cygwin causing which
18731  # to not find them
18732  if test "x$new_path" = x \
18733           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18734           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18735    new_path=`$CYGPATH -u "$path"`
18736  fi
18737  if test "x$new_path" = x; then
18738    # Oops. Which didn't find the executable.
18739    # The splitting of arguments from the executable at a space might have been incorrect,
18740    # since paths with space are more likely in Windows. Give it another try with the whole
18741    # argument.
18742    path="$complete"
18743    arguments="EOL"
18744    new_path=`$CYGPATH -u "$path"`
18745    new_path=`$WHICH "$new_path" 2> /dev/null`
18746    # bat and cmd files are not always considered executable in cygwin causing which
18747    # to not find them
18748    if test "x$new_path" = x \
18749             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18750             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18751      new_path=`$CYGPATH -u "$path"`
18752    fi
18753    if test "x$new_path" = x; then
18754      # It's still not found. Now this is an unrecoverable error.
18755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18756$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18757      has_space=`$ECHO "$complete" | $GREP " "`
18758      if test "x$has_space" != x; then
18759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18761      fi
18762      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18763    fi
18764  fi
18765
18766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18769  # "foo.exe" is OK but "foo" is an error.
18770  #
18771  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18772  # It is also a way to make sure we got the proper file name for the real test later on.
18773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18774  if test "x$test_shortpath" = x; then
18775    # Short path failed, file does not exist as specified.
18776    # Try adding .exe or .cmd
18777    if test -f "${new_path}.exe"; then
18778       input_to_shortpath="${new_path}.exe"
18779    elif test -f "${new_path}.cmd"; then
18780       input_to_shortpath="${new_path}.cmd"
18781    else
18782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18783$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18784      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18785$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18786      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18787    fi
18788  else
18789    input_to_shortpath="$new_path"
18790  fi
18791
18792  # Call helper function which possibly converts this using DOS-style short mode.
18793  # If so, the updated path is stored in $new_path.
18794  new_path="$input_to_shortpath"
18795
18796  input_path="$input_to_shortpath"
18797  # Check if we need to convert this using DOS-style short mode. If the path
18798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18799  # take no chances and rewrite it.
18800  # Note: m4 eats our [], so we need to use [ and ] instead.
18801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18802  if test "x$has_forbidden_chars" != x; then
18803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18807      # Going to short mode and back again did indeed matter. Since short mode is
18808      # case insensitive, let's make it lowercase to improve readability.
18809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18810      # Now convert it back to Unix-stile (cygpath)
18811      input_path=`$CYGPATH -u "$shortmode_path"`
18812      new_path="$input_path"
18813    fi
18814  fi
18815
18816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18817  if test "x$test_cygdrive_prefix" = x; then
18818    # As a simple fix, exclude /usr/bin since it's not a real path.
18819    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18821      # a path prefixed by /cygdrive for fixpath to work.
18822      new_path="$CYGWIN_ROOT_PATH$input_path"
18823    fi
18824  fi
18825
18826  # remove trailing .exe if any
18827  new_path="${new_path/%.exe/}"
18828
18829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18830
18831  # First separate the path from the arguments. This will split at the first
18832  # space.
18833  complete="$CC"
18834  path="${complete%% *}"
18835  tmp="$complete EOL"
18836  arguments="${tmp#* }"
18837
18838  # Input might be given as Windows format, start by converting to
18839  # unix format.
18840  new_path="$path"
18841
18842  windows_path="$new_path"
18843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18844    unix_path=`$CYGPATH -u "$windows_path"`
18845    new_path="$unix_path"
18846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18848    new_path="$unix_path"
18849  fi
18850
18851
18852  # Now try to locate executable using which
18853  new_path=`$WHICH "$new_path" 2> /dev/null`
18854
18855  if test "x$new_path" = x; then
18856    # Oops. Which didn't find the executable.
18857    # The splitting of arguments from the executable at a space might have been incorrect,
18858    # since paths with space are more likely in Windows. Give it another try with the whole
18859    # argument.
18860    path="$complete"
18861    arguments="EOL"
18862    new_path="$path"
18863
18864  windows_path="$new_path"
18865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18866    unix_path=`$CYGPATH -u "$windows_path"`
18867    new_path="$unix_path"
18868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18870    new_path="$unix_path"
18871  fi
18872
18873
18874    new_path=`$WHICH "$new_path" 2> /dev/null`
18875
18876    if test "x$new_path" = x; then
18877      # It's still not found. Now this is an unrecoverable error.
18878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18879$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18880      has_space=`$ECHO "$complete" | $GREP " "`
18881      if test "x$has_space" != x; then
18882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18884      fi
18885      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18886    fi
18887  fi
18888
18889  # Now new_path has a complete unix path to the binary
18890  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18891    # Keep paths in /bin as-is, but remove trailing .exe if any
18892    new_path="${new_path/%.exe/}"
18893    # Do not save /bin paths to all_fixpath_prefixes!
18894  else
18895    # Not in mixed or Windows style, start by that.
18896    new_path=`cmd //c echo $new_path`
18897
18898  input_path="$new_path"
18899  # Check if we need to convert this using DOS-style short mode. If the path
18900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18901  # take no chances and rewrite it.
18902  # Note: m4 eats our [], so we need to use [ and ] instead.
18903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18904  if test "x$has_forbidden_chars" != x; then
18905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18907  fi
18908
18909    # Output is in $new_path
18910
18911  windows_path="$new_path"
18912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18913    unix_path=`$CYGPATH -u "$windows_path"`
18914    new_path="$unix_path"
18915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18917    new_path="$unix_path"
18918  fi
18919
18920    # remove trailing .exe if any
18921    new_path="${new_path/%.exe/}"
18922
18923    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18924    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18925  fi
18926
18927  else
18928    # We're on a posix platform. Hooray! :)
18929    # First separate the path from the arguments. This will split at the first
18930    # space.
18931    complete="$CC"
18932    path="${complete%% *}"
18933    tmp="$complete EOL"
18934    arguments="${tmp#* }"
18935
18936    # Cannot rely on the command "which" here since it doesn't always work.
18937    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18938    if test -z "$is_absolute_path"; then
18939      # Path to executable is not absolute. Find it.
18940      IFS_save="$IFS"
18941      IFS=:
18942      for p in $PATH; do
18943        if test -f "$p/$path" && test -x "$p/$path"; then
18944          new_path="$p/$path"
18945          break
18946        fi
18947      done
18948      IFS="$IFS_save"
18949    else
18950      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18951$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18952      new_path="$path"
18953    fi
18954
18955    if test "x$new_path" = x; then
18956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18957$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18958        has_space=`$ECHO "$complete" | $GREP " "`
18959        if test "x$has_space" != x; then
18960          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18961$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18962        fi
18963        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18964      fi
18965  fi
18966
18967      # Now join together the path and the arguments once again
18968      if test "x$arguments" != xEOL; then
18969        new_complete="$new_path ${arguments% *}"
18970      else
18971        new_complete="$new_path"
18972      fi
18973
18974  if test "x$complete" != "x$new_complete"; then
18975      CC="$new_complete"
18976      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18977$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18978    fi
18979
18980  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18981$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18982  TEST_COMPILER="$CC"
18983
18984    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18985        # Follow a chain of symbolic links. Use readlink
18986        # where it exists, else fall back to horribly
18987        # complicated shell code.
18988        if test "x$READLINK_TESTED" != yes; then
18989            # On MacOSX there is a readlink tool with a different
18990            # purpose than the GNU readlink tool. Check the found readlink.
18991            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18992            if test "x$ISGNU" = x; then
18993                 # A readlink that we do not know how to use.
18994                 # Are there other non-GNU readlinks out there?
18995                 READLINK_TESTED=yes
18996                 READLINK=
18997            fi
18998        fi
18999
19000        if test "x$READLINK" != x; then
19001            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19002        else
19003            # Save the current directory for restoring afterwards
19004            STARTDIR=$PWD
19005            COUNTER=0
19006            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19007            sym_link_file=`$BASENAME $TEST_COMPILER`
19008            # Use the system pwd and not the shell builtin to resolve directory symlinks
19009            cd $sym_link_dir
19010            cd `$THEPWDCMD`
19011            sym_link_dir=`$THEPWDCMD`
19012            # Resolve file symlinks
19013            while test $COUNTER -lt 20; do
19014                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19015                if test "x$ISLINK" == x; then
19016                    # This is not a symbolic link! We are done!
19017                    break
19018                fi
19019                # Again resolve directory symlinks since the target of the just found
19020                # link could be in a different directory
19021                cd `$DIRNAME $ISLINK`
19022                sym_link_dir=`$THEPWDCMD`
19023                sym_link_file=`$BASENAME $ISLINK`
19024                let COUNTER=COUNTER+1
19025            done
19026            cd $STARTDIR
19027            TEST_COMPILER=$sym_link_dir/$sym_link_file
19028        fi
19029    fi
19030
19031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19032$as_echo "$TEST_COMPILER" >&6; }
19033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19034$as_echo_n "checking if CC is disguised ccache... " >&6; }
19035
19036  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19037  if test "x$COMPILER_BASENAME" = "xccache"; then
19038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19039$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19040    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19041    # We want to control ccache invocation ourselves, so ignore this cc and try
19042    # searching again.
19043
19044    # Remove the path to the fake ccache cc from the PATH
19045    RETRY_COMPILER_SAVED_PATH="$PATH"
19046    COMPILER_DIRNAME=`$DIRNAME $CC`
19047    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19048
19049    # Try again looking for our compiler
19050    if test -n "$ac_tool_prefix"; then
19051  for ac_prog in $COMPILER_CHECK_LIST
19052  do
19053    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19054set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19056$as_echo_n "checking for $ac_word... " >&6; }
19057if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19058  $as_echo_n "(cached) " >&6
19059else
19060  if test -n "$PROPER_COMPILER_CC"; then
19061  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19062else
19063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19064for as_dir in $PATH
19065do
19066  IFS=$as_save_IFS
19067  test -z "$as_dir" && as_dir=.
19068    for ac_exec_ext in '' $ac_executable_extensions; do
19069  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19070    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19072    break 2
19073  fi
19074done
19075  done
19076IFS=$as_save_IFS
19077
19078fi
19079fi
19080PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19081if test -n "$PROPER_COMPILER_CC"; then
19082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19083$as_echo "$PROPER_COMPILER_CC" >&6; }
19084else
19085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19086$as_echo "no" >&6; }
19087fi
19088
19089
19090    test -n "$PROPER_COMPILER_CC" && break
19091  done
19092fi
19093if test -z "$PROPER_COMPILER_CC"; then
19094  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19095  for ac_prog in $COMPILER_CHECK_LIST
19096do
19097  # Extract the first word of "$ac_prog", so it can be a program name with args.
19098set dummy $ac_prog; ac_word=$2
19099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19100$as_echo_n "checking for $ac_word... " >&6; }
19101if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19102  $as_echo_n "(cached) " >&6
19103else
19104  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19105  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19106else
19107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19108for as_dir in $PATH
19109do
19110  IFS=$as_save_IFS
19111  test -z "$as_dir" && as_dir=.
19112    for ac_exec_ext in '' $ac_executable_extensions; do
19113  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19114    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19116    break 2
19117  fi
19118done
19119  done
19120IFS=$as_save_IFS
19121
19122fi
19123fi
19124ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19125if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19127$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19128else
19129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19130$as_echo "no" >&6; }
19131fi
19132
19133
19134  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19135done
19136
19137  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19138    PROPER_COMPILER_CC=""
19139  else
19140    case $cross_compiling:$ac_tool_warned in
19141yes:)
19142{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19143$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19144ac_tool_warned=yes ;;
19145esac
19146    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19147  fi
19148fi
19149
19150
19151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19152
19153  # First separate the path from the arguments. This will split at the first
19154  # space.
19155  complete="$PROPER_COMPILER_CC"
19156  path="${complete%% *}"
19157  tmp="$complete EOL"
19158  arguments="${tmp#* }"
19159
19160  # Input might be given as Windows format, start by converting to
19161  # unix format.
19162  new_path=`$CYGPATH -u "$path"`
19163
19164  # Now try to locate executable using which
19165  new_path=`$WHICH "$new_path" 2> /dev/null`
19166  # bat and cmd files are not always considered executable in cygwin causing which
19167  # to not find them
19168  if test "x$new_path" = x \
19169           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19170           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19171    new_path=`$CYGPATH -u "$path"`
19172  fi
19173  if test "x$new_path" = x; then
19174    # Oops. Which didn't find the executable.
19175    # The splitting of arguments from the executable at a space might have been incorrect,
19176    # since paths with space are more likely in Windows. Give it another try with the whole
19177    # argument.
19178    path="$complete"
19179    arguments="EOL"
19180    new_path=`$CYGPATH -u "$path"`
19181    new_path=`$WHICH "$new_path" 2> /dev/null`
19182    # bat and cmd files are not always considered executable in cygwin causing which
19183    # to not find them
19184    if test "x$new_path" = x \
19185             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19186             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19187      new_path=`$CYGPATH -u "$path"`
19188    fi
19189    if test "x$new_path" = x; then
19190      # It's still not found. Now this is an unrecoverable error.
19191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19192$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19193      has_space=`$ECHO "$complete" | $GREP " "`
19194      if test "x$has_space" != x; then
19195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19197      fi
19198      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19199    fi
19200  fi
19201
19202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19205  # "foo.exe" is OK but "foo" is an error.
19206  #
19207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19208  # It is also a way to make sure we got the proper file name for the real test later on.
19209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19210  if test "x$test_shortpath" = x; then
19211    # Short path failed, file does not exist as specified.
19212    # Try adding .exe or .cmd
19213    if test -f "${new_path}.exe"; then
19214       input_to_shortpath="${new_path}.exe"
19215    elif test -f "${new_path}.cmd"; then
19216       input_to_shortpath="${new_path}.cmd"
19217    else
19218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19219$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19220      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19221$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19222      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19223    fi
19224  else
19225    input_to_shortpath="$new_path"
19226  fi
19227
19228  # Call helper function which possibly converts this using DOS-style short mode.
19229  # If so, the updated path is stored in $new_path.
19230  new_path="$input_to_shortpath"
19231
19232  input_path="$input_to_shortpath"
19233  # Check if we need to convert this using DOS-style short mode. If the path
19234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19235  # take no chances and rewrite it.
19236  # Note: m4 eats our [], so we need to use [ and ] instead.
19237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19238  if test "x$has_forbidden_chars" != x; then
19239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19243      # Going to short mode and back again did indeed matter. Since short mode is
19244      # case insensitive, let's make it lowercase to improve readability.
19245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19246      # Now convert it back to Unix-stile (cygpath)
19247      input_path=`$CYGPATH -u "$shortmode_path"`
19248      new_path="$input_path"
19249    fi
19250  fi
19251
19252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19253  if test "x$test_cygdrive_prefix" = x; then
19254    # As a simple fix, exclude /usr/bin since it's not a real path.
19255    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19257      # a path prefixed by /cygdrive for fixpath to work.
19258      new_path="$CYGWIN_ROOT_PATH$input_path"
19259    fi
19260  fi
19261
19262  # remove trailing .exe if any
19263  new_path="${new_path/%.exe/}"
19264
19265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19266
19267  # First separate the path from the arguments. This will split at the first
19268  # space.
19269  complete="$PROPER_COMPILER_CC"
19270  path="${complete%% *}"
19271  tmp="$complete EOL"
19272  arguments="${tmp#* }"
19273
19274  # Input might be given as Windows format, start by converting to
19275  # unix format.
19276  new_path="$path"
19277
19278  windows_path="$new_path"
19279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19280    unix_path=`$CYGPATH -u "$windows_path"`
19281    new_path="$unix_path"
19282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19284    new_path="$unix_path"
19285  fi
19286
19287
19288  # Now try to locate executable using which
19289  new_path=`$WHICH "$new_path" 2> /dev/null`
19290
19291  if test "x$new_path" = x; then
19292    # Oops. Which didn't find the executable.
19293    # The splitting of arguments from the executable at a space might have been incorrect,
19294    # since paths with space are more likely in Windows. Give it another try with the whole
19295    # argument.
19296    path="$complete"
19297    arguments="EOL"
19298    new_path="$path"
19299
19300  windows_path="$new_path"
19301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19302    unix_path=`$CYGPATH -u "$windows_path"`
19303    new_path="$unix_path"
19304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19306    new_path="$unix_path"
19307  fi
19308
19309
19310    new_path=`$WHICH "$new_path" 2> /dev/null`
19311
19312    if test "x$new_path" = x; then
19313      # It's still not found. Now this is an unrecoverable error.
19314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19315$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19316      has_space=`$ECHO "$complete" | $GREP " "`
19317      if test "x$has_space" != x; then
19318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19320      fi
19321      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19322    fi
19323  fi
19324
19325  # Now new_path has a complete unix path to the binary
19326  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19327    # Keep paths in /bin as-is, but remove trailing .exe if any
19328    new_path="${new_path/%.exe/}"
19329    # Do not save /bin paths to all_fixpath_prefixes!
19330  else
19331    # Not in mixed or Windows style, start by that.
19332    new_path=`cmd //c echo $new_path`
19333
19334  input_path="$new_path"
19335  # Check if we need to convert this using DOS-style short mode. If the path
19336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19337  # take no chances and rewrite it.
19338  # Note: m4 eats our [], so we need to use [ and ] instead.
19339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19340  if test "x$has_forbidden_chars" != x; then
19341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19343  fi
19344
19345    # Output is in $new_path
19346
19347  windows_path="$new_path"
19348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19349    unix_path=`$CYGPATH -u "$windows_path"`
19350    new_path="$unix_path"
19351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19353    new_path="$unix_path"
19354  fi
19355
19356    # remove trailing .exe if any
19357    new_path="${new_path/%.exe/}"
19358
19359    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19360    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19361  fi
19362
19363  else
19364    # We're on a posix platform. Hooray! :)
19365    # First separate the path from the arguments. This will split at the first
19366    # space.
19367    complete="$PROPER_COMPILER_CC"
19368    path="${complete%% *}"
19369    tmp="$complete EOL"
19370    arguments="${tmp#* }"
19371
19372    # Cannot rely on the command "which" here since it doesn't always work.
19373    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19374    if test -z "$is_absolute_path"; then
19375      # Path to executable is not absolute. Find it.
19376      IFS_save="$IFS"
19377      IFS=:
19378      for p in $PATH; do
19379        if test -f "$p/$path" && test -x "$p/$path"; then
19380          new_path="$p/$path"
19381          break
19382        fi
19383      done
19384      IFS="$IFS_save"
19385    else
19386      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19387$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19388      new_path="$path"
19389    fi
19390
19391    if test "x$new_path" = x; then
19392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19393$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19394        has_space=`$ECHO "$complete" | $GREP " "`
19395        if test "x$has_space" != x; then
19396          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19397$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19398        fi
19399        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19400      fi
19401  fi
19402
19403      # Now join together the path and the arguments once again
19404      if test "x$arguments" != xEOL; then
19405        new_complete="$new_path ${arguments% *}"
19406      else
19407        new_complete="$new_path"
19408      fi
19409
19410  if test "x$complete" != "x$new_complete"; then
19411      PROPER_COMPILER_CC="$new_complete"
19412      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19413$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19414    fi
19415
19416    PATH="$RETRY_COMPILER_SAVED_PATH"
19417
19418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19419$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19420
19421    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19422        # Follow a chain of symbolic links. Use readlink
19423        # where it exists, else fall back to horribly
19424        # complicated shell code.
19425        if test "x$READLINK_TESTED" != yes; then
19426            # On MacOSX there is a readlink tool with a different
19427            # purpose than the GNU readlink tool. Check the found readlink.
19428            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19429            if test "x$ISGNU" = x; then
19430                 # A readlink that we do not know how to use.
19431                 # Are there other non-GNU readlinks out there?
19432                 READLINK_TESTED=yes
19433                 READLINK=
19434            fi
19435        fi
19436
19437        if test "x$READLINK" != x; then
19438            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19439        else
19440            # Save the current directory for restoring afterwards
19441            STARTDIR=$PWD
19442            COUNTER=0
19443            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19444            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19445            # Use the system pwd and not the shell builtin to resolve directory symlinks
19446            cd $sym_link_dir
19447            cd `$THEPWDCMD`
19448            sym_link_dir=`$THEPWDCMD`
19449            # Resolve file symlinks
19450            while test $COUNTER -lt 20; do
19451                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19452                if test "x$ISLINK" == x; then
19453                    # This is not a symbolic link! We are done!
19454                    break
19455                fi
19456                # Again resolve directory symlinks since the target of the just found
19457                # link could be in a different directory
19458                cd `$DIRNAME $ISLINK`
19459                sym_link_dir=`$THEPWDCMD`
19460                sym_link_file=`$BASENAME $ISLINK`
19461                let COUNTER=COUNTER+1
19462            done
19463            cd $STARTDIR
19464            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19465        fi
19466    fi
19467
19468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19469$as_echo "$PROPER_COMPILER_CC" >&6; }
19470    CC="$PROPER_COMPILER_CC"
19471  else
19472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19473$as_echo "no, keeping CC" >&6; }
19474    CC="$TEST_COMPILER"
19475  fi
19476
19477  COMPILER=$CC
19478  COMPILER_NAME=$COMPILER_NAME
19479
19480  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19481    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19482    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19483    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19484    if test $? -ne 0; then
19485      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19486
19487      { $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
19488$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19489      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19490$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19491      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19492    else
19493      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19494      COMPILER_VENDOR="Sun Studio"
19495    fi
19496  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19497    # First line typically looks something like:
19498    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19499    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19500    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19501    COMPILER_VENDOR="Microsoft CL.EXE"
19502    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19503    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19504      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19505        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19506      fi
19507    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19508      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19509        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19510      fi
19511    fi
19512  else
19513    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19514    # Check that this is likely to be GCC.
19515    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19516    if test $? -ne 0; then
19517      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19518$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19519      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19520$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19521      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19522    fi
19523
19524    # First line typically looks something like:
19525    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19526    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19527    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19528  fi
19529  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19530  CC_VERSION="$COMPILER_VERSION"
19531  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19532  CC_VENDOR="$COMPILER_VENDOR"
19533
19534  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19535$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19536
19537
19538# Now that we have resolved CC ourself, let autoconf have its go at it
19539ac_ext=c
19540ac_cpp='$CPP $CPPFLAGS'
19541ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19542ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19543ac_compiler_gnu=$ac_cv_c_compiler_gnu
19544if test -n "$ac_tool_prefix"; then
19545  for ac_prog in $CC
19546  do
19547    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19548set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19550$as_echo_n "checking for $ac_word... " >&6; }
19551if ${ac_cv_prog_CC+:} false; then :
19552  $as_echo_n "(cached) " >&6
19553else
19554  if test -n "$CC"; then
19555  ac_cv_prog_CC="$CC" # Let the user override the test.
19556else
19557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19558for as_dir in $PATH
19559do
19560  IFS=$as_save_IFS
19561  test -z "$as_dir" && as_dir=.
19562    for ac_exec_ext in '' $ac_executable_extensions; do
19563  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19564    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19566    break 2
19567  fi
19568done
19569  done
19570IFS=$as_save_IFS
19571
19572fi
19573fi
19574CC=$ac_cv_prog_CC
19575if test -n "$CC"; then
19576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19577$as_echo "$CC" >&6; }
19578else
19579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19580$as_echo "no" >&6; }
19581fi
19582
19583
19584    test -n "$CC" && break
19585  done
19586fi
19587if test -z "$CC"; then
19588  ac_ct_CC=$CC
19589  for ac_prog in $CC
19590do
19591  # Extract the first word of "$ac_prog", so it can be a program name with args.
19592set dummy $ac_prog; ac_word=$2
19593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19594$as_echo_n "checking for $ac_word... " >&6; }
19595if ${ac_cv_prog_ac_ct_CC+:} false; then :
19596  $as_echo_n "(cached) " >&6
19597else
19598  if test -n "$ac_ct_CC"; then
19599  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19600else
19601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19602for as_dir in $PATH
19603do
19604  IFS=$as_save_IFS
19605  test -z "$as_dir" && as_dir=.
19606    for ac_exec_ext in '' $ac_executable_extensions; do
19607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19608    ac_cv_prog_ac_ct_CC="$ac_prog"
19609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19610    break 2
19611  fi
19612done
19613  done
19614IFS=$as_save_IFS
19615
19616fi
19617fi
19618ac_ct_CC=$ac_cv_prog_ac_ct_CC
19619if test -n "$ac_ct_CC"; then
19620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19621$as_echo "$ac_ct_CC" >&6; }
19622else
19623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19624$as_echo "no" >&6; }
19625fi
19626
19627
19628  test -n "$ac_ct_CC" && break
19629done
19630
19631  if test "x$ac_ct_CC" = x; then
19632    CC=""
19633  else
19634    case $cross_compiling:$ac_tool_warned in
19635yes:)
19636{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19637$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19638ac_tool_warned=yes ;;
19639esac
19640    CC=$ac_ct_CC
19641  fi
19642fi
19643
19644
19645test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19646$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19647as_fn_error $? "no acceptable C compiler found in \$PATH
19648See \`config.log' for more details" "$LINENO" 5; }
19649
19650# Provide some information about the compiler.
19651$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19652set X $ac_compile
19653ac_compiler=$2
19654for ac_option in --version -v -V -qversion; do
19655  { { ac_try="$ac_compiler $ac_option >&5"
19656case "(($ac_try" in
19657  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19658  *) ac_try_echo=$ac_try;;
19659esac
19660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19661$as_echo "$ac_try_echo"; } >&5
19662  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19663  ac_status=$?
19664  if test -s conftest.err; then
19665    sed '10a\
19666... rest of stderr output deleted ...
19667         10q' conftest.err >conftest.er1
19668    cat conftest.er1 >&5
19669  fi
19670  rm -f conftest.er1 conftest.err
19671  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19672  test $ac_status = 0; }
19673done
19674
19675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19676/* end confdefs.h.  */
19677
19678int
19679main ()
19680{
19681
19682  ;
19683  return 0;
19684}
19685_ACEOF
19686ac_clean_files_save=$ac_clean_files
19687ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19688# Try to create an executable without -o first, disregard a.out.
19689# It will help us diagnose broken compilers, and finding out an intuition
19690# of exeext.
19691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19692$as_echo_n "checking whether the C compiler works... " >&6; }
19693ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19694
19695# The possible output files:
19696ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19697
19698ac_rmfiles=
19699for ac_file in $ac_files
19700do
19701  case $ac_file in
19702    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19703    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19704  esac
19705done
19706rm -f $ac_rmfiles
19707
19708if { { ac_try="$ac_link_default"
19709case "(($ac_try" in
19710  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19711  *) ac_try_echo=$ac_try;;
19712esac
19713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19714$as_echo "$ac_try_echo"; } >&5
19715  (eval "$ac_link_default") 2>&5
19716  ac_status=$?
19717  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19718  test $ac_status = 0; }; then :
19719  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19720# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19721# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19722# so that the user can short-circuit this test for compilers unknown to
19723# Autoconf.
19724for ac_file in $ac_files ''
19725do
19726  test -f "$ac_file" || continue
19727  case $ac_file in
19728    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19729	;;
19730    [ab].out )
19731	# We found the default executable, but exeext='' is most
19732	# certainly right.
19733	break;;
19734    *.* )
19735	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19736	then :; else
19737	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19738	fi
19739	# We set ac_cv_exeext here because the later test for it is not
19740	# safe: cross compilers may not add the suffix if given an `-o'
19741	# argument, so we may need to know it at that point already.
19742	# Even if this section looks crufty: it has the advantage of
19743	# actually working.
19744	break;;
19745    * )
19746	break;;
19747  esac
19748done
19749test "$ac_cv_exeext" = no && ac_cv_exeext=
19750
19751else
19752  ac_file=''
19753fi
19754if test -z "$ac_file"; then :
19755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19756$as_echo "no" >&6; }
19757$as_echo "$as_me: failed program was:" >&5
19758sed 's/^/| /' conftest.$ac_ext >&5
19759
19760{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19762as_fn_error 77 "C compiler cannot create executables
19763See \`config.log' for more details" "$LINENO" 5; }
19764else
19765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19766$as_echo "yes" >&6; }
19767fi
19768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19769$as_echo_n "checking for C compiler default output file name... " >&6; }
19770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19771$as_echo "$ac_file" >&6; }
19772ac_exeext=$ac_cv_exeext
19773
19774rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19775ac_clean_files=$ac_clean_files_save
19776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19777$as_echo_n "checking for suffix of executables... " >&6; }
19778if { { ac_try="$ac_link"
19779case "(($ac_try" in
19780  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19781  *) ac_try_echo=$ac_try;;
19782esac
19783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19784$as_echo "$ac_try_echo"; } >&5
19785  (eval "$ac_link") 2>&5
19786  ac_status=$?
19787  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19788  test $ac_status = 0; }; then :
19789  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19790# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19791# work properly (i.e., refer to `conftest.exe'), while it won't with
19792# `rm'.
19793for ac_file in conftest.exe conftest conftest.*; do
19794  test -f "$ac_file" || continue
19795  case $ac_file in
19796    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19797    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19798	  break;;
19799    * ) break;;
19800  esac
19801done
19802else
19803  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19804$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19805as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19806See \`config.log' for more details" "$LINENO" 5; }
19807fi
19808rm -f conftest conftest$ac_cv_exeext
19809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19810$as_echo "$ac_cv_exeext" >&6; }
19811
19812rm -f conftest.$ac_ext
19813EXEEXT=$ac_cv_exeext
19814ac_exeext=$EXEEXT
19815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19816/* end confdefs.h.  */
19817#include <stdio.h>
19818int
19819main ()
19820{
19821FILE *f = fopen ("conftest.out", "w");
19822 return ferror (f) || fclose (f) != 0;
19823
19824  ;
19825  return 0;
19826}
19827_ACEOF
19828ac_clean_files="$ac_clean_files conftest.out"
19829# Check that the compiler produces executables we can run.  If not, either
19830# the compiler is broken, or we cross compile.
19831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19832$as_echo_n "checking whether we are cross compiling... " >&6; }
19833if test "$cross_compiling" != yes; then
19834  { { ac_try="$ac_link"
19835case "(($ac_try" in
19836  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19837  *) ac_try_echo=$ac_try;;
19838esac
19839eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19840$as_echo "$ac_try_echo"; } >&5
19841  (eval "$ac_link") 2>&5
19842  ac_status=$?
19843  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19844  test $ac_status = 0; }
19845  if { ac_try='./conftest$ac_cv_exeext'
19846  { { case "(($ac_try" in
19847  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19848  *) ac_try_echo=$ac_try;;
19849esac
19850eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19851$as_echo "$ac_try_echo"; } >&5
19852  (eval "$ac_try") 2>&5
19853  ac_status=$?
19854  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19855  test $ac_status = 0; }; }; then
19856    cross_compiling=no
19857  else
19858    if test "$cross_compiling" = maybe; then
19859	cross_compiling=yes
19860    else
19861	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19863as_fn_error $? "cannot run C compiled programs.
19864If you meant to cross compile, use \`--host'.
19865See \`config.log' for more details" "$LINENO" 5; }
19866    fi
19867  fi
19868fi
19869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19870$as_echo "$cross_compiling" >&6; }
19871
19872rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19873ac_clean_files=$ac_clean_files_save
19874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19875$as_echo_n "checking for suffix of object files... " >&6; }
19876if ${ac_cv_objext+:} false; then :
19877  $as_echo_n "(cached) " >&6
19878else
19879  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19880/* end confdefs.h.  */
19881
19882int
19883main ()
19884{
19885
19886  ;
19887  return 0;
19888}
19889_ACEOF
19890rm -f conftest.o conftest.obj
19891if { { ac_try="$ac_compile"
19892case "(($ac_try" in
19893  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19894  *) ac_try_echo=$ac_try;;
19895esac
19896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19897$as_echo "$ac_try_echo"; } >&5
19898  (eval "$ac_compile") 2>&5
19899  ac_status=$?
19900  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19901  test $ac_status = 0; }; then :
19902  for ac_file in conftest.o conftest.obj conftest.*; do
19903  test -f "$ac_file" || continue;
19904  case $ac_file in
19905    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19906    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19907       break;;
19908  esac
19909done
19910else
19911  $as_echo "$as_me: failed program was:" >&5
19912sed 's/^/| /' conftest.$ac_ext >&5
19913
19914{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19915$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19916as_fn_error $? "cannot compute suffix of object files: cannot compile
19917See \`config.log' for more details" "$LINENO" 5; }
19918fi
19919rm -f conftest.$ac_cv_objext conftest.$ac_ext
19920fi
19921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19922$as_echo "$ac_cv_objext" >&6; }
19923OBJEXT=$ac_cv_objext
19924ac_objext=$OBJEXT
19925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19926$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19927if ${ac_cv_c_compiler_gnu+:} false; then :
19928  $as_echo_n "(cached) " >&6
19929else
19930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19931/* end confdefs.h.  */
19932
19933int
19934main ()
19935{
19936#ifndef __GNUC__
19937       choke me
19938#endif
19939
19940  ;
19941  return 0;
19942}
19943_ACEOF
19944if ac_fn_c_try_compile "$LINENO"; then :
19945  ac_compiler_gnu=yes
19946else
19947  ac_compiler_gnu=no
19948fi
19949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19950ac_cv_c_compiler_gnu=$ac_compiler_gnu
19951
19952fi
19953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19954$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19955if test $ac_compiler_gnu = yes; then
19956  GCC=yes
19957else
19958  GCC=
19959fi
19960ac_test_CFLAGS=${CFLAGS+set}
19961ac_save_CFLAGS=$CFLAGS
19962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19963$as_echo_n "checking whether $CC accepts -g... " >&6; }
19964if ${ac_cv_prog_cc_g+:} false; then :
19965  $as_echo_n "(cached) " >&6
19966else
19967  ac_save_c_werror_flag=$ac_c_werror_flag
19968   ac_c_werror_flag=yes
19969   ac_cv_prog_cc_g=no
19970   CFLAGS="-g"
19971   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19972/* end confdefs.h.  */
19973
19974int
19975main ()
19976{
19977
19978  ;
19979  return 0;
19980}
19981_ACEOF
19982if ac_fn_c_try_compile "$LINENO"; then :
19983  ac_cv_prog_cc_g=yes
19984else
19985  CFLAGS=""
19986      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19987/* end confdefs.h.  */
19988
19989int
19990main ()
19991{
19992
19993  ;
19994  return 0;
19995}
19996_ACEOF
19997if ac_fn_c_try_compile "$LINENO"; then :
19998
19999else
20000  ac_c_werror_flag=$ac_save_c_werror_flag
20001	 CFLAGS="-g"
20002	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20003/* end confdefs.h.  */
20004
20005int
20006main ()
20007{
20008
20009  ;
20010  return 0;
20011}
20012_ACEOF
20013if ac_fn_c_try_compile "$LINENO"; then :
20014  ac_cv_prog_cc_g=yes
20015fi
20016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20017fi
20018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20019fi
20020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20021   ac_c_werror_flag=$ac_save_c_werror_flag
20022fi
20023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20024$as_echo "$ac_cv_prog_cc_g" >&6; }
20025if test "$ac_test_CFLAGS" = set; then
20026  CFLAGS=$ac_save_CFLAGS
20027elif test $ac_cv_prog_cc_g = yes; then
20028  if test "$GCC" = yes; then
20029    CFLAGS="-g -O2"
20030  else
20031    CFLAGS="-g"
20032  fi
20033else
20034  if test "$GCC" = yes; then
20035    CFLAGS="-O2"
20036  else
20037    CFLAGS=
20038  fi
20039fi
20040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20041$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20042if ${ac_cv_prog_cc_c89+:} false; then :
20043  $as_echo_n "(cached) " >&6
20044else
20045  ac_cv_prog_cc_c89=no
20046ac_save_CC=$CC
20047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20048/* end confdefs.h.  */
20049#include <stdarg.h>
20050#include <stdio.h>
20051#include <sys/types.h>
20052#include <sys/stat.h>
20053/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20054struct buf { int x; };
20055FILE * (*rcsopen) (struct buf *, struct stat *, int);
20056static char *e (p, i)
20057     char **p;
20058     int i;
20059{
20060  return p[i];
20061}
20062static char *f (char * (*g) (char **, int), char **p, ...)
20063{
20064  char *s;
20065  va_list v;
20066  va_start (v,p);
20067  s = g (p, va_arg (v,int));
20068  va_end (v);
20069  return s;
20070}
20071
20072/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20073   function prototypes and stuff, but not '\xHH' hex character constants.
20074   These don't provoke an error unfortunately, instead are silently treated
20075   as 'x'.  The following induces an error, until -std is added to get
20076   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20077   array size at least.  It's necessary to write '\x00'==0 to get something
20078   that's true only with -std.  */
20079int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20080
20081/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20082   inside strings and character constants.  */
20083#define FOO(x) 'x'
20084int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20085
20086int test (int i, double x);
20087struct s1 {int (*f) (int a);};
20088struct s2 {int (*f) (double a);};
20089int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20090int argc;
20091char **argv;
20092int
20093main ()
20094{
20095return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20096  ;
20097  return 0;
20098}
20099_ACEOF
20100for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20101	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20102do
20103  CC="$ac_save_CC $ac_arg"
20104  if ac_fn_c_try_compile "$LINENO"; then :
20105  ac_cv_prog_cc_c89=$ac_arg
20106fi
20107rm -f core conftest.err conftest.$ac_objext
20108  test "x$ac_cv_prog_cc_c89" != "xno" && break
20109done
20110rm -f conftest.$ac_ext
20111CC=$ac_save_CC
20112
20113fi
20114# AC_CACHE_VAL
20115case "x$ac_cv_prog_cc_c89" in
20116  x)
20117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20118$as_echo "none needed" >&6; } ;;
20119  xno)
20120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20121$as_echo "unsupported" >&6; } ;;
20122  *)
20123    CC="$CC $ac_cv_prog_cc_c89"
20124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20125$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20126esac
20127if test "x$ac_cv_prog_cc_c89" != xno; then :
20128
20129fi
20130
20131ac_ext=cpp
20132ac_cpp='$CXXCPP $CPPFLAGS'
20133ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20134ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20135ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20136
20137
20138### Locate C++ compiler (CXX)
20139
20140if test "x$CXX" != x; then
20141  COMPILER_CHECK_LIST="$CXX"
20142elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20143  COMPILER_CHECK_LIST="cl"
20144elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20145  COMPILER_CHECK_LIST="CC g++"
20146else
20147  COMPILER_CHECK_LIST="g++ CC"
20148fi
20149
20150
20151  COMPILER_NAME=C++
20152
20153  CXX=
20154  # If TOOLS_DIR is set, check for all compiler names in there first
20155  # before checking the rest of the PATH.
20156  if test -n "$TOOLS_DIR"; then
20157    PATH_save="$PATH"
20158    PATH="$TOOLS_DIR"
20159    for ac_prog in $COMPILER_CHECK_LIST
20160do
20161  # Extract the first word of "$ac_prog", so it can be a program name with args.
20162set dummy $ac_prog; ac_word=$2
20163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20164$as_echo_n "checking for $ac_word... " >&6; }
20165if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20166  $as_echo_n "(cached) " >&6
20167else
20168  case $TOOLS_DIR_CXX in
20169  [\\/]* | ?:[\\/]*)
20170  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20171  ;;
20172  *)
20173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20174for as_dir in $PATH
20175do
20176  IFS=$as_save_IFS
20177  test -z "$as_dir" && as_dir=.
20178    for ac_exec_ext in '' $ac_executable_extensions; do
20179  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20180    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20182    break 2
20183  fi
20184done
20185  done
20186IFS=$as_save_IFS
20187
20188  ;;
20189esac
20190fi
20191TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20192if test -n "$TOOLS_DIR_CXX"; then
20193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20194$as_echo "$TOOLS_DIR_CXX" >&6; }
20195else
20196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20197$as_echo "no" >&6; }
20198fi
20199
20200
20201  test -n "$TOOLS_DIR_CXX" && break
20202done
20203
20204    CXX=$TOOLS_DIR_CXX
20205    PATH="$PATH_save"
20206  fi
20207
20208  # AC_PATH_PROGS can't be run multiple times with the same variable,
20209  # so create a new name for this run.
20210  if test "x$CXX" = x; then
20211    for ac_prog in $COMPILER_CHECK_LIST
20212do
20213  # Extract the first word of "$ac_prog", so it can be a program name with args.
20214set dummy $ac_prog; ac_word=$2
20215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20216$as_echo_n "checking for $ac_word... " >&6; }
20217if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20218  $as_echo_n "(cached) " >&6
20219else
20220  case $POTENTIAL_CXX in
20221  [\\/]* | ?:[\\/]*)
20222  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20223  ;;
20224  *)
20225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20226for as_dir in $PATH
20227do
20228  IFS=$as_save_IFS
20229  test -z "$as_dir" && as_dir=.
20230    for ac_exec_ext in '' $ac_executable_extensions; do
20231  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20232    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20234    break 2
20235  fi
20236done
20237  done
20238IFS=$as_save_IFS
20239
20240  ;;
20241esac
20242fi
20243POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20244if test -n "$POTENTIAL_CXX"; then
20245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20246$as_echo "$POTENTIAL_CXX" >&6; }
20247else
20248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20249$as_echo "no" >&6; }
20250fi
20251
20252
20253  test -n "$POTENTIAL_CXX" && break
20254done
20255
20256    CXX=$POTENTIAL_CXX
20257  fi
20258
20259  if test "x$CXX" = x; then
20260
20261    # Print a helpful message on how to acquire the necessary build dependency.
20262    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20263    MISSING_DEPENDENCY=devkit
20264    PKGHANDLER_COMMAND=
20265
20266    case $PKGHANDLER in
20267	apt-get)
20268                apt_help     $MISSING_DEPENDENCY ;;
20269    yum)
20270                yum_help     $MISSING_DEPENDENCY ;;
20271	port)
20272                port_help    $MISSING_DEPENDENCY ;;
20273	pkgutil)
20274                pkgutil_help $MISSING_DEPENDENCY ;;
20275	pkgadd)
20276                pkgadd_help  $MISSING_DEPENDENCY ;;
20277    * )
20278      break ;;
20279    esac
20280
20281    if test "x$PKGHANDLER_COMMAND" != x; then
20282        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20283    fi
20284
20285      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20286  fi
20287
20288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20289
20290  # First separate the path from the arguments. This will split at the first
20291  # space.
20292  complete="$CXX"
20293  path="${complete%% *}"
20294  tmp="$complete EOL"
20295  arguments="${tmp#* }"
20296
20297  # Input might be given as Windows format, start by converting to
20298  # unix format.
20299  new_path=`$CYGPATH -u "$path"`
20300
20301  # Now try to locate executable using which
20302  new_path=`$WHICH "$new_path" 2> /dev/null`
20303  # bat and cmd files are not always considered executable in cygwin causing which
20304  # to not find them
20305  if test "x$new_path" = x \
20306           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20307           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20308    new_path=`$CYGPATH -u "$path"`
20309  fi
20310  if test "x$new_path" = x; then
20311    # Oops. Which didn't find the executable.
20312    # The splitting of arguments from the executable at a space might have been incorrect,
20313    # since paths with space are more likely in Windows. Give it another try with the whole
20314    # argument.
20315    path="$complete"
20316    arguments="EOL"
20317    new_path=`$CYGPATH -u "$path"`
20318    new_path=`$WHICH "$new_path" 2> /dev/null`
20319    # bat and cmd files are not always considered executable in cygwin causing which
20320    # to not find them
20321    if test "x$new_path" = x \
20322             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20323             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20324      new_path=`$CYGPATH -u "$path"`
20325    fi
20326    if test "x$new_path" = x; then
20327      # It's still not found. Now this is an unrecoverable error.
20328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20329$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20330      has_space=`$ECHO "$complete" | $GREP " "`
20331      if test "x$has_space" != x; then
20332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20334      fi
20335      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20336    fi
20337  fi
20338
20339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20342  # "foo.exe" is OK but "foo" is an error.
20343  #
20344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20345  # It is also a way to make sure we got the proper file name for the real test later on.
20346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20347  if test "x$test_shortpath" = x; then
20348    # Short path failed, file does not exist as specified.
20349    # Try adding .exe or .cmd
20350    if test -f "${new_path}.exe"; then
20351       input_to_shortpath="${new_path}.exe"
20352    elif test -f "${new_path}.cmd"; then
20353       input_to_shortpath="${new_path}.cmd"
20354    else
20355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20356$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20357      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20358$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20359      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20360    fi
20361  else
20362    input_to_shortpath="$new_path"
20363  fi
20364
20365  # Call helper function which possibly converts this using DOS-style short mode.
20366  # If so, the updated path is stored in $new_path.
20367  new_path="$input_to_shortpath"
20368
20369  input_path="$input_to_shortpath"
20370  # Check if we need to convert this using DOS-style short mode. If the path
20371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20372  # take no chances and rewrite it.
20373  # Note: m4 eats our [], so we need to use [ and ] instead.
20374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20375  if test "x$has_forbidden_chars" != x; then
20376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20380      # Going to short mode and back again did indeed matter. Since short mode is
20381      # case insensitive, let's make it lowercase to improve readability.
20382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20383      # Now convert it back to Unix-stile (cygpath)
20384      input_path=`$CYGPATH -u "$shortmode_path"`
20385      new_path="$input_path"
20386    fi
20387  fi
20388
20389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20390  if test "x$test_cygdrive_prefix" = x; then
20391    # As a simple fix, exclude /usr/bin since it's not a real path.
20392    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20394      # a path prefixed by /cygdrive for fixpath to work.
20395      new_path="$CYGWIN_ROOT_PATH$input_path"
20396    fi
20397  fi
20398
20399  # remove trailing .exe if any
20400  new_path="${new_path/%.exe/}"
20401
20402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20403
20404  # First separate the path from the arguments. This will split at the first
20405  # space.
20406  complete="$CXX"
20407  path="${complete%% *}"
20408  tmp="$complete EOL"
20409  arguments="${tmp#* }"
20410
20411  # Input might be given as Windows format, start by converting to
20412  # unix format.
20413  new_path="$path"
20414
20415  windows_path="$new_path"
20416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20417    unix_path=`$CYGPATH -u "$windows_path"`
20418    new_path="$unix_path"
20419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20421    new_path="$unix_path"
20422  fi
20423
20424
20425  # Now try to locate executable using which
20426  new_path=`$WHICH "$new_path" 2> /dev/null`
20427
20428  if test "x$new_path" = x; then
20429    # Oops. Which didn't find the executable.
20430    # The splitting of arguments from the executable at a space might have been incorrect,
20431    # since paths with space are more likely in Windows. Give it another try with the whole
20432    # argument.
20433    path="$complete"
20434    arguments="EOL"
20435    new_path="$path"
20436
20437  windows_path="$new_path"
20438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20439    unix_path=`$CYGPATH -u "$windows_path"`
20440    new_path="$unix_path"
20441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20443    new_path="$unix_path"
20444  fi
20445
20446
20447    new_path=`$WHICH "$new_path" 2> /dev/null`
20448
20449    if test "x$new_path" = x; then
20450      # It's still not found. Now this is an unrecoverable error.
20451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20452$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20453      has_space=`$ECHO "$complete" | $GREP " "`
20454      if test "x$has_space" != x; then
20455        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20456$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20457      fi
20458      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20459    fi
20460  fi
20461
20462  # Now new_path has a complete unix path to the binary
20463  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20464    # Keep paths in /bin as-is, but remove trailing .exe if any
20465    new_path="${new_path/%.exe/}"
20466    # Do not save /bin paths to all_fixpath_prefixes!
20467  else
20468    # Not in mixed or Windows style, start by that.
20469    new_path=`cmd //c echo $new_path`
20470
20471  input_path="$new_path"
20472  # Check if we need to convert this using DOS-style short mode. If the path
20473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20474  # take no chances and rewrite it.
20475  # Note: m4 eats our [], so we need to use [ and ] instead.
20476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20477  if test "x$has_forbidden_chars" != x; then
20478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20480  fi
20481
20482    # Output is in $new_path
20483
20484  windows_path="$new_path"
20485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20486    unix_path=`$CYGPATH -u "$windows_path"`
20487    new_path="$unix_path"
20488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20490    new_path="$unix_path"
20491  fi
20492
20493    # remove trailing .exe if any
20494    new_path="${new_path/%.exe/}"
20495
20496    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20497    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20498  fi
20499
20500  else
20501    # We're on a posix platform. Hooray! :)
20502    # First separate the path from the arguments. This will split at the first
20503    # space.
20504    complete="$CXX"
20505    path="${complete%% *}"
20506    tmp="$complete EOL"
20507    arguments="${tmp#* }"
20508
20509    # Cannot rely on the command "which" here since it doesn't always work.
20510    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20511    if test -z "$is_absolute_path"; then
20512      # Path to executable is not absolute. Find it.
20513      IFS_save="$IFS"
20514      IFS=:
20515      for p in $PATH; do
20516        if test -f "$p/$path" && test -x "$p/$path"; then
20517          new_path="$p/$path"
20518          break
20519        fi
20520      done
20521      IFS="$IFS_save"
20522    else
20523      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20524$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20525      new_path="$path"
20526    fi
20527
20528    if test "x$new_path" = x; then
20529        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20530$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20531        has_space=`$ECHO "$complete" | $GREP " "`
20532        if test "x$has_space" != x; then
20533          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20534$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20535        fi
20536        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20537      fi
20538  fi
20539
20540      # Now join together the path and the arguments once again
20541      if test "x$arguments" != xEOL; then
20542        new_complete="$new_path ${arguments% *}"
20543      else
20544        new_complete="$new_path"
20545      fi
20546
20547  if test "x$complete" != "x$new_complete"; then
20548      CXX="$new_complete"
20549      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20550$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20551    fi
20552
20553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20554$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20555  TEST_COMPILER="$CXX"
20556
20557    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20558        # Follow a chain of symbolic links. Use readlink
20559        # where it exists, else fall back to horribly
20560        # complicated shell code.
20561        if test "x$READLINK_TESTED" != yes; then
20562            # On MacOSX there is a readlink tool with a different
20563            # purpose than the GNU readlink tool. Check the found readlink.
20564            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20565            if test "x$ISGNU" = x; then
20566                 # A readlink that we do not know how to use.
20567                 # Are there other non-GNU readlinks out there?
20568                 READLINK_TESTED=yes
20569                 READLINK=
20570            fi
20571        fi
20572
20573        if test "x$READLINK" != x; then
20574            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20575        else
20576            # Save the current directory for restoring afterwards
20577            STARTDIR=$PWD
20578            COUNTER=0
20579            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20580            sym_link_file=`$BASENAME $TEST_COMPILER`
20581            # Use the system pwd and not the shell builtin to resolve directory symlinks
20582            cd $sym_link_dir
20583            cd `$THEPWDCMD`
20584            sym_link_dir=`$THEPWDCMD`
20585            # Resolve file symlinks
20586            while test $COUNTER -lt 20; do
20587                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20588                if test "x$ISLINK" == x; then
20589                    # This is not a symbolic link! We are done!
20590                    break
20591                fi
20592                # Again resolve directory symlinks since the target of the just found
20593                # link could be in a different directory
20594                cd `$DIRNAME $ISLINK`
20595                sym_link_dir=`$THEPWDCMD`
20596                sym_link_file=`$BASENAME $ISLINK`
20597                let COUNTER=COUNTER+1
20598            done
20599            cd $STARTDIR
20600            TEST_COMPILER=$sym_link_dir/$sym_link_file
20601        fi
20602    fi
20603
20604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20605$as_echo "$TEST_COMPILER" >&6; }
20606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20607$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20608
20609  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20610  if test "x$COMPILER_BASENAME" = "xccache"; then
20611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20612$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20613    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20614    # We want to control ccache invocation ourselves, so ignore this cc and try
20615    # searching again.
20616
20617    # Remove the path to the fake ccache cc from the PATH
20618    RETRY_COMPILER_SAVED_PATH="$PATH"
20619    COMPILER_DIRNAME=`$DIRNAME $CXX`
20620    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20621
20622    # Try again looking for our compiler
20623    if test -n "$ac_tool_prefix"; then
20624  for ac_prog in $COMPILER_CHECK_LIST
20625  do
20626    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20627set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20629$as_echo_n "checking for $ac_word... " >&6; }
20630if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20631  $as_echo_n "(cached) " >&6
20632else
20633  if test -n "$PROPER_COMPILER_CXX"; then
20634  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20635else
20636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20637for as_dir in $PATH
20638do
20639  IFS=$as_save_IFS
20640  test -z "$as_dir" && as_dir=.
20641    for ac_exec_ext in '' $ac_executable_extensions; do
20642  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20643    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20645    break 2
20646  fi
20647done
20648  done
20649IFS=$as_save_IFS
20650
20651fi
20652fi
20653PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20654if test -n "$PROPER_COMPILER_CXX"; then
20655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20656$as_echo "$PROPER_COMPILER_CXX" >&6; }
20657else
20658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20659$as_echo "no" >&6; }
20660fi
20661
20662
20663    test -n "$PROPER_COMPILER_CXX" && break
20664  done
20665fi
20666if test -z "$PROPER_COMPILER_CXX"; then
20667  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20668  for ac_prog in $COMPILER_CHECK_LIST
20669do
20670  # Extract the first word of "$ac_prog", so it can be a program name with args.
20671set dummy $ac_prog; ac_word=$2
20672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20673$as_echo_n "checking for $ac_word... " >&6; }
20674if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20675  $as_echo_n "(cached) " >&6
20676else
20677  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20678  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20679else
20680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20681for as_dir in $PATH
20682do
20683  IFS=$as_save_IFS
20684  test -z "$as_dir" && as_dir=.
20685    for ac_exec_ext in '' $ac_executable_extensions; do
20686  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20687    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20689    break 2
20690  fi
20691done
20692  done
20693IFS=$as_save_IFS
20694
20695fi
20696fi
20697ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20698if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20700$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20701else
20702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20703$as_echo "no" >&6; }
20704fi
20705
20706
20707  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20708done
20709
20710  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20711    PROPER_COMPILER_CXX=""
20712  else
20713    case $cross_compiling:$ac_tool_warned in
20714yes:)
20715{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20716$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20717ac_tool_warned=yes ;;
20718esac
20719    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20720  fi
20721fi
20722
20723
20724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20725
20726  # First separate the path from the arguments. This will split at the first
20727  # space.
20728  complete="$PROPER_COMPILER_CXX"
20729  path="${complete%% *}"
20730  tmp="$complete EOL"
20731  arguments="${tmp#* }"
20732
20733  # Input might be given as Windows format, start by converting to
20734  # unix format.
20735  new_path=`$CYGPATH -u "$path"`
20736
20737  # Now try to locate executable using which
20738  new_path=`$WHICH "$new_path" 2> /dev/null`
20739  # bat and cmd files are not always considered executable in cygwin causing which
20740  # to not find them
20741  if test "x$new_path" = x \
20742           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20743           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20744    new_path=`$CYGPATH -u "$path"`
20745  fi
20746  if test "x$new_path" = x; then
20747    # Oops. Which didn't find the executable.
20748    # The splitting of arguments from the executable at a space might have been incorrect,
20749    # since paths with space are more likely in Windows. Give it another try with the whole
20750    # argument.
20751    path="$complete"
20752    arguments="EOL"
20753    new_path=`$CYGPATH -u "$path"`
20754    new_path=`$WHICH "$new_path" 2> /dev/null`
20755    # bat and cmd files are not always considered executable in cygwin causing which
20756    # to not find them
20757    if test "x$new_path" = x \
20758             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20759             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20760      new_path=`$CYGPATH -u "$path"`
20761    fi
20762    if test "x$new_path" = x; then
20763      # It's still not found. Now this is an unrecoverable error.
20764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20765$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20766      has_space=`$ECHO "$complete" | $GREP " "`
20767      if test "x$has_space" != x; then
20768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20770      fi
20771      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20772    fi
20773  fi
20774
20775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20778  # "foo.exe" is OK but "foo" is an error.
20779  #
20780  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20781  # It is also a way to make sure we got the proper file name for the real test later on.
20782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20783  if test "x$test_shortpath" = x; then
20784    # Short path failed, file does not exist as specified.
20785    # Try adding .exe or .cmd
20786    if test -f "${new_path}.exe"; then
20787       input_to_shortpath="${new_path}.exe"
20788    elif test -f "${new_path}.cmd"; then
20789       input_to_shortpath="${new_path}.cmd"
20790    else
20791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20792$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20793      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20794$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20795      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20796    fi
20797  else
20798    input_to_shortpath="$new_path"
20799  fi
20800
20801  # Call helper function which possibly converts this using DOS-style short mode.
20802  # If so, the updated path is stored in $new_path.
20803  new_path="$input_to_shortpath"
20804
20805  input_path="$input_to_shortpath"
20806  # Check if we need to convert this using DOS-style short mode. If the path
20807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20808  # take no chances and rewrite it.
20809  # Note: m4 eats our [], so we need to use [ and ] instead.
20810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20811  if test "x$has_forbidden_chars" != x; then
20812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20816      # Going to short mode and back again did indeed matter. Since short mode is
20817      # case insensitive, let's make it lowercase to improve readability.
20818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20819      # Now convert it back to Unix-stile (cygpath)
20820      input_path=`$CYGPATH -u "$shortmode_path"`
20821      new_path="$input_path"
20822    fi
20823  fi
20824
20825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20826  if test "x$test_cygdrive_prefix" = x; then
20827    # As a simple fix, exclude /usr/bin since it's not a real path.
20828    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20830      # a path prefixed by /cygdrive for fixpath to work.
20831      new_path="$CYGWIN_ROOT_PATH$input_path"
20832    fi
20833  fi
20834
20835  # remove trailing .exe if any
20836  new_path="${new_path/%.exe/}"
20837
20838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20839
20840  # First separate the path from the arguments. This will split at the first
20841  # space.
20842  complete="$PROPER_COMPILER_CXX"
20843  path="${complete%% *}"
20844  tmp="$complete EOL"
20845  arguments="${tmp#* }"
20846
20847  # Input might be given as Windows format, start by converting to
20848  # unix format.
20849  new_path="$path"
20850
20851  windows_path="$new_path"
20852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20853    unix_path=`$CYGPATH -u "$windows_path"`
20854    new_path="$unix_path"
20855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20857    new_path="$unix_path"
20858  fi
20859
20860
20861  # Now try to locate executable using which
20862  new_path=`$WHICH "$new_path" 2> /dev/null`
20863
20864  if test "x$new_path" = x; then
20865    # Oops. Which didn't find the executable.
20866    # The splitting of arguments from the executable at a space might have been incorrect,
20867    # since paths with space are more likely in Windows. Give it another try with the whole
20868    # argument.
20869    path="$complete"
20870    arguments="EOL"
20871    new_path="$path"
20872
20873  windows_path="$new_path"
20874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20875    unix_path=`$CYGPATH -u "$windows_path"`
20876    new_path="$unix_path"
20877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20879    new_path="$unix_path"
20880  fi
20881
20882
20883    new_path=`$WHICH "$new_path" 2> /dev/null`
20884
20885    if test "x$new_path" = x; then
20886      # It's still not found. Now this is an unrecoverable error.
20887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20888$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20889      has_space=`$ECHO "$complete" | $GREP " "`
20890      if test "x$has_space" != x; then
20891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20893      fi
20894      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20895    fi
20896  fi
20897
20898  # Now new_path has a complete unix path to the binary
20899  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20900    # Keep paths in /bin as-is, but remove trailing .exe if any
20901    new_path="${new_path/%.exe/}"
20902    # Do not save /bin paths to all_fixpath_prefixes!
20903  else
20904    # Not in mixed or Windows style, start by that.
20905    new_path=`cmd //c echo $new_path`
20906
20907  input_path="$new_path"
20908  # Check if we need to convert this using DOS-style short mode. If the path
20909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20910  # take no chances and rewrite it.
20911  # Note: m4 eats our [], so we need to use [ and ] instead.
20912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20913  if test "x$has_forbidden_chars" != x; then
20914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20916  fi
20917
20918    # Output is in $new_path
20919
20920  windows_path="$new_path"
20921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20922    unix_path=`$CYGPATH -u "$windows_path"`
20923    new_path="$unix_path"
20924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20926    new_path="$unix_path"
20927  fi
20928
20929    # remove trailing .exe if any
20930    new_path="${new_path/%.exe/}"
20931
20932    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20933    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20934  fi
20935
20936  else
20937    # We're on a posix platform. Hooray! :)
20938    # First separate the path from the arguments. This will split at the first
20939    # space.
20940    complete="$PROPER_COMPILER_CXX"
20941    path="${complete%% *}"
20942    tmp="$complete EOL"
20943    arguments="${tmp#* }"
20944
20945    # Cannot rely on the command "which" here since it doesn't always work.
20946    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20947    if test -z "$is_absolute_path"; then
20948      # Path to executable is not absolute. Find it.
20949      IFS_save="$IFS"
20950      IFS=:
20951      for p in $PATH; do
20952        if test -f "$p/$path" && test -x "$p/$path"; then
20953          new_path="$p/$path"
20954          break
20955        fi
20956      done
20957      IFS="$IFS_save"
20958    else
20959      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20960$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20961      new_path="$path"
20962    fi
20963
20964    if test "x$new_path" = x; then
20965        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20966$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20967        has_space=`$ECHO "$complete" | $GREP " "`
20968        if test "x$has_space" != x; then
20969          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20970$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20971        fi
20972        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20973      fi
20974  fi
20975
20976      # Now join together the path and the arguments once again
20977      if test "x$arguments" != xEOL; then
20978        new_complete="$new_path ${arguments% *}"
20979      else
20980        new_complete="$new_path"
20981      fi
20982
20983  if test "x$complete" != "x$new_complete"; then
20984      PROPER_COMPILER_CXX="$new_complete"
20985      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20986$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20987    fi
20988
20989    PATH="$RETRY_COMPILER_SAVED_PATH"
20990
20991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20992$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20993
20994    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20995        # Follow a chain of symbolic links. Use readlink
20996        # where it exists, else fall back to horribly
20997        # complicated shell code.
20998        if test "x$READLINK_TESTED" != yes; then
20999            # On MacOSX there is a readlink tool with a different
21000            # purpose than the GNU readlink tool. Check the found readlink.
21001            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21002            if test "x$ISGNU" = x; then
21003                 # A readlink that we do not know how to use.
21004                 # Are there other non-GNU readlinks out there?
21005                 READLINK_TESTED=yes
21006                 READLINK=
21007            fi
21008        fi
21009
21010        if test "x$READLINK" != x; then
21011            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21012        else
21013            # Save the current directory for restoring afterwards
21014            STARTDIR=$PWD
21015            COUNTER=0
21016            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21017            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21018            # Use the system pwd and not the shell builtin to resolve directory symlinks
21019            cd $sym_link_dir
21020            cd `$THEPWDCMD`
21021            sym_link_dir=`$THEPWDCMD`
21022            # Resolve file symlinks
21023            while test $COUNTER -lt 20; do
21024                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21025                if test "x$ISLINK" == x; then
21026                    # This is not a symbolic link! We are done!
21027                    break
21028                fi
21029                # Again resolve directory symlinks since the target of the just found
21030                # link could be in a different directory
21031                cd `$DIRNAME $ISLINK`
21032                sym_link_dir=`$THEPWDCMD`
21033                sym_link_file=`$BASENAME $ISLINK`
21034                let COUNTER=COUNTER+1
21035            done
21036            cd $STARTDIR
21037            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21038        fi
21039    fi
21040
21041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21042$as_echo "$PROPER_COMPILER_CXX" >&6; }
21043    CXX="$PROPER_COMPILER_CXX"
21044  else
21045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21046$as_echo "no, keeping CXX" >&6; }
21047    CXX="$TEST_COMPILER"
21048  fi
21049
21050  COMPILER=$CXX
21051  COMPILER_NAME=$COMPILER_NAME
21052
21053  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21054    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21055    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21056    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21057    if test $? -ne 0; then
21058      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21059
21060      { $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
21061$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21062      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21063$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21064      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21065    else
21066      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21067      COMPILER_VENDOR="Sun Studio"
21068    fi
21069  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21070    # First line typically looks something like:
21071    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21072    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21073    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21074    COMPILER_VENDOR="Microsoft CL.EXE"
21075    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21076    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21077      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21078        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21079      fi
21080    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21081      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21082        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21083      fi
21084    fi
21085  else
21086    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21087    # Check that this is likely to be GCC.
21088    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21089    if test $? -ne 0; then
21090      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21091$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21092      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21093$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21094      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21095    fi
21096
21097    # First line typically looks something like:
21098    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21099    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21100    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21101  fi
21102  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21103  CXX_VERSION="$COMPILER_VERSION"
21104  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21105  CXX_VENDOR="$COMPILER_VENDOR"
21106
21107  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21108$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21109
21110
21111# Now that we have resolved CXX ourself, let autoconf have its go at it
21112ac_ext=cpp
21113ac_cpp='$CXXCPP $CPPFLAGS'
21114ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21115ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21116ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21117if test -z "$CXX"; then
21118  if test -n "$CCC"; then
21119    CXX=$CCC
21120  else
21121    if test -n "$ac_tool_prefix"; then
21122  for ac_prog in $CXX
21123  do
21124    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21125set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21127$as_echo_n "checking for $ac_word... " >&6; }
21128if ${ac_cv_prog_CXX+:} false; then :
21129  $as_echo_n "(cached) " >&6
21130else
21131  if test -n "$CXX"; then
21132  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21133else
21134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21135for as_dir in $PATH
21136do
21137  IFS=$as_save_IFS
21138  test -z "$as_dir" && as_dir=.
21139    for ac_exec_ext in '' $ac_executable_extensions; do
21140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21141    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21143    break 2
21144  fi
21145done
21146  done
21147IFS=$as_save_IFS
21148
21149fi
21150fi
21151CXX=$ac_cv_prog_CXX
21152if test -n "$CXX"; then
21153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21154$as_echo "$CXX" >&6; }
21155else
21156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21157$as_echo "no" >&6; }
21158fi
21159
21160
21161    test -n "$CXX" && break
21162  done
21163fi
21164if test -z "$CXX"; then
21165  ac_ct_CXX=$CXX
21166  for ac_prog in $CXX
21167do
21168  # Extract the first word of "$ac_prog", so it can be a program name with args.
21169set dummy $ac_prog; ac_word=$2
21170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21171$as_echo_n "checking for $ac_word... " >&6; }
21172if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21173  $as_echo_n "(cached) " >&6
21174else
21175  if test -n "$ac_ct_CXX"; then
21176  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21177else
21178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21179for as_dir in $PATH
21180do
21181  IFS=$as_save_IFS
21182  test -z "$as_dir" && as_dir=.
21183    for ac_exec_ext in '' $ac_executable_extensions; do
21184  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21185    ac_cv_prog_ac_ct_CXX="$ac_prog"
21186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21187    break 2
21188  fi
21189done
21190  done
21191IFS=$as_save_IFS
21192
21193fi
21194fi
21195ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21196if test -n "$ac_ct_CXX"; then
21197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21198$as_echo "$ac_ct_CXX" >&6; }
21199else
21200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21201$as_echo "no" >&6; }
21202fi
21203
21204
21205  test -n "$ac_ct_CXX" && break
21206done
21207
21208  if test "x$ac_ct_CXX" = x; then
21209    CXX="g++"
21210  else
21211    case $cross_compiling:$ac_tool_warned in
21212yes:)
21213{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21214$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21215ac_tool_warned=yes ;;
21216esac
21217    CXX=$ac_ct_CXX
21218  fi
21219fi
21220
21221  fi
21222fi
21223# Provide some information about the compiler.
21224$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21225set X $ac_compile
21226ac_compiler=$2
21227for ac_option in --version -v -V -qversion; do
21228  { { ac_try="$ac_compiler $ac_option >&5"
21229case "(($ac_try" in
21230  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21231  *) ac_try_echo=$ac_try;;
21232esac
21233eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21234$as_echo "$ac_try_echo"; } >&5
21235  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21236  ac_status=$?
21237  if test -s conftest.err; then
21238    sed '10a\
21239... rest of stderr output deleted ...
21240         10q' conftest.err >conftest.er1
21241    cat conftest.er1 >&5
21242  fi
21243  rm -f conftest.er1 conftest.err
21244  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21245  test $ac_status = 0; }
21246done
21247
21248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21249$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21250if ${ac_cv_cxx_compiler_gnu+:} false; then :
21251  $as_echo_n "(cached) " >&6
21252else
21253  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21254/* end confdefs.h.  */
21255
21256int
21257main ()
21258{
21259#ifndef __GNUC__
21260       choke me
21261#endif
21262
21263  ;
21264  return 0;
21265}
21266_ACEOF
21267if ac_fn_cxx_try_compile "$LINENO"; then :
21268  ac_compiler_gnu=yes
21269else
21270  ac_compiler_gnu=no
21271fi
21272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21273ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21274
21275fi
21276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21277$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21278if test $ac_compiler_gnu = yes; then
21279  GXX=yes
21280else
21281  GXX=
21282fi
21283ac_test_CXXFLAGS=${CXXFLAGS+set}
21284ac_save_CXXFLAGS=$CXXFLAGS
21285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21286$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21287if ${ac_cv_prog_cxx_g+:} false; then :
21288  $as_echo_n "(cached) " >&6
21289else
21290  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21291   ac_cxx_werror_flag=yes
21292   ac_cv_prog_cxx_g=no
21293   CXXFLAGS="-g"
21294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21295/* end confdefs.h.  */
21296
21297int
21298main ()
21299{
21300
21301  ;
21302  return 0;
21303}
21304_ACEOF
21305if ac_fn_cxx_try_compile "$LINENO"; then :
21306  ac_cv_prog_cxx_g=yes
21307else
21308  CXXFLAGS=""
21309      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21310/* end confdefs.h.  */
21311
21312int
21313main ()
21314{
21315
21316  ;
21317  return 0;
21318}
21319_ACEOF
21320if ac_fn_cxx_try_compile "$LINENO"; then :
21321
21322else
21323  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21324	 CXXFLAGS="-g"
21325	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21326/* end confdefs.h.  */
21327
21328int
21329main ()
21330{
21331
21332  ;
21333  return 0;
21334}
21335_ACEOF
21336if ac_fn_cxx_try_compile "$LINENO"; then :
21337  ac_cv_prog_cxx_g=yes
21338fi
21339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21340fi
21341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21342fi
21343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21344   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21345fi
21346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21347$as_echo "$ac_cv_prog_cxx_g" >&6; }
21348if test "$ac_test_CXXFLAGS" = set; then
21349  CXXFLAGS=$ac_save_CXXFLAGS
21350elif test $ac_cv_prog_cxx_g = yes; then
21351  if test "$GXX" = yes; then
21352    CXXFLAGS="-g -O2"
21353  else
21354    CXXFLAGS="-g"
21355  fi
21356else
21357  if test "$GXX" = yes; then
21358    CXXFLAGS="-O2"
21359  else
21360    CXXFLAGS=
21361  fi
21362fi
21363ac_ext=cpp
21364ac_cpp='$CXXCPP $CPPFLAGS'
21365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21368
21369
21370### Locate other tools
21371
21372if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21373    ac_ext=m
21374ac_cpp='$OBJCPP $CPPFLAGS'
21375ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21376ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21377ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21378if test -n "$ac_tool_prefix"; then
21379  for ac_prog in gcc objcc objc cc CC
21380  do
21381    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21382set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21384$as_echo_n "checking for $ac_word... " >&6; }
21385if ${ac_cv_prog_OBJC+:} false; then :
21386  $as_echo_n "(cached) " >&6
21387else
21388  if test -n "$OBJC"; then
21389  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21390else
21391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21392for as_dir in $PATH
21393do
21394  IFS=$as_save_IFS
21395  test -z "$as_dir" && as_dir=.
21396    for ac_exec_ext in '' $ac_executable_extensions; do
21397  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21398    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21400    break 2
21401  fi
21402done
21403  done
21404IFS=$as_save_IFS
21405
21406fi
21407fi
21408OBJC=$ac_cv_prog_OBJC
21409if test -n "$OBJC"; then
21410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21411$as_echo "$OBJC" >&6; }
21412else
21413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21414$as_echo "no" >&6; }
21415fi
21416
21417
21418    test -n "$OBJC" && break
21419  done
21420fi
21421if test -z "$OBJC"; then
21422  ac_ct_OBJC=$OBJC
21423  for ac_prog in gcc objcc objc cc CC
21424do
21425  # Extract the first word of "$ac_prog", so it can be a program name with args.
21426set dummy $ac_prog; ac_word=$2
21427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21428$as_echo_n "checking for $ac_word... " >&6; }
21429if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21430  $as_echo_n "(cached) " >&6
21431else
21432  if test -n "$ac_ct_OBJC"; then
21433  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21434else
21435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21436for as_dir in $PATH
21437do
21438  IFS=$as_save_IFS
21439  test -z "$as_dir" && as_dir=.
21440    for ac_exec_ext in '' $ac_executable_extensions; do
21441  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21442    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21444    break 2
21445  fi
21446done
21447  done
21448IFS=$as_save_IFS
21449
21450fi
21451fi
21452ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21453if test -n "$ac_ct_OBJC"; then
21454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21455$as_echo "$ac_ct_OBJC" >&6; }
21456else
21457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21458$as_echo "no" >&6; }
21459fi
21460
21461
21462  test -n "$ac_ct_OBJC" && break
21463done
21464
21465  if test "x$ac_ct_OBJC" = x; then
21466    OBJC="gcc"
21467  else
21468    case $cross_compiling:$ac_tool_warned in
21469yes:)
21470{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21471$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21472ac_tool_warned=yes ;;
21473esac
21474    OBJC=$ac_ct_OBJC
21475  fi
21476fi
21477
21478# Provide some information about the compiler.
21479$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21480set X $ac_compile
21481ac_compiler=$2
21482for ac_option in --version -v -V -qversion; do
21483  { { ac_try="$ac_compiler $ac_option >&5"
21484case "(($ac_try" in
21485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21486  *) ac_try_echo=$ac_try;;
21487esac
21488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21489$as_echo "$ac_try_echo"; } >&5
21490  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21491  ac_status=$?
21492  if test -s conftest.err; then
21493    sed '10a\
21494... rest of stderr output deleted ...
21495         10q' conftest.err >conftest.er1
21496    cat conftest.er1 >&5
21497  fi
21498  rm -f conftest.er1 conftest.err
21499  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21500  test $ac_status = 0; }
21501done
21502
21503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21504$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21505if ${ac_cv_objc_compiler_gnu+:} false; then :
21506  $as_echo_n "(cached) " >&6
21507else
21508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21509/* end confdefs.h.  */
21510
21511int
21512main ()
21513{
21514#ifndef __GNUC__
21515       choke me
21516#endif
21517
21518  ;
21519  return 0;
21520}
21521_ACEOF
21522if ac_fn_objc_try_compile "$LINENO"; then :
21523  ac_compiler_gnu=yes
21524else
21525  ac_compiler_gnu=no
21526fi
21527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21528ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21529
21530fi
21531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21532$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21533if test $ac_compiler_gnu = yes; then
21534  GOBJC=yes
21535else
21536  GOBJC=
21537fi
21538ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21539ac_save_OBJCFLAGS=$OBJCFLAGS
21540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21541$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21542if ${ac_cv_prog_objc_g+:} false; then :
21543  $as_echo_n "(cached) " >&6
21544else
21545  ac_save_objc_werror_flag=$ac_objc_werror_flag
21546   ac_objc_werror_flag=yes
21547   ac_cv_prog_objc_g=no
21548   OBJCFLAGS="-g"
21549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21550/* end confdefs.h.  */
21551
21552int
21553main ()
21554{
21555
21556  ;
21557  return 0;
21558}
21559_ACEOF
21560if ac_fn_objc_try_compile "$LINENO"; then :
21561  ac_cv_prog_objc_g=yes
21562else
21563  OBJCFLAGS=""
21564      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21565/* end confdefs.h.  */
21566
21567int
21568main ()
21569{
21570
21571  ;
21572  return 0;
21573}
21574_ACEOF
21575if ac_fn_objc_try_compile "$LINENO"; then :
21576
21577else
21578  ac_objc_werror_flag=$ac_save_objc_werror_flag
21579	 OBJCFLAGS="-g"
21580	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21581/* end confdefs.h.  */
21582
21583int
21584main ()
21585{
21586
21587  ;
21588  return 0;
21589}
21590_ACEOF
21591if ac_fn_objc_try_compile "$LINENO"; then :
21592  ac_cv_prog_objc_g=yes
21593fi
21594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21595fi
21596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21597fi
21598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21599   ac_objc_werror_flag=$ac_save_objc_werror_flag
21600fi
21601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21602$as_echo "$ac_cv_prog_objc_g" >&6; }
21603if test "$ac_test_OBJCFLAGS" = set; then
21604  OBJCFLAGS=$ac_save_OBJCFLAGS
21605elif test $ac_cv_prog_objc_g = yes; then
21606  if test "$GOBJC" = yes; then
21607    OBJCFLAGS="-g -O2"
21608  else
21609    OBJCFLAGS="-g"
21610  fi
21611else
21612  if test "$GOBJC" = yes; then
21613    OBJCFLAGS="-O2"
21614  else
21615    OBJCFLAGS=
21616  fi
21617fi
21618ac_ext=cpp
21619ac_cpp='$CXXCPP $CPPFLAGS'
21620ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21621ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21622ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21623
21624
21625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21626
21627  # First separate the path from the arguments. This will split at the first
21628  # space.
21629  complete="$OBJC"
21630  path="${complete%% *}"
21631  tmp="$complete EOL"
21632  arguments="${tmp#* }"
21633
21634  # Input might be given as Windows format, start by converting to
21635  # unix format.
21636  new_path=`$CYGPATH -u "$path"`
21637
21638  # Now try to locate executable using which
21639  new_path=`$WHICH "$new_path" 2> /dev/null`
21640  # bat and cmd files are not always considered executable in cygwin causing which
21641  # to not find them
21642  if test "x$new_path" = x \
21643           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21644           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21645    new_path=`$CYGPATH -u "$path"`
21646  fi
21647  if test "x$new_path" = x; then
21648    # Oops. Which didn't find the executable.
21649    # The splitting of arguments from the executable at a space might have been incorrect,
21650    # since paths with space are more likely in Windows. Give it another try with the whole
21651    # argument.
21652    path="$complete"
21653    arguments="EOL"
21654    new_path=`$CYGPATH -u "$path"`
21655    new_path=`$WHICH "$new_path" 2> /dev/null`
21656    # bat and cmd files are not always considered executable in cygwin causing which
21657    # to not find them
21658    if test "x$new_path" = x \
21659             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21660             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21661      new_path=`$CYGPATH -u "$path"`
21662    fi
21663    if test "x$new_path" = x; then
21664      # It's still not found. Now this is an unrecoverable error.
21665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21666$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21667      has_space=`$ECHO "$complete" | $GREP " "`
21668      if test "x$has_space" != x; then
21669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21671      fi
21672      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21673    fi
21674  fi
21675
21676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21679  # "foo.exe" is OK but "foo" is an error.
21680  #
21681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21682  # It is also a way to make sure we got the proper file name for the real test later on.
21683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21684  if test "x$test_shortpath" = x; then
21685    # Short path failed, file does not exist as specified.
21686    # Try adding .exe or .cmd
21687    if test -f "${new_path}.exe"; then
21688       input_to_shortpath="${new_path}.exe"
21689    elif test -f "${new_path}.cmd"; then
21690       input_to_shortpath="${new_path}.cmd"
21691    else
21692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21693$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21694      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21695$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21696      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21697    fi
21698  else
21699    input_to_shortpath="$new_path"
21700  fi
21701
21702  # Call helper function which possibly converts this using DOS-style short mode.
21703  # If so, the updated path is stored in $new_path.
21704  new_path="$input_to_shortpath"
21705
21706  input_path="$input_to_shortpath"
21707  # Check if we need to convert this using DOS-style short mode. If the path
21708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21709  # take no chances and rewrite it.
21710  # Note: m4 eats our [], so we need to use [ and ] instead.
21711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21712  if test "x$has_forbidden_chars" != x; then
21713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21717      # Going to short mode and back again did indeed matter. Since short mode is
21718      # case insensitive, let's make it lowercase to improve readability.
21719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21720      # Now convert it back to Unix-stile (cygpath)
21721      input_path=`$CYGPATH -u "$shortmode_path"`
21722      new_path="$input_path"
21723    fi
21724  fi
21725
21726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21727  if test "x$test_cygdrive_prefix" = x; then
21728    # As a simple fix, exclude /usr/bin since it's not a real path.
21729    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21731      # a path prefixed by /cygdrive for fixpath to work.
21732      new_path="$CYGWIN_ROOT_PATH$input_path"
21733    fi
21734  fi
21735
21736  # remove trailing .exe if any
21737  new_path="${new_path/%.exe/}"
21738
21739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21740
21741  # First separate the path from the arguments. This will split at the first
21742  # space.
21743  complete="$OBJC"
21744  path="${complete%% *}"
21745  tmp="$complete EOL"
21746  arguments="${tmp#* }"
21747
21748  # Input might be given as Windows format, start by converting to
21749  # unix format.
21750  new_path="$path"
21751
21752  windows_path="$new_path"
21753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21754    unix_path=`$CYGPATH -u "$windows_path"`
21755    new_path="$unix_path"
21756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21758    new_path="$unix_path"
21759  fi
21760
21761
21762  # Now try to locate executable using which
21763  new_path=`$WHICH "$new_path" 2> /dev/null`
21764
21765  if test "x$new_path" = x; then
21766    # Oops. Which didn't find the executable.
21767    # The splitting of arguments from the executable at a space might have been incorrect,
21768    # since paths with space are more likely in Windows. Give it another try with the whole
21769    # argument.
21770    path="$complete"
21771    arguments="EOL"
21772    new_path="$path"
21773
21774  windows_path="$new_path"
21775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21776    unix_path=`$CYGPATH -u "$windows_path"`
21777    new_path="$unix_path"
21778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21780    new_path="$unix_path"
21781  fi
21782
21783
21784    new_path=`$WHICH "$new_path" 2> /dev/null`
21785
21786    if test "x$new_path" = x; then
21787      # It's still not found. Now this is an unrecoverable error.
21788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21789$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21790      has_space=`$ECHO "$complete" | $GREP " "`
21791      if test "x$has_space" != x; then
21792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21794      fi
21795      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21796    fi
21797  fi
21798
21799  # Now new_path has a complete unix path to the binary
21800  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21801    # Keep paths in /bin as-is, but remove trailing .exe if any
21802    new_path="${new_path/%.exe/}"
21803    # Do not save /bin paths to all_fixpath_prefixes!
21804  else
21805    # Not in mixed or Windows style, start by that.
21806    new_path=`cmd //c echo $new_path`
21807
21808  input_path="$new_path"
21809  # Check if we need to convert this using DOS-style short mode. If the path
21810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21811  # take no chances and rewrite it.
21812  # Note: m4 eats our [], so we need to use [ and ] instead.
21813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21814  if test "x$has_forbidden_chars" != x; then
21815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21817  fi
21818
21819    # Output is in $new_path
21820
21821  windows_path="$new_path"
21822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21823    unix_path=`$CYGPATH -u "$windows_path"`
21824    new_path="$unix_path"
21825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21827    new_path="$unix_path"
21828  fi
21829
21830    # remove trailing .exe if any
21831    new_path="${new_path/%.exe/}"
21832
21833    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21834    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21835  fi
21836
21837  else
21838    # We're on a posix platform. Hooray! :)
21839    # First separate the path from the arguments. This will split at the first
21840    # space.
21841    complete="$OBJC"
21842    path="${complete%% *}"
21843    tmp="$complete EOL"
21844    arguments="${tmp#* }"
21845
21846    # Cannot rely on the command "which" here since it doesn't always work.
21847    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21848    if test -z "$is_absolute_path"; then
21849      # Path to executable is not absolute. Find it.
21850      IFS_save="$IFS"
21851      IFS=:
21852      for p in $PATH; do
21853        if test -f "$p/$path" && test -x "$p/$path"; then
21854          new_path="$p/$path"
21855          break
21856        fi
21857      done
21858      IFS="$IFS_save"
21859    else
21860      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21861$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21862      new_path="$path"
21863    fi
21864
21865    if test "x$new_path" = x; then
21866        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21867$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21868        has_space=`$ECHO "$complete" | $GREP " "`
21869        if test "x$has_space" != x; then
21870          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21871$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21872        fi
21873        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21874      fi
21875  fi
21876
21877      # Now join together the path and the arguments once again
21878      if test "x$arguments" != xEOL; then
21879        new_complete="$new_path ${arguments% *}"
21880      else
21881        new_complete="$new_path"
21882      fi
21883
21884  if test "x$complete" != "x$new_complete"; then
21885      OBJC="$new_complete"
21886      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21887$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21888    fi
21889
21890else
21891    OBJC=
21892fi
21893
21894# Restore the flags to the user specified values.
21895# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21896CFLAGS="$ORG_CFLAGS"
21897CXXFLAGS="$ORG_CXXFLAGS"
21898OBJCFLAGS="$ORG_OBJCFLAGS"
21899
21900LD="$CC"
21901LDEXE="$CC"
21902LDCXX="$CXX"
21903LDEXECXX="$CXX"
21904
21905# LDEXE is the linker to use, when creating executables.
21906
21907# Linking C++ libraries.
21908
21909# Linking C++ executables.
21910
21911
21912if test "x$OPENJDK_TARGET_OS" != xwindows; then
21913    if test -n "$ac_tool_prefix"; then
21914  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21915set dummy ${ac_tool_prefix}ar; ac_word=$2
21916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21917$as_echo_n "checking for $ac_word... " >&6; }
21918if ${ac_cv_prog_AR+:} false; then :
21919  $as_echo_n "(cached) " >&6
21920else
21921  if test -n "$AR"; then
21922  ac_cv_prog_AR="$AR" # Let the user override the test.
21923else
21924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21925for as_dir in $PATH
21926do
21927  IFS=$as_save_IFS
21928  test -z "$as_dir" && as_dir=.
21929    for ac_exec_ext in '' $ac_executable_extensions; do
21930  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21931    ac_cv_prog_AR="${ac_tool_prefix}ar"
21932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21933    break 2
21934  fi
21935done
21936  done
21937IFS=$as_save_IFS
21938
21939fi
21940fi
21941AR=$ac_cv_prog_AR
21942if test -n "$AR"; then
21943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21944$as_echo "$AR" >&6; }
21945else
21946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21947$as_echo "no" >&6; }
21948fi
21949
21950
21951fi
21952if test -z "$ac_cv_prog_AR"; then
21953  ac_ct_AR=$AR
21954  # Extract the first word of "ar", so it can be a program name with args.
21955set dummy ar; ac_word=$2
21956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21957$as_echo_n "checking for $ac_word... " >&6; }
21958if ${ac_cv_prog_ac_ct_AR+:} false; then :
21959  $as_echo_n "(cached) " >&6
21960else
21961  if test -n "$ac_ct_AR"; then
21962  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21963else
21964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21965for as_dir in $PATH
21966do
21967  IFS=$as_save_IFS
21968  test -z "$as_dir" && as_dir=.
21969    for ac_exec_ext in '' $ac_executable_extensions; do
21970  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21971    ac_cv_prog_ac_ct_AR="ar"
21972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21973    break 2
21974  fi
21975done
21976  done
21977IFS=$as_save_IFS
21978
21979fi
21980fi
21981ac_ct_AR=$ac_cv_prog_ac_ct_AR
21982if test -n "$ac_ct_AR"; then
21983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21984$as_echo "$ac_ct_AR" >&6; }
21985else
21986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21987$as_echo "no" >&6; }
21988fi
21989
21990  if test "x$ac_ct_AR" = x; then
21991    AR=""
21992  else
21993    case $cross_compiling:$ac_tool_warned in
21994yes:)
21995{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21996$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21997ac_tool_warned=yes ;;
21998esac
21999    AR=$ac_ct_AR
22000  fi
22001else
22002  AR="$ac_cv_prog_AR"
22003fi
22004
22005
22006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22007
22008  # First separate the path from the arguments. This will split at the first
22009  # space.
22010  complete="$AR"
22011  path="${complete%% *}"
22012  tmp="$complete EOL"
22013  arguments="${tmp#* }"
22014
22015  # Input might be given as Windows format, start by converting to
22016  # unix format.
22017  new_path=`$CYGPATH -u "$path"`
22018
22019  # Now try to locate executable using which
22020  new_path=`$WHICH "$new_path" 2> /dev/null`
22021  # bat and cmd files are not always considered executable in cygwin causing which
22022  # to not find them
22023  if test "x$new_path" = x \
22024           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22025           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22026    new_path=`$CYGPATH -u "$path"`
22027  fi
22028  if test "x$new_path" = x; then
22029    # Oops. Which didn't find the executable.
22030    # The splitting of arguments from the executable at a space might have been incorrect,
22031    # since paths with space are more likely in Windows. Give it another try with the whole
22032    # argument.
22033    path="$complete"
22034    arguments="EOL"
22035    new_path=`$CYGPATH -u "$path"`
22036    new_path=`$WHICH "$new_path" 2> /dev/null`
22037    # bat and cmd files are not always considered executable in cygwin causing which
22038    # to not find them
22039    if test "x$new_path" = x \
22040             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22041             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22042      new_path=`$CYGPATH -u "$path"`
22043    fi
22044    if test "x$new_path" = x; then
22045      # It's still not found. Now this is an unrecoverable error.
22046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22047$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22048      has_space=`$ECHO "$complete" | $GREP " "`
22049      if test "x$has_space" != x; then
22050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22052      fi
22053      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22054    fi
22055  fi
22056
22057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22060  # "foo.exe" is OK but "foo" is an error.
22061  #
22062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22063  # It is also a way to make sure we got the proper file name for the real test later on.
22064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22065  if test "x$test_shortpath" = x; then
22066    # Short path failed, file does not exist as specified.
22067    # Try adding .exe or .cmd
22068    if test -f "${new_path}.exe"; then
22069       input_to_shortpath="${new_path}.exe"
22070    elif test -f "${new_path}.cmd"; then
22071       input_to_shortpath="${new_path}.cmd"
22072    else
22073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22074$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22075      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22076$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22077      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22078    fi
22079  else
22080    input_to_shortpath="$new_path"
22081  fi
22082
22083  # Call helper function which possibly converts this using DOS-style short mode.
22084  # If so, the updated path is stored in $new_path.
22085  new_path="$input_to_shortpath"
22086
22087  input_path="$input_to_shortpath"
22088  # Check if we need to convert this using DOS-style short mode. If the path
22089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22090  # take no chances and rewrite it.
22091  # Note: m4 eats our [], so we need to use [ and ] instead.
22092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22093  if test "x$has_forbidden_chars" != x; then
22094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22098      # Going to short mode and back again did indeed matter. Since short mode is
22099      # case insensitive, let's make it lowercase to improve readability.
22100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22101      # Now convert it back to Unix-stile (cygpath)
22102      input_path=`$CYGPATH -u "$shortmode_path"`
22103      new_path="$input_path"
22104    fi
22105  fi
22106
22107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22108  if test "x$test_cygdrive_prefix" = x; then
22109    # As a simple fix, exclude /usr/bin since it's not a real path.
22110    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22112      # a path prefixed by /cygdrive for fixpath to work.
22113      new_path="$CYGWIN_ROOT_PATH$input_path"
22114    fi
22115  fi
22116
22117  # remove trailing .exe if any
22118  new_path="${new_path/%.exe/}"
22119
22120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22121
22122  # First separate the path from the arguments. This will split at the first
22123  # space.
22124  complete="$AR"
22125  path="${complete%% *}"
22126  tmp="$complete EOL"
22127  arguments="${tmp#* }"
22128
22129  # Input might be given as Windows format, start by converting to
22130  # unix format.
22131  new_path="$path"
22132
22133  windows_path="$new_path"
22134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22135    unix_path=`$CYGPATH -u "$windows_path"`
22136    new_path="$unix_path"
22137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22139    new_path="$unix_path"
22140  fi
22141
22142
22143  # Now try to locate executable using which
22144  new_path=`$WHICH "$new_path" 2> /dev/null`
22145
22146  if test "x$new_path" = x; then
22147    # Oops. Which didn't find the executable.
22148    # The splitting of arguments from the executable at a space might have been incorrect,
22149    # since paths with space are more likely in Windows. Give it another try with the whole
22150    # argument.
22151    path="$complete"
22152    arguments="EOL"
22153    new_path="$path"
22154
22155  windows_path="$new_path"
22156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22157    unix_path=`$CYGPATH -u "$windows_path"`
22158    new_path="$unix_path"
22159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22161    new_path="$unix_path"
22162  fi
22163
22164
22165    new_path=`$WHICH "$new_path" 2> /dev/null`
22166
22167    if test "x$new_path" = x; then
22168      # It's still not found. Now this is an unrecoverable error.
22169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22170$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22171      has_space=`$ECHO "$complete" | $GREP " "`
22172      if test "x$has_space" != x; then
22173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22175      fi
22176      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22177    fi
22178  fi
22179
22180  # Now new_path has a complete unix path to the binary
22181  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22182    # Keep paths in /bin as-is, but remove trailing .exe if any
22183    new_path="${new_path/%.exe/}"
22184    # Do not save /bin paths to all_fixpath_prefixes!
22185  else
22186    # Not in mixed or Windows style, start by that.
22187    new_path=`cmd //c echo $new_path`
22188
22189  input_path="$new_path"
22190  # Check if we need to convert this using DOS-style short mode. If the path
22191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22192  # take no chances and rewrite it.
22193  # Note: m4 eats our [], so we need to use [ and ] instead.
22194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22195  if test "x$has_forbidden_chars" != x; then
22196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22198  fi
22199
22200    # Output is in $new_path
22201
22202  windows_path="$new_path"
22203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22204    unix_path=`$CYGPATH -u "$windows_path"`
22205    new_path="$unix_path"
22206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22208    new_path="$unix_path"
22209  fi
22210
22211    # remove trailing .exe if any
22212    new_path="${new_path/%.exe/}"
22213
22214    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22215    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22216  fi
22217
22218  else
22219    # We're on a posix platform. Hooray! :)
22220    # First separate the path from the arguments. This will split at the first
22221    # space.
22222    complete="$AR"
22223    path="${complete%% *}"
22224    tmp="$complete EOL"
22225    arguments="${tmp#* }"
22226
22227    # Cannot rely on the command "which" here since it doesn't always work.
22228    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22229    if test -z "$is_absolute_path"; then
22230      # Path to executable is not absolute. Find it.
22231      IFS_save="$IFS"
22232      IFS=:
22233      for p in $PATH; do
22234        if test -f "$p/$path" && test -x "$p/$path"; then
22235          new_path="$p/$path"
22236          break
22237        fi
22238      done
22239      IFS="$IFS_save"
22240    else
22241      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22242$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22243      new_path="$path"
22244    fi
22245
22246    if test "x$new_path" = x; then
22247        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22248$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22249        has_space=`$ECHO "$complete" | $GREP " "`
22250        if test "x$has_space" != x; then
22251          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22252$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22253        fi
22254        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22255      fi
22256  fi
22257
22258      # Now join together the path and the arguments once again
22259      if test "x$arguments" != xEOL; then
22260        new_complete="$new_path ${arguments% *}"
22261      else
22262        new_complete="$new_path"
22263      fi
22264
22265  if test "x$complete" != "x$new_complete"; then
22266      AR="$new_complete"
22267      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22268$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22269    fi
22270
22271fi
22272if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22273    ARFLAGS="-r"
22274else
22275    ARFLAGS=""
22276fi
22277
22278
22279# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22280HOTSPOT_CXX="$CXX"
22281HOTSPOT_LD="$LD"
22282
22283
22284
22285COMPILER_NAME=gcc
22286COMPILER_TYPE=CC
22287if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22288
22289    # For now, assume that we are always compiling using cl.exe.
22290    CC_OUT_OPTION=-Fo
22291    EXE_OUT_OPTION=-out:
22292    LD_OUT_OPTION=-out:
22293    AR_OUT_OPTION=-out:
22294    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22295    # program for something completely different.
22296    # Extract the first word of "link", so it can be a program name with args.
22297set dummy link; ac_word=$2
22298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22299$as_echo_n "checking for $ac_word... " >&6; }
22300if ${ac_cv_prog_WINLD+:} false; then :
22301  $as_echo_n "(cached) " >&6
22302else
22303  if test -n "$WINLD"; then
22304  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22305else
22306  ac_prog_rejected=no
22307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22308for as_dir in $PATH
22309do
22310  IFS=$as_save_IFS
22311  test -z "$as_dir" && as_dir=.
22312    for ac_exec_ext in '' $ac_executable_extensions; do
22313  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22314    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22315       ac_prog_rejected=yes
22316       continue
22317     fi
22318    ac_cv_prog_WINLD="link"
22319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22320    break 2
22321  fi
22322done
22323  done
22324IFS=$as_save_IFS
22325
22326if test $ac_prog_rejected = yes; then
22327  # We found a bogon in the path, so make sure we never use it.
22328  set dummy $ac_cv_prog_WINLD
22329  shift
22330  if test $# != 0; then
22331    # We chose a different compiler from the bogus one.
22332    # However, it has the same basename, so the bogon will be chosen
22333    # first if we set WINLD to just the basename; use the full file name.
22334    shift
22335    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22336  fi
22337fi
22338fi
22339fi
22340WINLD=$ac_cv_prog_WINLD
22341if test -n "$WINLD"; then
22342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22343$as_echo "$WINLD" >&6; }
22344else
22345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22346$as_echo "no" >&6; }
22347fi
22348
22349
22350    # Since we must ignore the first found link, WINLD will contain
22351    # the full path to the link.exe program.
22352
22353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22354
22355  # First separate the path from the arguments. This will split at the first
22356  # space.
22357  complete="$WINLD"
22358  path="${complete%% *}"
22359  tmp="$complete EOL"
22360  arguments="${tmp#* }"
22361
22362  # Input might be given as Windows format, start by converting to
22363  # unix format.
22364  new_path=`$CYGPATH -u "$path"`
22365
22366  # Now try to locate executable using which
22367  new_path=`$WHICH "$new_path" 2> /dev/null`
22368  # bat and cmd files are not always considered executable in cygwin causing which
22369  # to not find them
22370  if test "x$new_path" = x \
22371           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22372           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22373    new_path=`$CYGPATH -u "$path"`
22374  fi
22375  if test "x$new_path" = x; then
22376    # Oops. Which didn't find the executable.
22377    # The splitting of arguments from the executable at a space might have been incorrect,
22378    # since paths with space are more likely in Windows. Give it another try with the whole
22379    # argument.
22380    path="$complete"
22381    arguments="EOL"
22382    new_path=`$CYGPATH -u "$path"`
22383    new_path=`$WHICH "$new_path" 2> /dev/null`
22384    # bat and cmd files are not always considered executable in cygwin causing which
22385    # to not find them
22386    if test "x$new_path" = x \
22387             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22388             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22389      new_path=`$CYGPATH -u "$path"`
22390    fi
22391    if test "x$new_path" = x; then
22392      # It's still not found. Now this is an unrecoverable error.
22393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22394$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22395      has_space=`$ECHO "$complete" | $GREP " "`
22396      if test "x$has_space" != x; then
22397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22399      fi
22400      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22401    fi
22402  fi
22403
22404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22407  # "foo.exe" is OK but "foo" is an error.
22408  #
22409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22410  # It is also a way to make sure we got the proper file name for the real test later on.
22411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22412  if test "x$test_shortpath" = x; then
22413    # Short path failed, file does not exist as specified.
22414    # Try adding .exe or .cmd
22415    if test -f "${new_path}.exe"; then
22416       input_to_shortpath="${new_path}.exe"
22417    elif test -f "${new_path}.cmd"; then
22418       input_to_shortpath="${new_path}.cmd"
22419    else
22420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22421$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22422      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22423$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22424      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22425    fi
22426  else
22427    input_to_shortpath="$new_path"
22428  fi
22429
22430  # Call helper function which possibly converts this using DOS-style short mode.
22431  # If so, the updated path is stored in $new_path.
22432  new_path="$input_to_shortpath"
22433
22434  input_path="$input_to_shortpath"
22435  # Check if we need to convert this using DOS-style short mode. If the path
22436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22437  # take no chances and rewrite it.
22438  # Note: m4 eats our [], so we need to use [ and ] instead.
22439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22440  if test "x$has_forbidden_chars" != x; then
22441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22445      # Going to short mode and back again did indeed matter. Since short mode is
22446      # case insensitive, let's make it lowercase to improve readability.
22447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22448      # Now convert it back to Unix-stile (cygpath)
22449      input_path=`$CYGPATH -u "$shortmode_path"`
22450      new_path="$input_path"
22451    fi
22452  fi
22453
22454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22455  if test "x$test_cygdrive_prefix" = x; then
22456    # As a simple fix, exclude /usr/bin since it's not a real path.
22457    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22459      # a path prefixed by /cygdrive for fixpath to work.
22460      new_path="$CYGWIN_ROOT_PATH$input_path"
22461    fi
22462  fi
22463
22464  # remove trailing .exe if any
22465  new_path="${new_path/%.exe/}"
22466
22467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22468
22469  # First separate the path from the arguments. This will split at the first
22470  # space.
22471  complete="$WINLD"
22472  path="${complete%% *}"
22473  tmp="$complete EOL"
22474  arguments="${tmp#* }"
22475
22476  # Input might be given as Windows format, start by converting to
22477  # unix format.
22478  new_path="$path"
22479
22480  windows_path="$new_path"
22481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22482    unix_path=`$CYGPATH -u "$windows_path"`
22483    new_path="$unix_path"
22484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22486    new_path="$unix_path"
22487  fi
22488
22489
22490  # Now try to locate executable using which
22491  new_path=`$WHICH "$new_path" 2> /dev/null`
22492
22493  if test "x$new_path" = x; then
22494    # Oops. Which didn't find the executable.
22495    # The splitting of arguments from the executable at a space might have been incorrect,
22496    # since paths with space are more likely in Windows. Give it another try with the whole
22497    # argument.
22498    path="$complete"
22499    arguments="EOL"
22500    new_path="$path"
22501
22502  windows_path="$new_path"
22503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22504    unix_path=`$CYGPATH -u "$windows_path"`
22505    new_path="$unix_path"
22506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22508    new_path="$unix_path"
22509  fi
22510
22511
22512    new_path=`$WHICH "$new_path" 2> /dev/null`
22513
22514    if test "x$new_path" = x; then
22515      # It's still not found. Now this is an unrecoverable error.
22516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22517$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22518      has_space=`$ECHO "$complete" | $GREP " "`
22519      if test "x$has_space" != x; then
22520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22522      fi
22523      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22524    fi
22525  fi
22526
22527  # Now new_path has a complete unix path to the binary
22528  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22529    # Keep paths in /bin as-is, but remove trailing .exe if any
22530    new_path="${new_path/%.exe/}"
22531    # Do not save /bin paths to all_fixpath_prefixes!
22532  else
22533    # Not in mixed or Windows style, start by that.
22534    new_path=`cmd //c echo $new_path`
22535
22536  input_path="$new_path"
22537  # Check if we need to convert this using DOS-style short mode. If the path
22538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22539  # take no chances and rewrite it.
22540  # Note: m4 eats our [], so we need to use [ and ] instead.
22541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22542  if test "x$has_forbidden_chars" != x; then
22543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22545  fi
22546
22547    # Output is in $new_path
22548
22549  windows_path="$new_path"
22550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22551    unix_path=`$CYGPATH -u "$windows_path"`
22552    new_path="$unix_path"
22553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22555    new_path="$unix_path"
22556  fi
22557
22558    # remove trailing .exe if any
22559    new_path="${new_path/%.exe/}"
22560
22561    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22562    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22563  fi
22564
22565  else
22566    # We're on a posix platform. Hooray! :)
22567    # First separate the path from the arguments. This will split at the first
22568    # space.
22569    complete="$WINLD"
22570    path="${complete%% *}"
22571    tmp="$complete EOL"
22572    arguments="${tmp#* }"
22573
22574    # Cannot rely on the command "which" here since it doesn't always work.
22575    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22576    if test -z "$is_absolute_path"; then
22577      # Path to executable is not absolute. Find it.
22578      IFS_save="$IFS"
22579      IFS=:
22580      for p in $PATH; do
22581        if test -f "$p/$path" && test -x "$p/$path"; then
22582          new_path="$p/$path"
22583          break
22584        fi
22585      done
22586      IFS="$IFS_save"
22587    else
22588      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22589$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22590      new_path="$path"
22591    fi
22592
22593    if test "x$new_path" = x; then
22594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22595$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22596        has_space=`$ECHO "$complete" | $GREP " "`
22597        if test "x$has_space" != x; then
22598          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22599$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22600        fi
22601        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22602      fi
22603  fi
22604
22605      # Now join together the path and the arguments once again
22606      if test "x$arguments" != xEOL; then
22607        new_complete="$new_path ${arguments% *}"
22608      else
22609        new_complete="$new_path"
22610      fi
22611
22612  if test "x$complete" != "x$new_complete"; then
22613      WINLD="$new_complete"
22614      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22615$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22616    fi
22617
22618    printf "Windows linker was found at $WINLD\n"
22619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22620$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22621    "$WINLD" --version > /dev/null
22622    if test $? -eq 0 ; then
22623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22624$as_echo "no" >&6; }
22625      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22626    else
22627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22628$as_echo "yes" >&6; }
22629    fi
22630    LD="$WINLD"
22631    LDEXE="$WINLD"
22632    LDCXX="$WINLD"
22633    LDEXECXX="$WINLD"
22634
22635    # Extract the first word of "mt", so it can be a program name with args.
22636set dummy mt; ac_word=$2
22637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22638$as_echo_n "checking for $ac_word... " >&6; }
22639if ${ac_cv_prog_MT+:} false; then :
22640  $as_echo_n "(cached) " >&6
22641else
22642  if test -n "$MT"; then
22643  ac_cv_prog_MT="$MT" # Let the user override the test.
22644else
22645  ac_prog_rejected=no
22646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22647for as_dir in $PATH
22648do
22649  IFS=$as_save_IFS
22650  test -z "$as_dir" && as_dir=.
22651    for ac_exec_ext in '' $ac_executable_extensions; do
22652  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22653    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22654       ac_prog_rejected=yes
22655       continue
22656     fi
22657    ac_cv_prog_MT="mt"
22658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22659    break 2
22660  fi
22661done
22662  done
22663IFS=$as_save_IFS
22664
22665if test $ac_prog_rejected = yes; then
22666  # We found a bogon in the path, so make sure we never use it.
22667  set dummy $ac_cv_prog_MT
22668  shift
22669  if test $# != 0; then
22670    # We chose a different compiler from the bogus one.
22671    # However, it has the same basename, so the bogon will be chosen
22672    # first if we set MT to just the basename; use the full file name.
22673    shift
22674    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22675  fi
22676fi
22677fi
22678fi
22679MT=$ac_cv_prog_MT
22680if test -n "$MT"; then
22681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22682$as_echo "$MT" >&6; }
22683else
22684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22685$as_echo "no" >&6; }
22686fi
22687
22688
22689
22690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22691
22692  # First separate the path from the arguments. This will split at the first
22693  # space.
22694  complete="$MT"
22695  path="${complete%% *}"
22696  tmp="$complete EOL"
22697  arguments="${tmp#* }"
22698
22699  # Input might be given as Windows format, start by converting to
22700  # unix format.
22701  new_path=`$CYGPATH -u "$path"`
22702
22703  # Now try to locate executable using which
22704  new_path=`$WHICH "$new_path" 2> /dev/null`
22705  # bat and cmd files are not always considered executable in cygwin causing which
22706  # to not find them
22707  if test "x$new_path" = x \
22708           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22709           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22710    new_path=`$CYGPATH -u "$path"`
22711  fi
22712  if test "x$new_path" = x; then
22713    # Oops. Which didn't find the executable.
22714    # The splitting of arguments from the executable at a space might have been incorrect,
22715    # since paths with space are more likely in Windows. Give it another try with the whole
22716    # argument.
22717    path="$complete"
22718    arguments="EOL"
22719    new_path=`$CYGPATH -u "$path"`
22720    new_path=`$WHICH "$new_path" 2> /dev/null`
22721    # bat and cmd files are not always considered executable in cygwin causing which
22722    # to not find them
22723    if test "x$new_path" = x \
22724             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22725             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22726      new_path=`$CYGPATH -u "$path"`
22727    fi
22728    if test "x$new_path" = x; then
22729      # It's still not found. Now this is an unrecoverable error.
22730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22731$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22732      has_space=`$ECHO "$complete" | $GREP " "`
22733      if test "x$has_space" != x; then
22734        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22735$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22736      fi
22737      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22738    fi
22739  fi
22740
22741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22744  # "foo.exe" is OK but "foo" is an error.
22745  #
22746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22747  # It is also a way to make sure we got the proper file name for the real test later on.
22748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22749  if test "x$test_shortpath" = x; then
22750    # Short path failed, file does not exist as specified.
22751    # Try adding .exe or .cmd
22752    if test -f "${new_path}.exe"; then
22753       input_to_shortpath="${new_path}.exe"
22754    elif test -f "${new_path}.cmd"; then
22755       input_to_shortpath="${new_path}.cmd"
22756    else
22757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22758$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22759      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22760$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22761      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22762    fi
22763  else
22764    input_to_shortpath="$new_path"
22765  fi
22766
22767  # Call helper function which possibly converts this using DOS-style short mode.
22768  # If so, the updated path is stored in $new_path.
22769  new_path="$input_to_shortpath"
22770
22771  input_path="$input_to_shortpath"
22772  # Check if we need to convert this using DOS-style short mode. If the path
22773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22774  # take no chances and rewrite it.
22775  # Note: m4 eats our [], so we need to use [ and ] instead.
22776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22777  if test "x$has_forbidden_chars" != x; then
22778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22782      # Going to short mode and back again did indeed matter. Since short mode is
22783      # case insensitive, let's make it lowercase to improve readability.
22784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22785      # Now convert it back to Unix-stile (cygpath)
22786      input_path=`$CYGPATH -u "$shortmode_path"`
22787      new_path="$input_path"
22788    fi
22789  fi
22790
22791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22792  if test "x$test_cygdrive_prefix" = x; then
22793    # As a simple fix, exclude /usr/bin since it's not a real path.
22794    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22796      # a path prefixed by /cygdrive for fixpath to work.
22797      new_path="$CYGWIN_ROOT_PATH$input_path"
22798    fi
22799  fi
22800
22801  # remove trailing .exe if any
22802  new_path="${new_path/%.exe/}"
22803
22804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22805
22806  # First separate the path from the arguments. This will split at the first
22807  # space.
22808  complete="$MT"
22809  path="${complete%% *}"
22810  tmp="$complete EOL"
22811  arguments="${tmp#* }"
22812
22813  # Input might be given as Windows format, start by converting to
22814  # unix format.
22815  new_path="$path"
22816
22817  windows_path="$new_path"
22818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22819    unix_path=`$CYGPATH -u "$windows_path"`
22820    new_path="$unix_path"
22821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22823    new_path="$unix_path"
22824  fi
22825
22826
22827  # Now try to locate executable using which
22828  new_path=`$WHICH "$new_path" 2> /dev/null`
22829
22830  if test "x$new_path" = x; then
22831    # Oops. Which didn't find the executable.
22832    # The splitting of arguments from the executable at a space might have been incorrect,
22833    # since paths with space are more likely in Windows. Give it another try with the whole
22834    # argument.
22835    path="$complete"
22836    arguments="EOL"
22837    new_path="$path"
22838
22839  windows_path="$new_path"
22840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22841    unix_path=`$CYGPATH -u "$windows_path"`
22842    new_path="$unix_path"
22843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22845    new_path="$unix_path"
22846  fi
22847
22848
22849    new_path=`$WHICH "$new_path" 2> /dev/null`
22850
22851    if test "x$new_path" = x; then
22852      # It's still not found. Now this is an unrecoverable error.
22853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22854$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22855      has_space=`$ECHO "$complete" | $GREP " "`
22856      if test "x$has_space" != x; then
22857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22859      fi
22860      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22861    fi
22862  fi
22863
22864  # Now new_path has a complete unix path to the binary
22865  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22866    # Keep paths in /bin as-is, but remove trailing .exe if any
22867    new_path="${new_path/%.exe/}"
22868    # Do not save /bin paths to all_fixpath_prefixes!
22869  else
22870    # Not in mixed or Windows style, start by that.
22871    new_path=`cmd //c echo $new_path`
22872
22873  input_path="$new_path"
22874  # Check if we need to convert this using DOS-style short mode. If the path
22875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22876  # take no chances and rewrite it.
22877  # Note: m4 eats our [], so we need to use [ and ] instead.
22878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22879  if test "x$has_forbidden_chars" != x; then
22880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22882  fi
22883
22884    # Output is in $new_path
22885
22886  windows_path="$new_path"
22887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22888    unix_path=`$CYGPATH -u "$windows_path"`
22889    new_path="$unix_path"
22890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22892    new_path="$unix_path"
22893  fi
22894
22895    # remove trailing .exe if any
22896    new_path="${new_path/%.exe/}"
22897
22898    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22899    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22900  fi
22901
22902  else
22903    # We're on a posix platform. Hooray! :)
22904    # First separate the path from the arguments. This will split at the first
22905    # space.
22906    complete="$MT"
22907    path="${complete%% *}"
22908    tmp="$complete EOL"
22909    arguments="${tmp#* }"
22910
22911    # Cannot rely on the command "which" here since it doesn't always work.
22912    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22913    if test -z "$is_absolute_path"; then
22914      # Path to executable is not absolute. Find it.
22915      IFS_save="$IFS"
22916      IFS=:
22917      for p in $PATH; do
22918        if test -f "$p/$path" && test -x "$p/$path"; then
22919          new_path="$p/$path"
22920          break
22921        fi
22922      done
22923      IFS="$IFS_save"
22924    else
22925      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22926$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22927      new_path="$path"
22928    fi
22929
22930    if test "x$new_path" = x; then
22931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22932$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22933        has_space=`$ECHO "$complete" | $GREP " "`
22934        if test "x$has_space" != x; then
22935          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22936$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22937        fi
22938        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22939      fi
22940  fi
22941
22942      # Now join together the path and the arguments once again
22943      if test "x$arguments" != xEOL; then
22944        new_complete="$new_path ${arguments% *}"
22945      else
22946        new_complete="$new_path"
22947      fi
22948
22949  if test "x$complete" != "x$new_complete"; then
22950      MT="$new_complete"
22951      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22952$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22953    fi
22954
22955    # The resource compiler
22956    # Extract the first word of "rc", so it can be a program name with args.
22957set dummy rc; ac_word=$2
22958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22959$as_echo_n "checking for $ac_word... " >&6; }
22960if ${ac_cv_prog_RC+:} false; then :
22961  $as_echo_n "(cached) " >&6
22962else
22963  if test -n "$RC"; then
22964  ac_cv_prog_RC="$RC" # Let the user override the test.
22965else
22966  ac_prog_rejected=no
22967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22968for as_dir in $PATH
22969do
22970  IFS=$as_save_IFS
22971  test -z "$as_dir" && as_dir=.
22972    for ac_exec_ext in '' $ac_executable_extensions; do
22973  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22974    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22975       ac_prog_rejected=yes
22976       continue
22977     fi
22978    ac_cv_prog_RC="rc"
22979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22980    break 2
22981  fi
22982done
22983  done
22984IFS=$as_save_IFS
22985
22986if test $ac_prog_rejected = yes; then
22987  # We found a bogon in the path, so make sure we never use it.
22988  set dummy $ac_cv_prog_RC
22989  shift
22990  if test $# != 0; then
22991    # We chose a different compiler from the bogus one.
22992    # However, it has the same basename, so the bogon will be chosen
22993    # first if we set RC to just the basename; use the full file name.
22994    shift
22995    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22996  fi
22997fi
22998fi
22999fi
23000RC=$ac_cv_prog_RC
23001if test -n "$RC"; then
23002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23003$as_echo "$RC" >&6; }
23004else
23005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23006$as_echo "no" >&6; }
23007fi
23008
23009
23010
23011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23012
23013  # First separate the path from the arguments. This will split at the first
23014  # space.
23015  complete="$RC"
23016  path="${complete%% *}"
23017  tmp="$complete EOL"
23018  arguments="${tmp#* }"
23019
23020  # Input might be given as Windows format, start by converting to
23021  # unix format.
23022  new_path=`$CYGPATH -u "$path"`
23023
23024  # Now try to locate executable using which
23025  new_path=`$WHICH "$new_path" 2> /dev/null`
23026  # bat and cmd files are not always considered executable in cygwin causing which
23027  # to not find them
23028  if test "x$new_path" = x \
23029           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23030           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23031    new_path=`$CYGPATH -u "$path"`
23032  fi
23033  if test "x$new_path" = x; then
23034    # Oops. Which didn't find the executable.
23035    # The splitting of arguments from the executable at a space might have been incorrect,
23036    # since paths with space are more likely in Windows. Give it another try with the whole
23037    # argument.
23038    path="$complete"
23039    arguments="EOL"
23040    new_path=`$CYGPATH -u "$path"`
23041    new_path=`$WHICH "$new_path" 2> /dev/null`
23042    # bat and cmd files are not always considered executable in cygwin causing which
23043    # to not find them
23044    if test "x$new_path" = x \
23045             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23046             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23047      new_path=`$CYGPATH -u "$path"`
23048    fi
23049    if test "x$new_path" = x; then
23050      # It's still not found. Now this is an unrecoverable error.
23051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23052$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23053      has_space=`$ECHO "$complete" | $GREP " "`
23054      if test "x$has_space" != x; then
23055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23057      fi
23058      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23059    fi
23060  fi
23061
23062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23065  # "foo.exe" is OK but "foo" is an error.
23066  #
23067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23068  # It is also a way to make sure we got the proper file name for the real test later on.
23069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23070  if test "x$test_shortpath" = x; then
23071    # Short path failed, file does not exist as specified.
23072    # Try adding .exe or .cmd
23073    if test -f "${new_path}.exe"; then
23074       input_to_shortpath="${new_path}.exe"
23075    elif test -f "${new_path}.cmd"; then
23076       input_to_shortpath="${new_path}.cmd"
23077    else
23078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23079$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23080      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23081$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23082      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23083    fi
23084  else
23085    input_to_shortpath="$new_path"
23086  fi
23087
23088  # Call helper function which possibly converts this using DOS-style short mode.
23089  # If so, the updated path is stored in $new_path.
23090  new_path="$input_to_shortpath"
23091
23092  input_path="$input_to_shortpath"
23093  # Check if we need to convert this using DOS-style short mode. If the path
23094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23095  # take no chances and rewrite it.
23096  # Note: m4 eats our [], so we need to use [ and ] instead.
23097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23098  if test "x$has_forbidden_chars" != x; then
23099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23103      # Going to short mode and back again did indeed matter. Since short mode is
23104      # case insensitive, let's make it lowercase to improve readability.
23105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23106      # Now convert it back to Unix-stile (cygpath)
23107      input_path=`$CYGPATH -u "$shortmode_path"`
23108      new_path="$input_path"
23109    fi
23110  fi
23111
23112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23113  if test "x$test_cygdrive_prefix" = x; then
23114    # As a simple fix, exclude /usr/bin since it's not a real path.
23115    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23117      # a path prefixed by /cygdrive for fixpath to work.
23118      new_path="$CYGWIN_ROOT_PATH$input_path"
23119    fi
23120  fi
23121
23122  # remove trailing .exe if any
23123  new_path="${new_path/%.exe/}"
23124
23125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23126
23127  # First separate the path from the arguments. This will split at the first
23128  # space.
23129  complete="$RC"
23130  path="${complete%% *}"
23131  tmp="$complete EOL"
23132  arguments="${tmp#* }"
23133
23134  # Input might be given as Windows format, start by converting to
23135  # unix format.
23136  new_path="$path"
23137
23138  windows_path="$new_path"
23139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23140    unix_path=`$CYGPATH -u "$windows_path"`
23141    new_path="$unix_path"
23142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23144    new_path="$unix_path"
23145  fi
23146
23147
23148  # Now try to locate executable using which
23149  new_path=`$WHICH "$new_path" 2> /dev/null`
23150
23151  if test "x$new_path" = x; then
23152    # Oops. Which didn't find the executable.
23153    # The splitting of arguments from the executable at a space might have been incorrect,
23154    # since paths with space are more likely in Windows. Give it another try with the whole
23155    # argument.
23156    path="$complete"
23157    arguments="EOL"
23158    new_path="$path"
23159
23160  windows_path="$new_path"
23161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23162    unix_path=`$CYGPATH -u "$windows_path"`
23163    new_path="$unix_path"
23164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23166    new_path="$unix_path"
23167  fi
23168
23169
23170    new_path=`$WHICH "$new_path" 2> /dev/null`
23171
23172    if test "x$new_path" = x; then
23173      # It's still not found. Now this is an unrecoverable error.
23174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23175$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23176      has_space=`$ECHO "$complete" | $GREP " "`
23177      if test "x$has_space" != x; then
23178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23180      fi
23181      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23182    fi
23183  fi
23184
23185  # Now new_path has a complete unix path to the binary
23186  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23187    # Keep paths in /bin as-is, but remove trailing .exe if any
23188    new_path="${new_path/%.exe/}"
23189    # Do not save /bin paths to all_fixpath_prefixes!
23190  else
23191    # Not in mixed or Windows style, start by that.
23192    new_path=`cmd //c echo $new_path`
23193
23194  input_path="$new_path"
23195  # Check if we need to convert this using DOS-style short mode. If the path
23196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23197  # take no chances and rewrite it.
23198  # Note: m4 eats our [], so we need to use [ and ] instead.
23199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23200  if test "x$has_forbidden_chars" != x; then
23201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23203  fi
23204
23205    # Output is in $new_path
23206
23207  windows_path="$new_path"
23208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23209    unix_path=`$CYGPATH -u "$windows_path"`
23210    new_path="$unix_path"
23211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23213    new_path="$unix_path"
23214  fi
23215
23216    # remove trailing .exe if any
23217    new_path="${new_path/%.exe/}"
23218
23219    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23220    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23221  fi
23222
23223  else
23224    # We're on a posix platform. Hooray! :)
23225    # First separate the path from the arguments. This will split at the first
23226    # space.
23227    complete="$RC"
23228    path="${complete%% *}"
23229    tmp="$complete EOL"
23230    arguments="${tmp#* }"
23231
23232    # Cannot rely on the command "which" here since it doesn't always work.
23233    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23234    if test -z "$is_absolute_path"; then
23235      # Path to executable is not absolute. Find it.
23236      IFS_save="$IFS"
23237      IFS=:
23238      for p in $PATH; do
23239        if test -f "$p/$path" && test -x "$p/$path"; then
23240          new_path="$p/$path"
23241          break
23242        fi
23243      done
23244      IFS="$IFS_save"
23245    else
23246      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23247$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23248      new_path="$path"
23249    fi
23250
23251    if test "x$new_path" = x; then
23252        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23253$as_echo "$as_me: The path of RC, 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}: This might be caused by spaces in the path, which is not allowed." >&5
23257$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23258        fi
23259        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23260      fi
23261  fi
23262
23263      # Now join together the path and the arguments once again
23264      if test "x$arguments" != xEOL; then
23265        new_complete="$new_path ${arguments% *}"
23266      else
23267        new_complete="$new_path"
23268      fi
23269
23270  if test "x$complete" != "x$new_complete"; then
23271      RC="$new_complete"
23272      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23273$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23274    fi
23275
23276
23277    # For hotspot, we need these in Windows mixed path,
23278    # so rewrite them all. Need added .exe suffix.
23279    HOTSPOT_CXX="$CXX.exe"
23280    HOTSPOT_LD="$LD.exe"
23281    HOTSPOT_MT="$MT.exe"
23282    HOTSPOT_RC="$RC.exe"
23283
23284  unix_path="$HOTSPOT_CXX"
23285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23286    windows_path=`$CYGPATH -m "$unix_path"`
23287    HOTSPOT_CXX="$windows_path"
23288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23289    windows_path=`cmd //c echo $unix_path`
23290    HOTSPOT_CXX="$windows_path"
23291  fi
23292
23293
23294  unix_path="$HOTSPOT_LD"
23295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23296    windows_path=`$CYGPATH -m "$unix_path"`
23297    HOTSPOT_LD="$windows_path"
23298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23299    windows_path=`cmd //c echo $unix_path`
23300    HOTSPOT_LD="$windows_path"
23301  fi
23302
23303
23304  unix_path="$HOTSPOT_MT"
23305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23306    windows_path=`$CYGPATH -m "$unix_path"`
23307    HOTSPOT_MT="$windows_path"
23308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23309    windows_path=`cmd //c echo $unix_path`
23310    HOTSPOT_MT="$windows_path"
23311  fi
23312
23313
23314  unix_path="$HOTSPOT_RC"
23315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23316    windows_path=`$CYGPATH -m "$unix_path"`
23317    HOTSPOT_RC="$windows_path"
23318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23319    windows_path=`cmd //c echo $unix_path`
23320    HOTSPOT_RC="$windows_path"
23321  fi
23322
23323
23324
23325
23326    RC_FLAGS="-nologo -l 0x409 -r"
23327    if test "x$VARIANT" = xOPT; then :
23328
23329        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23330
23331fi
23332    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23333    if test "x$JDK_UPDATE_VERSION" = x; then :
23334
23335        JDK_UPDATE_VERSION_NOTNULL=0
23336
23337fi
23338    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23339    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23340    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23341    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23342    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23343    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23344    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23345
23346    # lib.exe is used to create static libraries.
23347    # Extract the first word of "lib", so it can be a program name with args.
23348set dummy lib; ac_word=$2
23349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23350$as_echo_n "checking for $ac_word... " >&6; }
23351if ${ac_cv_prog_WINAR+:} false; then :
23352  $as_echo_n "(cached) " >&6
23353else
23354  if test -n "$WINAR"; then
23355  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23356else
23357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23358for as_dir in $PATH
23359do
23360  IFS=$as_save_IFS
23361  test -z "$as_dir" && as_dir=.
23362    for ac_exec_ext in '' $ac_executable_extensions; do
23363  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23364    ac_cv_prog_WINAR="lib"
23365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23366    break 2
23367  fi
23368done
23369  done
23370IFS=$as_save_IFS
23371
23372fi
23373fi
23374WINAR=$ac_cv_prog_WINAR
23375if test -n "$WINAR"; then
23376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23377$as_echo "$WINAR" >&6; }
23378else
23379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23380$as_echo "no" >&6; }
23381fi
23382
23383
23384
23385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23386
23387  # First separate the path from the arguments. This will split at the first
23388  # space.
23389  complete="$WINAR"
23390  path="${complete%% *}"
23391  tmp="$complete EOL"
23392  arguments="${tmp#* }"
23393
23394  # Input might be given as Windows format, start by converting to
23395  # unix format.
23396  new_path=`$CYGPATH -u "$path"`
23397
23398  # Now try to locate executable using which
23399  new_path=`$WHICH "$new_path" 2> /dev/null`
23400  # bat and cmd files are not always considered executable in cygwin causing which
23401  # to not find them
23402  if test "x$new_path" = x \
23403           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23404           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23405    new_path=`$CYGPATH -u "$path"`
23406  fi
23407  if test "x$new_path" = x; then
23408    # Oops. Which didn't find the executable.
23409    # The splitting of arguments from the executable at a space might have been incorrect,
23410    # since paths with space are more likely in Windows. Give it another try with the whole
23411    # argument.
23412    path="$complete"
23413    arguments="EOL"
23414    new_path=`$CYGPATH -u "$path"`
23415    new_path=`$WHICH "$new_path" 2> /dev/null`
23416    # bat and cmd files are not always considered executable in cygwin causing which
23417    # to not find them
23418    if test "x$new_path" = x \
23419             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23420             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23421      new_path=`$CYGPATH -u "$path"`
23422    fi
23423    if test "x$new_path" = x; then
23424      # It's still not found. Now this is an unrecoverable error.
23425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23426$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23427      has_space=`$ECHO "$complete" | $GREP " "`
23428      if test "x$has_space" != x; then
23429        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23430$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23431      fi
23432      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23433    fi
23434  fi
23435
23436  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23437  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23438  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23439  # "foo.exe" is OK but "foo" is an error.
23440  #
23441  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23442  # It is also a way to make sure we got the proper file name for the real test later on.
23443  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23444  if test "x$test_shortpath" = x; then
23445    # Short path failed, file does not exist as specified.
23446    # Try adding .exe or .cmd
23447    if test -f "${new_path}.exe"; then
23448       input_to_shortpath="${new_path}.exe"
23449    elif test -f "${new_path}.cmd"; then
23450       input_to_shortpath="${new_path}.cmd"
23451    else
23452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23453$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23454      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23455$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23456      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23457    fi
23458  else
23459    input_to_shortpath="$new_path"
23460  fi
23461
23462  # Call helper function which possibly converts this using DOS-style short mode.
23463  # If so, the updated path is stored in $new_path.
23464  new_path="$input_to_shortpath"
23465
23466  input_path="$input_to_shortpath"
23467  # Check if we need to convert this using DOS-style short mode. If the path
23468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23469  # take no chances and rewrite it.
23470  # Note: m4 eats our [], so we need to use [ and ] instead.
23471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23472  if test "x$has_forbidden_chars" != x; then
23473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23477      # Going to short mode and back again did indeed matter. Since short mode is
23478      # case insensitive, let's make it lowercase to improve readability.
23479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23480      # Now convert it back to Unix-stile (cygpath)
23481      input_path=`$CYGPATH -u "$shortmode_path"`
23482      new_path="$input_path"
23483    fi
23484  fi
23485
23486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23487  if test "x$test_cygdrive_prefix" = x; then
23488    # As a simple fix, exclude /usr/bin since it's not a real path.
23489    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23491      # a path prefixed by /cygdrive for fixpath to work.
23492      new_path="$CYGWIN_ROOT_PATH$input_path"
23493    fi
23494  fi
23495
23496  # remove trailing .exe if any
23497  new_path="${new_path/%.exe/}"
23498
23499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23500
23501  # First separate the path from the arguments. This will split at the first
23502  # space.
23503  complete="$WINAR"
23504  path="${complete%% *}"
23505  tmp="$complete EOL"
23506  arguments="${tmp#* }"
23507
23508  # Input might be given as Windows format, start by converting to
23509  # unix format.
23510  new_path="$path"
23511
23512  windows_path="$new_path"
23513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23514    unix_path=`$CYGPATH -u "$windows_path"`
23515    new_path="$unix_path"
23516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23518    new_path="$unix_path"
23519  fi
23520
23521
23522  # Now try to locate executable using which
23523  new_path=`$WHICH "$new_path" 2> /dev/null`
23524
23525  if test "x$new_path" = x; then
23526    # Oops. Which didn't find the executable.
23527    # The splitting of arguments from the executable at a space might have been incorrect,
23528    # since paths with space are more likely in Windows. Give it another try with the whole
23529    # argument.
23530    path="$complete"
23531    arguments="EOL"
23532    new_path="$path"
23533
23534  windows_path="$new_path"
23535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23536    unix_path=`$CYGPATH -u "$windows_path"`
23537    new_path="$unix_path"
23538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23540    new_path="$unix_path"
23541  fi
23542
23543
23544    new_path=`$WHICH "$new_path" 2> /dev/null`
23545
23546    if test "x$new_path" = x; then
23547      # It's still not found. Now this is an unrecoverable error.
23548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23549$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23550      has_space=`$ECHO "$complete" | $GREP " "`
23551      if test "x$has_space" != x; then
23552        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23553$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23554      fi
23555      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23556    fi
23557  fi
23558
23559  # Now new_path has a complete unix path to the binary
23560  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23561    # Keep paths in /bin as-is, but remove trailing .exe if any
23562    new_path="${new_path/%.exe/}"
23563    # Do not save /bin paths to all_fixpath_prefixes!
23564  else
23565    # Not in mixed or Windows style, start by that.
23566    new_path=`cmd //c echo $new_path`
23567
23568  input_path="$new_path"
23569  # Check if we need to convert this using DOS-style short mode. If the path
23570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23571  # take no chances and rewrite it.
23572  # Note: m4 eats our [], so we need to use [ and ] instead.
23573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23574  if test "x$has_forbidden_chars" != x; then
23575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23576    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23577  fi
23578
23579    # Output is in $new_path
23580
23581  windows_path="$new_path"
23582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23583    unix_path=`$CYGPATH -u "$windows_path"`
23584    new_path="$unix_path"
23585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23587    new_path="$unix_path"
23588  fi
23589
23590    # remove trailing .exe if any
23591    new_path="${new_path/%.exe/}"
23592
23593    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23594    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23595  fi
23596
23597  else
23598    # We're on a posix platform. Hooray! :)
23599    # First separate the path from the arguments. This will split at the first
23600    # space.
23601    complete="$WINAR"
23602    path="${complete%% *}"
23603    tmp="$complete EOL"
23604    arguments="${tmp#* }"
23605
23606    # Cannot rely on the command "which" here since it doesn't always work.
23607    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23608    if test -z "$is_absolute_path"; then
23609      # Path to executable is not absolute. Find it.
23610      IFS_save="$IFS"
23611      IFS=:
23612      for p in $PATH; do
23613        if test -f "$p/$path" && test -x "$p/$path"; then
23614          new_path="$p/$path"
23615          break
23616        fi
23617      done
23618      IFS="$IFS_save"
23619    else
23620      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23621$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23622      new_path="$path"
23623    fi
23624
23625    if test "x$new_path" = x; then
23626        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23627$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23628        has_space=`$ECHO "$complete" | $GREP " "`
23629        if test "x$has_space" != x; then
23630          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23631$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23632        fi
23633        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23634      fi
23635  fi
23636
23637      # Now join together the path and the arguments once again
23638      if test "x$arguments" != xEOL; then
23639        new_complete="$new_path ${arguments% *}"
23640      else
23641        new_complete="$new_path"
23642      fi
23643
23644  if test "x$complete" != "x$new_complete"; then
23645      WINAR="$new_complete"
23646      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23647$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23648    fi
23649
23650    AR="$WINAR"
23651    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23652
23653    # Extract the first word of "dumpbin", so it can be a program name with args.
23654set dummy dumpbin; ac_word=$2
23655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23656$as_echo_n "checking for $ac_word... " >&6; }
23657if ${ac_cv_prog_DUMPBIN+:} false; then :
23658  $as_echo_n "(cached) " >&6
23659else
23660  if test -n "$DUMPBIN"; then
23661  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23662else
23663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23664for as_dir in $PATH
23665do
23666  IFS=$as_save_IFS
23667  test -z "$as_dir" && as_dir=.
23668    for ac_exec_ext in '' $ac_executable_extensions; do
23669  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23670    ac_cv_prog_DUMPBIN="dumpbin"
23671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23672    break 2
23673  fi
23674done
23675  done
23676IFS=$as_save_IFS
23677
23678fi
23679fi
23680DUMPBIN=$ac_cv_prog_DUMPBIN
23681if test -n "$DUMPBIN"; then
23682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23683$as_echo "$DUMPBIN" >&6; }
23684else
23685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23686$as_echo "no" >&6; }
23687fi
23688
23689
23690
23691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23692
23693  # First separate the path from the arguments. This will split at the first
23694  # space.
23695  complete="$DUMPBIN"
23696  path="${complete%% *}"
23697  tmp="$complete EOL"
23698  arguments="${tmp#* }"
23699
23700  # Input might be given as Windows format, start by converting to
23701  # unix format.
23702  new_path=`$CYGPATH -u "$path"`
23703
23704  # Now try to locate executable using which
23705  new_path=`$WHICH "$new_path" 2> /dev/null`
23706  # bat and cmd files are not always considered executable in cygwin causing which
23707  # to not find them
23708  if test "x$new_path" = x \
23709           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23710           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23711    new_path=`$CYGPATH -u "$path"`
23712  fi
23713  if test "x$new_path" = x; then
23714    # Oops. Which didn't find the executable.
23715    # The splitting of arguments from the executable at a space might have been incorrect,
23716    # since paths with space are more likely in Windows. Give it another try with the whole
23717    # argument.
23718    path="$complete"
23719    arguments="EOL"
23720    new_path=`$CYGPATH -u "$path"`
23721    new_path=`$WHICH "$new_path" 2> /dev/null`
23722    # bat and cmd files are not always considered executable in cygwin causing which
23723    # to not find them
23724    if test "x$new_path" = x \
23725             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23726             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23727      new_path=`$CYGPATH -u "$path"`
23728    fi
23729    if test "x$new_path" = x; then
23730      # It's still not found. Now this is an unrecoverable error.
23731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23732$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23733      has_space=`$ECHO "$complete" | $GREP " "`
23734      if test "x$has_space" != x; then
23735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23737      fi
23738      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23739    fi
23740  fi
23741
23742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23745  # "foo.exe" is OK but "foo" is an error.
23746  #
23747  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23748  # It is also a way to make sure we got the proper file name for the real test later on.
23749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23750  if test "x$test_shortpath" = x; then
23751    # Short path failed, file does not exist as specified.
23752    # Try adding .exe or .cmd
23753    if test -f "${new_path}.exe"; then
23754       input_to_shortpath="${new_path}.exe"
23755    elif test -f "${new_path}.cmd"; then
23756       input_to_shortpath="${new_path}.cmd"
23757    else
23758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23759$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23760      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23761$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23762      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23763    fi
23764  else
23765    input_to_shortpath="$new_path"
23766  fi
23767
23768  # Call helper function which possibly converts this using DOS-style short mode.
23769  # If so, the updated path is stored in $new_path.
23770  new_path="$input_to_shortpath"
23771
23772  input_path="$input_to_shortpath"
23773  # Check if we need to convert this using DOS-style short mode. If the path
23774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23775  # take no chances and rewrite it.
23776  # Note: m4 eats our [], so we need to use [ and ] instead.
23777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23778  if test "x$has_forbidden_chars" != x; then
23779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23783      # Going to short mode and back again did indeed matter. Since short mode is
23784      # case insensitive, let's make it lowercase to improve readability.
23785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23786      # Now convert it back to Unix-stile (cygpath)
23787      input_path=`$CYGPATH -u "$shortmode_path"`
23788      new_path="$input_path"
23789    fi
23790  fi
23791
23792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23793  if test "x$test_cygdrive_prefix" = x; then
23794    # As a simple fix, exclude /usr/bin since it's not a real path.
23795    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23797      # a path prefixed by /cygdrive for fixpath to work.
23798      new_path="$CYGWIN_ROOT_PATH$input_path"
23799    fi
23800  fi
23801
23802  # remove trailing .exe if any
23803  new_path="${new_path/%.exe/}"
23804
23805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23806
23807  # First separate the path from the arguments. This will split at the first
23808  # space.
23809  complete="$DUMPBIN"
23810  path="${complete%% *}"
23811  tmp="$complete EOL"
23812  arguments="${tmp#* }"
23813
23814  # Input might be given as Windows format, start by converting to
23815  # unix format.
23816  new_path="$path"
23817
23818  windows_path="$new_path"
23819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23820    unix_path=`$CYGPATH -u "$windows_path"`
23821    new_path="$unix_path"
23822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23824    new_path="$unix_path"
23825  fi
23826
23827
23828  # Now try to locate executable using which
23829  new_path=`$WHICH "$new_path" 2> /dev/null`
23830
23831  if test "x$new_path" = x; then
23832    # Oops. Which didn't find the executable.
23833    # The splitting of arguments from the executable at a space might have been incorrect,
23834    # since paths with space are more likely in Windows. Give it another try with the whole
23835    # argument.
23836    path="$complete"
23837    arguments="EOL"
23838    new_path="$path"
23839
23840  windows_path="$new_path"
23841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23842    unix_path=`$CYGPATH -u "$windows_path"`
23843    new_path="$unix_path"
23844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23846    new_path="$unix_path"
23847  fi
23848
23849
23850    new_path=`$WHICH "$new_path" 2> /dev/null`
23851
23852    if test "x$new_path" = x; then
23853      # It's still not found. Now this is an unrecoverable error.
23854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23855$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23856      has_space=`$ECHO "$complete" | $GREP " "`
23857      if test "x$has_space" != x; then
23858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23860      fi
23861      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23862    fi
23863  fi
23864
23865  # Now new_path has a complete unix path to the binary
23866  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23867    # Keep paths in /bin as-is, but remove trailing .exe if any
23868    new_path="${new_path/%.exe/}"
23869    # Do not save /bin paths to all_fixpath_prefixes!
23870  else
23871    # Not in mixed or Windows style, start by that.
23872    new_path=`cmd //c echo $new_path`
23873
23874  input_path="$new_path"
23875  # Check if we need to convert this using DOS-style short mode. If the path
23876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23877  # take no chances and rewrite it.
23878  # Note: m4 eats our [], so we need to use [ and ] instead.
23879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23880  if test "x$has_forbidden_chars" != x; then
23881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23883  fi
23884
23885    # Output is in $new_path
23886
23887  windows_path="$new_path"
23888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23889    unix_path=`$CYGPATH -u "$windows_path"`
23890    new_path="$unix_path"
23891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23893    new_path="$unix_path"
23894  fi
23895
23896    # remove trailing .exe if any
23897    new_path="${new_path/%.exe/}"
23898
23899    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23900    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23901  fi
23902
23903  else
23904    # We're on a posix platform. Hooray! :)
23905    # First separate the path from the arguments. This will split at the first
23906    # space.
23907    complete="$DUMPBIN"
23908    path="${complete%% *}"
23909    tmp="$complete EOL"
23910    arguments="${tmp#* }"
23911
23912    # Cannot rely on the command "which" here since it doesn't always work.
23913    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23914    if test -z "$is_absolute_path"; then
23915      # Path to executable is not absolute. Find it.
23916      IFS_save="$IFS"
23917      IFS=:
23918      for p in $PATH; do
23919        if test -f "$p/$path" && test -x "$p/$path"; then
23920          new_path="$p/$path"
23921          break
23922        fi
23923      done
23924      IFS="$IFS_save"
23925    else
23926      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23927$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23928      new_path="$path"
23929    fi
23930
23931    if test "x$new_path" = x; then
23932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23933$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23934        has_space=`$ECHO "$complete" | $GREP " "`
23935        if test "x$has_space" != x; then
23936          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23937$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23938        fi
23939        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23940      fi
23941  fi
23942
23943      # Now join together the path and the arguments once again
23944      if test "x$arguments" != xEOL; then
23945        new_complete="$new_path ${arguments% *}"
23946      else
23947        new_complete="$new_path"
23948      fi
23949
23950  if test "x$complete" != "x$new_complete"; then
23951      DUMPBIN="$new_complete"
23952      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23953$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23954    fi
23955
23956
23957    COMPILER_TYPE=CL
23958    CCXXFLAGS="$CCXXFLAGS -nologo"
23959
23960fi
23961
23962
23963
23964ac_ext=c
23965ac_cpp='$CPP $CPPFLAGS'
23966ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23967ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23968ac_compiler_gnu=$ac_cv_c_compiler_gnu
23969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23970$as_echo_n "checking how to run the C preprocessor... " >&6; }
23971# On Suns, sometimes $CPP names a directory.
23972if test -n "$CPP" && test -d "$CPP"; then
23973  CPP=
23974fi
23975if test -z "$CPP"; then
23976  if ${ac_cv_prog_CPP+:} false; then :
23977  $as_echo_n "(cached) " >&6
23978else
23979      # Double quotes because CPP needs to be expanded
23980    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23981    do
23982      ac_preproc_ok=false
23983for ac_c_preproc_warn_flag in '' yes
23984do
23985  # Use a header file that comes with gcc, so configuring glibc
23986  # with a fresh cross-compiler works.
23987  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23988  # <limits.h> exists even on freestanding compilers.
23989  # On the NeXT, cc -E runs the code through the compiler's parser,
23990  # not just through cpp. "Syntax error" is here to catch this case.
23991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23992/* end confdefs.h.  */
23993#ifdef __STDC__
23994# include <limits.h>
23995#else
23996# include <assert.h>
23997#endif
23998		     Syntax error
23999_ACEOF
24000if ac_fn_c_try_cpp "$LINENO"; then :
24001
24002else
24003  # Broken: fails on valid input.
24004continue
24005fi
24006rm -f conftest.err conftest.i conftest.$ac_ext
24007
24008  # OK, works on sane cases.  Now check whether nonexistent headers
24009  # can be detected and how.
24010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24011/* end confdefs.h.  */
24012#include <ac_nonexistent.h>
24013_ACEOF
24014if ac_fn_c_try_cpp "$LINENO"; then :
24015  # Broken: success on invalid input.
24016continue
24017else
24018  # Passes both tests.
24019ac_preproc_ok=:
24020break
24021fi
24022rm -f conftest.err conftest.i conftest.$ac_ext
24023
24024done
24025# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24026rm -f conftest.i conftest.err conftest.$ac_ext
24027if $ac_preproc_ok; then :
24028  break
24029fi
24030
24031    done
24032    ac_cv_prog_CPP=$CPP
24033
24034fi
24035  CPP=$ac_cv_prog_CPP
24036else
24037  ac_cv_prog_CPP=$CPP
24038fi
24039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24040$as_echo "$CPP" >&6; }
24041ac_preproc_ok=false
24042for ac_c_preproc_warn_flag in '' yes
24043do
24044  # Use a header file that comes with gcc, so configuring glibc
24045  # with a fresh cross-compiler works.
24046  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24047  # <limits.h> exists even on freestanding compilers.
24048  # On the NeXT, cc -E runs the code through the compiler's parser,
24049  # not just through cpp. "Syntax error" is here to catch this case.
24050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24051/* end confdefs.h.  */
24052#ifdef __STDC__
24053# include <limits.h>
24054#else
24055# include <assert.h>
24056#endif
24057		     Syntax error
24058_ACEOF
24059if ac_fn_c_try_cpp "$LINENO"; then :
24060
24061else
24062  # Broken: fails on valid input.
24063continue
24064fi
24065rm -f conftest.err conftest.i conftest.$ac_ext
24066
24067  # OK, works on sane cases.  Now check whether nonexistent headers
24068  # can be detected and how.
24069  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24070/* end confdefs.h.  */
24071#include <ac_nonexistent.h>
24072_ACEOF
24073if ac_fn_c_try_cpp "$LINENO"; then :
24074  # Broken: success on invalid input.
24075continue
24076else
24077  # Passes both tests.
24078ac_preproc_ok=:
24079break
24080fi
24081rm -f conftest.err conftest.i conftest.$ac_ext
24082
24083done
24084# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24085rm -f conftest.i conftest.err conftest.$ac_ext
24086if $ac_preproc_ok; then :
24087
24088else
24089  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24091as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24092See \`config.log' for more details" "$LINENO" 5; }
24093fi
24094
24095ac_ext=cpp
24096ac_cpp='$CXXCPP $CPPFLAGS'
24097ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24098ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24099ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24100
24101
24102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24103
24104  # First separate the path from the arguments. This will split at the first
24105  # space.
24106  complete="$CPP"
24107  path="${complete%% *}"
24108  tmp="$complete EOL"
24109  arguments="${tmp#* }"
24110
24111  # Input might be given as Windows format, start by converting to
24112  # unix format.
24113  new_path=`$CYGPATH -u "$path"`
24114
24115  # Now try to locate executable using which
24116  new_path=`$WHICH "$new_path" 2> /dev/null`
24117  # bat and cmd files are not always considered executable in cygwin causing which
24118  # to not find them
24119  if test "x$new_path" = x \
24120           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24121           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24122    new_path=`$CYGPATH -u "$path"`
24123  fi
24124  if test "x$new_path" = x; then
24125    # Oops. Which didn't find the executable.
24126    # The splitting of arguments from the executable at a space might have been incorrect,
24127    # since paths with space are more likely in Windows. Give it another try with the whole
24128    # argument.
24129    path="$complete"
24130    arguments="EOL"
24131    new_path=`$CYGPATH -u "$path"`
24132    new_path=`$WHICH "$new_path" 2> /dev/null`
24133    # bat and cmd files are not always considered executable in cygwin causing which
24134    # to not find them
24135    if test "x$new_path" = x \
24136             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24137             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24138      new_path=`$CYGPATH -u "$path"`
24139    fi
24140    if test "x$new_path" = x; then
24141      # It's still not found. Now this is an unrecoverable error.
24142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24143$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24144      has_space=`$ECHO "$complete" | $GREP " "`
24145      if test "x$has_space" != x; then
24146        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24147$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24148      fi
24149      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24150    fi
24151  fi
24152
24153  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24154  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24155  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24156  # "foo.exe" is OK but "foo" is an error.
24157  #
24158  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24159  # It is also a way to make sure we got the proper file name for the real test later on.
24160  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24161  if test "x$test_shortpath" = x; then
24162    # Short path failed, file does not exist as specified.
24163    # Try adding .exe or .cmd
24164    if test -f "${new_path}.exe"; then
24165       input_to_shortpath="${new_path}.exe"
24166    elif test -f "${new_path}.cmd"; then
24167       input_to_shortpath="${new_path}.cmd"
24168    else
24169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24170$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24171      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24172$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24173      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24174    fi
24175  else
24176    input_to_shortpath="$new_path"
24177  fi
24178
24179  # Call helper function which possibly converts this using DOS-style short mode.
24180  # If so, the updated path is stored in $new_path.
24181  new_path="$input_to_shortpath"
24182
24183  input_path="$input_to_shortpath"
24184  # Check if we need to convert this using DOS-style short mode. If the path
24185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24186  # take no chances and rewrite it.
24187  # Note: m4 eats our [], so we need to use [ and ] instead.
24188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24189  if test "x$has_forbidden_chars" != x; then
24190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24194      # Going to short mode and back again did indeed matter. Since short mode is
24195      # case insensitive, let's make it lowercase to improve readability.
24196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24197      # Now convert it back to Unix-stile (cygpath)
24198      input_path=`$CYGPATH -u "$shortmode_path"`
24199      new_path="$input_path"
24200    fi
24201  fi
24202
24203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24204  if test "x$test_cygdrive_prefix" = x; then
24205    # As a simple fix, exclude /usr/bin since it's not a real path.
24206    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24208      # a path prefixed by /cygdrive for fixpath to work.
24209      new_path="$CYGWIN_ROOT_PATH$input_path"
24210    fi
24211  fi
24212
24213  # remove trailing .exe if any
24214  new_path="${new_path/%.exe/}"
24215
24216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24217
24218  # First separate the path from the arguments. This will split at the first
24219  # space.
24220  complete="$CPP"
24221  path="${complete%% *}"
24222  tmp="$complete EOL"
24223  arguments="${tmp#* }"
24224
24225  # Input might be given as Windows format, start by converting to
24226  # unix format.
24227  new_path="$path"
24228
24229  windows_path="$new_path"
24230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24231    unix_path=`$CYGPATH -u "$windows_path"`
24232    new_path="$unix_path"
24233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24235    new_path="$unix_path"
24236  fi
24237
24238
24239  # Now try to locate executable using which
24240  new_path=`$WHICH "$new_path" 2> /dev/null`
24241
24242  if test "x$new_path" = x; then
24243    # Oops. Which didn't find the executable.
24244    # The splitting of arguments from the executable at a space might have been incorrect,
24245    # since paths with space are more likely in Windows. Give it another try with the whole
24246    # argument.
24247    path="$complete"
24248    arguments="EOL"
24249    new_path="$path"
24250
24251  windows_path="$new_path"
24252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24253    unix_path=`$CYGPATH -u "$windows_path"`
24254    new_path="$unix_path"
24255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24257    new_path="$unix_path"
24258  fi
24259
24260
24261    new_path=`$WHICH "$new_path" 2> /dev/null`
24262
24263    if test "x$new_path" = x; then
24264      # It's still not found. Now this is an unrecoverable error.
24265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24266$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24267      has_space=`$ECHO "$complete" | $GREP " "`
24268      if test "x$has_space" != x; then
24269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24271      fi
24272      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24273    fi
24274  fi
24275
24276  # Now new_path has a complete unix path to the binary
24277  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24278    # Keep paths in /bin as-is, but remove trailing .exe if any
24279    new_path="${new_path/%.exe/}"
24280    # Do not save /bin paths to all_fixpath_prefixes!
24281  else
24282    # Not in mixed or Windows style, start by that.
24283    new_path=`cmd //c echo $new_path`
24284
24285  input_path="$new_path"
24286  # Check if we need to convert this using DOS-style short mode. If the path
24287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24288  # take no chances and rewrite it.
24289  # Note: m4 eats our [], so we need to use [ and ] instead.
24290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24291  if test "x$has_forbidden_chars" != x; then
24292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24294  fi
24295
24296    # Output is in $new_path
24297
24298  windows_path="$new_path"
24299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24300    unix_path=`$CYGPATH -u "$windows_path"`
24301    new_path="$unix_path"
24302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24304    new_path="$unix_path"
24305  fi
24306
24307    # remove trailing .exe if any
24308    new_path="${new_path/%.exe/}"
24309
24310    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24311    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24312  fi
24313
24314  else
24315    # We're on a posix platform. Hooray! :)
24316    # First separate the path from the arguments. This will split at the first
24317    # space.
24318    complete="$CPP"
24319    path="${complete%% *}"
24320    tmp="$complete EOL"
24321    arguments="${tmp#* }"
24322
24323    # Cannot rely on the command "which" here since it doesn't always work.
24324    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24325    if test -z "$is_absolute_path"; then
24326      # Path to executable is not absolute. Find it.
24327      IFS_save="$IFS"
24328      IFS=:
24329      for p in $PATH; do
24330        if test -f "$p/$path" && test -x "$p/$path"; then
24331          new_path="$p/$path"
24332          break
24333        fi
24334      done
24335      IFS="$IFS_save"
24336    else
24337      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24338$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24339      new_path="$path"
24340    fi
24341
24342    if test "x$new_path" = x; then
24343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24344$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24345        has_space=`$ECHO "$complete" | $GREP " "`
24346        if test "x$has_space" != x; then
24347          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24348$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24349        fi
24350        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24351      fi
24352  fi
24353
24354      # Now join together the path and the arguments once again
24355      if test "x$arguments" != xEOL; then
24356        new_complete="$new_path ${arguments% *}"
24357      else
24358        new_complete="$new_path"
24359      fi
24360
24361  if test "x$complete" != "x$new_complete"; then
24362      CPP="$new_complete"
24363      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24364$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24365    fi
24366
24367
24368ac_ext=cpp
24369ac_cpp='$CXXCPP $CPPFLAGS'
24370ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24371ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24372ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24374$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24375if test -z "$CXXCPP"; then
24376  if ${ac_cv_prog_CXXCPP+:} false; then :
24377  $as_echo_n "(cached) " >&6
24378else
24379      # Double quotes because CXXCPP needs to be expanded
24380    for CXXCPP in "$CXX -E" "/lib/cpp"
24381    do
24382      ac_preproc_ok=false
24383for ac_cxx_preproc_warn_flag in '' yes
24384do
24385  # Use a header file that comes with gcc, so configuring glibc
24386  # with a fresh cross-compiler works.
24387  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24388  # <limits.h> exists even on freestanding compilers.
24389  # On the NeXT, cc -E runs the code through the compiler's parser,
24390  # not just through cpp. "Syntax error" is here to catch this case.
24391  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24392/* end confdefs.h.  */
24393#ifdef __STDC__
24394# include <limits.h>
24395#else
24396# include <assert.h>
24397#endif
24398		     Syntax error
24399_ACEOF
24400if ac_fn_cxx_try_cpp "$LINENO"; then :
24401
24402else
24403  # Broken: fails on valid input.
24404continue
24405fi
24406rm -f conftest.err conftest.i conftest.$ac_ext
24407
24408  # OK, works on sane cases.  Now check whether nonexistent headers
24409  # can be detected and how.
24410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24411/* end confdefs.h.  */
24412#include <ac_nonexistent.h>
24413_ACEOF
24414if ac_fn_cxx_try_cpp "$LINENO"; then :
24415  # Broken: success on invalid input.
24416continue
24417else
24418  # Passes both tests.
24419ac_preproc_ok=:
24420break
24421fi
24422rm -f conftest.err conftest.i conftest.$ac_ext
24423
24424done
24425# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24426rm -f conftest.i conftest.err conftest.$ac_ext
24427if $ac_preproc_ok; then :
24428  break
24429fi
24430
24431    done
24432    ac_cv_prog_CXXCPP=$CXXCPP
24433
24434fi
24435  CXXCPP=$ac_cv_prog_CXXCPP
24436else
24437  ac_cv_prog_CXXCPP=$CXXCPP
24438fi
24439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24440$as_echo "$CXXCPP" >&6; }
24441ac_preproc_ok=false
24442for ac_cxx_preproc_warn_flag in '' yes
24443do
24444  # Use a header file that comes with gcc, so configuring glibc
24445  # with a fresh cross-compiler works.
24446  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24447  # <limits.h> exists even on freestanding compilers.
24448  # On the NeXT, cc -E runs the code through the compiler's parser,
24449  # not just through cpp. "Syntax error" is here to catch this case.
24450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24451/* end confdefs.h.  */
24452#ifdef __STDC__
24453# include <limits.h>
24454#else
24455# include <assert.h>
24456#endif
24457		     Syntax error
24458_ACEOF
24459if ac_fn_cxx_try_cpp "$LINENO"; then :
24460
24461else
24462  # Broken: fails on valid input.
24463continue
24464fi
24465rm -f conftest.err conftest.i conftest.$ac_ext
24466
24467  # OK, works on sane cases.  Now check whether nonexistent headers
24468  # can be detected and how.
24469  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24470/* end confdefs.h.  */
24471#include <ac_nonexistent.h>
24472_ACEOF
24473if ac_fn_cxx_try_cpp "$LINENO"; then :
24474  # Broken: success on invalid input.
24475continue
24476else
24477  # Passes both tests.
24478ac_preproc_ok=:
24479break
24480fi
24481rm -f conftest.err conftest.i conftest.$ac_ext
24482
24483done
24484# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24485rm -f conftest.i conftest.err conftest.$ac_ext
24486if $ac_preproc_ok; then :
24487
24488else
24489  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24490$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24491as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24492See \`config.log' for more details" "$LINENO" 5; }
24493fi
24494
24495ac_ext=cpp
24496ac_cpp='$CXXCPP $CPPFLAGS'
24497ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24498ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24499ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24500
24501
24502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24503
24504  # First separate the path from the arguments. This will split at the first
24505  # space.
24506  complete="$CXXCPP"
24507  path="${complete%% *}"
24508  tmp="$complete EOL"
24509  arguments="${tmp#* }"
24510
24511  # Input might be given as Windows format, start by converting to
24512  # unix format.
24513  new_path=`$CYGPATH -u "$path"`
24514
24515  # Now try to locate executable using which
24516  new_path=`$WHICH "$new_path" 2> /dev/null`
24517  # bat and cmd files are not always considered executable in cygwin causing which
24518  # to not find them
24519  if test "x$new_path" = x \
24520           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24521           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24522    new_path=`$CYGPATH -u "$path"`
24523  fi
24524  if test "x$new_path" = x; then
24525    # Oops. Which didn't find the executable.
24526    # The splitting of arguments from the executable at a space might have been incorrect,
24527    # since paths with space are more likely in Windows. Give it another try with the whole
24528    # argument.
24529    path="$complete"
24530    arguments="EOL"
24531    new_path=`$CYGPATH -u "$path"`
24532    new_path=`$WHICH "$new_path" 2> /dev/null`
24533    # bat and cmd files are not always considered executable in cygwin causing which
24534    # to not find them
24535    if test "x$new_path" = x \
24536             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24537             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24538      new_path=`$CYGPATH -u "$path"`
24539    fi
24540    if test "x$new_path" = x; then
24541      # It's still not found. Now this is an unrecoverable error.
24542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24543$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24544      has_space=`$ECHO "$complete" | $GREP " "`
24545      if test "x$has_space" != x; then
24546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24548      fi
24549      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24550    fi
24551  fi
24552
24553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24556  # "foo.exe" is OK but "foo" is an error.
24557  #
24558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24559  # It is also a way to make sure we got the proper file name for the real test later on.
24560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24561  if test "x$test_shortpath" = x; then
24562    # Short path failed, file does not exist as specified.
24563    # Try adding .exe or .cmd
24564    if test -f "${new_path}.exe"; then
24565       input_to_shortpath="${new_path}.exe"
24566    elif test -f "${new_path}.cmd"; then
24567       input_to_shortpath="${new_path}.cmd"
24568    else
24569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24570$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24571      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24572$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24573      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24574    fi
24575  else
24576    input_to_shortpath="$new_path"
24577  fi
24578
24579  # Call helper function which possibly converts this using DOS-style short mode.
24580  # If so, the updated path is stored in $new_path.
24581  new_path="$input_to_shortpath"
24582
24583  input_path="$input_to_shortpath"
24584  # Check if we need to convert this using DOS-style short mode. If the path
24585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24586  # take no chances and rewrite it.
24587  # Note: m4 eats our [], so we need to use [ and ] instead.
24588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24589  if test "x$has_forbidden_chars" != x; then
24590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24594      # Going to short mode and back again did indeed matter. Since short mode is
24595      # case insensitive, let's make it lowercase to improve readability.
24596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24597      # Now convert it back to Unix-stile (cygpath)
24598      input_path=`$CYGPATH -u "$shortmode_path"`
24599      new_path="$input_path"
24600    fi
24601  fi
24602
24603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24604  if test "x$test_cygdrive_prefix" = x; then
24605    # As a simple fix, exclude /usr/bin since it's not a real path.
24606    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24608      # a path prefixed by /cygdrive for fixpath to work.
24609      new_path="$CYGWIN_ROOT_PATH$input_path"
24610    fi
24611  fi
24612
24613  # remove trailing .exe if any
24614  new_path="${new_path/%.exe/}"
24615
24616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24617
24618  # First separate the path from the arguments. This will split at the first
24619  # space.
24620  complete="$CXXCPP"
24621  path="${complete%% *}"
24622  tmp="$complete EOL"
24623  arguments="${tmp#* }"
24624
24625  # Input might be given as Windows format, start by converting to
24626  # unix format.
24627  new_path="$path"
24628
24629  windows_path="$new_path"
24630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24631    unix_path=`$CYGPATH -u "$windows_path"`
24632    new_path="$unix_path"
24633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24635    new_path="$unix_path"
24636  fi
24637
24638
24639  # Now try to locate executable using which
24640  new_path=`$WHICH "$new_path" 2> /dev/null`
24641
24642  if test "x$new_path" = x; then
24643    # Oops. Which didn't find the executable.
24644    # The splitting of arguments from the executable at a space might have been incorrect,
24645    # since paths with space are more likely in Windows. Give it another try with the whole
24646    # argument.
24647    path="$complete"
24648    arguments="EOL"
24649    new_path="$path"
24650
24651  windows_path="$new_path"
24652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24653    unix_path=`$CYGPATH -u "$windows_path"`
24654    new_path="$unix_path"
24655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24657    new_path="$unix_path"
24658  fi
24659
24660
24661    new_path=`$WHICH "$new_path" 2> /dev/null`
24662
24663    if test "x$new_path" = x; then
24664      # It's still not found. Now this is an unrecoverable error.
24665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24666$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24667      has_space=`$ECHO "$complete" | $GREP " "`
24668      if test "x$has_space" != x; then
24669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24671      fi
24672      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24673    fi
24674  fi
24675
24676  # Now new_path has a complete unix path to the binary
24677  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24678    # Keep paths in /bin as-is, but remove trailing .exe if any
24679    new_path="${new_path/%.exe/}"
24680    # Do not save /bin paths to all_fixpath_prefixes!
24681  else
24682    # Not in mixed or Windows style, start by that.
24683    new_path=`cmd //c echo $new_path`
24684
24685  input_path="$new_path"
24686  # Check if we need to convert this using DOS-style short mode. If the path
24687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24688  # take no chances and rewrite it.
24689  # Note: m4 eats our [], so we need to use [ and ] instead.
24690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24691  if test "x$has_forbidden_chars" != x; then
24692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24694  fi
24695
24696    # Output is in $new_path
24697
24698  windows_path="$new_path"
24699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24700    unix_path=`$CYGPATH -u "$windows_path"`
24701    new_path="$unix_path"
24702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24704    new_path="$unix_path"
24705  fi
24706
24707    # remove trailing .exe if any
24708    new_path="${new_path/%.exe/}"
24709
24710    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24711    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24712  fi
24713
24714  else
24715    # We're on a posix platform. Hooray! :)
24716    # First separate the path from the arguments. This will split at the first
24717    # space.
24718    complete="$CXXCPP"
24719    path="${complete%% *}"
24720    tmp="$complete EOL"
24721    arguments="${tmp#* }"
24722
24723    # Cannot rely on the command "which" here since it doesn't always work.
24724    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24725    if test -z "$is_absolute_path"; then
24726      # Path to executable is not absolute. Find it.
24727      IFS_save="$IFS"
24728      IFS=:
24729      for p in $PATH; do
24730        if test -f "$p/$path" && test -x "$p/$path"; then
24731          new_path="$p/$path"
24732          break
24733        fi
24734      done
24735      IFS="$IFS_save"
24736    else
24737      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24738$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24739      new_path="$path"
24740    fi
24741
24742    if test "x$new_path" = x; then
24743        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24744$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24745        has_space=`$ECHO "$complete" | $GREP " "`
24746        if test "x$has_space" != x; then
24747          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24748$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24749        fi
24750        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24751      fi
24752  fi
24753
24754      # Now join together the path and the arguments once again
24755      if test "x$arguments" != xEOL; then
24756        new_complete="$new_path ${arguments% *}"
24757      else
24758        new_complete="$new_path"
24759      fi
24760
24761  if test "x$complete" != "x$new_complete"; then
24762      CXXCPP="$new_complete"
24763      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24764$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24765    fi
24766
24767
24768if test "x$COMPILE_TYPE" != "xcross"; then
24769    # If we are not cross compiling, use the same compilers for
24770    # building the build platform executables. The cross-compilation
24771    # case needed to be done earlier, but this can only be done after
24772    # the native tools have been localized.
24773    BUILD_CC="$CC"
24774    BUILD_CXX="$CXX"
24775    BUILD_LD="$LD"
24776fi
24777
24778# for solaris we really need solaris tools, and not gnu equivalent
24779#   these seems to normally reside in /usr/ccs/bin so add that to path before
24780#   starting to probe
24781#
24782#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24783#         so that it can be overriden --with-tools-dir
24784if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24785    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24786fi
24787
24788# Find the right assembler.
24789if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24790    # Extract the first word of "as", so it can be a program name with args.
24791set dummy as; ac_word=$2
24792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24793$as_echo_n "checking for $ac_word... " >&6; }
24794if ${ac_cv_path_AS+:} false; then :
24795  $as_echo_n "(cached) " >&6
24796else
24797  case $AS in
24798  [\\/]* | ?:[\\/]*)
24799  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24800  ;;
24801  *)
24802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24803for as_dir in $PATH
24804do
24805  IFS=$as_save_IFS
24806  test -z "$as_dir" && as_dir=.
24807    for ac_exec_ext in '' $ac_executable_extensions; do
24808  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24809    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24811    break 2
24812  fi
24813done
24814  done
24815IFS=$as_save_IFS
24816
24817  ;;
24818esac
24819fi
24820AS=$ac_cv_path_AS
24821if test -n "$AS"; then
24822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24823$as_echo "$AS" >&6; }
24824else
24825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24826$as_echo "no" >&6; }
24827fi
24828
24829
24830
24831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24832
24833  # First separate the path from the arguments. This will split at the first
24834  # space.
24835  complete="$AS"
24836  path="${complete%% *}"
24837  tmp="$complete EOL"
24838  arguments="${tmp#* }"
24839
24840  # Input might be given as Windows format, start by converting to
24841  # unix format.
24842  new_path=`$CYGPATH -u "$path"`
24843
24844  # Now try to locate executable using which
24845  new_path=`$WHICH "$new_path" 2> /dev/null`
24846  # bat and cmd files are not always considered executable in cygwin causing which
24847  # to not find them
24848  if test "x$new_path" = x \
24849           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24850           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24851    new_path=`$CYGPATH -u "$path"`
24852  fi
24853  if test "x$new_path" = x; then
24854    # Oops. Which didn't find the executable.
24855    # The splitting of arguments from the executable at a space might have been incorrect,
24856    # since paths with space are more likely in Windows. Give it another try with the whole
24857    # argument.
24858    path="$complete"
24859    arguments="EOL"
24860    new_path=`$CYGPATH -u "$path"`
24861    new_path=`$WHICH "$new_path" 2> /dev/null`
24862    # bat and cmd files are not always considered executable in cygwin causing which
24863    # to not find them
24864    if test "x$new_path" = x \
24865             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24866             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24867      new_path=`$CYGPATH -u "$path"`
24868    fi
24869    if test "x$new_path" = x; then
24870      # It's still not found. Now this is an unrecoverable error.
24871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24872$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24873      has_space=`$ECHO "$complete" | $GREP " "`
24874      if test "x$has_space" != x; then
24875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24877      fi
24878      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24879    fi
24880  fi
24881
24882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24885  # "foo.exe" is OK but "foo" is an error.
24886  #
24887  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24888  # It is also a way to make sure we got the proper file name for the real test later on.
24889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24890  if test "x$test_shortpath" = x; then
24891    # Short path failed, file does not exist as specified.
24892    # Try adding .exe or .cmd
24893    if test -f "${new_path}.exe"; then
24894       input_to_shortpath="${new_path}.exe"
24895    elif test -f "${new_path}.cmd"; then
24896       input_to_shortpath="${new_path}.cmd"
24897    else
24898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24899$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24900      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24901$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24902      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24903    fi
24904  else
24905    input_to_shortpath="$new_path"
24906  fi
24907
24908  # Call helper function which possibly converts this using DOS-style short mode.
24909  # If so, the updated path is stored in $new_path.
24910  new_path="$input_to_shortpath"
24911
24912  input_path="$input_to_shortpath"
24913  # Check if we need to convert this using DOS-style short mode. If the path
24914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24915  # take no chances and rewrite it.
24916  # Note: m4 eats our [], so we need to use [ and ] instead.
24917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24918  if test "x$has_forbidden_chars" != x; then
24919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24923      # Going to short mode and back again did indeed matter. Since short mode is
24924      # case insensitive, let's make it lowercase to improve readability.
24925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24926      # Now convert it back to Unix-stile (cygpath)
24927      input_path=`$CYGPATH -u "$shortmode_path"`
24928      new_path="$input_path"
24929    fi
24930  fi
24931
24932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24933  if test "x$test_cygdrive_prefix" = x; then
24934    # As a simple fix, exclude /usr/bin since it's not a real path.
24935    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24937      # a path prefixed by /cygdrive for fixpath to work.
24938      new_path="$CYGWIN_ROOT_PATH$input_path"
24939    fi
24940  fi
24941
24942  # remove trailing .exe if any
24943  new_path="${new_path/%.exe/}"
24944
24945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24946
24947  # First separate the path from the arguments. This will split at the first
24948  # space.
24949  complete="$AS"
24950  path="${complete%% *}"
24951  tmp="$complete EOL"
24952  arguments="${tmp#* }"
24953
24954  # Input might be given as Windows format, start by converting to
24955  # unix format.
24956  new_path="$path"
24957
24958  windows_path="$new_path"
24959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24960    unix_path=`$CYGPATH -u "$windows_path"`
24961    new_path="$unix_path"
24962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24964    new_path="$unix_path"
24965  fi
24966
24967
24968  # Now try to locate executable using which
24969  new_path=`$WHICH "$new_path" 2> /dev/null`
24970
24971  if test "x$new_path" = x; then
24972    # Oops. Which didn't find the executable.
24973    # The splitting of arguments from the executable at a space might have been incorrect,
24974    # since paths with space are more likely in Windows. Give it another try with the whole
24975    # argument.
24976    path="$complete"
24977    arguments="EOL"
24978    new_path="$path"
24979
24980  windows_path="$new_path"
24981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24982    unix_path=`$CYGPATH -u "$windows_path"`
24983    new_path="$unix_path"
24984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24986    new_path="$unix_path"
24987  fi
24988
24989
24990    new_path=`$WHICH "$new_path" 2> /dev/null`
24991
24992    if test "x$new_path" = x; then
24993      # It's still not found. Now this is an unrecoverable error.
24994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24995$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24996      has_space=`$ECHO "$complete" | $GREP " "`
24997      if test "x$has_space" != x; then
24998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25000      fi
25001      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25002    fi
25003  fi
25004
25005  # Now new_path has a complete unix path to the binary
25006  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25007    # Keep paths in /bin as-is, but remove trailing .exe if any
25008    new_path="${new_path/%.exe/}"
25009    # Do not save /bin paths to all_fixpath_prefixes!
25010  else
25011    # Not in mixed or Windows style, start by that.
25012    new_path=`cmd //c echo $new_path`
25013
25014  input_path="$new_path"
25015  # Check if we need to convert this using DOS-style short mode. If the path
25016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25017  # take no chances and rewrite it.
25018  # Note: m4 eats our [], so we need to use [ and ] instead.
25019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25020  if test "x$has_forbidden_chars" != x; then
25021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25023  fi
25024
25025    # Output is in $new_path
25026
25027  windows_path="$new_path"
25028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25029    unix_path=`$CYGPATH -u "$windows_path"`
25030    new_path="$unix_path"
25031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25033    new_path="$unix_path"
25034  fi
25035
25036    # remove trailing .exe if any
25037    new_path="${new_path/%.exe/}"
25038
25039    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25040    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25041  fi
25042
25043  else
25044    # We're on a posix platform. Hooray! :)
25045    # First separate the path from the arguments. This will split at the first
25046    # space.
25047    complete="$AS"
25048    path="${complete%% *}"
25049    tmp="$complete EOL"
25050    arguments="${tmp#* }"
25051
25052    # Cannot rely on the command "which" here since it doesn't always work.
25053    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25054    if test -z "$is_absolute_path"; then
25055      # Path to executable is not absolute. Find it.
25056      IFS_save="$IFS"
25057      IFS=:
25058      for p in $PATH; do
25059        if test -f "$p/$path" && test -x "$p/$path"; then
25060          new_path="$p/$path"
25061          break
25062        fi
25063      done
25064      IFS="$IFS_save"
25065    else
25066      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25067$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25068      new_path="$path"
25069    fi
25070
25071    if test "x$new_path" = x; then
25072        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25073$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25074        has_space=`$ECHO "$complete" | $GREP " "`
25075        if test "x$has_space" != x; then
25076          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25077$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25078        fi
25079        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25080      fi
25081  fi
25082
25083      # Now join together the path and the arguments once again
25084      if test "x$arguments" != xEOL; then
25085        new_complete="$new_path ${arguments% *}"
25086      else
25087        new_complete="$new_path"
25088      fi
25089
25090  if test "x$complete" != "x$new_complete"; then
25091      AS="$new_complete"
25092      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25093$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25094    fi
25095
25096else
25097    AS="$CC -c"
25098fi
25099
25100
25101if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25102    for ac_prog in gnm nm
25103do
25104  # Extract the first word of "$ac_prog", so it can be a program name with args.
25105set dummy $ac_prog; ac_word=$2
25106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25107$as_echo_n "checking for $ac_word... " >&6; }
25108if ${ac_cv_path_NM+:} false; then :
25109  $as_echo_n "(cached) " >&6
25110else
25111  case $NM in
25112  [\\/]* | ?:[\\/]*)
25113  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25114  ;;
25115  *)
25116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25117for as_dir in $PATH
25118do
25119  IFS=$as_save_IFS
25120  test -z "$as_dir" && as_dir=.
25121    for ac_exec_ext in '' $ac_executable_extensions; do
25122  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25123    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25125    break 2
25126  fi
25127done
25128  done
25129IFS=$as_save_IFS
25130
25131  ;;
25132esac
25133fi
25134NM=$ac_cv_path_NM
25135if test -n "$NM"; then
25136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25137$as_echo "$NM" >&6; }
25138else
25139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25140$as_echo "no" >&6; }
25141fi
25142
25143
25144  test -n "$NM" && break
25145done
25146
25147
25148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25149
25150  # First separate the path from the arguments. This will split at the first
25151  # space.
25152  complete="$NM"
25153  path="${complete%% *}"
25154  tmp="$complete EOL"
25155  arguments="${tmp#* }"
25156
25157  # Input might be given as Windows format, start by converting to
25158  # unix format.
25159  new_path=`$CYGPATH -u "$path"`
25160
25161  # Now try to locate executable using which
25162  new_path=`$WHICH "$new_path" 2> /dev/null`
25163  # bat and cmd files are not always considered executable in cygwin causing which
25164  # to not find them
25165  if test "x$new_path" = x \
25166           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25167           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25168    new_path=`$CYGPATH -u "$path"`
25169  fi
25170  if test "x$new_path" = x; then
25171    # Oops. Which didn't find the executable.
25172    # The splitting of arguments from the executable at a space might have been incorrect,
25173    # since paths with space are more likely in Windows. Give it another try with the whole
25174    # argument.
25175    path="$complete"
25176    arguments="EOL"
25177    new_path=`$CYGPATH -u "$path"`
25178    new_path=`$WHICH "$new_path" 2> /dev/null`
25179    # bat and cmd files are not always considered executable in cygwin causing which
25180    # to not find them
25181    if test "x$new_path" = x \
25182             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25183             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25184      new_path=`$CYGPATH -u "$path"`
25185    fi
25186    if test "x$new_path" = x; then
25187      # It's still not found. Now this is an unrecoverable error.
25188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25189$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25190      has_space=`$ECHO "$complete" | $GREP " "`
25191      if test "x$has_space" != x; then
25192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25194      fi
25195      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25196    fi
25197  fi
25198
25199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25202  # "foo.exe" is OK but "foo" is an error.
25203  #
25204  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25205  # It is also a way to make sure we got the proper file name for the real test later on.
25206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25207  if test "x$test_shortpath" = x; then
25208    # Short path failed, file does not exist as specified.
25209    # Try adding .exe or .cmd
25210    if test -f "${new_path}.exe"; then
25211       input_to_shortpath="${new_path}.exe"
25212    elif test -f "${new_path}.cmd"; then
25213       input_to_shortpath="${new_path}.cmd"
25214    else
25215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25216$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25217      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25218$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25219      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25220    fi
25221  else
25222    input_to_shortpath="$new_path"
25223  fi
25224
25225  # Call helper function which possibly converts this using DOS-style short mode.
25226  # If so, the updated path is stored in $new_path.
25227  new_path="$input_to_shortpath"
25228
25229  input_path="$input_to_shortpath"
25230  # Check if we need to convert this using DOS-style short mode. If the path
25231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25232  # take no chances and rewrite it.
25233  # Note: m4 eats our [], so we need to use [ and ] instead.
25234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25235  if test "x$has_forbidden_chars" != x; then
25236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25240      # Going to short mode and back again did indeed matter. Since short mode is
25241      # case insensitive, let's make it lowercase to improve readability.
25242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25243      # Now convert it back to Unix-stile (cygpath)
25244      input_path=`$CYGPATH -u "$shortmode_path"`
25245      new_path="$input_path"
25246    fi
25247  fi
25248
25249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25250  if test "x$test_cygdrive_prefix" = x; then
25251    # As a simple fix, exclude /usr/bin since it's not a real path.
25252    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25254      # a path prefixed by /cygdrive for fixpath to work.
25255      new_path="$CYGWIN_ROOT_PATH$input_path"
25256    fi
25257  fi
25258
25259  # remove trailing .exe if any
25260  new_path="${new_path/%.exe/}"
25261
25262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25263
25264  # First separate the path from the arguments. This will split at the first
25265  # space.
25266  complete="$NM"
25267  path="${complete%% *}"
25268  tmp="$complete EOL"
25269  arguments="${tmp#* }"
25270
25271  # Input might be given as Windows format, start by converting to
25272  # unix format.
25273  new_path="$path"
25274
25275  windows_path="$new_path"
25276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25277    unix_path=`$CYGPATH -u "$windows_path"`
25278    new_path="$unix_path"
25279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25281    new_path="$unix_path"
25282  fi
25283
25284
25285  # Now try to locate executable using which
25286  new_path=`$WHICH "$new_path" 2> /dev/null`
25287
25288  if test "x$new_path" = x; then
25289    # Oops. Which didn't find the executable.
25290    # The splitting of arguments from the executable at a space might have been incorrect,
25291    # since paths with space are more likely in Windows. Give it another try with the whole
25292    # argument.
25293    path="$complete"
25294    arguments="EOL"
25295    new_path="$path"
25296
25297  windows_path="$new_path"
25298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25299    unix_path=`$CYGPATH -u "$windows_path"`
25300    new_path="$unix_path"
25301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25303    new_path="$unix_path"
25304  fi
25305
25306
25307    new_path=`$WHICH "$new_path" 2> /dev/null`
25308
25309    if test "x$new_path" = x; then
25310      # It's still not found. Now this is an unrecoverable error.
25311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25312$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25313      has_space=`$ECHO "$complete" | $GREP " "`
25314      if test "x$has_space" != x; then
25315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25317      fi
25318      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25319    fi
25320  fi
25321
25322  # Now new_path has a complete unix path to the binary
25323  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25324    # Keep paths in /bin as-is, but remove trailing .exe if any
25325    new_path="${new_path/%.exe/}"
25326    # Do not save /bin paths to all_fixpath_prefixes!
25327  else
25328    # Not in mixed or Windows style, start by that.
25329    new_path=`cmd //c echo $new_path`
25330
25331  input_path="$new_path"
25332  # Check if we need to convert this using DOS-style short mode. If the path
25333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25334  # take no chances and rewrite it.
25335  # Note: m4 eats our [], so we need to use [ and ] instead.
25336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25337  if test "x$has_forbidden_chars" != x; then
25338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25340  fi
25341
25342    # Output is in $new_path
25343
25344  windows_path="$new_path"
25345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25346    unix_path=`$CYGPATH -u "$windows_path"`
25347    new_path="$unix_path"
25348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25350    new_path="$unix_path"
25351  fi
25352
25353    # remove trailing .exe if any
25354    new_path="${new_path/%.exe/}"
25355
25356    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25357    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25358  fi
25359
25360  else
25361    # We're on a posix platform. Hooray! :)
25362    # First separate the path from the arguments. This will split at the first
25363    # space.
25364    complete="$NM"
25365    path="${complete%% *}"
25366    tmp="$complete EOL"
25367    arguments="${tmp#* }"
25368
25369    # Cannot rely on the command "which" here since it doesn't always work.
25370    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25371    if test -z "$is_absolute_path"; then
25372      # Path to executable is not absolute. Find it.
25373      IFS_save="$IFS"
25374      IFS=:
25375      for p in $PATH; do
25376        if test -f "$p/$path" && test -x "$p/$path"; then
25377          new_path="$p/$path"
25378          break
25379        fi
25380      done
25381      IFS="$IFS_save"
25382    else
25383      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25384$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25385      new_path="$path"
25386    fi
25387
25388    if test "x$new_path" = x; then
25389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25390$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25391        has_space=`$ECHO "$complete" | $GREP " "`
25392        if test "x$has_space" != x; then
25393          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25394$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25395        fi
25396        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25397      fi
25398  fi
25399
25400      # Now join together the path and the arguments once again
25401      if test "x$arguments" != xEOL; then
25402        new_complete="$new_path ${arguments% *}"
25403      else
25404        new_complete="$new_path"
25405      fi
25406
25407  if test "x$complete" != "x$new_complete"; then
25408      NM="$new_complete"
25409      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25410$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25411    fi
25412
25413    # Extract the first word of "strip", so it can be a program name with args.
25414set dummy strip; ac_word=$2
25415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25416$as_echo_n "checking for $ac_word... " >&6; }
25417if ${ac_cv_path_STRIP+:} false; then :
25418  $as_echo_n "(cached) " >&6
25419else
25420  case $STRIP in
25421  [\\/]* | ?:[\\/]*)
25422  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25423  ;;
25424  *)
25425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25426for as_dir in $PATH
25427do
25428  IFS=$as_save_IFS
25429  test -z "$as_dir" && as_dir=.
25430    for ac_exec_ext in '' $ac_executable_extensions; do
25431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25432    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25434    break 2
25435  fi
25436done
25437  done
25438IFS=$as_save_IFS
25439
25440  ;;
25441esac
25442fi
25443STRIP=$ac_cv_path_STRIP
25444if test -n "$STRIP"; then
25445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25446$as_echo "$STRIP" >&6; }
25447else
25448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25449$as_echo "no" >&6; }
25450fi
25451
25452
25453
25454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25455
25456  # First separate the path from the arguments. This will split at the first
25457  # space.
25458  complete="$STRIP"
25459  path="${complete%% *}"
25460  tmp="$complete EOL"
25461  arguments="${tmp#* }"
25462
25463  # Input might be given as Windows format, start by converting to
25464  # unix format.
25465  new_path=`$CYGPATH -u "$path"`
25466
25467  # Now try to locate executable using which
25468  new_path=`$WHICH "$new_path" 2> /dev/null`
25469  # bat and cmd files are not always considered executable in cygwin causing which
25470  # to not find them
25471  if test "x$new_path" = x \
25472           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25473           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25474    new_path=`$CYGPATH -u "$path"`
25475  fi
25476  if test "x$new_path" = x; then
25477    # Oops. Which didn't find the executable.
25478    # The splitting of arguments from the executable at a space might have been incorrect,
25479    # since paths with space are more likely in Windows. Give it another try with the whole
25480    # argument.
25481    path="$complete"
25482    arguments="EOL"
25483    new_path=`$CYGPATH -u "$path"`
25484    new_path=`$WHICH "$new_path" 2> /dev/null`
25485    # bat and cmd files are not always considered executable in cygwin causing which
25486    # to not find them
25487    if test "x$new_path" = x \
25488             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25489             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25490      new_path=`$CYGPATH -u "$path"`
25491    fi
25492    if test "x$new_path" = x; then
25493      # It's still not found. Now this is an unrecoverable error.
25494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25495$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25496      has_space=`$ECHO "$complete" | $GREP " "`
25497      if test "x$has_space" != x; then
25498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25500      fi
25501      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25502    fi
25503  fi
25504
25505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25508  # "foo.exe" is OK but "foo" is an error.
25509  #
25510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25511  # It is also a way to make sure we got the proper file name for the real test later on.
25512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25513  if test "x$test_shortpath" = x; then
25514    # Short path failed, file does not exist as specified.
25515    # Try adding .exe or .cmd
25516    if test -f "${new_path}.exe"; then
25517       input_to_shortpath="${new_path}.exe"
25518    elif test -f "${new_path}.cmd"; then
25519       input_to_shortpath="${new_path}.cmd"
25520    else
25521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25522$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25523      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25524$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25525      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25526    fi
25527  else
25528    input_to_shortpath="$new_path"
25529  fi
25530
25531  # Call helper function which possibly converts this using DOS-style short mode.
25532  # If so, the updated path is stored in $new_path.
25533  new_path="$input_to_shortpath"
25534
25535  input_path="$input_to_shortpath"
25536  # Check if we need to convert this using DOS-style short mode. If the path
25537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25538  # take no chances and rewrite it.
25539  # Note: m4 eats our [], so we need to use [ and ] instead.
25540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25541  if test "x$has_forbidden_chars" != x; then
25542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25546      # Going to short mode and back again did indeed matter. Since short mode is
25547      # case insensitive, let's make it lowercase to improve readability.
25548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25549      # Now convert it back to Unix-stile (cygpath)
25550      input_path=`$CYGPATH -u "$shortmode_path"`
25551      new_path="$input_path"
25552    fi
25553  fi
25554
25555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25556  if test "x$test_cygdrive_prefix" = x; then
25557    # As a simple fix, exclude /usr/bin since it's not a real path.
25558    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25560      # a path prefixed by /cygdrive for fixpath to work.
25561      new_path="$CYGWIN_ROOT_PATH$input_path"
25562    fi
25563  fi
25564
25565  # remove trailing .exe if any
25566  new_path="${new_path/%.exe/}"
25567
25568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25569
25570  # First separate the path from the arguments. This will split at the first
25571  # space.
25572  complete="$STRIP"
25573  path="${complete%% *}"
25574  tmp="$complete EOL"
25575  arguments="${tmp#* }"
25576
25577  # Input might be given as Windows format, start by converting to
25578  # unix format.
25579  new_path="$path"
25580
25581  windows_path="$new_path"
25582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25583    unix_path=`$CYGPATH -u "$windows_path"`
25584    new_path="$unix_path"
25585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25587    new_path="$unix_path"
25588  fi
25589
25590
25591  # Now try to locate executable using which
25592  new_path=`$WHICH "$new_path" 2> /dev/null`
25593
25594  if test "x$new_path" = x; then
25595    # Oops. Which didn't find the executable.
25596    # The splitting of arguments from the executable at a space might have been incorrect,
25597    # since paths with space are more likely in Windows. Give it another try with the whole
25598    # argument.
25599    path="$complete"
25600    arguments="EOL"
25601    new_path="$path"
25602
25603  windows_path="$new_path"
25604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25605    unix_path=`$CYGPATH -u "$windows_path"`
25606    new_path="$unix_path"
25607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25609    new_path="$unix_path"
25610  fi
25611
25612
25613    new_path=`$WHICH "$new_path" 2> /dev/null`
25614
25615    if test "x$new_path" = x; then
25616      # It's still not found. Now this is an unrecoverable error.
25617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25618$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25619      has_space=`$ECHO "$complete" | $GREP " "`
25620      if test "x$has_space" != x; then
25621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25623      fi
25624      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25625    fi
25626  fi
25627
25628  # Now new_path has a complete unix path to the binary
25629  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25630    # Keep paths in /bin as-is, but remove trailing .exe if any
25631    new_path="${new_path/%.exe/}"
25632    # Do not save /bin paths to all_fixpath_prefixes!
25633  else
25634    # Not in mixed or Windows style, start by that.
25635    new_path=`cmd //c echo $new_path`
25636
25637  input_path="$new_path"
25638  # Check if we need to convert this using DOS-style short mode. If the path
25639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25640  # take no chances and rewrite it.
25641  # Note: m4 eats our [], so we need to use [ and ] instead.
25642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25643  if test "x$has_forbidden_chars" != x; then
25644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25646  fi
25647
25648    # Output is in $new_path
25649
25650  windows_path="$new_path"
25651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25652    unix_path=`$CYGPATH -u "$windows_path"`
25653    new_path="$unix_path"
25654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25656    new_path="$unix_path"
25657  fi
25658
25659    # remove trailing .exe if any
25660    new_path="${new_path/%.exe/}"
25661
25662    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25663    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25664  fi
25665
25666  else
25667    # We're on a posix platform. Hooray! :)
25668    # First separate the path from the arguments. This will split at the first
25669    # space.
25670    complete="$STRIP"
25671    path="${complete%% *}"
25672    tmp="$complete EOL"
25673    arguments="${tmp#* }"
25674
25675    # Cannot rely on the command "which" here since it doesn't always work.
25676    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25677    if test -z "$is_absolute_path"; then
25678      # Path to executable is not absolute. Find it.
25679      IFS_save="$IFS"
25680      IFS=:
25681      for p in $PATH; do
25682        if test -f "$p/$path" && test -x "$p/$path"; then
25683          new_path="$p/$path"
25684          break
25685        fi
25686      done
25687      IFS="$IFS_save"
25688    else
25689      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25690$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25691      new_path="$path"
25692    fi
25693
25694    if test "x$new_path" = x; then
25695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25696$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25697        has_space=`$ECHO "$complete" | $GREP " "`
25698        if test "x$has_space" != x; then
25699          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25700$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25701        fi
25702        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25703      fi
25704  fi
25705
25706      # Now join together the path and the arguments once again
25707      if test "x$arguments" != xEOL; then
25708        new_complete="$new_path ${arguments% *}"
25709      else
25710        new_complete="$new_path"
25711      fi
25712
25713  if test "x$complete" != "x$new_complete"; then
25714      STRIP="$new_complete"
25715      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25716$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25717    fi
25718
25719    # Extract the first word of "mcs", so it can be a program name with args.
25720set dummy mcs; ac_word=$2
25721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25722$as_echo_n "checking for $ac_word... " >&6; }
25723if ${ac_cv_path_MCS+:} false; then :
25724  $as_echo_n "(cached) " >&6
25725else
25726  case $MCS in
25727  [\\/]* | ?:[\\/]*)
25728  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25729  ;;
25730  *)
25731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25732for as_dir in $PATH
25733do
25734  IFS=$as_save_IFS
25735  test -z "$as_dir" && as_dir=.
25736    for ac_exec_ext in '' $ac_executable_extensions; do
25737  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25738    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25740    break 2
25741  fi
25742done
25743  done
25744IFS=$as_save_IFS
25745
25746  ;;
25747esac
25748fi
25749MCS=$ac_cv_path_MCS
25750if test -n "$MCS"; then
25751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25752$as_echo "$MCS" >&6; }
25753else
25754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25755$as_echo "no" >&6; }
25756fi
25757
25758
25759
25760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25761
25762  # First separate the path from the arguments. This will split at the first
25763  # space.
25764  complete="$MCS"
25765  path="${complete%% *}"
25766  tmp="$complete EOL"
25767  arguments="${tmp#* }"
25768
25769  # Input might be given as Windows format, start by converting to
25770  # unix format.
25771  new_path=`$CYGPATH -u "$path"`
25772
25773  # Now try to locate executable using which
25774  new_path=`$WHICH "$new_path" 2> /dev/null`
25775  # bat and cmd files are not always considered executable in cygwin causing which
25776  # to not find them
25777  if test "x$new_path" = x \
25778           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25779           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25780    new_path=`$CYGPATH -u "$path"`
25781  fi
25782  if test "x$new_path" = x; then
25783    # Oops. Which didn't find the executable.
25784    # The splitting of arguments from the executable at a space might have been incorrect,
25785    # since paths with space are more likely in Windows. Give it another try with the whole
25786    # argument.
25787    path="$complete"
25788    arguments="EOL"
25789    new_path=`$CYGPATH -u "$path"`
25790    new_path=`$WHICH "$new_path" 2> /dev/null`
25791    # bat and cmd files are not always considered executable in cygwin causing which
25792    # to not find them
25793    if test "x$new_path" = x \
25794             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25795             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25796      new_path=`$CYGPATH -u "$path"`
25797    fi
25798    if test "x$new_path" = x; then
25799      # It's still not found. Now this is an unrecoverable error.
25800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25801$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25802      has_space=`$ECHO "$complete" | $GREP " "`
25803      if test "x$has_space" != x; then
25804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25806      fi
25807      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25808    fi
25809  fi
25810
25811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25814  # "foo.exe" is OK but "foo" is an error.
25815  #
25816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25817  # It is also a way to make sure we got the proper file name for the real test later on.
25818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25819  if test "x$test_shortpath" = x; then
25820    # Short path failed, file does not exist as specified.
25821    # Try adding .exe or .cmd
25822    if test -f "${new_path}.exe"; then
25823       input_to_shortpath="${new_path}.exe"
25824    elif test -f "${new_path}.cmd"; then
25825       input_to_shortpath="${new_path}.cmd"
25826    else
25827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25828$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25829      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25830$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25831      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25832    fi
25833  else
25834    input_to_shortpath="$new_path"
25835  fi
25836
25837  # Call helper function which possibly converts this using DOS-style short mode.
25838  # If so, the updated path is stored in $new_path.
25839  new_path="$input_to_shortpath"
25840
25841  input_path="$input_to_shortpath"
25842  # Check if we need to convert this using DOS-style short mode. If the path
25843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25844  # take no chances and rewrite it.
25845  # Note: m4 eats our [], so we need to use [ and ] instead.
25846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25847  if test "x$has_forbidden_chars" != x; then
25848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25852      # Going to short mode and back again did indeed matter. Since short mode is
25853      # case insensitive, let's make it lowercase to improve readability.
25854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25855      # Now convert it back to Unix-stile (cygpath)
25856      input_path=`$CYGPATH -u "$shortmode_path"`
25857      new_path="$input_path"
25858    fi
25859  fi
25860
25861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25862  if test "x$test_cygdrive_prefix" = x; then
25863    # As a simple fix, exclude /usr/bin since it's not a real path.
25864    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25866      # a path prefixed by /cygdrive for fixpath to work.
25867      new_path="$CYGWIN_ROOT_PATH$input_path"
25868    fi
25869  fi
25870
25871  # remove trailing .exe if any
25872  new_path="${new_path/%.exe/}"
25873
25874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25875
25876  # First separate the path from the arguments. This will split at the first
25877  # space.
25878  complete="$MCS"
25879  path="${complete%% *}"
25880  tmp="$complete EOL"
25881  arguments="${tmp#* }"
25882
25883  # Input might be given as Windows format, start by converting to
25884  # unix format.
25885  new_path="$path"
25886
25887  windows_path="$new_path"
25888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25889    unix_path=`$CYGPATH -u "$windows_path"`
25890    new_path="$unix_path"
25891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25893    new_path="$unix_path"
25894  fi
25895
25896
25897  # Now try to locate executable using which
25898  new_path=`$WHICH "$new_path" 2> /dev/null`
25899
25900  if test "x$new_path" = x; then
25901    # Oops. Which didn't find the executable.
25902    # The splitting of arguments from the executable at a space might have been incorrect,
25903    # since paths with space are more likely in Windows. Give it another try with the whole
25904    # argument.
25905    path="$complete"
25906    arguments="EOL"
25907    new_path="$path"
25908
25909  windows_path="$new_path"
25910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25911    unix_path=`$CYGPATH -u "$windows_path"`
25912    new_path="$unix_path"
25913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25915    new_path="$unix_path"
25916  fi
25917
25918
25919    new_path=`$WHICH "$new_path" 2> /dev/null`
25920
25921    if test "x$new_path" = x; then
25922      # It's still not found. Now this is an unrecoverable error.
25923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25924$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25925      has_space=`$ECHO "$complete" | $GREP " "`
25926      if test "x$has_space" != x; then
25927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25929      fi
25930      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25931    fi
25932  fi
25933
25934  # Now new_path has a complete unix path to the binary
25935  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25936    # Keep paths in /bin as-is, but remove trailing .exe if any
25937    new_path="${new_path/%.exe/}"
25938    # Do not save /bin paths to all_fixpath_prefixes!
25939  else
25940    # Not in mixed or Windows style, start by that.
25941    new_path=`cmd //c echo $new_path`
25942
25943  input_path="$new_path"
25944  # Check if we need to convert this using DOS-style short mode. If the path
25945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25946  # take no chances and rewrite it.
25947  # Note: m4 eats our [], so we need to use [ and ] instead.
25948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25949  if test "x$has_forbidden_chars" != x; then
25950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25952  fi
25953
25954    # Output is in $new_path
25955
25956  windows_path="$new_path"
25957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25958    unix_path=`$CYGPATH -u "$windows_path"`
25959    new_path="$unix_path"
25960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25962    new_path="$unix_path"
25963  fi
25964
25965    # remove trailing .exe if any
25966    new_path="${new_path/%.exe/}"
25967
25968    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25969    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25970  fi
25971
25972  else
25973    # We're on a posix platform. Hooray! :)
25974    # First separate the path from the arguments. This will split at the first
25975    # space.
25976    complete="$MCS"
25977    path="${complete%% *}"
25978    tmp="$complete EOL"
25979    arguments="${tmp#* }"
25980
25981    # Cannot rely on the command "which" here since it doesn't always work.
25982    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25983    if test -z "$is_absolute_path"; then
25984      # Path to executable is not absolute. Find it.
25985      IFS_save="$IFS"
25986      IFS=:
25987      for p in $PATH; do
25988        if test -f "$p/$path" && test -x "$p/$path"; then
25989          new_path="$p/$path"
25990          break
25991        fi
25992      done
25993      IFS="$IFS_save"
25994    else
25995      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25996$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25997      new_path="$path"
25998    fi
25999
26000    if test "x$new_path" = x; then
26001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26002$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26003        has_space=`$ECHO "$complete" | $GREP " "`
26004        if test "x$has_space" != x; then
26005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26007        fi
26008        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26009      fi
26010  fi
26011
26012      # Now join together the path and the arguments once again
26013      if test "x$arguments" != xEOL; then
26014        new_complete="$new_path ${arguments% *}"
26015      else
26016        new_complete="$new_path"
26017      fi
26018
26019  if test "x$complete" != "x$new_complete"; then
26020      MCS="$new_complete"
26021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26022$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26023    fi
26024
26025elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26026    if test -n "$ac_tool_prefix"; then
26027  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26028set dummy ${ac_tool_prefix}nm; ac_word=$2
26029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26030$as_echo_n "checking for $ac_word... " >&6; }
26031if ${ac_cv_prog_NM+:} false; then :
26032  $as_echo_n "(cached) " >&6
26033else
26034  if test -n "$NM"; then
26035  ac_cv_prog_NM="$NM" # Let the user override the test.
26036else
26037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26038for as_dir in $PATH
26039do
26040  IFS=$as_save_IFS
26041  test -z "$as_dir" && as_dir=.
26042    for ac_exec_ext in '' $ac_executable_extensions; do
26043  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26044    ac_cv_prog_NM="${ac_tool_prefix}nm"
26045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26046    break 2
26047  fi
26048done
26049  done
26050IFS=$as_save_IFS
26051
26052fi
26053fi
26054NM=$ac_cv_prog_NM
26055if test -n "$NM"; then
26056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26057$as_echo "$NM" >&6; }
26058else
26059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26060$as_echo "no" >&6; }
26061fi
26062
26063
26064fi
26065if test -z "$ac_cv_prog_NM"; then
26066  ac_ct_NM=$NM
26067  # Extract the first word of "nm", so it can be a program name with args.
26068set dummy nm; ac_word=$2
26069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26070$as_echo_n "checking for $ac_word... " >&6; }
26071if ${ac_cv_prog_ac_ct_NM+:} false; then :
26072  $as_echo_n "(cached) " >&6
26073else
26074  if test -n "$ac_ct_NM"; then
26075  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26076else
26077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26078for as_dir in $PATH
26079do
26080  IFS=$as_save_IFS
26081  test -z "$as_dir" && as_dir=.
26082    for ac_exec_ext in '' $ac_executable_extensions; do
26083  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26084    ac_cv_prog_ac_ct_NM="nm"
26085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26086    break 2
26087  fi
26088done
26089  done
26090IFS=$as_save_IFS
26091
26092fi
26093fi
26094ac_ct_NM=$ac_cv_prog_ac_ct_NM
26095if test -n "$ac_ct_NM"; then
26096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26097$as_echo "$ac_ct_NM" >&6; }
26098else
26099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26100$as_echo "no" >&6; }
26101fi
26102
26103  if test "x$ac_ct_NM" = x; then
26104    NM=""
26105  else
26106    case $cross_compiling:$ac_tool_warned in
26107yes:)
26108{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26109$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26110ac_tool_warned=yes ;;
26111esac
26112    NM=$ac_ct_NM
26113  fi
26114else
26115  NM="$ac_cv_prog_NM"
26116fi
26117
26118
26119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26120
26121  # First separate the path from the arguments. This will split at the first
26122  # space.
26123  complete="$NM"
26124  path="${complete%% *}"
26125  tmp="$complete EOL"
26126  arguments="${tmp#* }"
26127
26128  # Input might be given as Windows format, start by converting to
26129  # unix format.
26130  new_path=`$CYGPATH -u "$path"`
26131
26132  # Now try to locate executable using which
26133  new_path=`$WHICH "$new_path" 2> /dev/null`
26134  # bat and cmd files are not always considered executable in cygwin causing which
26135  # to not find them
26136  if test "x$new_path" = x \
26137           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26138           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26139    new_path=`$CYGPATH -u "$path"`
26140  fi
26141  if test "x$new_path" = x; then
26142    # Oops. Which didn't find the executable.
26143    # The splitting of arguments from the executable at a space might have been incorrect,
26144    # since paths with space are more likely in Windows. Give it another try with the whole
26145    # argument.
26146    path="$complete"
26147    arguments="EOL"
26148    new_path=`$CYGPATH -u "$path"`
26149    new_path=`$WHICH "$new_path" 2> /dev/null`
26150    # bat and cmd files are not always considered executable in cygwin causing which
26151    # to not find them
26152    if test "x$new_path" = x \
26153             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26154             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26155      new_path=`$CYGPATH -u "$path"`
26156    fi
26157    if test "x$new_path" = x; then
26158      # It's still not found. Now this is an unrecoverable error.
26159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26160$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26161      has_space=`$ECHO "$complete" | $GREP " "`
26162      if test "x$has_space" != x; then
26163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26165      fi
26166      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26167    fi
26168  fi
26169
26170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26173  # "foo.exe" is OK but "foo" is an error.
26174  #
26175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26176  # It is also a way to make sure we got the proper file name for the real test later on.
26177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26178  if test "x$test_shortpath" = x; then
26179    # Short path failed, file does not exist as specified.
26180    # Try adding .exe or .cmd
26181    if test -f "${new_path}.exe"; then
26182       input_to_shortpath="${new_path}.exe"
26183    elif test -f "${new_path}.cmd"; then
26184       input_to_shortpath="${new_path}.cmd"
26185    else
26186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26187$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26188      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26189$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26190      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26191    fi
26192  else
26193    input_to_shortpath="$new_path"
26194  fi
26195
26196  # Call helper function which possibly converts this using DOS-style short mode.
26197  # If so, the updated path is stored in $new_path.
26198  new_path="$input_to_shortpath"
26199
26200  input_path="$input_to_shortpath"
26201  # Check if we need to convert this using DOS-style short mode. If the path
26202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26203  # take no chances and rewrite it.
26204  # Note: m4 eats our [], so we need to use [ and ] instead.
26205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26206  if test "x$has_forbidden_chars" != x; then
26207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26211      # Going to short mode and back again did indeed matter. Since short mode is
26212      # case insensitive, let's make it lowercase to improve readability.
26213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26214      # Now convert it back to Unix-stile (cygpath)
26215      input_path=`$CYGPATH -u "$shortmode_path"`
26216      new_path="$input_path"
26217    fi
26218  fi
26219
26220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26221  if test "x$test_cygdrive_prefix" = x; then
26222    # As a simple fix, exclude /usr/bin since it's not a real path.
26223    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26225      # a path prefixed by /cygdrive for fixpath to work.
26226      new_path="$CYGWIN_ROOT_PATH$input_path"
26227    fi
26228  fi
26229
26230  # remove trailing .exe if any
26231  new_path="${new_path/%.exe/}"
26232
26233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26234
26235  # First separate the path from the arguments. This will split at the first
26236  # space.
26237  complete="$NM"
26238  path="${complete%% *}"
26239  tmp="$complete EOL"
26240  arguments="${tmp#* }"
26241
26242  # Input might be given as Windows format, start by converting to
26243  # unix format.
26244  new_path="$path"
26245
26246  windows_path="$new_path"
26247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26248    unix_path=`$CYGPATH -u "$windows_path"`
26249    new_path="$unix_path"
26250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26252    new_path="$unix_path"
26253  fi
26254
26255
26256  # Now try to locate executable using which
26257  new_path=`$WHICH "$new_path" 2> /dev/null`
26258
26259  if test "x$new_path" = x; then
26260    # Oops. Which didn't find the executable.
26261    # The splitting of arguments from the executable at a space might have been incorrect,
26262    # since paths with space are more likely in Windows. Give it another try with the whole
26263    # argument.
26264    path="$complete"
26265    arguments="EOL"
26266    new_path="$path"
26267
26268  windows_path="$new_path"
26269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26270    unix_path=`$CYGPATH -u "$windows_path"`
26271    new_path="$unix_path"
26272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26274    new_path="$unix_path"
26275  fi
26276
26277
26278    new_path=`$WHICH "$new_path" 2> /dev/null`
26279
26280    if test "x$new_path" = x; then
26281      # It's still not found. Now this is an unrecoverable error.
26282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26283$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26284      has_space=`$ECHO "$complete" | $GREP " "`
26285      if test "x$has_space" != x; then
26286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26288      fi
26289      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26290    fi
26291  fi
26292
26293  # Now new_path has a complete unix path to the binary
26294  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26295    # Keep paths in /bin as-is, but remove trailing .exe if any
26296    new_path="${new_path/%.exe/}"
26297    # Do not save /bin paths to all_fixpath_prefixes!
26298  else
26299    # Not in mixed or Windows style, start by that.
26300    new_path=`cmd //c echo $new_path`
26301
26302  input_path="$new_path"
26303  # Check if we need to convert this using DOS-style short mode. If the path
26304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26305  # take no chances and rewrite it.
26306  # Note: m4 eats our [], so we need to use [ and ] instead.
26307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26308  if test "x$has_forbidden_chars" != x; then
26309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26311  fi
26312
26313    # Output is in $new_path
26314
26315  windows_path="$new_path"
26316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26317    unix_path=`$CYGPATH -u "$windows_path"`
26318    new_path="$unix_path"
26319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26321    new_path="$unix_path"
26322  fi
26323
26324    # remove trailing .exe if any
26325    new_path="${new_path/%.exe/}"
26326
26327    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26328    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26329  fi
26330
26331  else
26332    # We're on a posix platform. Hooray! :)
26333    # First separate the path from the arguments. This will split at the first
26334    # space.
26335    complete="$NM"
26336    path="${complete%% *}"
26337    tmp="$complete EOL"
26338    arguments="${tmp#* }"
26339
26340    # Cannot rely on the command "which" here since it doesn't always work.
26341    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26342    if test -z "$is_absolute_path"; then
26343      # Path to executable is not absolute. Find it.
26344      IFS_save="$IFS"
26345      IFS=:
26346      for p in $PATH; do
26347        if test -f "$p/$path" && test -x "$p/$path"; then
26348          new_path="$p/$path"
26349          break
26350        fi
26351      done
26352      IFS="$IFS_save"
26353    else
26354      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26355$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26356      new_path="$path"
26357    fi
26358
26359    if test "x$new_path" = x; then
26360        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26361$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26362        has_space=`$ECHO "$complete" | $GREP " "`
26363        if test "x$has_space" != x; then
26364          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26365$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26366        fi
26367        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26368      fi
26369  fi
26370
26371      # Now join together the path and the arguments once again
26372      if test "x$arguments" != xEOL; then
26373        new_complete="$new_path ${arguments% *}"
26374      else
26375        new_complete="$new_path"
26376      fi
26377
26378  if test "x$complete" != "x$new_complete"; then
26379      NM="$new_complete"
26380      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26381$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26382    fi
26383
26384    if test -n "$ac_tool_prefix"; then
26385  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26386set dummy ${ac_tool_prefix}strip; ac_word=$2
26387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26388$as_echo_n "checking for $ac_word... " >&6; }
26389if ${ac_cv_prog_STRIP+:} false; then :
26390  $as_echo_n "(cached) " >&6
26391else
26392  if test -n "$STRIP"; then
26393  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26394else
26395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26396for as_dir in $PATH
26397do
26398  IFS=$as_save_IFS
26399  test -z "$as_dir" && as_dir=.
26400    for ac_exec_ext in '' $ac_executable_extensions; do
26401  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26402    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26404    break 2
26405  fi
26406done
26407  done
26408IFS=$as_save_IFS
26409
26410fi
26411fi
26412STRIP=$ac_cv_prog_STRIP
26413if test -n "$STRIP"; then
26414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26415$as_echo "$STRIP" >&6; }
26416else
26417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26418$as_echo "no" >&6; }
26419fi
26420
26421
26422fi
26423if test -z "$ac_cv_prog_STRIP"; then
26424  ac_ct_STRIP=$STRIP
26425  # Extract the first word of "strip", so it can be a program name with args.
26426set dummy strip; ac_word=$2
26427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26428$as_echo_n "checking for $ac_word... " >&6; }
26429if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26430  $as_echo_n "(cached) " >&6
26431else
26432  if test -n "$ac_ct_STRIP"; then
26433  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26434else
26435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26436for as_dir in $PATH
26437do
26438  IFS=$as_save_IFS
26439  test -z "$as_dir" && as_dir=.
26440    for ac_exec_ext in '' $ac_executable_extensions; do
26441  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26442    ac_cv_prog_ac_ct_STRIP="strip"
26443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26444    break 2
26445  fi
26446done
26447  done
26448IFS=$as_save_IFS
26449
26450fi
26451fi
26452ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26453if test -n "$ac_ct_STRIP"; then
26454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26455$as_echo "$ac_ct_STRIP" >&6; }
26456else
26457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26458$as_echo "no" >&6; }
26459fi
26460
26461  if test "x$ac_ct_STRIP" = x; then
26462    STRIP=""
26463  else
26464    case $cross_compiling:$ac_tool_warned in
26465yes:)
26466{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26467$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26468ac_tool_warned=yes ;;
26469esac
26470    STRIP=$ac_ct_STRIP
26471  fi
26472else
26473  STRIP="$ac_cv_prog_STRIP"
26474fi
26475
26476
26477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26478
26479  # First separate the path from the arguments. This will split at the first
26480  # space.
26481  complete="$STRIP"
26482  path="${complete%% *}"
26483  tmp="$complete EOL"
26484  arguments="${tmp#* }"
26485
26486  # Input might be given as Windows format, start by converting to
26487  # unix format.
26488  new_path=`$CYGPATH -u "$path"`
26489
26490  # Now try to locate executable using which
26491  new_path=`$WHICH "$new_path" 2> /dev/null`
26492  # bat and cmd files are not always considered executable in cygwin causing which
26493  # to not find them
26494  if test "x$new_path" = x \
26495           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26496           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26497    new_path=`$CYGPATH -u "$path"`
26498  fi
26499  if test "x$new_path" = x; then
26500    # Oops. Which didn't find the executable.
26501    # The splitting of arguments from the executable at a space might have been incorrect,
26502    # since paths with space are more likely in Windows. Give it another try with the whole
26503    # argument.
26504    path="$complete"
26505    arguments="EOL"
26506    new_path=`$CYGPATH -u "$path"`
26507    new_path=`$WHICH "$new_path" 2> /dev/null`
26508    # bat and cmd files are not always considered executable in cygwin causing which
26509    # to not find them
26510    if test "x$new_path" = x \
26511             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26512             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26513      new_path=`$CYGPATH -u "$path"`
26514    fi
26515    if test "x$new_path" = x; then
26516      # It's still not found. Now this is an unrecoverable error.
26517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26518$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26519      has_space=`$ECHO "$complete" | $GREP " "`
26520      if test "x$has_space" != x; then
26521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26523      fi
26524      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26525    fi
26526  fi
26527
26528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26531  # "foo.exe" is OK but "foo" is an error.
26532  #
26533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26534  # It is also a way to make sure we got the proper file name for the real test later on.
26535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26536  if test "x$test_shortpath" = x; then
26537    # Short path failed, file does not exist as specified.
26538    # Try adding .exe or .cmd
26539    if test -f "${new_path}.exe"; then
26540       input_to_shortpath="${new_path}.exe"
26541    elif test -f "${new_path}.cmd"; then
26542       input_to_shortpath="${new_path}.cmd"
26543    else
26544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26545$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26546      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26547$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26548      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26549    fi
26550  else
26551    input_to_shortpath="$new_path"
26552  fi
26553
26554  # Call helper function which possibly converts this using DOS-style short mode.
26555  # If so, the updated path is stored in $new_path.
26556  new_path="$input_to_shortpath"
26557
26558  input_path="$input_to_shortpath"
26559  # Check if we need to convert this using DOS-style short mode. If the path
26560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26561  # take no chances and rewrite it.
26562  # Note: m4 eats our [], so we need to use [ and ] instead.
26563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26564  if test "x$has_forbidden_chars" != x; then
26565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26569      # Going to short mode and back again did indeed matter. Since short mode is
26570      # case insensitive, let's make it lowercase to improve readability.
26571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26572      # Now convert it back to Unix-stile (cygpath)
26573      input_path=`$CYGPATH -u "$shortmode_path"`
26574      new_path="$input_path"
26575    fi
26576  fi
26577
26578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26579  if test "x$test_cygdrive_prefix" = x; then
26580    # As a simple fix, exclude /usr/bin since it's not a real path.
26581    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26583      # a path prefixed by /cygdrive for fixpath to work.
26584      new_path="$CYGWIN_ROOT_PATH$input_path"
26585    fi
26586  fi
26587
26588  # remove trailing .exe if any
26589  new_path="${new_path/%.exe/}"
26590
26591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26592
26593  # First separate the path from the arguments. This will split at the first
26594  # space.
26595  complete="$STRIP"
26596  path="${complete%% *}"
26597  tmp="$complete EOL"
26598  arguments="${tmp#* }"
26599
26600  # Input might be given as Windows format, start by converting to
26601  # unix format.
26602  new_path="$path"
26603
26604  windows_path="$new_path"
26605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26606    unix_path=`$CYGPATH -u "$windows_path"`
26607    new_path="$unix_path"
26608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26610    new_path="$unix_path"
26611  fi
26612
26613
26614  # Now try to locate executable using which
26615  new_path=`$WHICH "$new_path" 2> /dev/null`
26616
26617  if test "x$new_path" = x; then
26618    # Oops. Which didn't find the executable.
26619    # The splitting of arguments from the executable at a space might have been incorrect,
26620    # since paths with space are more likely in Windows. Give it another try with the whole
26621    # argument.
26622    path="$complete"
26623    arguments="EOL"
26624    new_path="$path"
26625
26626  windows_path="$new_path"
26627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26628    unix_path=`$CYGPATH -u "$windows_path"`
26629    new_path="$unix_path"
26630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26632    new_path="$unix_path"
26633  fi
26634
26635
26636    new_path=`$WHICH "$new_path" 2> /dev/null`
26637
26638    if test "x$new_path" = x; then
26639      # It's still not found. Now this is an unrecoverable error.
26640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26641$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26642      has_space=`$ECHO "$complete" | $GREP " "`
26643      if test "x$has_space" != x; then
26644        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26645$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26646      fi
26647      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26648    fi
26649  fi
26650
26651  # Now new_path has a complete unix path to the binary
26652  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26653    # Keep paths in /bin as-is, but remove trailing .exe if any
26654    new_path="${new_path/%.exe/}"
26655    # Do not save /bin paths to all_fixpath_prefixes!
26656  else
26657    # Not in mixed or Windows style, start by that.
26658    new_path=`cmd //c echo $new_path`
26659
26660  input_path="$new_path"
26661  # Check if we need to convert this using DOS-style short mode. If the path
26662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26663  # take no chances and rewrite it.
26664  # Note: m4 eats our [], so we need to use [ and ] instead.
26665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26666  if test "x$has_forbidden_chars" != x; then
26667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26669  fi
26670
26671    # Output is in $new_path
26672
26673  windows_path="$new_path"
26674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26675    unix_path=`$CYGPATH -u "$windows_path"`
26676    new_path="$unix_path"
26677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26679    new_path="$unix_path"
26680  fi
26681
26682    # remove trailing .exe if any
26683    new_path="${new_path/%.exe/}"
26684
26685    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26686    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26687  fi
26688
26689  else
26690    # We're on a posix platform. Hooray! :)
26691    # First separate the path from the arguments. This will split at the first
26692    # space.
26693    complete="$STRIP"
26694    path="${complete%% *}"
26695    tmp="$complete EOL"
26696    arguments="${tmp#* }"
26697
26698    # Cannot rely on the command "which" here since it doesn't always work.
26699    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26700    if test -z "$is_absolute_path"; then
26701      # Path to executable is not absolute. Find it.
26702      IFS_save="$IFS"
26703      IFS=:
26704      for p in $PATH; do
26705        if test -f "$p/$path" && test -x "$p/$path"; then
26706          new_path="$p/$path"
26707          break
26708        fi
26709      done
26710      IFS="$IFS_save"
26711    else
26712      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26713$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26714      new_path="$path"
26715    fi
26716
26717    if test "x$new_path" = x; then
26718        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26719$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26720        has_space=`$ECHO "$complete" | $GREP " "`
26721        if test "x$has_space" != x; then
26722          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26723$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26724        fi
26725        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26726      fi
26727  fi
26728
26729      # Now join together the path and the arguments once again
26730      if test "x$arguments" != xEOL; then
26731        new_complete="$new_path ${arguments% *}"
26732      else
26733        new_complete="$new_path"
26734      fi
26735
26736  if test "x$complete" != "x$new_complete"; then
26737      STRIP="$new_complete"
26738      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26739$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26740    fi
26741
26742fi
26743
26744# objcopy is used for moving debug symbols to separate files when
26745# full debug symbols are enabled.
26746if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26747    if test -n "$ac_tool_prefix"; then
26748  for ac_prog in gobjcopy objcopy
26749  do
26750    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26751set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26753$as_echo_n "checking for $ac_word... " >&6; }
26754if ${ac_cv_prog_OBJCOPY+:} false; then :
26755  $as_echo_n "(cached) " >&6
26756else
26757  if test -n "$OBJCOPY"; then
26758  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26759else
26760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26761for as_dir in $PATH
26762do
26763  IFS=$as_save_IFS
26764  test -z "$as_dir" && as_dir=.
26765    for ac_exec_ext in '' $ac_executable_extensions; do
26766  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26767    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26769    break 2
26770  fi
26771done
26772  done
26773IFS=$as_save_IFS
26774
26775fi
26776fi
26777OBJCOPY=$ac_cv_prog_OBJCOPY
26778if test -n "$OBJCOPY"; then
26779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26780$as_echo "$OBJCOPY" >&6; }
26781else
26782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26783$as_echo "no" >&6; }
26784fi
26785
26786
26787    test -n "$OBJCOPY" && break
26788  done
26789fi
26790if test -z "$OBJCOPY"; then
26791  ac_ct_OBJCOPY=$OBJCOPY
26792  for ac_prog in gobjcopy objcopy
26793do
26794  # Extract the first word of "$ac_prog", so it can be a program name with args.
26795set dummy $ac_prog; ac_word=$2
26796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26797$as_echo_n "checking for $ac_word... " >&6; }
26798if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
26799  $as_echo_n "(cached) " >&6
26800else
26801  if test -n "$ac_ct_OBJCOPY"; then
26802  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26803else
26804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26805for as_dir in $PATH
26806do
26807  IFS=$as_save_IFS
26808  test -z "$as_dir" && as_dir=.
26809    for ac_exec_ext in '' $ac_executable_extensions; do
26810  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26811    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26813    break 2
26814  fi
26815done
26816  done
26817IFS=$as_save_IFS
26818
26819fi
26820fi
26821ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26822if test -n "$ac_ct_OBJCOPY"; then
26823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26824$as_echo "$ac_ct_OBJCOPY" >&6; }
26825else
26826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26827$as_echo "no" >&6; }
26828fi
26829
26830
26831  test -n "$ac_ct_OBJCOPY" && break
26832done
26833
26834  if test "x$ac_ct_OBJCOPY" = x; then
26835    OBJCOPY=""
26836  else
26837    case $cross_compiling:$ac_tool_warned in
26838yes:)
26839{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26840$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26841ac_tool_warned=yes ;;
26842esac
26843    OBJCOPY=$ac_ct_OBJCOPY
26844  fi
26845fi
26846
26847    # Only call fixup if objcopy was found.
26848    if test -n "$OBJCOPY"; then
26849
26850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26851
26852  # First separate the path from the arguments. This will split at the first
26853  # space.
26854  complete="$OBJCOPY"
26855  path="${complete%% *}"
26856  tmp="$complete EOL"
26857  arguments="${tmp#* }"
26858
26859  # Input might be given as Windows format, start by converting to
26860  # unix format.
26861  new_path=`$CYGPATH -u "$path"`
26862
26863  # Now try to locate executable using which
26864  new_path=`$WHICH "$new_path" 2> /dev/null`
26865  # bat and cmd files are not always considered executable in cygwin causing which
26866  # to not find them
26867  if test "x$new_path" = x \
26868           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26869           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26870    new_path=`$CYGPATH -u "$path"`
26871  fi
26872  if test "x$new_path" = x; then
26873    # Oops. Which didn't find the executable.
26874    # The splitting of arguments from the executable at a space might have been incorrect,
26875    # since paths with space are more likely in Windows. Give it another try with the whole
26876    # argument.
26877    path="$complete"
26878    arguments="EOL"
26879    new_path=`$CYGPATH -u "$path"`
26880    new_path=`$WHICH "$new_path" 2> /dev/null`
26881    # bat and cmd files are not always considered executable in cygwin causing which
26882    # to not find them
26883    if test "x$new_path" = x \
26884             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26885             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26886      new_path=`$CYGPATH -u "$path"`
26887    fi
26888    if test "x$new_path" = x; then
26889      # It's still not found. Now this is an unrecoverable error.
26890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26891$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26892      has_space=`$ECHO "$complete" | $GREP " "`
26893      if test "x$has_space" != x; then
26894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26896      fi
26897      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26898    fi
26899  fi
26900
26901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26904  # "foo.exe" is OK but "foo" is an error.
26905  #
26906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26907  # It is also a way to make sure we got the proper file name for the real test later on.
26908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26909  if test "x$test_shortpath" = x; then
26910    # Short path failed, file does not exist as specified.
26911    # Try adding .exe or .cmd
26912    if test -f "${new_path}.exe"; then
26913       input_to_shortpath="${new_path}.exe"
26914    elif test -f "${new_path}.cmd"; then
26915       input_to_shortpath="${new_path}.cmd"
26916    else
26917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26918$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26919      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26920$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26921      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26922    fi
26923  else
26924    input_to_shortpath="$new_path"
26925  fi
26926
26927  # Call helper function which possibly converts this using DOS-style short mode.
26928  # If so, the updated path is stored in $new_path.
26929  new_path="$input_to_shortpath"
26930
26931  input_path="$input_to_shortpath"
26932  # Check if we need to convert this using DOS-style short mode. If the path
26933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26934  # take no chances and rewrite it.
26935  # Note: m4 eats our [], so we need to use [ and ] instead.
26936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26937  if test "x$has_forbidden_chars" != x; then
26938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26942      # Going to short mode and back again did indeed matter. Since short mode is
26943      # case insensitive, let's make it lowercase to improve readability.
26944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26945      # Now convert it back to Unix-stile (cygpath)
26946      input_path=`$CYGPATH -u "$shortmode_path"`
26947      new_path="$input_path"
26948    fi
26949  fi
26950
26951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26952  if test "x$test_cygdrive_prefix" = x; then
26953    # As a simple fix, exclude /usr/bin since it's not a real path.
26954    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26956      # a path prefixed by /cygdrive for fixpath to work.
26957      new_path="$CYGWIN_ROOT_PATH$input_path"
26958    fi
26959  fi
26960
26961  # remove trailing .exe if any
26962  new_path="${new_path/%.exe/}"
26963
26964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26965
26966  # First separate the path from the arguments. This will split at the first
26967  # space.
26968  complete="$OBJCOPY"
26969  path="${complete%% *}"
26970  tmp="$complete EOL"
26971  arguments="${tmp#* }"
26972
26973  # Input might be given as Windows format, start by converting to
26974  # unix format.
26975  new_path="$path"
26976
26977  windows_path="$new_path"
26978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26979    unix_path=`$CYGPATH -u "$windows_path"`
26980    new_path="$unix_path"
26981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26983    new_path="$unix_path"
26984  fi
26985
26986
26987  # Now try to locate executable using which
26988  new_path=`$WHICH "$new_path" 2> /dev/null`
26989
26990  if test "x$new_path" = x; then
26991    # Oops. Which didn't find the executable.
26992    # The splitting of arguments from the executable at a space might have been incorrect,
26993    # since paths with space are more likely in Windows. Give it another try with the whole
26994    # argument.
26995    path="$complete"
26996    arguments="EOL"
26997    new_path="$path"
26998
26999  windows_path="$new_path"
27000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27001    unix_path=`$CYGPATH -u "$windows_path"`
27002    new_path="$unix_path"
27003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27005    new_path="$unix_path"
27006  fi
27007
27008
27009    new_path=`$WHICH "$new_path" 2> /dev/null`
27010
27011    if test "x$new_path" = x; then
27012      # It's still not found. Now this is an unrecoverable error.
27013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27014$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27015      has_space=`$ECHO "$complete" | $GREP " "`
27016      if test "x$has_space" != x; then
27017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27019      fi
27020      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27021    fi
27022  fi
27023
27024  # Now new_path has a complete unix path to the binary
27025  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27026    # Keep paths in /bin as-is, but remove trailing .exe if any
27027    new_path="${new_path/%.exe/}"
27028    # Do not save /bin paths to all_fixpath_prefixes!
27029  else
27030    # Not in mixed or Windows style, start by that.
27031    new_path=`cmd //c echo $new_path`
27032
27033  input_path="$new_path"
27034  # Check if we need to convert this using DOS-style short mode. If the path
27035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27036  # take no chances and rewrite it.
27037  # Note: m4 eats our [], so we need to use [ and ] instead.
27038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27039  if test "x$has_forbidden_chars" != x; then
27040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27042  fi
27043
27044    # Output is in $new_path
27045
27046  windows_path="$new_path"
27047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27048    unix_path=`$CYGPATH -u "$windows_path"`
27049    new_path="$unix_path"
27050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27052    new_path="$unix_path"
27053  fi
27054
27055    # remove trailing .exe if any
27056    new_path="${new_path/%.exe/}"
27057
27058    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27059    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27060  fi
27061
27062  else
27063    # We're on a posix platform. Hooray! :)
27064    # First separate the path from the arguments. This will split at the first
27065    # space.
27066    complete="$OBJCOPY"
27067    path="${complete%% *}"
27068    tmp="$complete EOL"
27069    arguments="${tmp#* }"
27070
27071    # Cannot rely on the command "which" here since it doesn't always work.
27072    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27073    if test -z "$is_absolute_path"; then
27074      # Path to executable is not absolute. Find it.
27075      IFS_save="$IFS"
27076      IFS=:
27077      for p in $PATH; do
27078        if test -f "$p/$path" && test -x "$p/$path"; then
27079          new_path="$p/$path"
27080          break
27081        fi
27082      done
27083      IFS="$IFS_save"
27084    else
27085      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27086$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27087      new_path="$path"
27088    fi
27089
27090    if test "x$new_path" = x; then
27091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27092$as_echo "$as_me: The path of OBJCOPY, 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}: This might be caused by spaces in the path, which is not allowed." >&5
27096$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27097        fi
27098        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27099      fi
27100  fi
27101
27102      # Now join together the path and the arguments once again
27103      if test "x$arguments" != xEOL; then
27104        new_complete="$new_path ${arguments% *}"
27105      else
27106        new_complete="$new_path"
27107      fi
27108
27109  if test "x$complete" != "x$new_complete"; then
27110      OBJCOPY="$new_complete"
27111      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27112$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27113    fi
27114
27115    fi
27116fi
27117
27118if test -n "$ac_tool_prefix"; then
27119  for ac_prog in gobjdump objdump
27120  do
27121    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27122set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27124$as_echo_n "checking for $ac_word... " >&6; }
27125if ${ac_cv_prog_OBJDUMP+:} false; then :
27126  $as_echo_n "(cached) " >&6
27127else
27128  if test -n "$OBJDUMP"; then
27129  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27130else
27131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27132for as_dir in $PATH
27133do
27134  IFS=$as_save_IFS
27135  test -z "$as_dir" && as_dir=.
27136    for ac_exec_ext in '' $ac_executable_extensions; do
27137  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27138    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27140    break 2
27141  fi
27142done
27143  done
27144IFS=$as_save_IFS
27145
27146fi
27147fi
27148OBJDUMP=$ac_cv_prog_OBJDUMP
27149if test -n "$OBJDUMP"; then
27150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27151$as_echo "$OBJDUMP" >&6; }
27152else
27153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27154$as_echo "no" >&6; }
27155fi
27156
27157
27158    test -n "$OBJDUMP" && break
27159  done
27160fi
27161if test -z "$OBJDUMP"; then
27162  ac_ct_OBJDUMP=$OBJDUMP
27163  for ac_prog in gobjdump objdump
27164do
27165  # Extract the first word of "$ac_prog", so it can be a program name with args.
27166set dummy $ac_prog; ac_word=$2
27167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27168$as_echo_n "checking for $ac_word... " >&6; }
27169if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27170  $as_echo_n "(cached) " >&6
27171else
27172  if test -n "$ac_ct_OBJDUMP"; then
27173  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27174else
27175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27176for as_dir in $PATH
27177do
27178  IFS=$as_save_IFS
27179  test -z "$as_dir" && as_dir=.
27180    for ac_exec_ext in '' $ac_executable_extensions; do
27181  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27182    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27184    break 2
27185  fi
27186done
27187  done
27188IFS=$as_save_IFS
27189
27190fi
27191fi
27192ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27193if test -n "$ac_ct_OBJDUMP"; then
27194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27195$as_echo "$ac_ct_OBJDUMP" >&6; }
27196else
27197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27198$as_echo "no" >&6; }
27199fi
27200
27201
27202  test -n "$ac_ct_OBJDUMP" && break
27203done
27204
27205  if test "x$ac_ct_OBJDUMP" = x; then
27206    OBJDUMP=""
27207  else
27208    case $cross_compiling:$ac_tool_warned in
27209yes:)
27210{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27211$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27212ac_tool_warned=yes ;;
27213esac
27214    OBJDUMP=$ac_ct_OBJDUMP
27215  fi
27216fi
27217
27218if test "x$OBJDUMP" != x; then
27219  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27220
27221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27222
27223  # First separate the path from the arguments. This will split at the first
27224  # space.
27225  complete="$OBJDUMP"
27226  path="${complete%% *}"
27227  tmp="$complete EOL"
27228  arguments="${tmp#* }"
27229
27230  # Input might be given as Windows format, start by converting to
27231  # unix format.
27232  new_path=`$CYGPATH -u "$path"`
27233
27234  # Now try to locate executable using which
27235  new_path=`$WHICH "$new_path" 2> /dev/null`
27236  # bat and cmd files are not always considered executable in cygwin causing which
27237  # to not find them
27238  if test "x$new_path" = x \
27239           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27240           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27241    new_path=`$CYGPATH -u "$path"`
27242  fi
27243  if test "x$new_path" = x; then
27244    # Oops. Which didn't find the executable.
27245    # The splitting of arguments from the executable at a space might have been incorrect,
27246    # since paths with space are more likely in Windows. Give it another try with the whole
27247    # argument.
27248    path="$complete"
27249    arguments="EOL"
27250    new_path=`$CYGPATH -u "$path"`
27251    new_path=`$WHICH "$new_path" 2> /dev/null`
27252    # bat and cmd files are not always considered executable in cygwin causing which
27253    # to not find them
27254    if test "x$new_path" = x \
27255             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27256             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27257      new_path=`$CYGPATH -u "$path"`
27258    fi
27259    if test "x$new_path" = x; then
27260      # It's still not found. Now this is an unrecoverable error.
27261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27262$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27263      has_space=`$ECHO "$complete" | $GREP " "`
27264      if test "x$has_space" != x; then
27265        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27266$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27267      fi
27268      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27269    fi
27270  fi
27271
27272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27275  # "foo.exe" is OK but "foo" is an error.
27276  #
27277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27278  # It is also a way to make sure we got the proper file name for the real test later on.
27279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27280  if test "x$test_shortpath" = x; then
27281    # Short path failed, file does not exist as specified.
27282    # Try adding .exe or .cmd
27283    if test -f "${new_path}.exe"; then
27284       input_to_shortpath="${new_path}.exe"
27285    elif test -f "${new_path}.cmd"; then
27286       input_to_shortpath="${new_path}.cmd"
27287    else
27288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27289$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27290      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27291$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27292      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27293    fi
27294  else
27295    input_to_shortpath="$new_path"
27296  fi
27297
27298  # Call helper function which possibly converts this using DOS-style short mode.
27299  # If so, the updated path is stored in $new_path.
27300  new_path="$input_to_shortpath"
27301
27302  input_path="$input_to_shortpath"
27303  # Check if we need to convert this using DOS-style short mode. If the path
27304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27305  # take no chances and rewrite it.
27306  # Note: m4 eats our [], so we need to use [ and ] instead.
27307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27308  if test "x$has_forbidden_chars" != x; then
27309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27313      # Going to short mode and back again did indeed matter. Since short mode is
27314      # case insensitive, let's make it lowercase to improve readability.
27315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27316      # Now convert it back to Unix-stile (cygpath)
27317      input_path=`$CYGPATH -u "$shortmode_path"`
27318      new_path="$input_path"
27319    fi
27320  fi
27321
27322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27323  if test "x$test_cygdrive_prefix" = x; then
27324    # As a simple fix, exclude /usr/bin since it's not a real path.
27325    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27327      # a path prefixed by /cygdrive for fixpath to work.
27328      new_path="$CYGWIN_ROOT_PATH$input_path"
27329    fi
27330  fi
27331
27332  # remove trailing .exe if any
27333  new_path="${new_path/%.exe/}"
27334
27335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27336
27337  # First separate the path from the arguments. This will split at the first
27338  # space.
27339  complete="$OBJDUMP"
27340  path="${complete%% *}"
27341  tmp="$complete EOL"
27342  arguments="${tmp#* }"
27343
27344  # Input might be given as Windows format, start by converting to
27345  # unix format.
27346  new_path="$path"
27347
27348  windows_path="$new_path"
27349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27350    unix_path=`$CYGPATH -u "$windows_path"`
27351    new_path="$unix_path"
27352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27354    new_path="$unix_path"
27355  fi
27356
27357
27358  # Now try to locate executable using which
27359  new_path=`$WHICH "$new_path" 2> /dev/null`
27360
27361  if test "x$new_path" = x; then
27362    # Oops. Which didn't find the executable.
27363    # The splitting of arguments from the executable at a space might have been incorrect,
27364    # since paths with space are more likely in Windows. Give it another try with the whole
27365    # argument.
27366    path="$complete"
27367    arguments="EOL"
27368    new_path="$path"
27369
27370  windows_path="$new_path"
27371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27372    unix_path=`$CYGPATH -u "$windows_path"`
27373    new_path="$unix_path"
27374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27376    new_path="$unix_path"
27377  fi
27378
27379
27380    new_path=`$WHICH "$new_path" 2> /dev/null`
27381
27382    if test "x$new_path" = x; then
27383      # It's still not found. Now this is an unrecoverable error.
27384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27385$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27386      has_space=`$ECHO "$complete" | $GREP " "`
27387      if test "x$has_space" != x; then
27388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27390      fi
27391      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27392    fi
27393  fi
27394
27395  # Now new_path has a complete unix path to the binary
27396  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27397    # Keep paths in /bin as-is, but remove trailing .exe if any
27398    new_path="${new_path/%.exe/}"
27399    # Do not save /bin paths to all_fixpath_prefixes!
27400  else
27401    # Not in mixed or Windows style, start by that.
27402    new_path=`cmd //c echo $new_path`
27403
27404  input_path="$new_path"
27405  # Check if we need to convert this using DOS-style short mode. If the path
27406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27407  # take no chances and rewrite it.
27408  # Note: m4 eats our [], so we need to use [ and ] instead.
27409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27410  if test "x$has_forbidden_chars" != x; then
27411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27413  fi
27414
27415    # Output is in $new_path
27416
27417  windows_path="$new_path"
27418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27419    unix_path=`$CYGPATH -u "$windows_path"`
27420    new_path="$unix_path"
27421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27423    new_path="$unix_path"
27424  fi
27425
27426    # remove trailing .exe if any
27427    new_path="${new_path/%.exe/}"
27428
27429    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27430    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27431  fi
27432
27433  else
27434    # We're on a posix platform. Hooray! :)
27435    # First separate the path from the arguments. This will split at the first
27436    # space.
27437    complete="$OBJDUMP"
27438    path="${complete%% *}"
27439    tmp="$complete EOL"
27440    arguments="${tmp#* }"
27441
27442    # Cannot rely on the command "which" here since it doesn't always work.
27443    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27444    if test -z "$is_absolute_path"; then
27445      # Path to executable is not absolute. Find it.
27446      IFS_save="$IFS"
27447      IFS=:
27448      for p in $PATH; do
27449        if test -f "$p/$path" && test -x "$p/$path"; then
27450          new_path="$p/$path"
27451          break
27452        fi
27453      done
27454      IFS="$IFS_save"
27455    else
27456      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27457$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27458      new_path="$path"
27459    fi
27460
27461    if test "x$new_path" = x; then
27462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27463$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27464        has_space=`$ECHO "$complete" | $GREP " "`
27465        if test "x$has_space" != x; then
27466          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27467$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27468        fi
27469        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27470      fi
27471  fi
27472
27473      # Now join together the path and the arguments once again
27474      if test "x$arguments" != xEOL; then
27475        new_complete="$new_path ${arguments% *}"
27476      else
27477        new_complete="$new_path"
27478      fi
27479
27480  if test "x$complete" != "x$new_complete"; then
27481      OBJDUMP="$new_complete"
27482      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27483$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27484    fi
27485
27486fi
27487
27488if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27489   # Extract the first word of "lipo", so it can be a program name with args.
27490set dummy lipo; ac_word=$2
27491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27492$as_echo_n "checking for $ac_word... " >&6; }
27493if ${ac_cv_path_LIPO+:} false; then :
27494  $as_echo_n "(cached) " >&6
27495else
27496  case $LIPO in
27497  [\\/]* | ?:[\\/]*)
27498  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27499  ;;
27500  *)
27501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27502for as_dir in $PATH
27503do
27504  IFS=$as_save_IFS
27505  test -z "$as_dir" && as_dir=.
27506    for ac_exec_ext in '' $ac_executable_extensions; do
27507  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27508    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27510    break 2
27511  fi
27512done
27513  done
27514IFS=$as_save_IFS
27515
27516  ;;
27517esac
27518fi
27519LIPO=$ac_cv_path_LIPO
27520if test -n "$LIPO"; then
27521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27522$as_echo "$LIPO" >&6; }
27523else
27524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27525$as_echo "no" >&6; }
27526fi
27527
27528
27529
27530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27531
27532  # First separate the path from the arguments. This will split at the first
27533  # space.
27534  complete="$LIPO"
27535  path="${complete%% *}"
27536  tmp="$complete EOL"
27537  arguments="${tmp#* }"
27538
27539  # Input might be given as Windows format, start by converting to
27540  # unix format.
27541  new_path=`$CYGPATH -u "$path"`
27542
27543  # Now try to locate executable using which
27544  new_path=`$WHICH "$new_path" 2> /dev/null`
27545  # bat and cmd files are not always considered executable in cygwin causing which
27546  # to not find them
27547  if test "x$new_path" = x \
27548           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27549           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27550    new_path=`$CYGPATH -u "$path"`
27551  fi
27552  if test "x$new_path" = x; then
27553    # Oops. Which didn't find the executable.
27554    # The splitting of arguments from the executable at a space might have been incorrect,
27555    # since paths with space are more likely in Windows. Give it another try with the whole
27556    # argument.
27557    path="$complete"
27558    arguments="EOL"
27559    new_path=`$CYGPATH -u "$path"`
27560    new_path=`$WHICH "$new_path" 2> /dev/null`
27561    # bat and cmd files are not always considered executable in cygwin causing which
27562    # to not find them
27563    if test "x$new_path" = x \
27564             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27565             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27566      new_path=`$CYGPATH -u "$path"`
27567    fi
27568    if test "x$new_path" = x; then
27569      # It's still not found. Now this is an unrecoverable error.
27570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27571$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27572      has_space=`$ECHO "$complete" | $GREP " "`
27573      if test "x$has_space" != x; then
27574        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27575$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27576      fi
27577      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27578    fi
27579  fi
27580
27581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27584  # "foo.exe" is OK but "foo" is an error.
27585  #
27586  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27587  # It is also a way to make sure we got the proper file name for the real test later on.
27588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27589  if test "x$test_shortpath" = x; then
27590    # Short path failed, file does not exist as specified.
27591    # Try adding .exe or .cmd
27592    if test -f "${new_path}.exe"; then
27593       input_to_shortpath="${new_path}.exe"
27594    elif test -f "${new_path}.cmd"; then
27595       input_to_shortpath="${new_path}.cmd"
27596    else
27597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27598$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27599      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27600$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27601      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27602    fi
27603  else
27604    input_to_shortpath="$new_path"
27605  fi
27606
27607  # Call helper function which possibly converts this using DOS-style short mode.
27608  # If so, the updated path is stored in $new_path.
27609  new_path="$input_to_shortpath"
27610
27611  input_path="$input_to_shortpath"
27612  # Check if we need to convert this using DOS-style short mode. If the path
27613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27614  # take no chances and rewrite it.
27615  # Note: m4 eats our [], so we need to use [ and ] instead.
27616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27617  if test "x$has_forbidden_chars" != x; then
27618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27622      # Going to short mode and back again did indeed matter. Since short mode is
27623      # case insensitive, let's make it lowercase to improve readability.
27624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27625      # Now convert it back to Unix-stile (cygpath)
27626      input_path=`$CYGPATH -u "$shortmode_path"`
27627      new_path="$input_path"
27628    fi
27629  fi
27630
27631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27632  if test "x$test_cygdrive_prefix" = x; then
27633    # As a simple fix, exclude /usr/bin since it's not a real path.
27634    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27636      # a path prefixed by /cygdrive for fixpath to work.
27637      new_path="$CYGWIN_ROOT_PATH$input_path"
27638    fi
27639  fi
27640
27641  # remove trailing .exe if any
27642  new_path="${new_path/%.exe/}"
27643
27644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27645
27646  # First separate the path from the arguments. This will split at the first
27647  # space.
27648  complete="$LIPO"
27649  path="${complete%% *}"
27650  tmp="$complete EOL"
27651  arguments="${tmp#* }"
27652
27653  # Input might be given as Windows format, start by converting to
27654  # unix format.
27655  new_path="$path"
27656
27657  windows_path="$new_path"
27658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27659    unix_path=`$CYGPATH -u "$windows_path"`
27660    new_path="$unix_path"
27661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27663    new_path="$unix_path"
27664  fi
27665
27666
27667  # Now try to locate executable using which
27668  new_path=`$WHICH "$new_path" 2> /dev/null`
27669
27670  if test "x$new_path" = x; then
27671    # Oops. Which didn't find the executable.
27672    # The splitting of arguments from the executable at a space might have been incorrect,
27673    # since paths with space are more likely in Windows. Give it another try with the whole
27674    # argument.
27675    path="$complete"
27676    arguments="EOL"
27677    new_path="$path"
27678
27679  windows_path="$new_path"
27680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27681    unix_path=`$CYGPATH -u "$windows_path"`
27682    new_path="$unix_path"
27683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27685    new_path="$unix_path"
27686  fi
27687
27688
27689    new_path=`$WHICH "$new_path" 2> /dev/null`
27690
27691    if test "x$new_path" = x; then
27692      # It's still not found. Now this is an unrecoverable error.
27693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27694$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27695      has_space=`$ECHO "$complete" | $GREP " "`
27696      if test "x$has_space" != x; then
27697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27699      fi
27700      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27701    fi
27702  fi
27703
27704  # Now new_path has a complete unix path to the binary
27705  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27706    # Keep paths in /bin as-is, but remove trailing .exe if any
27707    new_path="${new_path/%.exe/}"
27708    # Do not save /bin paths to all_fixpath_prefixes!
27709  else
27710    # Not in mixed or Windows style, start by that.
27711    new_path=`cmd //c echo $new_path`
27712
27713  input_path="$new_path"
27714  # Check if we need to convert this using DOS-style short mode. If the path
27715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27716  # take no chances and rewrite it.
27717  # Note: m4 eats our [], so we need to use [ and ] instead.
27718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27719  if test "x$has_forbidden_chars" != x; then
27720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27722  fi
27723
27724    # Output is in $new_path
27725
27726  windows_path="$new_path"
27727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27728    unix_path=`$CYGPATH -u "$windows_path"`
27729    new_path="$unix_path"
27730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27732    new_path="$unix_path"
27733  fi
27734
27735    # remove trailing .exe if any
27736    new_path="${new_path/%.exe/}"
27737
27738    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27739    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27740  fi
27741
27742  else
27743    # We're on a posix platform. Hooray! :)
27744    # First separate the path from the arguments. This will split at the first
27745    # space.
27746    complete="$LIPO"
27747    path="${complete%% *}"
27748    tmp="$complete EOL"
27749    arguments="${tmp#* }"
27750
27751    # Cannot rely on the command "which" here since it doesn't always work.
27752    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27753    if test -z "$is_absolute_path"; then
27754      # Path to executable is not absolute. Find it.
27755      IFS_save="$IFS"
27756      IFS=:
27757      for p in $PATH; do
27758        if test -f "$p/$path" && test -x "$p/$path"; then
27759          new_path="$p/$path"
27760          break
27761        fi
27762      done
27763      IFS="$IFS_save"
27764    else
27765      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27766$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27767      new_path="$path"
27768    fi
27769
27770    if test "x$new_path" = x; then
27771        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27772$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27773        has_space=`$ECHO "$complete" | $GREP " "`
27774        if test "x$has_space" != x; then
27775          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27776$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27777        fi
27778        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27779      fi
27780  fi
27781
27782      # Now join together the path and the arguments once again
27783      if test "x$arguments" != xEOL; then
27784        new_complete="$new_path ${arguments% *}"
27785      else
27786        new_complete="$new_path"
27787      fi
27788
27789  if test "x$complete" != "x$new_complete"; then
27790      LIPO="$new_complete"
27791      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27792$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27793    fi
27794
27795fi
27796
27797# Restore old path without tools dir
27798PATH="$OLD_PATH"
27799
27800
27801# FIXME: Currently we must test this after paths but before flags. Fix!
27802
27803# And we can test some aspects on the target using configure macros.
27804
27805
27806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27807$as_echo_n "checking for ANSI C header files... " >&6; }
27808if ${ac_cv_header_stdc+:} false; then :
27809  $as_echo_n "(cached) " >&6
27810else
27811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27812/* end confdefs.h.  */
27813#include <stdlib.h>
27814#include <stdarg.h>
27815#include <string.h>
27816#include <float.h>
27817
27818int
27819main ()
27820{
27821
27822  ;
27823  return 0;
27824}
27825_ACEOF
27826if ac_fn_cxx_try_compile "$LINENO"; then :
27827  ac_cv_header_stdc=yes
27828else
27829  ac_cv_header_stdc=no
27830fi
27831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27832
27833if test $ac_cv_header_stdc = yes; then
27834  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27835  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27836/* end confdefs.h.  */
27837#include <string.h>
27838
27839_ACEOF
27840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27841  $EGREP "memchr" >/dev/null 2>&1; then :
27842
27843else
27844  ac_cv_header_stdc=no
27845fi
27846rm -f conftest*
27847
27848fi
27849
27850if test $ac_cv_header_stdc = yes; then
27851  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27853/* end confdefs.h.  */
27854#include <stdlib.h>
27855
27856_ACEOF
27857if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27858  $EGREP "free" >/dev/null 2>&1; then :
27859
27860else
27861  ac_cv_header_stdc=no
27862fi
27863rm -f conftest*
27864
27865fi
27866
27867if test $ac_cv_header_stdc = yes; then
27868  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27869  if test "$cross_compiling" = yes; then :
27870  :
27871else
27872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27873/* end confdefs.h.  */
27874#include <ctype.h>
27875#include <stdlib.h>
27876#if ((' ' & 0x0FF) == 0x020)
27877# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27878# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27879#else
27880# define ISLOWER(c) \
27881		   (('a' <= (c) && (c) <= 'i') \
27882		     || ('j' <= (c) && (c) <= 'r') \
27883		     || ('s' <= (c) && (c) <= 'z'))
27884# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27885#endif
27886
27887#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27888int
27889main ()
27890{
27891  int i;
27892  for (i = 0; i < 256; i++)
27893    if (XOR (islower (i), ISLOWER (i))
27894	|| toupper (i) != TOUPPER (i))
27895      return 2;
27896  return 0;
27897}
27898_ACEOF
27899if ac_fn_cxx_try_run "$LINENO"; then :
27900
27901else
27902  ac_cv_header_stdc=no
27903fi
27904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27905  conftest.$ac_objext conftest.beam conftest.$ac_ext
27906fi
27907
27908fi
27909fi
27910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27911$as_echo "$ac_cv_header_stdc" >&6; }
27912if test $ac_cv_header_stdc = yes; then
27913
27914$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27915
27916fi
27917
27918# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27919for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27920		  inttypes.h stdint.h unistd.h
27921do :
27922  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27923ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27924"
27925if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27926  cat >>confdefs.h <<_ACEOF
27927#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27928_ACEOF
27929
27930fi
27931
27932done
27933
27934
27935
27936###############################################################################
27937#
27938# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27939# (The JVM can use 32 or 64 bit Java pointers but that decision
27940# is made at runtime.)
27941#
27942if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27943  # Always specify -m flags on Solaris
27944
27945  # keep track of c/cxx flags that we added outselves...
27946  #   to prevent emitting warning...
27947  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27948  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27949  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27950
27951  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27952  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27953  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27954
27955  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27956  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27957  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27958
27959elif test "x$COMPILE_TYPE" = xreduced; then
27960  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27961    # Specify -m if running reduced on other Posix platforms
27962
27963  # keep track of c/cxx flags that we added outselves...
27964  #   to prevent emitting warning...
27965  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27966  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27967  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27968
27969  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27970  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27971  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27972
27973  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27974  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27975  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27976
27977  fi
27978fi
27979
27980# Make compilation sanity check
27981for ac_header in stdio.h
27982do :
27983  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27984if test "x$ac_cv_header_stdio_h" = xyes; then :
27985  cat >>confdefs.h <<_ACEOF
27986#define HAVE_STDIO_H 1
27987_ACEOF
27988
27989else
27990
27991  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27992$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27993  if test "x$COMPILE_TYPE" = xreduced; then
27994    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27995$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27996  elif test "x$COMPILE_TYPE" = xcross; then
27997    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27998$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27999  fi
28000  as_fn_error $? "Cannot continue." "$LINENO" 5
28001
28002fi
28003
28004done
28005
28006
28007# The cast to long int works around a bug in the HP C Compiler
28008# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28009# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28010# This bug is HP SR number 8606223364.
28011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28012$as_echo_n "checking size of int *... " >&6; }
28013if ${ac_cv_sizeof_int_p+:} false; then :
28014  $as_echo_n "(cached) " >&6
28015else
28016  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28017
28018else
28019  if test "$ac_cv_type_int_p" = yes; then
28020     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28022as_fn_error 77 "cannot compute sizeof (int *)
28023See \`config.log' for more details" "$LINENO" 5; }
28024   else
28025     ac_cv_sizeof_int_p=0
28026   fi
28027fi
28028
28029fi
28030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28031$as_echo "$ac_cv_sizeof_int_p" >&6; }
28032
28033
28034
28035cat >>confdefs.h <<_ACEOF
28036#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28037_ACEOF
28038
28039
28040
28041if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28042  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28043  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28044fi
28045
28046if test "x$SIZEOF_INT_P" = x; then
28047    # The test failed, lets stick to the assumed value.
28048    { $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
28049$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28050else
28051    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28052
28053    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28054        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
28055    fi
28056fi
28057
28058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28059$as_echo_n "checking for target address size... " >&6; }
28060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28061$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28062
28063
28064###############################################################################
28065#
28066# Is the target little of big endian?
28067#
28068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28069$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28070if ${ac_cv_c_bigendian+:} false; then :
28071  $as_echo_n "(cached) " >&6
28072else
28073  ac_cv_c_bigendian=unknown
28074    # See if we're dealing with a universal compiler.
28075    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28076/* end confdefs.h.  */
28077#ifndef __APPLE_CC__
28078	       not a universal capable compiler
28079	     #endif
28080	     typedef int dummy;
28081
28082_ACEOF
28083if ac_fn_cxx_try_compile "$LINENO"; then :
28084
28085	# Check for potential -arch flags.  It is not universal unless
28086	# there are at least two -arch flags with different values.
28087	ac_arch=
28088	ac_prev=
28089	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28090	 if test -n "$ac_prev"; then
28091	   case $ac_word in
28092	     i?86 | x86_64 | ppc | ppc64)
28093	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28094		 ac_arch=$ac_word
28095	       else
28096		 ac_cv_c_bigendian=universal
28097		 break
28098	       fi
28099	       ;;
28100	   esac
28101	   ac_prev=
28102	 elif test "x$ac_word" = "x-arch"; then
28103	   ac_prev=arch
28104	 fi
28105       done
28106fi
28107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28108    if test $ac_cv_c_bigendian = unknown; then
28109      # See if sys/param.h defines the BYTE_ORDER macro.
28110      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28111/* end confdefs.h.  */
28112#include <sys/types.h>
28113	     #include <sys/param.h>
28114
28115int
28116main ()
28117{
28118#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28119		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28120		     && LITTLE_ENDIAN)
28121	      bogus endian macros
28122	     #endif
28123
28124  ;
28125  return 0;
28126}
28127_ACEOF
28128if ac_fn_cxx_try_compile "$LINENO"; then :
28129  # It does; now see whether it defined to BIG_ENDIAN or not.
28130	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28131/* end confdefs.h.  */
28132#include <sys/types.h>
28133		#include <sys/param.h>
28134
28135int
28136main ()
28137{
28138#if BYTE_ORDER != BIG_ENDIAN
28139		 not big endian
28140		#endif
28141
28142  ;
28143  return 0;
28144}
28145_ACEOF
28146if ac_fn_cxx_try_compile "$LINENO"; then :
28147  ac_cv_c_bigendian=yes
28148else
28149  ac_cv_c_bigendian=no
28150fi
28151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28152fi
28153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28154    fi
28155    if test $ac_cv_c_bigendian = unknown; then
28156      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28157      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28158/* end confdefs.h.  */
28159#include <limits.h>
28160
28161int
28162main ()
28163{
28164#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28165	      bogus endian macros
28166	     #endif
28167
28168  ;
28169  return 0;
28170}
28171_ACEOF
28172if ac_fn_cxx_try_compile "$LINENO"; then :
28173  # It does; now see whether it defined to _BIG_ENDIAN or not.
28174	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28175/* end confdefs.h.  */
28176#include <limits.h>
28177
28178int
28179main ()
28180{
28181#ifndef _BIG_ENDIAN
28182		 not big endian
28183		#endif
28184
28185  ;
28186  return 0;
28187}
28188_ACEOF
28189if ac_fn_cxx_try_compile "$LINENO"; then :
28190  ac_cv_c_bigendian=yes
28191else
28192  ac_cv_c_bigendian=no
28193fi
28194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28195fi
28196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28197    fi
28198    if test $ac_cv_c_bigendian = unknown; then
28199      # Compile a test program.
28200      if test "$cross_compiling" = yes; then :
28201  # Try to guess by grepping values from an object file.
28202	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28203/* end confdefs.h.  */
28204short int ascii_mm[] =
28205		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28206		short int ascii_ii[] =
28207		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28208		int use_ascii (int i) {
28209		  return ascii_mm[i] + ascii_ii[i];
28210		}
28211		short int ebcdic_ii[] =
28212		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28213		short int ebcdic_mm[] =
28214		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28215		int use_ebcdic (int i) {
28216		  return ebcdic_mm[i] + ebcdic_ii[i];
28217		}
28218		extern int foo;
28219
28220int
28221main ()
28222{
28223return use_ascii (foo) == use_ebcdic (foo);
28224  ;
28225  return 0;
28226}
28227_ACEOF
28228if ac_fn_cxx_try_compile "$LINENO"; then :
28229  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28230	      ac_cv_c_bigendian=yes
28231	    fi
28232	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28233	      if test "$ac_cv_c_bigendian" = unknown; then
28234		ac_cv_c_bigendian=no
28235	      else
28236		# finding both strings is unlikely to happen, but who knows?
28237		ac_cv_c_bigendian=unknown
28238	      fi
28239	    fi
28240fi
28241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28242else
28243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28244/* end confdefs.h.  */
28245$ac_includes_default
28246int
28247main ()
28248{
28249
28250	     /* Are we little or big endian?  From Harbison&Steele.  */
28251	     union
28252	     {
28253	       long int l;
28254	       char c[sizeof (long int)];
28255	     } u;
28256	     u.l = 1;
28257	     return u.c[sizeof (long int) - 1] == 1;
28258
28259  ;
28260  return 0;
28261}
28262_ACEOF
28263if ac_fn_cxx_try_run "$LINENO"; then :
28264  ac_cv_c_bigendian=no
28265else
28266  ac_cv_c_bigendian=yes
28267fi
28268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28269  conftest.$ac_objext conftest.beam conftest.$ac_ext
28270fi
28271
28272    fi
28273fi
28274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28275$as_echo "$ac_cv_c_bigendian" >&6; }
28276 case $ac_cv_c_bigendian in #(
28277   yes)
28278     ENDIAN="big";; #(
28279   no)
28280     ENDIAN="little" ;; #(
28281   universal)
28282     ENDIAN="universal_endianness"
28283     ;; #(
28284   *)
28285     ENDIAN="unknown" ;;
28286 esac
28287
28288
28289if test "x$ENDIAN" = xuniversal_endianness; then
28290    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28291fi
28292if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28293    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
28294fi
28295
28296
28297# Configure flags for the tools
28298
28299
28300###############################################################################
28301#
28302# How to compile shared libraries.
28303#
28304
28305if test "x$GCC" = xyes; then
28306    COMPILER_NAME=gcc
28307    PICFLAG="-fPIC"
28308    LIBRARY_PREFIX=lib
28309    SHARED_LIBRARY='lib$1.so'
28310    STATIC_LIBRARY='lib$1.a'
28311    SHARED_LIBRARY_FLAGS="-shared"
28312    SHARED_LIBRARY_SUFFIX='.so'
28313    STATIC_LIBRARY_SUFFIX='.a'
28314    OBJ_SUFFIX='.o'
28315    EXE_SUFFIX=''
28316    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28317    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28318    C_FLAG_REORDER=''
28319    CXX_FLAG_REORDER=''
28320    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28321    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28322    LD="$CC"
28323    LDEXE="$CC"
28324    LDCXX="$CXX"
28325    LDEXECXX="$CXX"
28326    POST_STRIP_CMD="$STRIP -g"
28327
28328    # Linking is different on MacOSX
28329    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28330        # Might change in the future to clang.
28331        COMPILER_NAME=gcc
28332        SHARED_LIBRARY='lib$1.dylib'
28333        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28334        SHARED_LIBRARY_SUFFIX='.dylib'
28335        EXE_SUFFIX=''
28336        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28337        SET_SHARED_LIBRARY_MAPFILE=''
28338        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28339        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28340        POST_STRIP_CMD="$STRIP -S"
28341    fi
28342else
28343    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28344        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28345        COMPILER_NAME=ossc
28346        PICFLAG="-KPIC"
28347        LIBRARY_PREFIX=lib
28348        SHARED_LIBRARY='lib$1.so'
28349        STATIC_LIBRARY='lib$1.a'
28350        SHARED_LIBRARY_FLAGS="-G"
28351        SHARED_LIBRARY_SUFFIX='.so'
28352        STATIC_LIBRARY_SUFFIX='.a'
28353        OBJ_SUFFIX='.o'
28354        EXE_SUFFIX=''
28355        SET_SHARED_LIBRARY_NAME=''
28356        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28357	C_FLAG_REORDER='-xF'
28358	CXX_FLAG_REORDER='-xF'
28359        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28360        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28361        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28362        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28363        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28364        POST_STRIP_CMD="$STRIP -x"
28365        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28366    fi
28367    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28368        # If it is not gcc, then assume it is the MS Visual Studio compiler
28369        COMPILER_NAME=cl
28370        PICFLAG=""
28371        LIBRARY_PREFIX=
28372        SHARED_LIBRARY='$1.dll'
28373        STATIC_LIBRARY='$1.lib'
28374        SHARED_LIBRARY_FLAGS="-LD"
28375        SHARED_LIBRARY_SUFFIX='.dll'
28376        STATIC_LIBRARY_SUFFIX='.lib'
28377        OBJ_SUFFIX='.obj'
28378        EXE_SUFFIX='.exe'
28379        SET_SHARED_LIBRARY_NAME=''
28380        SET_SHARED_LIBRARY_MAPFILE=''
28381        SET_SHARED_LIBRARY_ORIGIN=''
28382        SET_EXECUTABLE_ORIGIN=''
28383    fi
28384fi
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403# The (cross) compiler is now configured, we can now test capabilities
28404# of the target platform.
28405
28406
28407
28408###############################################################################
28409#
28410# Setup the opt flags for different compilers
28411# and different operating systems.
28412#
28413
28414#
28415# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28416#
28417if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28418    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28419    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28420    CFLAGS="$CFLAGS -mstackrealign"
28421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28422$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28423    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28424/* end confdefs.h.  */
28425int main() { return 0; }
28426_ACEOF
28427if ac_fn_cxx_try_link "$LINENO"; then :
28428
28429		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28430$as_echo "yes" >&6; }
28431
28432else
28433
28434		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28435$as_echo "no" >&6; }
28436	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28437
28438fi
28439rm -f core conftest.err conftest.$ac_objext \
28440    conftest$ac_exeext conftest.$ac_ext
28441fi
28442
28443C_FLAG_DEPS="-MMD -MF"
28444CXX_FLAG_DEPS="-MMD -MF"
28445
28446case $COMPILER_TYPE in
28447  CC )
28448    D_FLAG="-g"
28449    case $COMPILER_NAME in
28450      gcc )
28451      	case $OPENJDK_TARGET_OS in
28452	  macosx )
28453	    # On MacOSX we optimize for size, something
28454	    # we should do for all platforms?
28455	    C_O_FLAG_HI="-Os"
28456	    C_O_FLAG_NORM="-Os"
28457	    C_O_FLAG_NONE=""
28458	    ;;
28459	  *)
28460	    C_O_FLAG_HI="-O3"
28461	    C_O_FLAG_NORM="-O2"
28462	    C_O_FLAG_NONE="-O0"
28463	    CFLAGS_DEBUG_SYMBOLS="-g"
28464	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28465	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28466	       CFLAGS_DEBUG_SYMBOLS="-g1"
28467	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28468	    fi
28469	    ;;
28470	esac
28471        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28472        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28473        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28474        ;;
28475      ossc )
28476        #
28477        # Forte has different names for this with their C++ compiler...
28478        #
28479        C_FLAG_DEPS="-xMMD -xMF"
28480        CXX_FLAG_DEPS="-xMMD -xMF"
28481
28482        # Extra options used with HIGHEST
28483        #
28484        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28485        #          done with care, there are some assumptions below that need to
28486        #          be understood about the use of pointers, and IEEE behavior.
28487        #
28488        # Use non-standard floating point mode (not IEEE 754)
28489        CC_HIGHEST="$CC_HIGHEST -fns"
28490        # Do some simplification of floating point arithmetic (not IEEE 754)
28491        CC_HIGHEST="$CC_HIGHEST -fsimple"
28492        # Use single precision floating point with 'float'
28493        CC_HIGHEST="$CC_HIGHEST -fsingle"
28494        # Assume memory references via basic pointer types do not alias
28495        #   (Source with excessing pointer casting and data access with mixed
28496        #    pointer types are not recommended)
28497        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28498        # Use intrinsic or inline versions for math/std functions
28499        #   (If you expect perfect errno behavior, do not use this)
28500        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28501        # Loop data dependency optimizations (need -xO3 or higher)
28502        CC_HIGHEST="$CC_HIGHEST -xdepend"
28503        # Pointer parameters to functions do not overlap
28504        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28505        #    If you pass in multiple pointers to the same data, do not use this)
28506        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28507        # Inline some library routines
28508        #   (If you expect perfect errno behavior, do not use this)
28509        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28510        # Use optimized math routines
28511        #   (If you expect perfect errno behavior, do not use this)
28512        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28513        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28514
28515        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28516          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28517          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28518        fi
28519
28520        case $OPENJDK_TARGET_CPU_ARCH in
28521          x86)
28522            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28523            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28524            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28525            C_O_FLAG_NONE="-xregs=no%frameptr"
28526            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28527            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28528            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28529            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28530            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28531               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28532               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28533            fi
28534            ;;
28535          sparc)
28536            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28537            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28538            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28539            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28540            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28541            C_O_FLAG_NONE=""
28542            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28543            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28544            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28545            CXX_O_FLAG_NONE=""
28546            ;;
28547        esac
28548
28549    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28550    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28551    esac
28552    ;;
28553  CL )
28554    D_FLAG=
28555    C_O_FLAG_HIGHEST="-O2"
28556    C_O_FLAG_HI="-O1"
28557    C_O_FLAG_NORM="-O1"
28558    C_O_FLAG_NONE="-Od"
28559    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28560    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28561    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28562    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28563    ;;
28564esac
28565
28566if test -z "$C_O_FLAG_HIGHEST"; then
28567   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28568fi
28569
28570if test -z "$CXX_O_FLAG_HIGHEST"; then
28571   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28572fi
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585
28586
28587if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28588   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28589$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28590fi
28591
28592if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28593   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28594$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28595fi
28596
28597if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28598   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28599$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28600fi
28601
28602
28603# Check whether --with-extra-cflags was given.
28604if test "${with_extra_cflags+set}" = set; then :
28605  withval=$with_extra_cflags;
28606fi
28607
28608
28609
28610# Check whether --with-extra-cxxflags was given.
28611if test "${with_extra_cxxflags+set}" = set; then :
28612  withval=$with_extra_cxxflags;
28613fi
28614
28615
28616
28617# Check whether --with-extra-ldflags was given.
28618if test "${with_extra_ldflags+set}" = set; then :
28619  withval=$with_extra_ldflags;
28620fi
28621
28622
28623CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28624CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28625LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28626
28627# Hotspot needs these set in their legacy form
28628LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28629LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28630LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28631
28632
28633
28634
28635
28636###############################################################################
28637#
28638# Now setup the CFLAGS and LDFLAGS for the JDK build.
28639# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28640#
28641case $COMPILER_NAME in
28642      gcc )
28643      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28644                          -pipe \
28645                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28646	  case $OPENJDK_TARGET_CPU_ARCH in
28647	  arm )
28648            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28649	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28650	  ;;
28651	  ppc )
28652            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28653	  ;;
28654	  * )
28655	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28656	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28657          ;;
28658	  esac
28659          ;;
28660      ossc )
28661          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28662          case $OPENJDK_TARGET_CPU_ARCH in
28663          x86 )
28664            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28665       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28666          ;;
28667          esac
28668
28669      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28670      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28671
28672          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28673          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28674          ;;
28675      cl )
28676          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28677               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28678	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28679	       -DWIN32 -DIAL"
28680          case $OPENJDK_TARGET_CPU in
28681              x86 )
28682                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28683                  ;;
28684              x86_64 )
28685                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28686                  ;;
28687          esac
28688          ;;
28689esac
28690
28691###############################################################################
28692
28693CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28694
28695# The package path is used only on macosx?
28696PACKAGE_PATH=/opt/local
28697
28698
28699if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28700    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28701    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28702    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28703    #   Note: -Dmacro         is the same as    #define macro 1
28704    #         -Dmacro=	    is the same as    #define macro
28705    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28706        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28707    else
28708        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28709    fi
28710else
28711    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28712fi
28713if test "x$OPENJDK_TARGET_OS" = xlinux; then
28714    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28715fi
28716if test "x$OPENJDK_TARGET_OS" = xwindows; then
28717    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28718fi
28719if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28720    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28721fi
28722if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28723    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28724    # Setting these parameters makes it an error to link to macosx APIs that are
28725    # newer than the given OS version and makes the linked binaries compatible even
28726    # if built on a newer version of the OS.
28727    # The expected format is X.Y.Z
28728    MACOSX_VERSION_MIN=10.7.0
28729
28730    # The macro takes the version with no dots, ex: 1070
28731    # Let the flags variables get resolved in make for easier override on make
28732    # command line.
28733    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28734    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28735fi
28736if test "x$OPENJDK_TARGET_OS" = xbsd; then
28737    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28738fi
28739if test "x$DEBUG_LEVEL" = xrelease; then
28740    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28741    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28742        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28743    fi
28744else
28745    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28746fi
28747
28748CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28749CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28750
28751CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28752        -I${JDK_OUTPUTDIR}/include \
28753        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28754        -I${JDK_TOPDIR}/src/share/javavm/export \
28755        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28756        -I${JDK_TOPDIR}/src/share/native/common \
28757        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28758
28759# The shared libraries are compiled using the picflag.
28760CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28761CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28762
28763# Executable flags
28764CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28765CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28766
28767# Now this is odd. The JDK native libraries have to link against libjvm.so
28768# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28769# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28770# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28771# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28772# libraries will link to whatever is in memory. Yuck.
28773#
28774# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28775if test "x$COMPILER_NAME" = xcl; then
28776    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28777    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28778        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28779    fi
28780    # TODO: make -debug optional "--disable-full-debug-symbols"
28781    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28782    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28783    LDFLAGS_JDKLIB_SUFFIX=""
28784    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28785        LDFLAGS_STACK_SIZE=1048576
28786    else
28787        LDFLAGS_STACK_SIZE=327680
28788    fi
28789    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28790else
28791    if test "x$COMPILER_NAME" = xgcc; then
28792        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28793        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28794        if test -n "$HAS_GNU_HASH"; then
28795            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28796        fi
28797        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28798          # And since we now know that the linker is gnu, then add -z defs, to forbid
28799          # undefined symbols in object files.
28800          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28801          if test "x$DEBUG_LEVEL" = "xrelease"; then
28802              # When building release libraries, tell the linker optimize them.
28803              # Should this be supplied to the OSS linker as well?
28804              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28805          fi
28806        fi
28807    fi
28808    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28809                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28810
28811    # On some platforms (mac) the linker warns about non existing -L dirs.
28812    # Add server first if available. Linking aginst client does not always produce the same results.
28813    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28814    # Default to server for other variants.
28815    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28816        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28817    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28818        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28819    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28820        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28821    else
28822        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28823    fi
28824
28825    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28826    if test "x$COMPILER_NAME" = xossc; then
28827        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28828    fi
28829
28830    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28831    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28832        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28833    fi
28834fi
28835
28836# Adjust flags according to debug level.
28837case $DEBUG_LEVEL in
28838      fastdebug )
28839              CFLAGS="$CFLAGS $D_FLAG"
28840              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28841              ;;
28842      slowdebug )
28843              CFLAGS="$CFLAGS $D_FLAG"
28844	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28845	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28846	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28847	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28848              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28849              ;;
28850esac
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866# Setup debug symbols (need objcopy from the toolchain for that)
28867
28868#
28869# ENABLE_DEBUG_SYMBOLS
28870# This must be done after the toolchain is setup, since we're looking at objcopy.
28871#
28872# Check whether --enable-debug-symbols was given.
28873if test "${enable_debug_symbols+set}" = set; then :
28874  enableval=$enable_debug_symbols;
28875fi
28876
28877
28878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28879$as_echo_n "checking if we should generate debug symbols... " >&6; }
28880
28881if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28882   # explicit enabling of enable-debug-symbols and can't find objcopy
28883   #   this is an error
28884   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28885fi
28886
28887if test "x$enable_debug_symbols" = "xyes"; then
28888  ENABLE_DEBUG_SYMBOLS=true
28889elif test "x$enable_debug_symbols" = "xno"; then
28890  ENABLE_DEBUG_SYMBOLS=false
28891else
28892  # default on macosx is false
28893  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28894    ENABLE_DEBUG_SYMBOLS=false
28895  # Default is on if objcopy is found, otherwise off
28896  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28897    ENABLE_DEBUG_SYMBOLS=true
28898  else
28899    ENABLE_DEBUG_SYMBOLS=false
28900  fi
28901fi
28902
28903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28904$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28905
28906#
28907# ZIP_DEBUGINFO_FILES
28908#
28909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28910$as_echo_n "checking if we should zip debug-info files... " >&6; }
28911# Check whether --enable-zip-debug-info was given.
28912if test "${enable_zip_debug_info+set}" = set; then :
28913  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
28914else
28915  enable_zip_debug_info="yes"
28916fi
28917
28918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28919$as_echo "${enable_zip_debug_info}" >&6; }
28920
28921if test "x${enable_zip_debug_info}" = "xno"; then
28922   ZIP_DEBUGINFO_FILES=false
28923else
28924   ZIP_DEBUGINFO_FILES=true
28925fi
28926
28927
28928
28929
28930
28931
28932
28933###############################################################################
28934#
28935# Check dependencies for external and internal libraries.
28936#
28937###############################################################################
28938
28939
28940
28941###############################################################################
28942#
28943# OS specific settings that we never will need to probe.
28944#
28945if test "x$OPENJDK_TARGET_OS" = xlinux; then
28946    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28947$as_echo_n "checking what is not needed on Linux?... " >&6; }
28948    PULSE_NOT_NEEDED=yes
28949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28950$as_echo "pulse" >&6; }
28951fi
28952
28953if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28955$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28956    ALSA_NOT_NEEDED=yes
28957    PULSE_NOT_NEEDED=yes
28958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28959$as_echo "alsa pulse" >&6; }
28960fi
28961
28962if test "x$OPENJDK_TARGET_OS" = xwindows; then
28963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28964$as_echo_n "checking what is not needed on Windows?... " >&6; }
28965    CUPS_NOT_NEEDED=yes
28966    ALSA_NOT_NEEDED=yes
28967    PULSE_NOT_NEEDED=yes
28968    X11_NOT_NEEDED=yes
28969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28970$as_echo "alsa cups pulse x11" >&6; }
28971fi
28972
28973if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28975$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28976    ALSA_NOT_NEEDED=yes
28977    PULSE_NOT_NEEDED=yes
28978    X11_NOT_NEEDED=yes
28979    FREETYPE2_NOT_NEEDED=yes
28980    # If the java runtime framework is disabled, then we need X11.
28981    # This will be adjusted below.
28982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28983$as_echo "alsa pulse x11" >&6; }
28984fi
28985
28986if test "x$OPENJDK_TARGET_OS" = xbsd; then
28987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28988$as_echo_n "checking what is not needed on bsd?... " >&6; }
28989    ALSA_NOT_NEEDED=yes
28990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28991$as_echo "alsa" >&6; }
28992fi
28993
28994if test "x$OPENJDK" = "xfalse"; then
28995    FREETYPE2_NOT_NEEDED=yes
28996fi
28997
28998if test "x$SUPPORT_HEADFUL" = xno; then
28999    X11_NOT_NEEDED=yes
29000fi
29001
29002###############################################################################
29003#
29004# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29005# that uses this API.
29006#
29007# Check whether --enable-macosx-runtime-support was given.
29008if test "${enable_macosx_runtime_support+set}" = set; then :
29009  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29010else
29011  MACOSX_RUNTIME_SUPPORT="no"
29012fi
29013
29014
29015USE_MACOSX_RUNTIME_SUPPORT=no
29016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29017$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29018if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29019    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29020        MACOSX_RUNTIME_SUPPORT=yes
29021        USE_MACOSX_RUNTIME_SUPPORT=yes
29022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29023$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29024    else
29025        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29026$as_echo "yes, but explicitly disabled." >&6; }
29027    fi
29028else
29029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29030$as_echo "no" >&6; }
29031fi
29032
29033if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29035$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29036    X11_NOT_NEEDED=
29037    FREETYPE2_NOT_NEEDED=
29038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29039$as_echo "alsa pulse" >&6; }
29040fi
29041
29042
29043
29044
29045###############################################################################
29046#
29047# Check for X Windows
29048#
29049
29050# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29051# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29052# --x-libraries for the sysroot, if that seems to be correct.
29053if test "x$SYS_ROOT" != "x/"; then
29054  if test "x$x_includes" = xNONE; then
29055    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29056      x_includes="$SYS_ROOT/usr/X11R6/include"
29057    fi
29058  fi
29059  if test "x$x_libraries" = xNONE; then
29060    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29061      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29062    fi
29063  fi
29064fi
29065
29066# Now let autoconf do it's magic
29067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29068$as_echo_n "checking for X... " >&6; }
29069
29070
29071# Check whether --with-x was given.
29072if test "${with_x+set}" = set; then :
29073  withval=$with_x;
29074fi
29075
29076# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29077if test "x$with_x" = xno; then
29078  # The user explicitly disabled X.
29079  have_x=disabled
29080else
29081  case $x_includes,$x_libraries in #(
29082    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29083    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29084  $as_echo_n "(cached) " >&6
29085else
29086  # One or both of the vars are not set, and there is no cached value.
29087ac_x_includes=no ac_x_libraries=no
29088rm -f -r conftest.dir
29089if mkdir conftest.dir; then
29090  cd conftest.dir
29091  cat >Imakefile <<'_ACEOF'
29092incroot:
29093	@echo incroot='${INCROOT}'
29094usrlibdir:
29095	@echo usrlibdir='${USRLIBDIR}'
29096libdir:
29097	@echo libdir='${LIBDIR}'
29098_ACEOF
29099  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29100    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29101    for ac_var in incroot usrlibdir libdir; do
29102      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29103    done
29104    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29105    for ac_extension in a so sl dylib la dll; do
29106      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29107	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29108	ac_im_usrlibdir=$ac_im_libdir; break
29109      fi
29110    done
29111    # Screen out bogus values from the imake configuration.  They are
29112    # bogus both because they are the default anyway, and because
29113    # using them would break gcc on systems where it needs fixed includes.
29114    case $ac_im_incroot in
29115	/usr/include) ac_x_includes= ;;
29116	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29117    esac
29118    case $ac_im_usrlibdir in
29119	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29120	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29121    esac
29122  fi
29123  cd ..
29124  rm -f -r conftest.dir
29125fi
29126
29127# Standard set of common directories for X headers.
29128# Check X11 before X11Rn because it is often a symlink to the current release.
29129ac_x_header_dirs='
29130/usr/X11/include
29131/usr/X11R7/include
29132/usr/X11R6/include
29133/usr/X11R5/include
29134/usr/X11R4/include
29135
29136/usr/include/X11
29137/usr/include/X11R7
29138/usr/include/X11R6
29139/usr/include/X11R5
29140/usr/include/X11R4
29141
29142/usr/local/X11/include
29143/usr/local/X11R7/include
29144/usr/local/X11R6/include
29145/usr/local/X11R5/include
29146/usr/local/X11R4/include
29147
29148/usr/local/include/X11
29149/usr/local/include/X11R7
29150/usr/local/include/X11R6
29151/usr/local/include/X11R5
29152/usr/local/include/X11R4
29153
29154/usr/X386/include
29155/usr/x386/include
29156/usr/XFree86/include/X11
29157
29158/usr/include
29159/usr/local/include
29160/usr/unsupported/include
29161/usr/athena/include
29162/usr/local/x11r5/include
29163/usr/lpp/Xamples/include
29164
29165/usr/openwin/include
29166/usr/openwin/share/include'
29167
29168if test "$ac_x_includes" = no; then
29169  # Guess where to find include files, by looking for Xlib.h.
29170  # First, try using that file with no special directory specified.
29171  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29172/* end confdefs.h.  */
29173#include <X11/Xlib.h>
29174_ACEOF
29175if ac_fn_cxx_try_cpp "$LINENO"; then :
29176  # We can compile using X headers with no special include directory.
29177ac_x_includes=
29178else
29179  for ac_dir in $ac_x_header_dirs; do
29180  if test -r "$ac_dir/X11/Xlib.h"; then
29181    ac_x_includes=$ac_dir
29182    break
29183  fi
29184done
29185fi
29186rm -f conftest.err conftest.i conftest.$ac_ext
29187fi # $ac_x_includes = no
29188
29189if test "$ac_x_libraries" = no; then
29190  # Check for the libraries.
29191  # See if we find them without any special options.
29192  # Don't add to $LIBS permanently.
29193  ac_save_LIBS=$LIBS
29194  LIBS="-lX11 $LIBS"
29195  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29196/* end confdefs.h.  */
29197#include <X11/Xlib.h>
29198int
29199main ()
29200{
29201XrmInitialize ()
29202  ;
29203  return 0;
29204}
29205_ACEOF
29206if ac_fn_cxx_try_link "$LINENO"; then :
29207  LIBS=$ac_save_LIBS
29208# We can link X programs with no special library path.
29209ac_x_libraries=
29210else
29211  LIBS=$ac_save_LIBS
29212for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29213do
29214  # Don't even attempt the hair of trying to link an X program!
29215  for ac_extension in a so sl dylib la dll; do
29216    if test -r "$ac_dir/libX11.$ac_extension"; then
29217      ac_x_libraries=$ac_dir
29218      break 2
29219    fi
29220  done
29221done
29222fi
29223rm -f core conftest.err conftest.$ac_objext \
29224    conftest$ac_exeext conftest.$ac_ext
29225fi # $ac_x_libraries = no
29226
29227case $ac_x_includes,$ac_x_libraries in #(
29228  no,* | *,no | *\'*)
29229    # Didn't find X, or a directory has "'" in its name.
29230    ac_cv_have_x="have_x=no";; #(
29231  *)
29232    # Record where we found X for the cache.
29233    ac_cv_have_x="have_x=yes\
29234	ac_x_includes='$ac_x_includes'\
29235	ac_x_libraries='$ac_x_libraries'"
29236esac
29237fi
29238;; #(
29239    *) have_x=yes;;
29240  esac
29241  eval "$ac_cv_have_x"
29242fi # $with_x != no
29243
29244if test "$have_x" != yes; then
29245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29246$as_echo "$have_x" >&6; }
29247  no_x=yes
29248else
29249  # If each of the values was on the command line, it overrides each guess.
29250  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29251  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29252  # Update the cache value to reflect the command line values.
29253  ac_cv_have_x="have_x=yes\
29254	ac_x_includes='$x_includes'\
29255	ac_x_libraries='$x_libraries'"
29256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29257$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29258fi
29259
29260if test "$no_x" = yes; then
29261  # Not all programs may use this symbol, but it does not hurt to define it.
29262
29263$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29264
29265  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29266else
29267  if test -n "$x_includes"; then
29268    X_CFLAGS="$X_CFLAGS -I$x_includes"
29269  fi
29270
29271  # It would also be nice to do this for all -L options, not just this one.
29272  if test -n "$x_libraries"; then
29273    X_LIBS="$X_LIBS -L$x_libraries"
29274    # For Solaris; some versions of Sun CC require a space after -R and
29275    # others require no space.  Words are not sufficient . . . .
29276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29277$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29278    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29279    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29280    ac_cxx_werror_flag=yes
29281    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29282/* end confdefs.h.  */
29283
29284int
29285main ()
29286{
29287
29288  ;
29289  return 0;
29290}
29291_ACEOF
29292if ac_fn_cxx_try_link "$LINENO"; then :
29293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29294$as_echo "no" >&6; }
29295       X_LIBS="$X_LIBS -R$x_libraries"
29296else
29297  LIBS="$ac_xsave_LIBS -R $x_libraries"
29298       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29299/* end confdefs.h.  */
29300
29301int
29302main ()
29303{
29304
29305  ;
29306  return 0;
29307}
29308_ACEOF
29309if ac_fn_cxx_try_link "$LINENO"; then :
29310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29311$as_echo "yes" >&6; }
29312	  X_LIBS="$X_LIBS -R $x_libraries"
29313else
29314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29315$as_echo "neither works" >&6; }
29316fi
29317rm -f core conftest.err conftest.$ac_objext \
29318    conftest$ac_exeext conftest.$ac_ext
29319fi
29320rm -f core conftest.err conftest.$ac_objext \
29321    conftest$ac_exeext conftest.$ac_ext
29322    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29323    LIBS=$ac_xsave_LIBS
29324  fi
29325
29326  # Check for system-dependent libraries X programs must link with.
29327  # Do this before checking for the system-independent R6 libraries
29328  # (-lICE), since we may need -lsocket or whatever for X linking.
29329
29330  if test "$ISC" = yes; then
29331    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29332  else
29333    # Martyn Johnson says this is needed for Ultrix, if the X
29334    # libraries were built with DECnet support.  And Karl Berry says
29335    # the Alpha needs dnet_stub (dnet does not exist).
29336    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29337    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29338/* end confdefs.h.  */
29339
29340/* Override any GCC internal prototype to avoid an error.
29341   Use char because int might match the return type of a GCC
29342   builtin and then its argument prototype would still apply.  */
29343#ifdef __cplusplus
29344extern "C"
29345#endif
29346char XOpenDisplay ();
29347int
29348main ()
29349{
29350return XOpenDisplay ();
29351  ;
29352  return 0;
29353}
29354_ACEOF
29355if ac_fn_cxx_try_link "$LINENO"; then :
29356
29357else
29358  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29359$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29360if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
29361  $as_echo_n "(cached) " >&6
29362else
29363  ac_check_lib_save_LIBS=$LIBS
29364LIBS="-ldnet  $LIBS"
29365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29366/* end confdefs.h.  */
29367
29368/* Override any GCC internal prototype to avoid an error.
29369   Use char because int might match the return type of a GCC
29370   builtin and then its argument prototype would still apply.  */
29371#ifdef __cplusplus
29372extern "C"
29373#endif
29374char dnet_ntoa ();
29375int
29376main ()
29377{
29378return dnet_ntoa ();
29379  ;
29380  return 0;
29381}
29382_ACEOF
29383if ac_fn_cxx_try_link "$LINENO"; then :
29384  ac_cv_lib_dnet_dnet_ntoa=yes
29385else
29386  ac_cv_lib_dnet_dnet_ntoa=no
29387fi
29388rm -f core conftest.err conftest.$ac_objext \
29389    conftest$ac_exeext conftest.$ac_ext
29390LIBS=$ac_check_lib_save_LIBS
29391fi
29392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29393$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29394if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
29395  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29396fi
29397
29398    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29399      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
29400$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29401if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
29402  $as_echo_n "(cached) " >&6
29403else
29404  ac_check_lib_save_LIBS=$LIBS
29405LIBS="-ldnet_stub  $LIBS"
29406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29407/* end confdefs.h.  */
29408
29409/* Override any GCC internal prototype to avoid an error.
29410   Use char because int might match the return type of a GCC
29411   builtin and then its argument prototype would still apply.  */
29412#ifdef __cplusplus
29413extern "C"
29414#endif
29415char dnet_ntoa ();
29416int
29417main ()
29418{
29419return dnet_ntoa ();
29420  ;
29421  return 0;
29422}
29423_ACEOF
29424if ac_fn_cxx_try_link "$LINENO"; then :
29425  ac_cv_lib_dnet_stub_dnet_ntoa=yes
29426else
29427  ac_cv_lib_dnet_stub_dnet_ntoa=no
29428fi
29429rm -f core conftest.err conftest.$ac_objext \
29430    conftest$ac_exeext conftest.$ac_ext
29431LIBS=$ac_check_lib_save_LIBS
29432fi
29433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29434$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29435if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
29436  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29437fi
29438
29439    fi
29440fi
29441rm -f core conftest.err conftest.$ac_objext \
29442    conftest$ac_exeext conftest.$ac_ext
29443    LIBS="$ac_xsave_LIBS"
29444
29445    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29446    # to get the SysV transport functions.
29447    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29448    # needs -lnsl.
29449    # The nsl library prevents programs from opening the X display
29450    # on Irix 5.2, according to T.E. Dickey.
29451    # The functions gethostbyname, getservbyname, and inet_addr are
29452    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29453    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
29454if test "x$ac_cv_func_gethostbyname" = xyes; then :
29455
29456fi
29457
29458    if test $ac_cv_func_gethostbyname = no; then
29459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
29460$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29461if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
29462  $as_echo_n "(cached) " >&6
29463else
29464  ac_check_lib_save_LIBS=$LIBS
29465LIBS="-lnsl  $LIBS"
29466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29467/* end confdefs.h.  */
29468
29469/* Override any GCC internal prototype to avoid an error.
29470   Use char because int might match the return type of a GCC
29471   builtin and then its argument prototype would still apply.  */
29472#ifdef __cplusplus
29473extern "C"
29474#endif
29475char gethostbyname ();
29476int
29477main ()
29478{
29479return gethostbyname ();
29480  ;
29481  return 0;
29482}
29483_ACEOF
29484if ac_fn_cxx_try_link "$LINENO"; then :
29485  ac_cv_lib_nsl_gethostbyname=yes
29486else
29487  ac_cv_lib_nsl_gethostbyname=no
29488fi
29489rm -f core conftest.err conftest.$ac_objext \
29490    conftest$ac_exeext conftest.$ac_ext
29491LIBS=$ac_check_lib_save_LIBS
29492fi
29493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29494$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29495if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
29496  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29497fi
29498
29499      if test $ac_cv_lib_nsl_gethostbyname = no; then
29500	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29501$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29502if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
29503  $as_echo_n "(cached) " >&6
29504else
29505  ac_check_lib_save_LIBS=$LIBS
29506LIBS="-lbsd  $LIBS"
29507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29508/* end confdefs.h.  */
29509
29510/* Override any GCC internal prototype to avoid an error.
29511   Use char because int might match the return type of a GCC
29512   builtin and then its argument prototype would still apply.  */
29513#ifdef __cplusplus
29514extern "C"
29515#endif
29516char gethostbyname ();
29517int
29518main ()
29519{
29520return gethostbyname ();
29521  ;
29522  return 0;
29523}
29524_ACEOF
29525if ac_fn_cxx_try_link "$LINENO"; then :
29526  ac_cv_lib_bsd_gethostbyname=yes
29527else
29528  ac_cv_lib_bsd_gethostbyname=no
29529fi
29530rm -f core conftest.err conftest.$ac_objext \
29531    conftest$ac_exeext conftest.$ac_ext
29532LIBS=$ac_check_lib_save_LIBS
29533fi
29534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29535$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29536if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
29537  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29538fi
29539
29540      fi
29541    fi
29542
29543    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29544    # socket/setsockopt and other routines are undefined under SCO ODT
29545    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29546    # on later versions), says Simon Leinen: it contains gethostby*
29547    # variants that don't use the name server (or something).  -lsocket
29548    # must be given before -lnsl if both are needed.  We assume that
29549    # if connect needs -lnsl, so does gethostbyname.
29550    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29551if test "x$ac_cv_func_connect" = xyes; then :
29552
29553fi
29554
29555    if test $ac_cv_func_connect = no; then
29556      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29557$as_echo_n "checking for connect in -lsocket... " >&6; }
29558if ${ac_cv_lib_socket_connect+:} false; then :
29559  $as_echo_n "(cached) " >&6
29560else
29561  ac_check_lib_save_LIBS=$LIBS
29562LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29564/* end confdefs.h.  */
29565
29566/* Override any GCC internal prototype to avoid an error.
29567   Use char because int might match the return type of a GCC
29568   builtin and then its argument prototype would still apply.  */
29569#ifdef __cplusplus
29570extern "C"
29571#endif
29572char connect ();
29573int
29574main ()
29575{
29576return connect ();
29577  ;
29578  return 0;
29579}
29580_ACEOF
29581if ac_fn_cxx_try_link "$LINENO"; then :
29582  ac_cv_lib_socket_connect=yes
29583else
29584  ac_cv_lib_socket_connect=no
29585fi
29586rm -f core conftest.err conftest.$ac_objext \
29587    conftest$ac_exeext conftest.$ac_ext
29588LIBS=$ac_check_lib_save_LIBS
29589fi
29590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29591$as_echo "$ac_cv_lib_socket_connect" >&6; }
29592if test "x$ac_cv_lib_socket_connect" = xyes; then :
29593  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29594fi
29595
29596    fi
29597
29598    # Guillermo Gomez says -lposix is necessary on A/UX.
29599    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29600if test "x$ac_cv_func_remove" = xyes; then :
29601
29602fi
29603
29604    if test $ac_cv_func_remove = no; then
29605      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29606$as_echo_n "checking for remove in -lposix... " >&6; }
29607if ${ac_cv_lib_posix_remove+:} false; then :
29608  $as_echo_n "(cached) " >&6
29609else
29610  ac_check_lib_save_LIBS=$LIBS
29611LIBS="-lposix  $LIBS"
29612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29613/* end confdefs.h.  */
29614
29615/* Override any GCC internal prototype to avoid an error.
29616   Use char because int might match the return type of a GCC
29617   builtin and then its argument prototype would still apply.  */
29618#ifdef __cplusplus
29619extern "C"
29620#endif
29621char remove ();
29622int
29623main ()
29624{
29625return remove ();
29626  ;
29627  return 0;
29628}
29629_ACEOF
29630if ac_fn_cxx_try_link "$LINENO"; then :
29631  ac_cv_lib_posix_remove=yes
29632else
29633  ac_cv_lib_posix_remove=no
29634fi
29635rm -f core conftest.err conftest.$ac_objext \
29636    conftest$ac_exeext conftest.$ac_ext
29637LIBS=$ac_check_lib_save_LIBS
29638fi
29639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29640$as_echo "$ac_cv_lib_posix_remove" >&6; }
29641if test "x$ac_cv_lib_posix_remove" = xyes; then :
29642  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29643fi
29644
29645    fi
29646
29647    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29648    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29649if test "x$ac_cv_func_shmat" = xyes; then :
29650
29651fi
29652
29653    if test $ac_cv_func_shmat = no; then
29654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29655$as_echo_n "checking for shmat in -lipc... " >&6; }
29656if ${ac_cv_lib_ipc_shmat+:} false; then :
29657  $as_echo_n "(cached) " >&6
29658else
29659  ac_check_lib_save_LIBS=$LIBS
29660LIBS="-lipc  $LIBS"
29661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29662/* end confdefs.h.  */
29663
29664/* Override any GCC internal prototype to avoid an error.
29665   Use char because int might match the return type of a GCC
29666   builtin and then its argument prototype would still apply.  */
29667#ifdef __cplusplus
29668extern "C"
29669#endif
29670char shmat ();
29671int
29672main ()
29673{
29674return shmat ();
29675  ;
29676  return 0;
29677}
29678_ACEOF
29679if ac_fn_cxx_try_link "$LINENO"; then :
29680  ac_cv_lib_ipc_shmat=yes
29681else
29682  ac_cv_lib_ipc_shmat=no
29683fi
29684rm -f core conftest.err conftest.$ac_objext \
29685    conftest$ac_exeext conftest.$ac_ext
29686LIBS=$ac_check_lib_save_LIBS
29687fi
29688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29689$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29690if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
29691  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29692fi
29693
29694    fi
29695  fi
29696
29697  # Check for libraries that X11R6 Xt/Xaw programs need.
29698  ac_save_LDFLAGS=$LDFLAGS
29699  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29700  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29701  # check for ICE first), but we must link in the order -lSM -lICE or
29702  # we get undefined symbols.  So assume we have SM if we have ICE.
29703  # These have to be linked with before -lX11, unlike the other
29704  # libraries we check for below, so use a different variable.
29705  # John Interrante, Karl Berry
29706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29707$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29708if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
29709  $as_echo_n "(cached) " >&6
29710else
29711  ac_check_lib_save_LIBS=$LIBS
29712LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29714/* end confdefs.h.  */
29715
29716/* Override any GCC internal prototype to avoid an error.
29717   Use char because int might match the return type of a GCC
29718   builtin and then its argument prototype would still apply.  */
29719#ifdef __cplusplus
29720extern "C"
29721#endif
29722char IceConnectionNumber ();
29723int
29724main ()
29725{
29726return IceConnectionNumber ();
29727  ;
29728  return 0;
29729}
29730_ACEOF
29731if ac_fn_cxx_try_link "$LINENO"; then :
29732  ac_cv_lib_ICE_IceConnectionNumber=yes
29733else
29734  ac_cv_lib_ICE_IceConnectionNumber=no
29735fi
29736rm -f core conftest.err conftest.$ac_objext \
29737    conftest$ac_exeext conftest.$ac_ext
29738LIBS=$ac_check_lib_save_LIBS
29739fi
29740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29741$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29742if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
29743  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29744fi
29745
29746  LDFLAGS=$ac_save_LDFLAGS
29747
29748fi
29749
29750
29751# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29752# this doesn't make sense so we remove it.
29753if test "x$COMPILE_TYPE" = xcross; then
29754  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29755fi
29756
29757if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29758
29759    # Print a helpful message on how to acquire the necessary build dependency.
29760    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29761    MISSING_DEPENDENCY=x11
29762    PKGHANDLER_COMMAND=
29763
29764    case $PKGHANDLER in
29765	apt-get)
29766                apt_help     $MISSING_DEPENDENCY ;;
29767    yum)
29768                yum_help     $MISSING_DEPENDENCY ;;
29769	port)
29770                port_help    $MISSING_DEPENDENCY ;;
29771	pkgutil)
29772                pkgutil_help $MISSING_DEPENDENCY ;;
29773	pkgadd)
29774                pkgadd_help  $MISSING_DEPENDENCY ;;
29775    * )
29776      break ;;
29777    esac
29778
29779    if test "x$PKGHANDLER_COMMAND" != x; then
29780        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29781    fi
29782
29783    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29784fi
29785
29786# Some of the old makefiles require a setting of OPENWIN_HOME
29787# Since the X11R6 directory has disappeared on later Linuxes,
29788# we need to probe for it.
29789if test "x$OPENJDK_TARGET_OS" = xlinux; then
29790    if test -d "$SYS_ROOT/usr/X11R6"; then
29791        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29792    fi
29793    if test -d "$SYS_ROOT/usr/include/X11"; then
29794        OPENWIN_HOME="$SYS_ROOT/usr"
29795    fi
29796fi
29797if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29798    OPENWIN_HOME="/usr/openwin"
29799fi
29800
29801
29802
29803#
29804# Weird Sol10 something check...TODO change to try compile
29805#
29806if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29807  if test "`uname -r`" = "5.10"; then
29808     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29809     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29810     fi
29811  fi
29812fi
29813
29814ac_ext=c
29815ac_cpp='$CPP $CPPFLAGS'
29816ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29817ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29818ac_compiler_gnu=$ac_cv_c_compiler_gnu
29819
29820OLD_CFLAGS="$CFLAGS"
29821CFLAGS="$CFLAGS $X_CFLAGS"
29822
29823# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29824for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29825do :
29826  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29827ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29828                   # include <X11/Xutil.h>
29829
29830"
29831if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29832  cat >>confdefs.h <<_ACEOF
29833#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29834_ACEOF
29835 X11_A_OK=yes
29836else
29837  X11_A_OK=no; break
29838fi
29839
29840done
29841
29842
29843CFLAGS="$OLD_CFLAGS"
29844ac_ext=cpp
29845ac_cpp='$CXXCPP $CPPFLAGS'
29846ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29847ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29848ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29849
29850
29851if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29852
29853    # Print a helpful message on how to acquire the necessary build dependency.
29854    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29855    MISSING_DEPENDENCY=x11
29856    PKGHANDLER_COMMAND=
29857
29858    case $PKGHANDLER in
29859	apt-get)
29860                apt_help     $MISSING_DEPENDENCY ;;
29861    yum)
29862                yum_help     $MISSING_DEPENDENCY ;;
29863	port)
29864                port_help    $MISSING_DEPENDENCY ;;
29865	pkgutil)
29866                pkgutil_help $MISSING_DEPENDENCY ;;
29867	pkgadd)
29868                pkgadd_help  $MISSING_DEPENDENCY ;;
29869    * )
29870      break ;;
29871    esac
29872
29873    if test "x$PKGHANDLER_COMMAND" != x; then
29874        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29875    fi
29876
29877    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29878fi
29879
29880
29881
29882
29883
29884
29885###############################################################################
29886#
29887# The common unix printing system cups is used to print from java.
29888#
29889
29890# Check whether --with-cups was given.
29891if test "${with_cups+set}" = set; then :
29892  withval=$with_cups;
29893fi
29894
29895
29896# Check whether --with-cups-include was given.
29897if test "${with_cups_include+set}" = set; then :
29898  withval=$with_cups_include;
29899fi
29900
29901
29902if test "x$CUPS_NOT_NEEDED" = xyes; then
29903	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29904		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29905$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29906	fi
29907	CUPS_CFLAGS=
29908else
29909	CUPS_FOUND=no
29910
29911	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29912	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29913	fi
29914
29915	if test "x${with_cups}" != x; then
29916	    CUPS_CFLAGS="-I${with_cups}/include"
29917	    CUPS_FOUND=yes
29918	fi
29919	if test "x${with_cups_include}" != x; then
29920	    CUPS_CFLAGS="-I${with_cups_include}"
29921	    CUPS_FOUND=yes
29922	fi
29923	if test "x$CUPS_FOUND" = xno; then
29924
29925
29926    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29927        # Source the builddeps file again, to make sure it uses the latest variables!
29928        . $builddepsfile
29929        # Look for a target and build machine specific resource!
29930        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29931        if test "x$resource" = x; then
29932            # Ok, lets instead look for a target specific resource
29933            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29934        fi
29935        if test "x$resource" = x; then
29936            # Ok, lets instead look for a build specific resource
29937            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29938        fi
29939        if test "x$resource" = x; then
29940            # Ok, lets instead look for a generic resource
29941            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29942            resource=${builddep_cups}
29943        fi
29944        if test "x$resource" != x; then
29945            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29946$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29947	    # If the resource in the builddeps.conf file is an existing directory,
29948	    # for example /java/linux/cups
29949	    if test -d ${resource}; then
29950	       depdir=${resource}
29951	    else
29952
29953# cups is for example mymodule
29954# $resource is for example libs/general/libmymod_1_2_3.zip
29955# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29956# $with_builddeps_dir is for example /localhome/builddeps
29957# depdir is the name of the variable into which we store the depdir, eg MYMOD
29958# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29959# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29960    filename=`basename $resource`
29961    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29962    filebase=${filename%%.*}
29963    extension=${filename#*.}
29964    installdir=$with_builddeps_dir/$filebase
29965    if test ! -f $installdir/$filename.unpacked; then
29966        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29967$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29968        if test ! -d $installdir; then
29969            mkdir -p $installdir
29970        fi
29971        if test ! -d $installdir; then
29972            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29973        fi
29974        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29975        touch $tmpfile
29976        if test ! -f $tmpfile; then
29977            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29978        fi
29979
29980    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29981    # $tmpfile is the local file name for the downloaded file.
29982    VALID_TOOL=no
29983    if test "x$BDEPS_FTP" = xwget; then
29984       VALID_TOOL=yes
29985       wget -O $tmpfile $with_builddeps_server/$resource
29986    fi
29987    if test "x$BDEPS_FTP" = xlftp; then
29988       VALID_TOOL=yes
29989       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29990    fi
29991    if test "x$BDEPS_FTP" = xftp; then
29992        VALID_TOOL=yes
29993        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29994        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29995        FTPUSERPWD=${FTPSERVER%%@*}
29996        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29997            FTPUSER=${userpwd%%:*}
29998            FTPPWD=${userpwd#*@}
29999            FTPSERVER=${FTPSERVER#*@}
30000        else
30001            FTPUSER=ftp
30002            FTPPWD=ftp
30003        fi
30004        # the "pass" command does not work on some
30005        # ftp clients (read ftp.exe) but if it works,
30006        # passive mode is better!
30007        (\
30008            echo "user $FTPUSER $FTPPWD"        ;\
30009            echo "pass"                         ;\
30010            echo "bin"                          ;\
30011            echo "get $FTPPATH $tmpfile"              ;\
30012        ) | ftp -in $FTPSERVER
30013    fi
30014    if test "x$VALID_TOOL" != xyes; then
30015       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30016    fi
30017
30018        mv $tmpfile $installdir/$filename
30019        if test ! -s $installdir/$filename; then
30020            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30021        fi
30022        case "$extension" in
30023            zip)  echo "Unzipping $installdir/$filename..."
30024               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30025            ;;
30026            tar.gz) echo "Untaring $installdir/$filename..."
30027               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30028            ;;
30029            tgz) echo "Untaring $installdir/$filename..."
30030               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30031            ;;
30032            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30033            ;;
30034        esac
30035    fi
30036    if test -f $installdir/$filename.unpacked; then
30037        depdir=$installdir
30038    fi
30039
30040	    fi
30041            # Source the builddeps file again, because in the previous command, the depdir
30042            # was updated to point at the current build dependency install directory.
30043            . $builddepsfile
30044            # Now extract variables from the builddeps.conf files.
30045            theroot=${builddep_cups_ROOT}
30046            thecflags=${builddep_cups_CFLAGS}
30047            thelibs=${builddep_cups_LIBS}
30048            if test "x$depdir" = x; then
30049                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30050            fi
30051            CUPS=$depdir
30052            if test "x$theroot" != x; then
30053               CUPS="$theroot"
30054            fi
30055            if test "x$thecflags" != x; then
30056               CUPS_CFLAGS="$thecflags"
30057            fi
30058            if test "x$thelibs" != x; then
30059               CUPS_LIBS="$thelibs"
30060            fi
30061            CUPS_FOUND=yes
30062
30063        fi
30064
30065    fi
30066
30067	fi
30068	if test "x$CUPS_FOUND" = xno; then
30069	    # Are the cups headers installed in the default /usr/include location?
30070	    for ac_header in cups/cups.h cups/ppd.h
30071do :
30072  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30073ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30074if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30075  cat >>confdefs.h <<_ACEOF
30076#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30077_ACEOF
30078 CUPS_FOUND=yes
30079	                      CUPS_CFLAGS=
30080	                      DEFAULT_CUPS=yes
30081fi
30082
30083done
30084
30085	fi
30086	if test "x$CUPS_FOUND" = xno; then
30087	    # Getting nervous now? Lets poke around for standard Solaris third-party
30088	    # package installation locations.
30089	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30090$as_echo_n "checking for cups headers... " >&6; }
30091	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30092	       # An SFW package seems to be installed!
30093	       CUPS_FOUND=yes
30094	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30095	    elif test -s /opt/csw/include/cups/cups.h; then
30096	       # A CSW package seems to be installed!
30097	       CUPS_FOUND=yes
30098	       CUPS_CFLAGS="-I/opt/csw/include"
30099	    fi
30100	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30101$as_echo "$CUPS_FOUND" >&6; }
30102	fi
30103	if test "x$CUPS_FOUND" = xno; then
30104
30105    # Print a helpful message on how to acquire the necessary build dependency.
30106    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30107    MISSING_DEPENDENCY=cups
30108    PKGHANDLER_COMMAND=
30109
30110    case $PKGHANDLER in
30111	apt-get)
30112                apt_help     $MISSING_DEPENDENCY ;;
30113    yum)
30114                yum_help     $MISSING_DEPENDENCY ;;
30115	port)
30116                port_help    $MISSING_DEPENDENCY ;;
30117	pkgutil)
30118                pkgutil_help $MISSING_DEPENDENCY ;;
30119	pkgadd)
30120                pkgadd_help  $MISSING_DEPENDENCY ;;
30121    * )
30122      break ;;
30123    esac
30124
30125    if test "x$PKGHANDLER_COMMAND" != x; then
30126        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30127    fi
30128
30129	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30130	fi
30131fi
30132
30133
30134
30135
30136
30137
30138###############################################################################
30139#
30140# The ubiquitous freetype2 library is used to render fonts.
30141#
30142
30143# Check whether --with-freetype was given.
30144if test "${with_freetype+set}" = set; then :
30145  withval=$with_freetype;
30146fi
30147
30148
30149# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30150USING_SYSTEM_FT_LIB=false
30151
30152if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30153	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30154		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30155$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30156	fi
30157	FREETYPE2_CFLAGS=
30158	FREETYPE2_LIBS=
30159        FREETYPE2_LIB_PATH=
30160else
30161	FREETYPE2_FOUND=no
30162
30163	if test "x$with_freetype" != x; then
30164
30165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30166
30167  # Input might be given as Windows format, start by converting to
30168  # unix format.
30169  path="$with_freetype"
30170  new_path=`$CYGPATH -u "$path"`
30171
30172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30175  # "foo.exe" is OK but "foo" is an error.
30176  #
30177  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30178  # It is also a way to make sure we got the proper file name for the real test later on.
30179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30180  if test "x$test_shortpath" = x; then
30181    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30182$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30183    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30184  fi
30185
30186  # Call helper function which possibly converts this using DOS-style short mode.
30187  # If so, the updated path is stored in $new_path.
30188
30189  input_path="$new_path"
30190  # Check if we need to convert this using DOS-style short mode. If the path
30191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30192  # take no chances and rewrite it.
30193  # Note: m4 eats our [], so we need to use [ and ] instead.
30194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30195  if test "x$has_forbidden_chars" != x; then
30196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30200      # Going to short mode and back again did indeed matter. Since short mode is
30201      # case insensitive, let's make it lowercase to improve readability.
30202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30203      # Now convert it back to Unix-stile (cygpath)
30204      input_path=`$CYGPATH -u "$shortmode_path"`
30205      new_path="$input_path"
30206    fi
30207  fi
30208
30209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30210  if test "x$test_cygdrive_prefix" = x; then
30211    # As a simple fix, exclude /usr/bin since it's not a real path.
30212    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30214      # a path prefixed by /cygdrive for fixpath to work.
30215      new_path="$CYGWIN_ROOT_PATH$input_path"
30216    fi
30217  fi
30218
30219
30220  if test "x$path" != "x$new_path"; then
30221    with_freetype="$new_path"
30222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30223$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30224  fi
30225
30226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30227
30228  path="$with_freetype"
30229  has_colon=`$ECHO $path | $GREP ^.:`
30230  new_path="$path"
30231  if test "x$has_colon" = x; then
30232    # Not in mixed or Windows style, start by that.
30233    new_path=`cmd //c echo $path`
30234  fi
30235
30236
30237  input_path="$new_path"
30238  # Check if we need to convert this using DOS-style short mode. If the path
30239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30240  # take no chances and rewrite it.
30241  # Note: m4 eats our [], so we need to use [ and ] instead.
30242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30243  if test "x$has_forbidden_chars" != x; then
30244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30246  fi
30247
30248
30249  windows_path="$new_path"
30250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30251    unix_path=`$CYGPATH -u "$windows_path"`
30252    new_path="$unix_path"
30253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30255    new_path="$unix_path"
30256  fi
30257
30258  if test "x$path" != "x$new_path"; then
30259    with_freetype="$new_path"
30260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30261$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30262  fi
30263
30264  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30265  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30266
30267  else
30268    # We're on a posix platform. Hooray! :)
30269    path="$with_freetype"
30270
30271    if test ! -f "$path" && test ! -d "$path"; then
30272      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30273    fi
30274
30275    has_space=`$ECHO "$path" | $GREP " "`
30276    if test "x$has_space" != x; then
30277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30278$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30279      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30280    fi
30281  fi
30282
30283	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30284            FREETYPE2_LIB_PATH="$with_freetype/lib"
30285            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30286                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30287                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30288            fi
30289            if test "x$OPENJDK_TARGET_OS" = xwindows; then
30290                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30291            fi
30292	    FREETYPE2_CFLAGS="-I$with_freetype/include"
30293            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30294                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30295            fi
30296 	    FREETYPE2_FOUND=yes
30297   	    if test "x$FREETYPE2_FOUND" = xyes; then
30298	        # Verify that the directories exist
30299                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30300		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30301		fi
30302	        # List the contents of the lib.
30303		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30304                if test "x$FREETYPELIB" = x; then
30305		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30306		fi
30307	        # Check one h-file
30308                if ! test -s "$with_freetype/include/ft2build.h"; then
30309		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30310		fi
30311            fi
30312        fi
30313	if test "x$FREETYPE2_FOUND" = xno; then
30314
30315
30316    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30317        # Source the builddeps file again, to make sure it uses the latest variables!
30318        . $builddepsfile
30319        # Look for a target and build machine specific resource!
30320        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30321        if test "x$resource" = x; then
30322            # Ok, lets instead look for a target specific resource
30323            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30324        fi
30325        if test "x$resource" = x; then
30326            # Ok, lets instead look for a build specific resource
30327            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30328        fi
30329        if test "x$resource" = x; then
30330            # Ok, lets instead look for a generic resource
30331            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30332            resource=${builddep_freetype2}
30333        fi
30334        if test "x$resource" != x; then
30335            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30336$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30337	    # If the resource in the builddeps.conf file is an existing directory,
30338	    # for example /java/linux/cups
30339	    if test -d ${resource}; then
30340	       depdir=${resource}
30341	    else
30342
30343# freetype2 is for example mymodule
30344# $resource is for example libs/general/libmymod_1_2_3.zip
30345# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30346# $with_builddeps_dir is for example /localhome/builddeps
30347# depdir is the name of the variable into which we store the depdir, eg MYMOD
30348# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30349# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30350    filename=`basename $resource`
30351    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30352    filebase=${filename%%.*}
30353    extension=${filename#*.}
30354    installdir=$with_builddeps_dir/$filebase
30355    if test ! -f $installdir/$filename.unpacked; then
30356        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30357$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30358        if test ! -d $installdir; then
30359            mkdir -p $installdir
30360        fi
30361        if test ! -d $installdir; then
30362            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30363        fi
30364        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30365        touch $tmpfile
30366        if test ! -f $tmpfile; then
30367            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30368        fi
30369
30370    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30371    # $tmpfile is the local file name for the downloaded file.
30372    VALID_TOOL=no
30373    if test "x$BDEPS_FTP" = xwget; then
30374       VALID_TOOL=yes
30375       wget -O $tmpfile $with_builddeps_server/$resource
30376    fi
30377    if test "x$BDEPS_FTP" = xlftp; then
30378       VALID_TOOL=yes
30379       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30380    fi
30381    if test "x$BDEPS_FTP" = xftp; then
30382        VALID_TOOL=yes
30383        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30384        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30385        FTPUSERPWD=${FTPSERVER%%@*}
30386        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30387            FTPUSER=${userpwd%%:*}
30388            FTPPWD=${userpwd#*@}
30389            FTPSERVER=${FTPSERVER#*@}
30390        else
30391            FTPUSER=ftp
30392            FTPPWD=ftp
30393        fi
30394        # the "pass" command does not work on some
30395        # ftp clients (read ftp.exe) but if it works,
30396        # passive mode is better!
30397        (\
30398            echo "user $FTPUSER $FTPPWD"        ;\
30399            echo "pass"                         ;\
30400            echo "bin"                          ;\
30401            echo "get $FTPPATH $tmpfile"              ;\
30402        ) | ftp -in $FTPSERVER
30403    fi
30404    if test "x$VALID_TOOL" != xyes; then
30405       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30406    fi
30407
30408        mv $tmpfile $installdir/$filename
30409        if test ! -s $installdir/$filename; then
30410            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30411        fi
30412        case "$extension" in
30413            zip)  echo "Unzipping $installdir/$filename..."
30414               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30415            ;;
30416            tar.gz) echo "Untaring $installdir/$filename..."
30417               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30418            ;;
30419            tgz) echo "Untaring $installdir/$filename..."
30420               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30421            ;;
30422            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30423            ;;
30424        esac
30425    fi
30426    if test -f $installdir/$filename.unpacked; then
30427        depdir=$installdir
30428    fi
30429
30430	    fi
30431            # Source the builddeps file again, because in the previous command, the depdir
30432            # was updated to point at the current build dependency install directory.
30433            . $builddepsfile
30434            # Now extract variables from the builddeps.conf files.
30435            theroot=${builddep_freetype2_ROOT}
30436            thecflags=${builddep_freetype2_CFLAGS}
30437            thelibs=${builddep_freetype2_LIBS}
30438            if test "x$depdir" = x; then
30439                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
30440            fi
30441            FREETYPE2=$depdir
30442            if test "x$theroot" != x; then
30443               FREETYPE2="$theroot"
30444            fi
30445            if test "x$thecflags" != x; then
30446               FREETYPE2_CFLAGS="$thecflags"
30447            fi
30448            if test "x$thelibs" != x; then
30449               FREETYPE2_LIBS="$thelibs"
30450            fi
30451            FREETYPE2_FOUND=yes
30452            else FREETYPE2_FOUND=no
30453
30454        fi
30455        else FREETYPE2_FOUND=no
30456
30457    fi
30458
30459            USING_SYSTEM_FT_LIB=true
30460	fi
30461	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
30462            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
30463
30464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30465
30466  # Input might be given as Windows format, start by converting to
30467  # unix format.
30468  path="$FREETYPELOCATION"
30469  new_path=`$CYGPATH -u "$path"`
30470
30471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30474  # "foo.exe" is OK but "foo" is an error.
30475  #
30476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30477  # It is also a way to make sure we got the proper file name for the real test later on.
30478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30479  if test "x$test_shortpath" = x; then
30480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30481$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30482    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30483  fi
30484
30485  # Call helper function which possibly converts this using DOS-style short mode.
30486  # If so, the updated path is stored in $new_path.
30487
30488  input_path="$new_path"
30489  # Check if we need to convert this using DOS-style short mode. If the path
30490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30491  # take no chances and rewrite it.
30492  # Note: m4 eats our [], so we need to use [ and ] instead.
30493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30494  if test "x$has_forbidden_chars" != x; then
30495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30499      # Going to short mode and back again did indeed matter. Since short mode is
30500      # case insensitive, let's make it lowercase to improve readability.
30501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30502      # Now convert it back to Unix-stile (cygpath)
30503      input_path=`$CYGPATH -u "$shortmode_path"`
30504      new_path="$input_path"
30505    fi
30506  fi
30507
30508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30509  if test "x$test_cygdrive_prefix" = x; then
30510    # As a simple fix, exclude /usr/bin since it's not a real path.
30511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30513      # a path prefixed by /cygdrive for fixpath to work.
30514      new_path="$CYGWIN_ROOT_PATH$input_path"
30515    fi
30516  fi
30517
30518
30519  if test "x$path" != "x$new_path"; then
30520    FREETYPELOCATION="$new_path"
30521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30522$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30523  fi
30524
30525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30526
30527  path="$FREETYPELOCATION"
30528  has_colon=`$ECHO $path | $GREP ^.:`
30529  new_path="$path"
30530  if test "x$has_colon" = x; then
30531    # Not in mixed or Windows style, start by that.
30532    new_path=`cmd //c echo $path`
30533  fi
30534
30535
30536  input_path="$new_path"
30537  # Check if we need to convert this using DOS-style short mode. If the path
30538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30539  # take no chances and rewrite it.
30540  # Note: m4 eats our [], so we need to use [ and ] instead.
30541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30542  if test "x$has_forbidden_chars" != x; then
30543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30545  fi
30546
30547
30548  windows_path="$new_path"
30549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30550    unix_path=`$CYGPATH -u "$windows_path"`
30551    new_path="$unix_path"
30552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30554    new_path="$unix_path"
30555  fi
30556
30557  if test "x$path" != "x$new_path"; then
30558    FREETYPELOCATION="$new_path"
30559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30560$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30561  fi
30562
30563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30565
30566  else
30567    # We're on a posix platform. Hooray! :)
30568    path="$FREETYPELOCATION"
30569
30570    if test ! -f "$path" && test ! -d "$path"; then
30571      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30572    fi
30573
30574    has_space=`$ECHO "$path" | $GREP " "`
30575    if test "x$has_space" != x; then
30576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30577$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30578      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30579    fi
30580  fi
30581
30582	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30583$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30584	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30585	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30586	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30587 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30588                if ! test -s "$FREETYPE2_LIBS"; then
30589		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30590		fi
30591                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30592		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30593		fi
30594                USING_SYSTEM_FT_LIB=true
30595                FREETYPE2_FOUND=yes
30596	    fi
30597	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30598$as_echo "$FREETYPE2_FOUND" >&6; }
30599        fi
30600	if test "x$FREETYPE2_FOUND" = xno; then
30601
30602pkg_failed=no
30603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30604$as_echo_n "checking for FREETYPE2... " >&6; }
30605
30606if test -n "$FREETYPE2_CFLAGS"; then
30607    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30608 elif test -n "$PKG_CONFIG"; then
30609    if test -n "$PKG_CONFIG" && \
30610    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30611  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30612  ac_status=$?
30613  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30614  test $ac_status = 0; }; then
30615  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30616else
30617  pkg_failed=yes
30618fi
30619 else
30620    pkg_failed=untried
30621fi
30622if test -n "$FREETYPE2_LIBS"; then
30623    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30624 elif test -n "$PKG_CONFIG"; then
30625    if test -n "$PKG_CONFIG" && \
30626    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30627  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30628  ac_status=$?
30629  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30630  test $ac_status = 0; }; then
30631  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30632else
30633  pkg_failed=yes
30634fi
30635 else
30636    pkg_failed=untried
30637fi
30638
30639
30640
30641if test $pkg_failed = yes; then
30642
30643if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30644        _pkg_short_errors_supported=yes
30645else
30646        _pkg_short_errors_supported=no
30647fi
30648        if test $_pkg_short_errors_supported = yes; then
30649	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30650        else
30651	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30652        fi
30653	# Put the nasty error message in config.log where it belongs
30654	echo "$FREETYPE2_PKG_ERRORS" >&5
30655
30656	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30657$as_echo "no" >&6; }
30658                FREETYPE2_FOUND=no
30659elif test $pkg_failed = untried; then
30660	FREETYPE2_FOUND=no
30661else
30662	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30663	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30665$as_echo "yes" >&6; }
30666	FREETYPE2_FOUND=yes
30667fi
30668            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30669            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30670            USING_SYSTEM_FT_LIB=true
30671            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30672            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30673              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30674            fi
30675	fi
30676	if test "x$FREETYPE2_FOUND" = xno; then
30677	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30678$as_echo_n "checking for freetype in some standard locations... " >&6; }
30679
30680	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30681	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30682	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30683	    fi
30684	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30685	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30686	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30687	    fi
30688
30689	    PREV_CXXCFLAGS="$CXXFLAGS"
30690	    PREV_LDFLAGS="$LDFLAGS"
30691	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30692	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30693	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30694/* end confdefs.h.  */
30695#include<ft2build.h>
30696	                    #include FT_FREETYPE_H
30697	                   int main() { return 0; }
30698
30699_ACEOF
30700if ac_fn_cxx_try_link "$LINENO"; then :
30701
30702	                      # Yes, the default cflags and libs did the trick.
30703	                      FREETYPE2_FOUND=yes
30704	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30705	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30706
30707else
30708
30709	                      FREETYPE2_FOUND=no
30710
30711fi
30712rm -f core conftest.err conftest.$ac_objext \
30713    conftest$ac_exeext conftest.$ac_ext
30714            CXXCFLAGS="$PREV_CXXFLAGS"
30715	    LDFLAGS="$PREV_LDFLAGS"
30716	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30717$as_echo "$FREETYPE2_FOUND" >&6; }
30718            USING_SYSTEM_FT_LIB=true
30719	fi
30720	if test "x$FREETYPE2_FOUND" = xno; then
30721
30722    # Print a helpful message on how to acquire the necessary build dependency.
30723    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30724    MISSING_DEPENDENCY=freetype2
30725    PKGHANDLER_COMMAND=
30726
30727    case $PKGHANDLER in
30728	apt-get)
30729                apt_help     $MISSING_DEPENDENCY ;;
30730    yum)
30731                yum_help     $MISSING_DEPENDENCY ;;
30732	port)
30733                port_help    $MISSING_DEPENDENCY ;;
30734	pkgutil)
30735                pkgutil_help $MISSING_DEPENDENCY ;;
30736	pkgadd)
30737                pkgadd_help  $MISSING_DEPENDENCY ;;
30738    * )
30739      break ;;
30740    esac
30741
30742    if test "x$PKGHANDLER_COMMAND" != x; then
30743        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30744    fi
30745
30746		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30747	fi
30748
30749        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30750            # AC_CHECK_LIB does not support use of cl.exe
30751            PREV_LDFLAGS="$LDFLAGS"
30752            LDFLAGS="$FREETYPE2_LIBS"
30753            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30754$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30755if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
30756  $as_echo_n "(cached) " >&6
30757else
30758  ac_check_lib_save_LIBS=$LIBS
30759LIBS="-lfreetype  $LIBS"
30760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30761/* end confdefs.h.  */
30762
30763/* Override any GCC internal prototype to avoid an error.
30764   Use char because int might match the return type of a GCC
30765   builtin and then its argument prototype would still apply.  */
30766#ifdef __cplusplus
30767extern "C"
30768#endif
30769char FT_Init_FreeType ();
30770int
30771main ()
30772{
30773return FT_Init_FreeType ();
30774  ;
30775  return 0;
30776}
30777_ACEOF
30778if ac_fn_cxx_try_link "$LINENO"; then :
30779  ac_cv_lib_freetype_FT_Init_FreeType=yes
30780else
30781  ac_cv_lib_freetype_FT_Init_FreeType=no
30782fi
30783rm -f core conftest.err conftest.$ac_objext \
30784    conftest$ac_exeext conftest.$ac_ext
30785LIBS=$ac_check_lib_save_LIBS
30786fi
30787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30788$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30789if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
30790  FREETYPE2_FOUND=true
30791else
30792  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30793fi
30794
30795            LDFLAGS="$PREV_LDFLAGS"
30796        fi
30797fi
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807###############################################################################
30808#
30809# Check for alsa headers and libraries. Used on Linux/GNU systems.
30810#
30811
30812# Check whether --with-alsa was given.
30813if test "${with_alsa+set}" = set; then :
30814  withval=$with_alsa;
30815fi
30816
30817
30818# Check whether --with-alsa-include was given.
30819if test "${with_alsa_include+set}" = set; then :
30820  withval=$with_alsa_include;
30821fi
30822
30823
30824# Check whether --with-alsa-lib was given.
30825if test "${with_alsa_lib+set}" = set; then :
30826  withval=$with_alsa_lib;
30827fi
30828
30829
30830if test "x$ALSA_NOT_NEEDED" = xyes; then
30831	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30832		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30833$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30834	fi
30835	ALSA_CFLAGS=
30836	ALSA_LIBS=
30837else
30838	ALSA_FOUND=no
30839
30840	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30841	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30842	fi
30843
30844	if test "x${with_alsa}" != x; then
30845	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30846	    ALSA_CFLAGS="-I${with_alsa}/include"
30847	    ALSA_FOUND=yes
30848	fi
30849	if test "x${with_alsa_include}" != x; then
30850	    ALSA_CFLAGS="-I${with_alsa_include}"
30851	    ALSA_FOUND=yes
30852	fi
30853	if test "x${with_alsa_lib}" != x; then
30854	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30855	    ALSA_FOUND=yes
30856	fi
30857	if test "x$ALSA_FOUND" = xno; then
30858
30859
30860    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30861        # Source the builddeps file again, to make sure it uses the latest variables!
30862        . $builddepsfile
30863        # Look for a target and build machine specific resource!
30864        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30865        if test "x$resource" = x; then
30866            # Ok, lets instead look for a target specific resource
30867            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30868        fi
30869        if test "x$resource" = x; then
30870            # Ok, lets instead look for a build specific resource
30871            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30872        fi
30873        if test "x$resource" = x; then
30874            # Ok, lets instead look for a generic resource
30875            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30876            resource=${builddep_alsa}
30877        fi
30878        if test "x$resource" != x; then
30879            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30880$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30881	    # If the resource in the builddeps.conf file is an existing directory,
30882	    # for example /java/linux/cups
30883	    if test -d ${resource}; then
30884	       depdir=${resource}
30885	    else
30886
30887# alsa is for example mymodule
30888# $resource is for example libs/general/libmymod_1_2_3.zip
30889# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30890# $with_builddeps_dir is for example /localhome/builddeps
30891# depdir is the name of the variable into which we store the depdir, eg MYMOD
30892# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30893# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30894    filename=`basename $resource`
30895    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30896    filebase=${filename%%.*}
30897    extension=${filename#*.}
30898    installdir=$with_builddeps_dir/$filebase
30899    if test ! -f $installdir/$filename.unpacked; then
30900        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30901$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30902        if test ! -d $installdir; then
30903            mkdir -p $installdir
30904        fi
30905        if test ! -d $installdir; then
30906            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30907        fi
30908        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30909        touch $tmpfile
30910        if test ! -f $tmpfile; then
30911            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30912        fi
30913
30914    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30915    # $tmpfile is the local file name for the downloaded file.
30916    VALID_TOOL=no
30917    if test "x$BDEPS_FTP" = xwget; then
30918       VALID_TOOL=yes
30919       wget -O $tmpfile $with_builddeps_server/$resource
30920    fi
30921    if test "x$BDEPS_FTP" = xlftp; then
30922       VALID_TOOL=yes
30923       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30924    fi
30925    if test "x$BDEPS_FTP" = xftp; then
30926        VALID_TOOL=yes
30927        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30928        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30929        FTPUSERPWD=${FTPSERVER%%@*}
30930        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30931            FTPUSER=${userpwd%%:*}
30932            FTPPWD=${userpwd#*@}
30933            FTPSERVER=${FTPSERVER#*@}
30934        else
30935            FTPUSER=ftp
30936            FTPPWD=ftp
30937        fi
30938        # the "pass" command does not work on some
30939        # ftp clients (read ftp.exe) but if it works,
30940        # passive mode is better!
30941        (\
30942            echo "user $FTPUSER $FTPPWD"        ;\
30943            echo "pass"                         ;\
30944            echo "bin"                          ;\
30945            echo "get $FTPPATH $tmpfile"              ;\
30946        ) | ftp -in $FTPSERVER
30947    fi
30948    if test "x$VALID_TOOL" != xyes; then
30949       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30950    fi
30951
30952        mv $tmpfile $installdir/$filename
30953        if test ! -s $installdir/$filename; then
30954            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30955        fi
30956        case "$extension" in
30957            zip)  echo "Unzipping $installdir/$filename..."
30958               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30959            ;;
30960            tar.gz) echo "Untaring $installdir/$filename..."
30961               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30962            ;;
30963            tgz) echo "Untaring $installdir/$filename..."
30964               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30965            ;;
30966            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30967            ;;
30968        esac
30969    fi
30970    if test -f $installdir/$filename.unpacked; then
30971        depdir=$installdir
30972    fi
30973
30974	    fi
30975            # Source the builddeps file again, because in the previous command, the depdir
30976            # was updated to point at the current build dependency install directory.
30977            . $builddepsfile
30978            # Now extract variables from the builddeps.conf files.
30979            theroot=${builddep_alsa_ROOT}
30980            thecflags=${builddep_alsa_CFLAGS}
30981            thelibs=${builddep_alsa_LIBS}
30982            if test "x$depdir" = x; then
30983                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30984            fi
30985            ALSA=$depdir
30986            if test "x$theroot" != x; then
30987               ALSA="$theroot"
30988            fi
30989            if test "x$thecflags" != x; then
30990               ALSA_CFLAGS="$thecflags"
30991            fi
30992            if test "x$thelibs" != x; then
30993               ALSA_LIBS="$thelibs"
30994            fi
30995            ALSA_FOUND=yes
30996            else ALSA_FOUND=no
30997
30998        fi
30999        else ALSA_FOUND=no
31000
31001    fi
31002
31003	fi
31004	if test "x$ALSA_FOUND" = xno; then
31005
31006pkg_failed=no
31007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31008$as_echo_n "checking for ALSA... " >&6; }
31009
31010if test -n "$ALSA_CFLAGS"; then
31011    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31012 elif test -n "$PKG_CONFIG"; then
31013    if test -n "$PKG_CONFIG" && \
31014    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31015  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31016  ac_status=$?
31017  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31018  test $ac_status = 0; }; then
31019  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31020else
31021  pkg_failed=yes
31022fi
31023 else
31024    pkg_failed=untried
31025fi
31026if test -n "$ALSA_LIBS"; then
31027    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31028 elif test -n "$PKG_CONFIG"; then
31029    if test -n "$PKG_CONFIG" && \
31030    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31031  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31032  ac_status=$?
31033  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31034  test $ac_status = 0; }; then
31035  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31036else
31037  pkg_failed=yes
31038fi
31039 else
31040    pkg_failed=untried
31041fi
31042
31043
31044
31045if test $pkg_failed = yes; then
31046
31047if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31048        _pkg_short_errors_supported=yes
31049else
31050        _pkg_short_errors_supported=no
31051fi
31052        if test $_pkg_short_errors_supported = yes; then
31053	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31054        else
31055	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31056        fi
31057	# Put the nasty error message in config.log where it belongs
31058	echo "$ALSA_PKG_ERRORS" >&5
31059
31060	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31061$as_echo "no" >&6; }
31062                ALSA_FOUND=no
31063elif test $pkg_failed = untried; then
31064	ALSA_FOUND=no
31065else
31066	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31067	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31069$as_echo "yes" >&6; }
31070	ALSA_FOUND=yes
31071fi
31072	fi
31073	if test "x$ALSA_FOUND" = xno; then
31074	    for ac_header in alsa/asoundlib.h
31075do :
31076  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31077if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31078  cat >>confdefs.h <<_ACEOF
31079#define HAVE_ALSA_ASOUNDLIB_H 1
31080_ACEOF
31081 ALSA_FOUND=yes
31082	                      ALSA_CFLAGS=-Iignoreme
31083	                      ALSA_LIBS=-lasound
31084	                      DEFAULT_ALSA=yes
31085else
31086  ALSA_FOUND=no
31087fi
31088
31089done
31090
31091	fi
31092	if test "x$ALSA_FOUND" = xno; then
31093
31094    # Print a helpful message on how to acquire the necessary build dependency.
31095    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31096    MISSING_DEPENDENCY=alsa
31097    PKGHANDLER_COMMAND=
31098
31099    case $PKGHANDLER in
31100	apt-get)
31101                apt_help     $MISSING_DEPENDENCY ;;
31102    yum)
31103                yum_help     $MISSING_DEPENDENCY ;;
31104	port)
31105                port_help    $MISSING_DEPENDENCY ;;
31106	pkgutil)
31107                pkgutil_help $MISSING_DEPENDENCY ;;
31108	pkgadd)
31109                pkgadd_help  $MISSING_DEPENDENCY ;;
31110    * )
31111      break ;;
31112    esac
31113
31114    if test "x$PKGHANDLER_COMMAND" != x; then
31115        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31116    fi
31117
31118	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31119	fi
31120fi
31121
31122
31123
31124
31125
31126
31127
31128###############################################################################
31129#
31130# Check for the jpeg library
31131#
31132
31133USE_EXTERNAL_LIBJPEG=true
31134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31135$as_echo_n "checking for main in -ljpeg... " >&6; }
31136if ${ac_cv_lib_jpeg_main+:} false; then :
31137  $as_echo_n "(cached) " >&6
31138else
31139  ac_check_lib_save_LIBS=$LIBS
31140LIBS="-ljpeg  $LIBS"
31141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31142/* end confdefs.h.  */
31143
31144
31145int
31146main ()
31147{
31148return main ();
31149  ;
31150  return 0;
31151}
31152_ACEOF
31153if ac_fn_cxx_try_link "$LINENO"; then :
31154  ac_cv_lib_jpeg_main=yes
31155else
31156  ac_cv_lib_jpeg_main=no
31157fi
31158rm -f core conftest.err conftest.$ac_objext \
31159    conftest$ac_exeext conftest.$ac_ext
31160LIBS=$ac_check_lib_save_LIBS
31161fi
31162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31163$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31164if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31165  cat >>confdefs.h <<_ACEOF
31166#define HAVE_LIBJPEG 1
31167_ACEOF
31168
31169  LIBS="-ljpeg $LIBS"
31170
31171else
31172   USE_EXTERNAL_LIBJPEG=false
31173               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31174$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31175
31176fi
31177
31178
31179
31180###############################################################################
31181#
31182# Check for the gif library
31183#
31184
31185
31186# Check whether --with-giflib was given.
31187if test "${with_giflib+set}" = set; then :
31188  withval=$with_giflib;
31189fi
31190
31191
31192
31193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31194$as_echo_n "checking for which giflib to use... " >&6; }
31195
31196# default is bundled
31197DEFAULT_GIFLIB=bundled
31198
31199#
31200# if user didn't specify, use DEFAULT_GIFLIB
31201#
31202if test "x${with_giflib}" = "x"; then
31203    with_giflib=${DEFAULT_GIFLIB}
31204fi
31205
31206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31207$as_echo "${with_giflib}" >&6; }
31208
31209if test "x${with_giflib}" = "xbundled"; then
31210    USE_EXTERNAL_LIBGIF=false
31211elif test "x${with_giflib}" = "xsystem"; then
31212    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31213if test "x$ac_cv_header_gif_lib_h" = xyes; then :
31214
31215else
31216   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31217fi
31218
31219
31220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31221$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31222if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
31223  $as_echo_n "(cached) " >&6
31224else
31225  ac_check_lib_save_LIBS=$LIBS
31226LIBS="-lgif  $LIBS"
31227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31228/* end confdefs.h.  */
31229
31230/* Override any GCC internal prototype to avoid an error.
31231   Use char because int might match the return type of a GCC
31232   builtin and then its argument prototype would still apply.  */
31233#ifdef __cplusplus
31234extern "C"
31235#endif
31236char DGifGetCode ();
31237int
31238main ()
31239{
31240return DGifGetCode ();
31241  ;
31242  return 0;
31243}
31244_ACEOF
31245if ac_fn_cxx_try_link "$LINENO"; then :
31246  ac_cv_lib_gif_DGifGetCode=yes
31247else
31248  ac_cv_lib_gif_DGifGetCode=no
31249fi
31250rm -f core conftest.err conftest.$ac_objext \
31251    conftest$ac_exeext conftest.$ac_ext
31252LIBS=$ac_check_lib_save_LIBS
31253fi
31254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31255$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31256if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
31257  cat >>confdefs.h <<_ACEOF
31258#define HAVE_LIBGIF 1
31259_ACEOF
31260
31261  LIBS="-lgif $LIBS"
31262
31263else
31264   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31265fi
31266
31267
31268    USE_EXTERNAL_LIBGIF=true
31269else
31270    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31271fi
31272
31273
31274###############################################################################
31275#
31276# Check for the zlib library
31277#
31278
31279
31280# Check whether --with-zlib was given.
31281if test "${with_zlib+set}" = set; then :
31282  withval=$with_zlib;
31283fi
31284
31285
31286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31287$as_echo_n "checking for compress in -lz... " >&6; }
31288if ${ac_cv_lib_z_compress+:} false; then :
31289  $as_echo_n "(cached) " >&6
31290else
31291  ac_check_lib_save_LIBS=$LIBS
31292LIBS="-lz  $LIBS"
31293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31294/* end confdefs.h.  */
31295
31296/* Override any GCC internal prototype to avoid an error.
31297   Use char because int might match the return type of a GCC
31298   builtin and then its argument prototype would still apply.  */
31299#ifdef __cplusplus
31300extern "C"
31301#endif
31302char compress ();
31303int
31304main ()
31305{
31306return compress ();
31307  ;
31308  return 0;
31309}
31310_ACEOF
31311if ac_fn_cxx_try_link "$LINENO"; then :
31312  ac_cv_lib_z_compress=yes
31313else
31314  ac_cv_lib_z_compress=no
31315fi
31316rm -f core conftest.err conftest.$ac_objext \
31317    conftest$ac_exeext conftest.$ac_ext
31318LIBS=$ac_check_lib_save_LIBS
31319fi
31320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31321$as_echo "$ac_cv_lib_z_compress" >&6; }
31322if test "x$ac_cv_lib_z_compress" = xyes; then :
31323   ZLIB_FOUND=yes
31324else
31325   ZLIB_FOUND=no
31326fi
31327
31328
31329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31330$as_echo_n "checking for which zlib to use... " >&6; }
31331
31332DEFAULT_ZLIB=bundled
31333if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31334#
31335# On macosx default is system...on others default is
31336#
31337    DEFAULT_ZLIB=system
31338fi
31339
31340if test "x${ZLIB_FOUND}" != "xyes"; then
31341#
31342# If we don't find any system...set default to bundled
31343#
31344    DEFAULT_ZLIB=bundled
31345fi
31346
31347#
31348# If user didn't specify, use DEFAULT_ZLIB
31349#
31350if test "x${with_zlib}" = "x"; then
31351    with_zlib=${DEFAULT_ZLIB}
31352fi
31353
31354if test "x${with_zlib}" = "xbundled"; then
31355    USE_EXTERNAL_LIBZ=false
31356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31357$as_echo "bundled" >&6; }
31358elif test "x${with_zlib}" = "xsystem"; then
31359    if test "x${ZLIB_FOUND}" = "xyes"; then
31360        USE_EXTERNAL_LIBZ=true
31361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31362$as_echo "system" >&6; }
31363    else
31364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31365$as_echo "system not found" >&6; }
31366        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31367    fi
31368else
31369    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31370fi
31371
31372
31373
31374###############################################################################
31375LIBZIP_CAN_USE_MMAP=true
31376
31377
31378
31379###############################################################################
31380#
31381# Check if altzone exists in time.h
31382#
31383
31384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31385/* end confdefs.h.  */
31386#include <time.h>
31387int
31388main ()
31389{
31390return (int)altzone;
31391  ;
31392  return 0;
31393}
31394_ACEOF
31395if ac_fn_cxx_try_link "$LINENO"; then :
31396  has_altzone=yes
31397else
31398  has_altzone=no
31399fi
31400rm -f core conftest.err conftest.$ac_objext \
31401    conftest$ac_exeext conftest.$ac_ext
31402if test "x$has_altzone" = xyes; then
31403
31404$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
31405
31406fi
31407
31408###############################################################################
31409#
31410# Check the maths library
31411#
31412
31413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
31414$as_echo_n "checking for cos in -lm... " >&6; }
31415if ${ac_cv_lib_m_cos+:} false; then :
31416  $as_echo_n "(cached) " >&6
31417else
31418  ac_check_lib_save_LIBS=$LIBS
31419LIBS="-lm  $LIBS"
31420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31421/* end confdefs.h.  */
31422
31423/* Override any GCC internal prototype to avoid an error.
31424   Use char because int might match the return type of a GCC
31425   builtin and then its argument prototype would still apply.  */
31426#ifdef __cplusplus
31427extern "C"
31428#endif
31429char cos ();
31430int
31431main ()
31432{
31433return cos ();
31434  ;
31435  return 0;
31436}
31437_ACEOF
31438if ac_fn_cxx_try_link "$LINENO"; then :
31439  ac_cv_lib_m_cos=yes
31440else
31441  ac_cv_lib_m_cos=no
31442fi
31443rm -f core conftest.err conftest.$ac_objext \
31444    conftest$ac_exeext conftest.$ac_ext
31445LIBS=$ac_check_lib_save_LIBS
31446fi
31447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
31448$as_echo "$ac_cv_lib_m_cos" >&6; }
31449if test "x$ac_cv_lib_m_cos" = xyes; then :
31450  cat >>confdefs.h <<_ACEOF
31451#define HAVE_LIBM 1
31452_ACEOF
31453
31454  LIBS="-lm $LIBS"
31455
31456else
31457
31458                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
31459$as_echo "$as_me: Maths library was not found" >&6;}
31460
31461fi
31462
31463
31464
31465###############################################################################
31466#
31467# Check for libdl.so
31468
31469save_LIBS="$LIBS"
31470LIBS=""
31471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
31472$as_echo_n "checking for dlopen in -ldl... " >&6; }
31473if ${ac_cv_lib_dl_dlopen+:} false; then :
31474  $as_echo_n "(cached) " >&6
31475else
31476  ac_check_lib_save_LIBS=$LIBS
31477LIBS="-ldl  $LIBS"
31478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31479/* end confdefs.h.  */
31480
31481/* Override any GCC internal prototype to avoid an error.
31482   Use char because int might match the return type of a GCC
31483   builtin and then its argument prototype would still apply.  */
31484#ifdef __cplusplus
31485extern "C"
31486#endif
31487char dlopen ();
31488int
31489main ()
31490{
31491return dlopen ();
31492  ;
31493  return 0;
31494}
31495_ACEOF
31496if ac_fn_cxx_try_link "$LINENO"; then :
31497  ac_cv_lib_dl_dlopen=yes
31498else
31499  ac_cv_lib_dl_dlopen=no
31500fi
31501rm -f core conftest.err conftest.$ac_objext \
31502    conftest$ac_exeext conftest.$ac_ext
31503LIBS=$ac_check_lib_save_LIBS
31504fi
31505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
31506$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
31507if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
31508  cat >>confdefs.h <<_ACEOF
31509#define HAVE_LIBDL 1
31510_ACEOF
31511
31512  LIBS="-ldl $LIBS"
31513
31514fi
31515
31516LIBDL="$LIBS"
31517
31518LIBS="$save_LIBS"
31519
31520
31521
31522###############################################################################
31523#
31524# statically link libstdc++ before C++ ABI is stablized on Linux unless
31525# dynamic build is configured on command line.
31526#
31527
31528# Check whether --with-stdc++lib was given.
31529if test "${with_stdc__lib+set}" = set; then :
31530  withval=$with_stdc__lib;
31531    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31532        && test "x$with_stdc__lib" != xdefault; then
31533      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31534    fi
31535
31536else
31537  with_stdc__lib=default
31538
31539fi
31540
31541
31542if test "x$OPENJDK_TARGET_OS" = xlinux; then
31543    # Test if -lstdc++ works.
31544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31545$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31546    ac_ext=cpp
31547ac_cpp='$CXXCPP $CPPFLAGS'
31548ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31549ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31550ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31551
31552    OLD_CXXFLAGS="$CXXFLAGS"
31553    CXXFLAGS="$CXXFLAGS -lstdc++"
31554    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31555/* end confdefs.h.  */
31556
31557int
31558main ()
31559{
31560return 0;
31561  ;
31562  return 0;
31563}
31564_ACEOF
31565if ac_fn_cxx_try_link "$LINENO"; then :
31566  has_dynamic_libstdcxx=yes
31567else
31568  has_dynamic_libstdcxx=no
31569fi
31570rm -f core conftest.err conftest.$ac_objext \
31571    conftest$ac_exeext conftest.$ac_ext
31572    CXXFLAGS="$OLD_CXXFLAGS"
31573    ac_ext=cpp
31574ac_cpp='$CXXCPP $CPPFLAGS'
31575ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31576ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31577ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31578
31579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31580$as_echo "$has_dynamic_libstdcxx" >&6; }
31581
31582    # Test if stdc++ can be linked statically.
31583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31584$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31585    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31586    ac_ext=cpp
31587ac_cpp='$CXXCPP $CPPFLAGS'
31588ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31589ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31590ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31591
31592    OLD_LIBS="$LIBS"
31593    OLD_CXX="$CXX"
31594    LIBS="$STATIC_STDCXX_FLAGS"
31595    CXX="$CC"
31596    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31597/* end confdefs.h.  */
31598
31599int
31600main ()
31601{
31602return 0;
31603  ;
31604  return 0;
31605}
31606_ACEOF
31607if ac_fn_cxx_try_link "$LINENO"; then :
31608  has_static_libstdcxx=yes
31609else
31610  has_static_libstdcxx=no
31611fi
31612rm -f core conftest.err conftest.$ac_objext \
31613    conftest$ac_exeext conftest.$ac_ext
31614    LIBS="$OLD_LIBS"
31615    CXX="$OLD_CXX"
31616    ac_ext=cpp
31617ac_cpp='$CXXCPP $CPPFLAGS'
31618ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31619ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31620ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31621
31622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31623$as_echo "$has_static_libstdcxx" >&6; }
31624
31625    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31626        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31627    fi
31628
31629    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31630        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31631    fi
31632
31633    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31634        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31635    fi
31636
31637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31638$as_echo_n "checking how to link with libstdc++... " >&6; }
31639    # If dynamic was requested, it's available since it would fail above otherwise.
31640    # If dynamic wasn't requested, go with static unless it isn't available.
31641    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31642        LIBCXX="$LIBCXX -lstdc++"
31643        LDCXX="$CXX"
31644        STATIC_CXX_SETTING="STATIC_CXX=false"
31645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31646$as_echo "dynamic" >&6; }
31647    else
31648        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31649        LDCXX="$CC"
31650        STATIC_CXX_SETTING="STATIC_CXX=true"
31651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31652$as_echo "static" >&6; }
31653    fi
31654fi
31655
31656
31657# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31658if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31659    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31660fi
31661
31662# TODO better (platform agnostic) test
31663if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31664    LIBCXX="-lstdc++"
31665fi
31666
31667
31668
31669
31670
31671# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31672
31673# When using cygwin or msys, we need a wrapper binary that renames
31674# /cygdrive/c/ arguments into c:/ arguments and peeks into
31675# @files and rewrites these too! This wrapper binary is
31676# called fixpath.
31677FIXPATH=
31678if test "x$OPENJDK_BUILD_OS" = xwindows; then
31679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31680$as_echo_n "checking if fixpath can be created... " >&6; }
31681    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31682    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31683    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31684      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31685      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31686      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31687      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31688    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31689      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31690      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31691
31692      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31693      # @ was chosen as separator to minimize risk of other tools messing around with it
31694      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31695      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31696
31697      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31698    fi
31699    rm -f $OUTPUT_ROOT/fixpath*
31700    cd $OUTPUT_ROOT
31701    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31702    cd $CURDIR
31703
31704    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31706$as_echo "no" >&6; }
31707        cat $OUTPUT_ROOT/fixpath1.log
31708        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31709    fi
31710    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31711$as_echo "yes" >&6; }
31712    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31713$as_echo_n "checking if fixpath.exe works... " >&6; }
31714    cd $OUTPUT_ROOT
31715    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31716    cd $CURDIR
31717    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31719$as_echo "no" >&6; }
31720        cat $OUTPUT_ROOT/fixpath2.log
31721        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31722    fi
31723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31724$as_echo "yes" >&6; }
31725    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31726fi
31727
31728
31729
31730
31731###############################################################################
31732#
31733# We need to do some final tweaking, when everything else is done.
31734#
31735###############################################################################
31736
31737
31738HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31739
31740
31741# The name of the Service Agent jar.
31742SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31743if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31744  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31745fi
31746
31747
31748
31749
31750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
31751$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
31752
31753if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
31754    ENABLE_INTREE_EC=yes
31755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31756$as_echo "yes" >&6; }
31757else
31758    ENABLE_INTREE_EC=no
31759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31760$as_echo "no" >&6; }
31761fi
31762
31763
31764
31765
31766###############################################################################
31767#
31768# Configure parts of the build that only affect the build performance,
31769# not the result.
31770#
31771###############################################################################
31772
31773
31774  # How many cores do we have on this build system?
31775
31776# Check whether --with-num-cores was given.
31777if test "${with_num_cores+set}" = set; then :
31778  withval=$with_num_cores;
31779fi
31780
31781  if test "x$with_num_cores" = x; then
31782    # The number of cores were not specified, try to probe them.
31783
31784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31785$as_echo_n "checking for number of cores... " >&6; }
31786    NUM_CORES=1
31787    FOUND_CORES=no
31788
31789    if test -f /proc/cpuinfo; then
31790        # Looks like a Linux (or cygwin) system
31791        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31792        FOUND_CORES=yes
31793    elif test -x /usr/sbin/psrinfo; then
31794        # Looks like a Solaris system
31795        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31796        FOUND_CORES=yes
31797    elif test -x /usr/sbin/system_profiler; then
31798        # Looks like a MacOSX system
31799        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31800        FOUND_CORES=yes
31801    elif test -n "$NUMBER_OF_PROCESSORS"; then
31802        # On windows, look in the env
31803        NUM_CORES=$NUMBER_OF_PROCESSORS
31804        FOUND_CORES=yes
31805    fi
31806
31807    if test "x$FOUND_CORES" = xyes; then
31808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31809$as_echo "$NUM_CORES" >&6; }
31810    else
31811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31812$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31813        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31814$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31815    fi
31816
31817
31818  else
31819    NUM_CORES=$with_num_cores
31820  fi
31821
31822
31823
31824  # How much memory do we have on this build system?
31825
31826# Check whether --with-memory-size was given.
31827if test "${with_memory_size+set}" = set; then :
31828  withval=$with_memory_size;
31829fi
31830
31831  if test "x$with_memory_size" = x; then
31832    # The memory size was not specified, try to probe it.
31833
31834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31835$as_echo_n "checking for memory size... " >&6; }
31836    # Default to 1024 MB
31837    MEMORY_SIZE=1024
31838    FOUND_MEM=no
31839
31840    if test -f /proc/meminfo; then
31841        # Looks like a Linux (or cygwin) system
31842        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31843        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31844        FOUND_MEM=yes
31845    elif test -x /usr/sbin/prtconf; then
31846        # Looks like a Solaris system
31847        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31848        FOUND_MEM=yes
31849    elif test -x /usr/sbin/system_profiler; then
31850        # Looks like a MacOSX system
31851        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31852        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31853        FOUND_MEM=yes
31854    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31855        # Windows, but without cygwin
31856        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31857        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31858        FOUND_MEM=yes
31859    fi
31860
31861    if test "x$FOUND_MEM" = xyes; then
31862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31863$as_echo "$MEMORY_SIZE MB" >&6; }
31864    else
31865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31866$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31867        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31868$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31869    fi
31870
31871  else
31872    MEMORY_SIZE=$with_memory_size
31873  fi
31874
31875
31876
31877  # Provide a decent default number of parallel jobs for make depending on
31878  # number of cores, amount of memory and machine architecture.
31879
31880# Check whether --with-jobs was given.
31881if test "${with_jobs+set}" = set; then :
31882  withval=$with_jobs;
31883fi
31884
31885  if test "x$with_jobs" = x; then
31886    # Number of jobs was not specified, calculate.
31887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
31888$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
31889    # Approximate memory in GB, rounding up a bit.
31890    memory_gb=`expr $MEMORY_SIZE / 1100`
31891    # Pick the lowest of memory in gb and number of cores.
31892    if test "$memory_gb" -lt "$NUM_CORES"; then
31893      JOBS="$memory_gb"
31894    else
31895      JOBS="$NUM_CORES"
31896      # On bigger machines, leave some room for other processes to run
31897      if test "$JOBS" -gt "4"; then
31898        JOBS=`expr $JOBS '*' 90 / 100`
31899      fi
31900    fi
31901    # Cap number of jobs to 16
31902    if test "$JOBS" -gt "16"; then
31903      JOBS=16
31904    fi
31905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
31906$as_echo "$JOBS" >&6; }
31907  else
31908    JOBS=$with_jobs
31909  fi
31910
31911
31912
31913# Setup smart javac (after cores and memory have been setup)
31914
31915
31916# Check whether --with-sjavac-server-java was given.
31917if test "${with_sjavac_server_java+set}" = set; then :
31918  withval=$with_sjavac_server_java;
31919fi
31920
31921
31922if test "x$with_sjavac_server_java" != x; then
31923    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31924    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31925    if test "x$FOUND_VERSION" = x; then
31926        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31927    fi
31928else
31929    SJAVAC_SERVER_JAVA=""
31930    # Hotspot specific options.
31931
31932    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31933    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31934    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31935    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31936    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31937        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31938    fi
31939
31940    # JRockit specific options.
31941
31942    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31943    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31944    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31945    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31946    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31947        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31948    fi
31949
31950    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31951fi
31952
31953
31954
31955# Check whether --with-sjavac-server-cores was given.
31956if test "${with_sjavac_server_cores+set}" = set; then :
31957  withval=$with_sjavac_server_cores;
31958fi
31959
31960if test "x$with_sjavac_server_cores" != x; then
31961    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31962else
31963    if test "$NUM_CORES" -gt 16; then
31964        # We set this arbitrary limit because we want to limit the heap
31965        # size of the javac server.
31966        # In the future we will make the javac compilers in the server
31967        # share more and more state, thus enabling us to use more and
31968        # more concurrent threads in the server.
31969        SJAVAC_SERVER_CORES="16"
31970    else
31971        SJAVAC_SERVER_CORES="$NUM_CORES"
31972    fi
31973
31974    if test "$MEMORY_SIZE" -gt "17000"; then
31975        MAX_HEAP_MEM=10000
31976
31977    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31978    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31979    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31980    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31981    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31982        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31983    fi
31984
31985
31986    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31987    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31988    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31989    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31990    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31991        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31992    fi
31993
31994    elif test "$MEMORY_SIZE" -gt "10000"; then
31995        MAX_HEAP_MEM=6000
31996
31997    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31998    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31999    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32000    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32001    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32002        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32003    fi
32004
32005
32006    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32007    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
32008    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
32009    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
32010    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32011        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32012    fi
32013
32014    elif test "$MEMORY_SIZE" -gt "5000"; then
32015        MAX_HEAP_MEM=3000
32016
32017    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32018    # If so, then append -d64 to SJAVAC_SERVER_JAVA
32019    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32020    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32021    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32022        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32023    fi
32024
32025
32026    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32027    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
32028    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
32029    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
32030    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32031        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32032    fi
32033
32034    elif test "$MEMORY_SIZE" -gt "3800"; then
32035        MAX_HEAP_MEM=2500
32036
32037    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32038    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
32039    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
32040    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
32041    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32042        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32043    fi
32044
32045    elif test "$MEMORY_SIZE" -gt "1900"; then
32046        MAX_HEAP_MEM=1200
32047
32048    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32049    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
32050    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
32051    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
32052    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32053        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
32054    fi
32055
32056    elif test "$MEMORY_SIZE" -gt "1000"; then
32057        MAX_HEAP_MEM=900
32058
32059    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32060    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
32061    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
32062    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
32063    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32064        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32065    fi
32066
32067    else
32068        MAX_HEAP_MEM=512
32069
32070    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32071    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
32072    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
32073    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
32074    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32075        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32076    fi
32077
32078    fi
32079
32080
32081    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32082    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
32083    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
32084    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
32085    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32086        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
32087    fi
32088
32089
32090    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32091    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
32092    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
32093    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
32094    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32095        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
32096    fi
32097
32098
32099    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32100    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
32101    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
32102    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
32103    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32104        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
32105    fi
32106
32107
32108    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
32109    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
32110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
32111$as_echo_n "checking if number of server cores must be reduced... " >&6; }
32112        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
32113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
32114$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
32115    fi
32116fi
32117
32118
32119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32120$as_echo_n "checking whether to use sjavac... " >&6; }
32121# Check whether --enable-sjavac was given.
32122if test "${enable_sjavac+set}" = set; then :
32123  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32124else
32125  ENABLE_SJAVAC='no'
32126fi
32127
32128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32129$as_echo "$ENABLE_SJAVAC" >&6; }
32130
32131
32132if test "x$ENABLE_SJAVAC" = xyes; then
32133    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32134else
32135    SJAVAC_SERVER_DIR=
32136fi
32137
32138
32139
32140
32141# Can the C/C++ compiler use precompiled headers?
32142
32143
32144###############################################################################
32145#
32146# Can the C/C++ compiler use precompiled headers?
32147#
32148# Check whether --enable-precompiled-headers was given.
32149if test "${enable_precompiled_headers+set}" = set; then :
32150  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32151else
32152  ENABLE_PRECOMPH=yes
32153fi
32154
32155
32156USE_PRECOMPILED_HEADER=1
32157if test "x$ENABLE_PRECOMPH" = xno; then
32158    USE_PRECOMPILED_HEADER=0
32159fi
32160
32161if test "x$ENABLE_PRECOMPH" = xyes; then
32162    # Check that the compiler actually supports precomp headers.
32163    if test "x$GCC" = xyes; then
32164         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32165$as_echo_n "checking that precompiled headers work... " >&6; }
32166         echo "int alfa();" > conftest.h
32167         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32168         if test ! -f conftest.hpp.gch; then
32169             USE_PRECOMPILED_HEADER=0
32170             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32171$as_echo "no" >&6; }
32172         else
32173             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32174$as_echo "yes" >&6; }
32175         fi
32176         rm -f conftest.h conftest.hpp.gch
32177    fi
32178fi
32179
32180
32181
32182
32183# Setup use of ccache, if available
32184
32185    # Check whether --enable-ccache was given.
32186if test "${enable_ccache+set}" = set; then :
32187  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32188else
32189  ENABLE_CCACHE=yes
32190fi
32191
32192    if test "x$ENABLE_CCACHE" = xyes; then
32193        # Extract the first word of "ccache", so it can be a program name with args.
32194set dummy ccache; ac_word=$2
32195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32196$as_echo_n "checking for $ac_word... " >&6; }
32197if ${ac_cv_path_CCACHE+:} false; then :
32198  $as_echo_n "(cached) " >&6
32199else
32200  case $CCACHE in
32201  [\\/]* | ?:[\\/]*)
32202  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32203  ;;
32204  *)
32205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32206for as_dir in $PATH
32207do
32208  IFS=$as_save_IFS
32209  test -z "$as_dir" && as_dir=.
32210    for ac_exec_ext in '' $ac_executable_extensions; do
32211  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32212    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32214    break 2
32215  fi
32216done
32217  done
32218IFS=$as_save_IFS
32219
32220  ;;
32221esac
32222fi
32223CCACHE=$ac_cv_path_CCACHE
32224if test -n "$CCACHE"; then
32225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
32226$as_echo "$CCACHE" >&6; }
32227else
32228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32229$as_echo "no" >&6; }
32230fi
32231
32232
32233    else
32234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
32235$as_echo_n "checking for ccache... " >&6; }
32236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
32237$as_echo "explicitly disabled" >&6; }
32238        CCACHE=
32239    fi
32240
32241
32242
32243# Check whether --with-ccache-dir was given.
32244if test "${with_ccache_dir+set}" = set; then :
32245  withval=$with_ccache_dir;
32246fi
32247
32248
32249    if test "x$with_ccache_dir" != x; then
32250        # When using a non home ccache directory, assume the use is to share ccache files
32251        # with other users. Thus change the umask.
32252        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
32253    fi
32254    CCACHE_FOUND=""
32255    if test "x$CCACHE" != x; then
32256
32257    if test "x$CCACHE" != x; then
32258        CCACHE_FOUND="true"
32259        # Only use ccache if it is 3.1.4 or later, which supports
32260        # precompiled headers.
32261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
32262$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
32263        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
32264        if test "x$HAS_GOOD_CCACHE" = x; then
32265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
32266$as_echo "no, disabling ccache" >&6; }
32267            CCACHE=
32268        else
32269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32270$as_echo "yes" >&6; }
32271            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
32272$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
32273            PUSHED_FLAGS="$CXXFLAGS"
32274            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
32275            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32276/* end confdefs.h.  */
32277
32278int
32279main ()
32280{
32281
32282  ;
32283  return 0;
32284}
32285_ACEOF
32286if ac_fn_cxx_try_compile "$LINENO"; then :
32287  CC_KNOWS_CCACHE_TRICK=yes
32288else
32289  CC_KNOWS_CCACHE_TRICK=no
32290fi
32291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32292            CXXFLAGS="$PUSHED_FLAGS"
32293            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
32294                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32295$as_echo "yes" >&6; }
32296            else
32297                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
32298$as_echo "no, disabling ccaching of precompiled headers" >&6; }
32299                CCACHE=
32300            fi
32301        fi
32302    fi
32303
32304    if test "x$CCACHE" != x; then
32305        CCACHE_SLOPPINESS=time_macros
32306        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
32307        CCACHE_FLAGS=-fpch-preprocess
32308
32309        if test "x$SET_CCACHE_DIR" != x; then
32310            mkdir -p $CCACHE_DIR > /dev/null 2>&1
32311	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
32312        fi
32313    fi
32314
32315    fi
32316
32317
32318###############################################################################
32319#
32320# And now the finish...
32321#
32322###############################################################################
32323
32324# Check for some common pitfalls
32325
32326  if test x"$OPENJDK_BUILD_OS" = xwindows; then
32327    file_to_test="$SRC_ROOT/LICENSE"
32328    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
32329      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
32330    fi
32331  fi
32332
32333
32334
32335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
32336$as_echo_n "checking if build directory is on local disk... " >&6; }
32337
32338	# df -l lists only local disks; if the given directory is not found then
32339	# a non-zero exit code is given
32340  if test "x$DF" = x; then
32341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32342      # msys does not have df; use Windows "net use" instead.
32343      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
32344      if test "x$IS_NETWORK_DISK" = x; then
32345        OUTPUT_DIR_IS_LOCAL="yes"
32346      else
32347        OUTPUT_DIR_IS_LOCAL="no"
32348      fi
32349    else
32350      # No df here, say it's local
32351      OUTPUT_DIR_IS_LOCAL="yes"
32352    fi
32353  else
32354    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
32355      OUTPUT_DIR_IS_LOCAL="yes"
32356    else
32357      OUTPUT_DIR_IS_LOCAL="no"
32358    fi
32359  fi
32360
32361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
32362$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
32363
32364
32365
32366# Check if the user has any old-style ALT_ variables set.
32367FOUND_ALT_VARIABLES=`env | grep ^ALT_`
32368
32369# Before generating output files, test if they exist. If they do, this is a reconfigure.
32370# Since we can't properly handle the dependencies for this, warn the user about the situation
32371if test -e $OUTPUT_ROOT/spec.gmk; then
32372  IS_RECONFIGURE=yes
32373else
32374  IS_RECONFIGURE=no
32375fi
32376
32377if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
32378  HIDE_PERFORMANCE_HINTS=yes
32379else
32380  HIDE_PERFORMANCE_HINTS=no
32381  # Hide it the next time around...
32382  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
32383fi
32384
32385
32386
32387# At the end, call the custom hook. (Dummy macro if no custom sources available)
32388
32389
32390# We're messing a bit with internal autoconf variables to put the config.status
32391# in the output directory instead of the current directory.
32392CONFIG_STATUS="$OUTPUT_ROOT/config.status"
32393# Create the actual output files. Now the main work of configure is done.
32394cat >confcache <<\_ACEOF
32395# This file is a shell script that caches the results of configure
32396# tests run on this system so they can be shared between configure
32397# scripts and configure runs, see configure's option --config-cache.
32398# It is not useful on other systems.  If it contains results you don't
32399# want to keep, you may remove or edit it.
32400#
32401# config.status only pays attention to the cache file if you give it
32402# the --recheck option to rerun configure.
32403#
32404# `ac_cv_env_foo' variables (set or unset) will be overridden when
32405# loading this file, other *unset* `ac_cv_foo' will be assigned the
32406# following values.
32407
32408_ACEOF
32409
32410# The following way of writing the cache mishandles newlines in values,
32411# but we know of no workaround that is simple, portable, and efficient.
32412# So, we kill variables containing newlines.
32413# Ultrix sh set writes to stderr and can't be redirected directly,
32414# and sets the high bit in the cache file unless we assign to the vars.
32415(
32416  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32417    eval ac_val=\$$ac_var
32418    case $ac_val in #(
32419    *${as_nl}*)
32420      case $ac_var in #(
32421      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32422$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32423      esac
32424      case $ac_var in #(
32425      _ | IFS | as_nl) ;; #(
32426      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
32427      *) { eval $ac_var=; unset $ac_var;} ;;
32428      esac ;;
32429    esac
32430  done
32431
32432  (set) 2>&1 |
32433    case $as_nl`(ac_space=' '; set) 2>&1` in #(
32434    *${as_nl}ac_space=\ *)
32435      # `set' does not quote correctly, so add quotes: double-quote
32436      # substitution turns \\\\ into \\, and sed turns \\ into \.
32437      sed -n \
32438	"s/'/'\\\\''/g;
32439	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32440      ;; #(
32441    *)
32442      # `set' quotes correctly as required by POSIX, so do not add quotes.
32443      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32444      ;;
32445    esac |
32446    sort
32447) |
32448  sed '
32449     /^ac_cv_env_/b end
32450     t clear
32451     :clear
32452     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32453     t end
32454     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32455     :end' >>confcache
32456if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32457  if test -w "$cache_file"; then
32458    if test "x$cache_file" != "x/dev/null"; then
32459      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32460$as_echo "$as_me: updating cache $cache_file" >&6;}
32461      if test ! -f "$cache_file" || test -h "$cache_file"; then
32462	cat confcache >"$cache_file"
32463      else
32464        case $cache_file in #(
32465        */* | ?:*)
32466	  mv -f confcache "$cache_file"$$ &&
32467	  mv -f "$cache_file"$$ "$cache_file" ;; #(
32468        *)
32469	  mv -f confcache "$cache_file" ;;
32470	esac
32471      fi
32472    fi
32473  else
32474    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32475$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32476  fi
32477fi
32478rm -f confcache
32479
32480test "x$prefix" = xNONE && prefix=$ac_default_prefix
32481# Let make expand exec_prefix.
32482test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32483
32484DEFS=-DHAVE_CONFIG_H
32485
32486ac_libobjs=
32487ac_ltlibobjs=
32488U=
32489for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32490  # 1. Remove the extension, and $U if already installed.
32491  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32492  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32493  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
32494  #    will be set to the directory where LIBOBJS objects are built.
32495  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32496  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32497done
32498LIBOBJS=$ac_libobjs
32499
32500LTLIBOBJS=$ac_ltlibobjs
32501
32502
32503
32504: "${CONFIG_STATUS=./config.status}"
32505ac_write_fail=0
32506ac_clean_files_save=$ac_clean_files
32507ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32508{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32509$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32510as_write_fail=0
32511cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32512#! $SHELL
32513# Generated by $as_me.
32514# Run this file to recreate the current configuration.
32515# Compiler output produced by configure, useful for debugging
32516# configure, is in config.log if it exists.
32517
32518debug=false
32519ac_cs_recheck=false
32520ac_cs_silent=false
32521
32522SHELL=\${CONFIG_SHELL-$SHELL}
32523export SHELL
32524_ASEOF
32525cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
32526## -------------------- ##
32527## M4sh Initialization. ##
32528## -------------------- ##
32529
32530# Be more Bourne compatible
32531DUALCASE=1; export DUALCASE # for MKS sh
32532if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
32533  emulate sh
32534  NULLCMD=:
32535  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32536  # is contrary to our usage.  Disable this feature.
32537  alias -g '${1+"$@"}'='"$@"'
32538  setopt NO_GLOB_SUBST
32539else
32540  case `(set -o) 2>/dev/null` in #(
32541  *posix*) :
32542    set -o posix ;; #(
32543  *) :
32544     ;;
32545esac
32546fi
32547
32548
32549as_nl='
32550'
32551export as_nl
32552# Printing a long string crashes Solaris 7 /usr/bin/printf.
32553as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32554as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32555as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32556# Prefer a ksh shell builtin over an external printf program on Solaris,
32557# but without wasting forks for bash or zsh.
32558if test -z "$BASH_VERSION$ZSH_VERSION" \
32559    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32560  as_echo='print -r --'
32561  as_echo_n='print -rn --'
32562elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32563  as_echo='printf %s\n'
32564  as_echo_n='printf %s'
32565else
32566  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32567    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32568    as_echo_n='/usr/ucb/echo -n'
32569  else
32570    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32571    as_echo_n_body='eval
32572      arg=$1;
32573      case $arg in #(
32574      *"$as_nl"*)
32575	expr "X$arg" : "X\\(.*\\)$as_nl";
32576	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32577      esac;
32578      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32579    '
32580    export as_echo_n_body
32581    as_echo_n='sh -c $as_echo_n_body as_echo'
32582  fi
32583  export as_echo_body
32584  as_echo='sh -c $as_echo_body as_echo'
32585fi
32586
32587# The user is always right.
32588if test "${PATH_SEPARATOR+set}" != set; then
32589  PATH_SEPARATOR=:
32590  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32591    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32592      PATH_SEPARATOR=';'
32593  }
32594fi
32595
32596
32597# IFS
32598# We need space, tab and new line, in precisely that order.  Quoting is
32599# there to prevent editors from complaining about space-tab.
32600# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32601# splitting by setting IFS to empty value.)
32602IFS=" ""	$as_nl"
32603
32604# Find who we are.  Look in the path if we contain no directory separator.
32605as_myself=
32606case $0 in #((
32607  *[\\/]* ) as_myself=$0 ;;
32608  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32609for as_dir in $PATH
32610do
32611  IFS=$as_save_IFS
32612  test -z "$as_dir" && as_dir=.
32613    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32614  done
32615IFS=$as_save_IFS
32616
32617     ;;
32618esac
32619# We did not find ourselves, most probably we were run as `sh COMMAND'
32620# in which case we are not to be found in the path.
32621if test "x$as_myself" = x; then
32622  as_myself=$0
32623fi
32624if test ! -f "$as_myself"; then
32625  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32626  exit 1
32627fi
32628
32629# Unset variables that we do not need and which cause bugs (e.g. in
32630# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32631# suppresses any "Segmentation fault" message there.  '((' could
32632# trigger a bug in pdksh 5.2.14.
32633for as_var in BASH_ENV ENV MAIL MAILPATH
32634do eval test x\${$as_var+set} = xset \
32635  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32636done
32637PS1='$ '
32638PS2='> '
32639PS4='+ '
32640
32641# NLS nuisances.
32642LC_ALL=C
32643export LC_ALL
32644LANGUAGE=C
32645export LANGUAGE
32646
32647# CDPATH.
32648(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32649
32650
32651# as_fn_error STATUS ERROR [LINENO LOG_FD]
32652# ----------------------------------------
32653# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32654# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32655# script with STATUS, using 1 if that was 0.
32656as_fn_error ()
32657{
32658  as_status=$1; test $as_status -eq 0 && as_status=1
32659  if test "$4"; then
32660    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32661    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32662  fi
32663  $as_echo "$as_me: error: $2" >&2
32664  as_fn_exit $as_status
32665} # as_fn_error
32666
32667
32668# as_fn_set_status STATUS
32669# -----------------------
32670# Set $? to STATUS, without forking.
32671as_fn_set_status ()
32672{
32673  return $1
32674} # as_fn_set_status
32675
32676# as_fn_exit STATUS
32677# -----------------
32678# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32679as_fn_exit ()
32680{
32681  set +e
32682  as_fn_set_status $1
32683  exit $1
32684} # as_fn_exit
32685
32686# as_fn_unset VAR
32687# ---------------
32688# Portably unset VAR.
32689as_fn_unset ()
32690{
32691  { eval $1=; unset $1;}
32692}
32693as_unset=as_fn_unset
32694# as_fn_append VAR VALUE
32695# ----------------------
32696# Append the text in VALUE to the end of the definition contained in VAR. Take
32697# advantage of any shell optimizations that allow amortized linear growth over
32698# repeated appends, instead of the typical quadratic growth present in naive
32699# implementations.
32700if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32701  eval 'as_fn_append ()
32702  {
32703    eval $1+=\$2
32704  }'
32705else
32706  as_fn_append ()
32707  {
32708    eval $1=\$$1\$2
32709  }
32710fi # as_fn_append
32711
32712# as_fn_arith ARG...
32713# ------------------
32714# Perform arithmetic evaluation on the ARGs, and store the result in the
32715# global $as_val. Take advantage of shells that can avoid forks. The arguments
32716# must be portable across $(()) and expr.
32717if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32718  eval 'as_fn_arith ()
32719  {
32720    as_val=$(( $* ))
32721  }'
32722else
32723  as_fn_arith ()
32724  {
32725    as_val=`expr "$@" || test $? -eq 1`
32726  }
32727fi # as_fn_arith
32728
32729
32730if expr a : '\(a\)' >/dev/null 2>&1 &&
32731   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32732  as_expr=expr
32733else
32734  as_expr=false
32735fi
32736
32737if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32738  as_basename=basename
32739else
32740  as_basename=false
32741fi
32742
32743if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32744  as_dirname=dirname
32745else
32746  as_dirname=false
32747fi
32748
32749as_me=`$as_basename -- "$0" ||
32750$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32751	 X"$0" : 'X\(//\)$' \| \
32752	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32753$as_echo X/"$0" |
32754    sed '/^.*\/\([^/][^/]*\)\/*$/{
32755	    s//\1/
32756	    q
32757	  }
32758	  /^X\/\(\/\/\)$/{
32759	    s//\1/
32760	    q
32761	  }
32762	  /^X\/\(\/\).*/{
32763	    s//\1/
32764	    q
32765	  }
32766	  s/.*/./; q'`
32767
32768# Avoid depending upon Character Ranges.
32769as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32770as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32771as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32772as_cr_digits='0123456789'
32773as_cr_alnum=$as_cr_Letters$as_cr_digits
32774
32775ECHO_C= ECHO_N= ECHO_T=
32776case `echo -n x` in #(((((
32777-n*)
32778  case `echo 'xy\c'` in
32779  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32780  xy)  ECHO_C='\c';;
32781  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32782       ECHO_T='	';;
32783  esac;;
32784*)
32785  ECHO_N='-n';;
32786esac
32787
32788rm -f conf$$ conf$$.exe conf$$.file
32789if test -d conf$$.dir; then
32790  rm -f conf$$.dir/conf$$.file
32791else
32792  rm -f conf$$.dir
32793  mkdir conf$$.dir 2>/dev/null
32794fi
32795if (echo >conf$$.file) 2>/dev/null; then
32796  if ln -s conf$$.file conf$$ 2>/dev/null; then
32797    as_ln_s='ln -s'
32798    # ... but there are two gotchas:
32799    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32800    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32801    # In both cases, we have to default to `cp -p'.
32802    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32803      as_ln_s='cp -p'
32804  elif ln conf$$.file conf$$ 2>/dev/null; then
32805    as_ln_s=ln
32806  else
32807    as_ln_s='cp -p'
32808  fi
32809else
32810  as_ln_s='cp -p'
32811fi
32812rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32813rmdir conf$$.dir 2>/dev/null
32814
32815
32816# as_fn_mkdir_p
32817# -------------
32818# Create "$as_dir" as a directory, including parents if necessary.
32819as_fn_mkdir_p ()
32820{
32821
32822  case $as_dir in #(
32823  -*) as_dir=./$as_dir;;
32824  esac
32825  test -d "$as_dir" || eval $as_mkdir_p || {
32826    as_dirs=
32827    while :; do
32828      case $as_dir in #(
32829      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32830      *) as_qdir=$as_dir;;
32831      esac
32832      as_dirs="'$as_qdir' $as_dirs"
32833      as_dir=`$as_dirname -- "$as_dir" ||
32834$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32835	 X"$as_dir" : 'X\(//\)[^/]' \| \
32836	 X"$as_dir" : 'X\(//\)$' \| \
32837	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32838$as_echo X"$as_dir" |
32839    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32840	    s//\1/
32841	    q
32842	  }
32843	  /^X\(\/\/\)[^/].*/{
32844	    s//\1/
32845	    q
32846	  }
32847	  /^X\(\/\/\)$/{
32848	    s//\1/
32849	    q
32850	  }
32851	  /^X\(\/\).*/{
32852	    s//\1/
32853	    q
32854	  }
32855	  s/.*/./; q'`
32856      test -d "$as_dir" && break
32857    done
32858    test -z "$as_dirs" || eval "mkdir $as_dirs"
32859  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32860
32861
32862} # as_fn_mkdir_p
32863if mkdir -p . 2>/dev/null; then
32864  as_mkdir_p='mkdir -p "$as_dir"'
32865else
32866  test -d ./-p && rmdir ./-p
32867  as_mkdir_p=false
32868fi
32869
32870if test -x / >/dev/null 2>&1; then
32871  as_test_x='test -x'
32872else
32873  if ls -dL / >/dev/null 2>&1; then
32874    as_ls_L_option=L
32875  else
32876    as_ls_L_option=
32877  fi
32878  as_test_x='
32879    eval sh -c '\''
32880      if test -d "$1"; then
32881	test -d "$1/.";
32882      else
32883	case $1 in #(
32884	-*)set "./$1";;
32885	esac;
32886	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32887	???[sx]*):;;*)false;;esac;fi
32888    '\'' sh
32889  '
32890fi
32891as_executable_p=$as_test_x
32892
32893# Sed expression to map a string onto a valid CPP name.
32894as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32895
32896# Sed expression to map a string onto a valid variable name.
32897as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32898
32899
32900exec 6>&1
32901## ----------------------------------- ##
32902## Main body of $CONFIG_STATUS script. ##
32903## ----------------------------------- ##
32904_ASEOF
32905test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32906
32907cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32908# Save the log message, to keep $0 and so on meaningful, and to
32909# report actual input values of CONFIG_FILES etc. instead of their
32910# values after options handling.
32911ac_log="
32912This file was extended by OpenJDK $as_me jdk8, which was
32913generated by GNU Autoconf 2.68.  Invocation command line was
32914
32915  CONFIG_FILES    = $CONFIG_FILES
32916  CONFIG_HEADERS  = $CONFIG_HEADERS
32917  CONFIG_LINKS    = $CONFIG_LINKS
32918  CONFIG_COMMANDS = $CONFIG_COMMANDS
32919  $ $0 $@
32920
32921on `(hostname || uname -n) 2>/dev/null | sed 1q`
32922"
32923
32924_ACEOF
32925
32926case $ac_config_files in *"
32927"*) set x $ac_config_files; shift; ac_config_files=$*;;
32928esac
32929
32930case $ac_config_headers in *"
32931"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32932esac
32933
32934
32935cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32936# Files that config.status was made for.
32937config_files="$ac_config_files"
32938config_headers="$ac_config_headers"
32939
32940_ACEOF
32941
32942cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32943ac_cs_usage="\
32944\`$as_me' instantiates files and other configuration actions
32945from templates according to the current configuration.  Unless the files
32946and actions are specified as TAGs, all are instantiated by default.
32947
32948Usage: $0 [OPTION]... [TAG]...
32949
32950  -h, --help       print this help, then exit
32951  -V, --version    print version number and configuration settings, then exit
32952      --config     print configuration, then exit
32953  -q, --quiet, --silent
32954                   do not print progress messages
32955  -d, --debug      don't remove temporary files
32956      --recheck    update $as_me by reconfiguring in the same conditions
32957      --file=FILE[:TEMPLATE]
32958                   instantiate the configuration file FILE
32959      --header=FILE[:TEMPLATE]
32960                   instantiate the configuration header FILE
32961
32962Configuration files:
32963$config_files
32964
32965Configuration headers:
32966$config_headers
32967
32968Report bugs to <build-dev@openjdk.java.net>.
32969OpenJDK home page: <http://openjdk.java.net>."
32970
32971_ACEOF
32972cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32973ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32974ac_cs_version="\\
32975OpenJDK config.status jdk8
32976configured by $0, generated by GNU Autoconf 2.68,
32977  with options \\"\$ac_cs_config\\"
32978
32979Copyright (C) 2010 Free Software Foundation, Inc.
32980This config.status script is free software; the Free Software Foundation
32981gives unlimited permission to copy, distribute and modify it."
32982
32983ac_pwd='$ac_pwd'
32984srcdir='$srcdir'
32985AWK='$AWK'
32986test -n "\$AWK" || AWK=awk
32987_ACEOF
32988
32989cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32990# The default lists apply if the user does not specify any file.
32991ac_need_defaults=:
32992while test $# != 0
32993do
32994  case $1 in
32995  --*=?*)
32996    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32997    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32998    ac_shift=:
32999    ;;
33000  --*=)
33001    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33002    ac_optarg=
33003    ac_shift=:
33004    ;;
33005  *)
33006    ac_option=$1
33007    ac_optarg=$2
33008    ac_shift=shift
33009    ;;
33010  esac
33011
33012  case $ac_option in
33013  # Handling of the options.
33014  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33015    ac_cs_recheck=: ;;
33016  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33017    $as_echo "$ac_cs_version"; exit ;;
33018  --config | --confi | --conf | --con | --co | --c )
33019    $as_echo "$ac_cs_config"; exit ;;
33020  --debug | --debu | --deb | --de | --d | -d )
33021    debug=: ;;
33022  --file | --fil | --fi | --f )
33023    $ac_shift
33024    case $ac_optarg in
33025    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33026    '') as_fn_error $? "missing file argument" ;;
33027    esac
33028    as_fn_append CONFIG_FILES " '$ac_optarg'"
33029    ac_need_defaults=false;;
33030  --header | --heade | --head | --hea )
33031    $ac_shift
33032    case $ac_optarg in
33033    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33034    esac
33035    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33036    ac_need_defaults=false;;
33037  --he | --h)
33038    # Conflict between --help and --header
33039    as_fn_error $? "ambiguous option: \`$1'
33040Try \`$0 --help' for more information.";;
33041  --help | --hel | -h )
33042    $as_echo "$ac_cs_usage"; exit ;;
33043  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33044  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33045    ac_cs_silent=: ;;
33046
33047  # This is an error.
33048  -*) as_fn_error $? "unrecognized option: \`$1'
33049Try \`$0 --help' for more information." ;;
33050
33051  *) as_fn_append ac_config_targets " $1"
33052     ac_need_defaults=false ;;
33053
33054  esac
33055  shift
33056done
33057
33058ac_configure_extra_args=
33059
33060if $ac_cs_silent; then
33061  exec 6>/dev/null
33062  ac_configure_extra_args="$ac_configure_extra_args --silent"
33063fi
33064
33065_ACEOF
33066cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33067if \$ac_cs_recheck; then
33068  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33069  shift
33070  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33071  CONFIG_SHELL='$SHELL'
33072  export CONFIG_SHELL
33073  exec "\$@"
33074fi
33075
33076_ACEOF
33077cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33078exec 5>>config.log
33079{
33080  echo
33081  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33082## Running $as_me. ##
33083_ASBOX
33084  $as_echo "$ac_log"
33085} >&5
33086
33087_ACEOF
33088cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33089_ACEOF
33090
33091cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33092
33093# Handling of arguments.
33094for ac_config_target in $ac_config_targets
33095do
33096  case $ac_config_target in
33097    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33098    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33099    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33100    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33101    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33102    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33103    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33104
33105  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33106  esac
33107done
33108
33109
33110# If the user did not use the arguments to specify the items to instantiate,
33111# then the envvar interface is used.  Set only those that are not.
33112# We use the long form for the default assignment because of an extremely
33113# bizarre bug on SunOS 4.1.3.
33114if $ac_need_defaults; then
33115  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33116  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33117fi
33118
33119# Have a temporary directory for convenience.  Make it in the build tree
33120# simply because there is no reason against having it here, and in addition,
33121# creating and moving files from /tmp can sometimes cause problems.
33122# Hook for its removal unless debugging.
33123# Note that there is a small window in which the directory will not be cleaned:
33124# after its creation but before its name has been assigned to `$tmp'.
33125$debug ||
33126{
33127  tmp= ac_tmp=
33128  trap 'exit_status=$?
33129  : "${ac_tmp:=$tmp}"
33130  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33131' 0
33132  trap 'as_fn_exit 1' 1 2 13 15
33133}
33134# Create a (secure) tmp directory for tmp files.
33135
33136{
33137  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33138  test -d "$tmp"
33139}  ||
33140{
33141  tmp=./conf$$-$RANDOM
33142  (umask 077 && mkdir "$tmp")
33143} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33144ac_tmp=$tmp
33145
33146# Set up the scripts for CONFIG_FILES section.
33147# No need to generate them if there are no CONFIG_FILES.
33148# This happens for instance with `./config.status config.h'.
33149if test -n "$CONFIG_FILES"; then
33150
33151
33152ac_cr=`echo X | tr X '\015'`
33153# On cygwin, bash can eat \r inside `` if the user requested igncr.
33154# But we know of no other shell where ac_cr would be empty at this
33155# point, so we can use a bashism as a fallback.
33156if test "x$ac_cr" = x; then
33157  eval ac_cr=\$\'\\r\'
33158fi
33159ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33160if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33161  ac_cs_awk_cr='\\r'
33162else
33163  ac_cs_awk_cr=$ac_cr
33164fi
33165
33166echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33167_ACEOF
33168
33169
33170{
33171  echo "cat >conf$$subs.awk <<_ACEOF" &&
33172  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33173  echo "_ACEOF"
33174} >conf$$subs.sh ||
33175  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33176ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33177ac_delim='%!_!# '
33178for ac_last_try in false false false false false :; do
33179  . ./conf$$subs.sh ||
33180    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33181
33182  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33183  if test $ac_delim_n = $ac_delim_num; then
33184    break
33185  elif $ac_last_try; then
33186    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33187  else
33188    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33189  fi
33190done
33191rm -f conf$$subs.sh
33192
33193cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33194cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
33195_ACEOF
33196sed -n '
33197h
33198s/^/S["/; s/!.*/"]=/
33199p
33200g
33201s/^[^!]*!//
33202:repl
33203t repl
33204s/'"$ac_delim"'$//
33205t delim
33206:nl
33207h
33208s/\(.\{148\}\)..*/\1/
33209t more1
33210s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33211p
33212n
33213b repl
33214:more1
33215s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33216p
33217g
33218s/.\{148\}//
33219t nl
33220:delim
33221h
33222s/\(.\{148\}\)..*/\1/
33223t more2
33224s/["\\]/\\&/g; s/^/"/; s/$/"/
33225p
33226b
33227:more2
33228s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33229p
33230g
33231s/.\{148\}//
33232t delim
33233' <conf$$subs.awk | sed '
33234/^[^""]/{
33235  N
33236  s/\n//
33237}
33238' >>$CONFIG_STATUS || ac_write_fail=1
33239rm -f conf$$subs.awk
33240cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33241_ACAWK
33242cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
33243  for (key in S) S_is_set[key] = 1
33244  FS = ""
33245
33246}
33247{
33248  line = $ 0
33249  nfields = split(line, field, "@")
33250  substed = 0
33251  len = length(field[1])
33252  for (i = 2; i < nfields; i++) {
33253    key = field[i]
33254    keylen = length(key)
33255    if (S_is_set[key]) {
33256      value = S[key]
33257      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33258      len += length(value) + length(field[++i])
33259      substed = 1
33260    } else
33261      len += 1 + keylen
33262  }
33263
33264  print line
33265}
33266
33267_ACAWK
33268_ACEOF
33269cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33270if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33271  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33272else
33273  cat
33274fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
33275  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33276_ACEOF
33277
33278# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33279# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33280# trailing colons and then remove the whole line if VPATH becomes empty
33281# (actually we leave an empty line to preserve line numbers).
33282if test "x$srcdir" = x.; then
33283  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
33284h
33285s///
33286s/^/:/
33287s/[	 ]*$/:/
33288s/:\$(srcdir):/:/g
33289s/:\${srcdir}:/:/g
33290s/:@srcdir@:/:/g
33291s/^:*//
33292s/:*$//
33293x
33294s/\(=[	 ]*\).*/\1/
33295G
33296s/\n//
33297s/^[^=]*=[	 ]*$//
33298}'
33299fi
33300
33301cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33302fi # test -n "$CONFIG_FILES"
33303
33304# Set up the scripts for CONFIG_HEADERS section.
33305# No need to generate them if there are no CONFIG_HEADERS.
33306# This happens for instance with `./config.status Makefile'.
33307if test -n "$CONFIG_HEADERS"; then
33308cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
33309BEGIN {
33310_ACEOF
33311
33312# Transform confdefs.h into an awk script `defines.awk', embedded as
33313# here-document in config.status, that substitutes the proper values into
33314# config.h.in to produce config.h.
33315
33316# Create a delimiter string that does not exist in confdefs.h, to ease
33317# handling of long lines.
33318ac_delim='%!_!# '
33319for ac_last_try in false false :; do
33320  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
33321  if test -z "$ac_tt"; then
33322    break
33323  elif $ac_last_try; then
33324    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33325  else
33326    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33327  fi
33328done
33329
33330# For the awk script, D is an array of macro values keyed by name,
33331# likewise P contains macro parameters if any.  Preserve backslash
33332# newline sequences.
33333
33334ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33335sed -n '
33336s/.\{148\}/&'"$ac_delim"'/g
33337t rset
33338:rset
33339s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
33340t def
33341d
33342:def
33343s/\\$//
33344t bsnl
33345s/["\\]/\\&/g
33346s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33347D["\1"]=" \3"/p
33348s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
33349d
33350:bsnl
33351s/["\\]/\\&/g
33352s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33353D["\1"]=" \3\\\\\\n"\\/p
33354t cont
33355s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33356t cont
33357d
33358:cont
33359n
33360s/.\{148\}/&'"$ac_delim"'/g
33361t clear
33362:clear
33363s/\\$//
33364t bsnlc
33365s/["\\]/\\&/g; s/^/"/; s/$/"/p
33366d
33367:bsnlc
33368s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33369b cont
33370' <confdefs.h | sed '
33371s/'"$ac_delim"'/"\\\
33372"/g' >>$CONFIG_STATUS || ac_write_fail=1
33373
33374cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33375  for (key in D) D_is_set[key] = 1
33376  FS = ""
33377}
33378/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33379  line = \$ 0
33380  split(line, arg, " ")
33381  if (arg[1] == "#") {
33382    defundef = arg[2]
33383    mac1 = arg[3]
33384  } else {
33385    defundef = substr(arg[1], 2)
33386    mac1 = arg[2]
33387  }
33388  split(mac1, mac2, "(") #)
33389  macro = mac2[1]
33390  prefix = substr(line, 1, index(line, defundef) - 1)
33391  if (D_is_set[macro]) {
33392    # Preserve the white space surrounding the "#".
33393    print prefix "define", macro P[macro] D[macro]
33394    next
33395  } else {
33396    # Replace #undef with comments.  This is necessary, for example,
33397    # in the case of _POSIX_SOURCE, which is predefined and required
33398    # on some systems where configure will not decide to define it.
33399    if (defundef == "undef") {
33400      print "/*", prefix defundef, macro, "*/"
33401      next
33402    }
33403  }
33404}
33405{ print }
33406_ACAWK
33407_ACEOF
33408cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33409  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33410fi # test -n "$CONFIG_HEADERS"
33411
33412
33413eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
33414shift
33415for ac_tag
33416do
33417  case $ac_tag in
33418  :[FHLC]) ac_mode=$ac_tag; continue;;
33419  esac
33420  case $ac_mode$ac_tag in
33421  :[FHL]*:*);;
33422  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
33423  :[FH]-) ac_tag=-:-;;
33424  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33425  esac
33426  ac_save_IFS=$IFS
33427  IFS=:
33428  set x $ac_tag
33429  IFS=$ac_save_IFS
33430  shift
33431  ac_file=$1
33432  shift
33433
33434  case $ac_mode in
33435  :L) ac_source=$1;;
33436  :[FH])
33437    ac_file_inputs=
33438    for ac_f
33439    do
33440      case $ac_f in
33441      -) ac_f="$ac_tmp/stdin";;
33442      *) # Look for the file first in the build tree, then in the source tree
33443	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
33444	 # because $ac_f cannot contain `:'.
33445	 test -f "$ac_f" ||
33446	   case $ac_f in
33447	   [\\/$]*) false;;
33448	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33449	   esac ||
33450	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
33451      esac
33452      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33453      as_fn_append ac_file_inputs " '$ac_f'"
33454    done
33455
33456    # Let's still pretend it is `configure' which instantiates (i.e., don't
33457    # use $as_me), people would be surprised to read:
33458    #    /* config.h.  Generated by config.status.  */
33459    configure_input='Generated from '`
33460	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33461	`' by configure.'
33462    if test x"$ac_file" != x-; then
33463      configure_input="$ac_file.  $configure_input"
33464      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33465$as_echo "$as_me: creating $ac_file" >&6;}
33466    fi
33467    # Neutralize special characters interpreted by sed in replacement strings.
33468    case $configure_input in #(
33469    *\&* | *\|* | *\\* )
33470       ac_sed_conf_input=`$as_echo "$configure_input" |
33471       sed 's/[\\\\&|]/\\\\&/g'`;; #(
33472    *) ac_sed_conf_input=$configure_input;;
33473    esac
33474
33475    case $ac_tag in
33476    *:-:* | *:-) cat >"$ac_tmp/stdin" \
33477      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
33478    esac
33479    ;;
33480  esac
33481
33482  ac_dir=`$as_dirname -- "$ac_file" ||
33483$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33484	 X"$ac_file" : 'X\(//\)[^/]' \| \
33485	 X"$ac_file" : 'X\(//\)$' \| \
33486	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33487$as_echo X"$ac_file" |
33488    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33489	    s//\1/
33490	    q
33491	  }
33492	  /^X\(\/\/\)[^/].*/{
33493	    s//\1/
33494	    q
33495	  }
33496	  /^X\(\/\/\)$/{
33497	    s//\1/
33498	    q
33499	  }
33500	  /^X\(\/\).*/{
33501	    s//\1/
33502	    q
33503	  }
33504	  s/.*/./; q'`
33505  as_dir="$ac_dir"; as_fn_mkdir_p
33506  ac_builddir=.
33507
33508case "$ac_dir" in
33509.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33510*)
33511  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33512  # A ".." for each directory in $ac_dir_suffix.
33513  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33514  case $ac_top_builddir_sub in
33515  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33516  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33517  esac ;;
33518esac
33519ac_abs_top_builddir=$ac_pwd
33520ac_abs_builddir=$ac_pwd$ac_dir_suffix
33521# for backward compatibility:
33522ac_top_builddir=$ac_top_build_prefix
33523
33524case $srcdir in
33525  .)  # We are building in place.
33526    ac_srcdir=.
33527    ac_top_srcdir=$ac_top_builddir_sub
33528    ac_abs_top_srcdir=$ac_pwd ;;
33529  [\\/]* | ?:[\\/]* )  # Absolute name.
33530    ac_srcdir=$srcdir$ac_dir_suffix;
33531    ac_top_srcdir=$srcdir
33532    ac_abs_top_srcdir=$srcdir ;;
33533  *) # Relative name.
33534    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33535    ac_top_srcdir=$ac_top_build_prefix$srcdir
33536    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33537esac
33538ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33539
33540
33541  case $ac_mode in
33542  :F)
33543  #
33544  # CONFIG_FILE
33545  #
33546
33547_ACEOF
33548
33549cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33550# If the template does not know about datarootdir, expand it.
33551# FIXME: This hack should be removed a few years after 2.60.
33552ac_datarootdir_hack=; ac_datarootdir_seen=
33553ac_sed_dataroot='
33554/datarootdir/ {
33555  p
33556  q
33557}
33558/@datadir@/p
33559/@docdir@/p
33560/@infodir@/p
33561/@localedir@/p
33562/@mandir@/p'
33563case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33564*datarootdir*) ac_datarootdir_seen=yes;;
33565*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33566  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33567$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33568_ACEOF
33569cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33570  ac_datarootdir_hack='
33571  s&@datadir@&$datadir&g
33572  s&@docdir@&$docdir&g
33573  s&@infodir@&$infodir&g
33574  s&@localedir@&$localedir&g
33575  s&@mandir@&$mandir&g
33576  s&\\\${datarootdir}&$datarootdir&g' ;;
33577esac
33578_ACEOF
33579
33580# Neutralize VPATH when `$srcdir' = `.'.
33581# Shell code in configure.ac might set extrasub.
33582# FIXME: do we really want to maintain this feature?
33583cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33584ac_sed_extra="$ac_vpsub
33585$extrasub
33586_ACEOF
33587cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33588:t
33589/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33590s|@configure_input@|$ac_sed_conf_input|;t t
33591s&@top_builddir@&$ac_top_builddir_sub&;t t
33592s&@top_build_prefix@&$ac_top_build_prefix&;t t
33593s&@srcdir@&$ac_srcdir&;t t
33594s&@abs_srcdir@&$ac_abs_srcdir&;t t
33595s&@top_srcdir@&$ac_top_srcdir&;t t
33596s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33597s&@builddir@&$ac_builddir&;t t
33598s&@abs_builddir@&$ac_abs_builddir&;t t
33599s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33600$ac_datarootdir_hack
33601"
33602eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
33603  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33604
33605test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33606  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
33607  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
33608      "$ac_tmp/out"`; test -z "$ac_out"; } &&
33609  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33610which seems to be undefined.  Please make sure it is defined" >&5
33611$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33612which seems to be undefined.  Please make sure it is defined" >&2;}
33613
33614  rm -f "$ac_tmp/stdin"
33615  case $ac_file in
33616  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33617  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33618  esac \
33619  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33620 ;;
33621  :H)
33622  #
33623  # CONFIG_HEADER
33624  #
33625  if test x"$ac_file" != x-; then
33626    {
33627      $as_echo "/* $configure_input  */" \
33628      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33629    } >"$ac_tmp/config.h" \
33630      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33631    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33632      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33633$as_echo "$as_me: $ac_file is unchanged" >&6;}
33634    else
33635      rm -f "$ac_file"
33636      mv "$ac_tmp/config.h" "$ac_file" \
33637	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33638    fi
33639  else
33640    $as_echo "/* $configure_input  */" \
33641      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33642      || as_fn_error $? "could not create -" "$LINENO" 5
33643  fi
33644 ;;
33645
33646
33647  esac
33648
33649done # for ac_tag
33650
33651
33652as_fn_exit 0
33653_ACEOF
33654ac_clean_files=$ac_clean_files_save
33655
33656test $ac_write_fail = 0 ||
33657  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33658
33659
33660# configure is writing to config.log, and then calls config.status.
33661# config.status does its own redirection, appending to config.log.
33662# Unfortunately, on DOS this fails, as config.log is still kept open
33663# by configure, so config.status won't be able to write to it; its
33664# output is simply discarded.  So we exec the FD to /dev/null,
33665# effectively closing config.log, so it can be properly (re)opened and
33666# appended to by config.status.  When coming back to configure, we
33667# need to make the FD available again.
33668if test "$no_create" != yes; then
33669  ac_cs_success=:
33670  ac_config_status_args=
33671  test "$silent" = yes &&
33672    ac_config_status_args="$ac_config_status_args --quiet"
33673  exec 5>/dev/null
33674  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33675  exec 5>>config.log
33676  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33677  # would make configure fail if this is the last instruction.
33678  $ac_cs_success || as_fn_exit 1
33679fi
33680if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33681  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33682$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33683fi
33684
33685
33686# Make the compare script executable
33687$CHMOD +x $OUTPUT_ROOT/compare.sh
33688
33689# Finally output some useful information to the user
33690
33691# Finally output some useful information to the user
33692
33693if test "x$CCACHE_FOUND" != x; then
33694	if  test "x$HAS_GOOD_CCACHE" = x; then
33695		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33696		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33697	else
33698		CCACHE_STATUS="installed and in use"
33699	fi
33700else
33701	if test "x$GCC" = xyes; then
33702		CCACHE_STATUS="not installed (consider installing)"
33703		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33704	else
33705		CCACHE_STATUS="not available for your system"
33706	fi
33707fi
33708
33709printf "\n"
33710printf "====================================================\n"
33711printf "A new configuration has been successfully created in\n"
33712printf "$OUTPUT_ROOT\n"
33713if test "x$CONFIGURE_COMMAND_LINE" != x; then
33714	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33715else
33716	printf "using default settings.\n"
33717fi
33718
33719printf "\n"
33720printf "Configuration summary:\n"
33721printf "* Debug level:    $DEBUG_LEVEL\n"
33722printf "* JDK variant:    $JDK_VARIANT\n"
33723printf "* JVM variants:   $with_jvm_variants\n"
33724printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33725
33726printf "\n"
33727printf "Tools summary:\n"
33728if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33729  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33730fi
33731printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33732printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33733printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33734
33735printf "\n"
33736printf "Build performance summary:\n"
33737printf "* Cores to use:   $JOBS\n"
33738printf "* Memory limit:   $MEMORY_SIZE MB\n"
33739printf "* ccache status:  $CCACHE_STATUS\n"
33740printf "\n"
33741
33742if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33743	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33744	printf "$CCACHE_HELP_MSG\n"
33745
33746    # Print a helpful message on how to acquire the necessary build dependency.
33747    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33748    MISSING_DEPENDENCY=ccache
33749    PKGHANDLER_COMMAND=
33750
33751    case $PKGHANDLER in
33752	apt-get)
33753                apt_help     $MISSING_DEPENDENCY ;;
33754    yum)
33755                yum_help     $MISSING_DEPENDENCY ;;
33756	port)
33757                port_help    $MISSING_DEPENDENCY ;;
33758	pkgutil)
33759                pkgutil_help $MISSING_DEPENDENCY ;;
33760	pkgadd)
33761                pkgadd_help  $MISSING_DEPENDENCY ;;
33762    * )
33763      break ;;
33764    esac
33765
33766    if test "x$PKGHANDLER_COMMAND" != x; then
33767        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33768    fi
33769
33770	printf "$HELP_MSG\n"
33771	printf "\n"
33772fi
33773
33774if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33775	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33776	printf "will result in longer build times.\n"
33777	printf "\n"
33778fi
33779
33780if test "x$FOUND_ALT_VARIABLES" != "x"; then
33781	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33782	printf "These are not respected, and will be ignored. It is recommended\n"
33783	printf "that you clean your environment. The following variables are set:\n"
33784	printf "$FOUND_ALT_VARIABLES\n"
33785	printf "\n"
33786fi
33787
33788if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33789	printf "WARNING: Your build output directory is not on a local disk.\n"
33790	printf "This will severely degrade build performance!\n"
33791	printf "It is recommended that you create an output directory on a local disk,\n"
33792	printf "and run the configure script again from that directory.\n"
33793	printf "\n"
33794fi
33795
33796if test "x$IS_RECONFIGURE" = "xyes"; then
33797	printf "WARNING: The result of this configuration has overridden an older\n"
33798	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33799	printf "proper build. Failure to do so might result in strange build problems.\n"
33800	printf "\n"
33801fi
33802
33803