generated-configure.sh revision 881:e877cb3eb4d6
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.68 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94as_myself=
95case $0 in #((
96  *[\\/]* ) as_myself=$0 ;;
97  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98for as_dir in $PATH
99do
100  IFS=$as_save_IFS
101  test -z "$as_dir" && as_dir=.
102    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103  done
104IFS=$as_save_IFS
105
106     ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111  as_myself=$0
112fi
113if test ! -f "$as_myself"; then
114  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115  exit 1
116fi
117
118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there.  '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
135
136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141  emulate sh
142  NULLCMD=:
143  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144  # is contrary to our usage.  Disable this feature.
145  alias -g '\${1+\"\$@\"}'='\"\$@\"'
146  setopt NO_GLOB_SUBST
147else
148  case \`(set -o) 2>/dev/null\` in #(
149  *posix*) :
150    set -o posix ;; #(
151  *) :
152     ;;
153esac
154fi
155"
156  as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170  exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178  if (eval "$as_required") 2>/dev/null; then :
179  as_have_required=yes
180else
181  as_have_required=no
182fi
183  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190  IFS=$as_save_IFS
191  test -z "$as_dir" && as_dir=.
192  as_found=:
193  case $as_dir in #(
194	 /*)
195	   for as_base in sh bash ksh sh5; do
196	     # Try only shells that exist, to save several forks.
197	     as_shell=$as_dir/$as_base
198	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200  CONFIG_SHELL=$as_shell as_have_required=yes
201		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202  break 2
203fi
204fi
205	   done;;
206       esac
207  as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211  CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216      if test "x$CONFIG_SHELL" != x; then :
217  # We cannot yet assume a decent shell, so we have to provide a
218	# neutralization value for shells without unset; and this also
219	# works around shells that cannot unset nonexistent variables.
220	# Preserve -v and -x to the replacement shell.
221	BASH_ENV=/dev/null
222	ENV=/dev/null
223	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224	export CONFIG_SHELL
225	case $- in # ((((
226	  *v*x* | *x*v* ) as_opts=-vx ;;
227	  *v* ) as_opts=-v ;;
228	  *x* ) as_opts=-x ;;
229	  * ) as_opts= ;;
230	esac
231	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
232fi
233
234    if test x$as_have_required = xno; then :
235  $as_echo "$0: This script requires a shell more modern than all"
236  $as_echo "$0: the shells that I found on your system."
237  if test x${ZSH_VERSION+set} = xset ; then
238    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240  else
241    $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: build-dev@openjdk.java.net about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246  fi
247  exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265  { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274  return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282  set +e
283  as_fn_set_status $1
284  exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293  case $as_dir in #(
294  -*) as_dir=./$as_dir;;
295  esac
296  test -d "$as_dir" || eval $as_mkdir_p || {
297    as_dirs=
298    while :; do
299      case $as_dir in #(
300      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301      *) as_qdir=$as_dir;;
302      esac
303      as_dirs="'$as_qdir' $as_dirs"
304      as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306	 X"$as_dir" : 'X\(//\)[^/]' \| \
307	 X"$as_dir" : 'X\(//\)$' \| \
308	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\/\)[^/].*/{
315	    s//\1/
316	    q
317	  }
318	  /^X\(\/\/\)$/{
319	    s//\1/
320	    q
321	  }
322	  /^X\(\/\).*/{
323	    s//\1/
324	    q
325	  }
326	  s/.*/./; q'`
327      test -d "$as_dir" && break
328    done
329    test -z "$as_dirs" || eval "mkdir $as_dirs"
330  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341  eval 'as_fn_append ()
342  {
343    eval $1+=\$2
344  }'
345else
346  as_fn_append ()
347  {
348    eval $1=\$$1\$2
349  }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358  eval 'as_fn_arith ()
359  {
360    as_val=$(( $* ))
361  }'
362else
363  as_fn_arith ()
364  {
365    as_val=`expr "$@" || test $? -eq 1`
366  }
367fi # as_fn_arith
368
369
370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
374# script with STATUS, using 1 if that was 0.
375as_fn_error ()
376{
377  as_status=$1; test $as_status -eq 0 && as_status=1
378  if test "$4"; then
379    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
381  fi
382  $as_echo "$as_me: error: $2" >&2
383  as_fn_exit $as_status
384} # as_fn_error
385
386if expr a : '\(a\)' >/dev/null 2>&1 &&
387   test "X`expr 00001 : '.*\(...\)'`" = X001; then
388  as_expr=expr
389else
390  as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394  as_basename=basename
395else
396  as_basename=false
397fi
398
399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400  as_dirname=dirname
401else
402  as_dirname=false
403fi
404
405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407	 X"$0" : 'X\(//\)$' \| \
408	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
409$as_echo X/"$0" |
410    sed '/^.*\/\([^/][^/]*\)\/*$/{
411	    s//\1/
412	    q
413	  }
414	  /^X\/\(\/\/\)$/{
415	    s//\1/
416	    q
417	  }
418	  /^X\/\(\/\).*/{
419	    s//\1/
420	    q
421	  }
422	  s/.*/./; q'`
423
424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
430
431
432  as_lineno_1=$LINENO as_lineno_1a=$LINENO
433  as_lineno_2=$LINENO as_lineno_2a=$LINENO
434  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
437  sed -n '
438    p
439    /[$]LINENO/=
440  ' <$as_myself |
441    sed '
442      s/[$]LINENO.*/&-/
443      t lineno
444      b
445      :lineno
446      N
447      :loop
448      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
449      t loop
450      s/-\n.*//
451    ' >$as_me.lineno &&
452  chmod +x "$as_me.lineno" ||
453    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
454
455  # Don't try to exec as it changes $[0], causing all sort of problems
456  # (the dirname of $[0] is not the place where we might find the
457  # original and so on.  Autoconf is especially sensitive to this).
458  . "./$as_me.lineno"
459  # Exit status is that of the last command.
460  exit
461}
462
463ECHO_C= ECHO_N= ECHO_T=
464case `echo -n x` in #(((((
465-n*)
466  case `echo 'xy\c'` in
467  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
468  xy)  ECHO_C='\c';;
469  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
470       ECHO_T='	';;
471  esac;;
472*)
473  ECHO_N='-n';;
474esac
475
476rm -f conf$$ conf$$.exe conf$$.file
477if test -d conf$$.dir; then
478  rm -f conf$$.dir/conf$$.file
479else
480  rm -f conf$$.dir
481  mkdir conf$$.dir 2>/dev/null
482fi
483if (echo >conf$$.file) 2>/dev/null; then
484  if ln -s conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s='ln -s'
486    # ... but there are two gotchas:
487    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489    # In both cases, we have to default to `cp -p'.
490    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491      as_ln_s='cp -p'
492  elif ln conf$$.file conf$$ 2>/dev/null; then
493    as_ln_s=ln
494  else
495    as_ln_s='cp -p'
496  fi
497else
498  as_ln_s='cp -p'
499fi
500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
502
503if mkdir -p . 2>/dev/null; then
504  as_mkdir_p='mkdir -p "$as_dir"'
505else
506  test -d ./-p && rmdir ./-p
507  as_mkdir_p=false
508fi
509
510if test -x / >/dev/null 2>&1; then
511  as_test_x='test -x'
512else
513  if ls -dL / >/dev/null 2>&1; then
514    as_ls_L_option=L
515  else
516    as_ls_L_option=
517  fi
518  as_test_x='
519    eval sh -c '\''
520      if test -d "$1"; then
521	test -d "$1/.";
522      else
523	case $1 in #(
524	-*)set "./$1";;
525	esac;
526	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527	???[sx]*):;;*)false;;esac;fi
528    '\'' sh
529  '
530fi
531as_executable_p=$as_test_x
532
533# Sed expression to map a string onto a valid CPP name.
534as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
535
536# Sed expression to map a string onto a valid variable name.
537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
538
539
540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
542
543# Name of the host.
544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
548#
549# Initializations.
550#
551ac_default_prefix=/usr/local
552ac_clean_files=
553ac_config_libobj_dir=.
554LIBOBJS=
555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
559
560# Identity of this package.
561PACKAGE_NAME='OpenJDK'
562PACKAGE_TARNAME='openjdk'
563PACKAGE_VERSION='jdk8'
564PACKAGE_STRING='OpenJDK jdk8'
565PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
566PACKAGE_URL='http://openjdk.java.net'
567
568# Factoring default headers for most tests.
569ac_includes_default="\
570#include <stdio.h>
571#ifdef HAVE_SYS_TYPES_H
572# include <sys/types.h>
573#endif
574#ifdef HAVE_SYS_STAT_H
575# include <sys/stat.h>
576#endif
577#ifdef STDC_HEADERS
578# include <stdlib.h>
579# include <stddef.h>
580#else
581# ifdef HAVE_STDLIB_H
582#  include <stdlib.h>
583# endif
584#endif
585#ifdef HAVE_STRING_H
586# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
587#  include <memory.h>
588# endif
589# include <string.h>
590#endif
591#ifdef HAVE_STRINGS_H
592# include <strings.h>
593#endif
594#ifdef HAVE_INTTYPES_H
595# include <inttypes.h>
596#endif
597#ifdef HAVE_STDINT_H
598# include <stdint.h>
599#endif
600#ifdef HAVE_UNISTD_H
601# include <unistd.h>
602#endif"
603
604ac_subst_vars='LTLIBOBJS
605LIBOBJS
606CCACHE
607USE_PRECOMPILED_HEADER
608SJAVAC_SERVER_DIR
609ENABLE_SJAVAC
610SJAVAC_SERVER_CORES
611SJAVAC_SERVER_JAVA
612MEMORY_SIZE
613CONCURRENT_BUILD_JOBS
614NUM_CORES
615SALIB_NAME
616HOTSPOT_MAKE_ARGS
617FIXPATH
618LIBCXX
619STATIC_CXX_SETTING
620LIBDL
621LIBM
622LIBZIP_CAN_USE_MMAP
623USE_EXTERNAL_LIBZ
624USE_EXTERNAL_LIBGIF
625USE_EXTERNAL_LIBJPEG
626ALSA_LIBS
627ALSA_CFLAGS
628FREETYPE2_LIB_PATH
629USING_SYSTEM_FT_LIB
630FREETYPE2_LIBS
631FREETYPE2_CFLAGS
632CUPS_CFLAGS
633OPENWIN_HOME
634X_EXTRA_LIBS
635X_LIBS
636X_PRE_LIBS
637X_CFLAGS
638XMKMF
639CXXFLAGS_DEBUG_SYMBOLS
640CFLAGS_DEBUG_SYMBOLS
641ZIP_DEBUGINFO_FILES
642ENABLE_DEBUG_SYMBOLS
643LDFLAGS_CXX_JDK
644LDFLAGS_JDKEXE_SUFFIX
645LDFLAGS_JDKLIB_SUFFIX
646LDFLAGS_JDKEXE
647LDFLAGS_JDKLIB
648CXXFLAGS_JDKEXE
649CXXFLAGS_JDKLIB
650CFLAGS_JDKEXE
651CFLAGS_JDKLIB
652MACOSX_REQUIRED_VERSION
653PACKAGE_PATH
654LEGACY_EXTRA_LDFLAGS
655LEGACY_EXTRA_CXXFLAGS
656LEGACY_EXTRA_CFLAGS
657CXX_FLAG_DEPS
658C_FLAG_DEPS
659CXX_O_FLAG_NONE
660CXX_O_FLAG_NORM
661CXX_O_FLAG_HI
662CXX_O_FLAG_HIGHEST
663C_O_FLAG_NONE
664C_O_FLAG_NORM
665C_O_FLAG_HI
666C_O_FLAG_HIGHEST
667POST_MCS_CMD
668POST_STRIP_CMD
669SET_EXECUTABLE_ORIGIN
670SET_SHARED_LIBRARY_ORIGIN
671CXX_FLAG_REORDER
672C_FLAG_REORDER
673SET_SHARED_LIBRARY_MAPFILE
674SET_SHARED_LIBRARY_NAME
675SHARED_LIBRARY_FLAGS
676EXE_SUFFIX
677STATIC_LIBRARY_SUFFIX
678SHARED_LIBRARY_SUFFIX
679LIBRARY_PREFIX
680STATIC_LIBRARY
681SHARED_LIBRARY
682OBJ_SUFFIX
683LIPO
684ac_ct_OBJDUMP
685OBJDUMP
686ac_ct_OBJCOPY
687OBJCOPY
688MCS
689STRIP
690NM
691AS
692CXXCPP
693CPP
694COMPILER_TYPE
695RC_FLAGS
696DUMPBIN
697WINAR
698HOTSPOT_RC
699HOTSPOT_MT
700RC
701MT
702WINLD
703HOTSPOT_LD
704HOTSPOT_CXX
705ARFLAGS
706AR
707LDEXECXX
708LDCXX
709LDEXE
710LD
711ac_ct_OBJC
712OBJCFLAGS
713OBJC
714ac_ct_CXX
715CXXFLAGS
716CXX
717ac_ct_PROPER_COMPILER_CXX
718PROPER_COMPILER_CXX
719POTENTIAL_CXX
720TOOLS_DIR_CXX
721OBJEXT
722EXEEXT
723ac_ct_CC
724CPPFLAGS
725LDFLAGS
726CFLAGS
727CC
728ac_ct_PROPER_COMPILER_CC
729PROPER_COMPILER_CC
730POTENTIAL_CC
731TOOLS_DIR_CC
732BUILD_LD
733BUILD_CXX
734BUILD_CC
735MSVCR_DLL
736VS_PATH
737VS_LIB
738VS_INCLUDE
739CYGWIN_LINK
740AR_OUT_OPTION
741LD_OUT_OPTION
742EXE_OUT_OPTION
743CC_OUT_OPTION
744BUILD_HOTSPOT
745HOTSPOT_DIST
746BUILD_OUTPUT
747OVERRIDE_SRC_ROOT
748ADD_SRC_ROOT
749JDK_TOPDIR
750NASHORN_TOPDIR
751HOTSPOT_TOPDIR
752JAXWS_TOPDIR
753JAXP_TOPDIR
754CORBA_TOPDIR
755LANGTOOLS_TOPDIR
756BOOT_JDK_JVMARGS
757JAVAC_FLAGS
758BOOT_JDK_SOURCETARGET
759BOOT_JDK
760BOOT_TOOLSJAR
761BOOT_RTJAR
762JAVA_CHECK
763JAVAC_CHECK
764COOKED_BUILD_NUMBER
765JDK_VERSION
766COPYRIGHT_YEAR
767MACOSX_BUNDLE_ID_BASE
768MACOSX_BUNDLE_NAME_BASE
769COMPANY_NAME
770JDK_RC_PLATFORM_NAME
771PRODUCT_SUFFIX
772PRODUCT_NAME
773LAUNCHER_NAME
774MILESTONE
775JDK_BUILD_NUMBER
776JDK_UPDATE_VERSION
777JDK_MICRO_VERSION
778JDK_MINOR_VERSION
779JDK_MAJOR_VERSION
780USER_RELEASE_SUFFIX
781COMPRESS_JARS
782UNLIMITED_CRYPTO
783CACERTS_FILE
784TEST_IN_BUILD
785BUILD_HEADLESS
786SUPPORT_HEADFUL
787SUPPORT_HEADLESS
788BDEPS_FTP
789BDEPS_UNZIP
790OS_VERSION_MICRO
791OS_VERSION_MINOR
792OS_VERSION_MAJOR
793PKG_CONFIG
794TIME
795STAT
796HG
797READELF
798OTOOL
799LDD
800ZIP
801UNZIP
802FIND_DELETE
803MAKE
804CHECK_TOOLSDIR_MAKE
805CHECK_TOOLSDIR_GMAKE
806CHECK_MAKE
807CHECK_GMAKE
808PKGHANDLER
809OUTPUT_ROOT
810CONF_NAME
811SPEC
812BUILD_VARIANT_RELEASE
813DEBUG_CLASSFILES
814FASTDEBUG
815VARIANT
816DEBUG_LEVEL
817MACOSX_UNIVERSAL
818JVM_VARIANT_ZEROSHARK
819JVM_VARIANT_ZERO
820JVM_VARIANT_KERNEL
821JVM_VARIANT_MINIMAL1
822JVM_VARIANT_CLIENT
823JVM_VARIANT_SERVER
824JVM_VARIANTS
825JDK_VARIANT
826SET_OPENJDK
827BUILD_LOG_WRAPPER
828BUILD_LOG_PREVIOUS
829BUILD_LOG
830SYS_ROOT
831PATH_SEP
832SRC_ROOT
833DEFINE_CROSS_COMPILE_ARCH
834LP64
835OPENJDK_TARGET_OS_API_DIR
836OPENJDK_TARGET_CPU_JLI_CFLAGS
837OPENJDK_TARGET_CPU_OSARCH
838OPENJDK_TARGET_CPU_ISADIR
839OPENJDK_TARGET_CPU_LIBDIR
840OPENJDK_TARGET_CPU_LEGACY_LIB
841OPENJDK_TARGET_CPU_LEGACY
842REQUIRED_OS_VERSION
843REQUIRED_OS_NAME
844COMPILE_TYPE
845OPENJDK_TARGET_CPU_ENDIAN
846OPENJDK_TARGET_CPU_BITS
847OPENJDK_TARGET_CPU_ARCH
848OPENJDK_TARGET_CPU
849OPENJDK_TARGET_OS_API
850OPENJDK_TARGET_OS
851OPENJDK_BUILD_CPU_ENDIAN
852OPENJDK_BUILD_CPU_BITS
853OPENJDK_BUILD_CPU_ARCH
854OPENJDK_BUILD_CPU
855OPENJDK_BUILD_OS_API
856OPENJDK_BUILD_OS
857OPENJDK_BUILD_AUTOCONF_NAME
858OPENJDK_TARGET_AUTOCONF_NAME
859target_os
860target_vendor
861target_cpu
862target
863host_os
864host_vendor
865host_cpu
866host
867build_os
868build_vendor
869build_cpu
870build
871SETFILE
872DF
873READLINK
874CYGPATH
875NAWK
876SED
877FGREP
878EGREP
879GREP
880AWK
881XARGS
882WHICH
883WC
884UNIQ
885UNAME
886TR
887TOUCH
888TEE
889TAR
890TAIL
891SORT
892SH
893RM
894THEPWDCMD
895PRINTF
896MV
897MKTEMP
898MKDIR
899LS
900LN
901HEAD
902FIND
903FILE
904EXPR
905ECHO
906DIRNAME
907DIFF
908DATE
909CUT
910CPIO
911CP
912COMM
913CMP
914CHMOD
915CAT
916BASH
917BASENAME
918DATE_WHEN_CONFIGURED
919CONFIGURE_COMMAND_LINE
920CUSTOM_MAKE_DIR
921target_alias
922host_alias
923build_alias
924LIBS
925ECHO_T
926ECHO_N
927ECHO_C
928DEFS
929mandir
930localedir
931libdir
932psdir
933pdfdir
934dvidir
935htmldir
936infodir
937docdir
938oldincludedir
939includedir
940localstatedir
941sharedstatedir
942sysconfdir
943datadir
944datarootdir
945libexecdir
946sbindir
947bindir
948program_transform_name
949prefix
950exec_prefix
951PACKAGE_URL
952PACKAGE_BUGREPORT
953PACKAGE_STRING
954PACKAGE_VERSION
955PACKAGE_TARNAME
956PACKAGE_NAME
957PATH_SEPARATOR
958SHELL'
959ac_subst_files=''
960ac_user_opts='
961enable_option_checking
962with_custom_make_dir
963with_target_bits
964with_sys_root
965with_tools_dir
966with_devkit
967enable_openjdk_only
968with_jdk_variant
969with_jvm_variants
970enable_debug
971with_debug_level
972with_conf_name
973with_builddeps_conf
974with_builddeps_server
975with_builddeps_dir
976with_builddeps_group
977enable_headful
978enable_hotspot_test_in_build
979with_cacerts_file
980enable_unlimited_crypto
981with_milestone
982with_build_number
983with_user_release_suffix
984with_boot_jdk
985with_boot_jdk_jvmargs
986with_add_source_root
987with_override_source_root
988with_adds_and_overrides
989with_override_langtools
990with_override_corba
991with_override_jaxp
992with_override_jaxws
993with_override_hotspot
994with_override_jdk
995with_import_hotspot
996with_msvcr_dll
997with_extra_cflags
998with_extra_cxxflags
999with_extra_ldflags
1000enable_debug_symbols
1001enable_zip_debug_info
1002enable_macosx_runtime_support
1003with_x
1004with_cups
1005with_cups_include
1006with_freetype
1007with_alsa
1008with_alsa_include
1009with_alsa_lib
1010with_zlib
1011with_stdc__lib
1012with_num_cores
1013with_memory_size
1014with_sjavac_server_java
1015with_sjavac_server_cores
1016enable_sjavac
1017enable_precompiled_headers
1018enable_ccache
1019with_ccache_dir
1020'
1021      ac_precious_vars='build_alias
1022host_alias
1023target_alias
1024PKG_CONFIG
1025CC
1026CFLAGS
1027LDFLAGS
1028LIBS
1029CPPFLAGS
1030CXX
1031CXXFLAGS
1032CCC
1033OBJC
1034OBJCFLAGS
1035CPP
1036CXXCPP
1037XMKMF
1038FREETYPE2_CFLAGS
1039FREETYPE2_LIBS
1040ALSA_CFLAGS
1041ALSA_LIBS'
1042
1043
1044# Initialize some variables set by options.
1045ac_init_help=
1046ac_init_version=false
1047ac_unrecognized_opts=
1048ac_unrecognized_sep=
1049# The variables have the same names as the options, with
1050# dashes changed to underlines.
1051cache_file=/dev/null
1052exec_prefix=NONE
1053no_create=
1054no_recursion=
1055prefix=NONE
1056program_prefix=NONE
1057program_suffix=NONE
1058program_transform_name=s,x,x,
1059silent=
1060site=
1061srcdir=
1062verbose=
1063x_includes=NONE
1064x_libraries=NONE
1065
1066# Installation directory options.
1067# These are left unexpanded so users can "make install exec_prefix=/foo"
1068# and all the variables that are supposed to be based on exec_prefix
1069# by default will actually change.
1070# Use braces instead of parens because sh, perl, etc. also accept them.
1071# (The list follows the same order as the GNU Coding Standards.)
1072bindir='${exec_prefix}/bin'
1073sbindir='${exec_prefix}/sbin'
1074libexecdir='${exec_prefix}/libexec'
1075datarootdir='${prefix}/share'
1076datadir='${datarootdir}'
1077sysconfdir='${prefix}/etc'
1078sharedstatedir='${prefix}/com'
1079localstatedir='${prefix}/var'
1080includedir='${prefix}/include'
1081oldincludedir='/usr/include'
1082docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1083infodir='${datarootdir}/info'
1084htmldir='${docdir}'
1085dvidir='${docdir}'
1086pdfdir='${docdir}'
1087psdir='${docdir}'
1088libdir='${exec_prefix}/lib'
1089localedir='${datarootdir}/locale'
1090mandir='${datarootdir}/man'
1091
1092ac_prev=
1093ac_dashdash=
1094for ac_option
1095do
1096  # If the previous option needs an argument, assign it.
1097  if test -n "$ac_prev"; then
1098    eval $ac_prev=\$ac_option
1099    ac_prev=
1100    continue
1101  fi
1102
1103  case $ac_option in
1104  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1105  *=)   ac_optarg= ;;
1106  *)    ac_optarg=yes ;;
1107  esac
1108
1109  # Accept the important Cygnus configure options, so we can diagnose typos.
1110
1111  case $ac_dashdash$ac_option in
1112  --)
1113    ac_dashdash=yes ;;
1114
1115  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1116    ac_prev=bindir ;;
1117  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1118    bindir=$ac_optarg ;;
1119
1120  -build | --build | --buil | --bui | --bu)
1121    ac_prev=build_alias ;;
1122  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1123    build_alias=$ac_optarg ;;
1124
1125  -cache-file | --cache-file | --cache-fil | --cache-fi \
1126  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1127    ac_prev=cache_file ;;
1128  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1129  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1130    cache_file=$ac_optarg ;;
1131
1132  --config-cache | -C)
1133    cache_file=config.cache ;;
1134
1135  -datadir | --datadir | --datadi | --datad)
1136    ac_prev=datadir ;;
1137  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1138    datadir=$ac_optarg ;;
1139
1140  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1141  | --dataroo | --dataro | --datar)
1142    ac_prev=datarootdir ;;
1143  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1144  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1145    datarootdir=$ac_optarg ;;
1146
1147  -disable-* | --disable-*)
1148    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1149    # Reject names that are not valid shell variable names.
1150    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1151      as_fn_error $? "invalid feature name: $ac_useropt"
1152    ac_useropt_orig=$ac_useropt
1153    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1154    case $ac_user_opts in
1155      *"
1156"enable_$ac_useropt"
1157"*) ;;
1158      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1159	 ac_unrecognized_sep=', ';;
1160    esac
1161    eval enable_$ac_useropt=no ;;
1162
1163  -docdir | --docdir | --docdi | --doc | --do)
1164    ac_prev=docdir ;;
1165  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1166    docdir=$ac_optarg ;;
1167
1168  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1169    ac_prev=dvidir ;;
1170  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1171    dvidir=$ac_optarg ;;
1172
1173  -enable-* | --enable-*)
1174    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1175    # Reject names that are not valid shell variable names.
1176    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1177      as_fn_error $? "invalid feature name: $ac_useropt"
1178    ac_useropt_orig=$ac_useropt
1179    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1180    case $ac_user_opts in
1181      *"
1182"enable_$ac_useropt"
1183"*) ;;
1184      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1185	 ac_unrecognized_sep=', ';;
1186    esac
1187    eval enable_$ac_useropt=\$ac_optarg ;;
1188
1189  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1190  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1191  | --exec | --exe | --ex)
1192    ac_prev=exec_prefix ;;
1193  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1194  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1195  | --exec=* | --exe=* | --ex=*)
1196    exec_prefix=$ac_optarg ;;
1197
1198  -gas | --gas | --ga | --g)
1199    # Obsolete; use --with-gas.
1200    with_gas=yes ;;
1201
1202  -help | --help | --hel | --he | -h)
1203    ac_init_help=long ;;
1204  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1205    ac_init_help=recursive ;;
1206  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1207    ac_init_help=short ;;
1208
1209  -host | --host | --hos | --ho)
1210    ac_prev=host_alias ;;
1211  -host=* | --host=* | --hos=* | --ho=*)
1212    host_alias=$ac_optarg ;;
1213
1214  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1215    ac_prev=htmldir ;;
1216  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1217  | --ht=*)
1218    htmldir=$ac_optarg ;;
1219
1220  -includedir | --includedir | --includedi | --included | --include \
1221  | --includ | --inclu | --incl | --inc)
1222    ac_prev=includedir ;;
1223  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1224  | --includ=* | --inclu=* | --incl=* | --inc=*)
1225    includedir=$ac_optarg ;;
1226
1227  -infodir | --infodir | --infodi | --infod | --info | --inf)
1228    ac_prev=infodir ;;
1229  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1230    infodir=$ac_optarg ;;
1231
1232  -libdir | --libdir | --libdi | --libd)
1233    ac_prev=libdir ;;
1234  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1235    libdir=$ac_optarg ;;
1236
1237  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1238  | --libexe | --libex | --libe)
1239    ac_prev=libexecdir ;;
1240  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1241  | --libexe=* | --libex=* | --libe=*)
1242    libexecdir=$ac_optarg ;;
1243
1244  -localedir | --localedir | --localedi | --localed | --locale)
1245    ac_prev=localedir ;;
1246  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1247    localedir=$ac_optarg ;;
1248
1249  -localstatedir | --localstatedir | --localstatedi | --localstated \
1250  | --localstate | --localstat | --localsta | --localst | --locals)
1251    ac_prev=localstatedir ;;
1252  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1253  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1254    localstatedir=$ac_optarg ;;
1255
1256  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1257    ac_prev=mandir ;;
1258  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1259    mandir=$ac_optarg ;;
1260
1261  -nfp | --nfp | --nf)
1262    # Obsolete; use --without-fp.
1263    with_fp=no ;;
1264
1265  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1266  | --no-cr | --no-c | -n)
1267    no_create=yes ;;
1268
1269  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1270  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1271    no_recursion=yes ;;
1272
1273  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1274  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1275  | --oldin | --oldi | --old | --ol | --o)
1276    ac_prev=oldincludedir ;;
1277  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1278  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1279  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1280    oldincludedir=$ac_optarg ;;
1281
1282  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1283    ac_prev=prefix ;;
1284  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1285    prefix=$ac_optarg ;;
1286
1287  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1288  | --program-pre | --program-pr | --program-p)
1289    ac_prev=program_prefix ;;
1290  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1291  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1292    program_prefix=$ac_optarg ;;
1293
1294  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1295  | --program-suf | --program-su | --program-s)
1296    ac_prev=program_suffix ;;
1297  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1298  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1299    program_suffix=$ac_optarg ;;
1300
1301  -program-transform-name | --program-transform-name \
1302  | --program-transform-nam | --program-transform-na \
1303  | --program-transform-n | --program-transform- \
1304  | --program-transform | --program-transfor \
1305  | --program-transfo | --program-transf \
1306  | --program-trans | --program-tran \
1307  | --progr-tra | --program-tr | --program-t)
1308    ac_prev=program_transform_name ;;
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    program_transform_name=$ac_optarg ;;
1317
1318  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1319    ac_prev=pdfdir ;;
1320  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1321    pdfdir=$ac_optarg ;;
1322
1323  -psdir | --psdir | --psdi | --psd | --ps)
1324    ac_prev=psdir ;;
1325  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1326    psdir=$ac_optarg ;;
1327
1328  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1329  | -silent | --silent | --silen | --sile | --sil)
1330    silent=yes ;;
1331
1332  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1333    ac_prev=sbindir ;;
1334  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1335  | --sbi=* | --sb=*)
1336    sbindir=$ac_optarg ;;
1337
1338  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1339  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1340  | --sharedst | --shareds | --shared | --share | --shar \
1341  | --sha | --sh)
1342    ac_prev=sharedstatedir ;;
1343  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1344  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1345  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1346  | --sha=* | --sh=*)
1347    sharedstatedir=$ac_optarg ;;
1348
1349  -site | --site | --sit)
1350    ac_prev=site ;;
1351  -site=* | --site=* | --sit=*)
1352    site=$ac_optarg ;;
1353
1354  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1355    ac_prev=srcdir ;;
1356  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1357    srcdir=$ac_optarg ;;
1358
1359  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1360  | --syscon | --sysco | --sysc | --sys | --sy)
1361    ac_prev=sysconfdir ;;
1362  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1363  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1364    sysconfdir=$ac_optarg ;;
1365
1366  -target | --target | --targe | --targ | --tar | --ta | --t)
1367    ac_prev=target_alias ;;
1368  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1369    target_alias=$ac_optarg ;;
1370
1371  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1372    verbose=yes ;;
1373
1374  -version | --version | --versio | --versi | --vers | -V)
1375    ac_init_version=: ;;
1376
1377  -with-* | --with-*)
1378    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1379    # Reject names that are not valid shell variable names.
1380    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1381      as_fn_error $? "invalid package name: $ac_useropt"
1382    ac_useropt_orig=$ac_useropt
1383    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1384    case $ac_user_opts in
1385      *"
1386"with_$ac_useropt"
1387"*) ;;
1388      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1389	 ac_unrecognized_sep=', ';;
1390    esac
1391    eval with_$ac_useropt=\$ac_optarg ;;
1392
1393  -without-* | --without-*)
1394    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1395    # Reject names that are not valid shell variable names.
1396    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1397      as_fn_error $? "invalid package name: $ac_useropt"
1398    ac_useropt_orig=$ac_useropt
1399    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1400    case $ac_user_opts in
1401      *"
1402"with_$ac_useropt"
1403"*) ;;
1404      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1405	 ac_unrecognized_sep=', ';;
1406    esac
1407    eval with_$ac_useropt=no ;;
1408
1409  --x)
1410    # Obsolete; use --with-x.
1411    with_x=yes ;;
1412
1413  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1414  | --x-incl | --x-inc | --x-in | --x-i)
1415    ac_prev=x_includes ;;
1416  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1417  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1418    x_includes=$ac_optarg ;;
1419
1420  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1421  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1422    ac_prev=x_libraries ;;
1423  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1424  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1425    x_libraries=$ac_optarg ;;
1426
1427  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1428Try \`$0 --help' for more information"
1429    ;;
1430
1431  *=*)
1432    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1433    # Reject names that are not valid shell variable names.
1434    case $ac_envvar in #(
1435      '' | [0-9]* | *[!_$as_cr_alnum]* )
1436      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1437    esac
1438    eval $ac_envvar=\$ac_optarg
1439    export $ac_envvar ;;
1440
1441  *)
1442    # FIXME: should be removed in autoconf 3.0.
1443    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1444    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1445      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1446    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1447    ;;
1448
1449  esac
1450done
1451
1452if test -n "$ac_prev"; then
1453  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1454  as_fn_error $? "missing argument to $ac_option"
1455fi
1456
1457if test -n "$ac_unrecognized_opts"; then
1458  case $enable_option_checking in
1459    no) ;;
1460    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1461    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1462  esac
1463fi
1464
1465# Check all directory arguments for consistency.
1466for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1467		datadir sysconfdir sharedstatedir localstatedir includedir \
1468		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1469		libdir localedir mandir
1470do
1471  eval ac_val=\$$ac_var
1472  # Remove trailing slashes.
1473  case $ac_val in
1474    */ )
1475      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1476      eval $ac_var=\$ac_val;;
1477  esac
1478  # Be sure to have absolute directory names.
1479  case $ac_val in
1480    [\\/$]* | ?:[\\/]* )  continue;;
1481    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1482  esac
1483  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1484done
1485
1486# There might be people who depend on the old broken behavior: `$host'
1487# used to hold the argument of --host etc.
1488# FIXME: To remove some day.
1489build=$build_alias
1490host=$host_alias
1491target=$target_alias
1492
1493# FIXME: To remove some day.
1494if test "x$host_alias" != x; then
1495  if test "x$build_alias" = x; then
1496    cross_compiling=maybe
1497    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1498    If a cross compiler is detected then cross compile mode will be used" >&2
1499  elif test "x$build_alias" != "x$host_alias"; then
1500    cross_compiling=yes
1501  fi
1502fi
1503
1504ac_tool_prefix=
1505test -n "$host_alias" && ac_tool_prefix=$host_alias-
1506
1507test "$silent" = yes && exec 6>/dev/null
1508
1509
1510ac_pwd=`pwd` && test -n "$ac_pwd" &&
1511ac_ls_di=`ls -di .` &&
1512ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1513  as_fn_error $? "working directory cannot be determined"
1514test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1515  as_fn_error $? "pwd does not report name of working directory"
1516
1517
1518# Find the source files, if location was not specified.
1519if test -z "$srcdir"; then
1520  ac_srcdir_defaulted=yes
1521  # Try the directory containing this script, then the parent directory.
1522  ac_confdir=`$as_dirname -- "$as_myself" ||
1523$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1524	 X"$as_myself" : 'X\(//\)[^/]' \| \
1525	 X"$as_myself" : 'X\(//\)$' \| \
1526	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1527$as_echo X"$as_myself" |
1528    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1529	    s//\1/
1530	    q
1531	  }
1532	  /^X\(\/\/\)[^/].*/{
1533	    s//\1/
1534	    q
1535	  }
1536	  /^X\(\/\/\)$/{
1537	    s//\1/
1538	    q
1539	  }
1540	  /^X\(\/\).*/{
1541	    s//\1/
1542	    q
1543	  }
1544	  s/.*/./; q'`
1545  srcdir=$ac_confdir
1546  if test ! -r "$srcdir/$ac_unique_file"; then
1547    srcdir=..
1548  fi
1549else
1550  ac_srcdir_defaulted=no
1551fi
1552if test ! -r "$srcdir/$ac_unique_file"; then
1553  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1554  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1555fi
1556ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1557ac_abs_confdir=`(
1558	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1559	pwd)`
1560# When building in place, set srcdir=.
1561if test "$ac_abs_confdir" = "$ac_pwd"; then
1562  srcdir=.
1563fi
1564# Remove unnecessary trailing slashes from srcdir.
1565# Double slashes in file names in object file debugging info
1566# mess up M-x gdb in Emacs.
1567case $srcdir in
1568*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1569esac
1570for ac_var in $ac_precious_vars; do
1571  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1572  eval ac_env_${ac_var}_value=\$${ac_var}
1573  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1574  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1575done
1576
1577#
1578# Report the --help message.
1579#
1580if test "$ac_init_help" = "long"; then
1581  # Omit some internal or obsolete options to make the list less imposing.
1582  # This message is too long to be a string in the A/UX 3.1 sh.
1583  cat <<_ACEOF
1584\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1585
1586Usage: $0 [OPTION]... [VAR=VALUE]...
1587
1588To assign environment variables (e.g., CC, CFLAGS...), specify them as
1589VAR=VALUE.  See below for descriptions of some of the useful variables.
1590
1591Defaults for the options are specified in brackets.
1592
1593Configuration:
1594  -h, --help              display this help and exit
1595      --help=short        display options specific to this package
1596      --help=recursive    display the short help of all the included packages
1597  -V, --version           display version information and exit
1598  -q, --quiet, --silent   do not print \`checking ...' messages
1599      --cache-file=FILE   cache test results in FILE [disabled]
1600  -C, --config-cache      alias for \`--cache-file=config.cache'
1601  -n, --no-create         do not create output files
1602      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1603
1604Installation directories:
1605  --prefix=PREFIX         install architecture-independent files in PREFIX
1606                          [$ac_default_prefix]
1607  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1608                          [PREFIX]
1609
1610By default, \`make install' will install all the files in
1611\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1612an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1613for instance \`--prefix=\$HOME'.
1614
1615For better control, use the options below.
1616
1617Fine tuning of the installation directories:
1618  --bindir=DIR            user executables [EPREFIX/bin]
1619  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1620  --libexecdir=DIR        program executables [EPREFIX/libexec]
1621  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1622  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1623  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1624  --libdir=DIR            object code libraries [EPREFIX/lib]
1625  --includedir=DIR        C header files [PREFIX/include]
1626  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1627  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1628  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1629  --infodir=DIR           info documentation [DATAROOTDIR/info]
1630  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1631  --mandir=DIR            man documentation [DATAROOTDIR/man]
1632  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1633  --htmldir=DIR           html documentation [DOCDIR]
1634  --dvidir=DIR            dvi documentation [DOCDIR]
1635  --pdfdir=DIR            pdf documentation [DOCDIR]
1636  --psdir=DIR             ps documentation [DOCDIR]
1637_ACEOF
1638
1639  cat <<\_ACEOF
1640
1641X features:
1642  --x-includes=DIR    X include files are in DIR
1643  --x-libraries=DIR   X library files are in DIR
1644
1645System types:
1646  --build=BUILD     configure for building on BUILD [guessed]
1647  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1648  --target=TARGET   configure for building compilers for TARGET [HOST]
1649_ACEOF
1650fi
1651
1652if test -n "$ac_init_help"; then
1653  case $ac_init_help in
1654     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1655   esac
1656  cat <<\_ACEOF
1657
1658Optional Features:
1659  --disable-option-checking  ignore unrecognized --enable/--with options
1660  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1661  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1662  --enable-openjdk-only   suppress building custom source even if present
1663                          [disabled]
1664  --enable-debug          set the debug level to fastdebug (shorthand for
1665                          --with-debug-level=fastdebug) [disabled]
1666  --disable-headful       disable building headful support (graphical UI
1667                          support) [enabled]
1668  --enable-hotspot-test-in-build
1669                          run the Queens test after Hotspot build [disabled]
1670  --enable-unlimited-crypto
1671                          Enable unlimited crypto policy [disabled]
1672  --disable-debug-symbols disable generation of debug symbols [enabled]
1673  --disable-zip-debug-info
1674                          disable zipping of debug-info files [enabled]
1675  --disable-macosx-runtime-support
1676                          disable the use of MacOSX Java runtime support
1677                          framework [enabled]
1678  --enable-sjavac         use sjavac to do fast incremental compiles
1679                          [disabled]
1680  --disable-precompiled-headers
1681                          disable using precompiled headers when compiling C++
1682                          [enabled]
1683  --disable-ccache        disable using ccache to speed up recompilations
1684                          [enabled]
1685
1686Optional Packages:
1687  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1688  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1689  --with-custom-make-dir  use this directory for custom build/make files
1690  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1691                          support it), e.g. --with-target-bits=32 [guessed]
1692  --with-sys-root         pass this sys-root to the compilers and tools (for
1693                          cross-compiling)
1694  --with-tools-dir        search this directory for compilers and tools (for
1695                          cross-compiling)
1696  --with-devkit           use this directory as base for tools-dir and
1697                          sys-root (for cross-compiling)
1698  --with-jdk-variant      JDK variant to build (normal) [normal]
1699  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1700                          client, minimal1, kernel, zero, zeroshark) [server]
1701  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1702                          [release]
1703  --with-conf-name        use this as the name of the configuration [generated
1704                          from important configuration options]
1705  --with-builddeps-conf   use this configuration file for the builddeps
1706  --with-builddeps-server download and use build dependencies from this server
1707                          url
1708  --with-builddeps-dir    store downloaded build dependencies here
1709                          [/localhome/builddeps]
1710  --with-builddeps-group  chgrp the downloaded build dependencies to this
1711                          group
1712  --with-cacerts-file     specify alternative cacerts file
1713  --with-milestone        Set milestone value for build [internal]
1714  --with-build-number     Set build number value for build [b00]
1715  --with-user-release-suffix
1716                          Add a custom string to the version string if build
1717                          number isn't set.[username_builddateb00]
1718  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1719  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1720                          invocations of the Boot JDK, overriding the default
1721                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1722                          -enableassertions"
1723  --with-add-source-root  for each and every source directory, look in this
1724                          additional source root for the same directory; if it
1725                          exists and have files in it, include it in the build
1726  --with-override-source-root
1727                          for each and every source directory, look in this
1728                          override source root for the same directory; if it
1729                          exists, use that directory instead and ignore the
1730                          directory in the original source root
1731  --with-adds-and-overrides
1732                          use the subdirs 'adds' and 'overrides' in the
1733                          specified directory as add-source-root and
1734                          override-source-root
1735  --with-override-langtools
1736                          use this langtools dir for the build
1737  --with-override-corba   use this corba dir for the build
1738  --with-override-jaxp    use this jaxp dir for the build
1739  --with-override-jaxws   use this jaxws dir for the build
1740  --with-override-hotspot use this hotspot dir for the build
1741  --with-override-jdk     use this jdk dir for the build
1742  --with-import-hotspot   import hotspot binaries from this jdk image or
1743                          hotspot build dist dir instead of building from
1744                          source
1745  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1746                          only) [probed]
1747  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1748  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1749  --with-extra-ldflags    extra flags to be used when linking jdk
1750  --with-x                use the X Window System
1751  --with-cups             specify prefix directory for the cups package
1752                          (expecting the headers under PATH/include)
1753  --with-cups-include     specify directory for the cups include files
1754  --with-freetype         specify prefix directory for the freetype2 package
1755                          (expecting the libraries under PATH/lib and the
1756                          headers under PATH/include)
1757  --with-alsa             specify prefix directory for the alsa package
1758                          (expecting the libraries under PATH/lib and the
1759                          headers under PATH/include)
1760  --with-alsa-include     specify directory for the alsa include files
1761  --with-alsa-lib         specify directory for the alsa library
1762  --with-zlib             use zlib from build system or OpenJDK source
1763                          (system, bundled) [bundled]
1764  --with-stdc++lib=<static>,<dynamic>,<default>
1765                          force linking of the C++ runtime on Linux to either
1766                          static or dynamic, default is static with dynamic as
1767                          fallback
1768  --with-num-cores        number of cores in the build system, e.g.
1769                          --with-num-cores=8 [probed]
1770  --with-memory-size      memory (in MB) available in the build system, e.g.
1771                          --with-memory-size=1024 [probed]
1772  --with-sjavac-server-java
1773                          use this java binary for running the sjavac
1774                          background server [Boot JDK java]
1775  --with-sjavac-server-cores
1776                          use at most this number of concurrent threads on the
1777                          sjavac server [probed]
1778  --with-ccache-dir       where to store ccache files [~/.ccache]
1779
1780Some influential environment variables:
1781  PKG_CONFIG  path to pkg-config utility
1782  CC          C compiler command
1783  CFLAGS      C compiler flags
1784  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1785              nonstandard directory <lib dir>
1786  LIBS        libraries to pass to the linker, e.g. -l<library>
1787  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1788              you have headers in a nonstandard directory <include dir>
1789  CXX         C++ compiler command
1790  CXXFLAGS    C++ compiler flags
1791  OBJC        Objective C compiler command
1792  OBJCFLAGS   Objective C compiler flags
1793  CPP         C preprocessor
1794  CXXCPP      C++ preprocessor
1795  XMKMF       Path to xmkmf, Makefile generator for X Window System
1796  FREETYPE2_CFLAGS
1797              C compiler flags for FREETYPE2, overriding pkg-config
1798  FREETYPE2_LIBS
1799              linker flags for FREETYPE2, overriding pkg-config
1800  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1801  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1802
1803Use these variables to override the choices made by `configure' or to help
1804it to find libraries and programs with nonstandard names/locations.
1805
1806Report bugs to <build-dev@openjdk.java.net>.
1807OpenJDK home page: <http://openjdk.java.net>.
1808_ACEOF
1809ac_status=$?
1810fi
1811
1812if test "$ac_init_help" = "recursive"; then
1813  # If there are subdirs, report their specific --help.
1814  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1815    test -d "$ac_dir" ||
1816      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1817      continue
1818    ac_builddir=.
1819
1820case "$ac_dir" in
1821.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1822*)
1823  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1824  # A ".." for each directory in $ac_dir_suffix.
1825  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1826  case $ac_top_builddir_sub in
1827  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1828  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1829  esac ;;
1830esac
1831ac_abs_top_builddir=$ac_pwd
1832ac_abs_builddir=$ac_pwd$ac_dir_suffix
1833# for backward compatibility:
1834ac_top_builddir=$ac_top_build_prefix
1835
1836case $srcdir in
1837  .)  # We are building in place.
1838    ac_srcdir=.
1839    ac_top_srcdir=$ac_top_builddir_sub
1840    ac_abs_top_srcdir=$ac_pwd ;;
1841  [\\/]* | ?:[\\/]* )  # Absolute name.
1842    ac_srcdir=$srcdir$ac_dir_suffix;
1843    ac_top_srcdir=$srcdir
1844    ac_abs_top_srcdir=$srcdir ;;
1845  *) # Relative name.
1846    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1847    ac_top_srcdir=$ac_top_build_prefix$srcdir
1848    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1849esac
1850ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1851
1852    cd "$ac_dir" || { ac_status=$?; continue; }
1853    # Check for guested configure.
1854    if test -f "$ac_srcdir/configure.gnu"; then
1855      echo &&
1856      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1857    elif test -f "$ac_srcdir/configure"; then
1858      echo &&
1859      $SHELL "$ac_srcdir/configure" --help=recursive
1860    else
1861      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1862    fi || ac_status=$?
1863    cd "$ac_pwd" || { ac_status=$?; break; }
1864  done
1865fi
1866
1867test -n "$ac_init_help" && exit $ac_status
1868if $ac_init_version; then
1869  cat <<\_ACEOF
1870OpenJDK configure jdk8
1871generated by GNU Autoconf 2.68
1872
1873Copyright (C) 2010 Free Software Foundation, Inc.
1874This configure script is free software; the Free Software Foundation
1875gives unlimited permission to copy, distribute and modify it.
1876_ACEOF
1877  exit
1878fi
1879
1880## ------------------------ ##
1881## Autoconf initialization. ##
1882## ------------------------ ##
1883
1884# ac_fn_c_try_compile LINENO
1885# --------------------------
1886# Try to compile conftest.$ac_ext, and return whether this succeeded.
1887ac_fn_c_try_compile ()
1888{
1889  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1890  rm -f conftest.$ac_objext
1891  if { { ac_try="$ac_compile"
1892case "(($ac_try" in
1893  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1894  *) ac_try_echo=$ac_try;;
1895esac
1896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1897$as_echo "$ac_try_echo"; } >&5
1898  (eval "$ac_compile") 2>conftest.err
1899  ac_status=$?
1900  if test -s conftest.err; then
1901    grep -v '^ *+' conftest.err >conftest.er1
1902    cat conftest.er1 >&5
1903    mv -f conftest.er1 conftest.err
1904  fi
1905  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1906  test $ac_status = 0; } && {
1907	 test -z "$ac_c_werror_flag" ||
1908	 test ! -s conftest.err
1909       } && test -s conftest.$ac_objext; then :
1910  ac_retval=0
1911else
1912  $as_echo "$as_me: failed program was:" >&5
1913sed 's/^/| /' conftest.$ac_ext >&5
1914
1915	ac_retval=1
1916fi
1917  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1918  as_fn_set_status $ac_retval
1919
1920} # ac_fn_c_try_compile
1921
1922# ac_fn_cxx_try_compile LINENO
1923# ----------------------------
1924# Try to compile conftest.$ac_ext, and return whether this succeeded.
1925ac_fn_cxx_try_compile ()
1926{
1927  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1928  rm -f conftest.$ac_objext
1929  if { { ac_try="$ac_compile"
1930case "(($ac_try" in
1931  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1932  *) ac_try_echo=$ac_try;;
1933esac
1934eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1935$as_echo "$ac_try_echo"; } >&5
1936  (eval "$ac_compile") 2>conftest.err
1937  ac_status=$?
1938  if test -s conftest.err; then
1939    grep -v '^ *+' conftest.err >conftest.er1
1940    cat conftest.er1 >&5
1941    mv -f conftest.er1 conftest.err
1942  fi
1943  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1944  test $ac_status = 0; } && {
1945	 test -z "$ac_cxx_werror_flag" ||
1946	 test ! -s conftest.err
1947       } && test -s conftest.$ac_objext; then :
1948  ac_retval=0
1949else
1950  $as_echo "$as_me: failed program was:" >&5
1951sed 's/^/| /' conftest.$ac_ext >&5
1952
1953	ac_retval=1
1954fi
1955  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1956  as_fn_set_status $ac_retval
1957
1958} # ac_fn_cxx_try_compile
1959
1960# ac_fn_objc_try_compile LINENO
1961# -----------------------------
1962# Try to compile conftest.$ac_ext, and return whether this succeeded.
1963ac_fn_objc_try_compile ()
1964{
1965  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1966  rm -f conftest.$ac_objext
1967  if { { ac_try="$ac_compile"
1968case "(($ac_try" in
1969  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1970  *) ac_try_echo=$ac_try;;
1971esac
1972eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1973$as_echo "$ac_try_echo"; } >&5
1974  (eval "$ac_compile") 2>conftest.err
1975  ac_status=$?
1976  if test -s conftest.err; then
1977    grep -v '^ *+' conftest.err >conftest.er1
1978    cat conftest.er1 >&5
1979    mv -f conftest.er1 conftest.err
1980  fi
1981  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1982  test $ac_status = 0; } && {
1983	 test -z "$ac_objc_werror_flag" ||
1984	 test ! -s conftest.err
1985       } && test -s conftest.$ac_objext; then :
1986  ac_retval=0
1987else
1988  $as_echo "$as_me: failed program was:" >&5
1989sed 's/^/| /' conftest.$ac_ext >&5
1990
1991	ac_retval=1
1992fi
1993  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1994  as_fn_set_status $ac_retval
1995
1996} # ac_fn_objc_try_compile
1997
1998# ac_fn_c_try_cpp LINENO
1999# ----------------------
2000# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2001ac_fn_c_try_cpp ()
2002{
2003  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2004  if { { ac_try="$ac_cpp conftest.$ac_ext"
2005case "(($ac_try" in
2006  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2007  *) ac_try_echo=$ac_try;;
2008esac
2009eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2010$as_echo "$ac_try_echo"; } >&5
2011  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2012  ac_status=$?
2013  if test -s conftest.err; then
2014    grep -v '^ *+' conftest.err >conftest.er1
2015    cat conftest.er1 >&5
2016    mv -f conftest.er1 conftest.err
2017  fi
2018  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2019  test $ac_status = 0; } > conftest.i && {
2020	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2021	 test ! -s conftest.err
2022       }; then :
2023  ac_retval=0
2024else
2025  $as_echo "$as_me: failed program was:" >&5
2026sed 's/^/| /' conftest.$ac_ext >&5
2027
2028    ac_retval=1
2029fi
2030  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2031  as_fn_set_status $ac_retval
2032
2033} # ac_fn_c_try_cpp
2034
2035# ac_fn_cxx_try_cpp LINENO
2036# ------------------------
2037# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2038ac_fn_cxx_try_cpp ()
2039{
2040  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2041  if { { ac_try="$ac_cpp conftest.$ac_ext"
2042case "(($ac_try" in
2043  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2044  *) ac_try_echo=$ac_try;;
2045esac
2046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2047$as_echo "$ac_try_echo"; } >&5
2048  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2049  ac_status=$?
2050  if test -s conftest.err; then
2051    grep -v '^ *+' conftest.err >conftest.er1
2052    cat conftest.er1 >&5
2053    mv -f conftest.er1 conftest.err
2054  fi
2055  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2056  test $ac_status = 0; } > conftest.i && {
2057	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2058	 test ! -s conftest.err
2059       }; then :
2060  ac_retval=0
2061else
2062  $as_echo "$as_me: failed program was:" >&5
2063sed 's/^/| /' conftest.$ac_ext >&5
2064
2065    ac_retval=1
2066fi
2067  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2068  as_fn_set_status $ac_retval
2069
2070} # ac_fn_cxx_try_cpp
2071
2072# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2073# ---------------------------------------------------------
2074# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2075# the include files in INCLUDES and setting the cache variable VAR
2076# accordingly.
2077ac_fn_cxx_check_header_mongrel ()
2078{
2079  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2080  if eval \${$3+:} false; then :
2081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2082$as_echo_n "checking for $2... " >&6; }
2083if eval \${$3+:} false; then :
2084  $as_echo_n "(cached) " >&6
2085fi
2086eval ac_res=\$$3
2087	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2088$as_echo "$ac_res" >&6; }
2089else
2090  # Is the header compilable?
2091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2092$as_echo_n "checking $2 usability... " >&6; }
2093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h.  */
2095$4
2096#include <$2>
2097_ACEOF
2098if ac_fn_cxx_try_compile "$LINENO"; then :
2099  ac_header_compiler=yes
2100else
2101  ac_header_compiler=no
2102fi
2103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2105$as_echo "$ac_header_compiler" >&6; }
2106
2107# Is the header present?
2108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2109$as_echo_n "checking $2 presence... " >&6; }
2110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111/* end confdefs.h.  */
2112#include <$2>
2113_ACEOF
2114if ac_fn_cxx_try_cpp "$LINENO"; then :
2115  ac_header_preproc=yes
2116else
2117  ac_header_preproc=no
2118fi
2119rm -f conftest.err conftest.i conftest.$ac_ext
2120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2121$as_echo "$ac_header_preproc" >&6; }
2122
2123# So?  What about this header?
2124case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2125  yes:no: )
2126    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2127$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2128    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2129$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2130    ;;
2131  no:yes:* )
2132    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2133$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2134    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2135$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2136    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2137$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2138    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2139$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2140    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2141$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2142( $as_echo "## ----------------------------------------- ##
2143## Report this to build-dev@openjdk.java.net ##
2144## ----------------------------------------- ##"
2145     ) | sed "s/^/$as_me: WARNING:     /" >&2
2146    ;;
2147esac
2148  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2149$as_echo_n "checking for $2... " >&6; }
2150if eval \${$3+:} false; then :
2151  $as_echo_n "(cached) " >&6
2152else
2153  eval "$3=\$ac_header_compiler"
2154fi
2155eval ac_res=\$$3
2156	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2157$as_echo "$ac_res" >&6; }
2158fi
2159  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2160
2161} # ac_fn_cxx_check_header_mongrel
2162
2163# ac_fn_cxx_try_run LINENO
2164# ------------------------
2165# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2166# that executables *can* be run.
2167ac_fn_cxx_try_run ()
2168{
2169  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2170  if { { ac_try="$ac_link"
2171case "(($ac_try" in
2172  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2173  *) ac_try_echo=$ac_try;;
2174esac
2175eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2176$as_echo "$ac_try_echo"; } >&5
2177  (eval "$ac_link") 2>&5
2178  ac_status=$?
2179  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2180  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2181  { { case "(($ac_try" in
2182  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2183  *) ac_try_echo=$ac_try;;
2184esac
2185eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2186$as_echo "$ac_try_echo"; } >&5
2187  (eval "$ac_try") 2>&5
2188  ac_status=$?
2189  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2190  test $ac_status = 0; }; }; then :
2191  ac_retval=0
2192else
2193  $as_echo "$as_me: program exited with status $ac_status" >&5
2194       $as_echo "$as_me: failed program was:" >&5
2195sed 's/^/| /' conftest.$ac_ext >&5
2196
2197       ac_retval=$ac_status
2198fi
2199  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2200  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2201  as_fn_set_status $ac_retval
2202
2203} # ac_fn_cxx_try_run
2204
2205# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2206# ---------------------------------------------------------
2207# Tests whether HEADER exists and can be compiled using the include files in
2208# INCLUDES, setting the cache variable VAR accordingly.
2209ac_fn_cxx_check_header_compile ()
2210{
2211  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2213$as_echo_n "checking for $2... " >&6; }
2214if eval \${$3+:} false; then :
2215  $as_echo_n "(cached) " >&6
2216else
2217  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218/* end confdefs.h.  */
2219$4
2220#include <$2>
2221_ACEOF
2222if ac_fn_cxx_try_compile "$LINENO"; then :
2223  eval "$3=yes"
2224else
2225  eval "$3=no"
2226fi
2227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2228fi
2229eval ac_res=\$$3
2230	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2231$as_echo "$ac_res" >&6; }
2232  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2233
2234} # ac_fn_cxx_check_header_compile
2235
2236# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2237# ----------------------------------------------
2238# Tries to find the compile-time value of EXPR in a program that includes
2239# INCLUDES, setting VAR accordingly. Returns whether the value could be
2240# computed
2241ac_fn_cxx_compute_int ()
2242{
2243  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244  if test "$cross_compiling" = yes; then
2245    # Depending upon the size, compute the lo and hi bounds.
2246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h.  */
2248$4
2249int
2250main ()
2251{
2252static int test_array [1 - 2 * !(($2) >= 0)];
2253test_array [0] = 0
2254
2255  ;
2256  return 0;
2257}
2258_ACEOF
2259if ac_fn_cxx_try_compile "$LINENO"; then :
2260  ac_lo=0 ac_mid=0
2261  while :; do
2262    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h.  */
2264$4
2265int
2266main ()
2267{
2268static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2269test_array [0] = 0
2270
2271  ;
2272  return 0;
2273}
2274_ACEOF
2275if ac_fn_cxx_try_compile "$LINENO"; then :
2276  ac_hi=$ac_mid; break
2277else
2278  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2279			if test $ac_lo -le $ac_mid; then
2280			  ac_lo= ac_hi=
2281			  break
2282			fi
2283			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286  done
2287else
2288  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289/* end confdefs.h.  */
2290$4
2291int
2292main ()
2293{
2294static int test_array [1 - 2 * !(($2) < 0)];
2295test_array [0] = 0
2296
2297  ;
2298  return 0;
2299}
2300_ACEOF
2301if ac_fn_cxx_try_compile "$LINENO"; then :
2302  ac_hi=-1 ac_mid=-1
2303  while :; do
2304    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2305/* end confdefs.h.  */
2306$4
2307int
2308main ()
2309{
2310static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2311test_array [0] = 0
2312
2313  ;
2314  return 0;
2315}
2316_ACEOF
2317if ac_fn_cxx_try_compile "$LINENO"; then :
2318  ac_lo=$ac_mid; break
2319else
2320  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2321			if test $ac_mid -le $ac_hi; then
2322			  ac_lo= ac_hi=
2323			  break
2324			fi
2325			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2326fi
2327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328  done
2329else
2330  ac_lo= ac_hi=
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335# Binary search between lo and hi bounds.
2336while test "x$ac_lo" != "x$ac_hi"; do
2337  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2339/* end confdefs.h.  */
2340$4
2341int
2342main ()
2343{
2344static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2345test_array [0] = 0
2346
2347  ;
2348  return 0;
2349}
2350_ACEOF
2351if ac_fn_cxx_try_compile "$LINENO"; then :
2352  ac_hi=$ac_mid
2353else
2354  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2355fi
2356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2357done
2358case $ac_lo in #((
2359?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2360'') ac_retval=1 ;;
2361esac
2362  else
2363    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h.  */
2365$4
2366static long int longval () { return $2; }
2367static unsigned long int ulongval () { return $2; }
2368#include <stdio.h>
2369#include <stdlib.h>
2370int
2371main ()
2372{
2373
2374  FILE *f = fopen ("conftest.val", "w");
2375  if (! f)
2376    return 1;
2377  if (($2) < 0)
2378    {
2379      long int i = longval ();
2380      if (i != ($2))
2381	return 1;
2382      fprintf (f, "%ld", i);
2383    }
2384  else
2385    {
2386      unsigned long int i = ulongval ();
2387      if (i != ($2))
2388	return 1;
2389      fprintf (f, "%lu", i);
2390    }
2391  /* Do not output a trailing newline, as this causes \r\n confusion
2392     on some platforms.  */
2393  return ferror (f) || fclose (f) != 0;
2394
2395  ;
2396  return 0;
2397}
2398_ACEOF
2399if ac_fn_cxx_try_run "$LINENO"; then :
2400  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2401else
2402  ac_retval=1
2403fi
2404rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2405  conftest.$ac_objext conftest.beam conftest.$ac_ext
2406rm -f conftest.val
2407
2408  fi
2409  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2410  as_fn_set_status $ac_retval
2411
2412} # ac_fn_cxx_compute_int
2413
2414# ac_fn_cxx_try_link LINENO
2415# -------------------------
2416# Try to link conftest.$ac_ext, and return whether this succeeded.
2417ac_fn_cxx_try_link ()
2418{
2419  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2420  rm -f conftest.$ac_objext conftest$ac_exeext
2421  if { { ac_try="$ac_link"
2422case "(($ac_try" in
2423  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2424  *) ac_try_echo=$ac_try;;
2425esac
2426eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2427$as_echo "$ac_try_echo"; } >&5
2428  (eval "$ac_link") 2>conftest.err
2429  ac_status=$?
2430  if test -s conftest.err; then
2431    grep -v '^ *+' conftest.err >conftest.er1
2432    cat conftest.er1 >&5
2433    mv -f conftest.er1 conftest.err
2434  fi
2435  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2436  test $ac_status = 0; } && {
2437	 test -z "$ac_cxx_werror_flag" ||
2438	 test ! -s conftest.err
2439       } && test -s conftest$ac_exeext && {
2440	 test "$cross_compiling" = yes ||
2441	 $as_test_x conftest$ac_exeext
2442       }; then :
2443  ac_retval=0
2444else
2445  $as_echo "$as_me: failed program was:" >&5
2446sed 's/^/| /' conftest.$ac_ext >&5
2447
2448	ac_retval=1
2449fi
2450  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2451  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2452  # interfere with the next link command; also delete a directory that is
2453  # left behind by Apple's compiler.  We do this before executing the actions.
2454  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2455  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2456  as_fn_set_status $ac_retval
2457
2458} # ac_fn_cxx_try_link
2459
2460# ac_fn_cxx_check_func LINENO FUNC VAR
2461# ------------------------------------
2462# Tests whether FUNC exists, setting the cache variable VAR accordingly
2463ac_fn_cxx_check_func ()
2464{
2465  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2466  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2467$as_echo_n "checking for $2... " >&6; }
2468if eval \${$3+:} false; then :
2469  $as_echo_n "(cached) " >&6
2470else
2471  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2472/* end confdefs.h.  */
2473/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2474   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2475#define $2 innocuous_$2
2476
2477/* System header to define __stub macros and hopefully few prototypes,
2478    which can conflict with char $2 (); below.
2479    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2480    <limits.h> exists even on freestanding compilers.  */
2481
2482#ifdef __STDC__
2483# include <limits.h>
2484#else
2485# include <assert.h>
2486#endif
2487
2488#undef $2
2489
2490/* Override any GCC internal prototype to avoid an error.
2491   Use char because int might match the return type of a GCC
2492   builtin and then its argument prototype would still apply.  */
2493#ifdef __cplusplus
2494extern "C"
2495#endif
2496char $2 ();
2497/* The GNU C library defines this for functions which it implements
2498    to always fail with ENOSYS.  Some functions are actually named
2499    something starting with __ and the normal name is an alias.  */
2500#if defined __stub_$2 || defined __stub___$2
2501choke me
2502#endif
2503
2504int
2505main ()
2506{
2507return $2 ();
2508  ;
2509  return 0;
2510}
2511_ACEOF
2512if ac_fn_cxx_try_link "$LINENO"; then :
2513  eval "$3=yes"
2514else
2515  eval "$3=no"
2516fi
2517rm -f core conftest.err conftest.$ac_objext \
2518    conftest$ac_exeext conftest.$ac_ext
2519fi
2520eval ac_res=\$$3
2521	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2522$as_echo "$ac_res" >&6; }
2523  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2524
2525} # ac_fn_cxx_check_func
2526
2527# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2528# -------------------------------------------------------
2529# Tests whether HEADER exists and can be compiled using the include files in
2530# INCLUDES, setting the cache variable VAR accordingly.
2531ac_fn_c_check_header_compile ()
2532{
2533  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2535$as_echo_n "checking for $2... " >&6; }
2536if eval \${$3+:} false; then :
2537  $as_echo_n "(cached) " >&6
2538else
2539  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2540/* end confdefs.h.  */
2541$4
2542#include <$2>
2543_ACEOF
2544if ac_fn_c_try_compile "$LINENO"; then :
2545  eval "$3=yes"
2546else
2547  eval "$3=no"
2548fi
2549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2550fi
2551eval ac_res=\$$3
2552	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2553$as_echo "$ac_res" >&6; }
2554  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2555
2556} # ac_fn_c_check_header_compile
2557cat >config.log <<_ACEOF
2558This file contains any messages produced by compilers while
2559running configure, to aid debugging if configure makes a mistake.
2560
2561It was created by OpenJDK $as_me jdk8, which was
2562generated by GNU Autoconf 2.68.  Invocation command line was
2563
2564  $ $0 $@
2565
2566_ACEOF
2567exec 5>>config.log
2568{
2569cat <<_ASUNAME
2570## --------- ##
2571## Platform. ##
2572## --------- ##
2573
2574hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2575uname -m = `(uname -m) 2>/dev/null || echo unknown`
2576uname -r = `(uname -r) 2>/dev/null || echo unknown`
2577uname -s = `(uname -s) 2>/dev/null || echo unknown`
2578uname -v = `(uname -v) 2>/dev/null || echo unknown`
2579
2580/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2581/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2582
2583/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2584/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2585/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2586/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2587/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2588/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2589/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2590
2591_ASUNAME
2592
2593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2594for as_dir in $PATH
2595do
2596  IFS=$as_save_IFS
2597  test -z "$as_dir" && as_dir=.
2598    $as_echo "PATH: $as_dir"
2599  done
2600IFS=$as_save_IFS
2601
2602} >&5
2603
2604cat >&5 <<_ACEOF
2605
2606
2607## ----------- ##
2608## Core tests. ##
2609## ----------- ##
2610
2611_ACEOF
2612
2613
2614# Keep a trace of the command line.
2615# Strip out --no-create and --no-recursion so they do not pile up.
2616# Strip out --silent because we don't want to record it for future runs.
2617# Also quote any args containing shell meta-characters.
2618# Make two passes to allow for proper duplicate-argument suppression.
2619ac_configure_args=
2620ac_configure_args0=
2621ac_configure_args1=
2622ac_must_keep_next=false
2623for ac_pass in 1 2
2624do
2625  for ac_arg
2626  do
2627    case $ac_arg in
2628    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2629    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2630    | -silent | --silent | --silen | --sile | --sil)
2631      continue ;;
2632    *\'*)
2633      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2634    esac
2635    case $ac_pass in
2636    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2637    2)
2638      as_fn_append ac_configure_args1 " '$ac_arg'"
2639      if test $ac_must_keep_next = true; then
2640	ac_must_keep_next=false # Got value, back to normal.
2641      else
2642	case $ac_arg in
2643	  *=* | --config-cache | -C | -disable-* | --disable-* \
2644	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2645	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2646	  | -with-* | --with-* | -without-* | --without-* | --x)
2647	    case "$ac_configure_args0 " in
2648	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2649	    esac
2650	    ;;
2651	  -* ) ac_must_keep_next=true ;;
2652	esac
2653      fi
2654      as_fn_append ac_configure_args " '$ac_arg'"
2655      ;;
2656    esac
2657  done
2658done
2659{ ac_configure_args0=; unset ac_configure_args0;}
2660{ ac_configure_args1=; unset ac_configure_args1;}
2661
2662# When interrupted or exit'd, cleanup temporary files, and complete
2663# config.log.  We remove comments because anyway the quotes in there
2664# would cause problems or look ugly.
2665# WARNING: Use '\'' to represent an apostrophe within the trap.
2666# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2667trap 'exit_status=$?
2668  # Save into config.log some information that might help in debugging.
2669  {
2670    echo
2671
2672    $as_echo "## ---------------- ##
2673## Cache variables. ##
2674## ---------------- ##"
2675    echo
2676    # The following way of writing the cache mishandles newlines in values,
2677(
2678  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2679    eval ac_val=\$$ac_var
2680    case $ac_val in #(
2681    *${as_nl}*)
2682      case $ac_var in #(
2683      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2684$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2685      esac
2686      case $ac_var in #(
2687      _ | IFS | as_nl) ;; #(
2688      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2689      *) { eval $ac_var=; unset $ac_var;} ;;
2690      esac ;;
2691    esac
2692  done
2693  (set) 2>&1 |
2694    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2695    *${as_nl}ac_space=\ *)
2696      sed -n \
2697	"s/'\''/'\''\\\\'\'''\''/g;
2698	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2699      ;; #(
2700    *)
2701      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2702      ;;
2703    esac |
2704    sort
2705)
2706    echo
2707
2708    $as_echo "## ----------------- ##
2709## Output variables. ##
2710## ----------------- ##"
2711    echo
2712    for ac_var in $ac_subst_vars
2713    do
2714      eval ac_val=\$$ac_var
2715      case $ac_val in
2716      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2717      esac
2718      $as_echo "$ac_var='\''$ac_val'\''"
2719    done | sort
2720    echo
2721
2722    if test -n "$ac_subst_files"; then
2723      $as_echo "## ------------------- ##
2724## File substitutions. ##
2725## ------------------- ##"
2726      echo
2727      for ac_var in $ac_subst_files
2728      do
2729	eval ac_val=\$$ac_var
2730	case $ac_val in
2731	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2732	esac
2733	$as_echo "$ac_var='\''$ac_val'\''"
2734      done | sort
2735      echo
2736    fi
2737
2738    if test -s confdefs.h; then
2739      $as_echo "## ----------- ##
2740## confdefs.h. ##
2741## ----------- ##"
2742      echo
2743      cat confdefs.h
2744      echo
2745    fi
2746    test "$ac_signal" != 0 &&
2747      $as_echo "$as_me: caught signal $ac_signal"
2748    $as_echo "$as_me: exit $exit_status"
2749  } >&5
2750  rm -f core *.core core.conftest.* &&
2751    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2752    exit $exit_status
2753' 0
2754for ac_signal in 1 2 13 15; do
2755  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2756done
2757ac_signal=0
2758
2759# confdefs.h avoids OS command line length limits that DEFS can exceed.
2760rm -f -r conftest* confdefs.h
2761
2762$as_echo "/* confdefs.h */" > confdefs.h
2763
2764# Predefined preprocessor variables.
2765
2766cat >>confdefs.h <<_ACEOF
2767#define PACKAGE_NAME "$PACKAGE_NAME"
2768_ACEOF
2769
2770cat >>confdefs.h <<_ACEOF
2771#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2772_ACEOF
2773
2774cat >>confdefs.h <<_ACEOF
2775#define PACKAGE_VERSION "$PACKAGE_VERSION"
2776_ACEOF
2777
2778cat >>confdefs.h <<_ACEOF
2779#define PACKAGE_STRING "$PACKAGE_STRING"
2780_ACEOF
2781
2782cat >>confdefs.h <<_ACEOF
2783#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2784_ACEOF
2785
2786cat >>confdefs.h <<_ACEOF
2787#define PACKAGE_URL "$PACKAGE_URL"
2788_ACEOF
2789
2790
2791# Let the site file select an alternate cache file if it wants to.
2792# Prefer an explicitly selected file to automatically selected ones.
2793ac_site_file1=NONE
2794ac_site_file2=NONE
2795if test -n "$CONFIG_SITE"; then
2796  # We do not want a PATH search for config.site.
2797  case $CONFIG_SITE in #((
2798    -*)  ac_site_file1=./$CONFIG_SITE;;
2799    */*) ac_site_file1=$CONFIG_SITE;;
2800    *)   ac_site_file1=./$CONFIG_SITE;;
2801  esac
2802elif test "x$prefix" != xNONE; then
2803  ac_site_file1=$prefix/share/config.site
2804  ac_site_file2=$prefix/etc/config.site
2805else
2806  ac_site_file1=$ac_default_prefix/share/config.site
2807  ac_site_file2=$ac_default_prefix/etc/config.site
2808fi
2809for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2810do
2811  test "x$ac_site_file" = xNONE && continue
2812  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2813    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2814$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2815    sed 's/^/| /' "$ac_site_file" >&5
2816    . "$ac_site_file" \
2817      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2819as_fn_error $? "failed to load site script $ac_site_file
2820See \`config.log' for more details" "$LINENO" 5; }
2821  fi
2822done
2823
2824if test -r "$cache_file"; then
2825  # Some versions of bash will fail to source /dev/null (special files
2826  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2827  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2828    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2829$as_echo "$as_me: loading cache $cache_file" >&6;}
2830    case $cache_file in
2831      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2832      *)                      . "./$cache_file";;
2833    esac
2834  fi
2835else
2836  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2837$as_echo "$as_me: creating cache $cache_file" >&6;}
2838  >$cache_file
2839fi
2840
2841# Check that the precious variables saved in the cache have kept the same
2842# value.
2843ac_cache_corrupted=false
2844for ac_var in $ac_precious_vars; do
2845  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2846  eval ac_new_set=\$ac_env_${ac_var}_set
2847  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2848  eval ac_new_val=\$ac_env_${ac_var}_value
2849  case $ac_old_set,$ac_new_set in
2850    set,)
2851      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2852$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2853      ac_cache_corrupted=: ;;
2854    ,set)
2855      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2856$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2857      ac_cache_corrupted=: ;;
2858    ,);;
2859    *)
2860      if test "x$ac_old_val" != "x$ac_new_val"; then
2861	# differences in whitespace do not lead to failure.
2862	ac_old_val_w=`echo x $ac_old_val`
2863	ac_new_val_w=`echo x $ac_new_val`
2864	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2865	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2866$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2867	  ac_cache_corrupted=:
2868	else
2869	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2870$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2871	  eval $ac_var=\$ac_old_val
2872	fi
2873	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2874$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2875	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2876$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2877      fi;;
2878  esac
2879  # Pass precious variables to config.status.
2880  if test "$ac_new_set" = set; then
2881    case $ac_new_val in
2882    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2883    *) ac_arg=$ac_var=$ac_new_val ;;
2884    esac
2885    case " $ac_configure_args " in
2886      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2887      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2888    esac
2889  fi
2890done
2891if $ac_cache_corrupted; then
2892  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2893$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2894  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2895$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2896  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2897fi
2898## -------------------- ##
2899## Main body of script. ##
2900## -------------------- ##
2901
2902ac_ext=c
2903ac_cpp='$CPP $CPPFLAGS'
2904ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2905ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2906ac_compiler_gnu=$ac_cv_c_compiler_gnu
2907
2908
2909
2910ac_aux_dir=
2911for ac_dir in build-aux "$srcdir"/build-aux; do
2912  if test -f "$ac_dir/install-sh"; then
2913    ac_aux_dir=$ac_dir
2914    ac_install_sh="$ac_aux_dir/install-sh -c"
2915    break
2916  elif test -f "$ac_dir/install.sh"; then
2917    ac_aux_dir=$ac_dir
2918    ac_install_sh="$ac_aux_dir/install.sh -c"
2919    break
2920  elif test -f "$ac_dir/shtool"; then
2921    ac_aux_dir=$ac_dir
2922    ac_install_sh="$ac_aux_dir/shtool install -c"
2923    break
2924  fi
2925done
2926if test -z "$ac_aux_dir"; then
2927  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2928fi
2929
2930# These three variables are undocumented and unsupported,
2931# and are intended to be withdrawn in a future Autoconf release.
2932# They can cause serious problems if a builder's source tree is in a directory
2933# whose full name contains unusual characters.
2934ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2935ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2936ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2937
2938
2939# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2940
2941#
2942# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2943# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2944#
2945# This code is free software; you can redistribute it and/or modify it
2946# under the terms of the GNU General Public License version 2 only, as
2947# published by the Free Software Foundation.  Oracle designates this
2948# particular file as subject to the "Classpath" exception as provided
2949# by Oracle in the LICENSE file that accompanied this code.
2950#
2951# This code is distributed in the hope that it will be useful, but WITHOUT
2952# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2953# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2954# version 2 for more details (a copy is included in the LICENSE file that
2955# accompanied this code).
2956#
2957# You should have received a copy of the GNU General Public License version
2958# 2 along with this work; if not, write to the Free Software Foundation,
2959# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2960#
2961# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2962# or visit www.oracle.com if you need additional information or have any
2963# questions.
2964#
2965
2966#
2967# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2968#
2969# This program is free software; you can redistribute it and/or modify
2970# it under the terms of the GNU General Public License as published by
2971# the Free Software Foundation; either version 2 of the License, or
2972# (at your option) any later version.
2973#
2974# This program is distributed in the hope that it will be useful, but
2975# WITHOUT ANY WARRANTY; without even the implied warranty of
2976# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2977# General Public License for more details.
2978#
2979# You should have received a copy of the GNU General Public License
2980# along with this program; if not, write to the Free Software
2981# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2982#
2983# As a special exception to the GNU General Public License, if you
2984# distribute this file as part of a program that contains a
2985# configuration script generated by Autoconf, you may include it under
2986# the same distribution terms that you use for the rest of that program.
2987
2988# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2989# ----------------------------------
2990# PKG_PROG_PKG_CONFIG
2991
2992# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2993#
2994# Check to see whether a particular set of modules exists.  Similar
2995# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2996#
2997#
2998# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2999# this or PKG_CHECK_MODULES is called, or make sure to call
3000# PKG_CHECK_EXISTS manually
3001# --------------------------------------------------------------
3002
3003
3004
3005# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3006# ---------------------------------------------
3007# _PKG_CONFIG
3008
3009# _PKG_SHORT_ERRORS_SUPPORTED
3010# -----------------------------
3011# _PKG_SHORT_ERRORS_SUPPORTED
3012
3013
3014# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3015# [ACTION-IF-NOT-FOUND])
3016#
3017#
3018# Note that if there is a possibility the first call to
3019# PKG_CHECK_MODULES might not happen, you should be sure to include an
3020# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3021#
3022#
3023# --------------------------------------------------------------
3024# PKG_CHECK_MODULES
3025
3026
3027# Include these first...
3028#
3029# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3030# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3031#
3032# This code is free software; you can redistribute it and/or modify it
3033# under the terms of the GNU General Public License version 2 only, as
3034# published by the Free Software Foundation.  Oracle designates this
3035# particular file as subject to the "Classpath" exception as provided
3036# by Oracle in the LICENSE file that accompanied this code.
3037#
3038# This code is distributed in the hope that it will be useful, but WITHOUT
3039# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3040# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3041# version 2 for more details (a copy is included in the LICENSE file that
3042# accompanied this code).
3043#
3044# You should have received a copy of the GNU General Public License version
3045# 2 along with this work; if not, write to the Free Software Foundation,
3046# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3047#
3048# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3049# or visit www.oracle.com if you need additional information or have any
3050# questions.
3051#
3052
3053
3054
3055# This will make sure the given variable points to a full and proper
3056# path. This means:
3057# 1) There will be no spaces in the path. On posix platforms,
3058#    spaces in the path will result in an error. On Windows,
3059#    the path will be rewritten using short-style to be space-free.
3060# 2) The path will be absolute, and it will be in unix-style (on
3061#     cygwin).
3062# $1: The name of the variable to fix
3063
3064
3065# This will make sure the given variable points to a executable
3066# with a full and proper path. This means:
3067# 1) There will be no spaces in the path. On posix platforms,
3068#    spaces in the path will result in an error. On Windows,
3069#    the path will be rewritten using short-style to be space-free.
3070# 2) The path will be absolute, and it will be in unix-style (on
3071#     cygwin).
3072# Any arguments given to the executable is preserved.
3073# If the input variable does not have a directory specification, then
3074# it need to be in the PATH.
3075# $1: The name of the variable to fix
3076
3077
3078
3079
3080
3081
3082# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3083# $1: variable to check
3084# $2: executable name to print in warning (optional)
3085
3086
3087# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3088# Arguments as AC_PATH_PROG:
3089# $1: variable to set
3090# $2: executable name to look for
3091
3092
3093# Setup the most fundamental tools that relies on not much else to set up,
3094# but is used by much of the early bootstrap code.
3095
3096
3097# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3098
3099
3100
3101
3102
3103
3104
3105#%%% Simple tools %%%
3106
3107# Check if we have found a usable version of make
3108# $1: the path to a potential make binary (or empty)
3109# $2: the description on how we found this
3110
3111
3112# Goes looking for a usable version of GNU make.
3113
3114
3115
3116
3117
3118
3119# Check if build directory is on local disk. If not possible to determine,
3120# we prefer to claim it's local.
3121# Argument 1: directory to test
3122# Argument 2: what to do if it is on local disk
3123# Argument 3: what to do otherwise (remote disk or failure)
3124
3125
3126# Check that source files have basic read permissions set. This might
3127# not be the case in cygwin in certain conditions.
3128
3129
3130
3131
3132#
3133# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3134# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3135#
3136# This code is free software; you can redistribute it and/or modify it
3137# under the terms of the GNU General Public License version 2 only, as
3138# published by the Free Software Foundation.  Oracle designates this
3139# particular file as subject to the "Classpath" exception as provided
3140# by Oracle in the LICENSE file that accompanied this code.
3141#
3142# This code is distributed in the hope that it will be useful, but WITHOUT
3143# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3144# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3145# version 2 for more details (a copy is included in the LICENSE file that
3146# accompanied this code).
3147#
3148# You should have received a copy of the GNU General Public License version
3149# 2 along with this work; if not, write to the Free Software Foundation,
3150# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3151#
3152# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3153# or visit www.oracle.com if you need additional information or have any
3154# questions.
3155#
3156
3157
3158
3159
3160
3161# Helper function which possibly converts a path using DOS-style short mode.
3162# If so, the updated path is stored in $new_path.
3163# $1: The path to check
3164
3165
3166# Helper function which possibly converts a path using DOS-style short mode.
3167# If so, the updated path is stored in $new_path.
3168# $1: The path to check
3169
3170
3171# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3172# and could probably be heavily simplified. However, all changes in this
3173# area tend to need lot of testing in different scenarios, and in lack of
3174# proper unit testing, cleaning this up has not been deemed worth the effort
3175# at the moment.
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3186
3187
3188
3189
3190#
3191# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3192# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3193#
3194# This code is free software; you can redistribute it and/or modify it
3195# under the terms of the GNU General Public License version 2 only, as
3196# published by the Free Software Foundation.  Oracle designates this
3197# particular file as subject to the "Classpath" exception as provided
3198# by Oracle in the LICENSE file that accompanied this code.
3199#
3200# This code is distributed in the hope that it will be useful, but WITHOUT
3201# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3202# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3203# version 2 for more details (a copy is included in the LICENSE file that
3204# accompanied this code).
3205#
3206# You should have received a copy of the GNU General Public License version
3207# 2 along with this work; if not, write to the Free Software Foundation,
3208# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3209#
3210# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3211# or visit www.oracle.com if you need additional information or have any
3212# questions.
3213#
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225# ... then the rest
3226#
3227# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3228# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3229#
3230# This code is free software; you can redistribute it and/or modify it
3231# under the terms of the GNU General Public License version 2 only, as
3232# published by the Free Software Foundation.  Oracle designates this
3233# particular file as subject to the "Classpath" exception as provided
3234# by Oracle in the LICENSE file that accompanied this code.
3235#
3236# This code is distributed in the hope that it will be useful, but WITHOUT
3237# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3238# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3239# version 2 for more details (a copy is included in the LICENSE file that
3240# accompanied this code).
3241#
3242# You should have received a copy of the GNU General Public License version
3243# 2 along with this work; if not, write to the Free Software Foundation,
3244# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3245#
3246# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3247# or visit www.oracle.com if you need additional information or have any
3248# questions.
3249#
3250
3251# Execute the check given as argument, and verify the result
3252# If the Boot JDK was previously found, do nothing
3253# $1 A command line (typically autoconf macro) to execute
3254
3255
3256# Test: Is bootjdk explicitely set by command line arguments?
3257
3258
3259# Test: Is bootjdk available from builddeps?
3260
3261
3262# Test: Is $JAVA_HOME set?
3263
3264
3265# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3266
3267
3268# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3269
3270
3271# Look for a jdk in the given path. If there are multiple, try to select the newest.
3272# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3273# $1 = Path to directory containing jdk installations.
3274# $2 = String to append to the found JDK directory to get the proper JDK home
3275
3276
3277# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3278# environmental variable as base for where to look.
3279# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3280
3281
3282# Test: Is there a JDK installed in default, well-known locations?
3283
3284
3285# Check that a command-line tool in the Boot JDK is correct
3286# $1 = name of variable to assign
3287# $2 = name of binary
3288
3289
3290###############################################################################
3291#
3292# We need a Boot JDK to bootstrap the build.
3293#
3294
3295
3296
3297
3298
3299#
3300# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3301# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3302#
3303# This code is free software; you can redistribute it and/or modify it
3304# under the terms of the GNU General Public License version 2 only, as
3305# published by the Free Software Foundation.  Oracle designates this
3306# particular file as subject to the "Classpath" exception as provided
3307# by Oracle in the LICENSE file that accompanied this code.
3308#
3309# This code is distributed in the hope that it will be useful, but WITHOUT
3310# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3311# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3312# version 2 for more details (a copy is included in the LICENSE file that
3313# accompanied this code).
3314#
3315# You should have received a copy of the GNU General Public License version
3316# 2 along with this work; if not, write to the Free Software Foundation,
3317# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3318#
3319# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3320# or visit www.oracle.com if you need additional information or have any
3321# questions.
3322#
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341#
3342# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3343# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3344#
3345# This code is free software; you can redistribute it and/or modify it
3346# under the terms of the GNU General Public License version 2 only, as
3347# published by the Free Software Foundation.  Oracle designates this
3348# particular file as subject to the "Classpath" exception as provided
3349# by Oracle in the LICENSE file that accompanied this code.
3350#
3351# This code is distributed in the hope that it will be useful, but WITHOUT
3352# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3353# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3354# version 2 for more details (a copy is included in the LICENSE file that
3355# accompanied this code).
3356#
3357# You should have received a copy of the GNU General Public License version
3358# 2 along with this work; if not, write to the Free Software Foundation,
3359# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3360#
3361# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3362# or visit www.oracle.com if you need additional information or have any
3363# questions.
3364#
3365
3366
3367
3368
3369
3370cygwin_help() {
3371    case $1 in
3372    unzip)
3373        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3374    zip)
3375        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3376    make)
3377        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3378    * )
3379       break ;;
3380    esac
3381}
3382
3383apt_help() {
3384    case $1 in
3385    devkit)
3386        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3387    openjdk)
3388        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3389    alsa)
3390        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3391    cups)
3392        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3393    freetype2)
3394        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3395    pulse)
3396        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3397    x11)
3398        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3399    ccache)
3400        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3401    * )
3402       break ;;
3403    esac
3404}
3405
3406yum_help() {
3407    case $1 in
3408    devkit)
3409        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3410    openjdk)
3411        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3412    alsa)
3413        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3414    cups)
3415        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3416    freetype2)
3417        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3418    pulse)
3419        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3420    x11)
3421        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3422    ccache)
3423        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3424    * )
3425       break ;;
3426    esac
3427}
3428
3429port_help() {
3430    PKGHANDLER_COMMAND=""
3431}
3432
3433pkgutil_help() {
3434    PKGHANDLER_COMMAND=""
3435}
3436
3437pkgadd_help() {
3438    PKGHANDLER_COMMAND=""
3439}
3440
3441
3442
3443#
3444# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3445# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3446#
3447# This code is free software; you can redistribute it and/or modify it
3448# under the terms of the GNU General Public License version 2 only, as
3449# published by the Free Software Foundation.  Oracle designates this
3450# particular file as subject to the "Classpath" exception as provided
3451# by Oracle in the LICENSE file that accompanied this code.
3452#
3453# This code is distributed in the hope that it will be useful, but WITHOUT
3454# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3455# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3456# version 2 for more details (a copy is included in the LICENSE file that
3457# accompanied this code).
3458#
3459# You should have received a copy of the GNU General Public License version
3460# 2 along with this work; if not, write to the Free Software Foundation,
3461# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3462#
3463# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3464# or visit www.oracle.com if you need additional information or have any
3465# questions.
3466#
3467
3468
3469
3470
3471
3472
3473
3474
3475###############################################################################
3476#
3477# Should we build only OpenJDK even if closed sources are present?
3478#
3479
3480
3481
3482
3483###############################################################################
3484#
3485# Setup version numbers
3486#
3487
3488
3489
3490
3491
3492
3493# Support for customization of the build process. Some build files
3494# will include counterparts from this location, if they exist. This allows
3495# for a degree of customization of the build targets and the rules/recipes
3496# to create them
3497
3498# Check whether --with-custom-make-dir was given.
3499if test "${with_custom_make_dir+set}" = set; then :
3500  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3501fi
3502
3503
3504
3505#
3506# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3507# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3508#
3509# This code is free software; you can redistribute it and/or modify it
3510# under the terms of the GNU General Public License version 2 only, as
3511# published by the Free Software Foundation.  Oracle designates this
3512# particular file as subject to the "Classpath" exception as provided
3513# by Oracle in the LICENSE file that accompanied this code.
3514#
3515# This code is distributed in the hope that it will be useful, but WITHOUT
3516# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3517# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3518# version 2 for more details (a copy is included in the LICENSE file that
3519# accompanied this code).
3520#
3521# You should have received a copy of the GNU General Public License version
3522# 2 along with this work; if not, write to the Free Software Foundation,
3523# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3524#
3525# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3526# or visit www.oracle.com if you need additional information or have any
3527# questions.
3528#
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544#
3545# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3546# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3547#
3548# This code is free software; you can redistribute it and/or modify it
3549# under the terms of the GNU General Public License version 2 only, as
3550# published by the Free Software Foundation.  Oracle designates this
3551# particular file as subject to the "Classpath" exception as provided
3552# by Oracle in the LICENSE file that accompanied this code.
3553#
3554# This code is distributed in the hope that it will be useful, but WITHOUT
3555# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3556# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3557# version 2 for more details (a copy is included in the LICENSE file that
3558# accompanied this code).
3559#
3560# You should have received a copy of the GNU General Public License version
3561# 2 along with this work; if not, write to the Free Software Foundation,
3562# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3563#
3564# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3565# or visit www.oracle.com if you need additional information or have any
3566# questions.
3567#
3568
3569# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3570# Converts autoconf style CPU name to OpenJDK style, into
3571# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3572
3573
3574# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3575# Converts autoconf style OS name to OpenJDK style, into
3576# VAR_OS and VAR_OS_API.
3577
3578
3579# Expects $host_os $host_cpu $build_os and $build_cpu
3580# and $with_target_bits to have been setup!
3581#
3582# Translate the standard triplet(quadruplet) definition
3583# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3584# OPENJDK_BUILD_OS, etc.
3585
3586
3587# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3588# accordingly. Must be done after setting up build and target system, but before
3589# doing anything else with these values.
3590
3591
3592    # Setup the legacy variables, for controlling the old makefiles.
3593    #
3594
3595
3596
3597
3598#%%% Build and target systems %%%
3599
3600
3601
3602
3603# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3604# Add -mX to various FLAGS variables.
3605
3606
3607
3608
3609
3610
3611#
3612# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3613# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3614#
3615# This code is free software; you can redistribute it and/or modify it
3616# under the terms of the GNU General Public License version 2 only, as
3617# published by the Free Software Foundation.  Oracle designates this
3618# particular file as subject to the "Classpath" exception as provided
3619# by Oracle in the LICENSE file that accompanied this code.
3620#
3621# This code is distributed in the hope that it will be useful, but WITHOUT
3622# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3623# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3624# version 2 for more details (a copy is included in the LICENSE file that
3625# accompanied this code).
3626#
3627# You should have received a copy of the GNU General Public License version
3628# 2 along with this work; if not, write to the Free Software Foundation,
3629# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3630#
3631# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3632# or visit www.oracle.com if you need additional information or have any
3633# questions.
3634#
3635
3636
3637
3638
3639
3640
3641
3642
3643#
3644# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3645# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3646#
3647# This code is free software; you can redistribute it and/or modify it
3648# under the terms of the GNU General Public License version 2 only, as
3649# published by the Free Software Foundation.  Oracle designates this
3650# particular file as subject to the "Classpath" exception as provided
3651# by Oracle in the LICENSE file that accompanied this code.
3652#
3653# This code is distributed in the hope that it will be useful, but WITHOUT
3654# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3655# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3656# version 2 for more details (a copy is included in the LICENSE file that
3657# accompanied this code).
3658#
3659# You should have received a copy of the GNU General Public License version
3660# 2 along with this work; if not, write to the Free Software Foundation,
3661# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3662#
3663# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3664# or visit www.oracle.com if you need additional information or have any
3665# questions.
3666#
3667
3668# $1 = compiler to test (CC or CXX)
3669# $2 = human readable name of compiler (C or C++)
3670
3671
3672
3673
3674
3675# $1 = compiler to test (CC or CXX)
3676# $2 = human readable name of compiler (C or C++)
3677# $3 = list of compiler names to search for
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690#
3691# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3692# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3693#
3694# This code is free software; you can redistribute it and/or modify it
3695# under the terms of the GNU General Public License version 2 only, as
3696# published by the Free Software Foundation.  Oracle designates this
3697# particular file as subject to the "Classpath" exception as provided
3698# by Oracle in the LICENSE file that accompanied this code.
3699#
3700# This code is distributed in the hope that it will be useful, but WITHOUT
3701# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3702# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3703# version 2 for more details (a copy is included in the LICENSE file that
3704# accompanied this code).
3705#
3706# You should have received a copy of the GNU General Public License version
3707# 2 along with this work; if not, write to the Free Software Foundation,
3708# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3709#
3710# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3711# or visit www.oracle.com if you need additional information or have any
3712# questions.
3713#
3714
3715
3716
3717
3718
3719
3720
3721# Check if the VS env variables were setup prior to running configure.
3722# If not, then find vcvarsall.bat and run it automatically, and integrate
3723# the set env variables into the spec file.
3724
3725
3726
3727
3728
3729
3730# This line needs to be here, verbatim, after all includes and the dummy hook
3731# definitions. It is replaced with custom functionality when building
3732# custom sources.
3733#CUSTOM_AUTOCONF_INCLUDE
3734
3735# Do not change or remove the following line, it is needed for consistency checks:
3736DATE_WHEN_GENERATED=1361218904
3737
3738###############################################################################
3739#
3740# Initialization / Boot-strapping
3741#
3742# The bootstrapping process needs to solve the "chicken or the egg" problem,
3743# thus it jumps back and forth, each time gaining something needed later on.
3744#
3745###############################################################################
3746
3747# Basic initialization that must happen first of all
3748
3749# Save the original command line. This is passed to us by the wrapper configure script.
3750
3751DATE_WHEN_CONFIGURED=`LANG=C date`
3752
3753{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3754$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3755{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3756$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3757
3758
3759
3760# Start with tools that do not need have cross compilation support
3761# and can be expected to be found in the default PATH. These tools are
3762# used by configure. Nor are these tools expected to be found in the
3763# devkit from the builddeps server either, since they are
3764# needed to download the devkit.
3765
3766# First are all the simple required tools.
3767
3768    for ac_prog in basename
3769do
3770  # Extract the first word of "$ac_prog", so it can be a program name with args.
3771set dummy $ac_prog; ac_word=$2
3772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773$as_echo_n "checking for $ac_word... " >&6; }
3774if ${ac_cv_path_BASENAME+:} false; then :
3775  $as_echo_n "(cached) " >&6
3776else
3777  case $BASENAME in
3778  [\\/]* | ?:[\\/]*)
3779  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3780  ;;
3781  *)
3782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3783for as_dir in $PATH
3784do
3785  IFS=$as_save_IFS
3786  test -z "$as_dir" && as_dir=.
3787    for ac_exec_ext in '' $ac_executable_extensions; do
3788  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3789    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3791    break 2
3792  fi
3793done
3794  done
3795IFS=$as_save_IFS
3796
3797  ;;
3798esac
3799fi
3800BASENAME=$ac_cv_path_BASENAME
3801if test -n "$BASENAME"; then
3802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3803$as_echo "$BASENAME" >&6; }
3804else
3805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3806$as_echo "no" >&6; }
3807fi
3808
3809
3810  test -n "$BASENAME" && break
3811done
3812
3813
3814    if test "x$BASENAME" = x; then
3815        if test "xbasename" = x; then
3816          PROG_NAME=basename
3817        else
3818          PROG_NAME=basename
3819        fi
3820        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3821$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3822        as_fn_error $? "Cannot continue" "$LINENO" 5
3823    fi
3824
3825
3826
3827    for ac_prog in bash
3828do
3829  # Extract the first word of "$ac_prog", so it can be a program name with args.
3830set dummy $ac_prog; ac_word=$2
3831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3832$as_echo_n "checking for $ac_word... " >&6; }
3833if ${ac_cv_path_BASH+:} false; then :
3834  $as_echo_n "(cached) " >&6
3835else
3836  case $BASH in
3837  [\\/]* | ?:[\\/]*)
3838  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3839  ;;
3840  *)
3841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3842for as_dir in $PATH
3843do
3844  IFS=$as_save_IFS
3845  test -z "$as_dir" && as_dir=.
3846    for ac_exec_ext in '' $ac_executable_extensions; do
3847  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3848    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3850    break 2
3851  fi
3852done
3853  done
3854IFS=$as_save_IFS
3855
3856  ;;
3857esac
3858fi
3859BASH=$ac_cv_path_BASH
3860if test -n "$BASH"; then
3861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3862$as_echo "$BASH" >&6; }
3863else
3864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3865$as_echo "no" >&6; }
3866fi
3867
3868
3869  test -n "$BASH" && break
3870done
3871
3872
3873    if test "x$BASH" = x; then
3874        if test "xbash" = x; then
3875          PROG_NAME=bash
3876        else
3877          PROG_NAME=bash
3878        fi
3879        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3880$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3881        as_fn_error $? "Cannot continue" "$LINENO" 5
3882    fi
3883
3884
3885
3886    for ac_prog in cat
3887do
3888  # Extract the first word of "$ac_prog", so it can be a program name with args.
3889set dummy $ac_prog; ac_word=$2
3890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3891$as_echo_n "checking for $ac_word... " >&6; }
3892if ${ac_cv_path_CAT+:} false; then :
3893  $as_echo_n "(cached) " >&6
3894else
3895  case $CAT in
3896  [\\/]* | ?:[\\/]*)
3897  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3898  ;;
3899  *)
3900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3901for as_dir in $PATH
3902do
3903  IFS=$as_save_IFS
3904  test -z "$as_dir" && as_dir=.
3905    for ac_exec_ext in '' $ac_executable_extensions; do
3906  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3907    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3909    break 2
3910  fi
3911done
3912  done
3913IFS=$as_save_IFS
3914
3915  ;;
3916esac
3917fi
3918CAT=$ac_cv_path_CAT
3919if test -n "$CAT"; then
3920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3921$as_echo "$CAT" >&6; }
3922else
3923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3924$as_echo "no" >&6; }
3925fi
3926
3927
3928  test -n "$CAT" && break
3929done
3930
3931
3932    if test "x$CAT" = x; then
3933        if test "xcat" = x; then
3934          PROG_NAME=cat
3935        else
3936          PROG_NAME=cat
3937        fi
3938        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3939$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3940        as_fn_error $? "Cannot continue" "$LINENO" 5
3941    fi
3942
3943
3944
3945    for ac_prog in chmod
3946do
3947  # Extract the first word of "$ac_prog", so it can be a program name with args.
3948set dummy $ac_prog; ac_word=$2
3949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3950$as_echo_n "checking for $ac_word... " >&6; }
3951if ${ac_cv_path_CHMOD+:} false; then :
3952  $as_echo_n "(cached) " >&6
3953else
3954  case $CHMOD in
3955  [\\/]* | ?:[\\/]*)
3956  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3957  ;;
3958  *)
3959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3960for as_dir in $PATH
3961do
3962  IFS=$as_save_IFS
3963  test -z "$as_dir" && as_dir=.
3964    for ac_exec_ext in '' $ac_executable_extensions; do
3965  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3966    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3968    break 2
3969  fi
3970done
3971  done
3972IFS=$as_save_IFS
3973
3974  ;;
3975esac
3976fi
3977CHMOD=$ac_cv_path_CHMOD
3978if test -n "$CHMOD"; then
3979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3980$as_echo "$CHMOD" >&6; }
3981else
3982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3983$as_echo "no" >&6; }
3984fi
3985
3986
3987  test -n "$CHMOD" && break
3988done
3989
3990
3991    if test "x$CHMOD" = x; then
3992        if test "xchmod" = x; then
3993          PROG_NAME=chmod
3994        else
3995          PROG_NAME=chmod
3996        fi
3997        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3998$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3999        as_fn_error $? "Cannot continue" "$LINENO" 5
4000    fi
4001
4002
4003
4004    for ac_prog in cmp
4005do
4006  # Extract the first word of "$ac_prog", so it can be a program name with args.
4007set dummy $ac_prog; ac_word=$2
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4009$as_echo_n "checking for $ac_word... " >&6; }
4010if ${ac_cv_path_CMP+:} false; then :
4011  $as_echo_n "(cached) " >&6
4012else
4013  case $CMP in
4014  [\\/]* | ?:[\\/]*)
4015  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4016  ;;
4017  *)
4018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4019for as_dir in $PATH
4020do
4021  IFS=$as_save_IFS
4022  test -z "$as_dir" && as_dir=.
4023    for ac_exec_ext in '' $ac_executable_extensions; do
4024  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4025    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4027    break 2
4028  fi
4029done
4030  done
4031IFS=$as_save_IFS
4032
4033  ;;
4034esac
4035fi
4036CMP=$ac_cv_path_CMP
4037if test -n "$CMP"; then
4038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4039$as_echo "$CMP" >&6; }
4040else
4041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4042$as_echo "no" >&6; }
4043fi
4044
4045
4046  test -n "$CMP" && break
4047done
4048
4049
4050    if test "x$CMP" = x; then
4051        if test "xcmp" = x; then
4052          PROG_NAME=cmp
4053        else
4054          PROG_NAME=cmp
4055        fi
4056        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4057$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4058        as_fn_error $? "Cannot continue" "$LINENO" 5
4059    fi
4060
4061
4062
4063    for ac_prog in comm
4064do
4065  # Extract the first word of "$ac_prog", so it can be a program name with args.
4066set dummy $ac_prog; ac_word=$2
4067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4068$as_echo_n "checking for $ac_word... " >&6; }
4069if ${ac_cv_path_COMM+:} false; then :
4070  $as_echo_n "(cached) " >&6
4071else
4072  case $COMM in
4073  [\\/]* | ?:[\\/]*)
4074  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4075  ;;
4076  *)
4077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4078for as_dir in $PATH
4079do
4080  IFS=$as_save_IFS
4081  test -z "$as_dir" && as_dir=.
4082    for ac_exec_ext in '' $ac_executable_extensions; do
4083  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4084    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4086    break 2
4087  fi
4088done
4089  done
4090IFS=$as_save_IFS
4091
4092  ;;
4093esac
4094fi
4095COMM=$ac_cv_path_COMM
4096if test -n "$COMM"; then
4097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4098$as_echo "$COMM" >&6; }
4099else
4100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4101$as_echo "no" >&6; }
4102fi
4103
4104
4105  test -n "$COMM" && break
4106done
4107
4108
4109    if test "x$COMM" = x; then
4110        if test "xcomm" = x; then
4111          PROG_NAME=comm
4112        else
4113          PROG_NAME=comm
4114        fi
4115        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4116$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4117        as_fn_error $? "Cannot continue" "$LINENO" 5
4118    fi
4119
4120
4121
4122    for ac_prog in cp
4123do
4124  # Extract the first word of "$ac_prog", so it can be a program name with args.
4125set dummy $ac_prog; ac_word=$2
4126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4127$as_echo_n "checking for $ac_word... " >&6; }
4128if ${ac_cv_path_CP+:} false; then :
4129  $as_echo_n "(cached) " >&6
4130else
4131  case $CP in
4132  [\\/]* | ?:[\\/]*)
4133  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4134  ;;
4135  *)
4136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4137for as_dir in $PATH
4138do
4139  IFS=$as_save_IFS
4140  test -z "$as_dir" && as_dir=.
4141    for ac_exec_ext in '' $ac_executable_extensions; do
4142  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4143    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4145    break 2
4146  fi
4147done
4148  done
4149IFS=$as_save_IFS
4150
4151  ;;
4152esac
4153fi
4154CP=$ac_cv_path_CP
4155if test -n "$CP"; then
4156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4157$as_echo "$CP" >&6; }
4158else
4159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4160$as_echo "no" >&6; }
4161fi
4162
4163
4164  test -n "$CP" && break
4165done
4166
4167
4168    if test "x$CP" = x; then
4169        if test "xcp" = x; then
4170          PROG_NAME=cp
4171        else
4172          PROG_NAME=cp
4173        fi
4174        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4175$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4176        as_fn_error $? "Cannot continue" "$LINENO" 5
4177    fi
4178
4179
4180
4181    for ac_prog in cpio
4182do
4183  # Extract the first word of "$ac_prog", so it can be a program name with args.
4184set dummy $ac_prog; ac_word=$2
4185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4186$as_echo_n "checking for $ac_word... " >&6; }
4187if ${ac_cv_path_CPIO+:} false; then :
4188  $as_echo_n "(cached) " >&6
4189else
4190  case $CPIO in
4191  [\\/]* | ?:[\\/]*)
4192  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4193  ;;
4194  *)
4195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4196for as_dir in $PATH
4197do
4198  IFS=$as_save_IFS
4199  test -z "$as_dir" && as_dir=.
4200    for ac_exec_ext in '' $ac_executable_extensions; do
4201  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4202    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4204    break 2
4205  fi
4206done
4207  done
4208IFS=$as_save_IFS
4209
4210  ;;
4211esac
4212fi
4213CPIO=$ac_cv_path_CPIO
4214if test -n "$CPIO"; then
4215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4216$as_echo "$CPIO" >&6; }
4217else
4218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4219$as_echo "no" >&6; }
4220fi
4221
4222
4223  test -n "$CPIO" && break
4224done
4225
4226
4227    if test "x$CPIO" = x; then
4228        if test "xcpio" = x; then
4229          PROG_NAME=cpio
4230        else
4231          PROG_NAME=cpio
4232        fi
4233        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4234$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4235        as_fn_error $? "Cannot continue" "$LINENO" 5
4236    fi
4237
4238
4239
4240    for ac_prog in cut
4241do
4242  # Extract the first word of "$ac_prog", so it can be a program name with args.
4243set dummy $ac_prog; ac_word=$2
4244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4245$as_echo_n "checking for $ac_word... " >&6; }
4246if ${ac_cv_path_CUT+:} false; then :
4247  $as_echo_n "(cached) " >&6
4248else
4249  case $CUT in
4250  [\\/]* | ?:[\\/]*)
4251  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4252  ;;
4253  *)
4254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4255for as_dir in $PATH
4256do
4257  IFS=$as_save_IFS
4258  test -z "$as_dir" && as_dir=.
4259    for ac_exec_ext in '' $ac_executable_extensions; do
4260  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4261    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4263    break 2
4264  fi
4265done
4266  done
4267IFS=$as_save_IFS
4268
4269  ;;
4270esac
4271fi
4272CUT=$ac_cv_path_CUT
4273if test -n "$CUT"; then
4274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4275$as_echo "$CUT" >&6; }
4276else
4277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4278$as_echo "no" >&6; }
4279fi
4280
4281
4282  test -n "$CUT" && break
4283done
4284
4285
4286    if test "x$CUT" = x; then
4287        if test "xcut" = x; then
4288          PROG_NAME=cut
4289        else
4290          PROG_NAME=cut
4291        fi
4292        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4293$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4294        as_fn_error $? "Cannot continue" "$LINENO" 5
4295    fi
4296
4297
4298
4299    for ac_prog in date
4300do
4301  # Extract the first word of "$ac_prog", so it can be a program name with args.
4302set dummy $ac_prog; ac_word=$2
4303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4304$as_echo_n "checking for $ac_word... " >&6; }
4305if ${ac_cv_path_DATE+:} false; then :
4306  $as_echo_n "(cached) " >&6
4307else
4308  case $DATE in
4309  [\\/]* | ?:[\\/]*)
4310  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4311  ;;
4312  *)
4313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4314for as_dir in $PATH
4315do
4316  IFS=$as_save_IFS
4317  test -z "$as_dir" && as_dir=.
4318    for ac_exec_ext in '' $ac_executable_extensions; do
4319  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4320    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4322    break 2
4323  fi
4324done
4325  done
4326IFS=$as_save_IFS
4327
4328  ;;
4329esac
4330fi
4331DATE=$ac_cv_path_DATE
4332if test -n "$DATE"; then
4333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4334$as_echo "$DATE" >&6; }
4335else
4336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4337$as_echo "no" >&6; }
4338fi
4339
4340
4341  test -n "$DATE" && break
4342done
4343
4344
4345    if test "x$DATE" = x; then
4346        if test "xdate" = x; then
4347          PROG_NAME=date
4348        else
4349          PROG_NAME=date
4350        fi
4351        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4352$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4353        as_fn_error $? "Cannot continue" "$LINENO" 5
4354    fi
4355
4356
4357
4358    for ac_prog in gdiff diff
4359do
4360  # Extract the first word of "$ac_prog", so it can be a program name with args.
4361set dummy $ac_prog; ac_word=$2
4362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4363$as_echo_n "checking for $ac_word... " >&6; }
4364if ${ac_cv_path_DIFF+:} false; then :
4365  $as_echo_n "(cached) " >&6
4366else
4367  case $DIFF in
4368  [\\/]* | ?:[\\/]*)
4369  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4370  ;;
4371  *)
4372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4373for as_dir in $PATH
4374do
4375  IFS=$as_save_IFS
4376  test -z "$as_dir" && as_dir=.
4377    for ac_exec_ext in '' $ac_executable_extensions; do
4378  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4379    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4381    break 2
4382  fi
4383done
4384  done
4385IFS=$as_save_IFS
4386
4387  ;;
4388esac
4389fi
4390DIFF=$ac_cv_path_DIFF
4391if test -n "$DIFF"; then
4392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4393$as_echo "$DIFF" >&6; }
4394else
4395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4396$as_echo "no" >&6; }
4397fi
4398
4399
4400  test -n "$DIFF" && break
4401done
4402
4403
4404    if test "x$DIFF" = x; then
4405        if test "xgdiff diff" = x; then
4406          PROG_NAME=diff
4407        else
4408          PROG_NAME=gdiff diff
4409        fi
4410        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4411$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4412        as_fn_error $? "Cannot continue" "$LINENO" 5
4413    fi
4414
4415
4416
4417    for ac_prog in dirname
4418do
4419  # Extract the first word of "$ac_prog", so it can be a program name with args.
4420set dummy $ac_prog; ac_word=$2
4421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4422$as_echo_n "checking for $ac_word... " >&6; }
4423if ${ac_cv_path_DIRNAME+:} false; then :
4424  $as_echo_n "(cached) " >&6
4425else
4426  case $DIRNAME in
4427  [\\/]* | ?:[\\/]*)
4428  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4429  ;;
4430  *)
4431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4432for as_dir in $PATH
4433do
4434  IFS=$as_save_IFS
4435  test -z "$as_dir" && as_dir=.
4436    for ac_exec_ext in '' $ac_executable_extensions; do
4437  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4438    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4440    break 2
4441  fi
4442done
4443  done
4444IFS=$as_save_IFS
4445
4446  ;;
4447esac
4448fi
4449DIRNAME=$ac_cv_path_DIRNAME
4450if test -n "$DIRNAME"; then
4451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4452$as_echo "$DIRNAME" >&6; }
4453else
4454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4455$as_echo "no" >&6; }
4456fi
4457
4458
4459  test -n "$DIRNAME" && break
4460done
4461
4462
4463    if test "x$DIRNAME" = x; then
4464        if test "xdirname" = x; then
4465          PROG_NAME=dirname
4466        else
4467          PROG_NAME=dirname
4468        fi
4469        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4470$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4471        as_fn_error $? "Cannot continue" "$LINENO" 5
4472    fi
4473
4474
4475
4476    for ac_prog in echo
4477do
4478  # Extract the first word of "$ac_prog", so it can be a program name with args.
4479set dummy $ac_prog; ac_word=$2
4480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4481$as_echo_n "checking for $ac_word... " >&6; }
4482if ${ac_cv_path_ECHO+:} false; then :
4483  $as_echo_n "(cached) " >&6
4484else
4485  case $ECHO in
4486  [\\/]* | ?:[\\/]*)
4487  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4488  ;;
4489  *)
4490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4491for as_dir in $PATH
4492do
4493  IFS=$as_save_IFS
4494  test -z "$as_dir" && as_dir=.
4495    for ac_exec_ext in '' $ac_executable_extensions; do
4496  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4497    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4499    break 2
4500  fi
4501done
4502  done
4503IFS=$as_save_IFS
4504
4505  ;;
4506esac
4507fi
4508ECHO=$ac_cv_path_ECHO
4509if test -n "$ECHO"; then
4510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4511$as_echo "$ECHO" >&6; }
4512else
4513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4514$as_echo "no" >&6; }
4515fi
4516
4517
4518  test -n "$ECHO" && break
4519done
4520
4521
4522    if test "x$ECHO" = x; then
4523        if test "xecho" = x; then
4524          PROG_NAME=echo
4525        else
4526          PROG_NAME=echo
4527        fi
4528        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4529$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4530        as_fn_error $? "Cannot continue" "$LINENO" 5
4531    fi
4532
4533
4534
4535    for ac_prog in expr
4536do
4537  # Extract the first word of "$ac_prog", so it can be a program name with args.
4538set dummy $ac_prog; ac_word=$2
4539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4540$as_echo_n "checking for $ac_word... " >&6; }
4541if ${ac_cv_path_EXPR+:} false; then :
4542  $as_echo_n "(cached) " >&6
4543else
4544  case $EXPR in
4545  [\\/]* | ?:[\\/]*)
4546  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4547  ;;
4548  *)
4549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550for as_dir in $PATH
4551do
4552  IFS=$as_save_IFS
4553  test -z "$as_dir" && as_dir=.
4554    for ac_exec_ext in '' $ac_executable_extensions; do
4555  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4556    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4558    break 2
4559  fi
4560done
4561  done
4562IFS=$as_save_IFS
4563
4564  ;;
4565esac
4566fi
4567EXPR=$ac_cv_path_EXPR
4568if test -n "$EXPR"; then
4569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4570$as_echo "$EXPR" >&6; }
4571else
4572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4573$as_echo "no" >&6; }
4574fi
4575
4576
4577  test -n "$EXPR" && break
4578done
4579
4580
4581    if test "x$EXPR" = x; then
4582        if test "xexpr" = x; then
4583          PROG_NAME=expr
4584        else
4585          PROG_NAME=expr
4586        fi
4587        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4588$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4589        as_fn_error $? "Cannot continue" "$LINENO" 5
4590    fi
4591
4592
4593
4594    for ac_prog in file
4595do
4596  # Extract the first word of "$ac_prog", so it can be a program name with args.
4597set dummy $ac_prog; ac_word=$2
4598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4599$as_echo_n "checking for $ac_word... " >&6; }
4600if ${ac_cv_path_FILE+:} false; then :
4601  $as_echo_n "(cached) " >&6
4602else
4603  case $FILE in
4604  [\\/]* | ?:[\\/]*)
4605  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4606  ;;
4607  *)
4608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4609for as_dir in $PATH
4610do
4611  IFS=$as_save_IFS
4612  test -z "$as_dir" && as_dir=.
4613    for ac_exec_ext in '' $ac_executable_extensions; do
4614  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4615    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4617    break 2
4618  fi
4619done
4620  done
4621IFS=$as_save_IFS
4622
4623  ;;
4624esac
4625fi
4626FILE=$ac_cv_path_FILE
4627if test -n "$FILE"; then
4628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4629$as_echo "$FILE" >&6; }
4630else
4631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4632$as_echo "no" >&6; }
4633fi
4634
4635
4636  test -n "$FILE" && break
4637done
4638
4639
4640    if test "x$FILE" = x; then
4641        if test "xfile" = x; then
4642          PROG_NAME=file
4643        else
4644          PROG_NAME=file
4645        fi
4646        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4647$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4648        as_fn_error $? "Cannot continue" "$LINENO" 5
4649    fi
4650
4651
4652
4653    for ac_prog in find
4654do
4655  # Extract the first word of "$ac_prog", so it can be a program name with args.
4656set dummy $ac_prog; ac_word=$2
4657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4658$as_echo_n "checking for $ac_word... " >&6; }
4659if ${ac_cv_path_FIND+:} false; then :
4660  $as_echo_n "(cached) " >&6
4661else
4662  case $FIND in
4663  [\\/]* | ?:[\\/]*)
4664  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4665  ;;
4666  *)
4667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4668for as_dir in $PATH
4669do
4670  IFS=$as_save_IFS
4671  test -z "$as_dir" && as_dir=.
4672    for ac_exec_ext in '' $ac_executable_extensions; do
4673  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4674    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4676    break 2
4677  fi
4678done
4679  done
4680IFS=$as_save_IFS
4681
4682  ;;
4683esac
4684fi
4685FIND=$ac_cv_path_FIND
4686if test -n "$FIND"; then
4687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4688$as_echo "$FIND" >&6; }
4689else
4690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4691$as_echo "no" >&6; }
4692fi
4693
4694
4695  test -n "$FIND" && break
4696done
4697
4698
4699    if test "x$FIND" = x; then
4700        if test "xfind" = x; then
4701          PROG_NAME=find
4702        else
4703          PROG_NAME=find
4704        fi
4705        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4706$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4707        as_fn_error $? "Cannot continue" "$LINENO" 5
4708    fi
4709
4710
4711
4712    for ac_prog in head
4713do
4714  # Extract the first word of "$ac_prog", so it can be a program name with args.
4715set dummy $ac_prog; ac_word=$2
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4717$as_echo_n "checking for $ac_word... " >&6; }
4718if ${ac_cv_path_HEAD+:} false; then :
4719  $as_echo_n "(cached) " >&6
4720else
4721  case $HEAD in
4722  [\\/]* | ?:[\\/]*)
4723  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4724  ;;
4725  *)
4726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4727for as_dir in $PATH
4728do
4729  IFS=$as_save_IFS
4730  test -z "$as_dir" && as_dir=.
4731    for ac_exec_ext in '' $ac_executable_extensions; do
4732  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4733    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4735    break 2
4736  fi
4737done
4738  done
4739IFS=$as_save_IFS
4740
4741  ;;
4742esac
4743fi
4744HEAD=$ac_cv_path_HEAD
4745if test -n "$HEAD"; then
4746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4747$as_echo "$HEAD" >&6; }
4748else
4749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4750$as_echo "no" >&6; }
4751fi
4752
4753
4754  test -n "$HEAD" && break
4755done
4756
4757
4758    if test "x$HEAD" = x; then
4759        if test "xhead" = x; then
4760          PROG_NAME=head
4761        else
4762          PROG_NAME=head
4763        fi
4764        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4765$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4766        as_fn_error $? "Cannot continue" "$LINENO" 5
4767    fi
4768
4769
4770
4771    for ac_prog in ln
4772do
4773  # Extract the first word of "$ac_prog", so it can be a program name with args.
4774set dummy $ac_prog; ac_word=$2
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4776$as_echo_n "checking for $ac_word... " >&6; }
4777if ${ac_cv_path_LN+:} false; then :
4778  $as_echo_n "(cached) " >&6
4779else
4780  case $LN in
4781  [\\/]* | ?:[\\/]*)
4782  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4783  ;;
4784  *)
4785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4786for as_dir in $PATH
4787do
4788  IFS=$as_save_IFS
4789  test -z "$as_dir" && as_dir=.
4790    for ac_exec_ext in '' $ac_executable_extensions; do
4791  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4792    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4794    break 2
4795  fi
4796done
4797  done
4798IFS=$as_save_IFS
4799
4800  ;;
4801esac
4802fi
4803LN=$ac_cv_path_LN
4804if test -n "$LN"; then
4805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4806$as_echo "$LN" >&6; }
4807else
4808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4809$as_echo "no" >&6; }
4810fi
4811
4812
4813  test -n "$LN" && break
4814done
4815
4816
4817    if test "x$LN" = x; then
4818        if test "xln" = x; then
4819          PROG_NAME=ln
4820        else
4821          PROG_NAME=ln
4822        fi
4823        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4824$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4825        as_fn_error $? "Cannot continue" "$LINENO" 5
4826    fi
4827
4828
4829
4830    for ac_prog in ls
4831do
4832  # Extract the first word of "$ac_prog", so it can be a program name with args.
4833set dummy $ac_prog; ac_word=$2
4834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4835$as_echo_n "checking for $ac_word... " >&6; }
4836if ${ac_cv_path_LS+:} false; then :
4837  $as_echo_n "(cached) " >&6
4838else
4839  case $LS in
4840  [\\/]* | ?:[\\/]*)
4841  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4842  ;;
4843  *)
4844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4845for as_dir in $PATH
4846do
4847  IFS=$as_save_IFS
4848  test -z "$as_dir" && as_dir=.
4849    for ac_exec_ext in '' $ac_executable_extensions; do
4850  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4851    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4853    break 2
4854  fi
4855done
4856  done
4857IFS=$as_save_IFS
4858
4859  ;;
4860esac
4861fi
4862LS=$ac_cv_path_LS
4863if test -n "$LS"; then
4864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4865$as_echo "$LS" >&6; }
4866else
4867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4868$as_echo "no" >&6; }
4869fi
4870
4871
4872  test -n "$LS" && break
4873done
4874
4875
4876    if test "x$LS" = x; then
4877        if test "xls" = x; then
4878          PROG_NAME=ls
4879        else
4880          PROG_NAME=ls
4881        fi
4882        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4883$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4884        as_fn_error $? "Cannot continue" "$LINENO" 5
4885    fi
4886
4887
4888
4889    for ac_prog in mkdir
4890do
4891  # Extract the first word of "$ac_prog", so it can be a program name with args.
4892set dummy $ac_prog; ac_word=$2
4893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4894$as_echo_n "checking for $ac_word... " >&6; }
4895if ${ac_cv_path_MKDIR+:} false; then :
4896  $as_echo_n "(cached) " >&6
4897else
4898  case $MKDIR in
4899  [\\/]* | ?:[\\/]*)
4900  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4901  ;;
4902  *)
4903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4904for as_dir in $PATH
4905do
4906  IFS=$as_save_IFS
4907  test -z "$as_dir" && as_dir=.
4908    for ac_exec_ext in '' $ac_executable_extensions; do
4909  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4910    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4912    break 2
4913  fi
4914done
4915  done
4916IFS=$as_save_IFS
4917
4918  ;;
4919esac
4920fi
4921MKDIR=$ac_cv_path_MKDIR
4922if test -n "$MKDIR"; then
4923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4924$as_echo "$MKDIR" >&6; }
4925else
4926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927$as_echo "no" >&6; }
4928fi
4929
4930
4931  test -n "$MKDIR" && break
4932done
4933
4934
4935    if test "x$MKDIR" = x; then
4936        if test "xmkdir" = x; then
4937          PROG_NAME=mkdir
4938        else
4939          PROG_NAME=mkdir
4940        fi
4941        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4942$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4943        as_fn_error $? "Cannot continue" "$LINENO" 5
4944    fi
4945
4946
4947
4948    for ac_prog in mktemp
4949do
4950  # Extract the first word of "$ac_prog", so it can be a program name with args.
4951set dummy $ac_prog; ac_word=$2
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4953$as_echo_n "checking for $ac_word... " >&6; }
4954if ${ac_cv_path_MKTEMP+:} false; then :
4955  $as_echo_n "(cached) " >&6
4956else
4957  case $MKTEMP in
4958  [\\/]* | ?:[\\/]*)
4959  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4960  ;;
4961  *)
4962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4963for as_dir in $PATH
4964do
4965  IFS=$as_save_IFS
4966  test -z "$as_dir" && as_dir=.
4967    for ac_exec_ext in '' $ac_executable_extensions; do
4968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4969    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4971    break 2
4972  fi
4973done
4974  done
4975IFS=$as_save_IFS
4976
4977  ;;
4978esac
4979fi
4980MKTEMP=$ac_cv_path_MKTEMP
4981if test -n "$MKTEMP"; then
4982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4983$as_echo "$MKTEMP" >&6; }
4984else
4985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4986$as_echo "no" >&6; }
4987fi
4988
4989
4990  test -n "$MKTEMP" && break
4991done
4992
4993
4994    if test "x$MKTEMP" = x; then
4995        if test "xmktemp" = x; then
4996          PROG_NAME=mktemp
4997        else
4998          PROG_NAME=mktemp
4999        fi
5000        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5001$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5002        as_fn_error $? "Cannot continue" "$LINENO" 5
5003    fi
5004
5005
5006
5007    for ac_prog in mv
5008do
5009  # Extract the first word of "$ac_prog", so it can be a program name with args.
5010set dummy $ac_prog; ac_word=$2
5011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5012$as_echo_n "checking for $ac_word... " >&6; }
5013if ${ac_cv_path_MV+:} false; then :
5014  $as_echo_n "(cached) " >&6
5015else
5016  case $MV in
5017  [\\/]* | ?:[\\/]*)
5018  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5019  ;;
5020  *)
5021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5022for as_dir in $PATH
5023do
5024  IFS=$as_save_IFS
5025  test -z "$as_dir" && as_dir=.
5026    for ac_exec_ext in '' $ac_executable_extensions; do
5027  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5028    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5030    break 2
5031  fi
5032done
5033  done
5034IFS=$as_save_IFS
5035
5036  ;;
5037esac
5038fi
5039MV=$ac_cv_path_MV
5040if test -n "$MV"; then
5041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5042$as_echo "$MV" >&6; }
5043else
5044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5045$as_echo "no" >&6; }
5046fi
5047
5048
5049  test -n "$MV" && break
5050done
5051
5052
5053    if test "x$MV" = x; then
5054        if test "xmv" = x; then
5055          PROG_NAME=mv
5056        else
5057          PROG_NAME=mv
5058        fi
5059        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5060$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5061        as_fn_error $? "Cannot continue" "$LINENO" 5
5062    fi
5063
5064
5065
5066    for ac_prog in printf
5067do
5068  # Extract the first word of "$ac_prog", so it can be a program name with args.
5069set dummy $ac_prog; ac_word=$2
5070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5071$as_echo_n "checking for $ac_word... " >&6; }
5072if ${ac_cv_path_PRINTF+:} false; then :
5073  $as_echo_n "(cached) " >&6
5074else
5075  case $PRINTF in
5076  [\\/]* | ?:[\\/]*)
5077  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5078  ;;
5079  *)
5080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5081for as_dir in $PATH
5082do
5083  IFS=$as_save_IFS
5084  test -z "$as_dir" && as_dir=.
5085    for ac_exec_ext in '' $ac_executable_extensions; do
5086  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5087    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5089    break 2
5090  fi
5091done
5092  done
5093IFS=$as_save_IFS
5094
5095  ;;
5096esac
5097fi
5098PRINTF=$ac_cv_path_PRINTF
5099if test -n "$PRINTF"; then
5100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5101$as_echo "$PRINTF" >&6; }
5102else
5103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5104$as_echo "no" >&6; }
5105fi
5106
5107
5108  test -n "$PRINTF" && break
5109done
5110
5111
5112    if test "x$PRINTF" = x; then
5113        if test "xprintf" = x; then
5114          PROG_NAME=printf
5115        else
5116          PROG_NAME=printf
5117        fi
5118        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5119$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5120        as_fn_error $? "Cannot continue" "$LINENO" 5
5121    fi
5122
5123
5124
5125    for ac_prog in pwd
5126do
5127  # Extract the first word of "$ac_prog", so it can be a program name with args.
5128set dummy $ac_prog; ac_word=$2
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
5131if ${ac_cv_path_THEPWDCMD+:} false; then :
5132  $as_echo_n "(cached) " >&6
5133else
5134  case $THEPWDCMD in
5135  [\\/]* | ?:[\\/]*)
5136  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5137  ;;
5138  *)
5139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5140for as_dir in $PATH
5141do
5142  IFS=$as_save_IFS
5143  test -z "$as_dir" && as_dir=.
5144    for ac_exec_ext in '' $ac_executable_extensions; do
5145  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5146    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5148    break 2
5149  fi
5150done
5151  done
5152IFS=$as_save_IFS
5153
5154  ;;
5155esac
5156fi
5157THEPWDCMD=$ac_cv_path_THEPWDCMD
5158if test -n "$THEPWDCMD"; then
5159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5160$as_echo "$THEPWDCMD" >&6; }
5161else
5162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163$as_echo "no" >&6; }
5164fi
5165
5166
5167  test -n "$THEPWDCMD" && break
5168done
5169
5170
5171    if test "x$THEPWDCMD" = x; then
5172        if test "xpwd" = x; then
5173          PROG_NAME=thepwdcmd
5174        else
5175          PROG_NAME=pwd
5176        fi
5177        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5178$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5179        as_fn_error $? "Cannot continue" "$LINENO" 5
5180    fi
5181
5182
5183
5184    for ac_prog in rm
5185do
5186  # Extract the first word of "$ac_prog", so it can be a program name with args.
5187set dummy $ac_prog; ac_word=$2
5188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5189$as_echo_n "checking for $ac_word... " >&6; }
5190if ${ac_cv_path_RM+:} false; then :
5191  $as_echo_n "(cached) " >&6
5192else
5193  case $RM in
5194  [\\/]* | ?:[\\/]*)
5195  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5196  ;;
5197  *)
5198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5199for as_dir in $PATH
5200do
5201  IFS=$as_save_IFS
5202  test -z "$as_dir" && as_dir=.
5203    for ac_exec_ext in '' $ac_executable_extensions; do
5204  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5205    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5207    break 2
5208  fi
5209done
5210  done
5211IFS=$as_save_IFS
5212
5213  ;;
5214esac
5215fi
5216RM=$ac_cv_path_RM
5217if test -n "$RM"; then
5218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5219$as_echo "$RM" >&6; }
5220else
5221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5222$as_echo "no" >&6; }
5223fi
5224
5225
5226  test -n "$RM" && break
5227done
5228
5229
5230    if test "x$RM" = x; then
5231        if test "xrm" = x; then
5232          PROG_NAME=rm
5233        else
5234          PROG_NAME=rm
5235        fi
5236        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5237$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5238        as_fn_error $? "Cannot continue" "$LINENO" 5
5239    fi
5240
5241
5242
5243    for ac_prog in sh
5244do
5245  # Extract the first word of "$ac_prog", so it can be a program name with args.
5246set dummy $ac_prog; ac_word=$2
5247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5248$as_echo_n "checking for $ac_word... " >&6; }
5249if ${ac_cv_path_SH+:} false; then :
5250  $as_echo_n "(cached) " >&6
5251else
5252  case $SH in
5253  [\\/]* | ?:[\\/]*)
5254  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5255  ;;
5256  *)
5257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5258for as_dir in $PATH
5259do
5260  IFS=$as_save_IFS
5261  test -z "$as_dir" && as_dir=.
5262    for ac_exec_ext in '' $ac_executable_extensions; do
5263  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5264    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5266    break 2
5267  fi
5268done
5269  done
5270IFS=$as_save_IFS
5271
5272  ;;
5273esac
5274fi
5275SH=$ac_cv_path_SH
5276if test -n "$SH"; then
5277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5278$as_echo "$SH" >&6; }
5279else
5280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5281$as_echo "no" >&6; }
5282fi
5283
5284
5285  test -n "$SH" && break
5286done
5287
5288
5289    if test "x$SH" = x; then
5290        if test "xsh" = x; then
5291          PROG_NAME=sh
5292        else
5293          PROG_NAME=sh
5294        fi
5295        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5296$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5297        as_fn_error $? "Cannot continue" "$LINENO" 5
5298    fi
5299
5300
5301
5302    for ac_prog in sort
5303do
5304  # Extract the first word of "$ac_prog", so it can be a program name with args.
5305set dummy $ac_prog; ac_word=$2
5306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5307$as_echo_n "checking for $ac_word... " >&6; }
5308if ${ac_cv_path_SORT+:} false; then :
5309  $as_echo_n "(cached) " >&6
5310else
5311  case $SORT in
5312  [\\/]* | ?:[\\/]*)
5313  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5314  ;;
5315  *)
5316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5317for as_dir in $PATH
5318do
5319  IFS=$as_save_IFS
5320  test -z "$as_dir" && as_dir=.
5321    for ac_exec_ext in '' $ac_executable_extensions; do
5322  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5323    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5325    break 2
5326  fi
5327done
5328  done
5329IFS=$as_save_IFS
5330
5331  ;;
5332esac
5333fi
5334SORT=$ac_cv_path_SORT
5335if test -n "$SORT"; then
5336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5337$as_echo "$SORT" >&6; }
5338else
5339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5340$as_echo "no" >&6; }
5341fi
5342
5343
5344  test -n "$SORT" && break
5345done
5346
5347
5348    if test "x$SORT" = x; then
5349        if test "xsort" = x; then
5350          PROG_NAME=sort
5351        else
5352          PROG_NAME=sort
5353        fi
5354        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5355$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5356        as_fn_error $? "Cannot continue" "$LINENO" 5
5357    fi
5358
5359
5360
5361    for ac_prog in tail
5362do
5363  # Extract the first word of "$ac_prog", so it can be a program name with args.
5364set dummy $ac_prog; ac_word=$2
5365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5366$as_echo_n "checking for $ac_word... " >&6; }
5367if ${ac_cv_path_TAIL+:} false; then :
5368  $as_echo_n "(cached) " >&6
5369else
5370  case $TAIL in
5371  [\\/]* | ?:[\\/]*)
5372  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5373  ;;
5374  *)
5375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5376for as_dir in $PATH
5377do
5378  IFS=$as_save_IFS
5379  test -z "$as_dir" && as_dir=.
5380    for ac_exec_ext in '' $ac_executable_extensions; do
5381  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5382    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5384    break 2
5385  fi
5386done
5387  done
5388IFS=$as_save_IFS
5389
5390  ;;
5391esac
5392fi
5393TAIL=$ac_cv_path_TAIL
5394if test -n "$TAIL"; then
5395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5396$as_echo "$TAIL" >&6; }
5397else
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399$as_echo "no" >&6; }
5400fi
5401
5402
5403  test -n "$TAIL" && break
5404done
5405
5406
5407    if test "x$TAIL" = x; then
5408        if test "xtail" = x; then
5409          PROG_NAME=tail
5410        else
5411          PROG_NAME=tail
5412        fi
5413        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5414$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5415        as_fn_error $? "Cannot continue" "$LINENO" 5
5416    fi
5417
5418
5419
5420    for ac_prog in tar
5421do
5422  # Extract the first word of "$ac_prog", so it can be a program name with args.
5423set dummy $ac_prog; ac_word=$2
5424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5425$as_echo_n "checking for $ac_word... " >&6; }
5426if ${ac_cv_path_TAR+:} false; then :
5427  $as_echo_n "(cached) " >&6
5428else
5429  case $TAR in
5430  [\\/]* | ?:[\\/]*)
5431  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5432  ;;
5433  *)
5434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5435for as_dir in $PATH
5436do
5437  IFS=$as_save_IFS
5438  test -z "$as_dir" && as_dir=.
5439    for ac_exec_ext in '' $ac_executable_extensions; do
5440  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5441    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5443    break 2
5444  fi
5445done
5446  done
5447IFS=$as_save_IFS
5448
5449  ;;
5450esac
5451fi
5452TAR=$ac_cv_path_TAR
5453if test -n "$TAR"; then
5454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5455$as_echo "$TAR" >&6; }
5456else
5457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5458$as_echo "no" >&6; }
5459fi
5460
5461
5462  test -n "$TAR" && break
5463done
5464
5465
5466    if test "x$TAR" = x; then
5467        if test "xtar" = x; then
5468          PROG_NAME=tar
5469        else
5470          PROG_NAME=tar
5471        fi
5472        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5473$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5474        as_fn_error $? "Cannot continue" "$LINENO" 5
5475    fi
5476
5477
5478
5479    for ac_prog in tee
5480do
5481  # Extract the first word of "$ac_prog", so it can be a program name with args.
5482set dummy $ac_prog; ac_word=$2
5483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5484$as_echo_n "checking for $ac_word... " >&6; }
5485if ${ac_cv_path_TEE+:} false; then :
5486  $as_echo_n "(cached) " >&6
5487else
5488  case $TEE in
5489  [\\/]* | ?:[\\/]*)
5490  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5491  ;;
5492  *)
5493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5494for as_dir in $PATH
5495do
5496  IFS=$as_save_IFS
5497  test -z "$as_dir" && as_dir=.
5498    for ac_exec_ext in '' $ac_executable_extensions; do
5499  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5500    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5502    break 2
5503  fi
5504done
5505  done
5506IFS=$as_save_IFS
5507
5508  ;;
5509esac
5510fi
5511TEE=$ac_cv_path_TEE
5512if test -n "$TEE"; then
5513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5514$as_echo "$TEE" >&6; }
5515else
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5517$as_echo "no" >&6; }
5518fi
5519
5520
5521  test -n "$TEE" && break
5522done
5523
5524
5525    if test "x$TEE" = x; then
5526        if test "xtee" = x; then
5527          PROG_NAME=tee
5528        else
5529          PROG_NAME=tee
5530        fi
5531        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5532$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5533        as_fn_error $? "Cannot continue" "$LINENO" 5
5534    fi
5535
5536
5537
5538    for ac_prog in touch
5539do
5540  # Extract the first word of "$ac_prog", so it can be a program name with args.
5541set dummy $ac_prog; ac_word=$2
5542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5543$as_echo_n "checking for $ac_word... " >&6; }
5544if ${ac_cv_path_TOUCH+:} false; then :
5545  $as_echo_n "(cached) " >&6
5546else
5547  case $TOUCH in
5548  [\\/]* | ?:[\\/]*)
5549  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5550  ;;
5551  *)
5552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5553for as_dir in $PATH
5554do
5555  IFS=$as_save_IFS
5556  test -z "$as_dir" && as_dir=.
5557    for ac_exec_ext in '' $ac_executable_extensions; do
5558  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5559    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5561    break 2
5562  fi
5563done
5564  done
5565IFS=$as_save_IFS
5566
5567  ;;
5568esac
5569fi
5570TOUCH=$ac_cv_path_TOUCH
5571if test -n "$TOUCH"; then
5572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5573$as_echo "$TOUCH" >&6; }
5574else
5575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5576$as_echo "no" >&6; }
5577fi
5578
5579
5580  test -n "$TOUCH" && break
5581done
5582
5583
5584    if test "x$TOUCH" = x; then
5585        if test "xtouch" = x; then
5586          PROG_NAME=touch
5587        else
5588          PROG_NAME=touch
5589        fi
5590        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5591$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5592        as_fn_error $? "Cannot continue" "$LINENO" 5
5593    fi
5594
5595
5596
5597    for ac_prog in tr
5598do
5599  # Extract the first word of "$ac_prog", so it can be a program name with args.
5600set dummy $ac_prog; ac_word=$2
5601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5602$as_echo_n "checking for $ac_word... " >&6; }
5603if ${ac_cv_path_TR+:} false; then :
5604  $as_echo_n "(cached) " >&6
5605else
5606  case $TR in
5607  [\\/]* | ?:[\\/]*)
5608  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5609  ;;
5610  *)
5611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5612for as_dir in $PATH
5613do
5614  IFS=$as_save_IFS
5615  test -z "$as_dir" && as_dir=.
5616    for ac_exec_ext in '' $ac_executable_extensions; do
5617  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5618    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5620    break 2
5621  fi
5622done
5623  done
5624IFS=$as_save_IFS
5625
5626  ;;
5627esac
5628fi
5629TR=$ac_cv_path_TR
5630if test -n "$TR"; then
5631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5632$as_echo "$TR" >&6; }
5633else
5634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5635$as_echo "no" >&6; }
5636fi
5637
5638
5639  test -n "$TR" && break
5640done
5641
5642
5643    if test "x$TR" = x; then
5644        if test "xtr" = x; then
5645          PROG_NAME=tr
5646        else
5647          PROG_NAME=tr
5648        fi
5649        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5650$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5651        as_fn_error $? "Cannot continue" "$LINENO" 5
5652    fi
5653
5654
5655
5656    for ac_prog in uname
5657do
5658  # Extract the first word of "$ac_prog", so it can be a program name with args.
5659set dummy $ac_prog; ac_word=$2
5660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5661$as_echo_n "checking for $ac_word... " >&6; }
5662if ${ac_cv_path_UNAME+:} false; then :
5663  $as_echo_n "(cached) " >&6
5664else
5665  case $UNAME in
5666  [\\/]* | ?:[\\/]*)
5667  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5668  ;;
5669  *)
5670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5671for as_dir in $PATH
5672do
5673  IFS=$as_save_IFS
5674  test -z "$as_dir" && as_dir=.
5675    for ac_exec_ext in '' $ac_executable_extensions; do
5676  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5677    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5679    break 2
5680  fi
5681done
5682  done
5683IFS=$as_save_IFS
5684
5685  ;;
5686esac
5687fi
5688UNAME=$ac_cv_path_UNAME
5689if test -n "$UNAME"; then
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5691$as_echo "$UNAME" >&6; }
5692else
5693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5694$as_echo "no" >&6; }
5695fi
5696
5697
5698  test -n "$UNAME" && break
5699done
5700
5701
5702    if test "x$UNAME" = x; then
5703        if test "xuname" = x; then
5704          PROG_NAME=uname
5705        else
5706          PROG_NAME=uname
5707        fi
5708        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5709$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5710        as_fn_error $? "Cannot continue" "$LINENO" 5
5711    fi
5712
5713
5714
5715    for ac_prog in uniq
5716do
5717  # Extract the first word of "$ac_prog", so it can be a program name with args.
5718set dummy $ac_prog; ac_word=$2
5719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5720$as_echo_n "checking for $ac_word... " >&6; }
5721if ${ac_cv_path_UNIQ+:} false; then :
5722  $as_echo_n "(cached) " >&6
5723else
5724  case $UNIQ in
5725  [\\/]* | ?:[\\/]*)
5726  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5727  ;;
5728  *)
5729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5730for as_dir in $PATH
5731do
5732  IFS=$as_save_IFS
5733  test -z "$as_dir" && as_dir=.
5734    for ac_exec_ext in '' $ac_executable_extensions; do
5735  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5736    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5738    break 2
5739  fi
5740done
5741  done
5742IFS=$as_save_IFS
5743
5744  ;;
5745esac
5746fi
5747UNIQ=$ac_cv_path_UNIQ
5748if test -n "$UNIQ"; then
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5750$as_echo "$UNIQ" >&6; }
5751else
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753$as_echo "no" >&6; }
5754fi
5755
5756
5757  test -n "$UNIQ" && break
5758done
5759
5760
5761    if test "x$UNIQ" = x; then
5762        if test "xuniq" = x; then
5763          PROG_NAME=uniq
5764        else
5765          PROG_NAME=uniq
5766        fi
5767        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5768$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5769        as_fn_error $? "Cannot continue" "$LINENO" 5
5770    fi
5771
5772
5773
5774    for ac_prog in wc
5775do
5776  # Extract the first word of "$ac_prog", so it can be a program name with args.
5777set dummy $ac_prog; ac_word=$2
5778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5779$as_echo_n "checking for $ac_word... " >&6; }
5780if ${ac_cv_path_WC+:} false; then :
5781  $as_echo_n "(cached) " >&6
5782else
5783  case $WC in
5784  [\\/]* | ?:[\\/]*)
5785  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5786  ;;
5787  *)
5788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5789for as_dir in $PATH
5790do
5791  IFS=$as_save_IFS
5792  test -z "$as_dir" && as_dir=.
5793    for ac_exec_ext in '' $ac_executable_extensions; do
5794  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5795    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5797    break 2
5798  fi
5799done
5800  done
5801IFS=$as_save_IFS
5802
5803  ;;
5804esac
5805fi
5806WC=$ac_cv_path_WC
5807if test -n "$WC"; then
5808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5809$as_echo "$WC" >&6; }
5810else
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5812$as_echo "no" >&6; }
5813fi
5814
5815
5816  test -n "$WC" && break
5817done
5818
5819
5820    if test "x$WC" = x; then
5821        if test "xwc" = x; then
5822          PROG_NAME=wc
5823        else
5824          PROG_NAME=wc
5825        fi
5826        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5827$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5828        as_fn_error $? "Cannot continue" "$LINENO" 5
5829    fi
5830
5831
5832
5833    for ac_prog in which
5834do
5835  # Extract the first word of "$ac_prog", so it can be a program name with args.
5836set dummy $ac_prog; ac_word=$2
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5838$as_echo_n "checking for $ac_word... " >&6; }
5839if ${ac_cv_path_WHICH+:} false; then :
5840  $as_echo_n "(cached) " >&6
5841else
5842  case $WHICH in
5843  [\\/]* | ?:[\\/]*)
5844  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5845  ;;
5846  *)
5847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5848for as_dir in $PATH
5849do
5850  IFS=$as_save_IFS
5851  test -z "$as_dir" && as_dir=.
5852    for ac_exec_ext in '' $ac_executable_extensions; do
5853  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5854    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5856    break 2
5857  fi
5858done
5859  done
5860IFS=$as_save_IFS
5861
5862  ;;
5863esac
5864fi
5865WHICH=$ac_cv_path_WHICH
5866if test -n "$WHICH"; then
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5868$as_echo "$WHICH" >&6; }
5869else
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874
5875  test -n "$WHICH" && break
5876done
5877
5878
5879    if test "x$WHICH" = x; then
5880        if test "xwhich" = x; then
5881          PROG_NAME=which
5882        else
5883          PROG_NAME=which
5884        fi
5885        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5886$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5887        as_fn_error $? "Cannot continue" "$LINENO" 5
5888    fi
5889
5890
5891
5892    for ac_prog in xargs
5893do
5894  # Extract the first word of "$ac_prog", so it can be a program name with args.
5895set dummy $ac_prog; ac_word=$2
5896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5897$as_echo_n "checking for $ac_word... " >&6; }
5898if ${ac_cv_path_XARGS+:} false; then :
5899  $as_echo_n "(cached) " >&6
5900else
5901  case $XARGS in
5902  [\\/]* | ?:[\\/]*)
5903  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5904  ;;
5905  *)
5906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5907for as_dir in $PATH
5908do
5909  IFS=$as_save_IFS
5910  test -z "$as_dir" && as_dir=.
5911    for ac_exec_ext in '' $ac_executable_extensions; do
5912  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5913    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5915    break 2
5916  fi
5917done
5918  done
5919IFS=$as_save_IFS
5920
5921  ;;
5922esac
5923fi
5924XARGS=$ac_cv_path_XARGS
5925if test -n "$XARGS"; then
5926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5927$as_echo "$XARGS" >&6; }
5928else
5929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5930$as_echo "no" >&6; }
5931fi
5932
5933
5934  test -n "$XARGS" && break
5935done
5936
5937
5938    if test "x$XARGS" = x; then
5939        if test "xxargs" = x; then
5940          PROG_NAME=xargs
5941        else
5942          PROG_NAME=xargs
5943        fi
5944        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5945$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5946        as_fn_error $? "Cannot continue" "$LINENO" 5
5947    fi
5948
5949
5950
5951# Then required tools that require some special treatment.
5952for ac_prog in gawk mawk nawk awk
5953do
5954  # Extract the first word of "$ac_prog", so it can be a program name with args.
5955set dummy $ac_prog; ac_word=$2
5956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5957$as_echo_n "checking for $ac_word... " >&6; }
5958if ${ac_cv_prog_AWK+:} false; then :
5959  $as_echo_n "(cached) " >&6
5960else
5961  if test -n "$AWK"; then
5962  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5963else
5964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5965for as_dir in $PATH
5966do
5967  IFS=$as_save_IFS
5968  test -z "$as_dir" && as_dir=.
5969    for ac_exec_ext in '' $ac_executable_extensions; do
5970  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5971    ac_cv_prog_AWK="$ac_prog"
5972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5973    break 2
5974  fi
5975done
5976  done
5977IFS=$as_save_IFS
5978
5979fi
5980fi
5981AWK=$ac_cv_prog_AWK
5982if test -n "$AWK"; then
5983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5984$as_echo "$AWK" >&6; }
5985else
5986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5987$as_echo "no" >&6; }
5988fi
5989
5990
5991  test -n "$AWK" && break
5992done
5993
5994
5995    if test "x$AWK" = x; then
5996        if test "x" = x; then
5997          PROG_NAME=awk
5998        else
5999          PROG_NAME=
6000        fi
6001        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6002$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6003        as_fn_error $? "Cannot continue" "$LINENO" 5
6004    fi
6005
6006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6007$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6008if ${ac_cv_path_GREP+:} false; then :
6009  $as_echo_n "(cached) " >&6
6010else
6011  if test -z "$GREP"; then
6012  ac_path_GREP_found=false
6013  # Loop through the user's path and test for each of PROGNAME-LIST
6014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6015for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6016do
6017  IFS=$as_save_IFS
6018  test -z "$as_dir" && as_dir=.
6019    for ac_prog in grep ggrep; do
6020    for ac_exec_ext in '' $ac_executable_extensions; do
6021      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6022      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6023# Check for GNU ac_path_GREP and select it if it is found.
6024  # Check for GNU $ac_path_GREP
6025case `"$ac_path_GREP" --version 2>&1` in
6026*GNU*)
6027  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6028*)
6029  ac_count=0
6030  $as_echo_n 0123456789 >"conftest.in"
6031  while :
6032  do
6033    cat "conftest.in" "conftest.in" >"conftest.tmp"
6034    mv "conftest.tmp" "conftest.in"
6035    cp "conftest.in" "conftest.nl"
6036    $as_echo 'GREP' >> "conftest.nl"
6037    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6038    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6039    as_fn_arith $ac_count + 1 && ac_count=$as_val
6040    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6041      # Best one so far, save it but keep looking for a better one
6042      ac_cv_path_GREP="$ac_path_GREP"
6043      ac_path_GREP_max=$ac_count
6044    fi
6045    # 10*(2^10) chars as input seems more than enough
6046    test $ac_count -gt 10 && break
6047  done
6048  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6049esac
6050
6051      $ac_path_GREP_found && break 3
6052    done
6053  done
6054  done
6055IFS=$as_save_IFS
6056  if test -z "$ac_cv_path_GREP"; then
6057    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6058  fi
6059else
6060  ac_cv_path_GREP=$GREP
6061fi
6062
6063fi
6064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6065$as_echo "$ac_cv_path_GREP" >&6; }
6066 GREP="$ac_cv_path_GREP"
6067
6068
6069
6070    if test "x$GREP" = x; then
6071        if test "x" = x; then
6072          PROG_NAME=grep
6073        else
6074          PROG_NAME=
6075        fi
6076        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6077$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6078        as_fn_error $? "Cannot continue" "$LINENO" 5
6079    fi
6080
6081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6082$as_echo_n "checking for egrep... " >&6; }
6083if ${ac_cv_path_EGREP+:} false; then :
6084  $as_echo_n "(cached) " >&6
6085else
6086  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6087   then ac_cv_path_EGREP="$GREP -E"
6088   else
6089     if test -z "$EGREP"; then
6090  ac_path_EGREP_found=false
6091  # Loop through the user's path and test for each of PROGNAME-LIST
6092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6093for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6094do
6095  IFS=$as_save_IFS
6096  test -z "$as_dir" && as_dir=.
6097    for ac_prog in egrep; do
6098    for ac_exec_ext in '' $ac_executable_extensions; do
6099      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6100      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6101# Check for GNU ac_path_EGREP and select it if it is found.
6102  # Check for GNU $ac_path_EGREP
6103case `"$ac_path_EGREP" --version 2>&1` in
6104*GNU*)
6105  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6106*)
6107  ac_count=0
6108  $as_echo_n 0123456789 >"conftest.in"
6109  while :
6110  do
6111    cat "conftest.in" "conftest.in" >"conftest.tmp"
6112    mv "conftest.tmp" "conftest.in"
6113    cp "conftest.in" "conftest.nl"
6114    $as_echo 'EGREP' >> "conftest.nl"
6115    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6116    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6117    as_fn_arith $ac_count + 1 && ac_count=$as_val
6118    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6119      # Best one so far, save it but keep looking for a better one
6120      ac_cv_path_EGREP="$ac_path_EGREP"
6121      ac_path_EGREP_max=$ac_count
6122    fi
6123    # 10*(2^10) chars as input seems more than enough
6124    test $ac_count -gt 10 && break
6125  done
6126  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6127esac
6128
6129      $ac_path_EGREP_found && break 3
6130    done
6131  done
6132  done
6133IFS=$as_save_IFS
6134  if test -z "$ac_cv_path_EGREP"; then
6135    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6136  fi
6137else
6138  ac_cv_path_EGREP=$EGREP
6139fi
6140
6141   fi
6142fi
6143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6144$as_echo "$ac_cv_path_EGREP" >&6; }
6145 EGREP="$ac_cv_path_EGREP"
6146
6147
6148
6149    if test "x$EGREP" = x; then
6150        if test "x" = x; then
6151          PROG_NAME=egrep
6152        else
6153          PROG_NAME=
6154        fi
6155        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6156$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6157        as_fn_error $? "Cannot continue" "$LINENO" 5
6158    fi
6159
6160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6161$as_echo_n "checking for fgrep... " >&6; }
6162if ${ac_cv_path_FGREP+:} false; then :
6163  $as_echo_n "(cached) " >&6
6164else
6165  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6166   then ac_cv_path_FGREP="$GREP -F"
6167   else
6168     if test -z "$FGREP"; then
6169  ac_path_FGREP_found=false
6170  # Loop through the user's path and test for each of PROGNAME-LIST
6171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6172for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6173do
6174  IFS=$as_save_IFS
6175  test -z "$as_dir" && as_dir=.
6176    for ac_prog in fgrep; do
6177    for ac_exec_ext in '' $ac_executable_extensions; do
6178      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6179      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6180# Check for GNU ac_path_FGREP and select it if it is found.
6181  # Check for GNU $ac_path_FGREP
6182case `"$ac_path_FGREP" --version 2>&1` in
6183*GNU*)
6184  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6185*)
6186  ac_count=0
6187  $as_echo_n 0123456789 >"conftest.in"
6188  while :
6189  do
6190    cat "conftest.in" "conftest.in" >"conftest.tmp"
6191    mv "conftest.tmp" "conftest.in"
6192    cp "conftest.in" "conftest.nl"
6193    $as_echo 'FGREP' >> "conftest.nl"
6194    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6195    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6196    as_fn_arith $ac_count + 1 && ac_count=$as_val
6197    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6198      # Best one so far, save it but keep looking for a better one
6199      ac_cv_path_FGREP="$ac_path_FGREP"
6200      ac_path_FGREP_max=$ac_count
6201    fi
6202    # 10*(2^10) chars as input seems more than enough
6203    test $ac_count -gt 10 && break
6204  done
6205  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6206esac
6207
6208      $ac_path_FGREP_found && break 3
6209    done
6210  done
6211  done
6212IFS=$as_save_IFS
6213  if test -z "$ac_cv_path_FGREP"; then
6214    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6215  fi
6216else
6217  ac_cv_path_FGREP=$FGREP
6218fi
6219
6220   fi
6221fi
6222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6223$as_echo "$ac_cv_path_FGREP" >&6; }
6224 FGREP="$ac_cv_path_FGREP"
6225
6226
6227
6228    if test "x$FGREP" = x; then
6229        if test "x" = x; then
6230          PROG_NAME=fgrep
6231        else
6232          PROG_NAME=
6233        fi
6234        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6235$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6236        as_fn_error $? "Cannot continue" "$LINENO" 5
6237    fi
6238
6239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6240$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6241if ${ac_cv_path_SED+:} false; then :
6242  $as_echo_n "(cached) " >&6
6243else
6244            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6245     for ac_i in 1 2 3 4 5 6 7; do
6246       ac_script="$ac_script$as_nl$ac_script"
6247     done
6248     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6249     { ac_script=; unset ac_script;}
6250     if test -z "$SED"; then
6251  ac_path_SED_found=false
6252  # Loop through the user's path and test for each of PROGNAME-LIST
6253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6254for as_dir in $PATH
6255do
6256  IFS=$as_save_IFS
6257  test -z "$as_dir" && as_dir=.
6258    for ac_prog in sed gsed; do
6259    for ac_exec_ext in '' $ac_executable_extensions; do
6260      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6261      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6262# Check for GNU ac_path_SED and select it if it is found.
6263  # Check for GNU $ac_path_SED
6264case `"$ac_path_SED" --version 2>&1` in
6265*GNU*)
6266  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6267*)
6268  ac_count=0
6269  $as_echo_n 0123456789 >"conftest.in"
6270  while :
6271  do
6272    cat "conftest.in" "conftest.in" >"conftest.tmp"
6273    mv "conftest.tmp" "conftest.in"
6274    cp "conftest.in" "conftest.nl"
6275    $as_echo '' >> "conftest.nl"
6276    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6277    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6278    as_fn_arith $ac_count + 1 && ac_count=$as_val
6279    if test $ac_count -gt ${ac_path_SED_max-0}; then
6280      # Best one so far, save it but keep looking for a better one
6281      ac_cv_path_SED="$ac_path_SED"
6282      ac_path_SED_max=$ac_count
6283    fi
6284    # 10*(2^10) chars as input seems more than enough
6285    test $ac_count -gt 10 && break
6286  done
6287  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6288esac
6289
6290      $ac_path_SED_found && break 3
6291    done
6292  done
6293  done
6294IFS=$as_save_IFS
6295  if test -z "$ac_cv_path_SED"; then
6296    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6297  fi
6298else
6299  ac_cv_path_SED=$SED
6300fi
6301
6302fi
6303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6304$as_echo "$ac_cv_path_SED" >&6; }
6305 SED="$ac_cv_path_SED"
6306  rm -f conftest.sed
6307
6308
6309    if test "x$SED" = x; then
6310        if test "x" = x; then
6311          PROG_NAME=sed
6312        else
6313          PROG_NAME=
6314        fi
6315        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6316$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6317        as_fn_error $? "Cannot continue" "$LINENO" 5
6318    fi
6319
6320
6321for ac_prog in nawk gawk awk
6322do
6323  # Extract the first word of "$ac_prog", so it can be a program name with args.
6324set dummy $ac_prog; ac_word=$2
6325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6326$as_echo_n "checking for $ac_word... " >&6; }
6327if ${ac_cv_path_NAWK+:} false; then :
6328  $as_echo_n "(cached) " >&6
6329else
6330  case $NAWK in
6331  [\\/]* | ?:[\\/]*)
6332  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6333  ;;
6334  *)
6335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6336for as_dir in $PATH
6337do
6338  IFS=$as_save_IFS
6339  test -z "$as_dir" && as_dir=.
6340    for ac_exec_ext in '' $ac_executable_extensions; do
6341  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6342    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6344    break 2
6345  fi
6346done
6347  done
6348IFS=$as_save_IFS
6349
6350  ;;
6351esac
6352fi
6353NAWK=$ac_cv_path_NAWK
6354if test -n "$NAWK"; then
6355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6356$as_echo "$NAWK" >&6; }
6357else
6358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6359$as_echo "no" >&6; }
6360fi
6361
6362
6363  test -n "$NAWK" && break
6364done
6365
6366
6367    if test "x$NAWK" = x; then
6368        if test "x" = x; then
6369          PROG_NAME=nawk
6370        else
6371          PROG_NAME=
6372        fi
6373        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6374$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6375        as_fn_error $? "Cannot continue" "$LINENO" 5
6376    fi
6377
6378
6379# Always force rm.
6380RM="$RM -f"
6381
6382# These are not required on all platforms
6383# Extract the first word of "cygpath", so it can be a program name with args.
6384set dummy cygpath; ac_word=$2
6385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6386$as_echo_n "checking for $ac_word... " >&6; }
6387if ${ac_cv_path_CYGPATH+:} false; then :
6388  $as_echo_n "(cached) " >&6
6389else
6390  case $CYGPATH in
6391  [\\/]* | ?:[\\/]*)
6392  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6393  ;;
6394  *)
6395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6396for as_dir in $PATH
6397do
6398  IFS=$as_save_IFS
6399  test -z "$as_dir" && as_dir=.
6400    for ac_exec_ext in '' $ac_executable_extensions; do
6401  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6402    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6404    break 2
6405  fi
6406done
6407  done
6408IFS=$as_save_IFS
6409
6410  ;;
6411esac
6412fi
6413CYGPATH=$ac_cv_path_CYGPATH
6414if test -n "$CYGPATH"; then
6415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6416$as_echo "$CYGPATH" >&6; }
6417else
6418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419$as_echo "no" >&6; }
6420fi
6421
6422
6423# Extract the first word of "readlink", so it can be a program name with args.
6424set dummy readlink; ac_word=$2
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6426$as_echo_n "checking for $ac_word... " >&6; }
6427if ${ac_cv_path_READLINK+:} false; then :
6428  $as_echo_n "(cached) " >&6
6429else
6430  case $READLINK in
6431  [\\/]* | ?:[\\/]*)
6432  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6433  ;;
6434  *)
6435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6436for as_dir in $PATH
6437do
6438  IFS=$as_save_IFS
6439  test -z "$as_dir" && as_dir=.
6440    for ac_exec_ext in '' $ac_executable_extensions; do
6441  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6442    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6444    break 2
6445  fi
6446done
6447  done
6448IFS=$as_save_IFS
6449
6450  ;;
6451esac
6452fi
6453READLINK=$ac_cv_path_READLINK
6454if test -n "$READLINK"; then
6455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6456$as_echo "$READLINK" >&6; }
6457else
6458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6459$as_echo "no" >&6; }
6460fi
6461
6462
6463# Extract the first word of "df", so it can be a program name with args.
6464set dummy df; ac_word=$2
6465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6466$as_echo_n "checking for $ac_word... " >&6; }
6467if ${ac_cv_path_DF+:} false; then :
6468  $as_echo_n "(cached) " >&6
6469else
6470  case $DF in
6471  [\\/]* | ?:[\\/]*)
6472  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6473  ;;
6474  *)
6475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6476for as_dir in $PATH
6477do
6478  IFS=$as_save_IFS
6479  test -z "$as_dir" && as_dir=.
6480    for ac_exec_ext in '' $ac_executable_extensions; do
6481  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6482    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6484    break 2
6485  fi
6486done
6487  done
6488IFS=$as_save_IFS
6489
6490  ;;
6491esac
6492fi
6493DF=$ac_cv_path_DF
6494if test -n "$DF"; then
6495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6496$as_echo "$DF" >&6; }
6497else
6498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499$as_echo "no" >&6; }
6500fi
6501
6502
6503# Extract the first word of "SetFile", so it can be a program name with args.
6504set dummy SetFile; ac_word=$2
6505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6506$as_echo_n "checking for $ac_word... " >&6; }
6507if ${ac_cv_path_SETFILE+:} false; then :
6508  $as_echo_n "(cached) " >&6
6509else
6510  case $SETFILE in
6511  [\\/]* | ?:[\\/]*)
6512  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6513  ;;
6514  *)
6515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516for as_dir in $PATH
6517do
6518  IFS=$as_save_IFS
6519  test -z "$as_dir" && as_dir=.
6520    for ac_exec_ext in '' $ac_executable_extensions; do
6521  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6522    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524    break 2
6525  fi
6526done
6527  done
6528IFS=$as_save_IFS
6529
6530  ;;
6531esac
6532fi
6533SETFILE=$ac_cv_path_SETFILE
6534if test -n "$SETFILE"; then
6535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6536$as_echo "$SETFILE" >&6; }
6537else
6538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539$as_echo "no" >&6; }
6540fi
6541
6542
6543
6544
6545# Now we can determine OpenJDK build and target platforms. This is required to
6546# have early on.
6547# Make sure we can run config.sub.
6548$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6549  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6550
6551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6552$as_echo_n "checking build system type... " >&6; }
6553if ${ac_cv_build+:} false; then :
6554  $as_echo_n "(cached) " >&6
6555else
6556  ac_build_alias=$build_alias
6557test "x$ac_build_alias" = x &&
6558  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6559test "x$ac_build_alias" = x &&
6560  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6561ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6562  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6563
6564fi
6565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6566$as_echo "$ac_cv_build" >&6; }
6567case $ac_cv_build in
6568*-*-*) ;;
6569*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6570esac
6571build=$ac_cv_build
6572ac_save_IFS=$IFS; IFS='-'
6573set x $ac_cv_build
6574shift
6575build_cpu=$1
6576build_vendor=$2
6577shift; shift
6578# Remember, the first character of IFS is used to create $*,
6579# except with old shells:
6580build_os=$*
6581IFS=$ac_save_IFS
6582case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6583
6584
6585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6586$as_echo_n "checking host system type... " >&6; }
6587if ${ac_cv_host+:} false; then :
6588  $as_echo_n "(cached) " >&6
6589else
6590  if test "x$host_alias" = x; then
6591  ac_cv_host=$ac_cv_build
6592else
6593  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6594    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6595fi
6596
6597fi
6598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6599$as_echo "$ac_cv_host" >&6; }
6600case $ac_cv_host in
6601*-*-*) ;;
6602*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6603esac
6604host=$ac_cv_host
6605ac_save_IFS=$IFS; IFS='-'
6606set x $ac_cv_host
6607shift
6608host_cpu=$1
6609host_vendor=$2
6610shift; shift
6611# Remember, the first character of IFS is used to create $*,
6612# except with old shells:
6613host_os=$*
6614IFS=$ac_save_IFS
6615case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6616
6617
6618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6619$as_echo_n "checking target system type... " >&6; }
6620if ${ac_cv_target+:} false; then :
6621  $as_echo_n "(cached) " >&6
6622else
6623  if test "x$target_alias" = x; then
6624  ac_cv_target=$ac_cv_host
6625else
6626  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6627    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6628fi
6629
6630fi
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6632$as_echo "$ac_cv_target" >&6; }
6633case $ac_cv_target in
6634*-*-*) ;;
6635*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6636esac
6637target=$ac_cv_target
6638ac_save_IFS=$IFS; IFS='-'
6639set x $ac_cv_target
6640shift
6641target_cpu=$1
6642target_vendor=$2
6643shift; shift
6644# Remember, the first character of IFS is used to create $*,
6645# except with old shells:
6646target_os=$*
6647IFS=$ac_save_IFS
6648case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6649
6650
6651# The aliases save the names the user supplied, while $host etc.
6652# will get canonicalized.
6653test -n "$target_alias" &&
6654  test "$program_prefix$program_suffix$program_transform_name" = \
6655    NONENONEs,x,x, &&
6656  program_prefix=${target_alias}-
6657
6658# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6659# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6660# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6661# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6662# to use the configure naming style.
6663
6664
6665
6666
6667
6668    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6669    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6670    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6671    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6672    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6673    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6674
6675
6676
6677    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6678
6679  case "$build_os" in
6680    *linux*)
6681      VAR_OS=linux
6682      VAR_OS_API=posix
6683      VAR_OS_ENV=linux
6684      ;;
6685    *solaris*)
6686      VAR_OS=solaris
6687      VAR_OS_API=posix
6688      VAR_OS_ENV=solaris
6689      ;;
6690    *darwin*)
6691      VAR_OS=macosx
6692      VAR_OS_API=posix
6693      VAR_OS_ENV=macosx
6694      ;;
6695    *bsd*)
6696      VAR_OS=bsd
6697      VAR_OS_API=posix
6698      VAR_OS_ENV=bsd
6699      ;;
6700    *cygwin*)
6701      VAR_OS=windows
6702      VAR_OS_API=winapi
6703      VAR_OS_ENV=windows.cygwin
6704      ;;
6705    *mingw*)
6706      VAR_OS=windows
6707      VAR_OS_API=winapi
6708      VAR_OS_ENV=windows.msys
6709      ;;
6710    *)
6711      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6712      ;;
6713  esac
6714
6715
6716  # First argument is the cpu name from the trip/quad
6717  case "$build_cpu" in
6718    x86_64)
6719      VAR_CPU=x86_64
6720      VAR_CPU_ARCH=x86
6721      VAR_CPU_BITS=64
6722      VAR_CPU_ENDIAN=little
6723      ;;
6724    i?86)
6725      VAR_CPU=x86
6726      VAR_CPU_ARCH=x86
6727      VAR_CPU_BITS=32
6728      VAR_CPU_ENDIAN=little
6729      ;;
6730    arm*)
6731      VAR_CPU=arm
6732      VAR_CPU_ARCH=arm
6733      VAR_CPU_BITS=32
6734      VAR_CPU_ENDIAN=little
6735      ;;
6736    powerpc)
6737      VAR_CPU=ppc
6738      VAR_CPU_ARCH=ppc
6739      VAR_CPU_BITS=32
6740      VAR_CPU_ENDIAN=big
6741       ;;
6742    powerpc64)
6743      VAR_CPU=ppc64
6744      VAR_CPU_ARCH=ppc
6745      VAR_CPU_BITS=64
6746      VAR_CPU_ENDIAN=big
6747       ;;
6748    sparc)
6749      VAR_CPU=sparc
6750      VAR_CPU_ARCH=sparc
6751      VAR_CPU_BITS=32
6752      VAR_CPU_ENDIAN=big
6753       ;;
6754    sparcv9)
6755      VAR_CPU=sparcv9
6756      VAR_CPU_ARCH=sparc
6757      VAR_CPU_BITS=64
6758      VAR_CPU_ENDIAN=big
6759       ;;
6760    *)
6761      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6762      ;;
6763  esac
6764
6765    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6766    OPENJDK_BUILD_OS="$VAR_OS"
6767    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6768    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6769    OPENJDK_BUILD_CPU="$VAR_CPU"
6770    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6771    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6772    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6773
6774
6775
6776
6777
6778
6779
6780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6781$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6782    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6783$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6784
6785    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6786
6787  case "$host_os" in
6788    *linux*)
6789      VAR_OS=linux
6790      VAR_OS_API=posix
6791      VAR_OS_ENV=linux
6792      ;;
6793    *solaris*)
6794      VAR_OS=solaris
6795      VAR_OS_API=posix
6796      VAR_OS_ENV=solaris
6797      ;;
6798    *darwin*)
6799      VAR_OS=macosx
6800      VAR_OS_API=posix
6801      VAR_OS_ENV=macosx
6802      ;;
6803    *bsd*)
6804      VAR_OS=bsd
6805      VAR_OS_API=posix
6806      VAR_OS_ENV=bsd
6807      ;;
6808    *cygwin*)
6809      VAR_OS=windows
6810      VAR_OS_API=winapi
6811      VAR_OS_ENV=windows.cygwin
6812      ;;
6813    *mingw*)
6814      VAR_OS=windows
6815      VAR_OS_API=winapi
6816      VAR_OS_ENV=windows.msys
6817      ;;
6818    *)
6819      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6820      ;;
6821  esac
6822
6823
6824  # First argument is the cpu name from the trip/quad
6825  case "$host_cpu" in
6826    x86_64)
6827      VAR_CPU=x86_64
6828      VAR_CPU_ARCH=x86
6829      VAR_CPU_BITS=64
6830      VAR_CPU_ENDIAN=little
6831      ;;
6832    i?86)
6833      VAR_CPU=x86
6834      VAR_CPU_ARCH=x86
6835      VAR_CPU_BITS=32
6836      VAR_CPU_ENDIAN=little
6837      ;;
6838    arm*)
6839      VAR_CPU=arm
6840      VAR_CPU_ARCH=arm
6841      VAR_CPU_BITS=32
6842      VAR_CPU_ENDIAN=little
6843      ;;
6844    powerpc)
6845      VAR_CPU=ppc
6846      VAR_CPU_ARCH=ppc
6847      VAR_CPU_BITS=32
6848      VAR_CPU_ENDIAN=big
6849       ;;
6850    powerpc64)
6851      VAR_CPU=ppc64
6852      VAR_CPU_ARCH=ppc
6853      VAR_CPU_BITS=64
6854      VAR_CPU_ENDIAN=big
6855       ;;
6856    sparc)
6857      VAR_CPU=sparc
6858      VAR_CPU_ARCH=sparc
6859      VAR_CPU_BITS=32
6860      VAR_CPU_ENDIAN=big
6861       ;;
6862    sparcv9)
6863      VAR_CPU=sparcv9
6864      VAR_CPU_ARCH=sparc
6865      VAR_CPU_BITS=64
6866      VAR_CPU_ENDIAN=big
6867       ;;
6868    *)
6869      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6870      ;;
6871  esac
6872
6873    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6874    OPENJDK_TARGET_OS="$VAR_OS"
6875    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6876    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6877    OPENJDK_TARGET_CPU="$VAR_CPU"
6878    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6879    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6880    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6881
6882
6883
6884
6885
6886
6887
6888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6889$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6891$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6892
6893
6894
6895# Check whether --with-target-bits was given.
6896if test "${with_target_bits+set}" = set; then :
6897  withval=$with_target_bits;
6898fi
6899
6900
6901  # We have three types of compiles:
6902  # native  == normal compilation, target system == build system
6903  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6904  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6905  #
6906  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6907    # We're doing a proper cross-compilation
6908    COMPILE_TYPE="cross"
6909  else
6910    COMPILE_TYPE="native"
6911  fi
6912
6913  if test "x$with_target_bits" != x; then
6914    if test "x$COMPILE_TYPE" = "xcross"; then
6915      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6916    fi
6917
6918    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6919      # A reduced build is requested
6920      COMPILE_TYPE="reduced"
6921      OPENJDK_TARGET_CPU_BITS=32
6922      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6923        OPENJDK_TARGET_CPU=x86
6924      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6925        OPENJDK_TARGET_CPU=sparc
6926      else
6927        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6928      fi
6929    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6930      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
6931    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6932      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6933$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6934    else
6935      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6936    fi
6937  fi
6938
6939
6940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6941$as_echo_n "checking compilation type... " >&6; }
6942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6943$as_echo "$COMPILE_TYPE" >&6; }
6944
6945
6946    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6947       REQUIRED_OS_NAME=SunOS
6948       REQUIRED_OS_VERSION=5.10
6949    fi
6950    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6951       REQUIRED_OS_NAME=Linux
6952       REQUIRED_OS_VERSION=2.6
6953    fi
6954    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6955        REQUIRED_OS_NAME=Windows
6956        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6957            REQUIRED_OS_VERSION=5.2
6958        else
6959            REQUIRED_OS_VERSION=5.1
6960        fi
6961    fi
6962    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6963        REQUIRED_OS_NAME=Darwin
6964        REQUIRED_OS_VERSION=11.2
6965    fi
6966
6967
6968
6969
6970
6971    # Also store the legacy naming of the cpu.
6972    # Ie i586 and amd64 instead of x86 and x86_64
6973    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6974    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6975      OPENJDK_TARGET_CPU_LEGACY="i586"
6976    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6977      # On all platforms except MacOSX replace x86_64 with amd64.
6978      OPENJDK_TARGET_CPU_LEGACY="amd64"
6979    fi
6980
6981
6982    # And the second legacy naming of the cpu.
6983    # Ie i386 and amd64 instead of x86 and x86_64.
6984    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6985    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6986      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6987    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6988      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6989    fi
6990
6991
6992    # This is the name of the cpu (but using i386 and amd64 instead of
6993    # x86 and x86_64, respectively), preceeded by a /, to be used when
6994    # locating libraries. On macosx, it's empty, though.
6995    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6996    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6997        OPENJDK_TARGET_CPU_LIBDIR=""
6998    fi
6999
7000
7001    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7002    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7003    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7004    OPENJDK_TARGET_CPU_ISADIR=""
7005    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7006      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7007          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7008      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7009          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7010      fi
7011    fi
7012
7013
7014    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7015    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7016    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7017      # On linux only, we replace x86 with i386.
7018      OPENJDK_TARGET_CPU_OSARCH="i386"
7019    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7020      # On all platforms except macosx, we replace x86_64 with amd64.
7021      OPENJDK_TARGET_CPU_OSARCH="amd64"
7022    fi
7023
7024
7025    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7026    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7027      OPENJDK_TARGET_CPU_JLI="i386"
7028    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7029      # On all platforms except macosx, we replace x86_64 with amd64.
7030      OPENJDK_TARGET_CPU_JLI="amd64"
7031    fi
7032    # Now setup the -D flags for building libjli.
7033    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7034    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7035      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7036        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7037      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7038        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7039      fi
7040    fi
7041
7042
7043    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7044    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7045        OPENJDK_TARGET_OS_API_DIR="solaris"
7046    fi
7047    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7048        OPENJDK_TARGET_OS_API_DIR="windows"
7049    fi
7050
7051
7052    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7053        A_LP64="LP64:="
7054        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7055        # unpack200.exe
7056        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7057            ADD_LP64="-D_LP64=1"
7058        fi
7059    fi
7060    LP64=$A_LP64
7061
7062
7063    if test "x$COMPILE_TYPE" = "xcross"; then
7064      # FIXME: ... or should this include reduced builds..?
7065      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7066    else
7067      DEFINE_CROSS_COMPILE_ARCH=""
7068    fi
7069
7070
7071
7072
7073# Continue setting up basic stuff. Most remaining code require fundamental tools.
7074
7075# Locate the directory of this script.
7076SCRIPT="$0"
7077
7078    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7079        # Follow a chain of symbolic links. Use readlink
7080        # where it exists, else fall back to horribly
7081        # complicated shell code.
7082        if test "x$READLINK_TESTED" != yes; then
7083            # On MacOSX there is a readlink tool with a different
7084            # purpose than the GNU readlink tool. Check the found readlink.
7085            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7086            if test "x$ISGNU" = x; then
7087                 # A readlink that we do not know how to use.
7088                 # Are there other non-GNU readlinks out there?
7089                 READLINK_TESTED=yes
7090                 READLINK=
7091            fi
7092        fi
7093
7094        if test "x$READLINK" != x; then
7095            SCRIPT=`$READLINK -f $SCRIPT`
7096        else
7097            # Save the current directory for restoring afterwards
7098            STARTDIR=$PWD
7099            COUNTER=0
7100            sym_link_dir=`$DIRNAME $SCRIPT`
7101            sym_link_file=`$BASENAME $SCRIPT`
7102            # Use the system pwd and not the shell builtin to resolve directory symlinks
7103            cd $sym_link_dir
7104            cd `$THEPWDCMD`
7105            sym_link_dir=`$THEPWDCMD`
7106            # Resolve file symlinks
7107            while test $COUNTER -lt 20; do
7108                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7109                if test "x$ISLINK" == x; then
7110                    # This is not a symbolic link! We are done!
7111                    break
7112                fi
7113                # Again resolve directory symlinks since the target of the just found
7114                # link could be in a different directory
7115                cd `$DIRNAME $ISLINK`
7116                sym_link_dir=`$THEPWDCMD`
7117                sym_link_file=`$BASENAME $ISLINK`
7118                let COUNTER=COUNTER+1
7119            done
7120            cd $STARTDIR
7121            SCRIPT=$sym_link_dir/$sym_link_file
7122        fi
7123    fi
7124
7125AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7126
7127# Where is the source? It is located two levels above the configure script.
7128CURDIR="$PWD"
7129cd "$AUTOCONF_DIR/../.."
7130SRC_ROOT="`$THEPWDCMD`"
7131
7132if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7133  PATH_SEP=";"
7134
7135  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7136  if test $SRC_ROOT_LENGTH -gt 100; then
7137      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7138  fi
7139
7140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7142$as_echo_n "checking cygwin release... " >&6; }
7143    CYGWIN_VERSION=`$UNAME -r`
7144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7145$as_echo "$CYGWIN_VERSION" >&6; }
7146    WINDOWS_ENV_VENDOR='cygwin'
7147    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7148
7149    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7150    if test "x$CYGWIN_VERSION_OK" = x; then
7151      { $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
7152$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;}
7153      as_fn_error $? "Cannot continue" "$LINENO" 5
7154    fi
7155    if test "x$CYGPATH" = x; then
7156        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7157    fi
7158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7159$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7160    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7161    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7162    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7163    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7165$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7166    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7167    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7168    if test "x$test_cygdrive_prefix" = x; then
7169        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7170    fi
7171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7173$as_echo_n "checking msys release... " >&6; }
7174    MSYS_VERSION=`$UNAME -r`
7175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7176$as_echo "$MSYS_VERSION" >&6; }
7177
7178    WINDOWS_ENV_VENDOR='msys'
7179    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7180
7181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7182$as_echo_n "checking msys 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    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7185
7186  windows_path="$MSYS_ROOT_PATH"
7187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7188    unix_path=`$CYGPATH -u "$windows_path"`
7189    MSYS_ROOT_PATH="$unix_path"
7190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7192    MSYS_ROOT_PATH="$unix_path"
7193  fi
7194
7195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7196$as_echo "$MSYS_ROOT_PATH" >&6; }
7197    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7198  else
7199    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7200  fi
7201
7202  # Test if windows or unix (cygwin/msys) find is first in path.
7203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7204$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7205  FIND_BINARY_OUTPUT=`find --version 2>&1`
7206  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7208$as_echo "unix style" >&6; }
7209  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7211$as_echo "Windows" >&6; }
7212    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7213$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7214    { $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
7215$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7216    as_fn_error $? "Cannot continue" "$LINENO" 5
7217  else
7218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7219$as_echo "unknown" >&6; }
7220    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7221$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7222  fi
7223
7224else
7225  PATH_SEP=":"
7226fi
7227
7228
7229
7230cd "$CURDIR"
7231
7232
7233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7234
7235  # Input might be given as Windows format, start by converting to
7236  # unix format.
7237  path="$SRC_ROOT"
7238  new_path=`$CYGPATH -u "$path"`
7239
7240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7243  # "foo.exe" is OK but "foo" is an error.
7244  #
7245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7246  # It is also a way to make sure we got the proper file name for the real test later on.
7247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7248  if test "x$test_shortpath" = x; then
7249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7250$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7251    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7252  fi
7253
7254  # Call helper function which possibly converts this using DOS-style short mode.
7255  # If so, the updated path is stored in $new_path.
7256
7257  input_path="$new_path"
7258  # Check if we need to convert this using DOS-style short mode. If the path
7259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7260  # take no chances and rewrite it.
7261  # Note: m4 eats our [], so we need to use [ and ] instead.
7262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7263  if test "x$has_forbidden_chars" != x; then
7264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7268      # Going to short mode and back again did indeed matter. Since short mode is
7269      # case insensitive, let's make it lowercase to improve readability.
7270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7271      # Now convert it back to Unix-stile (cygpath)
7272      input_path=`$CYGPATH -u "$shortmode_path"`
7273      new_path="$input_path"
7274    fi
7275  fi
7276
7277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7278  if test "x$test_cygdrive_prefix" = x; then
7279    # As a simple fix, exclude /usr/bin since it's not a real path.
7280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7282      # a path prefixed by /cygdrive for fixpath to work.
7283      new_path="$CYGWIN_ROOT_PATH$input_path"
7284    fi
7285  fi
7286
7287
7288  if test "x$path" != "x$new_path"; then
7289    SRC_ROOT="$new_path"
7290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7291$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7292  fi
7293
7294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7295
7296  path="$SRC_ROOT"
7297  has_colon=`$ECHO $path | $GREP ^.:`
7298  new_path="$path"
7299  if test "x$has_colon" = x; then
7300    # Not in mixed or Windows style, start by that.
7301    new_path=`cmd //c echo $path`
7302  fi
7303
7304
7305  input_path="$new_path"
7306  # Check if we need to convert this using DOS-style short mode. If the path
7307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7308  # take no chances and rewrite it.
7309  # Note: m4 eats our [], so we need to use [ and ] instead.
7310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7311  if test "x$has_forbidden_chars" != x; then
7312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7314  fi
7315
7316
7317  windows_path="$new_path"
7318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7319    unix_path=`$CYGPATH -u "$windows_path"`
7320    new_path="$unix_path"
7321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7323    new_path="$unix_path"
7324  fi
7325
7326  if test "x$path" != "x$new_path"; then
7327    SRC_ROOT="$new_path"
7328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7329$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7330  fi
7331
7332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7334
7335  else
7336    # We're on a posix platform. Hooray! :)
7337    path="$SRC_ROOT"
7338
7339    if test ! -f "$path" && test ! -d "$path"; then
7340      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7341    fi
7342
7343    has_space=`$ECHO "$path" | $GREP " "`
7344    if test "x$has_space" != x; then
7345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7346$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7347      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7348    fi
7349  fi
7350
7351
7352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7353
7354  # Input might be given as Windows format, start by converting to
7355  # unix format.
7356  path="$CURDIR"
7357  new_path=`$CYGPATH -u "$path"`
7358
7359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7362  # "foo.exe" is OK but "foo" is an error.
7363  #
7364  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7365  # It is also a way to make sure we got the proper file name for the real test later on.
7366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7367  if test "x$test_shortpath" = x; then
7368    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7369$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7370    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7371  fi
7372
7373  # Call helper function which possibly converts this using DOS-style short mode.
7374  # If so, the updated path is stored in $new_path.
7375
7376  input_path="$new_path"
7377  # Check if we need to convert this using DOS-style short mode. If the path
7378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7379  # take no chances and rewrite it.
7380  # Note: m4 eats our [], so we need to use [ and ] instead.
7381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7382  if test "x$has_forbidden_chars" != x; then
7383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7384    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7385    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7386    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7387      # Going to short mode and back again did indeed matter. Since short mode is
7388      # case insensitive, let's make it lowercase to improve readability.
7389      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7390      # Now convert it back to Unix-stile (cygpath)
7391      input_path=`$CYGPATH -u "$shortmode_path"`
7392      new_path="$input_path"
7393    fi
7394  fi
7395
7396  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7397  if test "x$test_cygdrive_prefix" = x; then
7398    # As a simple fix, exclude /usr/bin since it's not a real path.
7399    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7400      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7401      # a path prefixed by /cygdrive for fixpath to work.
7402      new_path="$CYGWIN_ROOT_PATH$input_path"
7403    fi
7404  fi
7405
7406
7407  if test "x$path" != "x$new_path"; then
7408    CURDIR="$new_path"
7409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7410$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7411  fi
7412
7413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7414
7415  path="$CURDIR"
7416  has_colon=`$ECHO $path | $GREP ^.:`
7417  new_path="$path"
7418  if test "x$has_colon" = x; then
7419    # Not in mixed or Windows style, start by that.
7420    new_path=`cmd //c echo $path`
7421  fi
7422
7423
7424  input_path="$new_path"
7425  # Check if we need to convert this using DOS-style short mode. If the path
7426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7427  # take no chances and rewrite it.
7428  # Note: m4 eats our [], so we need to use [ and ] instead.
7429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7430  if test "x$has_forbidden_chars" != x; then
7431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7433  fi
7434
7435
7436  windows_path="$new_path"
7437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7438    unix_path=`$CYGPATH -u "$windows_path"`
7439    new_path="$unix_path"
7440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7442    new_path="$unix_path"
7443  fi
7444
7445  if test "x$path" != "x$new_path"; then
7446    CURDIR="$new_path"
7447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7448$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7449  fi
7450
7451  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7452  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7453
7454  else
7455    # We're on a posix platform. Hooray! :)
7456    path="$CURDIR"
7457
7458    if test ! -f "$path" && test ! -d "$path"; then
7459      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7460    fi
7461
7462    has_space=`$ECHO "$path" | $GREP " "`
7463    if test "x$has_space" != x; then
7464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7465$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7466      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7467    fi
7468  fi
7469
7470
7471if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7472    # Add extra search paths on solaris for utilities like ar and as etc...
7473    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7474fi
7475
7476# You can force the sys-root if the sys-root encoded into the cross compiler tools
7477# is not correct.
7478
7479# Check whether --with-sys-root was given.
7480if test "${with_sys_root+set}" = set; then :
7481  withval=$with_sys_root;
7482fi
7483
7484
7485if test "x$with_sys_root" != x; then
7486  SYS_ROOT=$with_sys_root
7487else
7488  SYS_ROOT=/
7489fi
7490
7491
7492
7493# Check whether --with-tools-dir was given.
7494if test "${with_tools_dir+set}" = set; then :
7495  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7496fi
7497
7498
7499
7500# Check whether --with-devkit was given.
7501if test "${with_devkit+set}" = set; then :
7502  withval=$with_devkit;
7503    if test "x$with_sys_root" != x; then
7504      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7505    fi
7506    if test "x$with_tools_dir" != x; then
7507      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7508    fi
7509    TOOLS_DIR=$with_devkit/bin
7510    SYS_ROOT=$with_devkit/$host_alias/libc
7511
7512fi
7513
7514
7515
7516
7517# Setup default logging of stdout and stderr to build.log in the output root.
7518BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7519BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7520BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7521
7522
7523
7524
7525
7526# Check if it's a pure open build or if custom sources are to be used.
7527
7528  # Check whether --enable-openjdk-only was given.
7529if test "${enable_openjdk_only+set}" = set; then :
7530  enableval=$enable_openjdk_only;
7531else
7532  enable_openjdk_only="no"
7533fi
7534
7535
7536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7537$as_echo_n "checking for presence of closed sources... " >&6; }
7538  if test -d "$SRC_ROOT/jdk/src/closed"; then
7539    CLOSED_SOURCE_PRESENT=yes
7540  else
7541    CLOSED_SOURCE_PRESENT=no
7542  fi
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7544$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7545
7546  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7547$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7548  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7550$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7551
7552  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7553    OPENJDK=true
7554    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7555      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7556$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7557    fi
7558  else
7559    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7560      OPENJDK=true
7561    else
7562      OPENJDK=false
7563    fi
7564  fi
7565
7566  if test "x$OPENJDK" = "xtrue"; then
7567    SET_OPENJDK="OPENJDK=true"
7568  fi
7569
7570
7571
7572
7573# These are needed to be able to create a configuration name (and thus the output directory)
7574
7575###############################################################################
7576#
7577# Check which variant of the JDK that we want to build.
7578# Currently we have:
7579#    normal:   standard edition
7580# but the custom make system may add other variants
7581#
7582# Effectively the JDK variant gives a name to a specific set of
7583# modules to compile into the JDK. In the future, these modules
7584# might even be Jigsaw modules.
7585#
7586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7587$as_echo_n "checking which variant of the JDK to build... " >&6; }
7588
7589# Check whether --with-jdk-variant was given.
7590if test "${with_jdk_variant+set}" = set; then :
7591  withval=$with_jdk_variant;
7592fi
7593
7594
7595if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7596    JDK_VARIANT="normal"
7597else
7598    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7599fi
7600
7601
7602
7603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7604$as_echo "$JDK_VARIANT" >&6; }
7605
7606
7607
7608###############################################################################
7609#
7610# Check which variants of the JVM that we want to build.
7611# Currently we have:
7612#    server: normal interpreter and a tiered C1/C2 compiler
7613#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7614#    minimal1: reduced form of client with optional VM services and features stripped out
7615#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7616#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7617#    zero: no machine code interpreter, no compiler
7618#    zeroshark: zero interpreter and shark/llvm compiler backend
7619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7620$as_echo_n "checking which variants of the JVM to build... " >&6; }
7621
7622# Check whether --with-jvm-variants was given.
7623if test "${with_jvm_variants+set}" = set; then :
7624  withval=$with_jvm_variants;
7625fi
7626
7627
7628if test "x$with_jvm_variants" = x; then
7629     with_jvm_variants="server"
7630fi
7631
7632JVM_VARIANTS=",$with_jvm_variants,"
7633TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7634
7635if test "x$TEST_VARIANTS" != "x,"; then
7636   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7637fi
7638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7639$as_echo "$with_jvm_variants" >&6; }
7640
7641JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7642JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7643JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7644JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7645JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7646JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7647
7648if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7649    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7650        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7651    fi
7652fi
7653if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7654    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7655        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7656    fi
7657fi
7658if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7659    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7660        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7661    fi
7662fi
7663
7664# Replace the commas with AND for use in the build directory name.
7665ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7666COUNT_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/'`
7667if test "x$COUNT_VARIANTS" != "x,1"; then
7668    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7669else
7670    BUILDING_MULTIPLE_JVM_VARIANTS=no
7671fi
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7682   MACOSX_UNIVERSAL="true"
7683fi
7684
7685
7686
7687
7688
7689###############################################################################
7690#
7691# Set the debug level
7692#    release: no debug information, all optimizations, no asserts.
7693#    fastdebug: debug information (-g), all optimizations, all asserts
7694#    slowdebug: debug information (-g), no optimizations, all asserts
7695#
7696DEBUG_LEVEL="release"
7697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7698$as_echo_n "checking which debug level to use... " >&6; }
7699# Check whether --enable-debug was given.
7700if test "${enable_debug+set}" = set; then :
7701  enableval=$enable_debug;
7702        ENABLE_DEBUG="${enableval}"
7703        DEBUG_LEVEL="fastdebug"
7704
7705else
7706  ENABLE_DEBUG="no"
7707fi
7708
7709
7710
7711# Check whether --with-debug-level was given.
7712if test "${with_debug_level+set}" = set; then :
7713  withval=$with_debug_level;
7714        DEBUG_LEVEL="${withval}"
7715        if test "x$ENABLE_DEBUG" = xyes; then
7716			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7717        fi
7718
7719fi
7720
7721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7722$as_echo "$DEBUG_LEVEL" >&6; }
7723
7724if test "x$DEBUG_LEVEL" != xrelease && \
7725   test "x$DEBUG_LEVEL" != xfastdebug && \
7726   test "x$DEBUG_LEVEL" != xslowdebug; then
7727   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7728fi
7729
7730
7731###############################################################################
7732#
7733# Setup legacy vars/targets and new vars to deal with different debug levels.
7734#
7735
7736case $DEBUG_LEVEL in
7737      release )
7738          VARIANT="OPT"
7739          FASTDEBUG="false"
7740          DEBUG_CLASSFILES="false"
7741          BUILD_VARIANT_RELEASE=""
7742          HOTSPOT_DEBUG_LEVEL="product"
7743          HOTSPOT_EXPORT="product"
7744           ;;
7745      fastdebug )
7746          VARIANT="DBG"
7747          FASTDEBUG="true"
7748          DEBUG_CLASSFILES="true"
7749          BUILD_VARIANT_RELEASE="-fastdebug"
7750          HOTSPOT_DEBUG_LEVEL="fastdebug"
7751          HOTSPOT_EXPORT="fastdebug"
7752           ;;
7753      slowdebug )
7754          VARIANT="DBG"
7755          FASTDEBUG="false"
7756          DEBUG_CLASSFILES="true"
7757          BUILD_VARIANT_RELEASE="-debug"
7758          HOTSPOT_DEBUG_LEVEL="jvmg"
7759          HOTSPOT_EXPORT="debug"
7760           ;;
7761esac
7762
7763#####
7764# Generate the legacy makefile targets for hotspot.
7765# The hotspot api for selecting the build artifacts, really, needs to be improved.
7766# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7767# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7768# But until then ...
7769HOTSPOT_TARGET=""
7770
7771if test "x$JVM_VARIANT_SERVER" = xtrue; then
7772    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7773fi
7774
7775if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7776    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7777fi
7778
7779if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7780    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7781fi
7782
7783if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7784    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7785fi
7786
7787if test "x$JVM_VARIANT_ZERO" = xtrue; then
7788    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7789fi
7790
7791if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7792    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7793fi
7794
7795HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7796
7797# On Macosx universal binaries are produced, but they only contain
7798# 64 bit intel. This invalidates control of which jvms are built
7799# from configure, but only server is valid anyway. Fix this
7800# when hotspot makefiles are rewritten.
7801if test "x$MACOSX_UNIVERSAL" = xtrue; then
7802    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7803fi
7804
7805#####
7806
7807
7808
7809
7810
7811
7812
7813
7814# With basic setup done, call the custom early hook.
7815
7816
7817# To properly create a configuration name, we need to have the OpenJDK target
7818# and options (variants and debug level) parsed.
7819
7820
7821
7822# Check whether --with-conf-name was given.
7823if test "${with_conf_name+set}" = set; then :
7824  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7825fi
7826
7827
7828# Test from where we are running configure, in or outside of src root.
7829# To enable comparison of directories, CURDIR needs to be symlink free
7830# just like SRC_ROOT already is
7831NOSYM_CURDIR="$CURDIR"
7832
7833    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7834        # Follow a chain of symbolic links. Use readlink
7835        # where it exists, else fall back to horribly
7836        # complicated shell code.
7837        if test "x$READLINK_TESTED" != yes; then
7838            # On MacOSX there is a readlink tool with a different
7839            # purpose than the GNU readlink tool. Check the found readlink.
7840            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7841            if test "x$ISGNU" = x; then
7842                 # A readlink that we do not know how to use.
7843                 # Are there other non-GNU readlinks out there?
7844                 READLINK_TESTED=yes
7845                 READLINK=
7846            fi
7847        fi
7848
7849        if test "x$READLINK" != x; then
7850            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7851        else
7852            # Save the current directory for restoring afterwards
7853            STARTDIR=$PWD
7854            COUNTER=0
7855            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7856            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7857            # Use the system pwd and not the shell builtin to resolve directory symlinks
7858            cd $sym_link_dir
7859            cd `$THEPWDCMD`
7860            sym_link_dir=`$THEPWDCMD`
7861            # Resolve file symlinks
7862            while test $COUNTER -lt 20; do
7863                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7864                if test "x$ISLINK" == x; then
7865                    # This is not a symbolic link! We are done!
7866                    break
7867                fi
7868                # Again resolve directory symlinks since the target of the just found
7869                # link could be in a different directory
7870                cd `$DIRNAME $ISLINK`
7871                sym_link_dir=`$THEPWDCMD`
7872                sym_link_file=`$BASENAME $ISLINK`
7873                let COUNTER=COUNTER+1
7874            done
7875            cd $STARTDIR
7876            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7877        fi
7878    fi
7879
7880if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7881        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7882        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7883    # We are running configure from the src root.
7884    # Create a default ./build/target-variant-debuglevel output root.
7885    if test "x${CONF_NAME}" = x; then
7886        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7887    fi
7888    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7889    $MKDIR -p "$OUTPUT_ROOT"
7890    if test ! -d "$OUTPUT_ROOT"; then
7891        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7892    fi
7893else
7894    # We are running configure from outside of the src dir.
7895    # Then use the current directory as output dir!
7896    # If configuration is situated in normal build directory, just use the build
7897    # directory name as configuration name, otherwise use the complete path.
7898    if test "x${CONF_NAME}" = x; then
7899        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7900    fi
7901    OUTPUT_ROOT="$CURDIR"
7902
7903    # WARNING: This might be a bad thing to do. You need to be sure you want to
7904    # have a configuration in this directory. Do some sanity checks!
7905
7906    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7907      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7908      # other files
7909      files_present=`$LS $OUTPUT_ROOT`
7910      # Configure has already touched config.log and confdefs.h in the current dir when this check
7911      # is performed.
7912      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7913                                             | $TR -d '\n'`
7914      if test "x$filtered_files" != x; then
7915        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7916$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7917        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7918$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7919        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7920$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7921        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7922$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7923        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7924$as_echo "$as_me: seriously mess up just about everything." >&6;}
7925        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7926$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7927        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7928$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7929        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7930      fi
7931    fi
7932fi
7933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7934$as_echo_n "checking what configuration name to use... " >&6; }
7935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7936$as_echo "$CONF_NAME" >&6; }
7937
7938
7939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7940
7941  # Input might be given as Windows format, start by converting to
7942  # unix format.
7943  path="$OUTPUT_ROOT"
7944  new_path=`$CYGPATH -u "$path"`
7945
7946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7949  # "foo.exe" is OK but "foo" is an error.
7950  #
7951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7952  # It is also a way to make sure we got the proper file name for the real test later on.
7953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7954  if test "x$test_shortpath" = x; then
7955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7956$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7957    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7958  fi
7959
7960  # Call helper function which possibly converts this using DOS-style short mode.
7961  # If so, the updated path is stored in $new_path.
7962
7963  input_path="$new_path"
7964  # Check if we need to convert this using DOS-style short mode. If the path
7965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7966  # take no chances and rewrite it.
7967  # Note: m4 eats our [], so we need to use [ and ] instead.
7968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7969  if test "x$has_forbidden_chars" != x; then
7970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7974      # Going to short mode and back again did indeed matter. Since short mode is
7975      # case insensitive, let's make it lowercase to improve readability.
7976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7977      # Now convert it back to Unix-stile (cygpath)
7978      input_path=`$CYGPATH -u "$shortmode_path"`
7979      new_path="$input_path"
7980    fi
7981  fi
7982
7983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7984  if test "x$test_cygdrive_prefix" = x; then
7985    # As a simple fix, exclude /usr/bin since it's not a real path.
7986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7988      # a path prefixed by /cygdrive for fixpath to work.
7989      new_path="$CYGWIN_ROOT_PATH$input_path"
7990    fi
7991  fi
7992
7993
7994  if test "x$path" != "x$new_path"; then
7995    OUTPUT_ROOT="$new_path"
7996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7997$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7998  fi
7999
8000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8001
8002  path="$OUTPUT_ROOT"
8003  has_colon=`$ECHO $path | $GREP ^.:`
8004  new_path="$path"
8005  if test "x$has_colon" = x; then
8006    # Not in mixed or Windows style, start by that.
8007    new_path=`cmd //c echo $path`
8008  fi
8009
8010
8011  input_path="$new_path"
8012  # Check if we need to convert this using DOS-style short mode. If the path
8013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8014  # take no chances and rewrite it.
8015  # Note: m4 eats our [], so we need to use [ and ] instead.
8016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8017  if test "x$has_forbidden_chars" != x; then
8018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8020  fi
8021
8022
8023  windows_path="$new_path"
8024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8025    unix_path=`$CYGPATH -u "$windows_path"`
8026    new_path="$unix_path"
8027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8029    new_path="$unix_path"
8030  fi
8031
8032  if test "x$path" != "x$new_path"; then
8033    OUTPUT_ROOT="$new_path"
8034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8035$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8036  fi
8037
8038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8040
8041  else
8042    # We're on a posix platform. Hooray! :)
8043    path="$OUTPUT_ROOT"
8044
8045    if test ! -f "$path" && test ! -d "$path"; then
8046      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8047    fi
8048
8049    has_space=`$ECHO "$path" | $GREP " "`
8050    if test "x$has_space" != x; then
8051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8052$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8053      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8054    fi
8055  fi
8056
8057
8058SPEC=$OUTPUT_ROOT/spec.gmk
8059
8060CONF_NAME=$CONF_NAME
8061
8062OUTPUT_ROOT=$OUTPUT_ROOT
8063
8064
8065# Most of the probed defines are put into config.h
8066ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8067
8068# The spec.gmk file contains all variables for the make system.
8069ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8070
8071# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8072ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8073
8074# The bootcycle-spec.gmk file contains support for boot cycle builds.
8075ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8076
8077# The compare.sh is used to compare the build output to other builds.
8078ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8079
8080# Spec.sh is currently used by compare-objects.sh
8081ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8082
8083# The generated Makefile knows where the spec.gmk is and where the source is.
8084# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8085# which will look for generated configurations
8086ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8087
8088
8089# Save the arguments given to us
8090echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8091
8092
8093# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8094
8095    for ac_prog in apt-get yum port pkgutil pkgadd
8096do
8097  # Extract the first word of "$ac_prog", so it can be a program name with args.
8098set dummy $ac_prog; ac_word=$2
8099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8100$as_echo_n "checking for $ac_word... " >&6; }
8101if ${ac_cv_prog_PKGHANDLER+:} false; then :
8102  $as_echo_n "(cached) " >&6
8103else
8104  if test -n "$PKGHANDLER"; then
8105  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8106else
8107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8108for as_dir in $PATH
8109do
8110  IFS=$as_save_IFS
8111  test -z "$as_dir" && as_dir=.
8112    for ac_exec_ext in '' $ac_executable_extensions; do
8113  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8114    ac_cv_prog_PKGHANDLER="$ac_prog"
8115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8116    break 2
8117  fi
8118done
8119  done
8120IFS=$as_save_IFS
8121
8122fi
8123fi
8124PKGHANDLER=$ac_cv_prog_PKGHANDLER
8125if test -n "$PKGHANDLER"; then
8126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8127$as_echo "$PKGHANDLER" >&6; }
8128else
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8130$as_echo "no" >&6; }
8131fi
8132
8133
8134  test -n "$PKGHANDLER" && break
8135done
8136
8137
8138
8139# Setup tools that requires more complex handling, or that is not needed by the configure script.
8140
8141
8142  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8143  if test "x$MAKE" != x; then
8144    # User has supplied a make, test it.
8145    if test ! -f "$MAKE"; then
8146      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8147    fi
8148
8149  MAKE_CANDIDATE=""$MAKE""
8150  DESCRIPTION="user supplied MAKE=$MAKE"
8151  if test "x$MAKE_CANDIDATE" != x; then
8152    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8153$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8154    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8155    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8156    if test "x$IS_GNU_MAKE" = x; then
8157      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8158$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8159    else
8160      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8161      if test "x$IS_MODERN_MAKE" = x; then
8162        { $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
8163$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;}
8164      else
8165        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8166          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8167            MAKE_EXPECTED_ENV='cygwin'
8168          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8169            MAKE_EXPECTED_ENV='msys'
8170          else
8171            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8172          fi
8173          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8174          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8175        else
8176          # Not relevant for non-Windows
8177          IS_MAKE_CORRECT_ENV=true
8178        fi
8179        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8180          { $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
8181$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;}
8182        else
8183          FOUND_MAKE=$MAKE_CANDIDATE
8184
8185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8186
8187  # First separate the path from the arguments. This will split at the first
8188  # space.
8189  complete="$FOUND_MAKE"
8190  path="${complete%% *}"
8191  tmp="$complete EOL"
8192  arguments="${tmp#* }"
8193
8194  # Input might be given as Windows format, start by converting to
8195  # unix format.
8196  new_path=`$CYGPATH -u "$path"`
8197
8198  # Now try to locate executable using which
8199  new_path=`$WHICH "$new_path" 2> /dev/null`
8200  # bat and cmd files are not always considered executable in cygwin causing which
8201  # to not find them
8202  if test "x$new_path" = x \
8203           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8204           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8205    new_path=`$CYGPATH -u "$path"`
8206  fi
8207  if test "x$new_path" = x; then
8208    # Oops. Which didn't find the executable.
8209    # The splitting of arguments from the executable at a space might have been incorrect,
8210    # since paths with space are more likely in Windows. Give it another try with the whole
8211    # argument.
8212    path="$complete"
8213    arguments="EOL"
8214    new_path=`$CYGPATH -u "$path"`
8215    new_path=`$WHICH "$new_path" 2> /dev/null`
8216    # bat and cmd files are not always considered executable in cygwin causing which
8217    # to not find them
8218    if test "x$new_path" = x \
8219             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8220             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8221      new_path=`$CYGPATH -u "$path"`
8222    fi
8223    if test "x$new_path" = x; then
8224      # It's still not found. Now this is an unrecoverable error.
8225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8226$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8227      has_space=`$ECHO "$complete" | $GREP " "`
8228      if test "x$has_space" != x; then
8229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8231      fi
8232      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8233    fi
8234  fi
8235
8236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8239  # "foo.exe" is OK but "foo" is an error.
8240  #
8241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8242  # It is also a way to make sure we got the proper file name for the real test later on.
8243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8244  if test "x$test_shortpath" = x; then
8245    # Short path failed, file does not exist as specified.
8246    # Try adding .exe or .cmd
8247    if test -f "${new_path}.exe"; then
8248       input_to_shortpath="${new_path}.exe"
8249    elif test -f "${new_path}.cmd"; then
8250       input_to_shortpath="${new_path}.cmd"
8251    else
8252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8253$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8254      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8255$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8256      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8257    fi
8258  else
8259    input_to_shortpath="$new_path"
8260  fi
8261
8262  # Call helper function which possibly converts this using DOS-style short mode.
8263  # If so, the updated path is stored in $new_path.
8264  new_path="$input_to_shortpath"
8265
8266  input_path="$input_to_shortpath"
8267  # Check if we need to convert this using DOS-style short mode. If the path
8268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8269  # take no chances and rewrite it.
8270  # Note: m4 eats our [], so we need to use [ and ] instead.
8271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8272  if test "x$has_forbidden_chars" != x; then
8273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8277      # Going to short mode and back again did indeed matter. Since short mode is
8278      # case insensitive, let's make it lowercase to improve readability.
8279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8280      # Now convert it back to Unix-stile (cygpath)
8281      input_path=`$CYGPATH -u "$shortmode_path"`
8282      new_path="$input_path"
8283    fi
8284  fi
8285
8286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8287  if test "x$test_cygdrive_prefix" = x; then
8288    # As a simple fix, exclude /usr/bin since it's not a real path.
8289    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8291      # a path prefixed by /cygdrive for fixpath to work.
8292      new_path="$CYGWIN_ROOT_PATH$input_path"
8293    fi
8294  fi
8295
8296  # remove trailing .exe if any
8297  new_path="${new_path/%.exe/}"
8298
8299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8300
8301  # First separate the path from the arguments. This will split at the first
8302  # space.
8303  complete="$FOUND_MAKE"
8304  path="${complete%% *}"
8305  tmp="$complete EOL"
8306  arguments="${tmp#* }"
8307
8308  # Input might be given as Windows format, start by converting to
8309  # unix format.
8310  new_path="$path"
8311
8312  windows_path="$new_path"
8313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8314    unix_path=`$CYGPATH -u "$windows_path"`
8315    new_path="$unix_path"
8316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8318    new_path="$unix_path"
8319  fi
8320
8321
8322  # Now try to locate executable using which
8323  new_path=`$WHICH "$new_path" 2> /dev/null`
8324
8325  if test "x$new_path" = x; then
8326    # Oops. Which didn't find the executable.
8327    # The splitting of arguments from the executable at a space might have been incorrect,
8328    # since paths with space are more likely in Windows. Give it another try with the whole
8329    # argument.
8330    path="$complete"
8331    arguments="EOL"
8332    new_path="$path"
8333
8334  windows_path="$new_path"
8335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8336    unix_path=`$CYGPATH -u "$windows_path"`
8337    new_path="$unix_path"
8338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8340    new_path="$unix_path"
8341  fi
8342
8343
8344    new_path=`$WHICH "$new_path" 2> /dev/null`
8345
8346    if test "x$new_path" = x; then
8347      # It's still not found. Now this is an unrecoverable error.
8348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8349$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8350      has_space=`$ECHO "$complete" | $GREP " "`
8351      if test "x$has_space" != x; then
8352        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8353$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8354      fi
8355      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8356    fi
8357  fi
8358
8359  # Now new_path has a complete unix path to the binary
8360  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8361    # Keep paths in /bin as-is, but remove trailing .exe if any
8362    new_path="${new_path/%.exe/}"
8363    # Do not save /bin paths to all_fixpath_prefixes!
8364  else
8365    # Not in mixed or Windows style, start by that.
8366    new_path=`cmd //c echo $new_path`
8367
8368  input_path="$new_path"
8369  # Check if we need to convert this using DOS-style short mode. If the path
8370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8371  # take no chances and rewrite it.
8372  # Note: m4 eats our [], so we need to use [ and ] instead.
8373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8374  if test "x$has_forbidden_chars" != x; then
8375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8377  fi
8378
8379    # Output is in $new_path
8380
8381  windows_path="$new_path"
8382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8383    unix_path=`$CYGPATH -u "$windows_path"`
8384    new_path="$unix_path"
8385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8387    new_path="$unix_path"
8388  fi
8389
8390    # remove trailing .exe if any
8391    new_path="${new_path/%.exe/}"
8392
8393    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8394    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8395  fi
8396
8397  else
8398    # We're on a posix platform. Hooray! :)
8399    # First separate the path from the arguments. This will split at the first
8400    # space.
8401    complete="$FOUND_MAKE"
8402    path="${complete%% *}"
8403    tmp="$complete EOL"
8404    arguments="${tmp#* }"
8405
8406    # Cannot rely on the command "which" here since it doesn't always work.
8407    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8408    if test -z "$is_absolute_path"; then
8409      # Path to executable is not absolute. Find it.
8410      IFS_save="$IFS"
8411      IFS=:
8412      for p in $PATH; do
8413        if test -f "$p/$path" && test -x "$p/$path"; then
8414          new_path="$p/$path"
8415          break
8416        fi
8417      done
8418      IFS="$IFS_save"
8419    else
8420      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8421$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8422      new_path="$path"
8423    fi
8424
8425    if test "x$new_path" = x; then
8426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8427$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8428        has_space=`$ECHO "$complete" | $GREP " "`
8429        if test "x$has_space" != x; then
8430          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8431$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8432        fi
8433        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8434      fi
8435  fi
8436
8437      # Now join together the path and the arguments once again
8438      if test "x$arguments" != xEOL; then
8439        new_complete="$new_path ${arguments% *}"
8440      else
8441        new_complete="$new_path"
8442      fi
8443
8444  if test "x$complete" != "x$new_complete"; then
8445      FOUND_MAKE="$new_complete"
8446      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8447$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8448    fi
8449
8450        fi
8451      fi
8452    fi
8453  fi
8454
8455    if test "x$FOUND_MAKE" = x; then
8456      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8457    fi
8458  else
8459    # Try our hardest to locate a correct version of GNU make
8460    for ac_prog in gmake
8461do
8462  # Extract the first word of "$ac_prog", so it can be a program name with args.
8463set dummy $ac_prog; ac_word=$2
8464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8465$as_echo_n "checking for $ac_word... " >&6; }
8466if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8467  $as_echo_n "(cached) " >&6
8468else
8469  case $CHECK_GMAKE in
8470  [\\/]* | ?:[\\/]*)
8471  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8472  ;;
8473  *)
8474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8475for as_dir in $PATH
8476do
8477  IFS=$as_save_IFS
8478  test -z "$as_dir" && as_dir=.
8479    for ac_exec_ext in '' $ac_executable_extensions; do
8480  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8481    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8483    break 2
8484  fi
8485done
8486  done
8487IFS=$as_save_IFS
8488
8489  ;;
8490esac
8491fi
8492CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8493if test -n "$CHECK_GMAKE"; then
8494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8495$as_echo "$CHECK_GMAKE" >&6; }
8496else
8497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8498$as_echo "no" >&6; }
8499fi
8500
8501
8502  test -n "$CHECK_GMAKE" && break
8503done
8504
8505
8506  MAKE_CANDIDATE=""$CHECK_GMAKE""
8507  DESCRIPTION="gmake in PATH"
8508  if test "x$MAKE_CANDIDATE" != x; then
8509    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8510$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8511    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8512    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8513    if test "x$IS_GNU_MAKE" = x; then
8514      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8515$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8516    else
8517      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8518      if test "x$IS_MODERN_MAKE" = x; then
8519        { $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
8520$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;}
8521      else
8522        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8523          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8524            MAKE_EXPECTED_ENV='cygwin'
8525          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8526            MAKE_EXPECTED_ENV='msys'
8527          else
8528            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8529          fi
8530          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8531          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8532        else
8533          # Not relevant for non-Windows
8534          IS_MAKE_CORRECT_ENV=true
8535        fi
8536        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8537          { $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
8538$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;}
8539        else
8540          FOUND_MAKE=$MAKE_CANDIDATE
8541
8542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8543
8544  # First separate the path from the arguments. This will split at the first
8545  # space.
8546  complete="$FOUND_MAKE"
8547  path="${complete%% *}"
8548  tmp="$complete EOL"
8549  arguments="${tmp#* }"
8550
8551  # Input might be given as Windows format, start by converting to
8552  # unix format.
8553  new_path=`$CYGPATH -u "$path"`
8554
8555  # Now try to locate executable using which
8556  new_path=`$WHICH "$new_path" 2> /dev/null`
8557  # bat and cmd files are not always considered executable in cygwin causing which
8558  # to not find them
8559  if test "x$new_path" = x \
8560           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8561           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8562    new_path=`$CYGPATH -u "$path"`
8563  fi
8564  if test "x$new_path" = x; then
8565    # Oops. Which didn't find the executable.
8566    # The splitting of arguments from the executable at a space might have been incorrect,
8567    # since paths with space are more likely in Windows. Give it another try with the whole
8568    # argument.
8569    path="$complete"
8570    arguments="EOL"
8571    new_path=`$CYGPATH -u "$path"`
8572    new_path=`$WHICH "$new_path" 2> /dev/null`
8573    # bat and cmd files are not always considered executable in cygwin causing which
8574    # to not find them
8575    if test "x$new_path" = x \
8576             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8577             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8578      new_path=`$CYGPATH -u "$path"`
8579    fi
8580    if test "x$new_path" = x; then
8581      # It's still not found. Now this is an unrecoverable error.
8582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8583$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8584      has_space=`$ECHO "$complete" | $GREP " "`
8585      if test "x$has_space" != x; then
8586        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8587$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8588      fi
8589      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8590    fi
8591  fi
8592
8593  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8594  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8595  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8596  # "foo.exe" is OK but "foo" is an error.
8597  #
8598  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8599  # It is also a way to make sure we got the proper file name for the real test later on.
8600  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8601  if test "x$test_shortpath" = x; then
8602    # Short path failed, file does not exist as specified.
8603    # Try adding .exe or .cmd
8604    if test -f "${new_path}.exe"; then
8605       input_to_shortpath="${new_path}.exe"
8606    elif test -f "${new_path}.cmd"; then
8607       input_to_shortpath="${new_path}.cmd"
8608    else
8609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8611      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8612$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8613      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8614    fi
8615  else
8616    input_to_shortpath="$new_path"
8617  fi
8618
8619  # Call helper function which possibly converts this using DOS-style short mode.
8620  # If so, the updated path is stored in $new_path.
8621  new_path="$input_to_shortpath"
8622
8623  input_path="$input_to_shortpath"
8624  # Check if we need to convert this using DOS-style short mode. If the path
8625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8626  # take no chances and rewrite it.
8627  # Note: m4 eats our [], so we need to use [ and ] instead.
8628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8629  if test "x$has_forbidden_chars" != x; then
8630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8634      # Going to short mode and back again did indeed matter. Since short mode is
8635      # case insensitive, let's make it lowercase to improve readability.
8636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8637      # Now convert it back to Unix-stile (cygpath)
8638      input_path=`$CYGPATH -u "$shortmode_path"`
8639      new_path="$input_path"
8640    fi
8641  fi
8642
8643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8644  if test "x$test_cygdrive_prefix" = x; then
8645    # As a simple fix, exclude /usr/bin since it's not a real path.
8646    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8648      # a path prefixed by /cygdrive for fixpath to work.
8649      new_path="$CYGWIN_ROOT_PATH$input_path"
8650    fi
8651  fi
8652
8653  # remove trailing .exe if any
8654  new_path="${new_path/%.exe/}"
8655
8656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8657
8658  # First separate the path from the arguments. This will split at the first
8659  # space.
8660  complete="$FOUND_MAKE"
8661  path="${complete%% *}"
8662  tmp="$complete EOL"
8663  arguments="${tmp#* }"
8664
8665  # Input might be given as Windows format, start by converting to
8666  # unix format.
8667  new_path="$path"
8668
8669  windows_path="$new_path"
8670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8671    unix_path=`$CYGPATH -u "$windows_path"`
8672    new_path="$unix_path"
8673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8675    new_path="$unix_path"
8676  fi
8677
8678
8679  # Now try to locate executable using which
8680  new_path=`$WHICH "$new_path" 2> /dev/null`
8681
8682  if test "x$new_path" = x; then
8683    # Oops. Which didn't find the executable.
8684    # The splitting of arguments from the executable at a space might have been incorrect,
8685    # since paths with space are more likely in Windows. Give it another try with the whole
8686    # argument.
8687    path="$complete"
8688    arguments="EOL"
8689    new_path="$path"
8690
8691  windows_path="$new_path"
8692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8693    unix_path=`$CYGPATH -u "$windows_path"`
8694    new_path="$unix_path"
8695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8697    new_path="$unix_path"
8698  fi
8699
8700
8701    new_path=`$WHICH "$new_path" 2> /dev/null`
8702
8703    if test "x$new_path" = x; then
8704      # It's still not found. Now this is an unrecoverable error.
8705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8706$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8707      has_space=`$ECHO "$complete" | $GREP " "`
8708      if test "x$has_space" != x; then
8709        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8710$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8711      fi
8712      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8713    fi
8714  fi
8715
8716  # Now new_path has a complete unix path to the binary
8717  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8718    # Keep paths in /bin as-is, but remove trailing .exe if any
8719    new_path="${new_path/%.exe/}"
8720    # Do not save /bin paths to all_fixpath_prefixes!
8721  else
8722    # Not in mixed or Windows style, start by that.
8723    new_path=`cmd //c echo $new_path`
8724
8725  input_path="$new_path"
8726  # Check if we need to convert this using DOS-style short mode. If the path
8727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8728  # take no chances and rewrite it.
8729  # Note: m4 eats our [], so we need to use [ and ] instead.
8730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8731  if test "x$has_forbidden_chars" != x; then
8732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8734  fi
8735
8736    # Output is in $new_path
8737
8738  windows_path="$new_path"
8739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8740    unix_path=`$CYGPATH -u "$windows_path"`
8741    new_path="$unix_path"
8742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8744    new_path="$unix_path"
8745  fi
8746
8747    # remove trailing .exe if any
8748    new_path="${new_path/%.exe/}"
8749
8750    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8751    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8752  fi
8753
8754  else
8755    # We're on a posix platform. Hooray! :)
8756    # First separate the path from the arguments. This will split at the first
8757    # space.
8758    complete="$FOUND_MAKE"
8759    path="${complete%% *}"
8760    tmp="$complete EOL"
8761    arguments="${tmp#* }"
8762
8763    # Cannot rely on the command "which" here since it doesn't always work.
8764    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8765    if test -z "$is_absolute_path"; then
8766      # Path to executable is not absolute. Find it.
8767      IFS_save="$IFS"
8768      IFS=:
8769      for p in $PATH; do
8770        if test -f "$p/$path" && test -x "$p/$path"; then
8771          new_path="$p/$path"
8772          break
8773        fi
8774      done
8775      IFS="$IFS_save"
8776    else
8777      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8778$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8779      new_path="$path"
8780    fi
8781
8782    if test "x$new_path" = x; then
8783        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8784$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8785        has_space=`$ECHO "$complete" | $GREP " "`
8786        if test "x$has_space" != x; then
8787          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8788$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8789        fi
8790        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8791      fi
8792  fi
8793
8794      # Now join together the path and the arguments once again
8795      if test "x$arguments" != xEOL; then
8796        new_complete="$new_path ${arguments% *}"
8797      else
8798        new_complete="$new_path"
8799      fi
8800
8801  if test "x$complete" != "x$new_complete"; then
8802      FOUND_MAKE="$new_complete"
8803      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8804$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8805    fi
8806
8807        fi
8808      fi
8809    fi
8810  fi
8811
8812
8813    if test "x$FOUND_MAKE" = x; then
8814      for ac_prog in make
8815do
8816  # Extract the first word of "$ac_prog", so it can be a program name with args.
8817set dummy $ac_prog; ac_word=$2
8818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8819$as_echo_n "checking for $ac_word... " >&6; }
8820if ${ac_cv_path_CHECK_MAKE+:} false; then :
8821  $as_echo_n "(cached) " >&6
8822else
8823  case $CHECK_MAKE in
8824  [\\/]* | ?:[\\/]*)
8825  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8826  ;;
8827  *)
8828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8829for as_dir in $PATH
8830do
8831  IFS=$as_save_IFS
8832  test -z "$as_dir" && as_dir=.
8833    for ac_exec_ext in '' $ac_executable_extensions; do
8834  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8835    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8837    break 2
8838  fi
8839done
8840  done
8841IFS=$as_save_IFS
8842
8843  ;;
8844esac
8845fi
8846CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8847if test -n "$CHECK_MAKE"; then
8848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8849$as_echo "$CHECK_MAKE" >&6; }
8850else
8851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8852$as_echo "no" >&6; }
8853fi
8854
8855
8856  test -n "$CHECK_MAKE" && break
8857done
8858
8859
8860  MAKE_CANDIDATE=""$CHECK_MAKE""
8861  DESCRIPTION="make in PATH"
8862  if test "x$MAKE_CANDIDATE" != x; then
8863    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8864$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8865    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8866    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8867    if test "x$IS_GNU_MAKE" = x; then
8868      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8869$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8870    else
8871      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8872      if test "x$IS_MODERN_MAKE" = x; then
8873        { $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
8874$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;}
8875      else
8876        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8877          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8878            MAKE_EXPECTED_ENV='cygwin'
8879          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8880            MAKE_EXPECTED_ENV='msys'
8881          else
8882            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8883          fi
8884          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8885          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8886        else
8887          # Not relevant for non-Windows
8888          IS_MAKE_CORRECT_ENV=true
8889        fi
8890        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8891          { $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
8892$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;}
8893        else
8894          FOUND_MAKE=$MAKE_CANDIDATE
8895
8896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8897
8898  # First separate the path from the arguments. This will split at the first
8899  # space.
8900  complete="$FOUND_MAKE"
8901  path="${complete%% *}"
8902  tmp="$complete EOL"
8903  arguments="${tmp#* }"
8904
8905  # Input might be given as Windows format, start by converting to
8906  # unix format.
8907  new_path=`$CYGPATH -u "$path"`
8908
8909  # Now try to locate executable using which
8910  new_path=`$WHICH "$new_path" 2> /dev/null`
8911  # bat and cmd files are not always considered executable in cygwin causing which
8912  # to not find them
8913  if test "x$new_path" = x \
8914           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8915           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8916    new_path=`$CYGPATH -u "$path"`
8917  fi
8918  if test "x$new_path" = x; then
8919    # Oops. Which didn't find the executable.
8920    # The splitting of arguments from the executable at a space might have been incorrect,
8921    # since paths with space are more likely in Windows. Give it another try with the whole
8922    # argument.
8923    path="$complete"
8924    arguments="EOL"
8925    new_path=`$CYGPATH -u "$path"`
8926    new_path=`$WHICH "$new_path" 2> /dev/null`
8927    # bat and cmd files are not always considered executable in cygwin causing which
8928    # to not find them
8929    if test "x$new_path" = x \
8930             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8931             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8932      new_path=`$CYGPATH -u "$path"`
8933    fi
8934    if test "x$new_path" = x; then
8935      # It's still not found. Now this is an unrecoverable error.
8936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8937$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8938      has_space=`$ECHO "$complete" | $GREP " "`
8939      if test "x$has_space" != x; then
8940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8942      fi
8943      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8944    fi
8945  fi
8946
8947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8950  # "foo.exe" is OK but "foo" is an error.
8951  #
8952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8953  # It is also a way to make sure we got the proper file name for the real test later on.
8954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8955  if test "x$test_shortpath" = x; then
8956    # Short path failed, file does not exist as specified.
8957    # Try adding .exe or .cmd
8958    if test -f "${new_path}.exe"; then
8959       input_to_shortpath="${new_path}.exe"
8960    elif test -f "${new_path}.cmd"; then
8961       input_to_shortpath="${new_path}.cmd"
8962    else
8963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8964$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8965      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8966$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8967      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8968    fi
8969  else
8970    input_to_shortpath="$new_path"
8971  fi
8972
8973  # Call helper function which possibly converts this using DOS-style short mode.
8974  # If so, the updated path is stored in $new_path.
8975  new_path="$input_to_shortpath"
8976
8977  input_path="$input_to_shortpath"
8978  # Check if we need to convert this using DOS-style short mode. If the path
8979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8980  # take no chances and rewrite it.
8981  # Note: m4 eats our [], so we need to use [ and ] instead.
8982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8983  if test "x$has_forbidden_chars" != x; then
8984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8988      # Going to short mode and back again did indeed matter. Since short mode is
8989      # case insensitive, let's make it lowercase to improve readability.
8990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8991      # Now convert it back to Unix-stile (cygpath)
8992      input_path=`$CYGPATH -u "$shortmode_path"`
8993      new_path="$input_path"
8994    fi
8995  fi
8996
8997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8998  if test "x$test_cygdrive_prefix" = x; then
8999    # As a simple fix, exclude /usr/bin since it's not a real path.
9000    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9002      # a path prefixed by /cygdrive for fixpath to work.
9003      new_path="$CYGWIN_ROOT_PATH$input_path"
9004    fi
9005  fi
9006
9007  # remove trailing .exe if any
9008  new_path="${new_path/%.exe/}"
9009
9010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9011
9012  # First separate the path from the arguments. This will split at the first
9013  # space.
9014  complete="$FOUND_MAKE"
9015  path="${complete%% *}"
9016  tmp="$complete EOL"
9017  arguments="${tmp#* }"
9018
9019  # Input might be given as Windows format, start by converting to
9020  # unix format.
9021  new_path="$path"
9022
9023  windows_path="$new_path"
9024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9025    unix_path=`$CYGPATH -u "$windows_path"`
9026    new_path="$unix_path"
9027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9029    new_path="$unix_path"
9030  fi
9031
9032
9033  # Now try to locate executable using which
9034  new_path=`$WHICH "$new_path" 2> /dev/null`
9035
9036  if test "x$new_path" = x; then
9037    # Oops. Which didn't find the executable.
9038    # The splitting of arguments from the executable at a space might have been incorrect,
9039    # since paths with space are more likely in Windows. Give it another try with the whole
9040    # argument.
9041    path="$complete"
9042    arguments="EOL"
9043    new_path="$path"
9044
9045  windows_path="$new_path"
9046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9047    unix_path=`$CYGPATH -u "$windows_path"`
9048    new_path="$unix_path"
9049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9051    new_path="$unix_path"
9052  fi
9053
9054
9055    new_path=`$WHICH "$new_path" 2> /dev/null`
9056
9057    if test "x$new_path" = x; then
9058      # It's still not found. Now this is an unrecoverable error.
9059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9060$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9061      has_space=`$ECHO "$complete" | $GREP " "`
9062      if test "x$has_space" != x; then
9063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9065      fi
9066      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9067    fi
9068  fi
9069
9070  # Now new_path has a complete unix path to the binary
9071  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9072    # Keep paths in /bin as-is, but remove trailing .exe if any
9073    new_path="${new_path/%.exe/}"
9074    # Do not save /bin paths to all_fixpath_prefixes!
9075  else
9076    # Not in mixed or Windows style, start by that.
9077    new_path=`cmd //c echo $new_path`
9078
9079  input_path="$new_path"
9080  # Check if we need to convert this using DOS-style short mode. If the path
9081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9082  # take no chances and rewrite it.
9083  # Note: m4 eats our [], so we need to use [ and ] instead.
9084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9085  if test "x$has_forbidden_chars" != x; then
9086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9088  fi
9089
9090    # Output is in $new_path
9091
9092  windows_path="$new_path"
9093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9094    unix_path=`$CYGPATH -u "$windows_path"`
9095    new_path="$unix_path"
9096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9098    new_path="$unix_path"
9099  fi
9100
9101    # remove trailing .exe if any
9102    new_path="${new_path/%.exe/}"
9103
9104    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9105    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9106  fi
9107
9108  else
9109    # We're on a posix platform. Hooray! :)
9110    # First separate the path from the arguments. This will split at the first
9111    # space.
9112    complete="$FOUND_MAKE"
9113    path="${complete%% *}"
9114    tmp="$complete EOL"
9115    arguments="${tmp#* }"
9116
9117    # Cannot rely on the command "which" here since it doesn't always work.
9118    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9119    if test -z "$is_absolute_path"; then
9120      # Path to executable is not absolute. Find it.
9121      IFS_save="$IFS"
9122      IFS=:
9123      for p in $PATH; do
9124        if test -f "$p/$path" && test -x "$p/$path"; then
9125          new_path="$p/$path"
9126          break
9127        fi
9128      done
9129      IFS="$IFS_save"
9130    else
9131      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9132$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9133      new_path="$path"
9134    fi
9135
9136    if test "x$new_path" = x; then
9137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9138$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9139        has_space=`$ECHO "$complete" | $GREP " "`
9140        if test "x$has_space" != x; then
9141          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9142$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9143        fi
9144        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9145      fi
9146  fi
9147
9148      # Now join together the path and the arguments once again
9149      if test "x$arguments" != xEOL; then
9150        new_complete="$new_path ${arguments% *}"
9151      else
9152        new_complete="$new_path"
9153      fi
9154
9155  if test "x$complete" != "x$new_complete"; then
9156      FOUND_MAKE="$new_complete"
9157      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9158$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9159    fi
9160
9161        fi
9162      fi
9163    fi
9164  fi
9165
9166    fi
9167
9168    if test "x$FOUND_MAKE" = x; then
9169      if test "x$TOOLS_DIR" != x; then
9170        # We have a tools-dir, check that as well before giving up.
9171        OLD_PATH=$PATH
9172        PATH=$TOOLS_DIR:$PATH
9173        for ac_prog in gmake
9174do
9175  # Extract the first word of "$ac_prog", so it can be a program name with args.
9176set dummy $ac_prog; ac_word=$2
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9178$as_echo_n "checking for $ac_word... " >&6; }
9179if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9180  $as_echo_n "(cached) " >&6
9181else
9182  case $CHECK_TOOLSDIR_GMAKE in
9183  [\\/]* | ?:[\\/]*)
9184  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9185  ;;
9186  *)
9187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9188for as_dir in $PATH
9189do
9190  IFS=$as_save_IFS
9191  test -z "$as_dir" && as_dir=.
9192    for ac_exec_ext in '' $ac_executable_extensions; do
9193  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9194    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9196    break 2
9197  fi
9198done
9199  done
9200IFS=$as_save_IFS
9201
9202  ;;
9203esac
9204fi
9205CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9206if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9208$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9209else
9210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9211$as_echo "no" >&6; }
9212fi
9213
9214
9215  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9216done
9217
9218
9219  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9220  DESCRIPTION="gmake in tools-dir"
9221  if test "x$MAKE_CANDIDATE" != x; then
9222    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9223$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9224    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9225    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9226    if test "x$IS_GNU_MAKE" = x; then
9227      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9228$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9229    else
9230      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9231      if test "x$IS_MODERN_MAKE" = x; then
9232        { $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
9233$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;}
9234      else
9235        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9236          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9237            MAKE_EXPECTED_ENV='cygwin'
9238          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9239            MAKE_EXPECTED_ENV='msys'
9240          else
9241            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9242          fi
9243          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9244          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9245        else
9246          # Not relevant for non-Windows
9247          IS_MAKE_CORRECT_ENV=true
9248        fi
9249        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9250          { $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
9251$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;}
9252        else
9253          FOUND_MAKE=$MAKE_CANDIDATE
9254
9255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9256
9257  # First separate the path from the arguments. This will split at the first
9258  # space.
9259  complete="$FOUND_MAKE"
9260  path="${complete%% *}"
9261  tmp="$complete EOL"
9262  arguments="${tmp#* }"
9263
9264  # Input might be given as Windows format, start by converting to
9265  # unix format.
9266  new_path=`$CYGPATH -u "$path"`
9267
9268  # Now try to locate executable using which
9269  new_path=`$WHICH "$new_path" 2> /dev/null`
9270  # bat and cmd files are not always considered executable in cygwin causing which
9271  # to not find them
9272  if test "x$new_path" = x \
9273           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9274           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9275    new_path=`$CYGPATH -u "$path"`
9276  fi
9277  if test "x$new_path" = x; then
9278    # Oops. Which didn't find the executable.
9279    # The splitting of arguments from the executable at a space might have been incorrect,
9280    # since paths with space are more likely in Windows. Give it another try with the whole
9281    # argument.
9282    path="$complete"
9283    arguments="EOL"
9284    new_path=`$CYGPATH -u "$path"`
9285    new_path=`$WHICH "$new_path" 2> /dev/null`
9286    # bat and cmd files are not always considered executable in cygwin causing which
9287    # to not find them
9288    if test "x$new_path" = x \
9289             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9290             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9291      new_path=`$CYGPATH -u "$path"`
9292    fi
9293    if test "x$new_path" = x; then
9294      # It's still not found. Now this is an unrecoverable error.
9295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9296$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9297      has_space=`$ECHO "$complete" | $GREP " "`
9298      if test "x$has_space" != x; then
9299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9301      fi
9302      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9303    fi
9304  fi
9305
9306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9309  # "foo.exe" is OK but "foo" is an error.
9310  #
9311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9312  # It is also a way to make sure we got the proper file name for the real test later on.
9313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9314  if test "x$test_shortpath" = x; then
9315    # Short path failed, file does not exist as specified.
9316    # Try adding .exe or .cmd
9317    if test -f "${new_path}.exe"; then
9318       input_to_shortpath="${new_path}.exe"
9319    elif test -f "${new_path}.cmd"; then
9320       input_to_shortpath="${new_path}.cmd"
9321    else
9322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9323$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9324      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9325$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9326      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9327    fi
9328  else
9329    input_to_shortpath="$new_path"
9330  fi
9331
9332  # Call helper function which possibly converts this using DOS-style short mode.
9333  # If so, the updated path is stored in $new_path.
9334  new_path="$input_to_shortpath"
9335
9336  input_path="$input_to_shortpath"
9337  # Check if we need to convert this using DOS-style short mode. If the path
9338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9339  # take no chances and rewrite it.
9340  # Note: m4 eats our [], so we need to use [ and ] instead.
9341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9342  if test "x$has_forbidden_chars" != x; then
9343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9347      # Going to short mode and back again did indeed matter. Since short mode is
9348      # case insensitive, let's make it lowercase to improve readability.
9349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9350      # Now convert it back to Unix-stile (cygpath)
9351      input_path=`$CYGPATH -u "$shortmode_path"`
9352      new_path="$input_path"
9353    fi
9354  fi
9355
9356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9357  if test "x$test_cygdrive_prefix" = x; then
9358    # As a simple fix, exclude /usr/bin since it's not a real path.
9359    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9361      # a path prefixed by /cygdrive for fixpath to work.
9362      new_path="$CYGWIN_ROOT_PATH$input_path"
9363    fi
9364  fi
9365
9366  # remove trailing .exe if any
9367  new_path="${new_path/%.exe/}"
9368
9369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9370
9371  # First separate the path from the arguments. This will split at the first
9372  # space.
9373  complete="$FOUND_MAKE"
9374  path="${complete%% *}"
9375  tmp="$complete EOL"
9376  arguments="${tmp#* }"
9377
9378  # Input might be given as Windows format, start by converting to
9379  # unix format.
9380  new_path="$path"
9381
9382  windows_path="$new_path"
9383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9384    unix_path=`$CYGPATH -u "$windows_path"`
9385    new_path="$unix_path"
9386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9388    new_path="$unix_path"
9389  fi
9390
9391
9392  # Now try to locate executable using which
9393  new_path=`$WHICH "$new_path" 2> /dev/null`
9394
9395  if test "x$new_path" = x; then
9396    # Oops. Which didn't find the executable.
9397    # The splitting of arguments from the executable at a space might have been incorrect,
9398    # since paths with space are more likely in Windows. Give it another try with the whole
9399    # argument.
9400    path="$complete"
9401    arguments="EOL"
9402    new_path="$path"
9403
9404  windows_path="$new_path"
9405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9406    unix_path=`$CYGPATH -u "$windows_path"`
9407    new_path="$unix_path"
9408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9410    new_path="$unix_path"
9411  fi
9412
9413
9414    new_path=`$WHICH "$new_path" 2> /dev/null`
9415
9416    if test "x$new_path" = x; then
9417      # It's still not found. Now this is an unrecoverable error.
9418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9419$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9420      has_space=`$ECHO "$complete" | $GREP " "`
9421      if test "x$has_space" != x; then
9422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9424      fi
9425      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9426    fi
9427  fi
9428
9429  # Now new_path has a complete unix path to the binary
9430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9431    # Keep paths in /bin as-is, but remove trailing .exe if any
9432    new_path="${new_path/%.exe/}"
9433    # Do not save /bin paths to all_fixpath_prefixes!
9434  else
9435    # Not in mixed or Windows style, start by that.
9436    new_path=`cmd //c echo $new_path`
9437
9438  input_path="$new_path"
9439  # Check if we need to convert this using DOS-style short mode. If the path
9440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9441  # take no chances and rewrite it.
9442  # Note: m4 eats our [], so we need to use [ and ] instead.
9443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9444  if test "x$has_forbidden_chars" != x; then
9445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9447  fi
9448
9449    # Output is in $new_path
9450
9451  windows_path="$new_path"
9452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9453    unix_path=`$CYGPATH -u "$windows_path"`
9454    new_path="$unix_path"
9455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9457    new_path="$unix_path"
9458  fi
9459
9460    # remove trailing .exe if any
9461    new_path="${new_path/%.exe/}"
9462
9463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9465  fi
9466
9467  else
9468    # We're on a posix platform. Hooray! :)
9469    # First separate the path from the arguments. This will split at the first
9470    # space.
9471    complete="$FOUND_MAKE"
9472    path="${complete%% *}"
9473    tmp="$complete EOL"
9474    arguments="${tmp#* }"
9475
9476    # Cannot rely on the command "which" here since it doesn't always work.
9477    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9478    if test -z "$is_absolute_path"; then
9479      # Path to executable is not absolute. Find it.
9480      IFS_save="$IFS"
9481      IFS=:
9482      for p in $PATH; do
9483        if test -f "$p/$path" && test -x "$p/$path"; then
9484          new_path="$p/$path"
9485          break
9486        fi
9487      done
9488      IFS="$IFS_save"
9489    else
9490      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9491$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9492      new_path="$path"
9493    fi
9494
9495    if test "x$new_path" = x; then
9496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9497$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9498        has_space=`$ECHO "$complete" | $GREP " "`
9499        if test "x$has_space" != x; then
9500          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9502        fi
9503        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9504      fi
9505  fi
9506
9507      # Now join together the path and the arguments once again
9508      if test "x$arguments" != xEOL; then
9509        new_complete="$new_path ${arguments% *}"
9510      else
9511        new_complete="$new_path"
9512      fi
9513
9514  if test "x$complete" != "x$new_complete"; then
9515      FOUND_MAKE="$new_complete"
9516      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9517$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9518    fi
9519
9520        fi
9521      fi
9522    fi
9523  fi
9524
9525        if test "x$FOUND_MAKE" = x; then
9526          for ac_prog in make
9527do
9528  # Extract the first word of "$ac_prog", so it can be a program name with args.
9529set dummy $ac_prog; ac_word=$2
9530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9531$as_echo_n "checking for $ac_word... " >&6; }
9532if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9533  $as_echo_n "(cached) " >&6
9534else
9535  case $CHECK_TOOLSDIR_MAKE in
9536  [\\/]* | ?:[\\/]*)
9537  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9538  ;;
9539  *)
9540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9541for as_dir in $PATH
9542do
9543  IFS=$as_save_IFS
9544  test -z "$as_dir" && as_dir=.
9545    for ac_exec_ext in '' $ac_executable_extensions; do
9546  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9547    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9549    break 2
9550  fi
9551done
9552  done
9553IFS=$as_save_IFS
9554
9555  ;;
9556esac
9557fi
9558CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9559if test -n "$CHECK_TOOLSDIR_MAKE"; then
9560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9561$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9562else
9563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564$as_echo "no" >&6; }
9565fi
9566
9567
9568  test -n "$CHECK_TOOLSDIR_MAKE" && break
9569done
9570
9571
9572  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9573  DESCRIPTION="make in tools-dir"
9574  if test "x$MAKE_CANDIDATE" != x; then
9575    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9576$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9577    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9578    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9579    if test "x$IS_GNU_MAKE" = x; then
9580      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9581$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9582    else
9583      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9584      if test "x$IS_MODERN_MAKE" = x; then
9585        { $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
9586$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;}
9587      else
9588        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9589          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9590            MAKE_EXPECTED_ENV='cygwin'
9591          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9592            MAKE_EXPECTED_ENV='msys'
9593          else
9594            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9595          fi
9596          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9597          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9598        else
9599          # Not relevant for non-Windows
9600          IS_MAKE_CORRECT_ENV=true
9601        fi
9602        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9603          { $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
9604$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;}
9605        else
9606          FOUND_MAKE=$MAKE_CANDIDATE
9607
9608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9609
9610  # First separate the path from the arguments. This will split at the first
9611  # space.
9612  complete="$FOUND_MAKE"
9613  path="${complete%% *}"
9614  tmp="$complete EOL"
9615  arguments="${tmp#* }"
9616
9617  # Input might be given as Windows format, start by converting to
9618  # unix format.
9619  new_path=`$CYGPATH -u "$path"`
9620
9621  # Now try to locate executable using which
9622  new_path=`$WHICH "$new_path" 2> /dev/null`
9623  # bat and cmd files are not always considered executable in cygwin causing which
9624  # to not find them
9625  if test "x$new_path" = x \
9626           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9627           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9628    new_path=`$CYGPATH -u "$path"`
9629  fi
9630  if test "x$new_path" = x; then
9631    # Oops. Which didn't find the executable.
9632    # The splitting of arguments from the executable at a space might have been incorrect,
9633    # since paths with space are more likely in Windows. Give it another try with the whole
9634    # argument.
9635    path="$complete"
9636    arguments="EOL"
9637    new_path=`$CYGPATH -u "$path"`
9638    new_path=`$WHICH "$new_path" 2> /dev/null`
9639    # bat and cmd files are not always considered executable in cygwin causing which
9640    # to not find them
9641    if test "x$new_path" = x \
9642             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9643             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9644      new_path=`$CYGPATH -u "$path"`
9645    fi
9646    if test "x$new_path" = x; then
9647      # It's still not found. Now this is an unrecoverable error.
9648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9649$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9650      has_space=`$ECHO "$complete" | $GREP " "`
9651      if test "x$has_space" != x; then
9652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9654      fi
9655      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9656    fi
9657  fi
9658
9659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9662  # "foo.exe" is OK but "foo" is an error.
9663  #
9664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9665  # It is also a way to make sure we got the proper file name for the real test later on.
9666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9667  if test "x$test_shortpath" = x; then
9668    # Short path failed, file does not exist as specified.
9669    # Try adding .exe or .cmd
9670    if test -f "${new_path}.exe"; then
9671       input_to_shortpath="${new_path}.exe"
9672    elif test -f "${new_path}.cmd"; then
9673       input_to_shortpath="${new_path}.cmd"
9674    else
9675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9676$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9677      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9678$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9679      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9680    fi
9681  else
9682    input_to_shortpath="$new_path"
9683  fi
9684
9685  # Call helper function which possibly converts this using DOS-style short mode.
9686  # If so, the updated path is stored in $new_path.
9687  new_path="$input_to_shortpath"
9688
9689  input_path="$input_to_shortpath"
9690  # Check if we need to convert this using DOS-style short mode. If the path
9691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9692  # take no chances and rewrite it.
9693  # Note: m4 eats our [], so we need to use [ and ] instead.
9694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9695  if test "x$has_forbidden_chars" != x; then
9696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9700      # Going to short mode and back again did indeed matter. Since short mode is
9701      # case insensitive, let's make it lowercase to improve readability.
9702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9703      # Now convert it back to Unix-stile (cygpath)
9704      input_path=`$CYGPATH -u "$shortmode_path"`
9705      new_path="$input_path"
9706    fi
9707  fi
9708
9709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9710  if test "x$test_cygdrive_prefix" = x; then
9711    # As a simple fix, exclude /usr/bin since it's not a real path.
9712    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9714      # a path prefixed by /cygdrive for fixpath to work.
9715      new_path="$CYGWIN_ROOT_PATH$input_path"
9716    fi
9717  fi
9718
9719  # remove trailing .exe if any
9720  new_path="${new_path/%.exe/}"
9721
9722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9723
9724  # First separate the path from the arguments. This will split at the first
9725  # space.
9726  complete="$FOUND_MAKE"
9727  path="${complete%% *}"
9728  tmp="$complete EOL"
9729  arguments="${tmp#* }"
9730
9731  # Input might be given as Windows format, start by converting to
9732  # unix format.
9733  new_path="$path"
9734
9735  windows_path="$new_path"
9736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9737    unix_path=`$CYGPATH -u "$windows_path"`
9738    new_path="$unix_path"
9739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9741    new_path="$unix_path"
9742  fi
9743
9744
9745  # Now try to locate executable using which
9746  new_path=`$WHICH "$new_path" 2> /dev/null`
9747
9748  if test "x$new_path" = x; then
9749    # Oops. Which didn't find the executable.
9750    # The splitting of arguments from the executable at a space might have been incorrect,
9751    # since paths with space are more likely in Windows. Give it another try with the whole
9752    # argument.
9753    path="$complete"
9754    arguments="EOL"
9755    new_path="$path"
9756
9757  windows_path="$new_path"
9758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9759    unix_path=`$CYGPATH -u "$windows_path"`
9760    new_path="$unix_path"
9761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9763    new_path="$unix_path"
9764  fi
9765
9766
9767    new_path=`$WHICH "$new_path" 2> /dev/null`
9768
9769    if test "x$new_path" = x; then
9770      # It's still not found. Now this is an unrecoverable error.
9771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9772$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9773      has_space=`$ECHO "$complete" | $GREP " "`
9774      if test "x$has_space" != x; then
9775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9777      fi
9778      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9779    fi
9780  fi
9781
9782  # Now new_path has a complete unix path to the binary
9783  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9784    # Keep paths in /bin as-is, but remove trailing .exe if any
9785    new_path="${new_path/%.exe/}"
9786    # Do not save /bin paths to all_fixpath_prefixes!
9787  else
9788    # Not in mixed or Windows style, start by that.
9789    new_path=`cmd //c echo $new_path`
9790
9791  input_path="$new_path"
9792  # Check if we need to convert this using DOS-style short mode. If the path
9793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9794  # take no chances and rewrite it.
9795  # Note: m4 eats our [], so we need to use [ and ] instead.
9796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9797  if test "x$has_forbidden_chars" != x; then
9798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9800  fi
9801
9802    # Output is in $new_path
9803
9804  windows_path="$new_path"
9805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9806    unix_path=`$CYGPATH -u "$windows_path"`
9807    new_path="$unix_path"
9808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9810    new_path="$unix_path"
9811  fi
9812
9813    # remove trailing .exe if any
9814    new_path="${new_path/%.exe/}"
9815
9816    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9817    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9818  fi
9819
9820  else
9821    # We're on a posix platform. Hooray! :)
9822    # First separate the path from the arguments. This will split at the first
9823    # space.
9824    complete="$FOUND_MAKE"
9825    path="${complete%% *}"
9826    tmp="$complete EOL"
9827    arguments="${tmp#* }"
9828
9829    # Cannot rely on the command "which" here since it doesn't always work.
9830    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9831    if test -z "$is_absolute_path"; then
9832      # Path to executable is not absolute. Find it.
9833      IFS_save="$IFS"
9834      IFS=:
9835      for p in $PATH; do
9836        if test -f "$p/$path" && test -x "$p/$path"; then
9837          new_path="$p/$path"
9838          break
9839        fi
9840      done
9841      IFS="$IFS_save"
9842    else
9843      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9844$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9845      new_path="$path"
9846    fi
9847
9848    if test "x$new_path" = x; then
9849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9851        has_space=`$ECHO "$complete" | $GREP " "`
9852        if test "x$has_space" != x; then
9853          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9854$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9855        fi
9856        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9857      fi
9858  fi
9859
9860      # Now join together the path and the arguments once again
9861      if test "x$arguments" != xEOL; then
9862        new_complete="$new_path ${arguments% *}"
9863      else
9864        new_complete="$new_path"
9865      fi
9866
9867  if test "x$complete" != "x$new_complete"; then
9868      FOUND_MAKE="$new_complete"
9869      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9870$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9871    fi
9872
9873        fi
9874      fi
9875    fi
9876  fi
9877
9878        fi
9879        PATH=$OLD_PATH
9880      fi
9881    fi
9882
9883    if test "x$FOUND_MAKE" = x; then
9884      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
9885    fi
9886  fi
9887
9888  MAKE=$FOUND_MAKE
9889
9890  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9891$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9892
9893
9894
9895    # Test if find supports -delete
9896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9897$as_echo_n "checking if find supports -delete... " >&6; }
9898    FIND_DELETE="-delete"
9899
9900    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9901
9902    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9903
9904    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9905    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9906        # No, it does not.
9907        rm $DELETEDIR/TestIfFindSupportsDelete
9908        FIND_DELETE="-exec rm \{\} \+"
9909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9910$as_echo "no" >&6; }
9911    else
9912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9913$as_echo "yes" >&6; }
9914    fi
9915    rmdir $DELETEDIR
9916
9917
9918
9919# These tools might not be installed by default,
9920# need hint on how to install them.
9921
9922    for ac_prog in unzip
9923do
9924  # Extract the first word of "$ac_prog", so it can be a program name with args.
9925set dummy $ac_prog; ac_word=$2
9926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9927$as_echo_n "checking for $ac_word... " >&6; }
9928if ${ac_cv_path_UNZIP+:} false; then :
9929  $as_echo_n "(cached) " >&6
9930else
9931  case $UNZIP in
9932  [\\/]* | ?:[\\/]*)
9933  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9934  ;;
9935  *)
9936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9937for as_dir in $PATH
9938do
9939  IFS=$as_save_IFS
9940  test -z "$as_dir" && as_dir=.
9941    for ac_exec_ext in '' $ac_executable_extensions; do
9942  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9943    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9945    break 2
9946  fi
9947done
9948  done
9949IFS=$as_save_IFS
9950
9951  ;;
9952esac
9953fi
9954UNZIP=$ac_cv_path_UNZIP
9955if test -n "$UNZIP"; then
9956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9957$as_echo "$UNZIP" >&6; }
9958else
9959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9960$as_echo "no" >&6; }
9961fi
9962
9963
9964  test -n "$UNZIP" && break
9965done
9966
9967
9968    if test "x$UNZIP" = x; then
9969        if test "xunzip" = x; then
9970          PROG_NAME=unzip
9971        else
9972          PROG_NAME=unzip
9973        fi
9974        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9975$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9976        as_fn_error $? "Cannot continue" "$LINENO" 5
9977    fi
9978
9979
9980
9981    for ac_prog in zip
9982do
9983  # Extract the first word of "$ac_prog", so it can be a program name with args.
9984set dummy $ac_prog; ac_word=$2
9985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9986$as_echo_n "checking for $ac_word... " >&6; }
9987if ${ac_cv_path_ZIP+:} false; then :
9988  $as_echo_n "(cached) " >&6
9989else
9990  case $ZIP in
9991  [\\/]* | ?:[\\/]*)
9992  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9993  ;;
9994  *)
9995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9996for as_dir in $PATH
9997do
9998  IFS=$as_save_IFS
9999  test -z "$as_dir" && as_dir=.
10000    for ac_exec_ext in '' $ac_executable_extensions; do
10001  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10002    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10004    break 2
10005  fi
10006done
10007  done
10008IFS=$as_save_IFS
10009
10010  ;;
10011esac
10012fi
10013ZIP=$ac_cv_path_ZIP
10014if test -n "$ZIP"; then
10015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10016$as_echo "$ZIP" >&6; }
10017else
10018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10019$as_echo "no" >&6; }
10020fi
10021
10022
10023  test -n "$ZIP" && break
10024done
10025
10026
10027    if test "x$ZIP" = x; then
10028        if test "xzip" = x; then
10029          PROG_NAME=zip
10030        else
10031          PROG_NAME=zip
10032        fi
10033        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10034$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10035        as_fn_error $? "Cannot continue" "$LINENO" 5
10036    fi
10037
10038
10039
10040# Non-required basic tools
10041
10042# Extract the first word of "ldd", so it can be a program name with args.
10043set dummy ldd; ac_word=$2
10044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10045$as_echo_n "checking for $ac_word... " >&6; }
10046if ${ac_cv_path_LDD+:} false; then :
10047  $as_echo_n "(cached) " >&6
10048else
10049  case $LDD in
10050  [\\/]* | ?:[\\/]*)
10051  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10052  ;;
10053  *)
10054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10055for as_dir in $PATH
10056do
10057  IFS=$as_save_IFS
10058  test -z "$as_dir" && as_dir=.
10059    for ac_exec_ext in '' $ac_executable_extensions; do
10060  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10061    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10063    break 2
10064  fi
10065done
10066  done
10067IFS=$as_save_IFS
10068
10069  ;;
10070esac
10071fi
10072LDD=$ac_cv_path_LDD
10073if test -n "$LDD"; then
10074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10075$as_echo "$LDD" >&6; }
10076else
10077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10078$as_echo "no" >&6; }
10079fi
10080
10081
10082if test "x$LDD" = "x"; then
10083    # List shared lib dependencies is used for
10084    # debug output and checking for forbidden dependencies.
10085    # We can build without it.
10086    LDD="true"
10087fi
10088# Extract the first word of "otool", so it can be a program name with args.
10089set dummy otool; ac_word=$2
10090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10091$as_echo_n "checking for $ac_word... " >&6; }
10092if ${ac_cv_path_OTOOL+:} false; then :
10093  $as_echo_n "(cached) " >&6
10094else
10095  case $OTOOL in
10096  [\\/]* | ?:[\\/]*)
10097  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10098  ;;
10099  *)
10100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10101for as_dir in $PATH
10102do
10103  IFS=$as_save_IFS
10104  test -z "$as_dir" && as_dir=.
10105    for ac_exec_ext in '' $ac_executable_extensions; do
10106  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10107    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10109    break 2
10110  fi
10111done
10112  done
10113IFS=$as_save_IFS
10114
10115  ;;
10116esac
10117fi
10118OTOOL=$ac_cv_path_OTOOL
10119if test -n "$OTOOL"; then
10120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10121$as_echo "$OTOOL" >&6; }
10122else
10123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10124$as_echo "no" >&6; }
10125fi
10126
10127
10128if test "x$OTOOL" = "x"; then
10129   OTOOL="true"
10130fi
10131for ac_prog in readelf greadelf
10132do
10133  # Extract the first word of "$ac_prog", so it can be a program name with args.
10134set dummy $ac_prog; ac_word=$2
10135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10136$as_echo_n "checking for $ac_word... " >&6; }
10137if ${ac_cv_path_READELF+:} false; then :
10138  $as_echo_n "(cached) " >&6
10139else
10140  case $READELF in
10141  [\\/]* | ?:[\\/]*)
10142  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10143  ;;
10144  *)
10145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10146for as_dir in $PATH
10147do
10148  IFS=$as_save_IFS
10149  test -z "$as_dir" && as_dir=.
10150    for ac_exec_ext in '' $ac_executable_extensions; do
10151  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10152    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10154    break 2
10155  fi
10156done
10157  done
10158IFS=$as_save_IFS
10159
10160  ;;
10161esac
10162fi
10163READELF=$ac_cv_path_READELF
10164if test -n "$READELF"; then
10165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10166$as_echo "$READELF" >&6; }
10167else
10168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10169$as_echo "no" >&6; }
10170fi
10171
10172
10173  test -n "$READELF" && break
10174done
10175
10176# Extract the first word of "hg", so it can be a program name with args.
10177set dummy hg; ac_word=$2
10178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10179$as_echo_n "checking for $ac_word... " >&6; }
10180if ${ac_cv_path_HG+:} false; then :
10181  $as_echo_n "(cached) " >&6
10182else
10183  case $HG in
10184  [\\/]* | ?:[\\/]*)
10185  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10186  ;;
10187  *)
10188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10189for as_dir in $PATH
10190do
10191  IFS=$as_save_IFS
10192  test -z "$as_dir" && as_dir=.
10193    for ac_exec_ext in '' $ac_executable_extensions; do
10194  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10195    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10197    break 2
10198  fi
10199done
10200  done
10201IFS=$as_save_IFS
10202
10203  ;;
10204esac
10205fi
10206HG=$ac_cv_path_HG
10207if test -n "$HG"; then
10208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10209$as_echo "$HG" >&6; }
10210else
10211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10212$as_echo "no" >&6; }
10213fi
10214
10215
10216# Extract the first word of "stat", so it can be a program name with args.
10217set dummy stat; ac_word=$2
10218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10219$as_echo_n "checking for $ac_word... " >&6; }
10220if ${ac_cv_path_STAT+:} false; then :
10221  $as_echo_n "(cached) " >&6
10222else
10223  case $STAT in
10224  [\\/]* | ?:[\\/]*)
10225  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10226  ;;
10227  *)
10228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10229for as_dir in $PATH
10230do
10231  IFS=$as_save_IFS
10232  test -z "$as_dir" && as_dir=.
10233    for ac_exec_ext in '' $ac_executable_extensions; do
10234  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10235    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10237    break 2
10238  fi
10239done
10240  done
10241IFS=$as_save_IFS
10242
10243  ;;
10244esac
10245fi
10246STAT=$ac_cv_path_STAT
10247if test -n "$STAT"; then
10248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10249$as_echo "$STAT" >&6; }
10250else
10251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10252$as_echo "no" >&6; }
10253fi
10254
10255
10256# Extract the first word of "time", so it can be a program name with args.
10257set dummy time; ac_word=$2
10258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10259$as_echo_n "checking for $ac_word... " >&6; }
10260if ${ac_cv_path_TIME+:} false; then :
10261  $as_echo_n "(cached) " >&6
10262else
10263  case $TIME in
10264  [\\/]* | ?:[\\/]*)
10265  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10266  ;;
10267  *)
10268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10269for as_dir in $PATH
10270do
10271  IFS=$as_save_IFS
10272  test -z "$as_dir" && as_dir=.
10273    for ac_exec_ext in '' $ac_executable_extensions; do
10274  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10275    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10277    break 2
10278  fi
10279done
10280  done
10281IFS=$as_save_IFS
10282
10283  ;;
10284esac
10285fi
10286TIME=$ac_cv_path_TIME
10287if test -n "$TIME"; then
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10289$as_echo "$TIME" >&6; }
10290else
10291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10292$as_echo "no" >&6; }
10293fi
10294
10295
10296
10297if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10298
10299    for ac_prog in comm
10300do
10301  # Extract the first word of "$ac_prog", so it can be a program name with args.
10302set dummy $ac_prog; ac_word=$2
10303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10304$as_echo_n "checking for $ac_word... " >&6; }
10305if ${ac_cv_path_COMM+:} false; then :
10306  $as_echo_n "(cached) " >&6
10307else
10308  case $COMM in
10309  [\\/]* | ?:[\\/]*)
10310  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10311  ;;
10312  *)
10313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10314for as_dir in $PATH
10315do
10316  IFS=$as_save_IFS
10317  test -z "$as_dir" && as_dir=.
10318    for ac_exec_ext in '' $ac_executable_extensions; do
10319  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10320    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10322    break 2
10323  fi
10324done
10325  done
10326IFS=$as_save_IFS
10327
10328  ;;
10329esac
10330fi
10331COMM=$ac_cv_path_COMM
10332if test -n "$COMM"; then
10333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10334$as_echo "$COMM" >&6; }
10335else
10336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10337$as_echo "no" >&6; }
10338fi
10339
10340
10341  test -n "$COMM" && break
10342done
10343
10344
10345    if test "x$COMM" = x; then
10346        if test "xcomm" = x; then
10347          PROG_NAME=comm
10348        else
10349          PROG_NAME=comm
10350        fi
10351        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10352$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10353        as_fn_error $? "Cannot continue" "$LINENO" 5
10354    fi
10355
10356
10357fi
10358
10359
10360# Check if pkg-config is available.
10361
10362
10363if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10364	if test -n "$ac_tool_prefix"; then
10365  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10366set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10368$as_echo_n "checking for $ac_word... " >&6; }
10369if ${ac_cv_path_PKG_CONFIG+:} false; then :
10370  $as_echo_n "(cached) " >&6
10371else
10372  case $PKG_CONFIG in
10373  [\\/]* | ?:[\\/]*)
10374  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10375  ;;
10376  *)
10377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10378for as_dir in $PATH
10379do
10380  IFS=$as_save_IFS
10381  test -z "$as_dir" && as_dir=.
10382    for ac_exec_ext in '' $ac_executable_extensions; do
10383  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10384    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10386    break 2
10387  fi
10388done
10389  done
10390IFS=$as_save_IFS
10391
10392  ;;
10393esac
10394fi
10395PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10396if test -n "$PKG_CONFIG"; then
10397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10398$as_echo "$PKG_CONFIG" >&6; }
10399else
10400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10401$as_echo "no" >&6; }
10402fi
10403
10404
10405fi
10406if test -z "$ac_cv_path_PKG_CONFIG"; then
10407  ac_pt_PKG_CONFIG=$PKG_CONFIG
10408  # Extract the first word of "pkg-config", so it can be a program name with args.
10409set dummy pkg-config; ac_word=$2
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411$as_echo_n "checking for $ac_word... " >&6; }
10412if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10413  $as_echo_n "(cached) " >&6
10414else
10415  case $ac_pt_PKG_CONFIG in
10416  [\\/]* | ?:[\\/]*)
10417  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10418  ;;
10419  *)
10420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421for as_dir in $PATH
10422do
10423  IFS=$as_save_IFS
10424  test -z "$as_dir" && as_dir=.
10425    for ac_exec_ext in '' $ac_executable_extensions; do
10426  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10427    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429    break 2
10430  fi
10431done
10432  done
10433IFS=$as_save_IFS
10434
10435  ;;
10436esac
10437fi
10438ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10439if test -n "$ac_pt_PKG_CONFIG"; then
10440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10441$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10442else
10443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444$as_echo "no" >&6; }
10445fi
10446
10447  if test "x$ac_pt_PKG_CONFIG" = x; then
10448    PKG_CONFIG=""
10449  else
10450    case $cross_compiling:$ac_tool_warned in
10451yes:)
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10453$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10454ac_tool_warned=yes ;;
10455esac
10456    PKG_CONFIG=$ac_pt_PKG_CONFIG
10457  fi
10458else
10459  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10460fi
10461
10462fi
10463if test -n "$PKG_CONFIG"; then
10464	_pkg_min_version=0.9.0
10465	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10466$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10467	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10468		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10469$as_echo "yes" >&6; }
10470	else
10471		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472$as_echo "no" >&6; }
10473		PKG_CONFIG=""
10474	fi
10475
10476fi
10477
10478# After basic tools have been setup, we can check build os specific details.
10479
10480###############################################################################
10481
10482# Note that this is the build platform OS version!
10483
10484OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10485OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10486OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10487OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10488
10489
10490
10491
10492
10493# Setup builddeps, for automatic downloading of tools we need.
10494# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10495# boot-jdk setup, but we need to have basic tools setup first.
10496
10497
10498# Check whether --with-builddeps-conf was given.
10499if test "${with_builddeps_conf+set}" = set; then :
10500  withval=$with_builddeps_conf;
10501fi
10502
10503
10504
10505# Check whether --with-builddeps-server was given.
10506if test "${with_builddeps_server+set}" = set; then :
10507  withval=$with_builddeps_server;
10508fi
10509
10510
10511
10512# Check whether --with-builddeps-dir was given.
10513if test "${with_builddeps_dir+set}" = set; then :
10514  withval=$with_builddeps_dir;
10515else
10516  with_builddeps_dir=/localhome/builddeps
10517fi
10518
10519
10520
10521# Check whether --with-builddeps-group was given.
10522if test "${with_builddeps_group+set}" = set; then :
10523  withval=$with_builddeps_group;
10524fi
10525
10526
10527
10528
10529    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10530        if test "x$with_builddeps_conf" != x; then
10531            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10532$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10533            builddepsfile=$with_builddeps_conf
10534            if test -s $builddepsfile; then
10535                . $builddepsfile
10536                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10537$as_echo "loaded!" >&6; }
10538            else
10539               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10540           fi
10541        else
10542            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10543$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10544            builddepsfile=`mktemp`
10545            touch $builddepsfile
10546            # Put all found confs into a single file.
10547            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10548            # Source the file to acquire the variables
10549            if test -s $builddepsfile; then
10550                . $builddepsfile
10551                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10552$as_echo "found at least one!" >&6; }
10553            else
10554               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10555           fi
10556        fi
10557        # Create build and target names that use _ instead of "-" and ".".
10558        # This is necessary to use them in variable names.
10559        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10560        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10561        # Extract rewrite information for build and target
10562        eval rewritten_build=\${REWRITE_${build_var}}
10563        if test "x$rewritten_build" = x; then
10564            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10565            echo Build stays the same $rewritten_build
10566        else
10567            echo Rewriting build for builddeps into $rewritten_build
10568        fi
10569        eval rewritten_target=\${REWRITE_${target_var}}
10570        if test "x$rewritten_target" = x; then
10571            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10572            echo Target stays the same $rewritten_target
10573        else
10574            echo Rewriting target for builddeps into $rewritten_target
10575        fi
10576        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10577        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10578    fi
10579    for ac_prog in 7z unzip
10580do
10581  # Extract the first word of "$ac_prog", so it can be a program name with args.
10582set dummy $ac_prog; ac_word=$2
10583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10584$as_echo_n "checking for $ac_word... " >&6; }
10585if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10586  $as_echo_n "(cached) " >&6
10587else
10588  if test -n "$BDEPS_UNZIP"; then
10589  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10590else
10591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10592for as_dir in $PATH
10593do
10594  IFS=$as_save_IFS
10595  test -z "$as_dir" && as_dir=.
10596    for ac_exec_ext in '' $ac_executable_extensions; do
10597  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10598    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10600    break 2
10601  fi
10602done
10603  done
10604IFS=$as_save_IFS
10605
10606fi
10607fi
10608BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10609if test -n "$BDEPS_UNZIP"; then
10610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10611$as_echo "$BDEPS_UNZIP" >&6; }
10612else
10613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10614$as_echo "no" >&6; }
10615fi
10616
10617
10618  test -n "$BDEPS_UNZIP" && break
10619done
10620
10621    if test "x$BDEPS_UNZIP" = x7z; then
10622        BDEPS_UNZIP="7z x"
10623    fi
10624
10625    for ac_prog in wget lftp ftp
10626do
10627  # Extract the first word of "$ac_prog", so it can be a program name with args.
10628set dummy $ac_prog; ac_word=$2
10629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10630$as_echo_n "checking for $ac_word... " >&6; }
10631if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10632  $as_echo_n "(cached) " >&6
10633else
10634  if test -n "$BDEPS_FTP"; then
10635  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10636else
10637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10638for as_dir in $PATH
10639do
10640  IFS=$as_save_IFS
10641  test -z "$as_dir" && as_dir=.
10642    for ac_exec_ext in '' $ac_executable_extensions; do
10643  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10644    ac_cv_prog_BDEPS_FTP="$ac_prog"
10645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10646    break 2
10647  fi
10648done
10649  done
10650IFS=$as_save_IFS
10651
10652fi
10653fi
10654BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10655if test -n "$BDEPS_FTP"; then
10656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10657$as_echo "$BDEPS_FTP" >&6; }
10658else
10659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10660$as_echo "no" >&6; }
10661fi
10662
10663
10664  test -n "$BDEPS_FTP" && break
10665done
10666
10667
10668
10669###############################################################################
10670#
10671# Determine OpenJDK variants, options and version numbers.
10672#
10673###############################################################################
10674
10675# We need build & target for this.
10676
10677
10678###############################################################################
10679#
10680# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10681# We always build headless support.
10682#
10683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10684$as_echo_n "checking headful support... " >&6; }
10685# Check whether --enable-headful was given.
10686if test "${enable_headful+set}" = set; then :
10687  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10688else
10689  SUPPORT_HEADFUL=yes
10690fi
10691
10692
10693SUPPORT_HEADLESS=yes
10694BUILD_HEADLESS="BUILD_HEADLESS:=true"
10695
10696if test "x$SUPPORT_HEADFUL" = xyes; then
10697    # We are building both headful and headless.
10698    headful_msg="inlude support for both headful and headless"
10699fi
10700
10701if test "x$SUPPORT_HEADFUL" = xno; then
10702    # Thus we are building headless only.
10703    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10704    headful_msg="headless only"
10705fi
10706
10707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10708$as_echo "$headful_msg" >&6; }
10709
10710
10711
10712
10713
10714# Control wether Hotspot runs Queens test after build.
10715# Check whether --enable-hotspot-test-in-build was given.
10716if test "${enable_hotspot_test_in_build+set}" = set; then :
10717  enableval=$enable_hotspot_test_in_build;
10718else
10719  enable_hotspot_test_in_build=no
10720fi
10721
10722if test "x$enable_hotspot_test_in_build" = "xyes"; then
10723    TEST_IN_BUILD=true
10724else
10725    TEST_IN_BUILD=false
10726fi
10727
10728
10729###############################################################################
10730#
10731# Choose cacerts source file
10732#
10733
10734# Check whether --with-cacerts-file was given.
10735if test "${with_cacerts_file+set}" = set; then :
10736  withval=$with_cacerts_file;
10737fi
10738
10739if test "x$with_cacerts_file" != x; then
10740    CACERTS_FILE=$with_cacerts_file
10741else
10742    if test "x$OPENJDK" = "xtrue"; then
10743        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10744    else
10745        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10746    fi
10747fi
10748
10749
10750###############################################################################
10751#
10752# Enable or disable unlimited crypto
10753#
10754# Check whether --enable-unlimited-crypto was given.
10755if test "${enable_unlimited_crypto+set}" = set; then :
10756  enableval=$enable_unlimited_crypto;
10757else
10758  enable_unlimited_crypto=no
10759fi
10760
10761if test "x$enable_unlimited_crypto" = "xyes"; then
10762    UNLIMITED_CRYPTO=true
10763else
10764    UNLIMITED_CRYPTO=false
10765fi
10766
10767
10768###############################################################################
10769#
10770# Compress jars
10771#
10772COMPRESS_JARS=false
10773
10774
10775
10776
10777# Source the version numbers
10778. $AUTOCONF_DIR/version-numbers
10779
10780# Get the settings from parameters
10781
10782# Check whether --with-milestone was given.
10783if test "${with_milestone+set}" = set; then :
10784  withval=$with_milestone;
10785fi
10786
10787if test "x$with_milestone" = xyes; then
10788  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10789elif test "x$with_milestone" != x; then
10790    MILESTONE="$with_milestone"
10791fi
10792if test "x$MILESTONE" = x; then
10793  MILESTONE=internal
10794fi
10795
10796
10797# Check whether --with-build-number was given.
10798if test "${with_build_number+set}" = set; then :
10799  withval=$with_build_number;
10800fi
10801
10802if test "x$with_build_number" = xyes; then
10803  as_fn_error $? "Build number must have a value" "$LINENO" 5
10804elif test "x$with_build_number" != x; then
10805  JDK_BUILD_NUMBER="$with_build_number"
10806fi
10807if test "x$JDK_BUILD_NUMBER" = x; then
10808  JDK_BUILD_NUMBER=b00
10809fi
10810
10811
10812# Check whether --with-user-release-suffix was given.
10813if test "${with_user_release_suffix+set}" = set; then :
10814  withval=$with_user_release_suffix;
10815fi
10816
10817if test "x$with_user_release_suffix" = xyes; then
10818  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10819elif test "x$with_user_release_suffix" != x; then
10820  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10821else
10822  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10823  # Avoid [:alnum:] since it depends on the locale.
10824  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10825  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10826fi
10827
10828
10829# Now set the JDK version, milestone, build number etc.
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844COPYRIGHT_YEAR=`date +'%Y'`
10845
10846
10847if test "x$JDK_UPDATE_VERSION" != x; then
10848  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10849else
10850  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10851fi
10852
10853
10854COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10855
10856
10857
10858###############################################################################
10859#
10860# Setup BootJDK, used to bootstrap the build.
10861#
10862###############################################################################
10863
10864
10865BOOT_JDK_FOUND=no
10866
10867# Check whether --with-boot-jdk was given.
10868if test "${with_boot_jdk+set}" = set; then :
10869  withval=$with_boot_jdk;
10870fi
10871
10872
10873# We look for the Boot JDK through various means, going from more certain to
10874# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10875# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10876# must check if this is indeed valid; otherwise we'll continue looking.
10877
10878# Test: Is bootjdk explicitely set by command line arguments?
10879
10880  if test "x$BOOT_JDK_FOUND" = xno; then
10881    # Now execute the test
10882
10883if test "x$with_boot_jdk" != x; then
10884    BOOT_JDK=$with_boot_jdk
10885    BOOT_JDK_FOUND=maybe
10886    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10887$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10888fi
10889
10890
10891    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10892    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10893      # Do we have a bin/java?
10894      if test ! -x "$BOOT_JDK/bin/java"; then
10895        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10896$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10897        BOOT_JDK_FOUND=no
10898      else
10899        # Do we have a bin/javac?
10900        if test ! -x "$BOOT_JDK/bin/javac"; then
10901          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10903          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10904$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10905          BOOT_JDK_FOUND=no
10906        else
10907          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10908          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10909            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10911            BOOT_JDK_FOUND=no
10912          else
10913            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10914            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10915
10916            # Extra M4 quote needed to protect [] in grep expression.
10917            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10918            if test "x$FOUND_VERSION_78" = x; then
10919              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10921              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10922$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10923              BOOT_JDK_FOUND=no
10924            else
10925              # We're done! :-)
10926              BOOT_JDK_FOUND=yes
10927
10928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10929
10930  # Input might be given as Windows format, start by converting to
10931  # unix format.
10932  path="$BOOT_JDK"
10933  new_path=`$CYGPATH -u "$path"`
10934
10935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10938  # "foo.exe" is OK but "foo" is an error.
10939  #
10940  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10941  # It is also a way to make sure we got the proper file name for the real test later on.
10942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10943  if test "x$test_shortpath" = x; then
10944    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10946    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10947  fi
10948
10949  # Call helper function which possibly converts this using DOS-style short mode.
10950  # If so, the updated path is stored in $new_path.
10951
10952  input_path="$new_path"
10953  # Check if we need to convert this using DOS-style short mode. If the path
10954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10955  # take no chances and rewrite it.
10956  # Note: m4 eats our [], so we need to use [ and ] instead.
10957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10958  if test "x$has_forbidden_chars" != x; then
10959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10963      # Going to short mode and back again did indeed matter. Since short mode is
10964      # case insensitive, let's make it lowercase to improve readability.
10965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10966      # Now convert it back to Unix-stile (cygpath)
10967      input_path=`$CYGPATH -u "$shortmode_path"`
10968      new_path="$input_path"
10969    fi
10970  fi
10971
10972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10973  if test "x$test_cygdrive_prefix" = x; then
10974    # As a simple fix, exclude /usr/bin since it's not a real path.
10975    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10977      # a path prefixed by /cygdrive for fixpath to work.
10978      new_path="$CYGWIN_ROOT_PATH$input_path"
10979    fi
10980  fi
10981
10982
10983  if test "x$path" != "x$new_path"; then
10984    BOOT_JDK="$new_path"
10985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10986$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10987  fi
10988
10989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10990
10991  path="$BOOT_JDK"
10992  has_colon=`$ECHO $path | $GREP ^.:`
10993  new_path="$path"
10994  if test "x$has_colon" = x; then
10995    # Not in mixed or Windows style, start by that.
10996    new_path=`cmd //c echo $path`
10997  fi
10998
10999
11000  input_path="$new_path"
11001  # Check if we need to convert this using DOS-style short mode. If the path
11002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11003  # take no chances and rewrite it.
11004  # Note: m4 eats our [], so we need to use [ and ] instead.
11005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11006  if test "x$has_forbidden_chars" != x; then
11007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11009  fi
11010
11011
11012  windows_path="$new_path"
11013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11014    unix_path=`$CYGPATH -u "$windows_path"`
11015    new_path="$unix_path"
11016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11018    new_path="$unix_path"
11019  fi
11020
11021  if test "x$path" != "x$new_path"; then
11022    BOOT_JDK="$new_path"
11023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11025  fi
11026
11027  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11028  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11029
11030  else
11031    # We're on a posix platform. Hooray! :)
11032    path="$BOOT_JDK"
11033
11034    if test ! -f "$path" && test ! -d "$path"; then
11035      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11036    fi
11037
11038    has_space=`$ECHO "$path" | $GREP " "`
11039    if test "x$has_space" != x; then
11040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11041$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11042      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11043    fi
11044  fi
11045
11046              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11047$as_echo_n "checking for Boot JDK... " >&6; }
11048              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11049$as_echo "$BOOT_JDK" >&6; }
11050              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11051$as_echo_n "checking Boot JDK version... " >&6; }
11052              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11053              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11054$as_echo "$BOOT_JDK_VERSION" >&6; }
11055            fi # end check jdk version
11056          fi # end check rt.jar
11057        fi # end check javac
11058      fi # end check java
11059    fi # end check boot jdk found
11060  fi
11061
11062if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11063  # Having specified an argument which is incorrect will produce an instant failure;
11064  # we should not go on looking
11065  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11066fi
11067
11068# Test: Is bootjdk available from builddeps?
11069
11070  if test "x$BOOT_JDK_FOUND" = xno; then
11071    # Now execute the test
11072
11073
11074
11075    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11076        # Source the builddeps file again, to make sure it uses the latest variables!
11077        . $builddepsfile
11078        # Look for a target and build machine specific resource!
11079        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11080        if test "x$resource" = x; then
11081            # Ok, lets instead look for a target specific resource
11082            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11083        fi
11084        if test "x$resource" = x; then
11085            # Ok, lets instead look for a build specific resource
11086            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11087        fi
11088        if test "x$resource" = x; then
11089            # Ok, lets instead look for a generic resource
11090            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11091            resource=${builddep_bootjdk}
11092        fi
11093        if test "x$resource" != x; then
11094            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11095$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11096	    # If the resource in the builddeps.conf file is an existing directory,
11097	    # for example /java/linux/cups
11098	    if test -d ${resource}; then
11099	       depdir=${resource}
11100	    else
11101
11102# bootjdk is for example mymodule
11103# $resource is for example libs/general/libmymod_1_2_3.zip
11104# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11105# $with_builddeps_dir is for example /localhome/builddeps
11106# depdir is the name of the variable into which we store the depdir, eg MYMOD
11107# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11108# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11109    filename=`basename $resource`
11110    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11111    filebase=${filename%%.*}
11112    extension=${filename#*.}
11113    installdir=$with_builddeps_dir/$filebase
11114    if test ! -f $installdir/$filename.unpacked; then
11115        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11116$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11117        if test ! -d $installdir; then
11118            mkdir -p $installdir
11119        fi
11120        if test ! -d $installdir; then
11121            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11122        fi
11123        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11124        touch $tmpfile
11125        if test ! -f $tmpfile; then
11126            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11127        fi
11128
11129    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11130    # $tmpfile is the local file name for the downloaded file.
11131    VALID_TOOL=no
11132    if test "x$BDEPS_FTP" = xwget; then
11133       VALID_TOOL=yes
11134       wget -O $tmpfile $with_builddeps_server/$resource
11135    fi
11136    if test "x$BDEPS_FTP" = xlftp; then
11137       VALID_TOOL=yes
11138       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11139    fi
11140    if test "x$BDEPS_FTP" = xftp; then
11141        VALID_TOOL=yes
11142        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11143        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11144        FTPUSERPWD=${FTPSERVER%%@*}
11145        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11146            FTPUSER=${userpwd%%:*}
11147            FTPPWD=${userpwd#*@}
11148            FTPSERVER=${FTPSERVER#*@}
11149        else
11150            FTPUSER=ftp
11151            FTPPWD=ftp
11152        fi
11153        # the "pass" command does not work on some
11154        # ftp clients (read ftp.exe) but if it works,
11155        # passive mode is better!
11156        (\
11157            echo "user $FTPUSER $FTPPWD"        ;\
11158            echo "pass"                         ;\
11159            echo "bin"                          ;\
11160            echo "get $FTPPATH $tmpfile"              ;\
11161        ) | ftp -in $FTPSERVER
11162    fi
11163    if test "x$VALID_TOOL" != xyes; then
11164       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11165    fi
11166
11167        mv $tmpfile $installdir/$filename
11168        if test ! -s $installdir/$filename; then
11169            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11170        fi
11171        case "$extension" in
11172            zip)  echo "Unzipping $installdir/$filename..."
11173               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11174            ;;
11175            tar.gz) echo "Untaring $installdir/$filename..."
11176               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11177            ;;
11178            tgz) echo "Untaring $installdir/$filename..."
11179               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11180            ;;
11181            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11182            ;;
11183        esac
11184    fi
11185    if test -f $installdir/$filename.unpacked; then
11186        depdir=$installdir
11187    fi
11188
11189	    fi
11190            # Source the builddeps file again, because in the previous command, the depdir
11191            # was updated to point at the current build dependency install directory.
11192            . $builddepsfile
11193            # Now extract variables from the builddeps.conf files.
11194            theroot=${builddep_bootjdk_ROOT}
11195            thecflags=${builddep_bootjdk_CFLAGS}
11196            thelibs=${builddep_bootjdk_LIBS}
11197            if test "x$depdir" = x; then
11198                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11199            fi
11200            BOOT_JDK=$depdir
11201            if test "x$theroot" != x; then
11202               BOOT_JDK="$theroot"
11203            fi
11204            if test "x$thecflags" != x; then
11205               BOOT_JDK_CFLAGS="$thecflags"
11206            fi
11207            if test "x$thelibs" != x; then
11208               BOOT_JDK_LIBS="$thelibs"
11209            fi
11210            BOOT_JDK_FOUND=maybe
11211            else BOOT_JDK_FOUND=no
11212
11213        fi
11214        else BOOT_JDK_FOUND=no
11215
11216    fi
11217
11218
11219
11220    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11221    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11222      # Do we have a bin/java?
11223      if test ! -x "$BOOT_JDK/bin/java"; then
11224        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11225$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11226        BOOT_JDK_FOUND=no
11227      else
11228        # Do we have a bin/javac?
11229        if test ! -x "$BOOT_JDK/bin/javac"; then
11230          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11232          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11233$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11234          BOOT_JDK_FOUND=no
11235        else
11236          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11237          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11238            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11240            BOOT_JDK_FOUND=no
11241          else
11242            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11243            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11244
11245            # Extra M4 quote needed to protect [] in grep expression.
11246            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11247            if test "x$FOUND_VERSION_78" = x; then
11248              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11250              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11251$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11252              BOOT_JDK_FOUND=no
11253            else
11254              # We're done! :-)
11255              BOOT_JDK_FOUND=yes
11256
11257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11258
11259  # Input might be given as Windows format, start by converting to
11260  # unix format.
11261  path="$BOOT_JDK"
11262  new_path=`$CYGPATH -u "$path"`
11263
11264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11267  # "foo.exe" is OK but "foo" is an error.
11268  #
11269  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11270  # It is also a way to make sure we got the proper file name for the real test later on.
11271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11272  if test "x$test_shortpath" = x; then
11273    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11274$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11275    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11276  fi
11277
11278  # Call helper function which possibly converts this using DOS-style short mode.
11279  # If so, the updated path is stored in $new_path.
11280
11281  input_path="$new_path"
11282  # Check if we need to convert this using DOS-style short mode. If the path
11283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11284  # take no chances and rewrite it.
11285  # Note: m4 eats our [], so we need to use [ and ] instead.
11286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11287  if test "x$has_forbidden_chars" != x; then
11288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11292      # Going to short mode and back again did indeed matter. Since short mode is
11293      # case insensitive, let's make it lowercase to improve readability.
11294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11295      # Now convert it back to Unix-stile (cygpath)
11296      input_path=`$CYGPATH -u "$shortmode_path"`
11297      new_path="$input_path"
11298    fi
11299  fi
11300
11301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11302  if test "x$test_cygdrive_prefix" = x; then
11303    # As a simple fix, exclude /usr/bin since it's not a real path.
11304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11306      # a path prefixed by /cygdrive for fixpath to work.
11307      new_path="$CYGWIN_ROOT_PATH$input_path"
11308    fi
11309  fi
11310
11311
11312  if test "x$path" != "x$new_path"; then
11313    BOOT_JDK="$new_path"
11314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11316  fi
11317
11318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11319
11320  path="$BOOT_JDK"
11321  has_colon=`$ECHO $path | $GREP ^.:`
11322  new_path="$path"
11323  if test "x$has_colon" = x; then
11324    # Not in mixed or Windows style, start by that.
11325    new_path=`cmd //c echo $path`
11326  fi
11327
11328
11329  input_path="$new_path"
11330  # Check if we need to convert this using DOS-style short mode. If the path
11331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11332  # take no chances and rewrite it.
11333  # Note: m4 eats our [], so we need to use [ and ] instead.
11334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11335  if test "x$has_forbidden_chars" != x; then
11336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11338  fi
11339
11340
11341  windows_path="$new_path"
11342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11343    unix_path=`$CYGPATH -u "$windows_path"`
11344    new_path="$unix_path"
11345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11347    new_path="$unix_path"
11348  fi
11349
11350  if test "x$path" != "x$new_path"; then
11351    BOOT_JDK="$new_path"
11352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11353$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11354  fi
11355
11356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11358
11359  else
11360    # We're on a posix platform. Hooray! :)
11361    path="$BOOT_JDK"
11362
11363    if test ! -f "$path" && test ! -d "$path"; then
11364      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11365    fi
11366
11367    has_space=`$ECHO "$path" | $GREP " "`
11368    if test "x$has_space" != x; then
11369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11371      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11372    fi
11373  fi
11374
11375              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11376$as_echo_n "checking for Boot JDK... " >&6; }
11377              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11378$as_echo "$BOOT_JDK" >&6; }
11379              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11380$as_echo_n "checking Boot JDK version... " >&6; }
11381              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11382              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11383$as_echo "$BOOT_JDK_VERSION" >&6; }
11384            fi # end check jdk version
11385          fi # end check rt.jar
11386        fi # end check javac
11387      fi # end check java
11388    fi # end check boot jdk found
11389  fi
11390
11391
11392# Test: Is $JAVA_HOME set?
11393
11394  if test "x$BOOT_JDK_FOUND" = xno; then
11395    # Now execute the test
11396
11397    if test "x$JAVA_HOME" != x; then
11398        JAVA_HOME_PROCESSED="$JAVA_HOME"
11399
11400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11401
11402  # Input might be given as Windows format, start by converting to
11403  # unix format.
11404  path="$JAVA_HOME_PROCESSED"
11405  new_path=`$CYGPATH -u "$path"`
11406
11407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11410  # "foo.exe" is OK but "foo" is an error.
11411  #
11412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11413  # It is also a way to make sure we got the proper file name for the real test later on.
11414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11415  if test "x$test_shortpath" = x; then
11416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11417$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11418    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11419  fi
11420
11421  # Call helper function which possibly converts this using DOS-style short mode.
11422  # If so, the updated path is stored in $new_path.
11423
11424  input_path="$new_path"
11425  # Check if we need to convert this using DOS-style short mode. If the path
11426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11427  # take no chances and rewrite it.
11428  # Note: m4 eats our [], so we need to use [ and ] instead.
11429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11430  if test "x$has_forbidden_chars" != x; then
11431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11435      # Going to short mode and back again did indeed matter. Since short mode is
11436      # case insensitive, let's make it lowercase to improve readability.
11437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11438      # Now convert it back to Unix-stile (cygpath)
11439      input_path=`$CYGPATH -u "$shortmode_path"`
11440      new_path="$input_path"
11441    fi
11442  fi
11443
11444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11445  if test "x$test_cygdrive_prefix" = x; then
11446    # As a simple fix, exclude /usr/bin since it's not a real path.
11447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11449      # a path prefixed by /cygdrive for fixpath to work.
11450      new_path="$CYGWIN_ROOT_PATH$input_path"
11451    fi
11452  fi
11453
11454
11455  if test "x$path" != "x$new_path"; then
11456    JAVA_HOME_PROCESSED="$new_path"
11457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11458$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11459  fi
11460
11461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11462
11463  path="$JAVA_HOME_PROCESSED"
11464  has_colon=`$ECHO $path | $GREP ^.:`
11465  new_path="$path"
11466  if test "x$has_colon" = x; then
11467    # Not in mixed or Windows style, start by that.
11468    new_path=`cmd //c echo $path`
11469  fi
11470
11471
11472  input_path="$new_path"
11473  # Check if we need to convert this using DOS-style short mode. If the path
11474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11475  # take no chances and rewrite it.
11476  # Note: m4 eats our [], so we need to use [ and ] instead.
11477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11478  if test "x$has_forbidden_chars" != x; then
11479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11481  fi
11482
11483
11484  windows_path="$new_path"
11485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11486    unix_path=`$CYGPATH -u "$windows_path"`
11487    new_path="$unix_path"
11488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11490    new_path="$unix_path"
11491  fi
11492
11493  if test "x$path" != "x$new_path"; then
11494    JAVA_HOME_PROCESSED="$new_path"
11495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11496$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11497  fi
11498
11499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11501
11502  else
11503    # We're on a posix platform. Hooray! :)
11504    path="$JAVA_HOME_PROCESSED"
11505
11506    if test ! -f "$path" && test ! -d "$path"; then
11507      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11508    fi
11509
11510    has_space=`$ECHO "$path" | $GREP " "`
11511    if test "x$has_space" != x; then
11512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11513$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11514      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11515    fi
11516  fi
11517
11518        if test ! -d "$JAVA_HOME_PROCESSED"; then
11519            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11520$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11521        else
11522          # Aha, the user has set a JAVA_HOME
11523          # let us use that as the Boot JDK.
11524          BOOT_JDK="$JAVA_HOME_PROCESSED"
11525          BOOT_JDK_FOUND=maybe
11526          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11527$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11528        fi
11529    fi
11530
11531
11532    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11533    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11534      # Do we have a bin/java?
11535      if test ! -x "$BOOT_JDK/bin/java"; then
11536        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11537$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11538        BOOT_JDK_FOUND=no
11539      else
11540        # Do we have a bin/javac?
11541        if test ! -x "$BOOT_JDK/bin/javac"; then
11542          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11544          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11545$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11546          BOOT_JDK_FOUND=no
11547        else
11548          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11549          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11550            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11552            BOOT_JDK_FOUND=no
11553          else
11554            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11555            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11556
11557            # Extra M4 quote needed to protect [] in grep expression.
11558            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11559            if test "x$FOUND_VERSION_78" = x; then
11560              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11562              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11563$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11564              BOOT_JDK_FOUND=no
11565            else
11566              # We're done! :-)
11567              BOOT_JDK_FOUND=yes
11568
11569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11570
11571  # Input might be given as Windows format, start by converting to
11572  # unix format.
11573  path="$BOOT_JDK"
11574  new_path=`$CYGPATH -u "$path"`
11575
11576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11579  # "foo.exe" is OK but "foo" is an error.
11580  #
11581  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11582  # It is also a way to make sure we got the proper file name for the real test later on.
11583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11584  if test "x$test_shortpath" = x; then
11585    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11586$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11587    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11588  fi
11589
11590  # Call helper function which possibly converts this using DOS-style short mode.
11591  # If so, the updated path is stored in $new_path.
11592
11593  input_path="$new_path"
11594  # Check if we need to convert this using DOS-style short mode. If the path
11595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11596  # take no chances and rewrite it.
11597  # Note: m4 eats our [], so we need to use [ and ] instead.
11598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11599  if test "x$has_forbidden_chars" != x; then
11600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11604      # Going to short mode and back again did indeed matter. Since short mode is
11605      # case insensitive, let's make it lowercase to improve readability.
11606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11607      # Now convert it back to Unix-stile (cygpath)
11608      input_path=`$CYGPATH -u "$shortmode_path"`
11609      new_path="$input_path"
11610    fi
11611  fi
11612
11613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11614  if test "x$test_cygdrive_prefix" = x; then
11615    # As a simple fix, exclude /usr/bin since it's not a real path.
11616    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11618      # a path prefixed by /cygdrive for fixpath to work.
11619      new_path="$CYGWIN_ROOT_PATH$input_path"
11620    fi
11621  fi
11622
11623
11624  if test "x$path" != "x$new_path"; then
11625    BOOT_JDK="$new_path"
11626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11627$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11628  fi
11629
11630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11631
11632  path="$BOOT_JDK"
11633  has_colon=`$ECHO $path | $GREP ^.:`
11634  new_path="$path"
11635  if test "x$has_colon" = x; then
11636    # Not in mixed or Windows style, start by that.
11637    new_path=`cmd //c echo $path`
11638  fi
11639
11640
11641  input_path="$new_path"
11642  # Check if we need to convert this using DOS-style short mode. If the path
11643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11644  # take no chances and rewrite it.
11645  # Note: m4 eats our [], so we need to use [ and ] instead.
11646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11647  if test "x$has_forbidden_chars" != x; then
11648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11650  fi
11651
11652
11653  windows_path="$new_path"
11654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11655    unix_path=`$CYGPATH -u "$windows_path"`
11656    new_path="$unix_path"
11657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11659    new_path="$unix_path"
11660  fi
11661
11662  if test "x$path" != "x$new_path"; then
11663    BOOT_JDK="$new_path"
11664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11665$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11666  fi
11667
11668  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11669  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11670
11671  else
11672    # We're on a posix platform. Hooray! :)
11673    path="$BOOT_JDK"
11674
11675    if test ! -f "$path" && test ! -d "$path"; then
11676      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11677    fi
11678
11679    has_space=`$ECHO "$path" | $GREP " "`
11680    if test "x$has_space" != x; then
11681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11682$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11683      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11684    fi
11685  fi
11686
11687              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11688$as_echo_n "checking for Boot JDK... " >&6; }
11689              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11690$as_echo "$BOOT_JDK" >&6; }
11691              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11692$as_echo_n "checking Boot JDK version... " >&6; }
11693              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11694              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11695$as_echo "$BOOT_JDK_VERSION" >&6; }
11696            fi # end check jdk version
11697          fi # end check rt.jar
11698        fi # end check javac
11699      fi # end check java
11700    fi # end check boot jdk found
11701  fi
11702
11703
11704# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11705
11706  if test "x$BOOT_JDK_FOUND" = xno; then
11707    # Now execute the test
11708
11709    if test -x /usr/libexec/java_home; then
11710        BOOT_JDK=`/usr/libexec/java_home`
11711        BOOT_JDK_FOUND=maybe
11712        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11713$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11714    fi
11715
11716
11717    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11718    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11719      # Do we have a bin/java?
11720      if test ! -x "$BOOT_JDK/bin/java"; then
11721        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11723        BOOT_JDK_FOUND=no
11724      else
11725        # Do we have a bin/javac?
11726        if test ! -x "$BOOT_JDK/bin/javac"; then
11727          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11729          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11730$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11731          BOOT_JDK_FOUND=no
11732        else
11733          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11734          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11735            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11737            BOOT_JDK_FOUND=no
11738          else
11739            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11740            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11741
11742            # Extra M4 quote needed to protect [] in grep expression.
11743            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11744            if test "x$FOUND_VERSION_78" = x; then
11745              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11747              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11748$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11749              BOOT_JDK_FOUND=no
11750            else
11751              # We're done! :-)
11752              BOOT_JDK_FOUND=yes
11753
11754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11755
11756  # Input might be given as Windows format, start by converting to
11757  # unix format.
11758  path="$BOOT_JDK"
11759  new_path=`$CYGPATH -u "$path"`
11760
11761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11764  # "foo.exe" is OK but "foo" is an error.
11765  #
11766  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11767  # It is also a way to make sure we got the proper file name for the real test later on.
11768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11769  if test "x$test_shortpath" = x; then
11770    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11771$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11772    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11773  fi
11774
11775  # Call helper function which possibly converts this using DOS-style short mode.
11776  # If so, the updated path is stored in $new_path.
11777
11778  input_path="$new_path"
11779  # Check if we need to convert this using DOS-style short mode. If the path
11780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11781  # take no chances and rewrite it.
11782  # Note: m4 eats our [], so we need to use [ and ] instead.
11783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11784  if test "x$has_forbidden_chars" != x; then
11785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11789      # Going to short mode and back again did indeed matter. Since short mode is
11790      # case insensitive, let's make it lowercase to improve readability.
11791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11792      # Now convert it back to Unix-stile (cygpath)
11793      input_path=`$CYGPATH -u "$shortmode_path"`
11794      new_path="$input_path"
11795    fi
11796  fi
11797
11798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11799  if test "x$test_cygdrive_prefix" = x; then
11800    # As a simple fix, exclude /usr/bin since it's not a real path.
11801    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11803      # a path prefixed by /cygdrive for fixpath to work.
11804      new_path="$CYGWIN_ROOT_PATH$input_path"
11805    fi
11806  fi
11807
11808
11809  if test "x$path" != "x$new_path"; then
11810    BOOT_JDK="$new_path"
11811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11812$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11813  fi
11814
11815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11816
11817  path="$BOOT_JDK"
11818  has_colon=`$ECHO $path | $GREP ^.:`
11819  new_path="$path"
11820  if test "x$has_colon" = x; then
11821    # Not in mixed or Windows style, start by that.
11822    new_path=`cmd //c echo $path`
11823  fi
11824
11825
11826  input_path="$new_path"
11827  # Check if we need to convert this using DOS-style short mode. If the path
11828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11829  # take no chances and rewrite it.
11830  # Note: m4 eats our [], so we need to use [ and ] instead.
11831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11832  if test "x$has_forbidden_chars" != x; then
11833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11835  fi
11836
11837
11838  windows_path="$new_path"
11839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11840    unix_path=`$CYGPATH -u "$windows_path"`
11841    new_path="$unix_path"
11842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11844    new_path="$unix_path"
11845  fi
11846
11847  if test "x$path" != "x$new_path"; then
11848    BOOT_JDK="$new_path"
11849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11850$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11851  fi
11852
11853  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11854  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11855
11856  else
11857    # We're on a posix platform. Hooray! :)
11858    path="$BOOT_JDK"
11859
11860    if test ! -f "$path" && test ! -d "$path"; then
11861      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11862    fi
11863
11864    has_space=`$ECHO "$path" | $GREP " "`
11865    if test "x$has_space" != x; then
11866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11867$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11868      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11869    fi
11870  fi
11871
11872              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11873$as_echo_n "checking for Boot JDK... " >&6; }
11874              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11875$as_echo "$BOOT_JDK" >&6; }
11876              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11877$as_echo_n "checking Boot JDK version... " >&6; }
11878              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11879              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11880$as_echo "$BOOT_JDK_VERSION" >&6; }
11881            fi # end check jdk version
11882          fi # end check rt.jar
11883        fi # end check javac
11884      fi # end check java
11885    fi # end check boot jdk found
11886  fi
11887
11888
11889# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11890
11891  if test "x$BOOT_JDK_FOUND" = xno; then
11892    # Now execute the test
11893
11894    # Extract the first word of "javac", so it can be a program name with args.
11895set dummy javac; ac_word=$2
11896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11897$as_echo_n "checking for $ac_word... " >&6; }
11898if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11899  $as_echo_n "(cached) " >&6
11900else
11901  case $JAVAC_CHECK in
11902  [\\/]* | ?:[\\/]*)
11903  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11904  ;;
11905  *)
11906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11907for as_dir in $PATH
11908do
11909  IFS=$as_save_IFS
11910  test -z "$as_dir" && as_dir=.
11911    for ac_exec_ext in '' $ac_executable_extensions; do
11912  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11913    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11915    break 2
11916  fi
11917done
11918  done
11919IFS=$as_save_IFS
11920
11921  ;;
11922esac
11923fi
11924JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11925if test -n "$JAVAC_CHECK"; then
11926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11927$as_echo "$JAVAC_CHECK" >&6; }
11928else
11929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11930$as_echo "no" >&6; }
11931fi
11932
11933
11934    # Extract the first word of "java", so it can be a program name with args.
11935set dummy java; ac_word=$2
11936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11937$as_echo_n "checking for $ac_word... " >&6; }
11938if ${ac_cv_path_JAVA_CHECK+:} false; then :
11939  $as_echo_n "(cached) " >&6
11940else
11941  case $JAVA_CHECK in
11942  [\\/]* | ?:[\\/]*)
11943  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11944  ;;
11945  *)
11946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11947for as_dir in $PATH
11948do
11949  IFS=$as_save_IFS
11950  test -z "$as_dir" && as_dir=.
11951    for ac_exec_ext in '' $ac_executable_extensions; do
11952  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11953    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11955    break 2
11956  fi
11957done
11958  done
11959IFS=$as_save_IFS
11960
11961  ;;
11962esac
11963fi
11964JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11965if test -n "$JAVA_CHECK"; then
11966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11967$as_echo "$JAVA_CHECK" >&6; }
11968else
11969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11970$as_echo "no" >&6; }
11971fi
11972
11973
11974    BINARY="$JAVAC_CHECK"
11975    if test "x$JAVAC_CHECK" = x; then
11976        BINARY="$JAVA_CHECK"
11977    fi
11978    if test "x$BINARY" != x; then
11979        # So there is a java(c) binary, it might be part of a JDK.
11980        # Lets find the JDK/JRE directory by following symbolic links.
11981        # Linux/GNU systems often have links from /usr/bin/java to
11982        # /etc/alternatives/java to the real JDK binary.
11983
11984    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11985        # Follow a chain of symbolic links. Use readlink
11986        # where it exists, else fall back to horribly
11987        # complicated shell code.
11988        if test "x$READLINK_TESTED" != yes; then
11989            # On MacOSX there is a readlink tool with a different
11990            # purpose than the GNU readlink tool. Check the found readlink.
11991            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11992            if test "x$ISGNU" = x; then
11993                 # A readlink that we do not know how to use.
11994                 # Are there other non-GNU readlinks out there?
11995                 READLINK_TESTED=yes
11996                 READLINK=
11997            fi
11998        fi
11999
12000        if test "x$READLINK" != x; then
12001            BINARY=`$READLINK -f $BINARY`
12002        else
12003            # Save the current directory for restoring afterwards
12004            STARTDIR=$PWD
12005            COUNTER=0
12006            sym_link_dir=`$DIRNAME $BINARY`
12007            sym_link_file=`$BASENAME $BINARY`
12008            # Use the system pwd and not the shell builtin to resolve directory symlinks
12009            cd $sym_link_dir
12010            cd `$THEPWDCMD`
12011            sym_link_dir=`$THEPWDCMD`
12012            # Resolve file symlinks
12013            while test $COUNTER -lt 20; do
12014                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12015                if test "x$ISLINK" == x; then
12016                    # This is not a symbolic link! We are done!
12017                    break
12018                fi
12019                # Again resolve directory symlinks since the target of the just found
12020                # link could be in a different directory
12021                cd `$DIRNAME $ISLINK`
12022                sym_link_dir=`$THEPWDCMD`
12023                sym_link_file=`$BASENAME $ISLINK`
12024                let COUNTER=COUNTER+1
12025            done
12026            cd $STARTDIR
12027            BINARY=$sym_link_dir/$sym_link_file
12028        fi
12029    fi
12030
12031        BOOT_JDK=`dirname "$BINARY"`
12032        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12033        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12034            # Looks like we found ourselves an JDK
12035            BOOT_JDK_FOUND=maybe
12036            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12037$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12038        fi
12039    fi
12040
12041
12042    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12043    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12044      # Do we have a bin/java?
12045      if test ! -x "$BOOT_JDK/bin/java"; then
12046        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12048        BOOT_JDK_FOUND=no
12049      else
12050        # Do we have a bin/javac?
12051        if test ! -x "$BOOT_JDK/bin/javac"; then
12052          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12054          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12055$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12056          BOOT_JDK_FOUND=no
12057        else
12058          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12059          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12060            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12062            BOOT_JDK_FOUND=no
12063          else
12064            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12065            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12066
12067            # Extra M4 quote needed to protect [] in grep expression.
12068            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12069            if test "x$FOUND_VERSION_78" = x; then
12070              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12072              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12073$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12074              BOOT_JDK_FOUND=no
12075            else
12076              # We're done! :-)
12077              BOOT_JDK_FOUND=yes
12078
12079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12080
12081  # Input might be given as Windows format, start by converting to
12082  # unix format.
12083  path="$BOOT_JDK"
12084  new_path=`$CYGPATH -u "$path"`
12085
12086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12089  # "foo.exe" is OK but "foo" is an error.
12090  #
12091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12092  # It is also a way to make sure we got the proper file name for the real test later on.
12093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12094  if test "x$test_shortpath" = x; then
12095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12097    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12098  fi
12099
12100  # Call helper function which possibly converts this using DOS-style short mode.
12101  # If so, the updated path is stored in $new_path.
12102
12103  input_path="$new_path"
12104  # Check if we need to convert this using DOS-style short mode. If the path
12105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12106  # take no chances and rewrite it.
12107  # Note: m4 eats our [], so we need to use [ and ] instead.
12108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12109  if test "x$has_forbidden_chars" != x; then
12110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12114      # Going to short mode and back again did indeed matter. Since short mode is
12115      # case insensitive, let's make it lowercase to improve readability.
12116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12117      # Now convert it back to Unix-stile (cygpath)
12118      input_path=`$CYGPATH -u "$shortmode_path"`
12119      new_path="$input_path"
12120    fi
12121  fi
12122
12123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12124  if test "x$test_cygdrive_prefix" = x; then
12125    # As a simple fix, exclude /usr/bin since it's not a real path.
12126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12128      # a path prefixed by /cygdrive for fixpath to work.
12129      new_path="$CYGWIN_ROOT_PATH$input_path"
12130    fi
12131  fi
12132
12133
12134  if test "x$path" != "x$new_path"; then
12135    BOOT_JDK="$new_path"
12136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12138  fi
12139
12140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12141
12142  path="$BOOT_JDK"
12143  has_colon=`$ECHO $path | $GREP ^.:`
12144  new_path="$path"
12145  if test "x$has_colon" = x; then
12146    # Not in mixed or Windows style, start by that.
12147    new_path=`cmd //c echo $path`
12148  fi
12149
12150
12151  input_path="$new_path"
12152  # Check if we need to convert this using DOS-style short mode. If the path
12153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12154  # take no chances and rewrite it.
12155  # Note: m4 eats our [], so we need to use [ and ] instead.
12156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12157  if test "x$has_forbidden_chars" != x; then
12158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12160  fi
12161
12162
12163  windows_path="$new_path"
12164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12165    unix_path=`$CYGPATH -u "$windows_path"`
12166    new_path="$unix_path"
12167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12169    new_path="$unix_path"
12170  fi
12171
12172  if test "x$path" != "x$new_path"; then
12173    BOOT_JDK="$new_path"
12174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12176  fi
12177
12178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12180
12181  else
12182    # We're on a posix platform. Hooray! :)
12183    path="$BOOT_JDK"
12184
12185    if test ! -f "$path" && test ! -d "$path"; then
12186      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12187    fi
12188
12189    has_space=`$ECHO "$path" | $GREP " "`
12190    if test "x$has_space" != x; then
12191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12193      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12194    fi
12195  fi
12196
12197              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12198$as_echo_n "checking for Boot JDK... " >&6; }
12199              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12200$as_echo "$BOOT_JDK" >&6; }
12201              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12202$as_echo_n "checking Boot JDK version... " >&6; }
12203              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12204              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12205$as_echo "$BOOT_JDK_VERSION" >&6; }
12206            fi # end check jdk version
12207          fi # end check rt.jar
12208        fi # end check javac
12209      fi # end check java
12210    fi # end check boot jdk found
12211  fi
12212
12213
12214# Test: Is there a JDK installed in default, well-known locations?
12215
12216  if test "x$BOOT_JDK_FOUND" = xno; then
12217    # Now execute the test
12218
12219  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12220
12221  if test "x$BOOT_JDK_FOUND" = xno; then
12222    # Now execute the test
12223
12224  if test "x$ProgramW6432" != x; then
12225    VIRTUAL_DIR="$ProgramW6432/Java"
12226
12227  windows_path="$VIRTUAL_DIR"
12228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12229    unix_path=`$CYGPATH -u "$windows_path"`
12230    VIRTUAL_DIR="$unix_path"
12231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12233    VIRTUAL_DIR="$unix_path"
12234  fi
12235
12236
12237  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12238  BOOT_JDK_SUFFIX=""
12239  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12240  if test "x$ALL_JDKS_FOUND" != x; then
12241    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12242
12243  if test "x$BOOT_JDK_FOUND" = xno; then
12244    # Now execute the test
12245
12246        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12247        if test -d "$BOOT_JDK"; then
12248          BOOT_JDK_FOUND=maybe
12249          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12250$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12251        fi
12252
12253
12254    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12255    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12256      # Do we have a bin/java?
12257      if test ! -x "$BOOT_JDK/bin/java"; then
12258        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12260        BOOT_JDK_FOUND=no
12261      else
12262        # Do we have a bin/javac?
12263        if test ! -x "$BOOT_JDK/bin/javac"; then
12264          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12266          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12267$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12268          BOOT_JDK_FOUND=no
12269        else
12270          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12271          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12272            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12274            BOOT_JDK_FOUND=no
12275          else
12276            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12277            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12278
12279            # Extra M4 quote needed to protect [] in grep expression.
12280            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12281            if test "x$FOUND_VERSION_78" = x; then
12282              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12284              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12285$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12286              BOOT_JDK_FOUND=no
12287            else
12288              # We're done! :-)
12289              BOOT_JDK_FOUND=yes
12290
12291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12292
12293  # Input might be given as Windows format, start by converting to
12294  # unix format.
12295  path="$BOOT_JDK"
12296  new_path=`$CYGPATH -u "$path"`
12297
12298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12301  # "foo.exe" is OK but "foo" is an error.
12302  #
12303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12304  # It is also a way to make sure we got the proper file name for the real test later on.
12305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12306  if test "x$test_shortpath" = x; then
12307    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12308$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12309    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12310  fi
12311
12312  # Call helper function which possibly converts this using DOS-style short mode.
12313  # If so, the updated path is stored in $new_path.
12314
12315  input_path="$new_path"
12316  # Check if we need to convert this using DOS-style short mode. If the path
12317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12318  # take no chances and rewrite it.
12319  # Note: m4 eats our [], so we need to use [ and ] instead.
12320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12321  if test "x$has_forbidden_chars" != x; then
12322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12326      # Going to short mode and back again did indeed matter. Since short mode is
12327      # case insensitive, let's make it lowercase to improve readability.
12328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12329      # Now convert it back to Unix-stile (cygpath)
12330      input_path=`$CYGPATH -u "$shortmode_path"`
12331      new_path="$input_path"
12332    fi
12333  fi
12334
12335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12336  if test "x$test_cygdrive_prefix" = x; then
12337    # As a simple fix, exclude /usr/bin since it's not a real path.
12338    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12340      # a path prefixed by /cygdrive for fixpath to work.
12341      new_path="$CYGWIN_ROOT_PATH$input_path"
12342    fi
12343  fi
12344
12345
12346  if test "x$path" != "x$new_path"; then
12347    BOOT_JDK="$new_path"
12348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12349$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12350  fi
12351
12352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12353
12354  path="$BOOT_JDK"
12355  has_colon=`$ECHO $path | $GREP ^.:`
12356  new_path="$path"
12357  if test "x$has_colon" = x; then
12358    # Not in mixed or Windows style, start by that.
12359    new_path=`cmd //c echo $path`
12360  fi
12361
12362
12363  input_path="$new_path"
12364  # Check if we need to convert this using DOS-style short mode. If the path
12365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12366  # take no chances and rewrite it.
12367  # Note: m4 eats our [], so we need to use [ and ] instead.
12368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12369  if test "x$has_forbidden_chars" != x; then
12370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12372  fi
12373
12374
12375  windows_path="$new_path"
12376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12377    unix_path=`$CYGPATH -u "$windows_path"`
12378    new_path="$unix_path"
12379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12381    new_path="$unix_path"
12382  fi
12383
12384  if test "x$path" != "x$new_path"; then
12385    BOOT_JDK="$new_path"
12386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12387$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12388  fi
12389
12390  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12391  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12392
12393  else
12394    # We're on a posix platform. Hooray! :)
12395    path="$BOOT_JDK"
12396
12397    if test ! -f "$path" && test ! -d "$path"; then
12398      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12399    fi
12400
12401    has_space=`$ECHO "$path" | $GREP " "`
12402    if test "x$has_space" != x; then
12403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12404$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12405      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12406    fi
12407  fi
12408
12409              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12410$as_echo_n "checking for Boot JDK... " >&6; }
12411              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12412$as_echo "$BOOT_JDK" >&6; }
12413              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12414$as_echo_n "checking Boot JDK version... " >&6; }
12415              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12416              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12417$as_echo "$BOOT_JDK_VERSION" >&6; }
12418            fi # end check jdk version
12419          fi # end check rt.jar
12420        fi # end check javac
12421      fi # end check java
12422    fi # end check boot jdk found
12423  fi
12424
12425    done
12426  fi
12427
12428  fi
12429
12430
12431    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12432    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12433      # Do we have a bin/java?
12434      if test ! -x "$BOOT_JDK/bin/java"; then
12435        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12437        BOOT_JDK_FOUND=no
12438      else
12439        # Do we have a bin/javac?
12440        if test ! -x "$BOOT_JDK/bin/javac"; then
12441          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12442$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12443          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12444$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12445          BOOT_JDK_FOUND=no
12446        else
12447          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12448          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12449            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12451            BOOT_JDK_FOUND=no
12452          else
12453            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12454            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12455
12456            # Extra M4 quote needed to protect [] in grep expression.
12457            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12458            if test "x$FOUND_VERSION_78" = x; then
12459              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12461              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12462$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12463              BOOT_JDK_FOUND=no
12464            else
12465              # We're done! :-)
12466              BOOT_JDK_FOUND=yes
12467
12468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12469
12470  # Input might be given as Windows format, start by converting to
12471  # unix format.
12472  path="$BOOT_JDK"
12473  new_path=`$CYGPATH -u "$path"`
12474
12475  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12476  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12477  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12478  # "foo.exe" is OK but "foo" is an error.
12479  #
12480  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12481  # It is also a way to make sure we got the proper file name for the real test later on.
12482  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12483  if test "x$test_shortpath" = x; then
12484    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12485$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12486    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12487  fi
12488
12489  # Call helper function which possibly converts this using DOS-style short mode.
12490  # If so, the updated path is stored in $new_path.
12491
12492  input_path="$new_path"
12493  # Check if we need to convert this using DOS-style short mode. If the path
12494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12495  # take no chances and rewrite it.
12496  # Note: m4 eats our [], so we need to use [ and ] instead.
12497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12498  if test "x$has_forbidden_chars" != x; then
12499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12503      # Going to short mode and back again did indeed matter. Since short mode is
12504      # case insensitive, let's make it lowercase to improve readability.
12505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12506      # Now convert it back to Unix-stile (cygpath)
12507      input_path=`$CYGPATH -u "$shortmode_path"`
12508      new_path="$input_path"
12509    fi
12510  fi
12511
12512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12513  if test "x$test_cygdrive_prefix" = x; then
12514    # As a simple fix, exclude /usr/bin since it's not a real path.
12515    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12517      # a path prefixed by /cygdrive for fixpath to work.
12518      new_path="$CYGWIN_ROOT_PATH$input_path"
12519    fi
12520  fi
12521
12522
12523  if test "x$path" != "x$new_path"; then
12524    BOOT_JDK="$new_path"
12525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12526$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12527  fi
12528
12529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12530
12531  path="$BOOT_JDK"
12532  has_colon=`$ECHO $path | $GREP ^.:`
12533  new_path="$path"
12534  if test "x$has_colon" = x; then
12535    # Not in mixed or Windows style, start by that.
12536    new_path=`cmd //c echo $path`
12537  fi
12538
12539
12540  input_path="$new_path"
12541  # Check if we need to convert this using DOS-style short mode. If the path
12542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12543  # take no chances and rewrite it.
12544  # Note: m4 eats our [], so we need to use [ and ] instead.
12545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12546  if test "x$has_forbidden_chars" != x; then
12547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12549  fi
12550
12551
12552  windows_path="$new_path"
12553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12554    unix_path=`$CYGPATH -u "$windows_path"`
12555    new_path="$unix_path"
12556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12558    new_path="$unix_path"
12559  fi
12560
12561  if test "x$path" != "x$new_path"; then
12562    BOOT_JDK="$new_path"
12563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12564$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12565  fi
12566
12567  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12568  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12569
12570  else
12571    # We're on a posix platform. Hooray! :)
12572    path="$BOOT_JDK"
12573
12574    if test ! -f "$path" && test ! -d "$path"; then
12575      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12576    fi
12577
12578    has_space=`$ECHO "$path" | $GREP " "`
12579    if test "x$has_space" != x; then
12580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12581$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12582      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12583    fi
12584  fi
12585
12586              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12587$as_echo_n "checking for Boot JDK... " >&6; }
12588              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12589$as_echo "$BOOT_JDK" >&6; }
12590              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12591$as_echo_n "checking Boot JDK version... " >&6; }
12592              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12593              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12594$as_echo "$BOOT_JDK_VERSION" >&6; }
12595            fi # end check jdk version
12596          fi # end check rt.jar
12597        fi # end check javac
12598      fi # end check java
12599    fi # end check boot jdk found
12600  fi
12601
12602
12603  if test "x$BOOT_JDK_FOUND" = xno; then
12604    # Now execute the test
12605
12606  if test "x$PROGRAMW6432" != x; then
12607    VIRTUAL_DIR="$PROGRAMW6432/Java"
12608
12609  windows_path="$VIRTUAL_DIR"
12610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12611    unix_path=`$CYGPATH -u "$windows_path"`
12612    VIRTUAL_DIR="$unix_path"
12613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12615    VIRTUAL_DIR="$unix_path"
12616  fi
12617
12618
12619  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12620  BOOT_JDK_SUFFIX=""
12621  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12622  if test "x$ALL_JDKS_FOUND" != x; then
12623    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12624
12625  if test "x$BOOT_JDK_FOUND" = xno; then
12626    # Now execute the test
12627
12628        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12629        if test -d "$BOOT_JDK"; then
12630          BOOT_JDK_FOUND=maybe
12631          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12632$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12633        fi
12634
12635
12636    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12637    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12638      # Do we have a bin/java?
12639      if test ! -x "$BOOT_JDK/bin/java"; then
12640        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12642        BOOT_JDK_FOUND=no
12643      else
12644        # Do we have a bin/javac?
12645        if test ! -x "$BOOT_JDK/bin/javac"; then
12646          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12647$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12648          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12649$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12650          BOOT_JDK_FOUND=no
12651        else
12652          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12653          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12654            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12656            BOOT_JDK_FOUND=no
12657          else
12658            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12659            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12660
12661            # Extra M4 quote needed to protect [] in grep expression.
12662            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12663            if test "x$FOUND_VERSION_78" = x; then
12664              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12666              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12667$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12668              BOOT_JDK_FOUND=no
12669            else
12670              # We're done! :-)
12671              BOOT_JDK_FOUND=yes
12672
12673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12674
12675  # Input might be given as Windows format, start by converting to
12676  # unix format.
12677  path="$BOOT_JDK"
12678  new_path=`$CYGPATH -u "$path"`
12679
12680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12683  # "foo.exe" is OK but "foo" is an error.
12684  #
12685  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12686  # It is also a way to make sure we got the proper file name for the real test later on.
12687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12688  if test "x$test_shortpath" = x; then
12689    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12690$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12691    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12692  fi
12693
12694  # Call helper function which possibly converts this using DOS-style short mode.
12695  # If so, the updated path is stored in $new_path.
12696
12697  input_path="$new_path"
12698  # Check if we need to convert this using DOS-style short mode. If the path
12699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12700  # take no chances and rewrite it.
12701  # Note: m4 eats our [], so we need to use [ and ] instead.
12702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12703  if test "x$has_forbidden_chars" != x; then
12704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12708      # Going to short mode and back again did indeed matter. Since short mode is
12709      # case insensitive, let's make it lowercase to improve readability.
12710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12711      # Now convert it back to Unix-stile (cygpath)
12712      input_path=`$CYGPATH -u "$shortmode_path"`
12713      new_path="$input_path"
12714    fi
12715  fi
12716
12717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12718  if test "x$test_cygdrive_prefix" = x; then
12719    # As a simple fix, exclude /usr/bin since it's not a real path.
12720    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12722      # a path prefixed by /cygdrive for fixpath to work.
12723      new_path="$CYGWIN_ROOT_PATH$input_path"
12724    fi
12725  fi
12726
12727
12728  if test "x$path" != "x$new_path"; then
12729    BOOT_JDK="$new_path"
12730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12732  fi
12733
12734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12735
12736  path="$BOOT_JDK"
12737  has_colon=`$ECHO $path | $GREP ^.:`
12738  new_path="$path"
12739  if test "x$has_colon" = x; then
12740    # Not in mixed or Windows style, start by that.
12741    new_path=`cmd //c echo $path`
12742  fi
12743
12744
12745  input_path="$new_path"
12746  # Check if we need to convert this using DOS-style short mode. If the path
12747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12748  # take no chances and rewrite it.
12749  # Note: m4 eats our [], so we need to use [ and ] instead.
12750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12751  if test "x$has_forbidden_chars" != x; then
12752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12754  fi
12755
12756
12757  windows_path="$new_path"
12758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12759    unix_path=`$CYGPATH -u "$windows_path"`
12760    new_path="$unix_path"
12761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12763    new_path="$unix_path"
12764  fi
12765
12766  if test "x$path" != "x$new_path"; then
12767    BOOT_JDK="$new_path"
12768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12769$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12770  fi
12771
12772  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12773  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12774
12775  else
12776    # We're on a posix platform. Hooray! :)
12777    path="$BOOT_JDK"
12778
12779    if test ! -f "$path" && test ! -d "$path"; then
12780      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12781    fi
12782
12783    has_space=`$ECHO "$path" | $GREP " "`
12784    if test "x$has_space" != x; then
12785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12786$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12787      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12788    fi
12789  fi
12790
12791              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12792$as_echo_n "checking for Boot JDK... " >&6; }
12793              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12794$as_echo "$BOOT_JDK" >&6; }
12795              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12796$as_echo_n "checking Boot JDK version... " >&6; }
12797              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12798              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12799$as_echo "$BOOT_JDK_VERSION" >&6; }
12800            fi # end check jdk version
12801          fi # end check rt.jar
12802        fi # end check javac
12803      fi # end check java
12804    fi # end check boot jdk found
12805  fi
12806
12807    done
12808  fi
12809
12810  fi
12811
12812
12813    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12814    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12815      # Do we have a bin/java?
12816      if test ! -x "$BOOT_JDK/bin/java"; then
12817        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12819        BOOT_JDK_FOUND=no
12820      else
12821        # Do we have a bin/javac?
12822        if test ! -x "$BOOT_JDK/bin/javac"; then
12823          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12825          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12826$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12827          BOOT_JDK_FOUND=no
12828        else
12829          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12830          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12831            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12833            BOOT_JDK_FOUND=no
12834          else
12835            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12836            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12837
12838            # Extra M4 quote needed to protect [] in grep expression.
12839            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12840            if test "x$FOUND_VERSION_78" = x; then
12841              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12843              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12844$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12845              BOOT_JDK_FOUND=no
12846            else
12847              # We're done! :-)
12848              BOOT_JDK_FOUND=yes
12849
12850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12851
12852  # Input might be given as Windows format, start by converting to
12853  # unix format.
12854  path="$BOOT_JDK"
12855  new_path=`$CYGPATH -u "$path"`
12856
12857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12860  # "foo.exe" is OK but "foo" is an error.
12861  #
12862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12863  # It is also a way to make sure we got the proper file name for the real test later on.
12864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12865  if test "x$test_shortpath" = x; then
12866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12867$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12868    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12869  fi
12870
12871  # Call helper function which possibly converts this using DOS-style short mode.
12872  # If so, the updated path is stored in $new_path.
12873
12874  input_path="$new_path"
12875  # Check if we need to convert this using DOS-style short mode. If the path
12876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12877  # take no chances and rewrite it.
12878  # Note: m4 eats our [], so we need to use [ and ] instead.
12879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12880  if test "x$has_forbidden_chars" != x; then
12881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12885      # Going to short mode and back again did indeed matter. Since short mode is
12886      # case insensitive, let's make it lowercase to improve readability.
12887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12888      # Now convert it back to Unix-stile (cygpath)
12889      input_path=`$CYGPATH -u "$shortmode_path"`
12890      new_path="$input_path"
12891    fi
12892  fi
12893
12894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12895  if test "x$test_cygdrive_prefix" = x; then
12896    # As a simple fix, exclude /usr/bin since it's not a real path.
12897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12899      # a path prefixed by /cygdrive for fixpath to work.
12900      new_path="$CYGWIN_ROOT_PATH$input_path"
12901    fi
12902  fi
12903
12904
12905  if test "x$path" != "x$new_path"; then
12906    BOOT_JDK="$new_path"
12907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12908$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12909  fi
12910
12911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12912
12913  path="$BOOT_JDK"
12914  has_colon=`$ECHO $path | $GREP ^.:`
12915  new_path="$path"
12916  if test "x$has_colon" = x; then
12917    # Not in mixed or Windows style, start by that.
12918    new_path=`cmd //c echo $path`
12919  fi
12920
12921
12922  input_path="$new_path"
12923  # Check if we need to convert this using DOS-style short mode. If the path
12924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12925  # take no chances and rewrite it.
12926  # Note: m4 eats our [], so we need to use [ and ] instead.
12927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12928  if test "x$has_forbidden_chars" != x; then
12929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12931  fi
12932
12933
12934  windows_path="$new_path"
12935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12936    unix_path=`$CYGPATH -u "$windows_path"`
12937    new_path="$unix_path"
12938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12940    new_path="$unix_path"
12941  fi
12942
12943  if test "x$path" != "x$new_path"; then
12944    BOOT_JDK="$new_path"
12945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12946$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12947  fi
12948
12949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12951
12952  else
12953    # We're on a posix platform. Hooray! :)
12954    path="$BOOT_JDK"
12955
12956    if test ! -f "$path" && test ! -d "$path"; then
12957      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12958    fi
12959
12960    has_space=`$ECHO "$path" | $GREP " "`
12961    if test "x$has_space" != x; then
12962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12963$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12964      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12965    fi
12966  fi
12967
12968              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12969$as_echo_n "checking for Boot JDK... " >&6; }
12970              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12971$as_echo "$BOOT_JDK" >&6; }
12972              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12973$as_echo_n "checking Boot JDK version... " >&6; }
12974              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12975              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12976$as_echo "$BOOT_JDK_VERSION" >&6; }
12977            fi # end check jdk version
12978          fi # end check rt.jar
12979        fi # end check javac
12980      fi # end check java
12981    fi # end check boot jdk found
12982  fi
12983
12984
12985  if test "x$BOOT_JDK_FOUND" = xno; then
12986    # Now execute the test
12987
12988  if test "x$PROGRAMFILES" != x; then
12989    VIRTUAL_DIR="$PROGRAMFILES/Java"
12990
12991  windows_path="$VIRTUAL_DIR"
12992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12993    unix_path=`$CYGPATH -u "$windows_path"`
12994    VIRTUAL_DIR="$unix_path"
12995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12997    VIRTUAL_DIR="$unix_path"
12998  fi
12999
13000
13001  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13002  BOOT_JDK_SUFFIX=""
13003  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13004  if test "x$ALL_JDKS_FOUND" != x; then
13005    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13006
13007  if test "x$BOOT_JDK_FOUND" = xno; then
13008    # Now execute the test
13009
13010        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13011        if test -d "$BOOT_JDK"; then
13012          BOOT_JDK_FOUND=maybe
13013          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13014$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13015        fi
13016
13017
13018    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13019    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13020      # Do we have a bin/java?
13021      if test ! -x "$BOOT_JDK/bin/java"; then
13022        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13024        BOOT_JDK_FOUND=no
13025      else
13026        # Do we have a bin/javac?
13027        if test ! -x "$BOOT_JDK/bin/javac"; then
13028          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13030          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13031$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13032          BOOT_JDK_FOUND=no
13033        else
13034          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13035          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13036            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13038            BOOT_JDK_FOUND=no
13039          else
13040            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13041            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13042
13043            # Extra M4 quote needed to protect [] in grep expression.
13044            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13045            if test "x$FOUND_VERSION_78" = x; then
13046              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13048              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13049$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13050              BOOT_JDK_FOUND=no
13051            else
13052              # We're done! :-)
13053              BOOT_JDK_FOUND=yes
13054
13055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13056
13057  # Input might be given as Windows format, start by converting to
13058  # unix format.
13059  path="$BOOT_JDK"
13060  new_path=`$CYGPATH -u "$path"`
13061
13062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13065  # "foo.exe" is OK but "foo" is an error.
13066  #
13067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13068  # It is also a way to make sure we got the proper file name for the real test later on.
13069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13070  if test "x$test_shortpath" = x; then
13071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13073    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13074  fi
13075
13076  # Call helper function which possibly converts this using DOS-style short mode.
13077  # If so, the updated path is stored in $new_path.
13078
13079  input_path="$new_path"
13080  # Check if we need to convert this using DOS-style short mode. If the path
13081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13082  # take no chances and rewrite it.
13083  # Note: m4 eats our [], so we need to use [ and ] instead.
13084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13085  if test "x$has_forbidden_chars" != x; then
13086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13090      # Going to short mode and back again did indeed matter. Since short mode is
13091      # case insensitive, let's make it lowercase to improve readability.
13092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13093      # Now convert it back to Unix-stile (cygpath)
13094      input_path=`$CYGPATH -u "$shortmode_path"`
13095      new_path="$input_path"
13096    fi
13097  fi
13098
13099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13100  if test "x$test_cygdrive_prefix" = x; then
13101    # As a simple fix, exclude /usr/bin since it's not a real path.
13102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13104      # a path prefixed by /cygdrive for fixpath to work.
13105      new_path="$CYGWIN_ROOT_PATH$input_path"
13106    fi
13107  fi
13108
13109
13110  if test "x$path" != "x$new_path"; then
13111    BOOT_JDK="$new_path"
13112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13114  fi
13115
13116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13117
13118  path="$BOOT_JDK"
13119  has_colon=`$ECHO $path | $GREP ^.:`
13120  new_path="$path"
13121  if test "x$has_colon" = x; then
13122    # Not in mixed or Windows style, start by that.
13123    new_path=`cmd //c echo $path`
13124  fi
13125
13126
13127  input_path="$new_path"
13128  # Check if we need to convert this using DOS-style short mode. If the path
13129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13130  # take no chances and rewrite it.
13131  # Note: m4 eats our [], so we need to use [ and ] instead.
13132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13133  if test "x$has_forbidden_chars" != x; then
13134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13136  fi
13137
13138
13139  windows_path="$new_path"
13140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13141    unix_path=`$CYGPATH -u "$windows_path"`
13142    new_path="$unix_path"
13143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13145    new_path="$unix_path"
13146  fi
13147
13148  if test "x$path" != "x$new_path"; then
13149    BOOT_JDK="$new_path"
13150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13151$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13152  fi
13153
13154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13156
13157  else
13158    # We're on a posix platform. Hooray! :)
13159    path="$BOOT_JDK"
13160
13161    if test ! -f "$path" && test ! -d "$path"; then
13162      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13163    fi
13164
13165    has_space=`$ECHO "$path" | $GREP " "`
13166    if test "x$has_space" != x; then
13167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13168$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13169      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13170    fi
13171  fi
13172
13173              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13174$as_echo_n "checking for Boot JDK... " >&6; }
13175              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13176$as_echo "$BOOT_JDK" >&6; }
13177              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13178$as_echo_n "checking Boot JDK version... " >&6; }
13179              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13180              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13181$as_echo "$BOOT_JDK_VERSION" >&6; }
13182            fi # end check jdk version
13183          fi # end check rt.jar
13184        fi # end check javac
13185      fi # end check java
13186    fi # end check boot jdk found
13187  fi
13188
13189    done
13190  fi
13191
13192  fi
13193
13194
13195    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13196    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13197      # Do we have a bin/java?
13198      if test ! -x "$BOOT_JDK/bin/java"; then
13199        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13201        BOOT_JDK_FOUND=no
13202      else
13203        # Do we have a bin/javac?
13204        if test ! -x "$BOOT_JDK/bin/javac"; then
13205          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13207          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13208$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13209          BOOT_JDK_FOUND=no
13210        else
13211          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13212          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13213            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13215            BOOT_JDK_FOUND=no
13216          else
13217            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13218            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13219
13220            # Extra M4 quote needed to protect [] in grep expression.
13221            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13222            if test "x$FOUND_VERSION_78" = x; then
13223              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13225              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13226$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13227              BOOT_JDK_FOUND=no
13228            else
13229              # We're done! :-)
13230              BOOT_JDK_FOUND=yes
13231
13232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13233
13234  # Input might be given as Windows format, start by converting to
13235  # unix format.
13236  path="$BOOT_JDK"
13237  new_path=`$CYGPATH -u "$path"`
13238
13239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13242  # "foo.exe" is OK but "foo" is an error.
13243  #
13244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13245  # It is also a way to make sure we got the proper file name for the real test later on.
13246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13247  if test "x$test_shortpath" = x; then
13248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13249$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13250    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13251  fi
13252
13253  # Call helper function which possibly converts this using DOS-style short mode.
13254  # If so, the updated path is stored in $new_path.
13255
13256  input_path="$new_path"
13257  # Check if we need to convert this using DOS-style short mode. If the path
13258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13259  # take no chances and rewrite it.
13260  # Note: m4 eats our [], so we need to use [ and ] instead.
13261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13262  if test "x$has_forbidden_chars" != x; then
13263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13267      # Going to short mode and back again did indeed matter. Since short mode is
13268      # case insensitive, let's make it lowercase to improve readability.
13269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13270      # Now convert it back to Unix-stile (cygpath)
13271      input_path=`$CYGPATH -u "$shortmode_path"`
13272      new_path="$input_path"
13273    fi
13274  fi
13275
13276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13277  if test "x$test_cygdrive_prefix" = x; then
13278    # As a simple fix, exclude /usr/bin since it's not a real path.
13279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13281      # a path prefixed by /cygdrive for fixpath to work.
13282      new_path="$CYGWIN_ROOT_PATH$input_path"
13283    fi
13284  fi
13285
13286
13287  if test "x$path" != "x$new_path"; then
13288    BOOT_JDK="$new_path"
13289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13290$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13291  fi
13292
13293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13294
13295  path="$BOOT_JDK"
13296  has_colon=`$ECHO $path | $GREP ^.:`
13297  new_path="$path"
13298  if test "x$has_colon" = x; then
13299    # Not in mixed or Windows style, start by that.
13300    new_path=`cmd //c echo $path`
13301  fi
13302
13303
13304  input_path="$new_path"
13305  # Check if we need to convert this using DOS-style short mode. If the path
13306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13307  # take no chances and rewrite it.
13308  # Note: m4 eats our [], so we need to use [ and ] instead.
13309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13310  if test "x$has_forbidden_chars" != x; then
13311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13313  fi
13314
13315
13316  windows_path="$new_path"
13317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13318    unix_path=`$CYGPATH -u "$windows_path"`
13319    new_path="$unix_path"
13320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13322    new_path="$unix_path"
13323  fi
13324
13325  if test "x$path" != "x$new_path"; then
13326    BOOT_JDK="$new_path"
13327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13328$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13329  fi
13330
13331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13333
13334  else
13335    # We're on a posix platform. Hooray! :)
13336    path="$BOOT_JDK"
13337
13338    if test ! -f "$path" && test ! -d "$path"; then
13339      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13340    fi
13341
13342    has_space=`$ECHO "$path" | $GREP " "`
13343    if test "x$has_space" != x; then
13344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13345$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13346      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13347    fi
13348  fi
13349
13350              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13351$as_echo_n "checking for Boot JDK... " >&6; }
13352              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13353$as_echo "$BOOT_JDK" >&6; }
13354              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13355$as_echo_n "checking Boot JDK version... " >&6; }
13356              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13357              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13358$as_echo "$BOOT_JDK_VERSION" >&6; }
13359            fi # end check jdk version
13360          fi # end check rt.jar
13361        fi # end check javac
13362      fi # end check java
13363    fi # end check boot jdk found
13364  fi
13365
13366
13367  if test "x$BOOT_JDK_FOUND" = xno; then
13368    # Now execute the test
13369
13370  if test "x$ProgramFiles" != x; then
13371    VIRTUAL_DIR="$ProgramFiles/Java"
13372
13373  windows_path="$VIRTUAL_DIR"
13374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13375    unix_path=`$CYGPATH -u "$windows_path"`
13376    VIRTUAL_DIR="$unix_path"
13377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13379    VIRTUAL_DIR="$unix_path"
13380  fi
13381
13382
13383  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13384  BOOT_JDK_SUFFIX=""
13385  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13386  if test "x$ALL_JDKS_FOUND" != x; then
13387    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13388
13389  if test "x$BOOT_JDK_FOUND" = xno; then
13390    # Now execute the test
13391
13392        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13393        if test -d "$BOOT_JDK"; then
13394          BOOT_JDK_FOUND=maybe
13395          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13396$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13397        fi
13398
13399
13400    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13401    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13402      # Do we have a bin/java?
13403      if test ! -x "$BOOT_JDK/bin/java"; then
13404        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13406        BOOT_JDK_FOUND=no
13407      else
13408        # Do we have a bin/javac?
13409        if test ! -x "$BOOT_JDK/bin/javac"; then
13410          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13412          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13413$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13414          BOOT_JDK_FOUND=no
13415        else
13416          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13417          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13418            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13419$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13420            BOOT_JDK_FOUND=no
13421          else
13422            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13423            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13424
13425            # Extra M4 quote needed to protect [] in grep expression.
13426            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13427            if test "x$FOUND_VERSION_78" = x; then
13428              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13430              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13431$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13432              BOOT_JDK_FOUND=no
13433            else
13434              # We're done! :-)
13435              BOOT_JDK_FOUND=yes
13436
13437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13438
13439  # Input might be given as Windows format, start by converting to
13440  # unix format.
13441  path="$BOOT_JDK"
13442  new_path=`$CYGPATH -u "$path"`
13443
13444  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13445  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13446  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13447  # "foo.exe" is OK but "foo" is an error.
13448  #
13449  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13450  # It is also a way to make sure we got the proper file name for the real test later on.
13451  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13452  if test "x$test_shortpath" = x; then
13453    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13455    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13456  fi
13457
13458  # Call helper function which possibly converts this using DOS-style short mode.
13459  # If so, the updated path is stored in $new_path.
13460
13461  input_path="$new_path"
13462  # Check if we need to convert this using DOS-style short mode. If the path
13463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13464  # take no chances and rewrite it.
13465  # Note: m4 eats our [], so we need to use [ and ] instead.
13466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13467  if test "x$has_forbidden_chars" != x; then
13468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13472      # Going to short mode and back again did indeed matter. Since short mode is
13473      # case insensitive, let's make it lowercase to improve readability.
13474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13475      # Now convert it back to Unix-stile (cygpath)
13476      input_path=`$CYGPATH -u "$shortmode_path"`
13477      new_path="$input_path"
13478    fi
13479  fi
13480
13481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13482  if test "x$test_cygdrive_prefix" = x; then
13483    # As a simple fix, exclude /usr/bin since it's not a real path.
13484    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13486      # a path prefixed by /cygdrive for fixpath to work.
13487      new_path="$CYGWIN_ROOT_PATH$input_path"
13488    fi
13489  fi
13490
13491
13492  if test "x$path" != "x$new_path"; then
13493    BOOT_JDK="$new_path"
13494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13495$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13496  fi
13497
13498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13499
13500  path="$BOOT_JDK"
13501  has_colon=`$ECHO $path | $GREP ^.:`
13502  new_path="$path"
13503  if test "x$has_colon" = x; then
13504    # Not in mixed or Windows style, start by that.
13505    new_path=`cmd //c echo $path`
13506  fi
13507
13508
13509  input_path="$new_path"
13510  # Check if we need to convert this using DOS-style short mode. If the path
13511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13512  # take no chances and rewrite it.
13513  # Note: m4 eats our [], so we need to use [ and ] instead.
13514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13515  if test "x$has_forbidden_chars" != x; then
13516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13518  fi
13519
13520
13521  windows_path="$new_path"
13522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13523    unix_path=`$CYGPATH -u "$windows_path"`
13524    new_path="$unix_path"
13525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13527    new_path="$unix_path"
13528  fi
13529
13530  if test "x$path" != "x$new_path"; then
13531    BOOT_JDK="$new_path"
13532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13533$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13534  fi
13535
13536  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13537  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13538
13539  else
13540    # We're on a posix platform. Hooray! :)
13541    path="$BOOT_JDK"
13542
13543    if test ! -f "$path" && test ! -d "$path"; then
13544      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13545    fi
13546
13547    has_space=`$ECHO "$path" | $GREP " "`
13548    if test "x$has_space" != x; then
13549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13551      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13552    fi
13553  fi
13554
13555              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13556$as_echo_n "checking for Boot JDK... " >&6; }
13557              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13558$as_echo "$BOOT_JDK" >&6; }
13559              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13560$as_echo_n "checking Boot JDK version... " >&6; }
13561              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13562              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13563$as_echo "$BOOT_JDK_VERSION" >&6; }
13564            fi # end check jdk version
13565          fi # end check rt.jar
13566        fi # end check javac
13567      fi # end check java
13568    fi # end check boot jdk found
13569  fi
13570
13571    done
13572  fi
13573
13574  fi
13575
13576
13577    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13578    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13579      # Do we have a bin/java?
13580      if test ! -x "$BOOT_JDK/bin/java"; then
13581        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13583        BOOT_JDK_FOUND=no
13584      else
13585        # Do we have a bin/javac?
13586        if test ! -x "$BOOT_JDK/bin/javac"; then
13587          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13589          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13590$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13591          BOOT_JDK_FOUND=no
13592        else
13593          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13594          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13595            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13597            BOOT_JDK_FOUND=no
13598          else
13599            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13600            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13601
13602            # Extra M4 quote needed to protect [] in grep expression.
13603            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13604            if test "x$FOUND_VERSION_78" = x; then
13605              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13607              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13608$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13609              BOOT_JDK_FOUND=no
13610            else
13611              # We're done! :-)
13612              BOOT_JDK_FOUND=yes
13613
13614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13615
13616  # Input might be given as Windows format, start by converting to
13617  # unix format.
13618  path="$BOOT_JDK"
13619  new_path=`$CYGPATH -u "$path"`
13620
13621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13624  # "foo.exe" is OK but "foo" is an error.
13625  #
13626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13627  # It is also a way to make sure we got the proper file name for the real test later on.
13628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13629  if test "x$test_shortpath" = x; then
13630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13632    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13633  fi
13634
13635  # Call helper function which possibly converts this using DOS-style short mode.
13636  # If so, the updated path is stored in $new_path.
13637
13638  input_path="$new_path"
13639  # Check if we need to convert this using DOS-style short mode. If the path
13640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13641  # take no chances and rewrite it.
13642  # Note: m4 eats our [], so we need to use [ and ] instead.
13643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13644  if test "x$has_forbidden_chars" != x; then
13645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13649      # Going to short mode and back again did indeed matter. Since short mode is
13650      # case insensitive, let's make it lowercase to improve readability.
13651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13652      # Now convert it back to Unix-stile (cygpath)
13653      input_path=`$CYGPATH -u "$shortmode_path"`
13654      new_path="$input_path"
13655    fi
13656  fi
13657
13658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13659  if test "x$test_cygdrive_prefix" = x; then
13660    # As a simple fix, exclude /usr/bin since it's not a real path.
13661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13663      # a path prefixed by /cygdrive for fixpath to work.
13664      new_path="$CYGWIN_ROOT_PATH$input_path"
13665    fi
13666  fi
13667
13668
13669  if test "x$path" != "x$new_path"; then
13670    BOOT_JDK="$new_path"
13671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13672$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13673  fi
13674
13675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13676
13677  path="$BOOT_JDK"
13678  has_colon=`$ECHO $path | $GREP ^.:`
13679  new_path="$path"
13680  if test "x$has_colon" = x; then
13681    # Not in mixed or Windows style, start by that.
13682    new_path=`cmd //c echo $path`
13683  fi
13684
13685
13686  input_path="$new_path"
13687  # Check if we need to convert this using DOS-style short mode. If the path
13688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13689  # take no chances and rewrite it.
13690  # Note: m4 eats our [], so we need to use [ and ] instead.
13691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13692  if test "x$has_forbidden_chars" != x; then
13693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13695  fi
13696
13697
13698  windows_path="$new_path"
13699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13700    unix_path=`$CYGPATH -u "$windows_path"`
13701    new_path="$unix_path"
13702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13704    new_path="$unix_path"
13705  fi
13706
13707  if test "x$path" != "x$new_path"; then
13708    BOOT_JDK="$new_path"
13709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13711  fi
13712
13713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13715
13716  else
13717    # We're on a posix platform. Hooray! :)
13718    path="$BOOT_JDK"
13719
13720    if test ! -f "$path" && test ! -d "$path"; then
13721      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13722    fi
13723
13724    has_space=`$ECHO "$path" | $GREP " "`
13725    if test "x$has_space" != x; then
13726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13727$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13728      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13729    fi
13730  fi
13731
13732              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13733$as_echo_n "checking for Boot JDK... " >&6; }
13734              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13735$as_echo "$BOOT_JDK" >&6; }
13736              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13737$as_echo_n "checking Boot JDK version... " >&6; }
13738              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13739              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13740$as_echo "$BOOT_JDK_VERSION" >&6; }
13741            fi # end check jdk version
13742          fi # end check rt.jar
13743        fi # end check javac
13744      fi # end check java
13745    fi # end check boot jdk found
13746  fi
13747
13748
13749  if test "x$BOOT_JDK_FOUND" = xno; then
13750    # Now execute the test
13751
13752  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13753  BOOT_JDK_SUFFIX=""
13754  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13755  if test "x$ALL_JDKS_FOUND" != x; then
13756    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13757
13758  if test "x$BOOT_JDK_FOUND" = xno; then
13759    # Now execute the test
13760
13761        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13762        if test -d "$BOOT_JDK"; then
13763          BOOT_JDK_FOUND=maybe
13764          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13765$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13766        fi
13767
13768
13769    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13770    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13771      # Do we have a bin/java?
13772      if test ! -x "$BOOT_JDK/bin/java"; then
13773        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13775        BOOT_JDK_FOUND=no
13776      else
13777        # Do we have a bin/javac?
13778        if test ! -x "$BOOT_JDK/bin/javac"; then
13779          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13781          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13782$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13783          BOOT_JDK_FOUND=no
13784        else
13785          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13786          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13787            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13789            BOOT_JDK_FOUND=no
13790          else
13791            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13792            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13793
13794            # Extra M4 quote needed to protect [] in grep expression.
13795            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13796            if test "x$FOUND_VERSION_78" = x; then
13797              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13799              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13800$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13801              BOOT_JDK_FOUND=no
13802            else
13803              # We're done! :-)
13804              BOOT_JDK_FOUND=yes
13805
13806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13807
13808  # Input might be given as Windows format, start by converting to
13809  # unix format.
13810  path="$BOOT_JDK"
13811  new_path=`$CYGPATH -u "$path"`
13812
13813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13816  # "foo.exe" is OK but "foo" is an error.
13817  #
13818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13819  # It is also a way to make sure we got the proper file name for the real test later on.
13820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13821  if test "x$test_shortpath" = x; then
13822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13824    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13825  fi
13826
13827  # Call helper function which possibly converts this using DOS-style short mode.
13828  # If so, the updated path is stored in $new_path.
13829
13830  input_path="$new_path"
13831  # Check if we need to convert this using DOS-style short mode. If the path
13832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13833  # take no chances and rewrite it.
13834  # Note: m4 eats our [], so we need to use [ and ] instead.
13835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13836  if test "x$has_forbidden_chars" != x; then
13837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13841      # Going to short mode and back again did indeed matter. Since short mode is
13842      # case insensitive, let's make it lowercase to improve readability.
13843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13844      # Now convert it back to Unix-stile (cygpath)
13845      input_path=`$CYGPATH -u "$shortmode_path"`
13846      new_path="$input_path"
13847    fi
13848  fi
13849
13850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13851  if test "x$test_cygdrive_prefix" = x; then
13852    # As a simple fix, exclude /usr/bin since it's not a real path.
13853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13855      # a path prefixed by /cygdrive for fixpath to work.
13856      new_path="$CYGWIN_ROOT_PATH$input_path"
13857    fi
13858  fi
13859
13860
13861  if test "x$path" != "x$new_path"; then
13862    BOOT_JDK="$new_path"
13863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13864$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13865  fi
13866
13867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13868
13869  path="$BOOT_JDK"
13870  has_colon=`$ECHO $path | $GREP ^.:`
13871  new_path="$path"
13872  if test "x$has_colon" = x; then
13873    # Not in mixed or Windows style, start by that.
13874    new_path=`cmd //c echo $path`
13875  fi
13876
13877
13878  input_path="$new_path"
13879  # Check if we need to convert this using DOS-style short mode. If the path
13880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13881  # take no chances and rewrite it.
13882  # Note: m4 eats our [], so we need to use [ and ] instead.
13883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13884  if test "x$has_forbidden_chars" != x; then
13885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13887  fi
13888
13889
13890  windows_path="$new_path"
13891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13892    unix_path=`$CYGPATH -u "$windows_path"`
13893    new_path="$unix_path"
13894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13896    new_path="$unix_path"
13897  fi
13898
13899  if test "x$path" != "x$new_path"; then
13900    BOOT_JDK="$new_path"
13901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13902$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13903  fi
13904
13905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13907
13908  else
13909    # We're on a posix platform. Hooray! :)
13910    path="$BOOT_JDK"
13911
13912    if test ! -f "$path" && test ! -d "$path"; then
13913      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13914    fi
13915
13916    has_space=`$ECHO "$path" | $GREP " "`
13917    if test "x$has_space" != x; then
13918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13920      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13921    fi
13922  fi
13923
13924              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13925$as_echo_n "checking for Boot JDK... " >&6; }
13926              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13927$as_echo "$BOOT_JDK" >&6; }
13928              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13929$as_echo_n "checking Boot JDK version... " >&6; }
13930              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13931              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13932$as_echo "$BOOT_JDK_VERSION" >&6; }
13933            fi # end check jdk version
13934          fi # end check rt.jar
13935        fi # end check javac
13936      fi # end check java
13937    fi # end check boot jdk found
13938  fi
13939
13940    done
13941  fi
13942
13943
13944    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13945    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13946      # Do we have a bin/java?
13947      if test ! -x "$BOOT_JDK/bin/java"; then
13948        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13950        BOOT_JDK_FOUND=no
13951      else
13952        # Do we have a bin/javac?
13953        if test ! -x "$BOOT_JDK/bin/javac"; then
13954          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13956          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13957$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13958          BOOT_JDK_FOUND=no
13959        else
13960          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13961          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13962            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13964            BOOT_JDK_FOUND=no
13965          else
13966            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13967            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13968
13969            # Extra M4 quote needed to protect [] in grep expression.
13970            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13971            if test "x$FOUND_VERSION_78" = x; then
13972              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13974              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13975$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13976              BOOT_JDK_FOUND=no
13977            else
13978              # We're done! :-)
13979              BOOT_JDK_FOUND=yes
13980
13981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13982
13983  # Input might be given as Windows format, start by converting to
13984  # unix format.
13985  path="$BOOT_JDK"
13986  new_path=`$CYGPATH -u "$path"`
13987
13988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13991  # "foo.exe" is OK but "foo" is an error.
13992  #
13993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13994  # It is also a way to make sure we got the proper file name for the real test later on.
13995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13996  if test "x$test_shortpath" = x; then
13997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13998$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13999    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14000  fi
14001
14002  # Call helper function which possibly converts this using DOS-style short mode.
14003  # If so, the updated path is stored in $new_path.
14004
14005  input_path="$new_path"
14006  # Check if we need to convert this using DOS-style short mode. If the path
14007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14008  # take no chances and rewrite it.
14009  # Note: m4 eats our [], so we need to use [ and ] instead.
14010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14011  if test "x$has_forbidden_chars" != x; then
14012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14016      # Going to short mode and back again did indeed matter. Since short mode is
14017      # case insensitive, let's make it lowercase to improve readability.
14018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14019      # Now convert it back to Unix-stile (cygpath)
14020      input_path=`$CYGPATH -u "$shortmode_path"`
14021      new_path="$input_path"
14022    fi
14023  fi
14024
14025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14026  if test "x$test_cygdrive_prefix" = x; then
14027    # As a simple fix, exclude /usr/bin since it's not a real path.
14028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14030      # a path prefixed by /cygdrive for fixpath to work.
14031      new_path="$CYGWIN_ROOT_PATH$input_path"
14032    fi
14033  fi
14034
14035
14036  if test "x$path" != "x$new_path"; then
14037    BOOT_JDK="$new_path"
14038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14039$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14040  fi
14041
14042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14043
14044  path="$BOOT_JDK"
14045  has_colon=`$ECHO $path | $GREP ^.:`
14046  new_path="$path"
14047  if test "x$has_colon" = x; then
14048    # Not in mixed or Windows style, start by that.
14049    new_path=`cmd //c echo $path`
14050  fi
14051
14052
14053  input_path="$new_path"
14054  # Check if we need to convert this using DOS-style short mode. If the path
14055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14056  # take no chances and rewrite it.
14057  # Note: m4 eats our [], so we need to use [ and ] instead.
14058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14059  if test "x$has_forbidden_chars" != x; then
14060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14062  fi
14063
14064
14065  windows_path="$new_path"
14066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14067    unix_path=`$CYGPATH -u "$windows_path"`
14068    new_path="$unix_path"
14069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14071    new_path="$unix_path"
14072  fi
14073
14074  if test "x$path" != "x$new_path"; then
14075    BOOT_JDK="$new_path"
14076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14077$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14078  fi
14079
14080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14082
14083  else
14084    # We're on a posix platform. Hooray! :)
14085    path="$BOOT_JDK"
14086
14087    if test ! -f "$path" && test ! -d "$path"; then
14088      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14089    fi
14090
14091    has_space=`$ECHO "$path" | $GREP " "`
14092    if test "x$has_space" != x; then
14093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14094$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14095      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14096    fi
14097  fi
14098
14099              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14100$as_echo_n "checking for Boot JDK... " >&6; }
14101              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14102$as_echo "$BOOT_JDK" >&6; }
14103              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14104$as_echo_n "checking Boot JDK version... " >&6; }
14105              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14106              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14107$as_echo "$BOOT_JDK_VERSION" >&6; }
14108            fi # end check jdk version
14109          fi # end check rt.jar
14110        fi # end check javac
14111      fi # end check java
14112    fi # end check boot jdk found
14113  fi
14114
14115  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14116
14117  if test "x$BOOT_JDK_FOUND" = xno; then
14118    # Now execute the test
14119
14120  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14121  BOOT_JDK_SUFFIX="/Contents/Home"
14122  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14123  if test "x$ALL_JDKS_FOUND" != x; then
14124    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14125
14126  if test "x$BOOT_JDK_FOUND" = xno; then
14127    # Now execute the test
14128
14129        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14130        if test -d "$BOOT_JDK"; then
14131          BOOT_JDK_FOUND=maybe
14132          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14133$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14134        fi
14135
14136
14137    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14138    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14139      # Do we have a bin/java?
14140      if test ! -x "$BOOT_JDK/bin/java"; then
14141        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14143        BOOT_JDK_FOUND=no
14144      else
14145        # Do we have a bin/javac?
14146        if test ! -x "$BOOT_JDK/bin/javac"; then
14147          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14149          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14150$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14151          BOOT_JDK_FOUND=no
14152        else
14153          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14154          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14155            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14157            BOOT_JDK_FOUND=no
14158          else
14159            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14160            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14161
14162            # Extra M4 quote needed to protect [] in grep expression.
14163            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14164            if test "x$FOUND_VERSION_78" = x; then
14165              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14167              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14168$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14169              BOOT_JDK_FOUND=no
14170            else
14171              # We're done! :-)
14172              BOOT_JDK_FOUND=yes
14173
14174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14175
14176  # Input might be given as Windows format, start by converting to
14177  # unix format.
14178  path="$BOOT_JDK"
14179  new_path=`$CYGPATH -u "$path"`
14180
14181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14184  # "foo.exe" is OK but "foo" is an error.
14185  #
14186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14187  # It is also a way to make sure we got the proper file name for the real test later on.
14188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14189  if test "x$test_shortpath" = x; then
14190    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14192    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14193  fi
14194
14195  # Call helper function which possibly converts this using DOS-style short mode.
14196  # If so, the updated path is stored in $new_path.
14197
14198  input_path="$new_path"
14199  # Check if we need to convert this using DOS-style short mode. If the path
14200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14201  # take no chances and rewrite it.
14202  # Note: m4 eats our [], so we need to use [ and ] instead.
14203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14204  if test "x$has_forbidden_chars" != x; then
14205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14209      # Going to short mode and back again did indeed matter. Since short mode is
14210      # case insensitive, let's make it lowercase to improve readability.
14211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14212      # Now convert it back to Unix-stile (cygpath)
14213      input_path=`$CYGPATH -u "$shortmode_path"`
14214      new_path="$input_path"
14215    fi
14216  fi
14217
14218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14219  if test "x$test_cygdrive_prefix" = x; then
14220    # As a simple fix, exclude /usr/bin since it's not a real path.
14221    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14223      # a path prefixed by /cygdrive for fixpath to work.
14224      new_path="$CYGWIN_ROOT_PATH$input_path"
14225    fi
14226  fi
14227
14228
14229  if test "x$path" != "x$new_path"; then
14230    BOOT_JDK="$new_path"
14231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14232$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14233  fi
14234
14235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14236
14237  path="$BOOT_JDK"
14238  has_colon=`$ECHO $path | $GREP ^.:`
14239  new_path="$path"
14240  if test "x$has_colon" = x; then
14241    # Not in mixed or Windows style, start by that.
14242    new_path=`cmd //c echo $path`
14243  fi
14244
14245
14246  input_path="$new_path"
14247  # Check if we need to convert this using DOS-style short mode. If the path
14248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14249  # take no chances and rewrite it.
14250  # Note: m4 eats our [], so we need to use [ and ] instead.
14251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14252  if test "x$has_forbidden_chars" != x; then
14253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14255  fi
14256
14257
14258  windows_path="$new_path"
14259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14260    unix_path=`$CYGPATH -u "$windows_path"`
14261    new_path="$unix_path"
14262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14264    new_path="$unix_path"
14265  fi
14266
14267  if test "x$path" != "x$new_path"; then
14268    BOOT_JDK="$new_path"
14269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14270$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14271  fi
14272
14273  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14274  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14275
14276  else
14277    # We're on a posix platform. Hooray! :)
14278    path="$BOOT_JDK"
14279
14280    if test ! -f "$path" && test ! -d "$path"; then
14281      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14282    fi
14283
14284    has_space=`$ECHO "$path" | $GREP " "`
14285    if test "x$has_space" != x; then
14286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14287$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14288      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14289    fi
14290  fi
14291
14292              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14293$as_echo_n "checking for Boot JDK... " >&6; }
14294              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14295$as_echo "$BOOT_JDK" >&6; }
14296              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14297$as_echo_n "checking Boot JDK version... " >&6; }
14298              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14299              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14300$as_echo "$BOOT_JDK_VERSION" >&6; }
14301            fi # end check jdk version
14302          fi # end check rt.jar
14303        fi # end check javac
14304      fi # end check java
14305    fi # end check boot jdk found
14306  fi
14307
14308    done
14309  fi
14310
14311
14312    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14313    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14314      # Do we have a bin/java?
14315      if test ! -x "$BOOT_JDK/bin/java"; then
14316        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14318        BOOT_JDK_FOUND=no
14319      else
14320        # Do we have a bin/javac?
14321        if test ! -x "$BOOT_JDK/bin/javac"; then
14322          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14324          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14325$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14326          BOOT_JDK_FOUND=no
14327        else
14328          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14329          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14330            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14332            BOOT_JDK_FOUND=no
14333          else
14334            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14335            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14336
14337            # Extra M4 quote needed to protect [] in grep expression.
14338            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14339            if test "x$FOUND_VERSION_78" = x; then
14340              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14342              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14343$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14344              BOOT_JDK_FOUND=no
14345            else
14346              # We're done! :-)
14347              BOOT_JDK_FOUND=yes
14348
14349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14350
14351  # Input might be given as Windows format, start by converting to
14352  # unix format.
14353  path="$BOOT_JDK"
14354  new_path=`$CYGPATH -u "$path"`
14355
14356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14359  # "foo.exe" is OK but "foo" is an error.
14360  #
14361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14362  # It is also a way to make sure we got the proper file name for the real test later on.
14363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14364  if test "x$test_shortpath" = x; then
14365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14367    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14368  fi
14369
14370  # Call helper function which possibly converts this using DOS-style short mode.
14371  # If so, the updated path is stored in $new_path.
14372
14373  input_path="$new_path"
14374  # Check if we need to convert this using DOS-style short mode. If the path
14375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14376  # take no chances and rewrite it.
14377  # Note: m4 eats our [], so we need to use [ and ] instead.
14378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14379  if test "x$has_forbidden_chars" != x; then
14380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14384      # Going to short mode and back again did indeed matter. Since short mode is
14385      # case insensitive, let's make it lowercase to improve readability.
14386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14387      # Now convert it back to Unix-stile (cygpath)
14388      input_path=`$CYGPATH -u "$shortmode_path"`
14389      new_path="$input_path"
14390    fi
14391  fi
14392
14393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14394  if test "x$test_cygdrive_prefix" = x; then
14395    # As a simple fix, exclude /usr/bin since it's not a real path.
14396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14398      # a path prefixed by /cygdrive for fixpath to work.
14399      new_path="$CYGWIN_ROOT_PATH$input_path"
14400    fi
14401  fi
14402
14403
14404  if test "x$path" != "x$new_path"; then
14405    BOOT_JDK="$new_path"
14406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14407$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14408  fi
14409
14410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14411
14412  path="$BOOT_JDK"
14413  has_colon=`$ECHO $path | $GREP ^.:`
14414  new_path="$path"
14415  if test "x$has_colon" = x; then
14416    # Not in mixed or Windows style, start by that.
14417    new_path=`cmd //c echo $path`
14418  fi
14419
14420
14421  input_path="$new_path"
14422  # Check if we need to convert this using DOS-style short mode. If the path
14423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14424  # take no chances and rewrite it.
14425  # Note: m4 eats our [], so we need to use [ and ] instead.
14426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14427  if test "x$has_forbidden_chars" != x; then
14428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14430  fi
14431
14432
14433  windows_path="$new_path"
14434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14435    unix_path=`$CYGPATH -u "$windows_path"`
14436    new_path="$unix_path"
14437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14439    new_path="$unix_path"
14440  fi
14441
14442  if test "x$path" != "x$new_path"; then
14443    BOOT_JDK="$new_path"
14444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14445$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14446  fi
14447
14448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14450
14451  else
14452    # We're on a posix platform. Hooray! :)
14453    path="$BOOT_JDK"
14454
14455    if test ! -f "$path" && test ! -d "$path"; then
14456      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14457    fi
14458
14459    has_space=`$ECHO "$path" | $GREP " "`
14460    if test "x$has_space" != x; then
14461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14462$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14463      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14464    fi
14465  fi
14466
14467              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14468$as_echo_n "checking for Boot JDK... " >&6; }
14469              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14470$as_echo "$BOOT_JDK" >&6; }
14471              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14472$as_echo_n "checking Boot JDK version... " >&6; }
14473              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14474              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14475$as_echo "$BOOT_JDK_VERSION" >&6; }
14476            fi # end check jdk version
14477          fi # end check rt.jar
14478        fi # end check javac
14479      fi # end check java
14480    fi # end check boot jdk found
14481  fi
14482
14483
14484  if test "x$BOOT_JDK_FOUND" = xno; then
14485    # Now execute the test
14486
14487  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14488  BOOT_JDK_SUFFIX="/Contents/Home"
14489  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14490  if test "x$ALL_JDKS_FOUND" != x; then
14491    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14492
14493  if test "x$BOOT_JDK_FOUND" = xno; then
14494    # Now execute the test
14495
14496        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14497        if test -d "$BOOT_JDK"; then
14498          BOOT_JDK_FOUND=maybe
14499          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14500$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14501        fi
14502
14503
14504    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14505    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14506      # Do we have a bin/java?
14507      if test ! -x "$BOOT_JDK/bin/java"; then
14508        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14510        BOOT_JDK_FOUND=no
14511      else
14512        # Do we have a bin/javac?
14513        if test ! -x "$BOOT_JDK/bin/javac"; then
14514          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14516          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14517$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14518          BOOT_JDK_FOUND=no
14519        else
14520          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14521          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14522            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14524            BOOT_JDK_FOUND=no
14525          else
14526            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14527            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14528
14529            # Extra M4 quote needed to protect [] in grep expression.
14530            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14531            if test "x$FOUND_VERSION_78" = x; then
14532              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14534              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14535$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14536              BOOT_JDK_FOUND=no
14537            else
14538              # We're done! :-)
14539              BOOT_JDK_FOUND=yes
14540
14541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14542
14543  # Input might be given as Windows format, start by converting to
14544  # unix format.
14545  path="$BOOT_JDK"
14546  new_path=`$CYGPATH -u "$path"`
14547
14548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14551  # "foo.exe" is OK but "foo" is an error.
14552  #
14553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14554  # It is also a way to make sure we got the proper file name for the real test later on.
14555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14556  if test "x$test_shortpath" = x; then
14557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14558$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14559    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14560  fi
14561
14562  # Call helper function which possibly converts this using DOS-style short mode.
14563  # If so, the updated path is stored in $new_path.
14564
14565  input_path="$new_path"
14566  # Check if we need to convert this using DOS-style short mode. If the path
14567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14568  # take no chances and rewrite it.
14569  # Note: m4 eats our [], so we need to use [ and ] instead.
14570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14571  if test "x$has_forbidden_chars" != x; then
14572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14576      # Going to short mode and back again did indeed matter. Since short mode is
14577      # case insensitive, let's make it lowercase to improve readability.
14578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14579      # Now convert it back to Unix-stile (cygpath)
14580      input_path=`$CYGPATH -u "$shortmode_path"`
14581      new_path="$input_path"
14582    fi
14583  fi
14584
14585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14586  if test "x$test_cygdrive_prefix" = x; then
14587    # As a simple fix, exclude /usr/bin since it's not a real path.
14588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14590      # a path prefixed by /cygdrive for fixpath to work.
14591      new_path="$CYGWIN_ROOT_PATH$input_path"
14592    fi
14593  fi
14594
14595
14596  if test "x$path" != "x$new_path"; then
14597    BOOT_JDK="$new_path"
14598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14600  fi
14601
14602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14603
14604  path="$BOOT_JDK"
14605  has_colon=`$ECHO $path | $GREP ^.:`
14606  new_path="$path"
14607  if test "x$has_colon" = x; then
14608    # Not in mixed or Windows style, start by that.
14609    new_path=`cmd //c echo $path`
14610  fi
14611
14612
14613  input_path="$new_path"
14614  # Check if we need to convert this using DOS-style short mode. If the path
14615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14616  # take no chances and rewrite it.
14617  # Note: m4 eats our [], so we need to use [ and ] instead.
14618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14619  if test "x$has_forbidden_chars" != x; then
14620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14622  fi
14623
14624
14625  windows_path="$new_path"
14626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14627    unix_path=`$CYGPATH -u "$windows_path"`
14628    new_path="$unix_path"
14629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14631    new_path="$unix_path"
14632  fi
14633
14634  if test "x$path" != "x$new_path"; then
14635    BOOT_JDK="$new_path"
14636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14638  fi
14639
14640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14642
14643  else
14644    # We're on a posix platform. Hooray! :)
14645    path="$BOOT_JDK"
14646
14647    if test ! -f "$path" && test ! -d "$path"; then
14648      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14649    fi
14650
14651    has_space=`$ECHO "$path" | $GREP " "`
14652    if test "x$has_space" != x; then
14653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14654$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14655      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14656    fi
14657  fi
14658
14659              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14660$as_echo_n "checking for Boot JDK... " >&6; }
14661              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14662$as_echo "$BOOT_JDK" >&6; }
14663              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14664$as_echo_n "checking Boot JDK version... " >&6; }
14665              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14666              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14667$as_echo "$BOOT_JDK_VERSION" >&6; }
14668            fi # end check jdk version
14669          fi # end check rt.jar
14670        fi # end check javac
14671      fi # end check java
14672    fi # end check boot jdk found
14673  fi
14674
14675    done
14676  fi
14677
14678
14679    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14680    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14681      # Do we have a bin/java?
14682      if test ! -x "$BOOT_JDK/bin/java"; then
14683        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14685        BOOT_JDK_FOUND=no
14686      else
14687        # Do we have a bin/javac?
14688        if test ! -x "$BOOT_JDK/bin/javac"; then
14689          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14691          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14692$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14693          BOOT_JDK_FOUND=no
14694        else
14695          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14696          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14697            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14699            BOOT_JDK_FOUND=no
14700          else
14701            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14702            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14703
14704            # Extra M4 quote needed to protect [] in grep expression.
14705            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14706            if test "x$FOUND_VERSION_78" = x; then
14707              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14709              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14710$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14711              BOOT_JDK_FOUND=no
14712            else
14713              # We're done! :-)
14714              BOOT_JDK_FOUND=yes
14715
14716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14717
14718  # Input might be given as Windows format, start by converting to
14719  # unix format.
14720  path="$BOOT_JDK"
14721  new_path=`$CYGPATH -u "$path"`
14722
14723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14726  # "foo.exe" is OK but "foo" is an error.
14727  #
14728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14729  # It is also a way to make sure we got the proper file name for the real test later on.
14730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14731  if test "x$test_shortpath" = x; then
14732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14734    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14735  fi
14736
14737  # Call helper function which possibly converts this using DOS-style short mode.
14738  # If so, the updated path is stored in $new_path.
14739
14740  input_path="$new_path"
14741  # Check if we need to convert this using DOS-style short mode. If the path
14742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14743  # take no chances and rewrite it.
14744  # Note: m4 eats our [], so we need to use [ and ] instead.
14745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14746  if test "x$has_forbidden_chars" != x; then
14747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14751      # Going to short mode and back again did indeed matter. Since short mode is
14752      # case insensitive, let's make it lowercase to improve readability.
14753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14754      # Now convert it back to Unix-stile (cygpath)
14755      input_path=`$CYGPATH -u "$shortmode_path"`
14756      new_path="$input_path"
14757    fi
14758  fi
14759
14760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14761  if test "x$test_cygdrive_prefix" = x; then
14762    # As a simple fix, exclude /usr/bin since it's not a real path.
14763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14765      # a path prefixed by /cygdrive for fixpath to work.
14766      new_path="$CYGWIN_ROOT_PATH$input_path"
14767    fi
14768  fi
14769
14770
14771  if test "x$path" != "x$new_path"; then
14772    BOOT_JDK="$new_path"
14773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14774$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14775  fi
14776
14777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14778
14779  path="$BOOT_JDK"
14780  has_colon=`$ECHO $path | $GREP ^.:`
14781  new_path="$path"
14782  if test "x$has_colon" = x; then
14783    # Not in mixed or Windows style, start by that.
14784    new_path=`cmd //c echo $path`
14785  fi
14786
14787
14788  input_path="$new_path"
14789  # Check if we need to convert this using DOS-style short mode. If the path
14790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14791  # take no chances and rewrite it.
14792  # Note: m4 eats our [], so we need to use [ and ] instead.
14793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14794  if test "x$has_forbidden_chars" != x; then
14795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14797  fi
14798
14799
14800  windows_path="$new_path"
14801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14802    unix_path=`$CYGPATH -u "$windows_path"`
14803    new_path="$unix_path"
14804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14806    new_path="$unix_path"
14807  fi
14808
14809  if test "x$path" != "x$new_path"; then
14810    BOOT_JDK="$new_path"
14811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14812$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14813  fi
14814
14815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14817
14818  else
14819    # We're on a posix platform. Hooray! :)
14820    path="$BOOT_JDK"
14821
14822    if test ! -f "$path" && test ! -d "$path"; then
14823      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14824    fi
14825
14826    has_space=`$ECHO "$path" | $GREP " "`
14827    if test "x$has_space" != x; then
14828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14829$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14830      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14831    fi
14832  fi
14833
14834              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14835$as_echo_n "checking for Boot JDK... " >&6; }
14836              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14837$as_echo "$BOOT_JDK" >&6; }
14838              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14839$as_echo_n "checking Boot JDK version... " >&6; }
14840              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14841              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14842$as_echo "$BOOT_JDK_VERSION" >&6; }
14843            fi # end check jdk version
14844          fi # end check rt.jar
14845        fi # end check javac
14846      fi # end check java
14847    fi # end check boot jdk found
14848  fi
14849
14850  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14851
14852  if test "x$BOOT_JDK_FOUND" = xno; then
14853    # Now execute the test
14854
14855  BOOT_JDK_PREFIX="/usr/lib/jvm"
14856  BOOT_JDK_SUFFIX=""
14857  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14858  if test "x$ALL_JDKS_FOUND" != x; then
14859    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14860
14861  if test "x$BOOT_JDK_FOUND" = xno; then
14862    # Now execute the test
14863
14864        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14865        if test -d "$BOOT_JDK"; then
14866          BOOT_JDK_FOUND=maybe
14867          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14868$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14869        fi
14870
14871
14872    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14873    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14874      # Do we have a bin/java?
14875      if test ! -x "$BOOT_JDK/bin/java"; then
14876        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14878        BOOT_JDK_FOUND=no
14879      else
14880        # Do we have a bin/javac?
14881        if test ! -x "$BOOT_JDK/bin/javac"; then
14882          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14884          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14885$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14886          BOOT_JDK_FOUND=no
14887        else
14888          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14889          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14890            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14892            BOOT_JDK_FOUND=no
14893          else
14894            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14895            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14896
14897            # Extra M4 quote needed to protect [] in grep expression.
14898            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14899            if test "x$FOUND_VERSION_78" = x; then
14900              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14902              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14903$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14904              BOOT_JDK_FOUND=no
14905            else
14906              # We're done! :-)
14907              BOOT_JDK_FOUND=yes
14908
14909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14910
14911  # Input might be given as Windows format, start by converting to
14912  # unix format.
14913  path="$BOOT_JDK"
14914  new_path=`$CYGPATH -u "$path"`
14915
14916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14919  # "foo.exe" is OK but "foo" is an error.
14920  #
14921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14922  # It is also a way to make sure we got the proper file name for the real test later on.
14923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14924  if test "x$test_shortpath" = x; then
14925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14927    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14928  fi
14929
14930  # Call helper function which possibly converts this using DOS-style short mode.
14931  # If so, the updated path is stored in $new_path.
14932
14933  input_path="$new_path"
14934  # Check if we need to convert this using DOS-style short mode. If the path
14935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14936  # take no chances and rewrite it.
14937  # Note: m4 eats our [], so we need to use [ and ] instead.
14938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14939  if test "x$has_forbidden_chars" != x; then
14940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14944      # Going to short mode and back again did indeed matter. Since short mode is
14945      # case insensitive, let's make it lowercase to improve readability.
14946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14947      # Now convert it back to Unix-stile (cygpath)
14948      input_path=`$CYGPATH -u "$shortmode_path"`
14949      new_path="$input_path"
14950    fi
14951  fi
14952
14953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14954  if test "x$test_cygdrive_prefix" = x; then
14955    # As a simple fix, exclude /usr/bin since it's not a real path.
14956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14958      # a path prefixed by /cygdrive for fixpath to work.
14959      new_path="$CYGWIN_ROOT_PATH$input_path"
14960    fi
14961  fi
14962
14963
14964  if test "x$path" != "x$new_path"; then
14965    BOOT_JDK="$new_path"
14966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14968  fi
14969
14970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14971
14972  path="$BOOT_JDK"
14973  has_colon=`$ECHO $path | $GREP ^.:`
14974  new_path="$path"
14975  if test "x$has_colon" = x; then
14976    # Not in mixed or Windows style, start by that.
14977    new_path=`cmd //c echo $path`
14978  fi
14979
14980
14981  input_path="$new_path"
14982  # Check if we need to convert this using DOS-style short mode. If the path
14983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14984  # take no chances and rewrite it.
14985  # Note: m4 eats our [], so we need to use [ and ] instead.
14986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14987  if test "x$has_forbidden_chars" != x; then
14988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14990  fi
14991
14992
14993  windows_path="$new_path"
14994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14995    unix_path=`$CYGPATH -u "$windows_path"`
14996    new_path="$unix_path"
14997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14999    new_path="$unix_path"
15000  fi
15001
15002  if test "x$path" != "x$new_path"; then
15003    BOOT_JDK="$new_path"
15004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15005$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15006  fi
15007
15008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15010
15011  else
15012    # We're on a posix platform. Hooray! :)
15013    path="$BOOT_JDK"
15014
15015    if test ! -f "$path" && test ! -d "$path"; then
15016      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15017    fi
15018
15019    has_space=`$ECHO "$path" | $GREP " "`
15020    if test "x$has_space" != x; then
15021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15022$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15023      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15024    fi
15025  fi
15026
15027              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15028$as_echo_n "checking for Boot JDK... " >&6; }
15029              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15030$as_echo "$BOOT_JDK" >&6; }
15031              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15032$as_echo_n "checking Boot JDK version... " >&6; }
15033              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15034              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15035$as_echo "$BOOT_JDK_VERSION" >&6; }
15036            fi # end check jdk version
15037          fi # end check rt.jar
15038        fi # end check javac
15039      fi # end check java
15040    fi # end check boot jdk found
15041  fi
15042
15043    done
15044  fi
15045
15046
15047    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15048    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15049      # Do we have a bin/java?
15050      if test ! -x "$BOOT_JDK/bin/java"; then
15051        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15053        BOOT_JDK_FOUND=no
15054      else
15055        # Do we have a bin/javac?
15056        if test ! -x "$BOOT_JDK/bin/javac"; then
15057          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15059          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15060$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15061          BOOT_JDK_FOUND=no
15062        else
15063          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15064          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15065            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15067            BOOT_JDK_FOUND=no
15068          else
15069            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15070            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15071
15072            # Extra M4 quote needed to protect [] in grep expression.
15073            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15074            if test "x$FOUND_VERSION_78" = x; then
15075              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15077              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15078$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15079              BOOT_JDK_FOUND=no
15080            else
15081              # We're done! :-)
15082              BOOT_JDK_FOUND=yes
15083
15084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15085
15086  # Input might be given as Windows format, start by converting to
15087  # unix format.
15088  path="$BOOT_JDK"
15089  new_path=`$CYGPATH -u "$path"`
15090
15091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15094  # "foo.exe" is OK but "foo" is an error.
15095  #
15096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15097  # It is also a way to make sure we got the proper file name for the real test later on.
15098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15099  if test "x$test_shortpath" = x; then
15100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15102    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15103  fi
15104
15105  # Call helper function which possibly converts this using DOS-style short mode.
15106  # If so, the updated path is stored in $new_path.
15107
15108  input_path="$new_path"
15109  # Check if we need to convert this using DOS-style short mode. If the path
15110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15111  # take no chances and rewrite it.
15112  # Note: m4 eats our [], so we need to use [ and ] instead.
15113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15114  if test "x$has_forbidden_chars" != x; then
15115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15119      # Going to short mode and back again did indeed matter. Since short mode is
15120      # case insensitive, let's make it lowercase to improve readability.
15121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15122      # Now convert it back to Unix-stile (cygpath)
15123      input_path=`$CYGPATH -u "$shortmode_path"`
15124      new_path="$input_path"
15125    fi
15126  fi
15127
15128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15129  if test "x$test_cygdrive_prefix" = x; then
15130    # As a simple fix, exclude /usr/bin since it's not a real path.
15131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15133      # a path prefixed by /cygdrive for fixpath to work.
15134      new_path="$CYGWIN_ROOT_PATH$input_path"
15135    fi
15136  fi
15137
15138
15139  if test "x$path" != "x$new_path"; then
15140    BOOT_JDK="$new_path"
15141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15143  fi
15144
15145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15146
15147  path="$BOOT_JDK"
15148  has_colon=`$ECHO $path | $GREP ^.:`
15149  new_path="$path"
15150  if test "x$has_colon" = x; then
15151    # Not in mixed or Windows style, start by that.
15152    new_path=`cmd //c echo $path`
15153  fi
15154
15155
15156  input_path="$new_path"
15157  # Check if we need to convert this using DOS-style short mode. If the path
15158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15159  # take no chances and rewrite it.
15160  # Note: m4 eats our [], so we need to use [ and ] instead.
15161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15162  if test "x$has_forbidden_chars" != x; then
15163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15165  fi
15166
15167
15168  windows_path="$new_path"
15169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15170    unix_path=`$CYGPATH -u "$windows_path"`
15171    new_path="$unix_path"
15172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15174    new_path="$unix_path"
15175  fi
15176
15177  if test "x$path" != "x$new_path"; then
15178    BOOT_JDK="$new_path"
15179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15181  fi
15182
15183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15185
15186  else
15187    # We're on a posix platform. Hooray! :)
15188    path="$BOOT_JDK"
15189
15190    if test ! -f "$path" && test ! -d "$path"; then
15191      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15192    fi
15193
15194    has_space=`$ECHO "$path" | $GREP " "`
15195    if test "x$has_space" != x; then
15196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15198      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15199    fi
15200  fi
15201
15202              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15203$as_echo_n "checking for Boot JDK... " >&6; }
15204              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15205$as_echo "$BOOT_JDK" >&6; }
15206              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15207$as_echo_n "checking Boot JDK version... " >&6; }
15208              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15209              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15210$as_echo "$BOOT_JDK_VERSION" >&6; }
15211            fi # end check jdk version
15212          fi # end check rt.jar
15213        fi # end check javac
15214      fi # end check java
15215    fi # end check boot jdk found
15216  fi
15217
15218  fi
15219
15220
15221    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15222    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15223      # Do we have a bin/java?
15224      if test ! -x "$BOOT_JDK/bin/java"; then
15225        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15227        BOOT_JDK_FOUND=no
15228      else
15229        # Do we have a bin/javac?
15230        if test ! -x "$BOOT_JDK/bin/javac"; then
15231          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15233          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15234$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15235          BOOT_JDK_FOUND=no
15236        else
15237          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15238          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15239            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15241            BOOT_JDK_FOUND=no
15242          else
15243            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15244            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15245
15246            # Extra M4 quote needed to protect [] in grep expression.
15247            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15248            if test "x$FOUND_VERSION_78" = x; then
15249              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15251              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15252$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15253              BOOT_JDK_FOUND=no
15254            else
15255              # We're done! :-)
15256              BOOT_JDK_FOUND=yes
15257
15258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15259
15260  # Input might be given as Windows format, start by converting to
15261  # unix format.
15262  path="$BOOT_JDK"
15263  new_path=`$CYGPATH -u "$path"`
15264
15265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15268  # "foo.exe" is OK but "foo" is an error.
15269  #
15270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15271  # It is also a way to make sure we got the proper file name for the real test later on.
15272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15273  if test "x$test_shortpath" = x; then
15274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15275$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15276    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15277  fi
15278
15279  # Call helper function which possibly converts this using DOS-style short mode.
15280  # If so, the updated path is stored in $new_path.
15281
15282  input_path="$new_path"
15283  # Check if we need to convert this using DOS-style short mode. If the path
15284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15285  # take no chances and rewrite it.
15286  # Note: m4 eats our [], so we need to use [ and ] instead.
15287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15288  if test "x$has_forbidden_chars" != x; then
15289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15293      # Going to short mode and back again did indeed matter. Since short mode is
15294      # case insensitive, let's make it lowercase to improve readability.
15295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15296      # Now convert it back to Unix-stile (cygpath)
15297      input_path=`$CYGPATH -u "$shortmode_path"`
15298      new_path="$input_path"
15299    fi
15300  fi
15301
15302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15303  if test "x$test_cygdrive_prefix" = x; then
15304    # As a simple fix, exclude /usr/bin since it's not a real path.
15305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15307      # a path prefixed by /cygdrive for fixpath to work.
15308      new_path="$CYGWIN_ROOT_PATH$input_path"
15309    fi
15310  fi
15311
15312
15313  if test "x$path" != "x$new_path"; then
15314    BOOT_JDK="$new_path"
15315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15317  fi
15318
15319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15320
15321  path="$BOOT_JDK"
15322  has_colon=`$ECHO $path | $GREP ^.:`
15323  new_path="$path"
15324  if test "x$has_colon" = x; then
15325    # Not in mixed or Windows style, start by that.
15326    new_path=`cmd //c echo $path`
15327  fi
15328
15329
15330  input_path="$new_path"
15331  # Check if we need to convert this using DOS-style short mode. If the path
15332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15333  # take no chances and rewrite it.
15334  # Note: m4 eats our [], so we need to use [ and ] instead.
15335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15336  if test "x$has_forbidden_chars" != x; then
15337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15339  fi
15340
15341
15342  windows_path="$new_path"
15343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15344    unix_path=`$CYGPATH -u "$windows_path"`
15345    new_path="$unix_path"
15346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15348    new_path="$unix_path"
15349  fi
15350
15351  if test "x$path" != "x$new_path"; then
15352    BOOT_JDK="$new_path"
15353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15354$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15355  fi
15356
15357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15359
15360  else
15361    # We're on a posix platform. Hooray! :)
15362    path="$BOOT_JDK"
15363
15364    if test ! -f "$path" && test ! -d "$path"; then
15365      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15366    fi
15367
15368    has_space=`$ECHO "$path" | $GREP " "`
15369    if test "x$has_space" != x; then
15370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15372      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15373    fi
15374  fi
15375
15376              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15377$as_echo_n "checking for Boot JDK... " >&6; }
15378              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15379$as_echo "$BOOT_JDK" >&6; }
15380              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15381$as_echo_n "checking Boot JDK version... " >&6; }
15382              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15383              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15384$as_echo "$BOOT_JDK_VERSION" >&6; }
15385            fi # end check jdk version
15386          fi # end check rt.jar
15387        fi # end check javac
15388      fi # end check java
15389    fi # end check boot jdk found
15390  fi
15391
15392
15393# If we haven't found anything yet, we've truly lost. Give up.
15394if test "x$BOOT_JDK_FOUND" = xno; then
15395
15396    # Print a helpful message on how to acquire the necessary build dependency.
15397    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15398    MISSING_DEPENDENCY=openjdk
15399    PKGHANDLER_COMMAND=
15400
15401    case $PKGHANDLER in
15402	apt-get)
15403                apt_help     $MISSING_DEPENDENCY ;;
15404    yum)
15405                yum_help     $MISSING_DEPENDENCY ;;
15406	port)
15407                port_help    $MISSING_DEPENDENCY ;;
15408	pkgutil)
15409                pkgutil_help $MISSING_DEPENDENCY ;;
15410	pkgadd)
15411                pkgadd_help  $MISSING_DEPENDENCY ;;
15412    * )
15413      break ;;
15414    esac
15415
15416    if test "x$PKGHANDLER_COMMAND" != x; then
15417        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15418    fi
15419
15420  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15421$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15422  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15423$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15424  as_fn_error $? "Cannot continue" "$LINENO" 5
15425fi
15426
15427# Setup proper paths for what we found
15428BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15429if test ! -f "$BOOT_RTJAR"; then
15430    # On MacOSX it is called classes.jar
15431    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15432    if test -f "$BOOT_RTJAR"; then
15433      # Remove the ..
15434      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15435    fi
15436fi
15437BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15438BOOT_JDK="$BOOT_JDK"
15439
15440
15441
15442
15443# Setup tools from the Boot JDK.
15444
15445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15446$as_echo_n "checking for java in Boot JDK... " >&6; }
15447  JAVA=$BOOT_JDK/bin/java
15448  if test ! -x $JAVA; then
15449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15450$as_echo "not found" >&6; }
15451      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15452$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15453      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15454  fi
15455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15456$as_echo "ok" >&6; }
15457
15458
15459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15460$as_echo_n "checking for javac in Boot JDK... " >&6; }
15461  JAVAC=$BOOT_JDK/bin/javac
15462  if test ! -x $JAVAC; then
15463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15464$as_echo "not found" >&6; }
15465      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15466$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15467      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15468  fi
15469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15470$as_echo "ok" >&6; }
15471
15472
15473  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15474$as_echo_n "checking for javah in Boot JDK... " >&6; }
15475  JAVAH=$BOOT_JDK/bin/javah
15476  if test ! -x $JAVAH; then
15477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15478$as_echo "not found" >&6; }
15479      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15480$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15481      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15482  fi
15483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15484$as_echo "ok" >&6; }
15485
15486
15487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15488$as_echo_n "checking for javap in Boot JDK... " >&6; }
15489  JAVAP=$BOOT_JDK/bin/javap
15490  if test ! -x $JAVAP; then
15491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15492$as_echo "not found" >&6; }
15493      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15494$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15495      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15496  fi
15497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15498$as_echo "ok" >&6; }
15499
15500
15501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15502$as_echo_n "checking for jar in Boot JDK... " >&6; }
15503  JAR=$BOOT_JDK/bin/jar
15504  if test ! -x $JAR; then
15505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15506$as_echo "not found" >&6; }
15507      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15508$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15509      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15510  fi
15511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15512$as_echo "ok" >&6; }
15513
15514
15515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15516$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15517  RMIC=$BOOT_JDK/bin/rmic
15518  if test ! -x $RMIC; then
15519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15520$as_echo "not found" >&6; }
15521      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15522$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15523      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15524  fi
15525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15526$as_echo "ok" >&6; }
15527
15528
15529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15530$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15531  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15532  if test ! -x $NATIVE2ASCII; then
15533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15534$as_echo "not found" >&6; }
15535      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15536$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15537      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15538  fi
15539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15540$as_echo "ok" >&6; }
15541
15542
15543# Finally, set some other options...
15544
15545# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15546BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15547
15548
15549
15550
15551##############################################################################
15552#
15553# Specify options for anything that is run with the Boot JDK.
15554#
15555
15556# Check whether --with-boot-jdk-jvmargs was given.
15557if test "${with_boot_jdk_jvmargs+set}" = set; then :
15558  withval=$with_boot_jdk_jvmargs;
15559fi
15560
15561
15562if test "x$with_boot_jdk_jvmargs" = x; then
15563    # Not all JVM:s accept the same arguments on the command line.
15564    # OpenJDK specific increase in thread stack for JDK build,
15565    # well more specifically, when running javac.
15566    if test "x$BUILD_NUM_BITS" = x32; then
15567       STACK_SIZE=768
15568    else
15569       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15570       # since 64-bit pointers are pushed on the stach. Apparently, we need
15571       # to increase the stack space when javacing the JDK....
15572       STACK_SIZE=1536
15573    fi
15574
15575    # Minimum amount of heap memory.
15576
15577    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15578    # If so, then append -Xms64M to boot_jdk_jvmargs
15579    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15580    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15581    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15582        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15583    fi
15584
15585    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15586        # Why does macosx need more heap? Its the huge JDK batch.
15587
15588    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15589    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15590    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15591    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15592    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15593        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15594    fi
15595
15596    else
15597
15598    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15599    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15600    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15601    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15602    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15603        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15604    fi
15605
15606    fi
15607    # When is adding -client something that speeds up the JVM?
15608    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15609
15610    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15611    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15612    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15613    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15614    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15615        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15616    fi
15617
15618
15619    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15620    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15621    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15622    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15623    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15624        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15625    fi
15626
15627
15628    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15629    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15630    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15631    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15632    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15633        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15634    fi
15635
15636    # Disable special log output when a debug build is used as Boot JDK...
15637
15638    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15639    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15640    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15641    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15642    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15643        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15644    fi
15645
15646fi
15647
15648BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15649
15650
15651
15652###############################################################################
15653#
15654# Configure the sources to use. We can add or override individual directories.
15655#
15656###############################################################################
15657
15658
15659
15660# Where are the sources. Any of these can be overridden
15661# using --with-override-corba and the likes.
15662LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15663CORBA_TOPDIR="$SRC_ROOT/corba"
15664JAXP_TOPDIR="$SRC_ROOT/jaxp"
15665JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15666HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15667NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15668JDK_TOPDIR="$SRC_ROOT/jdk"
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679###############################################################################
15680#
15681# Pickup additional source for a component from outside of the source root
15682# or override source for a component.
15683#
15684
15685# Check whether --with-add-source-root was given.
15686if test "${with_add_source_root+set}" = set; then :
15687  withval=$with_add_source_root;
15688fi
15689
15690
15691
15692# Check whether --with-override-source-root was given.
15693if test "${with_override_source_root+set}" = set; then :
15694  withval=$with_override_source_root;
15695fi
15696
15697
15698
15699# Check whether --with-adds-and-overrides was given.
15700if test "${with_adds_and_overrides+set}" = set; then :
15701  withval=$with_adds_and_overrides;
15702fi
15703
15704
15705if test "x$with_adds_and_overrides" != x; then
15706    with_add_source_root="$with_adds_and_overrides/adds"
15707    with_override_source_root="$with_adds_and_overrides/overrides"
15708fi
15709
15710if test "x$with_add_source_root" != x; then
15711    if ! test -d $with_add_source_root; then
15712       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15713    fi
15714    CURDIR="$PWD"
15715    cd "$with_add_source_root"
15716    ADD_SRC_ROOT="`pwd`"
15717    cd "$CURDIR"
15718    # Verify that the addon source root does not have any root makefiles.
15719    # If it does, then it is usually an error, prevent this.
15720    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15721       test -f $with_add_source_root/langtools/make/Makefile; then
15722        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
15723    fi
15724    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15725       test -f $with_add_source_root/corba/make/Makefile; then
15726        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
15727    fi
15728    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15729       test -f $with_add_source_root/jaxp/make/Makefile; then
15730        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
15731    fi
15732    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15733       test -f $with_add_source_root/jaxws/make/Makefile; then
15734        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
15735    fi
15736    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15737       test -f $with_add_source_root/hotspot/make/Makefile; then
15738        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
15739    fi
15740    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15741       test -f $with_add_source_root/jdk/make/Makefile; then
15742        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
15743    fi
15744fi
15745
15746
15747if test "x$with_override_source_root" != x; then
15748    if ! test -d $with_override_source_root; then
15749       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15750    fi
15751    CURDIR="$PWD"
15752    cd "$with_override_source_root"
15753    OVERRIDE_SRC_ROOT="`pwd`"
15754    cd "$CURDIR"
15755    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15756       test -f $with_override_source_root/langtools/make/Makefile; then
15757        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
15758    fi
15759    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15760       test -f $with_override_source_root/corba/make/Makefile; then
15761        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
15762    fi
15763    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15764       test -f $with_override_source_root/jaxp/make/Makefile; then
15765        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
15766    fi
15767    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15768       test -f $with_override_source_root/jaxws/make/Makefile; then
15769        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
15770    fi
15771    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15772       test -f $with_override_source_root/hotspot/make/Makefile; then
15773        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
15774    fi
15775    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15776       test -f $with_override_source_root/jdk/make/Makefile; then
15777        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
15778    fi
15779fi
15780
15781
15782###############################################################################
15783#
15784# Override a repo completely, this is used for example when you have 3 small
15785# development sandboxes of the langtools sources and want to avoid having 3 full
15786# OpenJDK sources checked out on disk.
15787#
15788# Assuming that the 3 langtools sandboxes are located here:
15789# /home/fredrik/sandbox1/langtools
15790# /home/fredrik/sandbox2/langtools
15791# /home/fredrik/sandbox3/langtools
15792#
15793# From the source root you create build subdirs manually:
15794#     mkdir -p build1 build2 build3
15795# in each build directory run:
15796#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15797#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15798#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15799#
15800
15801
15802# Check whether --with-override-langtools was given.
15803if test "${with_override_langtools+set}" = set; then :
15804  withval=$with_override_langtools;
15805fi
15806
15807
15808
15809# Check whether --with-override-corba was given.
15810if test "${with_override_corba+set}" = set; then :
15811  withval=$with_override_corba;
15812fi
15813
15814
15815
15816# Check whether --with-override-jaxp was given.
15817if test "${with_override_jaxp+set}" = set; then :
15818  withval=$with_override_jaxp;
15819fi
15820
15821
15822
15823# Check whether --with-override-jaxws was given.
15824if test "${with_override_jaxws+set}" = set; then :
15825  withval=$with_override_jaxws;
15826fi
15827
15828
15829
15830# Check whether --with-override-hotspot was given.
15831if test "${with_override_hotspot+set}" = set; then :
15832  withval=$with_override_hotspot;
15833fi
15834
15835
15836
15837# Check whether --with-override-jdk was given.
15838if test "${with_override_jdk+set}" = set; then :
15839  withval=$with_override_jdk;
15840fi
15841
15842
15843if test "x$with_override_langtools" != x; then
15844    CURDIR="$PWD"
15845    cd "$with_override_langtools"
15846    LANGTOOLS_TOPDIR="`pwd`"
15847    cd "$CURDIR"
15848    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15849        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15850    fi
15851    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15852$as_echo_n "checking if langtools should be overridden... " >&6; }
15853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15854$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15855fi
15856if test "x$with_override_corba" != x; then
15857    CURDIR="$PWD"
15858    cd "$with_override_corba"
15859    CORBA_TOPDIR="`pwd`"
15860    cd "$CURDIR"
15861    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15862        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15863    fi
15864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15865$as_echo_n "checking if corba should be overridden... " >&6; }
15866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15867$as_echo "yes with $CORBA_TOPDIR" >&6; }
15868fi
15869if test "x$with_override_jaxp" != x; then
15870    CURDIR="$PWD"
15871    cd "$with_override_jaxp"
15872    JAXP_TOPDIR="`pwd`"
15873    cd "$CURDIR"
15874    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15875        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15876    fi
15877    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15878$as_echo_n "checking if jaxp should be overridden... " >&6; }
15879    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15880$as_echo "yes with $JAXP_TOPDIR" >&6; }
15881fi
15882if test "x$with_override_jaxws" != x; then
15883    CURDIR="$PWD"
15884    cd "$with_override_jaxws"
15885    JAXWS_TOPDIR="`pwd`"
15886    cd "$CURDIR"
15887    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15888        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15889    fi
15890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15891$as_echo_n "checking if jaxws should be overridden... " >&6; }
15892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15893$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15894fi
15895if test "x$with_override_hotspot" != x; then
15896    CURDIR="$PWD"
15897    cd "$with_override_hotspot"
15898    HOTSPOT_TOPDIR="`pwd`"
15899    cd "$CURDIR"
15900    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15901       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15902        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15903    fi
15904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15905$as_echo_n "checking if hotspot should be overridden... " >&6; }
15906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15907$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15908fi
15909if test "x$with_override_nashorn" != x; then
15910    CURDIR="$PWD"
15911    cd "$with_override_nashorn"
15912    NASHORN_TOPDIR="`pwd`"
15913    cd "$CURDIR"
15914    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
15915        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
15916    fi
15917    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
15918$as_echo_n "checking if nashorn should be overridden... " >&6; }
15919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
15920$as_echo "yes with $NASHORN_TOPDIR" >&6; }
15921fi
15922if test "x$with_override_jdk" != x; then
15923    CURDIR="$PWD"
15924    cd "$with_override_jdk"
15925    JDK_TOPDIR="`pwd`"
15926    cd "$CURDIR"
15927    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15928        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15929    fi
15930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15931$as_echo_n "checking if JDK should be overridden... " >&6; }
15932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15933$as_echo "yes with $JDK_TOPDIR" >&6; }
15934fi
15935
15936
15937
15938BUILD_OUTPUT="$OUTPUT_ROOT"
15939
15940
15941HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15942BUILD_HOTSPOT=true
15943
15944
15945
15946# Check whether --with-import-hotspot was given.
15947if test "${with_import_hotspot+set}" = set; then :
15948  withval=$with_import_hotspot;
15949fi
15950
15951if test "x$with_import_hotspot" != x; then
15952    CURDIR="$PWD"
15953    cd "$with_import_hotspot"
15954    HOTSPOT_DIST="`pwd`"
15955    cd "$CURDIR"
15956    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15957        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15958    fi
15959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15960$as_echo_n "checking if hotspot should be imported... " >&6; }
15961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15962$as_echo "yes from $HOTSPOT_DIST" >&6; }
15963    BUILD_HOTSPOT=false
15964fi
15965
15966JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15967
15968
15969###############################################################################
15970#
15971# Setup the toolchain (compilers etc), i.e. the tools that need to be
15972# cross-compilation aware.
15973#
15974###############################################################################
15975
15976
15977###############################################################################
15978#
15979# Configure the development tool paths and potential sysroot.
15980#
15981ac_ext=cpp
15982ac_cpp='$CXXCPP $CPPFLAGS'
15983ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15984ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15985ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15986
15987
15988# The option used to specify the target .o,.a or .so file.
15989# When compiling, how to specify the to be created object file.
15990CC_OUT_OPTION='-o$(SPACE)'
15991# When linking, how to specify the to be created executable.
15992EXE_OUT_OPTION='-o$(SPACE)'
15993# When linking, how to specify the to be created dynamically linkable library.
15994LD_OUT_OPTION='-o$(SPACE)'
15995# When archiving, how to specify the to be create static archive for object files.
15996AR_OUT_OPTION='rcs$(SPACE)'
15997
15998
15999
16000
16001
16002# Locate the actual tools
16003
16004if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16005
16006  # Store path to cygwin link.exe to help excluding it when searching for
16007  # VS linker. This must be done before changing the PATH when looking for VS.
16008  # Extract the first word of "link", so it can be a program name with args.
16009set dummy link; ac_word=$2
16010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16011$as_echo_n "checking for $ac_word... " >&6; }
16012if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16013  $as_echo_n "(cached) " >&6
16014else
16015  case $CYGWIN_LINK in
16016  [\\/]* | ?:[\\/]*)
16017  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16018  ;;
16019  *)
16020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16021for as_dir in $PATH
16022do
16023  IFS=$as_save_IFS
16024  test -z "$as_dir" && as_dir=.
16025    for ac_exec_ext in '' $ac_executable_extensions; do
16026  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16027    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16029    break 2
16030  fi
16031done
16032  done
16033IFS=$as_save_IFS
16034
16035  ;;
16036esac
16037fi
16038CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16039if test -n "$CYGWIN_LINK"; then
16040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16041$as_echo "$CYGWIN_LINK" >&6; }
16042else
16043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16044$as_echo "no" >&6; }
16045fi
16046
16047
16048  if test "x$CYGWIN_LINK" != x; then
16049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16050$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16051    "$CYGWIN_LINK" --version > /dev/null
16052    if test $? -eq 0 ; then
16053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16054$as_echo "yes" >&6; }
16055    else
16056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16057$as_echo "no" >&6; }
16058      # This might be the VS linker. Don't exclude it later on.
16059      CYGWIN_LINK=""
16060    fi
16061  fi
16062
16063  # First-hand choice is to locate and run the vsvars bat file.
16064
16065  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16066    VCVARSFILE="vc/bin/vcvars32.bat"
16067  else
16068    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16069  fi
16070
16071  VS_ENV_CMD=""
16072  VS_ENV_ARGS=""
16073  if test "x$with_toolsdir" != x; then
16074
16075  if test "x$VS_ENV_CMD" = x; then
16076    VS100BASE="$with_toolsdir/../.."
16077    METHOD="--with-tools-dir"
16078
16079  windows_path="$VS100BASE"
16080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16081    unix_path=`$CYGPATH -u "$windows_path"`
16082    VS100BASE="$unix_path"
16083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16085    VS100BASE="$unix_path"
16086  fi
16087
16088    if test -d "$VS100BASE"; then
16089      if test -f "$VS100BASE/$VCVARSFILE"; then
16090        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16091$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16092        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16093      else
16094        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16095$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16096        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16097$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16098      fi
16099    fi
16100  fi
16101
16102  fi
16103
16104  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16105    # Having specified an argument which is incorrect will produce an instant failure;
16106    # we should not go on looking
16107    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16108$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16109    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16110$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16111    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16112  fi
16113
16114  if test "x$ProgramW6432" != x; then
16115
16116  if test "x$VS_ENV_CMD" = x; then
16117    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16118    METHOD="well-known name"
16119
16120  windows_path="$WIN_SDK_BASE"
16121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16122    unix_path=`$CYGPATH -u "$windows_path"`
16123    WIN_SDK_BASE="$unix_path"
16124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16126    WIN_SDK_BASE="$unix_path"
16127  fi
16128
16129    if test -d "$WIN_SDK_BASE"; then
16130      # There have been cases of partial or broken SDK installations. A missing
16131      # lib dir is not going to work.
16132      if test ! -d "$WIN_SDK_BASE/../lib"; then
16133        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16134$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16135        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16136$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16137      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16138        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16139$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16140        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16141        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16142          VS_ENV_ARGS="/x86"
16143        else
16144          VS_ENV_ARGS="/x64"
16145        fi
16146      else
16147        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16148$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16149        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16150$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16151      fi
16152    fi
16153  fi
16154
16155  fi
16156  if test "x$PROGRAMW6432" != x; then
16157
16158  if test "x$VS_ENV_CMD" = x; then
16159    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16160    METHOD="well-known name"
16161
16162  windows_path="$WIN_SDK_BASE"
16163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16164    unix_path=`$CYGPATH -u "$windows_path"`
16165    WIN_SDK_BASE="$unix_path"
16166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16168    WIN_SDK_BASE="$unix_path"
16169  fi
16170
16171    if test -d "$WIN_SDK_BASE"; then
16172      # There have been cases of partial or broken SDK installations. A missing
16173      # lib dir is not going to work.
16174      if test ! -d "$WIN_SDK_BASE/../lib"; then
16175        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16176$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16177        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16178$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16179      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16180        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16181$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16182        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16183        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16184          VS_ENV_ARGS="/x86"
16185        else
16186          VS_ENV_ARGS="/x64"
16187        fi
16188      else
16189        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16190$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16191        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16192$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16193      fi
16194    fi
16195  fi
16196
16197  fi
16198  if test "x$PROGRAMFILES" != x; then
16199
16200  if test "x$VS_ENV_CMD" = x; then
16201    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16202    METHOD="well-known name"
16203
16204  windows_path="$WIN_SDK_BASE"
16205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16206    unix_path=`$CYGPATH -u "$windows_path"`
16207    WIN_SDK_BASE="$unix_path"
16208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16210    WIN_SDK_BASE="$unix_path"
16211  fi
16212
16213    if test -d "$WIN_SDK_BASE"; then
16214      # There have been cases of partial or broken SDK installations. A missing
16215      # lib dir is not going to work.
16216      if test ! -d "$WIN_SDK_BASE/../lib"; then
16217        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16218$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16219        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16220$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16221      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16222        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16223$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16224        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16225        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16226          VS_ENV_ARGS="/x86"
16227        else
16228          VS_ENV_ARGS="/x64"
16229        fi
16230      else
16231        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16232$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16233        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16234$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16235      fi
16236    fi
16237  fi
16238
16239  fi
16240
16241  if test "x$VS_ENV_CMD" = x; then
16242    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16243    METHOD="well-known name"
16244
16245  windows_path="$WIN_SDK_BASE"
16246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16247    unix_path=`$CYGPATH -u "$windows_path"`
16248    WIN_SDK_BASE="$unix_path"
16249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16251    WIN_SDK_BASE="$unix_path"
16252  fi
16253
16254    if test -d "$WIN_SDK_BASE"; then
16255      # There have been cases of partial or broken SDK installations. A missing
16256      # lib dir is not going to work.
16257      if test ! -d "$WIN_SDK_BASE/../lib"; then
16258        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16259$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16260        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16261$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16262      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16263        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16264$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16265        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16266        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16267          VS_ENV_ARGS="/x86"
16268        else
16269          VS_ENV_ARGS="/x64"
16270        fi
16271      else
16272        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16273$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16274        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16275$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16276      fi
16277    fi
16278  fi
16279
16280
16281  if test "x$VS_ENV_CMD" = x; then
16282    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16283    METHOD="well-known name"
16284
16285  windows_path="$WIN_SDK_BASE"
16286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16287    unix_path=`$CYGPATH -u "$windows_path"`
16288    WIN_SDK_BASE="$unix_path"
16289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16291    WIN_SDK_BASE="$unix_path"
16292  fi
16293
16294    if test -d "$WIN_SDK_BASE"; then
16295      # There have been cases of partial or broken SDK installations. A missing
16296      # lib dir is not going to work.
16297      if test ! -d "$WIN_SDK_BASE/../lib"; then
16298        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16299$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16300        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16301$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16302      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16303        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16304$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16305        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16306        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16307          VS_ENV_ARGS="/x86"
16308        else
16309          VS_ENV_ARGS="/x64"
16310        fi
16311      else
16312        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16313$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16314        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16315$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16316      fi
16317    fi
16318  fi
16319
16320
16321  if test "x$VS100COMNTOOLS" != x; then
16322
16323  if test "x$VS_ENV_CMD" = x; then
16324    VS100BASE="$VS100COMNTOOLS/../.."
16325    METHOD="VS100COMNTOOLS variable"
16326
16327  windows_path="$VS100BASE"
16328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16329    unix_path=`$CYGPATH -u "$windows_path"`
16330    VS100BASE="$unix_path"
16331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16333    VS100BASE="$unix_path"
16334  fi
16335
16336    if test -d "$VS100BASE"; then
16337      if test -f "$VS100BASE/$VCVARSFILE"; then
16338        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16339$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16340        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16341      else
16342        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16343$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16344        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16345$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16346      fi
16347    fi
16348  fi
16349
16350  fi
16351  if test "x$PROGRAMFILES" != x; then
16352
16353  if test "x$VS_ENV_CMD" = x; then
16354    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16355    METHOD="well-known name"
16356
16357  windows_path="$VS100BASE"
16358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16359    unix_path=`$CYGPATH -u "$windows_path"`
16360    VS100BASE="$unix_path"
16361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16363    VS100BASE="$unix_path"
16364  fi
16365
16366    if test -d "$VS100BASE"; then
16367      if test -f "$VS100BASE/$VCVARSFILE"; then
16368        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16369$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16370        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16371      else
16372        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16373$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16374        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16375$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16376      fi
16377    fi
16378  fi
16379
16380  fi
16381
16382  if test "x$VS_ENV_CMD" = x; then
16383    VS100BASE="C:/Program Files/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
16410  if test "x$VS_ENV_CMD" = x; then
16411    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16412    METHOD="well-known name"
16413
16414  windows_path="$VS100BASE"
16415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16416    unix_path=`$CYGPATH -u "$windows_path"`
16417    VS100BASE="$unix_path"
16418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16420    VS100BASE="$unix_path"
16421  fi
16422
16423    if test -d "$VS100BASE"; then
16424      if test -f "$VS100BASE/$VCVARSFILE"; then
16425        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16426$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16427        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16428      else
16429        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16430$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16431        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16432$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16433      fi
16434    fi
16435  fi
16436
16437
16438  if test "x$VS_ENV_CMD" != x; then
16439    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16440
16441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16442
16443  # First separate the path from the arguments. This will split at the first
16444  # space.
16445  complete="$VS_ENV_CMD"
16446  path="${complete%% *}"
16447  tmp="$complete EOL"
16448  arguments="${tmp#* }"
16449
16450  # Input might be given as Windows format, start by converting to
16451  # unix format.
16452  new_path=`$CYGPATH -u "$path"`
16453
16454  # Now try to locate executable using which
16455  new_path=`$WHICH "$new_path" 2> /dev/null`
16456  # bat and cmd files are not always considered executable in cygwin causing which
16457  # to not find them
16458  if test "x$new_path" = x \
16459           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16460           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16461    new_path=`$CYGPATH -u "$path"`
16462  fi
16463  if test "x$new_path" = x; then
16464    # Oops. Which didn't find the executable.
16465    # The splitting of arguments from the executable at a space might have been incorrect,
16466    # since paths with space are more likely in Windows. Give it another try with the whole
16467    # argument.
16468    path="$complete"
16469    arguments="EOL"
16470    new_path=`$CYGPATH -u "$path"`
16471    new_path=`$WHICH "$new_path" 2> /dev/null`
16472    # bat and cmd files are not always considered executable in cygwin causing which
16473    # to not find them
16474    if test "x$new_path" = x \
16475             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16476             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16477      new_path=`$CYGPATH -u "$path"`
16478    fi
16479    if test "x$new_path" = x; then
16480      # It's still not found. Now this is an unrecoverable error.
16481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16482$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16483      has_space=`$ECHO "$complete" | $GREP " "`
16484      if test "x$has_space" != x; then
16485        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16486$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16487      fi
16488      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16489    fi
16490  fi
16491
16492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16495  # "foo.exe" is OK but "foo" is an error.
16496  #
16497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16498  # It is also a way to make sure we got the proper file name for the real test later on.
16499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16500  if test "x$test_shortpath" = x; then
16501    # Short path failed, file does not exist as specified.
16502    # Try adding .exe or .cmd
16503    if test -f "${new_path}.exe"; then
16504       input_to_shortpath="${new_path}.exe"
16505    elif test -f "${new_path}.cmd"; then
16506       input_to_shortpath="${new_path}.cmd"
16507    else
16508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16509$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16510      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16511$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16512      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16513    fi
16514  else
16515    input_to_shortpath="$new_path"
16516  fi
16517
16518  # Call helper function which possibly converts this using DOS-style short mode.
16519  # If so, the updated path is stored in $new_path.
16520  new_path="$input_to_shortpath"
16521
16522  input_path="$input_to_shortpath"
16523  # Check if we need to convert this using DOS-style short mode. If the path
16524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16525  # take no chances and rewrite it.
16526  # Note: m4 eats our [], so we need to use [ and ] instead.
16527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16528  if test "x$has_forbidden_chars" != x; then
16529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16530    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16531    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16532    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16533      # Going to short mode and back again did indeed matter. Since short mode is
16534      # case insensitive, let's make it lowercase to improve readability.
16535      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16536      # Now convert it back to Unix-stile (cygpath)
16537      input_path=`$CYGPATH -u "$shortmode_path"`
16538      new_path="$input_path"
16539    fi
16540  fi
16541
16542  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16543  if test "x$test_cygdrive_prefix" = x; then
16544    # As a simple fix, exclude /usr/bin since it's not a real path.
16545    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16546      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16547      # a path prefixed by /cygdrive for fixpath to work.
16548      new_path="$CYGWIN_ROOT_PATH$input_path"
16549    fi
16550  fi
16551
16552  # remove trailing .exe if any
16553  new_path="${new_path/%.exe/}"
16554
16555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16556
16557  # First separate the path from the arguments. This will split at the first
16558  # space.
16559  complete="$VS_ENV_CMD"
16560  path="${complete%% *}"
16561  tmp="$complete EOL"
16562  arguments="${tmp#* }"
16563
16564  # Input might be given as Windows format, start by converting to
16565  # unix format.
16566  new_path="$path"
16567
16568  windows_path="$new_path"
16569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16570    unix_path=`$CYGPATH -u "$windows_path"`
16571    new_path="$unix_path"
16572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16574    new_path="$unix_path"
16575  fi
16576
16577
16578  # Now try to locate executable using which
16579  new_path=`$WHICH "$new_path" 2> /dev/null`
16580
16581  if test "x$new_path" = x; then
16582    # Oops. Which didn't find the executable.
16583    # The splitting of arguments from the executable at a space might have been incorrect,
16584    # since paths with space are more likely in Windows. Give it another try with the whole
16585    # argument.
16586    path="$complete"
16587    arguments="EOL"
16588    new_path="$path"
16589
16590  windows_path="$new_path"
16591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16592    unix_path=`$CYGPATH -u "$windows_path"`
16593    new_path="$unix_path"
16594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16596    new_path="$unix_path"
16597  fi
16598
16599
16600    new_path=`$WHICH "$new_path" 2> /dev/null`
16601
16602    if test "x$new_path" = x; then
16603      # It's still not found. Now this is an unrecoverable error.
16604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16605$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16606      has_space=`$ECHO "$complete" | $GREP " "`
16607      if test "x$has_space" != x; then
16608        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16609$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16610      fi
16611      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16612    fi
16613  fi
16614
16615  # Now new_path has a complete unix path to the binary
16616  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16617    # Keep paths in /bin as-is, but remove trailing .exe if any
16618    new_path="${new_path/%.exe/}"
16619    # Do not save /bin paths to all_fixpath_prefixes!
16620  else
16621    # Not in mixed or Windows style, start by that.
16622    new_path=`cmd //c echo $new_path`
16623
16624  input_path="$new_path"
16625  # Check if we need to convert this using DOS-style short mode. If the path
16626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16627  # take no chances and rewrite it.
16628  # Note: m4 eats our [], so we need to use [ and ] instead.
16629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16630  if test "x$has_forbidden_chars" != x; then
16631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16633  fi
16634
16635    # Output is in $new_path
16636
16637  windows_path="$new_path"
16638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16639    unix_path=`$CYGPATH -u "$windows_path"`
16640    new_path="$unix_path"
16641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16643    new_path="$unix_path"
16644  fi
16645
16646    # remove trailing .exe if any
16647    new_path="${new_path/%.exe/}"
16648
16649    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16650    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16651  fi
16652
16653  else
16654    # We're on a posix platform. Hooray! :)
16655    # First separate the path from the arguments. This will split at the first
16656    # space.
16657    complete="$VS_ENV_CMD"
16658    path="${complete%% *}"
16659    tmp="$complete EOL"
16660    arguments="${tmp#* }"
16661
16662    # Cannot rely on the command "which" here since it doesn't always work.
16663    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16664    if test -z "$is_absolute_path"; then
16665      # Path to executable is not absolute. Find it.
16666      IFS_save="$IFS"
16667      IFS=:
16668      for p in $PATH; do
16669        if test -f "$p/$path" && test -x "$p/$path"; then
16670          new_path="$p/$path"
16671          break
16672        fi
16673      done
16674      IFS="$IFS_save"
16675    else
16676      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16677$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16678      new_path="$path"
16679    fi
16680
16681    if test "x$new_path" = x; then
16682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16683$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16684        has_space=`$ECHO "$complete" | $GREP " "`
16685        if test "x$has_space" != x; then
16686          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16687$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16688        fi
16689        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16690      fi
16691  fi
16692
16693      # Now join together the path and the arguments once again
16694      if test "x$arguments" != xEOL; then
16695        new_complete="$new_path ${arguments% *}"
16696      else
16697        new_complete="$new_path"
16698      fi
16699
16700  if test "x$complete" != "x$new_complete"; then
16701      VS_ENV_CMD="$new_complete"
16702      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16703$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16704    fi
16705
16706
16707    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16708    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16709$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16710    cd $OUTPUT_ROOT
16711    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16712    # to autoconf standards.
16713
16714    #----
16715
16716    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16717    # but calculate the difference in Cygwin environment before/after running it and then
16718    # apply the diff.
16719
16720    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16721      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16722      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16723      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16724    else
16725      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16726      _dosbash=`cmd //c echo \`which bash\``
16727    fi
16728
16729    # generate the set of exported vars before/after the vs10 setup
16730    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16731    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16732    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16733    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16734
16735    # Now execute the newly created bat file.
16736    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16737    cmd /c localdevenvtmp.bat | cat
16738
16739    # apply the diff (less some non-vs10 vars named by "!")
16740    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16741    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16742    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16743
16744    # cleanup
16745    $RM localdevenvtmp*
16746    #----
16747    cd $CURDIR
16748    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16750$as_echo "no" >&6; }
16751      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16752$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16753      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16754$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16755      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16756$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16757      as_fn_error $? "Cannot continue" "$LINENO" 5
16758    fi
16759
16760    # Now set all paths and other env variables. This will allow the rest of
16761    # the configure script to find and run the compiler in the proper way.
16762    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16763$as_echo "$as_me: Setting extracted environment variables" >&6;}
16764    . $OUTPUT_ROOT/localdevenv.sh
16765  else
16766    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16767    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16768$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16769  fi
16770
16771  # At this point, we should have corrent variables in the environment, or we can't continue.
16772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16773$as_echo_n "checking for Visual Studio variables... " >&6; }
16774
16775  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16776    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16777      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16778$as_echo "present but broken" >&6; }
16779      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16780    else
16781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16782$as_echo "ok" >&6; }
16783      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16784      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16785      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16786      VS_PATH="$PATH"
16787
16788
16789
16790    fi
16791  else
16792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16793$as_echo "not found" >&6; }
16794
16795    if test "x$VS_ENV_CMD" = x; then
16796      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16797$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16798      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16799$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16800    else
16801      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16802$as_echo "$as_me: Running the extraction script failed." >&6;}
16803    fi
16804    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16805$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16806    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16807$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16808    as_fn_error $? "Cannot continue" "$LINENO" 5
16809  fi
16810
16811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16812$as_echo_n "checking for msvcr100.dll... " >&6; }
16813
16814# Check whether --with-msvcr-dll was given.
16815if test "${with_msvcr_dll+set}" = set; then :
16816  withval=$with_msvcr_dll;
16817fi
16818
16819  if test "x$with_msvcr_dll" != x; then
16820    MSVCR_DLL="$with_msvcr_dll"
16821  else
16822    if test "x$VCINSTALLDIR" != x; then
16823      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16824        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16825      else
16826        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16827        if test "x$MSVCR_DLL" = x; then
16828          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16829        fi
16830      fi
16831      if test "x$MSVCR_DLL" != x; then
16832        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16833$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16834      else
16835        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16836$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16837      fi
16838    fi
16839    if test "x$MSVCR_DLL" = x; then
16840      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16841        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16842$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16843        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16844      fi
16845    fi
16846  fi
16847  if test "x$MSVCR_DLL" = x; then
16848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16849$as_echo "no" >&6; }
16850    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16851  fi
16852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16853$as_echo "$MSVCR_DLL" >&6; }
16854
16855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16856
16857  # Input might be given as Windows format, start by converting to
16858  # unix format.
16859  path="$MSVCR_DLL"
16860  new_path=`$CYGPATH -u "$path"`
16861
16862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16865  # "foo.exe" is OK but "foo" is an error.
16866  #
16867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16868  # It is also a way to make sure we got the proper file name for the real test later on.
16869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16870  if test "x$test_shortpath" = x; then
16871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16872$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16873    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16874  fi
16875
16876  # Call helper function which possibly converts this using DOS-style short mode.
16877  # If so, the updated path is stored in $new_path.
16878
16879  input_path="$new_path"
16880  # Check if we need to convert this using DOS-style short mode. If the path
16881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16882  # take no chances and rewrite it.
16883  # Note: m4 eats our [], so we need to use [ and ] instead.
16884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16885  if test "x$has_forbidden_chars" != x; then
16886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16890      # Going to short mode and back again did indeed matter. Since short mode is
16891      # case insensitive, let's make it lowercase to improve readability.
16892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16893      # Now convert it back to Unix-stile (cygpath)
16894      input_path=`$CYGPATH -u "$shortmode_path"`
16895      new_path="$input_path"
16896    fi
16897  fi
16898
16899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16900  if test "x$test_cygdrive_prefix" = x; then
16901    # As a simple fix, exclude /usr/bin since it's not a real path.
16902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16904      # a path prefixed by /cygdrive for fixpath to work.
16905      new_path="$CYGWIN_ROOT_PATH$input_path"
16906    fi
16907  fi
16908
16909
16910  if test "x$path" != "x$new_path"; then
16911    MSVCR_DLL="$new_path"
16912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16913$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16914  fi
16915
16916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16917
16918  path="$MSVCR_DLL"
16919  has_colon=`$ECHO $path | $GREP ^.:`
16920  new_path="$path"
16921  if test "x$has_colon" = x; then
16922    # Not in mixed or Windows style, start by that.
16923    new_path=`cmd //c echo $path`
16924  fi
16925
16926
16927  input_path="$new_path"
16928  # Check if we need to convert this using DOS-style short mode. If the path
16929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16930  # take no chances and rewrite it.
16931  # Note: m4 eats our [], so we need to use [ and ] instead.
16932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16933  if test "x$has_forbidden_chars" != x; then
16934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16936  fi
16937
16938
16939  windows_path="$new_path"
16940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16941    unix_path=`$CYGPATH -u "$windows_path"`
16942    new_path="$unix_path"
16943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16945    new_path="$unix_path"
16946  fi
16947
16948  if test "x$path" != "x$new_path"; then
16949    MSVCR_DLL="$new_path"
16950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16951$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16952  fi
16953
16954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16956
16957  else
16958    # We're on a posix platform. Hooray! :)
16959    path="$MSVCR_DLL"
16960
16961    if test ! -f "$path" && test ! -d "$path"; then
16962      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16963    fi
16964
16965    has_space=`$ECHO "$path" | $GREP " "`
16966    if test "x$has_space" != x; then
16967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16968$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16969      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16970    fi
16971  fi
16972
16973
16974fi
16975
16976
16977
16978# If --build AND --host is set, then the configure script will find any
16979# cross compilation tools in the PATH. Cross compilation tools
16980# follows the cross compilation standard where they are prefixed with ${host}.
16981# For example the binary i686-sun-solaris2.10-gcc
16982# will cross compile for i686-sun-solaris2.10
16983# If neither of build and host is not set, then build=host and the
16984# default compiler found in the path will be used.
16985# Setting only --host, does not seem to be really supported.
16986# Please set both --build and --host if you want to cross compile.
16987
16988if test "x$COMPILE_TYPE" = "xcross"; then
16989    # Now we to find a C/C++ compiler that can build executables for the build
16990    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16991    # once. Also, we need to do this before adding a tools dir to the path,
16992    # otherwise we might pick up cross-compilers which don't use standard naming.
16993    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16994    # to wait until they are properly discovered.
16995    for ac_prog in cl cc gcc
16996do
16997  # Extract the first word of "$ac_prog", so it can be a program name with args.
16998set dummy $ac_prog; ac_word=$2
16999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17000$as_echo_n "checking for $ac_word... " >&6; }
17001if ${ac_cv_path_BUILD_CC+:} false; then :
17002  $as_echo_n "(cached) " >&6
17003else
17004  case $BUILD_CC in
17005  [\\/]* | ?:[\\/]*)
17006  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17007  ;;
17008  *)
17009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17010for as_dir in $PATH
17011do
17012  IFS=$as_save_IFS
17013  test -z "$as_dir" && as_dir=.
17014    for ac_exec_ext in '' $ac_executable_extensions; do
17015  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17016    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17018    break 2
17019  fi
17020done
17021  done
17022IFS=$as_save_IFS
17023
17024  ;;
17025esac
17026fi
17027BUILD_CC=$ac_cv_path_BUILD_CC
17028if test -n "$BUILD_CC"; then
17029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17030$as_echo "$BUILD_CC" >&6; }
17031else
17032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17033$as_echo "no" >&6; }
17034fi
17035
17036
17037  test -n "$BUILD_CC" && break
17038done
17039
17040
17041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17042
17043  # First separate the path from the arguments. This will split at the first
17044  # space.
17045  complete="$BUILD_CC"
17046  path="${complete%% *}"
17047  tmp="$complete EOL"
17048  arguments="${tmp#* }"
17049
17050  # Input might be given as Windows format, start by converting to
17051  # unix format.
17052  new_path=`$CYGPATH -u "$path"`
17053
17054  # Now try to locate executable using which
17055  new_path=`$WHICH "$new_path" 2> /dev/null`
17056  # bat and cmd files are not always considered executable in cygwin causing which
17057  # to not find them
17058  if test "x$new_path" = x \
17059           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17060           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17061    new_path=`$CYGPATH -u "$path"`
17062  fi
17063  if test "x$new_path" = x; then
17064    # Oops. Which didn't find the executable.
17065    # The splitting of arguments from the executable at a space might have been incorrect,
17066    # since paths with space are more likely in Windows. Give it another try with the whole
17067    # argument.
17068    path="$complete"
17069    arguments="EOL"
17070    new_path=`$CYGPATH -u "$path"`
17071    new_path=`$WHICH "$new_path" 2> /dev/null`
17072    # bat and cmd files are not always considered executable in cygwin causing which
17073    # to not find them
17074    if test "x$new_path" = x \
17075             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17076             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17077      new_path=`$CYGPATH -u "$path"`
17078    fi
17079    if test "x$new_path" = x; then
17080      # It's still not found. Now this is an unrecoverable error.
17081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17082$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17083      has_space=`$ECHO "$complete" | $GREP " "`
17084      if test "x$has_space" != x; then
17085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17087      fi
17088      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17089    fi
17090  fi
17091
17092  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17093  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17094  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17095  # "foo.exe" is OK but "foo" is an error.
17096  #
17097  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17098  # It is also a way to make sure we got the proper file name for the real test later on.
17099  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17100  if test "x$test_shortpath" = x; then
17101    # Short path failed, file does not exist as specified.
17102    # Try adding .exe or .cmd
17103    if test -f "${new_path}.exe"; then
17104       input_to_shortpath="${new_path}.exe"
17105    elif test -f "${new_path}.cmd"; then
17106       input_to_shortpath="${new_path}.cmd"
17107    else
17108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17109$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17110      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17111$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17112      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17113    fi
17114  else
17115    input_to_shortpath="$new_path"
17116  fi
17117
17118  # Call helper function which possibly converts this using DOS-style short mode.
17119  # If so, the updated path is stored in $new_path.
17120  new_path="$input_to_shortpath"
17121
17122  input_path="$input_to_shortpath"
17123  # Check if we need to convert this using DOS-style short mode. If the path
17124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17125  # take no chances and rewrite it.
17126  # Note: m4 eats our [], so we need to use [ and ] instead.
17127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17128  if test "x$has_forbidden_chars" != x; then
17129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17133      # Going to short mode and back again did indeed matter. Since short mode is
17134      # case insensitive, let's make it lowercase to improve readability.
17135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17136      # Now convert it back to Unix-stile (cygpath)
17137      input_path=`$CYGPATH -u "$shortmode_path"`
17138      new_path="$input_path"
17139    fi
17140  fi
17141
17142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17143  if test "x$test_cygdrive_prefix" = x; then
17144    # As a simple fix, exclude /usr/bin since it's not a real path.
17145    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17147      # a path prefixed by /cygdrive for fixpath to work.
17148      new_path="$CYGWIN_ROOT_PATH$input_path"
17149    fi
17150  fi
17151
17152  # remove trailing .exe if any
17153  new_path="${new_path/%.exe/}"
17154
17155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17156
17157  # First separate the path from the arguments. This will split at the first
17158  # space.
17159  complete="$BUILD_CC"
17160  path="${complete%% *}"
17161  tmp="$complete EOL"
17162  arguments="${tmp#* }"
17163
17164  # Input might be given as Windows format, start by converting to
17165  # unix format.
17166  new_path="$path"
17167
17168  windows_path="$new_path"
17169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17170    unix_path=`$CYGPATH -u "$windows_path"`
17171    new_path="$unix_path"
17172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17174    new_path="$unix_path"
17175  fi
17176
17177
17178  # Now try to locate executable using which
17179  new_path=`$WHICH "$new_path" 2> /dev/null`
17180
17181  if test "x$new_path" = x; then
17182    # Oops. Which didn't find the executable.
17183    # The splitting of arguments from the executable at a space might have been incorrect,
17184    # since paths with space are more likely in Windows. Give it another try with the whole
17185    # argument.
17186    path="$complete"
17187    arguments="EOL"
17188    new_path="$path"
17189
17190  windows_path="$new_path"
17191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17192    unix_path=`$CYGPATH -u "$windows_path"`
17193    new_path="$unix_path"
17194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17196    new_path="$unix_path"
17197  fi
17198
17199
17200    new_path=`$WHICH "$new_path" 2> /dev/null`
17201
17202    if test "x$new_path" = x; then
17203      # It's still not found. Now this is an unrecoverable error.
17204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17205$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17206      has_space=`$ECHO "$complete" | $GREP " "`
17207      if test "x$has_space" != x; then
17208        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17209$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17210      fi
17211      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17212    fi
17213  fi
17214
17215  # Now new_path has a complete unix path to the binary
17216  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17217    # Keep paths in /bin as-is, but remove trailing .exe if any
17218    new_path="${new_path/%.exe/}"
17219    # Do not save /bin paths to all_fixpath_prefixes!
17220  else
17221    # Not in mixed or Windows style, start by that.
17222    new_path=`cmd //c echo $new_path`
17223
17224  input_path="$new_path"
17225  # Check if we need to convert this using DOS-style short mode. If the path
17226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17227  # take no chances and rewrite it.
17228  # Note: m4 eats our [], so we need to use [ and ] instead.
17229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17230  if test "x$has_forbidden_chars" != x; then
17231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17233  fi
17234
17235    # Output is in $new_path
17236
17237  windows_path="$new_path"
17238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17239    unix_path=`$CYGPATH -u "$windows_path"`
17240    new_path="$unix_path"
17241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17243    new_path="$unix_path"
17244  fi
17245
17246    # remove trailing .exe if any
17247    new_path="${new_path/%.exe/}"
17248
17249    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17250    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17251  fi
17252
17253  else
17254    # We're on a posix platform. Hooray! :)
17255    # First separate the path from the arguments. This will split at the first
17256    # space.
17257    complete="$BUILD_CC"
17258    path="${complete%% *}"
17259    tmp="$complete EOL"
17260    arguments="${tmp#* }"
17261
17262    # Cannot rely on the command "which" here since it doesn't always work.
17263    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17264    if test -z "$is_absolute_path"; then
17265      # Path to executable is not absolute. Find it.
17266      IFS_save="$IFS"
17267      IFS=:
17268      for p in $PATH; do
17269        if test -f "$p/$path" && test -x "$p/$path"; then
17270          new_path="$p/$path"
17271          break
17272        fi
17273      done
17274      IFS="$IFS_save"
17275    else
17276      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17277$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17278      new_path="$path"
17279    fi
17280
17281    if test "x$new_path" = x; then
17282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17283$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17284        has_space=`$ECHO "$complete" | $GREP " "`
17285        if test "x$has_space" != x; then
17286          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17287$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17288        fi
17289        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17290      fi
17291  fi
17292
17293      # Now join together the path and the arguments once again
17294      if test "x$arguments" != xEOL; then
17295        new_complete="$new_path ${arguments% *}"
17296      else
17297        new_complete="$new_path"
17298      fi
17299
17300  if test "x$complete" != "x$new_complete"; then
17301      BUILD_CC="$new_complete"
17302      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17303$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17304    fi
17305
17306    for ac_prog in cl CC g++
17307do
17308  # Extract the first word of "$ac_prog", so it can be a program name with args.
17309set dummy $ac_prog; ac_word=$2
17310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17311$as_echo_n "checking for $ac_word... " >&6; }
17312if ${ac_cv_path_BUILD_CXX+:} false; then :
17313  $as_echo_n "(cached) " >&6
17314else
17315  case $BUILD_CXX in
17316  [\\/]* | ?:[\\/]*)
17317  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17318  ;;
17319  *)
17320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17321for as_dir in $PATH
17322do
17323  IFS=$as_save_IFS
17324  test -z "$as_dir" && as_dir=.
17325    for ac_exec_ext in '' $ac_executable_extensions; do
17326  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17327    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17329    break 2
17330  fi
17331done
17332  done
17333IFS=$as_save_IFS
17334
17335  ;;
17336esac
17337fi
17338BUILD_CXX=$ac_cv_path_BUILD_CXX
17339if test -n "$BUILD_CXX"; then
17340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17341$as_echo "$BUILD_CXX" >&6; }
17342else
17343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17344$as_echo "no" >&6; }
17345fi
17346
17347
17348  test -n "$BUILD_CXX" && break
17349done
17350
17351
17352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17353
17354  # First separate the path from the arguments. This will split at the first
17355  # space.
17356  complete="$BUILD_CXX"
17357  path="${complete%% *}"
17358  tmp="$complete EOL"
17359  arguments="${tmp#* }"
17360
17361  # Input might be given as Windows format, start by converting to
17362  # unix format.
17363  new_path=`$CYGPATH -u "$path"`
17364
17365  # Now try to locate executable using which
17366  new_path=`$WHICH "$new_path" 2> /dev/null`
17367  # bat and cmd files are not always considered executable in cygwin causing which
17368  # to not find them
17369  if test "x$new_path" = x \
17370           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17371           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17372    new_path=`$CYGPATH -u "$path"`
17373  fi
17374  if test "x$new_path" = x; then
17375    # Oops. Which didn't find the executable.
17376    # The splitting of arguments from the executable at a space might have been incorrect,
17377    # since paths with space are more likely in Windows. Give it another try with the whole
17378    # argument.
17379    path="$complete"
17380    arguments="EOL"
17381    new_path=`$CYGPATH -u "$path"`
17382    new_path=`$WHICH "$new_path" 2> /dev/null`
17383    # bat and cmd files are not always considered executable in cygwin causing which
17384    # to not find them
17385    if test "x$new_path" = x \
17386             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17387             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17388      new_path=`$CYGPATH -u "$path"`
17389    fi
17390    if test "x$new_path" = x; then
17391      # It's still not found. Now this is an unrecoverable error.
17392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17393$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17394      has_space=`$ECHO "$complete" | $GREP " "`
17395      if test "x$has_space" != x; then
17396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17398      fi
17399      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17400    fi
17401  fi
17402
17403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17406  # "foo.exe" is OK but "foo" is an error.
17407  #
17408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17409  # It is also a way to make sure we got the proper file name for the real test later on.
17410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17411  if test "x$test_shortpath" = x; then
17412    # Short path failed, file does not exist as specified.
17413    # Try adding .exe or .cmd
17414    if test -f "${new_path}.exe"; then
17415       input_to_shortpath="${new_path}.exe"
17416    elif test -f "${new_path}.cmd"; then
17417       input_to_shortpath="${new_path}.cmd"
17418    else
17419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17420$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17421      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17422$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17423      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17424    fi
17425  else
17426    input_to_shortpath="$new_path"
17427  fi
17428
17429  # Call helper function which possibly converts this using DOS-style short mode.
17430  # If so, the updated path is stored in $new_path.
17431  new_path="$input_to_shortpath"
17432
17433  input_path="$input_to_shortpath"
17434  # Check if we need to convert this using DOS-style short mode. If the path
17435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17436  # take no chances and rewrite it.
17437  # Note: m4 eats our [], so we need to use [ and ] instead.
17438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17439  if test "x$has_forbidden_chars" != x; then
17440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17444      # Going to short mode and back again did indeed matter. Since short mode is
17445      # case insensitive, let's make it lowercase to improve readability.
17446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17447      # Now convert it back to Unix-stile (cygpath)
17448      input_path=`$CYGPATH -u "$shortmode_path"`
17449      new_path="$input_path"
17450    fi
17451  fi
17452
17453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17454  if test "x$test_cygdrive_prefix" = x; then
17455    # As a simple fix, exclude /usr/bin since it's not a real path.
17456    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17458      # a path prefixed by /cygdrive for fixpath to work.
17459      new_path="$CYGWIN_ROOT_PATH$input_path"
17460    fi
17461  fi
17462
17463  # remove trailing .exe if any
17464  new_path="${new_path/%.exe/}"
17465
17466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17467
17468  # First separate the path from the arguments. This will split at the first
17469  # space.
17470  complete="$BUILD_CXX"
17471  path="${complete%% *}"
17472  tmp="$complete EOL"
17473  arguments="${tmp#* }"
17474
17475  # Input might be given as Windows format, start by converting to
17476  # unix format.
17477  new_path="$path"
17478
17479  windows_path="$new_path"
17480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17481    unix_path=`$CYGPATH -u "$windows_path"`
17482    new_path="$unix_path"
17483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17485    new_path="$unix_path"
17486  fi
17487
17488
17489  # Now try to locate executable using which
17490  new_path=`$WHICH "$new_path" 2> /dev/null`
17491
17492  if test "x$new_path" = x; then
17493    # Oops. Which didn't find the executable.
17494    # The splitting of arguments from the executable at a space might have been incorrect,
17495    # since paths with space are more likely in Windows. Give it another try with the whole
17496    # argument.
17497    path="$complete"
17498    arguments="EOL"
17499    new_path="$path"
17500
17501  windows_path="$new_path"
17502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17503    unix_path=`$CYGPATH -u "$windows_path"`
17504    new_path="$unix_path"
17505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17507    new_path="$unix_path"
17508  fi
17509
17510
17511    new_path=`$WHICH "$new_path" 2> /dev/null`
17512
17513    if test "x$new_path" = x; then
17514      # It's still not found. Now this is an unrecoverable error.
17515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17516$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17517      has_space=`$ECHO "$complete" | $GREP " "`
17518      if test "x$has_space" != x; then
17519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17521      fi
17522      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17523    fi
17524  fi
17525
17526  # Now new_path has a complete unix path to the binary
17527  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17528    # Keep paths in /bin as-is, but remove trailing .exe if any
17529    new_path="${new_path/%.exe/}"
17530    # Do not save /bin paths to all_fixpath_prefixes!
17531  else
17532    # Not in mixed or Windows style, start by that.
17533    new_path=`cmd //c echo $new_path`
17534
17535  input_path="$new_path"
17536  # Check if we need to convert this using DOS-style short mode. If the path
17537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17538  # take no chances and rewrite it.
17539  # Note: m4 eats our [], so we need to use [ and ] instead.
17540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17541  if test "x$has_forbidden_chars" != x; then
17542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17544  fi
17545
17546    # Output is in $new_path
17547
17548  windows_path="$new_path"
17549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17550    unix_path=`$CYGPATH -u "$windows_path"`
17551    new_path="$unix_path"
17552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17554    new_path="$unix_path"
17555  fi
17556
17557    # remove trailing .exe if any
17558    new_path="${new_path/%.exe/}"
17559
17560    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17561    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17562  fi
17563
17564  else
17565    # We're on a posix platform. Hooray! :)
17566    # First separate the path from the arguments. This will split at the first
17567    # space.
17568    complete="$BUILD_CXX"
17569    path="${complete%% *}"
17570    tmp="$complete EOL"
17571    arguments="${tmp#* }"
17572
17573    # Cannot rely on the command "which" here since it doesn't always work.
17574    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17575    if test -z "$is_absolute_path"; then
17576      # Path to executable is not absolute. Find it.
17577      IFS_save="$IFS"
17578      IFS=:
17579      for p in $PATH; do
17580        if test -f "$p/$path" && test -x "$p/$path"; then
17581          new_path="$p/$path"
17582          break
17583        fi
17584      done
17585      IFS="$IFS_save"
17586    else
17587      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17588$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17589      new_path="$path"
17590    fi
17591
17592    if test "x$new_path" = x; then
17593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17594$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17595        has_space=`$ECHO "$complete" | $GREP " "`
17596        if test "x$has_space" != x; then
17597          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17598$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17599        fi
17600        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17601      fi
17602  fi
17603
17604      # Now join together the path and the arguments once again
17605      if test "x$arguments" != xEOL; then
17606        new_complete="$new_path ${arguments% *}"
17607      else
17608        new_complete="$new_path"
17609      fi
17610
17611  if test "x$complete" != "x$new_complete"; then
17612      BUILD_CXX="$new_complete"
17613      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17614$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17615    fi
17616
17617    # Extract the first word of "ld", so it can be a program name with args.
17618set dummy ld; ac_word=$2
17619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17620$as_echo_n "checking for $ac_word... " >&6; }
17621if ${ac_cv_path_BUILD_LD+:} false; then :
17622  $as_echo_n "(cached) " >&6
17623else
17624  case $BUILD_LD in
17625  [\\/]* | ?:[\\/]*)
17626  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17627  ;;
17628  *)
17629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17630for as_dir in $PATH
17631do
17632  IFS=$as_save_IFS
17633  test -z "$as_dir" && as_dir=.
17634    for ac_exec_ext in '' $ac_executable_extensions; do
17635  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17636    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17638    break 2
17639  fi
17640done
17641  done
17642IFS=$as_save_IFS
17643
17644  ;;
17645esac
17646fi
17647BUILD_LD=$ac_cv_path_BUILD_LD
17648if test -n "$BUILD_LD"; then
17649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17650$as_echo "$BUILD_LD" >&6; }
17651else
17652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17653$as_echo "no" >&6; }
17654fi
17655
17656
17657
17658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17659
17660  # First separate the path from the arguments. This will split at the first
17661  # space.
17662  complete="$BUILD_LD"
17663  path="${complete%% *}"
17664  tmp="$complete EOL"
17665  arguments="${tmp#* }"
17666
17667  # Input might be given as Windows format, start by converting to
17668  # unix format.
17669  new_path=`$CYGPATH -u "$path"`
17670
17671  # Now try to locate executable using which
17672  new_path=`$WHICH "$new_path" 2> /dev/null`
17673  # bat and cmd files are not always considered executable in cygwin causing which
17674  # to not find them
17675  if test "x$new_path" = x \
17676           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17677           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17678    new_path=`$CYGPATH -u "$path"`
17679  fi
17680  if test "x$new_path" = x; then
17681    # Oops. Which didn't find the executable.
17682    # The splitting of arguments from the executable at a space might have been incorrect,
17683    # since paths with space are more likely in Windows. Give it another try with the whole
17684    # argument.
17685    path="$complete"
17686    arguments="EOL"
17687    new_path=`$CYGPATH -u "$path"`
17688    new_path=`$WHICH "$new_path" 2> /dev/null`
17689    # bat and cmd files are not always considered executable in cygwin causing which
17690    # to not find them
17691    if test "x$new_path" = x \
17692             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17693             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17694      new_path=`$CYGPATH -u "$path"`
17695    fi
17696    if test "x$new_path" = x; then
17697      # It's still not found. Now this is an unrecoverable error.
17698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17699$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17700      has_space=`$ECHO "$complete" | $GREP " "`
17701      if test "x$has_space" != x; then
17702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17704      fi
17705      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17706    fi
17707  fi
17708
17709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17712  # "foo.exe" is OK but "foo" is an error.
17713  #
17714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17715  # It is also a way to make sure we got the proper file name for the real test later on.
17716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17717  if test "x$test_shortpath" = x; then
17718    # Short path failed, file does not exist as specified.
17719    # Try adding .exe or .cmd
17720    if test -f "${new_path}.exe"; then
17721       input_to_shortpath="${new_path}.exe"
17722    elif test -f "${new_path}.cmd"; then
17723       input_to_shortpath="${new_path}.cmd"
17724    else
17725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17726$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17727      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17728$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17729      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17730    fi
17731  else
17732    input_to_shortpath="$new_path"
17733  fi
17734
17735  # Call helper function which possibly converts this using DOS-style short mode.
17736  # If so, the updated path is stored in $new_path.
17737  new_path="$input_to_shortpath"
17738
17739  input_path="$input_to_shortpath"
17740  # Check if we need to convert this using DOS-style short mode. If the path
17741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17742  # take no chances and rewrite it.
17743  # Note: m4 eats our [], so we need to use [ and ] instead.
17744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17745  if test "x$has_forbidden_chars" != x; then
17746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17750      # Going to short mode and back again did indeed matter. Since short mode is
17751      # case insensitive, let's make it lowercase to improve readability.
17752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17753      # Now convert it back to Unix-stile (cygpath)
17754      input_path=`$CYGPATH -u "$shortmode_path"`
17755      new_path="$input_path"
17756    fi
17757  fi
17758
17759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17760  if test "x$test_cygdrive_prefix" = x; then
17761    # As a simple fix, exclude /usr/bin since it's not a real path.
17762    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17764      # a path prefixed by /cygdrive for fixpath to work.
17765      new_path="$CYGWIN_ROOT_PATH$input_path"
17766    fi
17767  fi
17768
17769  # remove trailing .exe if any
17770  new_path="${new_path/%.exe/}"
17771
17772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17773
17774  # First separate the path from the arguments. This will split at the first
17775  # space.
17776  complete="$BUILD_LD"
17777  path="${complete%% *}"
17778  tmp="$complete EOL"
17779  arguments="${tmp#* }"
17780
17781  # Input might be given as Windows format, start by converting to
17782  # unix format.
17783  new_path="$path"
17784
17785  windows_path="$new_path"
17786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17787    unix_path=`$CYGPATH -u "$windows_path"`
17788    new_path="$unix_path"
17789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17791    new_path="$unix_path"
17792  fi
17793
17794
17795  # Now try to locate executable using which
17796  new_path=`$WHICH "$new_path" 2> /dev/null`
17797
17798  if test "x$new_path" = x; then
17799    # Oops. Which didn't find the executable.
17800    # The splitting of arguments from the executable at a space might have been incorrect,
17801    # since paths with space are more likely in Windows. Give it another try with the whole
17802    # argument.
17803    path="$complete"
17804    arguments="EOL"
17805    new_path="$path"
17806
17807  windows_path="$new_path"
17808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17809    unix_path=`$CYGPATH -u "$windows_path"`
17810    new_path="$unix_path"
17811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17813    new_path="$unix_path"
17814  fi
17815
17816
17817    new_path=`$WHICH "$new_path" 2> /dev/null`
17818
17819    if test "x$new_path" = x; then
17820      # It's still not found. Now this is an unrecoverable error.
17821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17822$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17823      has_space=`$ECHO "$complete" | $GREP " "`
17824      if test "x$has_space" != x; then
17825        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17826$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17827      fi
17828      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17829    fi
17830  fi
17831
17832  # Now new_path has a complete unix path to the binary
17833  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17834    # Keep paths in /bin as-is, but remove trailing .exe if any
17835    new_path="${new_path/%.exe/}"
17836    # Do not save /bin paths to all_fixpath_prefixes!
17837  else
17838    # Not in mixed or Windows style, start by that.
17839    new_path=`cmd //c echo $new_path`
17840
17841  input_path="$new_path"
17842  # Check if we need to convert this using DOS-style short mode. If the path
17843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17844  # take no chances and rewrite it.
17845  # Note: m4 eats our [], so we need to use [ and ] instead.
17846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17847  if test "x$has_forbidden_chars" != x; then
17848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17850  fi
17851
17852    # Output is in $new_path
17853
17854  windows_path="$new_path"
17855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17856    unix_path=`$CYGPATH -u "$windows_path"`
17857    new_path="$unix_path"
17858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17860    new_path="$unix_path"
17861  fi
17862
17863    # remove trailing .exe if any
17864    new_path="${new_path/%.exe/}"
17865
17866    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17867    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17868  fi
17869
17870  else
17871    # We're on a posix platform. Hooray! :)
17872    # First separate the path from the arguments. This will split at the first
17873    # space.
17874    complete="$BUILD_LD"
17875    path="${complete%% *}"
17876    tmp="$complete EOL"
17877    arguments="${tmp#* }"
17878
17879    # Cannot rely on the command "which" here since it doesn't always work.
17880    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17881    if test -z "$is_absolute_path"; then
17882      # Path to executable is not absolute. Find it.
17883      IFS_save="$IFS"
17884      IFS=:
17885      for p in $PATH; do
17886        if test -f "$p/$path" && test -x "$p/$path"; then
17887          new_path="$p/$path"
17888          break
17889        fi
17890      done
17891      IFS="$IFS_save"
17892    else
17893      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17894$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17895      new_path="$path"
17896    fi
17897
17898    if test "x$new_path" = x; then
17899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17900$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17901        has_space=`$ECHO "$complete" | $GREP " "`
17902        if test "x$has_space" != x; then
17903          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17904$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17905        fi
17906        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17907      fi
17908  fi
17909
17910      # Now join together the path and the arguments once again
17911      if test "x$arguments" != xEOL; then
17912        new_complete="$new_path ${arguments% *}"
17913      else
17914        new_complete="$new_path"
17915      fi
17916
17917  if test "x$complete" != "x$new_complete"; then
17918      BUILD_LD="$new_complete"
17919      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17920$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17921    fi
17922
17923fi
17924
17925
17926
17927
17928# If a devkit is found on the builddeps server, then prepend its path to the
17929# PATH variable. If there are cross compilers available in the devkit, these
17930# will be found by AC_PROG_CC et al.
17931DEVKIT=
17932
17933
17934    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17935        # Source the builddeps file again, to make sure it uses the latest variables!
17936        . $builddepsfile
17937        # Look for a target and build machine specific resource!
17938        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17939        if test "x$resource" = x; then
17940            # Ok, lets instead look for a target specific resource
17941            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17942        fi
17943        if test "x$resource" = x; then
17944            # Ok, lets instead look for a build specific resource
17945            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17946        fi
17947        if test "x$resource" = x; then
17948            # Ok, lets instead look for a generic resource
17949            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17950            resource=${builddep_devkit}
17951        fi
17952        if test "x$resource" != x; then
17953            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17954$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17955	    # If the resource in the builddeps.conf file is an existing directory,
17956	    # for example /java/linux/cups
17957	    if test -d ${resource}; then
17958	       depdir=${resource}
17959	    else
17960
17961# devkit is for example mymodule
17962# $resource is for example libs/general/libmymod_1_2_3.zip
17963# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17964# $with_builddeps_dir is for example /localhome/builddeps
17965# depdir is the name of the variable into which we store the depdir, eg MYMOD
17966# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17967# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17968    filename=`basename $resource`
17969    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17970    filebase=${filename%%.*}
17971    extension=${filename#*.}
17972    installdir=$with_builddeps_dir/$filebase
17973    if test ! -f $installdir/$filename.unpacked; then
17974        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17975$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17976        if test ! -d $installdir; then
17977            mkdir -p $installdir
17978        fi
17979        if test ! -d $installdir; then
17980            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17981        fi
17982        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17983        touch $tmpfile
17984        if test ! -f $tmpfile; then
17985            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17986        fi
17987
17988    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17989    # $tmpfile is the local file name for the downloaded file.
17990    VALID_TOOL=no
17991    if test "x$BDEPS_FTP" = xwget; then
17992       VALID_TOOL=yes
17993       wget -O $tmpfile $with_builddeps_server/$resource
17994    fi
17995    if test "x$BDEPS_FTP" = xlftp; then
17996       VALID_TOOL=yes
17997       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17998    fi
17999    if test "x$BDEPS_FTP" = xftp; then
18000        VALID_TOOL=yes
18001        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18002        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18003        FTPUSERPWD=${FTPSERVER%%@*}
18004        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18005            FTPUSER=${userpwd%%:*}
18006            FTPPWD=${userpwd#*@}
18007            FTPSERVER=${FTPSERVER#*@}
18008        else
18009            FTPUSER=ftp
18010            FTPPWD=ftp
18011        fi
18012        # the "pass" command does not work on some
18013        # ftp clients (read ftp.exe) but if it works,
18014        # passive mode is better!
18015        (\
18016            echo "user $FTPUSER $FTPPWD"        ;\
18017            echo "pass"                         ;\
18018            echo "bin"                          ;\
18019            echo "get $FTPPATH $tmpfile"              ;\
18020        ) | ftp -in $FTPSERVER
18021    fi
18022    if test "x$VALID_TOOL" != xyes; then
18023       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18024    fi
18025
18026        mv $tmpfile $installdir/$filename
18027        if test ! -s $installdir/$filename; then
18028            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18029        fi
18030        case "$extension" in
18031            zip)  echo "Unzipping $installdir/$filename..."
18032               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18033            ;;
18034            tar.gz) echo "Untaring $installdir/$filename..."
18035               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18036            ;;
18037            tgz) echo "Untaring $installdir/$filename..."
18038               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18039            ;;
18040            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18041            ;;
18042        esac
18043    fi
18044    if test -f $installdir/$filename.unpacked; then
18045        depdir=$installdir
18046    fi
18047
18048	    fi
18049            # Source the builddeps file again, because in the previous command, the depdir
18050            # was updated to point at the current build dependency install directory.
18051            . $builddepsfile
18052            # Now extract variables from the builddeps.conf files.
18053            theroot=${builddep_devkit_ROOT}
18054            thecflags=${builddep_devkit_CFLAGS}
18055            thelibs=${builddep_devkit_LIBS}
18056            if test "x$depdir" = x; then
18057                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18058            fi
18059            DEVKIT=$depdir
18060            if test "x$theroot" != x; then
18061               DEVKIT="$theroot"
18062            fi
18063            if test "x$thecflags" != x; then
18064               DEVKIT_CFLAGS="$thecflags"
18065            fi
18066            if test "x$thelibs" != x; then
18067               DEVKIT_LIBS="$thelibs"
18068            fi
18069            # Found devkit
18070                     PATH="$DEVKIT/bin:$PATH"
18071                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18072                     if test "x$x_includes" = "xNONE"; then
18073                         x_includes="$SYS_ROOT/usr/include/X11"
18074                     fi
18075                     if test "x$x_libraries" = "xNONE"; then
18076                         x_libraries="$SYS_ROOT/usr/lib"
18077                     fi
18078
18079
18080        fi
18081
18082    fi
18083
18084
18085if test "x$SYS_ROOT" != "x/" ; then
18086    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18087    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18088    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18089    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18090    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18091    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18092fi
18093
18094# Store the CFLAGS etal passed to the configure script.
18095ORG_CFLAGS="$CFLAGS"
18096ORG_CXXFLAGS="$CXXFLAGS"
18097ORG_OBJCFLAGS="$OBJCFLAGS"
18098
18099# autoconf magic only relies on PATH, so update it if tools dir is specified
18100OLD_PATH="$PATH"
18101if test "x$TOOLS_DIR" != x; then
18102  PATH=$TOOLS_DIR:$PATH
18103fi
18104
18105
18106### Locate C compiler (CC)
18107
18108# gcc is almost always present, but on Windows we
18109# prefer cl.exe and on Solaris we prefer CC.
18110# Thus test for them in this order.
18111if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18112  # Do not probe for cc on MacOSX.
18113  COMPILER_CHECK_LIST="cl gcc"
18114else
18115  COMPILER_CHECK_LIST="cl cc gcc"
18116fi
18117
18118
18119  COMPILER_NAME=C
18120
18121  CC=
18122  # If TOOLS_DIR is set, check for all compiler names in there first
18123  # before checking the rest of the PATH.
18124  if test -n "$TOOLS_DIR"; then
18125    PATH_save="$PATH"
18126    PATH="$TOOLS_DIR"
18127    for ac_prog in $COMPILER_CHECK_LIST
18128do
18129  # Extract the first word of "$ac_prog", so it can be a program name with args.
18130set dummy $ac_prog; ac_word=$2
18131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18132$as_echo_n "checking for $ac_word... " >&6; }
18133if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18134  $as_echo_n "(cached) " >&6
18135else
18136  case $TOOLS_DIR_CC in
18137  [\\/]* | ?:[\\/]*)
18138  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18139  ;;
18140  *)
18141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18142for as_dir in $PATH
18143do
18144  IFS=$as_save_IFS
18145  test -z "$as_dir" && as_dir=.
18146    for ac_exec_ext in '' $ac_executable_extensions; do
18147  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18148    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18150    break 2
18151  fi
18152done
18153  done
18154IFS=$as_save_IFS
18155
18156  ;;
18157esac
18158fi
18159TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18160if test -n "$TOOLS_DIR_CC"; then
18161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18162$as_echo "$TOOLS_DIR_CC" >&6; }
18163else
18164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18165$as_echo "no" >&6; }
18166fi
18167
18168
18169  test -n "$TOOLS_DIR_CC" && break
18170done
18171
18172    CC=$TOOLS_DIR_CC
18173    PATH="$PATH_save"
18174  fi
18175
18176  # AC_PATH_PROGS can't be run multiple times with the same variable,
18177  # so create a new name for this run.
18178  if test "x$CC" = x; then
18179    for ac_prog in $COMPILER_CHECK_LIST
18180do
18181  # Extract the first word of "$ac_prog", so it can be a program name with args.
18182set dummy $ac_prog; ac_word=$2
18183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18184$as_echo_n "checking for $ac_word... " >&6; }
18185if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18186  $as_echo_n "(cached) " >&6
18187else
18188  case $POTENTIAL_CC in
18189  [\\/]* | ?:[\\/]*)
18190  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18191  ;;
18192  *)
18193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18194for as_dir in $PATH
18195do
18196  IFS=$as_save_IFS
18197  test -z "$as_dir" && as_dir=.
18198    for ac_exec_ext in '' $ac_executable_extensions; do
18199  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18200    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18202    break 2
18203  fi
18204done
18205  done
18206IFS=$as_save_IFS
18207
18208  ;;
18209esac
18210fi
18211POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18212if test -n "$POTENTIAL_CC"; then
18213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18214$as_echo "$POTENTIAL_CC" >&6; }
18215else
18216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18217$as_echo "no" >&6; }
18218fi
18219
18220
18221  test -n "$POTENTIAL_CC" && break
18222done
18223
18224    CC=$POTENTIAL_CC
18225  fi
18226
18227  if test "x$CC" = x; then
18228
18229    # Print a helpful message on how to acquire the necessary build dependency.
18230    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18231    MISSING_DEPENDENCY=devkit
18232    PKGHANDLER_COMMAND=
18233
18234    case $PKGHANDLER in
18235	apt-get)
18236                apt_help     $MISSING_DEPENDENCY ;;
18237    yum)
18238                yum_help     $MISSING_DEPENDENCY ;;
18239	port)
18240                port_help    $MISSING_DEPENDENCY ;;
18241	pkgutil)
18242                pkgutil_help $MISSING_DEPENDENCY ;;
18243	pkgadd)
18244                pkgadd_help  $MISSING_DEPENDENCY ;;
18245    * )
18246      break ;;
18247    esac
18248
18249    if test "x$PKGHANDLER_COMMAND" != x; then
18250        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18251    fi
18252
18253      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18254  fi
18255
18256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18257
18258  # First separate the path from the arguments. This will split at the first
18259  # space.
18260  complete="$CC"
18261  path="${complete%% *}"
18262  tmp="$complete EOL"
18263  arguments="${tmp#* }"
18264
18265  # Input might be given as Windows format, start by converting to
18266  # unix format.
18267  new_path=`$CYGPATH -u "$path"`
18268
18269  # Now try to locate executable using which
18270  new_path=`$WHICH "$new_path" 2> /dev/null`
18271  # bat and cmd files are not always considered executable in cygwin causing which
18272  # to not find them
18273  if test "x$new_path" = x \
18274           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18275           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18276    new_path=`$CYGPATH -u "$path"`
18277  fi
18278  if test "x$new_path" = x; then
18279    # Oops. Which didn't find the executable.
18280    # The splitting of arguments from the executable at a space might have been incorrect,
18281    # since paths with space are more likely in Windows. Give it another try with the whole
18282    # argument.
18283    path="$complete"
18284    arguments="EOL"
18285    new_path=`$CYGPATH -u "$path"`
18286    new_path=`$WHICH "$new_path" 2> /dev/null`
18287    # bat and cmd files are not always considered executable in cygwin causing which
18288    # to not find them
18289    if test "x$new_path" = x \
18290             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18291             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18292      new_path=`$CYGPATH -u "$path"`
18293    fi
18294    if test "x$new_path" = x; then
18295      # It's still not found. Now this is an unrecoverable error.
18296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18297$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18298      has_space=`$ECHO "$complete" | $GREP " "`
18299      if test "x$has_space" != x; then
18300        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18301$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18302      fi
18303      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18304    fi
18305  fi
18306
18307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18310  # "foo.exe" is OK but "foo" is an error.
18311  #
18312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18313  # It is also a way to make sure we got the proper file name for the real test later on.
18314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18315  if test "x$test_shortpath" = x; then
18316    # Short path failed, file does not exist as specified.
18317    # Try adding .exe or .cmd
18318    if test -f "${new_path}.exe"; then
18319       input_to_shortpath="${new_path}.exe"
18320    elif test -f "${new_path}.cmd"; then
18321       input_to_shortpath="${new_path}.cmd"
18322    else
18323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18324$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18325      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18326$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18327      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18328    fi
18329  else
18330    input_to_shortpath="$new_path"
18331  fi
18332
18333  # Call helper function which possibly converts this using DOS-style short mode.
18334  # If so, the updated path is stored in $new_path.
18335  new_path="$input_to_shortpath"
18336
18337  input_path="$input_to_shortpath"
18338  # Check if we need to convert this using DOS-style short mode. If the path
18339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18340  # take no chances and rewrite it.
18341  # Note: m4 eats our [], so we need to use [ and ] instead.
18342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18343  if test "x$has_forbidden_chars" != x; then
18344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18348      # Going to short mode and back again did indeed matter. Since short mode is
18349      # case insensitive, let's make it lowercase to improve readability.
18350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18351      # Now convert it back to Unix-stile (cygpath)
18352      input_path=`$CYGPATH -u "$shortmode_path"`
18353      new_path="$input_path"
18354    fi
18355  fi
18356
18357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18358  if test "x$test_cygdrive_prefix" = x; then
18359    # As a simple fix, exclude /usr/bin since it's not a real path.
18360    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18362      # a path prefixed by /cygdrive for fixpath to work.
18363      new_path="$CYGWIN_ROOT_PATH$input_path"
18364    fi
18365  fi
18366
18367  # remove trailing .exe if any
18368  new_path="${new_path/%.exe/}"
18369
18370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18371
18372  # First separate the path from the arguments. This will split at the first
18373  # space.
18374  complete="$CC"
18375  path="${complete%% *}"
18376  tmp="$complete EOL"
18377  arguments="${tmp#* }"
18378
18379  # Input might be given as Windows format, start by converting to
18380  # unix format.
18381  new_path="$path"
18382
18383  windows_path="$new_path"
18384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18385    unix_path=`$CYGPATH -u "$windows_path"`
18386    new_path="$unix_path"
18387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18389    new_path="$unix_path"
18390  fi
18391
18392
18393  # Now try to locate executable using which
18394  new_path=`$WHICH "$new_path" 2> /dev/null`
18395
18396  if test "x$new_path" = x; then
18397    # Oops. Which didn't find the executable.
18398    # The splitting of arguments from the executable at a space might have been incorrect,
18399    # since paths with space are more likely in Windows. Give it another try with the whole
18400    # argument.
18401    path="$complete"
18402    arguments="EOL"
18403    new_path="$path"
18404
18405  windows_path="$new_path"
18406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18407    unix_path=`$CYGPATH -u "$windows_path"`
18408    new_path="$unix_path"
18409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18411    new_path="$unix_path"
18412  fi
18413
18414
18415    new_path=`$WHICH "$new_path" 2> /dev/null`
18416
18417    if test "x$new_path" = x; then
18418      # It's still not found. Now this is an unrecoverable error.
18419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18420$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18421      has_space=`$ECHO "$complete" | $GREP " "`
18422      if test "x$has_space" != x; then
18423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18425      fi
18426      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18427    fi
18428  fi
18429
18430  # Now new_path has a complete unix path to the binary
18431  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18432    # Keep paths in /bin as-is, but remove trailing .exe if any
18433    new_path="${new_path/%.exe/}"
18434    # Do not save /bin paths to all_fixpath_prefixes!
18435  else
18436    # Not in mixed or Windows style, start by that.
18437    new_path=`cmd //c echo $new_path`
18438
18439  input_path="$new_path"
18440  # Check if we need to convert this using DOS-style short mode. If the path
18441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18442  # take no chances and rewrite it.
18443  # Note: m4 eats our [], so we need to use [ and ] instead.
18444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18445  if test "x$has_forbidden_chars" != x; then
18446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18448  fi
18449
18450    # Output is in $new_path
18451
18452  windows_path="$new_path"
18453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18454    unix_path=`$CYGPATH -u "$windows_path"`
18455    new_path="$unix_path"
18456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18458    new_path="$unix_path"
18459  fi
18460
18461    # remove trailing .exe if any
18462    new_path="${new_path/%.exe/}"
18463
18464    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18465    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18466  fi
18467
18468  else
18469    # We're on a posix platform. Hooray! :)
18470    # First separate the path from the arguments. This will split at the first
18471    # space.
18472    complete="$CC"
18473    path="${complete%% *}"
18474    tmp="$complete EOL"
18475    arguments="${tmp#* }"
18476
18477    # Cannot rely on the command "which" here since it doesn't always work.
18478    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18479    if test -z "$is_absolute_path"; then
18480      # Path to executable is not absolute. Find it.
18481      IFS_save="$IFS"
18482      IFS=:
18483      for p in $PATH; do
18484        if test -f "$p/$path" && test -x "$p/$path"; then
18485          new_path="$p/$path"
18486          break
18487        fi
18488      done
18489      IFS="$IFS_save"
18490    else
18491      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18492$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18493      new_path="$path"
18494    fi
18495
18496    if test "x$new_path" = x; then
18497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18498$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18499        has_space=`$ECHO "$complete" | $GREP " "`
18500        if test "x$has_space" != x; then
18501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18503        fi
18504        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18505      fi
18506  fi
18507
18508      # Now join together the path and the arguments once again
18509      if test "x$arguments" != xEOL; then
18510        new_complete="$new_path ${arguments% *}"
18511      else
18512        new_complete="$new_path"
18513      fi
18514
18515  if test "x$complete" != "x$new_complete"; then
18516      CC="$new_complete"
18517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18518$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18519    fi
18520
18521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18522$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18523  TEST_COMPILER="$CC"
18524
18525    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18526        # Follow a chain of symbolic links. Use readlink
18527        # where it exists, else fall back to horribly
18528        # complicated shell code.
18529        if test "x$READLINK_TESTED" != yes; then
18530            # On MacOSX there is a readlink tool with a different
18531            # purpose than the GNU readlink tool. Check the found readlink.
18532            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18533            if test "x$ISGNU" = x; then
18534                 # A readlink that we do not know how to use.
18535                 # Are there other non-GNU readlinks out there?
18536                 READLINK_TESTED=yes
18537                 READLINK=
18538            fi
18539        fi
18540
18541        if test "x$READLINK" != x; then
18542            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18543        else
18544            # Save the current directory for restoring afterwards
18545            STARTDIR=$PWD
18546            COUNTER=0
18547            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18548            sym_link_file=`$BASENAME $TEST_COMPILER`
18549            # Use the system pwd and not the shell builtin to resolve directory symlinks
18550            cd $sym_link_dir
18551            cd `$THEPWDCMD`
18552            sym_link_dir=`$THEPWDCMD`
18553            # Resolve file symlinks
18554            while test $COUNTER -lt 20; do
18555                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18556                if test "x$ISLINK" == x; then
18557                    # This is not a symbolic link! We are done!
18558                    break
18559                fi
18560                # Again resolve directory symlinks since the target of the just found
18561                # link could be in a different directory
18562                cd `$DIRNAME $ISLINK`
18563                sym_link_dir=`$THEPWDCMD`
18564                sym_link_file=`$BASENAME $ISLINK`
18565                let COUNTER=COUNTER+1
18566            done
18567            cd $STARTDIR
18568            TEST_COMPILER=$sym_link_dir/$sym_link_file
18569        fi
18570    fi
18571
18572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18573$as_echo "$TEST_COMPILER" >&6; }
18574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18575$as_echo_n "checking if CC is disguised ccache... " >&6; }
18576
18577  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18578  if test "x$COMPILER_BASENAME" = "xccache"; then
18579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18580$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18581    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18582    # We want to control ccache invocation ourselves, so ignore this cc and try
18583    # searching again.
18584
18585    # Remove the path to the fake ccache cc from the PATH
18586    RETRY_COMPILER_SAVED_PATH="$PATH"
18587    COMPILER_DIRNAME=`$DIRNAME $CC`
18588    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18589
18590    # Try again looking for our compiler
18591    if test -n "$ac_tool_prefix"; then
18592  for ac_prog in $COMPILER_CHECK_LIST
18593  do
18594    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18595set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18597$as_echo_n "checking for $ac_word... " >&6; }
18598if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
18599  $as_echo_n "(cached) " >&6
18600else
18601  if test -n "$PROPER_COMPILER_CC"; then
18602  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18603else
18604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18605for as_dir in $PATH
18606do
18607  IFS=$as_save_IFS
18608  test -z "$as_dir" && as_dir=.
18609    for ac_exec_ext in '' $ac_executable_extensions; do
18610  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18611    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18613    break 2
18614  fi
18615done
18616  done
18617IFS=$as_save_IFS
18618
18619fi
18620fi
18621PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18622if test -n "$PROPER_COMPILER_CC"; then
18623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18624$as_echo "$PROPER_COMPILER_CC" >&6; }
18625else
18626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18627$as_echo "no" >&6; }
18628fi
18629
18630
18631    test -n "$PROPER_COMPILER_CC" && break
18632  done
18633fi
18634if test -z "$PROPER_COMPILER_CC"; then
18635  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18636  for ac_prog in $COMPILER_CHECK_LIST
18637do
18638  # Extract the first word of "$ac_prog", so it can be a program name with args.
18639set dummy $ac_prog; ac_word=$2
18640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18641$as_echo_n "checking for $ac_word... " >&6; }
18642if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
18643  $as_echo_n "(cached) " >&6
18644else
18645  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18646  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18647else
18648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18649for as_dir in $PATH
18650do
18651  IFS=$as_save_IFS
18652  test -z "$as_dir" && as_dir=.
18653    for ac_exec_ext in '' $ac_executable_extensions; do
18654  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18655    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18657    break 2
18658  fi
18659done
18660  done
18661IFS=$as_save_IFS
18662
18663fi
18664fi
18665ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18666if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18668$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18669else
18670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18671$as_echo "no" >&6; }
18672fi
18673
18674
18675  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18676done
18677
18678  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18679    PROPER_COMPILER_CC=""
18680  else
18681    case $cross_compiling:$ac_tool_warned in
18682yes:)
18683{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18684$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18685ac_tool_warned=yes ;;
18686esac
18687    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18688  fi
18689fi
18690
18691
18692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18693
18694  # First separate the path from the arguments. This will split at the first
18695  # space.
18696  complete="$PROPER_COMPILER_CC"
18697  path="${complete%% *}"
18698  tmp="$complete EOL"
18699  arguments="${tmp#* }"
18700
18701  # Input might be given as Windows format, start by converting to
18702  # unix format.
18703  new_path=`$CYGPATH -u "$path"`
18704
18705  # Now try to locate executable using which
18706  new_path=`$WHICH "$new_path" 2> /dev/null`
18707  # bat and cmd files are not always considered executable in cygwin causing which
18708  # to not find them
18709  if test "x$new_path" = x \
18710           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18711           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18712    new_path=`$CYGPATH -u "$path"`
18713  fi
18714  if test "x$new_path" = x; then
18715    # Oops. Which didn't find the executable.
18716    # The splitting of arguments from the executable at a space might have been incorrect,
18717    # since paths with space are more likely in Windows. Give it another try with the whole
18718    # argument.
18719    path="$complete"
18720    arguments="EOL"
18721    new_path=`$CYGPATH -u "$path"`
18722    new_path=`$WHICH "$new_path" 2> /dev/null`
18723    # bat and cmd files are not always considered executable in cygwin causing which
18724    # to not find them
18725    if test "x$new_path" = x \
18726             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18727             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18728      new_path=`$CYGPATH -u "$path"`
18729    fi
18730    if test "x$new_path" = x; then
18731      # It's still not found. Now this is an unrecoverable error.
18732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18733$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18734      has_space=`$ECHO "$complete" | $GREP " "`
18735      if test "x$has_space" != x; then
18736        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18737$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18738      fi
18739      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18740    fi
18741  fi
18742
18743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18746  # "foo.exe" is OK but "foo" is an error.
18747  #
18748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18749  # It is also a way to make sure we got the proper file name for the real test later on.
18750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18751  if test "x$test_shortpath" = x; then
18752    # Short path failed, file does not exist as specified.
18753    # Try adding .exe or .cmd
18754    if test -f "${new_path}.exe"; then
18755       input_to_shortpath="${new_path}.exe"
18756    elif test -f "${new_path}.cmd"; then
18757       input_to_shortpath="${new_path}.cmd"
18758    else
18759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18760$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18761      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18762$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18763      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18764    fi
18765  else
18766    input_to_shortpath="$new_path"
18767  fi
18768
18769  # Call helper function which possibly converts this using DOS-style short mode.
18770  # If so, the updated path is stored in $new_path.
18771  new_path="$input_to_shortpath"
18772
18773  input_path="$input_to_shortpath"
18774  # Check if we need to convert this using DOS-style short mode. If the path
18775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18776  # take no chances and rewrite it.
18777  # Note: m4 eats our [], so we need to use [ and ] instead.
18778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18779  if test "x$has_forbidden_chars" != x; then
18780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18784      # Going to short mode and back again did indeed matter. Since short mode is
18785      # case insensitive, let's make it lowercase to improve readability.
18786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18787      # Now convert it back to Unix-stile (cygpath)
18788      input_path=`$CYGPATH -u "$shortmode_path"`
18789      new_path="$input_path"
18790    fi
18791  fi
18792
18793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18794  if test "x$test_cygdrive_prefix" = x; then
18795    # As a simple fix, exclude /usr/bin since it's not a real path.
18796    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18798      # a path prefixed by /cygdrive for fixpath to work.
18799      new_path="$CYGWIN_ROOT_PATH$input_path"
18800    fi
18801  fi
18802
18803  # remove trailing .exe if any
18804  new_path="${new_path/%.exe/}"
18805
18806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18807
18808  # First separate the path from the arguments. This will split at the first
18809  # space.
18810  complete="$PROPER_COMPILER_CC"
18811  path="${complete%% *}"
18812  tmp="$complete EOL"
18813  arguments="${tmp#* }"
18814
18815  # Input might be given as Windows format, start by converting to
18816  # unix format.
18817  new_path="$path"
18818
18819  windows_path="$new_path"
18820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18821    unix_path=`$CYGPATH -u "$windows_path"`
18822    new_path="$unix_path"
18823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18825    new_path="$unix_path"
18826  fi
18827
18828
18829  # Now try to locate executable using which
18830  new_path=`$WHICH "$new_path" 2> /dev/null`
18831
18832  if test "x$new_path" = x; then
18833    # Oops. Which didn't find the executable.
18834    # The splitting of arguments from the executable at a space might have been incorrect,
18835    # since paths with space are more likely in Windows. Give it another try with the whole
18836    # argument.
18837    path="$complete"
18838    arguments="EOL"
18839    new_path="$path"
18840
18841  windows_path="$new_path"
18842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18843    unix_path=`$CYGPATH -u "$windows_path"`
18844    new_path="$unix_path"
18845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18847    new_path="$unix_path"
18848  fi
18849
18850
18851    new_path=`$WHICH "$new_path" 2> /dev/null`
18852
18853    if test "x$new_path" = x; then
18854      # It's still not found. Now this is an unrecoverable error.
18855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18856$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18857      has_space=`$ECHO "$complete" | $GREP " "`
18858      if test "x$has_space" != x; then
18859        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18860$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18861      fi
18862      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18863    fi
18864  fi
18865
18866  # Now new_path has a complete unix path to the binary
18867  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18868    # Keep paths in /bin as-is, but remove trailing .exe if any
18869    new_path="${new_path/%.exe/}"
18870    # Do not save /bin paths to all_fixpath_prefixes!
18871  else
18872    # Not in mixed or Windows style, start by that.
18873    new_path=`cmd //c echo $new_path`
18874
18875  input_path="$new_path"
18876  # Check if we need to convert this using DOS-style short mode. If the path
18877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18878  # take no chances and rewrite it.
18879  # Note: m4 eats our [], so we need to use [ and ] instead.
18880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18881  if test "x$has_forbidden_chars" != x; then
18882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18884  fi
18885
18886    # Output is in $new_path
18887
18888  windows_path="$new_path"
18889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18890    unix_path=`$CYGPATH -u "$windows_path"`
18891    new_path="$unix_path"
18892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18894    new_path="$unix_path"
18895  fi
18896
18897    # remove trailing .exe if any
18898    new_path="${new_path/%.exe/}"
18899
18900    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18901    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18902  fi
18903
18904  else
18905    # We're on a posix platform. Hooray! :)
18906    # First separate the path from the arguments. This will split at the first
18907    # space.
18908    complete="$PROPER_COMPILER_CC"
18909    path="${complete%% *}"
18910    tmp="$complete EOL"
18911    arguments="${tmp#* }"
18912
18913    # Cannot rely on the command "which" here since it doesn't always work.
18914    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18915    if test -z "$is_absolute_path"; then
18916      # Path to executable is not absolute. Find it.
18917      IFS_save="$IFS"
18918      IFS=:
18919      for p in $PATH; do
18920        if test -f "$p/$path" && test -x "$p/$path"; then
18921          new_path="$p/$path"
18922          break
18923        fi
18924      done
18925      IFS="$IFS_save"
18926    else
18927      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18928$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18929      new_path="$path"
18930    fi
18931
18932    if test "x$new_path" = x; then
18933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18934$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18935        has_space=`$ECHO "$complete" | $GREP " "`
18936        if test "x$has_space" != x; then
18937          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18938$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18939        fi
18940        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18941      fi
18942  fi
18943
18944      # Now join together the path and the arguments once again
18945      if test "x$arguments" != xEOL; then
18946        new_complete="$new_path ${arguments% *}"
18947      else
18948        new_complete="$new_path"
18949      fi
18950
18951  if test "x$complete" != "x$new_complete"; then
18952      PROPER_COMPILER_CC="$new_complete"
18953      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18954$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18955    fi
18956
18957    PATH="$RETRY_COMPILER_SAVED_PATH"
18958
18959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18960$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18961
18962    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18963        # Follow a chain of symbolic links. Use readlink
18964        # where it exists, else fall back to horribly
18965        # complicated shell code.
18966        if test "x$READLINK_TESTED" != yes; then
18967            # On MacOSX there is a readlink tool with a different
18968            # purpose than the GNU readlink tool. Check the found readlink.
18969            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18970            if test "x$ISGNU" = x; then
18971                 # A readlink that we do not know how to use.
18972                 # Are there other non-GNU readlinks out there?
18973                 READLINK_TESTED=yes
18974                 READLINK=
18975            fi
18976        fi
18977
18978        if test "x$READLINK" != x; then
18979            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18980        else
18981            # Save the current directory for restoring afterwards
18982            STARTDIR=$PWD
18983            COUNTER=0
18984            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18985            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18986            # Use the system pwd and not the shell builtin to resolve directory symlinks
18987            cd $sym_link_dir
18988            cd `$THEPWDCMD`
18989            sym_link_dir=`$THEPWDCMD`
18990            # Resolve file symlinks
18991            while test $COUNTER -lt 20; do
18992                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18993                if test "x$ISLINK" == x; then
18994                    # This is not a symbolic link! We are done!
18995                    break
18996                fi
18997                # Again resolve directory symlinks since the target of the just found
18998                # link could be in a different directory
18999                cd `$DIRNAME $ISLINK`
19000                sym_link_dir=`$THEPWDCMD`
19001                sym_link_file=`$BASENAME $ISLINK`
19002                let COUNTER=COUNTER+1
19003            done
19004            cd $STARTDIR
19005            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19006        fi
19007    fi
19008
19009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19010$as_echo "$PROPER_COMPILER_CC" >&6; }
19011    CC="$PROPER_COMPILER_CC"
19012  else
19013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19014$as_echo "no, keeping CC" >&6; }
19015    CC="$TEST_COMPILER"
19016  fi
19017
19018  COMPILER=$CC
19019  COMPILER_NAME=$COMPILER_NAME
19020
19021  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19022    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19023    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19024    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19025    if test $? -ne 0; then
19026      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19027
19028      { $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
19029$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19030      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19031$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19032      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19033    else
19034      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19035      COMPILER_VENDOR="Sun Studio"
19036    fi
19037  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19038    # First line typically looks something like:
19039    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19040    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19041    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19042    COMPILER_VENDOR="Microsoft CL.EXE"
19043    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19044    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19045      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19046        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19047      fi
19048    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19049      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19050        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19051      fi
19052    fi
19053  else
19054    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19055    # Check that this is likely to be GCC.
19056    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19057    if test $? -ne 0; then
19058      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19059$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19060      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19061$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19062      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19063    fi
19064
19065    # First line typically looks something like:
19066    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19067    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19068    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19069  fi
19070  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19071  CC_VERSION="$COMPILER_VERSION"
19072  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19073  CC_VENDOR="$COMPILER_VENDOR"
19074
19075  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19076$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19077
19078
19079# Now that we have resolved CC ourself, let autoconf have it's go at it
19080ac_ext=c
19081ac_cpp='$CPP $CPPFLAGS'
19082ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19083ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19084ac_compiler_gnu=$ac_cv_c_compiler_gnu
19085if test -n "$ac_tool_prefix"; then
19086  for ac_prog in $CC
19087  do
19088    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19089set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19091$as_echo_n "checking for $ac_word... " >&6; }
19092if ${ac_cv_prog_CC+:} false; then :
19093  $as_echo_n "(cached) " >&6
19094else
19095  if test -n "$CC"; then
19096  ac_cv_prog_CC="$CC" # Let the user override the test.
19097else
19098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19099for as_dir in $PATH
19100do
19101  IFS=$as_save_IFS
19102  test -z "$as_dir" && as_dir=.
19103    for ac_exec_ext in '' $ac_executable_extensions; do
19104  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19105    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19107    break 2
19108  fi
19109done
19110  done
19111IFS=$as_save_IFS
19112
19113fi
19114fi
19115CC=$ac_cv_prog_CC
19116if test -n "$CC"; then
19117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19118$as_echo "$CC" >&6; }
19119else
19120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19121$as_echo "no" >&6; }
19122fi
19123
19124
19125    test -n "$CC" && break
19126  done
19127fi
19128if test -z "$CC"; then
19129  ac_ct_CC=$CC
19130  for ac_prog in $CC
19131do
19132  # Extract the first word of "$ac_prog", so it can be a program name with args.
19133set dummy $ac_prog; ac_word=$2
19134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19135$as_echo_n "checking for $ac_word... " >&6; }
19136if ${ac_cv_prog_ac_ct_CC+:} false; then :
19137  $as_echo_n "(cached) " >&6
19138else
19139  if test -n "$ac_ct_CC"; then
19140  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19141else
19142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19143for as_dir in $PATH
19144do
19145  IFS=$as_save_IFS
19146  test -z "$as_dir" && as_dir=.
19147    for ac_exec_ext in '' $ac_executable_extensions; do
19148  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19149    ac_cv_prog_ac_ct_CC="$ac_prog"
19150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19151    break 2
19152  fi
19153done
19154  done
19155IFS=$as_save_IFS
19156
19157fi
19158fi
19159ac_ct_CC=$ac_cv_prog_ac_ct_CC
19160if test -n "$ac_ct_CC"; then
19161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19162$as_echo "$ac_ct_CC" >&6; }
19163else
19164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19165$as_echo "no" >&6; }
19166fi
19167
19168
19169  test -n "$ac_ct_CC" && break
19170done
19171
19172  if test "x$ac_ct_CC" = x; then
19173    CC=""
19174  else
19175    case $cross_compiling:$ac_tool_warned in
19176yes:)
19177{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19178$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19179ac_tool_warned=yes ;;
19180esac
19181    CC=$ac_ct_CC
19182  fi
19183fi
19184
19185
19186test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19187$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19188as_fn_error $? "no acceptable C compiler found in \$PATH
19189See \`config.log' for more details" "$LINENO" 5; }
19190
19191# Provide some information about the compiler.
19192$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19193set X $ac_compile
19194ac_compiler=$2
19195for ac_option in --version -v -V -qversion; do
19196  { { ac_try="$ac_compiler $ac_option >&5"
19197case "(($ac_try" in
19198  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19199  *) ac_try_echo=$ac_try;;
19200esac
19201eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19202$as_echo "$ac_try_echo"; } >&5
19203  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19204  ac_status=$?
19205  if test -s conftest.err; then
19206    sed '10a\
19207... rest of stderr output deleted ...
19208         10q' conftest.err >conftest.er1
19209    cat conftest.er1 >&5
19210  fi
19211  rm -f conftest.er1 conftest.err
19212  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19213  test $ac_status = 0; }
19214done
19215
19216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19217/* end confdefs.h.  */
19218
19219int
19220main ()
19221{
19222
19223  ;
19224  return 0;
19225}
19226_ACEOF
19227ac_clean_files_save=$ac_clean_files
19228ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19229# Try to create an executable without -o first, disregard a.out.
19230# It will help us diagnose broken compilers, and finding out an intuition
19231# of exeext.
19232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19233$as_echo_n "checking whether the C compiler works... " >&6; }
19234ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19235
19236# The possible output files:
19237ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19238
19239ac_rmfiles=
19240for ac_file in $ac_files
19241do
19242  case $ac_file in
19243    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19244    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19245  esac
19246done
19247rm -f $ac_rmfiles
19248
19249if { { ac_try="$ac_link_default"
19250case "(($ac_try" in
19251  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19252  *) ac_try_echo=$ac_try;;
19253esac
19254eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19255$as_echo "$ac_try_echo"; } >&5
19256  (eval "$ac_link_default") 2>&5
19257  ac_status=$?
19258  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19259  test $ac_status = 0; }; then :
19260  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19261# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19262# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19263# so that the user can short-circuit this test for compilers unknown to
19264# Autoconf.
19265for ac_file in $ac_files ''
19266do
19267  test -f "$ac_file" || continue
19268  case $ac_file in
19269    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19270	;;
19271    [ab].out )
19272	# We found the default executable, but exeext='' is most
19273	# certainly right.
19274	break;;
19275    *.* )
19276	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19277	then :; else
19278	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19279	fi
19280	# We set ac_cv_exeext here because the later test for it is not
19281	# safe: cross compilers may not add the suffix if given an `-o'
19282	# argument, so we may need to know it at that point already.
19283	# Even if this section looks crufty: it has the advantage of
19284	# actually working.
19285	break;;
19286    * )
19287	break;;
19288  esac
19289done
19290test "$ac_cv_exeext" = no && ac_cv_exeext=
19291
19292else
19293  ac_file=''
19294fi
19295if test -z "$ac_file"; then :
19296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19297$as_echo "no" >&6; }
19298$as_echo "$as_me: failed program was:" >&5
19299sed 's/^/| /' conftest.$ac_ext >&5
19300
19301{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19302$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19303as_fn_error 77 "C compiler cannot create executables
19304See \`config.log' for more details" "$LINENO" 5; }
19305else
19306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19307$as_echo "yes" >&6; }
19308fi
19309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19310$as_echo_n "checking for C compiler default output file name... " >&6; }
19311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19312$as_echo "$ac_file" >&6; }
19313ac_exeext=$ac_cv_exeext
19314
19315rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19316ac_clean_files=$ac_clean_files_save
19317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19318$as_echo_n "checking for suffix of executables... " >&6; }
19319if { { ac_try="$ac_link"
19320case "(($ac_try" in
19321  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19322  *) ac_try_echo=$ac_try;;
19323esac
19324eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19325$as_echo "$ac_try_echo"; } >&5
19326  (eval "$ac_link") 2>&5
19327  ac_status=$?
19328  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19329  test $ac_status = 0; }; then :
19330  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19331# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19332# work properly (i.e., refer to `conftest.exe'), while it won't with
19333# `rm'.
19334for ac_file in conftest.exe conftest conftest.*; do
19335  test -f "$ac_file" || continue
19336  case $ac_file in
19337    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19338    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19339	  break;;
19340    * ) break;;
19341  esac
19342done
19343else
19344  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19345$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19346as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19347See \`config.log' for more details" "$LINENO" 5; }
19348fi
19349rm -f conftest conftest$ac_cv_exeext
19350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19351$as_echo "$ac_cv_exeext" >&6; }
19352
19353rm -f conftest.$ac_ext
19354EXEEXT=$ac_cv_exeext
19355ac_exeext=$EXEEXT
19356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19357/* end confdefs.h.  */
19358#include <stdio.h>
19359int
19360main ()
19361{
19362FILE *f = fopen ("conftest.out", "w");
19363 return ferror (f) || fclose (f) != 0;
19364
19365  ;
19366  return 0;
19367}
19368_ACEOF
19369ac_clean_files="$ac_clean_files conftest.out"
19370# Check that the compiler produces executables we can run.  If not, either
19371# the compiler is broken, or we cross compile.
19372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19373$as_echo_n "checking whether we are cross compiling... " >&6; }
19374if test "$cross_compiling" != yes; then
19375  { { ac_try="$ac_link"
19376case "(($ac_try" in
19377  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19378  *) ac_try_echo=$ac_try;;
19379esac
19380eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19381$as_echo "$ac_try_echo"; } >&5
19382  (eval "$ac_link") 2>&5
19383  ac_status=$?
19384  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19385  test $ac_status = 0; }
19386  if { ac_try='./conftest$ac_cv_exeext'
19387  { { case "(($ac_try" in
19388  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19389  *) ac_try_echo=$ac_try;;
19390esac
19391eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19392$as_echo "$ac_try_echo"; } >&5
19393  (eval "$ac_try") 2>&5
19394  ac_status=$?
19395  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19396  test $ac_status = 0; }; }; then
19397    cross_compiling=no
19398  else
19399    if test "$cross_compiling" = maybe; then
19400	cross_compiling=yes
19401    else
19402	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19403$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19404as_fn_error $? "cannot run C compiled programs.
19405If you meant to cross compile, use \`--host'.
19406See \`config.log' for more details" "$LINENO" 5; }
19407    fi
19408  fi
19409fi
19410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19411$as_echo "$cross_compiling" >&6; }
19412
19413rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19414ac_clean_files=$ac_clean_files_save
19415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19416$as_echo_n "checking for suffix of object files... " >&6; }
19417if ${ac_cv_objext+:} false; then :
19418  $as_echo_n "(cached) " >&6
19419else
19420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19421/* end confdefs.h.  */
19422
19423int
19424main ()
19425{
19426
19427  ;
19428  return 0;
19429}
19430_ACEOF
19431rm -f conftest.o conftest.obj
19432if { { ac_try="$ac_compile"
19433case "(($ac_try" in
19434  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19435  *) ac_try_echo=$ac_try;;
19436esac
19437eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19438$as_echo "$ac_try_echo"; } >&5
19439  (eval "$ac_compile") 2>&5
19440  ac_status=$?
19441  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19442  test $ac_status = 0; }; then :
19443  for ac_file in conftest.o conftest.obj conftest.*; do
19444  test -f "$ac_file" || continue;
19445  case $ac_file in
19446    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19447    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19448       break;;
19449  esac
19450done
19451else
19452  $as_echo "$as_me: failed program was:" >&5
19453sed 's/^/| /' conftest.$ac_ext >&5
19454
19455{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19456$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19457as_fn_error $? "cannot compute suffix of object files: cannot compile
19458See \`config.log' for more details" "$LINENO" 5; }
19459fi
19460rm -f conftest.$ac_cv_objext conftest.$ac_ext
19461fi
19462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19463$as_echo "$ac_cv_objext" >&6; }
19464OBJEXT=$ac_cv_objext
19465ac_objext=$OBJEXT
19466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19467$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19468if ${ac_cv_c_compiler_gnu+:} false; then :
19469  $as_echo_n "(cached) " >&6
19470else
19471  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19472/* end confdefs.h.  */
19473
19474int
19475main ()
19476{
19477#ifndef __GNUC__
19478       choke me
19479#endif
19480
19481  ;
19482  return 0;
19483}
19484_ACEOF
19485if ac_fn_c_try_compile "$LINENO"; then :
19486  ac_compiler_gnu=yes
19487else
19488  ac_compiler_gnu=no
19489fi
19490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19491ac_cv_c_compiler_gnu=$ac_compiler_gnu
19492
19493fi
19494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19495$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19496if test $ac_compiler_gnu = yes; then
19497  GCC=yes
19498else
19499  GCC=
19500fi
19501ac_test_CFLAGS=${CFLAGS+set}
19502ac_save_CFLAGS=$CFLAGS
19503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19504$as_echo_n "checking whether $CC accepts -g... " >&6; }
19505if ${ac_cv_prog_cc_g+:} false; then :
19506  $as_echo_n "(cached) " >&6
19507else
19508  ac_save_c_werror_flag=$ac_c_werror_flag
19509   ac_c_werror_flag=yes
19510   ac_cv_prog_cc_g=no
19511   CFLAGS="-g"
19512   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19513/* end confdefs.h.  */
19514
19515int
19516main ()
19517{
19518
19519  ;
19520  return 0;
19521}
19522_ACEOF
19523if ac_fn_c_try_compile "$LINENO"; then :
19524  ac_cv_prog_cc_g=yes
19525else
19526  CFLAGS=""
19527      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19528/* end confdefs.h.  */
19529
19530int
19531main ()
19532{
19533
19534  ;
19535  return 0;
19536}
19537_ACEOF
19538if ac_fn_c_try_compile "$LINENO"; then :
19539
19540else
19541  ac_c_werror_flag=$ac_save_c_werror_flag
19542	 CFLAGS="-g"
19543	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19544/* end confdefs.h.  */
19545
19546int
19547main ()
19548{
19549
19550  ;
19551  return 0;
19552}
19553_ACEOF
19554if ac_fn_c_try_compile "$LINENO"; then :
19555  ac_cv_prog_cc_g=yes
19556fi
19557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19558fi
19559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19560fi
19561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19562   ac_c_werror_flag=$ac_save_c_werror_flag
19563fi
19564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19565$as_echo "$ac_cv_prog_cc_g" >&6; }
19566if test "$ac_test_CFLAGS" = set; then
19567  CFLAGS=$ac_save_CFLAGS
19568elif test $ac_cv_prog_cc_g = yes; then
19569  if test "$GCC" = yes; then
19570    CFLAGS="-g -O2"
19571  else
19572    CFLAGS="-g"
19573  fi
19574else
19575  if test "$GCC" = yes; then
19576    CFLAGS="-O2"
19577  else
19578    CFLAGS=
19579  fi
19580fi
19581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19582$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19583if ${ac_cv_prog_cc_c89+:} false; then :
19584  $as_echo_n "(cached) " >&6
19585else
19586  ac_cv_prog_cc_c89=no
19587ac_save_CC=$CC
19588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19589/* end confdefs.h.  */
19590#include <stdarg.h>
19591#include <stdio.h>
19592#include <sys/types.h>
19593#include <sys/stat.h>
19594/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19595struct buf { int x; };
19596FILE * (*rcsopen) (struct buf *, struct stat *, int);
19597static char *e (p, i)
19598     char **p;
19599     int i;
19600{
19601  return p[i];
19602}
19603static char *f (char * (*g) (char **, int), char **p, ...)
19604{
19605  char *s;
19606  va_list v;
19607  va_start (v,p);
19608  s = g (p, va_arg (v,int));
19609  va_end (v);
19610  return s;
19611}
19612
19613/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19614   function prototypes and stuff, but not '\xHH' hex character constants.
19615   These don't provoke an error unfortunately, instead are silently treated
19616   as 'x'.  The following induces an error, until -std is added to get
19617   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19618   array size at least.  It's necessary to write '\x00'==0 to get something
19619   that's true only with -std.  */
19620int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19621
19622/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19623   inside strings and character constants.  */
19624#define FOO(x) 'x'
19625int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19626
19627int test (int i, double x);
19628struct s1 {int (*f) (int a);};
19629struct s2 {int (*f) (double a);};
19630int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19631int argc;
19632char **argv;
19633int
19634main ()
19635{
19636return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19637  ;
19638  return 0;
19639}
19640_ACEOF
19641for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19642	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19643do
19644  CC="$ac_save_CC $ac_arg"
19645  if ac_fn_c_try_compile "$LINENO"; then :
19646  ac_cv_prog_cc_c89=$ac_arg
19647fi
19648rm -f core conftest.err conftest.$ac_objext
19649  test "x$ac_cv_prog_cc_c89" != "xno" && break
19650done
19651rm -f conftest.$ac_ext
19652CC=$ac_save_CC
19653
19654fi
19655# AC_CACHE_VAL
19656case "x$ac_cv_prog_cc_c89" in
19657  x)
19658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19659$as_echo "none needed" >&6; } ;;
19660  xno)
19661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19662$as_echo "unsupported" >&6; } ;;
19663  *)
19664    CC="$CC $ac_cv_prog_cc_c89"
19665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19666$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19667esac
19668if test "x$ac_cv_prog_cc_c89" != xno; then :
19669
19670fi
19671
19672ac_ext=cpp
19673ac_cpp='$CXXCPP $CPPFLAGS'
19674ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19675ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19676ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19677
19678
19679### Locate C++ compiler (CXX)
19680
19681if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19682  # Do not probe for CC on MacOSX.
19683  COMPILER_CHECK_LIST="cl g++"
19684else
19685  COMPILER_CHECK_LIST="cl CC g++"
19686fi
19687
19688  COMPILER_NAME=C++
19689
19690  CXX=
19691  # If TOOLS_DIR is set, check for all compiler names in there first
19692  # before checking the rest of the PATH.
19693  if test -n "$TOOLS_DIR"; then
19694    PATH_save="$PATH"
19695    PATH="$TOOLS_DIR"
19696    for ac_prog in $COMPILER_CHECK_LIST
19697do
19698  # Extract the first word of "$ac_prog", so it can be a program name with args.
19699set dummy $ac_prog; ac_word=$2
19700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19701$as_echo_n "checking for $ac_word... " >&6; }
19702if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
19703  $as_echo_n "(cached) " >&6
19704else
19705  case $TOOLS_DIR_CXX in
19706  [\\/]* | ?:[\\/]*)
19707  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19708  ;;
19709  *)
19710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19711for as_dir in $PATH
19712do
19713  IFS=$as_save_IFS
19714  test -z "$as_dir" && as_dir=.
19715    for ac_exec_ext in '' $ac_executable_extensions; do
19716  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19717    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19719    break 2
19720  fi
19721done
19722  done
19723IFS=$as_save_IFS
19724
19725  ;;
19726esac
19727fi
19728TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19729if test -n "$TOOLS_DIR_CXX"; then
19730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19731$as_echo "$TOOLS_DIR_CXX" >&6; }
19732else
19733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19734$as_echo "no" >&6; }
19735fi
19736
19737
19738  test -n "$TOOLS_DIR_CXX" && break
19739done
19740
19741    CXX=$TOOLS_DIR_CXX
19742    PATH="$PATH_save"
19743  fi
19744
19745  # AC_PATH_PROGS can't be run multiple times with the same variable,
19746  # so create a new name for this run.
19747  if test "x$CXX" = x; then
19748    for ac_prog in $COMPILER_CHECK_LIST
19749do
19750  # Extract the first word of "$ac_prog", so it can be a program name with args.
19751set dummy $ac_prog; ac_word=$2
19752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19753$as_echo_n "checking for $ac_word... " >&6; }
19754if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
19755  $as_echo_n "(cached) " >&6
19756else
19757  case $POTENTIAL_CXX in
19758  [\\/]* | ?:[\\/]*)
19759  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19760  ;;
19761  *)
19762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19763for as_dir in $PATH
19764do
19765  IFS=$as_save_IFS
19766  test -z "$as_dir" && as_dir=.
19767    for ac_exec_ext in '' $ac_executable_extensions; do
19768  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19769    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19771    break 2
19772  fi
19773done
19774  done
19775IFS=$as_save_IFS
19776
19777  ;;
19778esac
19779fi
19780POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19781if test -n "$POTENTIAL_CXX"; then
19782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19783$as_echo "$POTENTIAL_CXX" >&6; }
19784else
19785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19786$as_echo "no" >&6; }
19787fi
19788
19789
19790  test -n "$POTENTIAL_CXX" && break
19791done
19792
19793    CXX=$POTENTIAL_CXX
19794  fi
19795
19796  if test "x$CXX" = x; then
19797
19798    # Print a helpful message on how to acquire the necessary build dependency.
19799    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19800    MISSING_DEPENDENCY=devkit
19801    PKGHANDLER_COMMAND=
19802
19803    case $PKGHANDLER in
19804	apt-get)
19805                apt_help     $MISSING_DEPENDENCY ;;
19806    yum)
19807                yum_help     $MISSING_DEPENDENCY ;;
19808	port)
19809                port_help    $MISSING_DEPENDENCY ;;
19810	pkgutil)
19811                pkgutil_help $MISSING_DEPENDENCY ;;
19812	pkgadd)
19813                pkgadd_help  $MISSING_DEPENDENCY ;;
19814    * )
19815      break ;;
19816    esac
19817
19818    if test "x$PKGHANDLER_COMMAND" != x; then
19819        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19820    fi
19821
19822      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19823  fi
19824
19825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19826
19827  # First separate the path from the arguments. This will split at the first
19828  # space.
19829  complete="$CXX"
19830  path="${complete%% *}"
19831  tmp="$complete EOL"
19832  arguments="${tmp#* }"
19833
19834  # Input might be given as Windows format, start by converting to
19835  # unix format.
19836  new_path=`$CYGPATH -u "$path"`
19837
19838  # Now try to locate executable using which
19839  new_path=`$WHICH "$new_path" 2> /dev/null`
19840  # bat and cmd files are not always considered executable in cygwin causing which
19841  # to not find them
19842  if test "x$new_path" = x \
19843           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19844           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19845    new_path=`$CYGPATH -u "$path"`
19846  fi
19847  if test "x$new_path" = x; then
19848    # Oops. Which didn't find the executable.
19849    # The splitting of arguments from the executable at a space might have been incorrect,
19850    # since paths with space are more likely in Windows. Give it another try with the whole
19851    # argument.
19852    path="$complete"
19853    arguments="EOL"
19854    new_path=`$CYGPATH -u "$path"`
19855    new_path=`$WHICH "$new_path" 2> /dev/null`
19856    # bat and cmd files are not always considered executable in cygwin causing which
19857    # to not find them
19858    if test "x$new_path" = x \
19859             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19860             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19861      new_path=`$CYGPATH -u "$path"`
19862    fi
19863    if test "x$new_path" = x; then
19864      # It's still not found. Now this is an unrecoverable error.
19865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19866$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19867      has_space=`$ECHO "$complete" | $GREP " "`
19868      if test "x$has_space" != x; then
19869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19871      fi
19872      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19873    fi
19874  fi
19875
19876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19879  # "foo.exe" is OK but "foo" is an error.
19880  #
19881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19882  # It is also a way to make sure we got the proper file name for the real test later on.
19883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19884  if test "x$test_shortpath" = x; then
19885    # Short path failed, file does not exist as specified.
19886    # Try adding .exe or .cmd
19887    if test -f "${new_path}.exe"; then
19888       input_to_shortpath="${new_path}.exe"
19889    elif test -f "${new_path}.cmd"; then
19890       input_to_shortpath="${new_path}.cmd"
19891    else
19892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19893$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19894      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19895$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19896      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19897    fi
19898  else
19899    input_to_shortpath="$new_path"
19900  fi
19901
19902  # Call helper function which possibly converts this using DOS-style short mode.
19903  # If so, the updated path is stored in $new_path.
19904  new_path="$input_to_shortpath"
19905
19906  input_path="$input_to_shortpath"
19907  # Check if we need to convert this using DOS-style short mode. If the path
19908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19909  # take no chances and rewrite it.
19910  # Note: m4 eats our [], so we need to use [ and ] instead.
19911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19912  if test "x$has_forbidden_chars" != x; then
19913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19917      # Going to short mode and back again did indeed matter. Since short mode is
19918      # case insensitive, let's make it lowercase to improve readability.
19919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19920      # Now convert it back to Unix-stile (cygpath)
19921      input_path=`$CYGPATH -u "$shortmode_path"`
19922      new_path="$input_path"
19923    fi
19924  fi
19925
19926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19927  if test "x$test_cygdrive_prefix" = x; then
19928    # As a simple fix, exclude /usr/bin since it's not a real path.
19929    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19931      # a path prefixed by /cygdrive for fixpath to work.
19932      new_path="$CYGWIN_ROOT_PATH$input_path"
19933    fi
19934  fi
19935
19936  # remove trailing .exe if any
19937  new_path="${new_path/%.exe/}"
19938
19939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19940
19941  # First separate the path from the arguments. This will split at the first
19942  # space.
19943  complete="$CXX"
19944  path="${complete%% *}"
19945  tmp="$complete EOL"
19946  arguments="${tmp#* }"
19947
19948  # Input might be given as Windows format, start by converting to
19949  # unix format.
19950  new_path="$path"
19951
19952  windows_path="$new_path"
19953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19954    unix_path=`$CYGPATH -u "$windows_path"`
19955    new_path="$unix_path"
19956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19958    new_path="$unix_path"
19959  fi
19960
19961
19962  # Now try to locate executable using which
19963  new_path=`$WHICH "$new_path" 2> /dev/null`
19964
19965  if test "x$new_path" = x; then
19966    # Oops. Which didn't find the executable.
19967    # The splitting of arguments from the executable at a space might have been incorrect,
19968    # since paths with space are more likely in Windows. Give it another try with the whole
19969    # argument.
19970    path="$complete"
19971    arguments="EOL"
19972    new_path="$path"
19973
19974  windows_path="$new_path"
19975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19976    unix_path=`$CYGPATH -u "$windows_path"`
19977    new_path="$unix_path"
19978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19980    new_path="$unix_path"
19981  fi
19982
19983
19984    new_path=`$WHICH "$new_path" 2> /dev/null`
19985
19986    if test "x$new_path" = x; then
19987      # It's still not found. Now this is an unrecoverable error.
19988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19989$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19990      has_space=`$ECHO "$complete" | $GREP " "`
19991      if test "x$has_space" != x; then
19992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19994      fi
19995      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19996    fi
19997  fi
19998
19999  # Now new_path has a complete unix path to the binary
20000  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20001    # Keep paths in /bin as-is, but remove trailing .exe if any
20002    new_path="${new_path/%.exe/}"
20003    # Do not save /bin paths to all_fixpath_prefixes!
20004  else
20005    # Not in mixed or Windows style, start by that.
20006    new_path=`cmd //c echo $new_path`
20007
20008  input_path="$new_path"
20009  # Check if we need to convert this using DOS-style short mode. If the path
20010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20011  # take no chances and rewrite it.
20012  # Note: m4 eats our [], so we need to use [ and ] instead.
20013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20014  if test "x$has_forbidden_chars" != x; then
20015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20017  fi
20018
20019    # Output is in $new_path
20020
20021  windows_path="$new_path"
20022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20023    unix_path=`$CYGPATH -u "$windows_path"`
20024    new_path="$unix_path"
20025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20027    new_path="$unix_path"
20028  fi
20029
20030    # remove trailing .exe if any
20031    new_path="${new_path/%.exe/}"
20032
20033    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20034    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20035  fi
20036
20037  else
20038    # We're on a posix platform. Hooray! :)
20039    # First separate the path from the arguments. This will split at the first
20040    # space.
20041    complete="$CXX"
20042    path="${complete%% *}"
20043    tmp="$complete EOL"
20044    arguments="${tmp#* }"
20045
20046    # Cannot rely on the command "which" here since it doesn't always work.
20047    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20048    if test -z "$is_absolute_path"; then
20049      # Path to executable is not absolute. Find it.
20050      IFS_save="$IFS"
20051      IFS=:
20052      for p in $PATH; do
20053        if test -f "$p/$path" && test -x "$p/$path"; then
20054          new_path="$p/$path"
20055          break
20056        fi
20057      done
20058      IFS="$IFS_save"
20059    else
20060      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20061$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20062      new_path="$path"
20063    fi
20064
20065    if test "x$new_path" = x; then
20066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20067$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20068        has_space=`$ECHO "$complete" | $GREP " "`
20069        if test "x$has_space" != x; then
20070          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20071$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20072        fi
20073        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20074      fi
20075  fi
20076
20077      # Now join together the path and the arguments once again
20078      if test "x$arguments" != xEOL; then
20079        new_complete="$new_path ${arguments% *}"
20080      else
20081        new_complete="$new_path"
20082      fi
20083
20084  if test "x$complete" != "x$new_complete"; then
20085      CXX="$new_complete"
20086      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20087$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20088    fi
20089
20090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20091$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20092  TEST_COMPILER="$CXX"
20093
20094    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20095        # Follow a chain of symbolic links. Use readlink
20096        # where it exists, else fall back to horribly
20097        # complicated shell code.
20098        if test "x$READLINK_TESTED" != yes; then
20099            # On MacOSX there is a readlink tool with a different
20100            # purpose than the GNU readlink tool. Check the found readlink.
20101            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20102            if test "x$ISGNU" = x; then
20103                 # A readlink that we do not know how to use.
20104                 # Are there other non-GNU readlinks out there?
20105                 READLINK_TESTED=yes
20106                 READLINK=
20107            fi
20108        fi
20109
20110        if test "x$READLINK" != x; then
20111            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20112        else
20113            # Save the current directory for restoring afterwards
20114            STARTDIR=$PWD
20115            COUNTER=0
20116            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20117            sym_link_file=`$BASENAME $TEST_COMPILER`
20118            # Use the system pwd and not the shell builtin to resolve directory symlinks
20119            cd $sym_link_dir
20120            cd `$THEPWDCMD`
20121            sym_link_dir=`$THEPWDCMD`
20122            # Resolve file symlinks
20123            while test $COUNTER -lt 20; do
20124                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20125                if test "x$ISLINK" == x; then
20126                    # This is not a symbolic link! We are done!
20127                    break
20128                fi
20129                # Again resolve directory symlinks since the target of the just found
20130                # link could be in a different directory
20131                cd `$DIRNAME $ISLINK`
20132                sym_link_dir=`$THEPWDCMD`
20133                sym_link_file=`$BASENAME $ISLINK`
20134                let COUNTER=COUNTER+1
20135            done
20136            cd $STARTDIR
20137            TEST_COMPILER=$sym_link_dir/$sym_link_file
20138        fi
20139    fi
20140
20141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20142$as_echo "$TEST_COMPILER" >&6; }
20143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20144$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20145
20146  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20147  if test "x$COMPILER_BASENAME" = "xccache"; then
20148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20149$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20150    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20151    # We want to control ccache invocation ourselves, so ignore this cc and try
20152    # searching again.
20153
20154    # Remove the path to the fake ccache cc from the PATH
20155    RETRY_COMPILER_SAVED_PATH="$PATH"
20156    COMPILER_DIRNAME=`$DIRNAME $CXX`
20157    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20158
20159    # Try again looking for our compiler
20160    if test -n "$ac_tool_prefix"; then
20161  for ac_prog in $COMPILER_CHECK_LIST
20162  do
20163    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20164set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20166$as_echo_n "checking for $ac_word... " >&6; }
20167if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20168  $as_echo_n "(cached) " >&6
20169else
20170  if test -n "$PROPER_COMPILER_CXX"; then
20171  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20172else
20173as_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_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
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
20188fi
20189fi
20190PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20191if test -n "$PROPER_COMPILER_CXX"; then
20192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20193$as_echo "$PROPER_COMPILER_CXX" >&6; }
20194else
20195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20196$as_echo "no" >&6; }
20197fi
20198
20199
20200    test -n "$PROPER_COMPILER_CXX" && break
20201  done
20202fi
20203if test -z "$PROPER_COMPILER_CXX"; then
20204  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20205  for ac_prog in $COMPILER_CHECK_LIST
20206do
20207  # Extract the first word of "$ac_prog", so it can be a program name with args.
20208set dummy $ac_prog; ac_word=$2
20209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20210$as_echo_n "checking for $ac_word... " >&6; }
20211if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20212  $as_echo_n "(cached) " >&6
20213else
20214  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20215  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20216else
20217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20218for as_dir in $PATH
20219do
20220  IFS=$as_save_IFS
20221  test -z "$as_dir" && as_dir=.
20222    for ac_exec_ext in '' $ac_executable_extensions; do
20223  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20224    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20226    break 2
20227  fi
20228done
20229  done
20230IFS=$as_save_IFS
20231
20232fi
20233fi
20234ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20235if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20237$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20238else
20239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20240$as_echo "no" >&6; }
20241fi
20242
20243
20244  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20245done
20246
20247  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20248    PROPER_COMPILER_CXX=""
20249  else
20250    case $cross_compiling:$ac_tool_warned in
20251yes:)
20252{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20253$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20254ac_tool_warned=yes ;;
20255esac
20256    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20257  fi
20258fi
20259
20260
20261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20262
20263  # First separate the path from the arguments. This will split at the first
20264  # space.
20265  complete="$PROPER_COMPILER_CXX"
20266  path="${complete%% *}"
20267  tmp="$complete EOL"
20268  arguments="${tmp#* }"
20269
20270  # Input might be given as Windows format, start by converting to
20271  # unix format.
20272  new_path=`$CYGPATH -u "$path"`
20273
20274  # Now try to locate executable using which
20275  new_path=`$WHICH "$new_path" 2> /dev/null`
20276  # bat and cmd files are not always considered executable in cygwin causing which
20277  # to not find them
20278  if test "x$new_path" = x \
20279           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20280           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20281    new_path=`$CYGPATH -u "$path"`
20282  fi
20283  if test "x$new_path" = x; then
20284    # Oops. Which didn't find the executable.
20285    # The splitting of arguments from the executable at a space might have been incorrect,
20286    # since paths with space are more likely in Windows. Give it another try with the whole
20287    # argument.
20288    path="$complete"
20289    arguments="EOL"
20290    new_path=`$CYGPATH -u "$path"`
20291    new_path=`$WHICH "$new_path" 2> /dev/null`
20292    # bat and cmd files are not always considered executable in cygwin causing which
20293    # to not find them
20294    if test "x$new_path" = x \
20295             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20296             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20297      new_path=`$CYGPATH -u "$path"`
20298    fi
20299    if test "x$new_path" = x; then
20300      # It's still not found. Now this is an unrecoverable error.
20301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20302$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20303      has_space=`$ECHO "$complete" | $GREP " "`
20304      if test "x$has_space" != x; then
20305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20307      fi
20308      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20309    fi
20310  fi
20311
20312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20315  # "foo.exe" is OK but "foo" is an error.
20316  #
20317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20318  # It is also a way to make sure we got the proper file name for the real test later on.
20319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20320  if test "x$test_shortpath" = x; then
20321    # Short path failed, file does not exist as specified.
20322    # Try adding .exe or .cmd
20323    if test -f "${new_path}.exe"; then
20324       input_to_shortpath="${new_path}.exe"
20325    elif test -f "${new_path}.cmd"; then
20326       input_to_shortpath="${new_path}.cmd"
20327    else
20328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20329$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20332      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20333    fi
20334  else
20335    input_to_shortpath="$new_path"
20336  fi
20337
20338  # Call helper function which possibly converts this using DOS-style short mode.
20339  # If so, the updated path is stored in $new_path.
20340  new_path="$input_to_shortpath"
20341
20342  input_path="$input_to_shortpath"
20343  # Check if we need to convert this using DOS-style short mode. If the path
20344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20345  # take no chances and rewrite it.
20346  # Note: m4 eats our [], so we need to use [ and ] instead.
20347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20348  if test "x$has_forbidden_chars" != x; then
20349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20353      # Going to short mode and back again did indeed matter. Since short mode is
20354      # case insensitive, let's make it lowercase to improve readability.
20355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20356      # Now convert it back to Unix-stile (cygpath)
20357      input_path=`$CYGPATH -u "$shortmode_path"`
20358      new_path="$input_path"
20359    fi
20360  fi
20361
20362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20363  if test "x$test_cygdrive_prefix" = x; then
20364    # As a simple fix, exclude /usr/bin since it's not a real path.
20365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20367      # a path prefixed by /cygdrive for fixpath to work.
20368      new_path="$CYGWIN_ROOT_PATH$input_path"
20369    fi
20370  fi
20371
20372  # remove trailing .exe if any
20373  new_path="${new_path/%.exe/}"
20374
20375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20376
20377  # First separate the path from the arguments. This will split at the first
20378  # space.
20379  complete="$PROPER_COMPILER_CXX"
20380  path="${complete%% *}"
20381  tmp="$complete EOL"
20382  arguments="${tmp#* }"
20383
20384  # Input might be given as Windows format, start by converting to
20385  # unix format.
20386  new_path="$path"
20387
20388  windows_path="$new_path"
20389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20390    unix_path=`$CYGPATH -u "$windows_path"`
20391    new_path="$unix_path"
20392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20394    new_path="$unix_path"
20395  fi
20396
20397
20398  # Now try to locate executable using which
20399  new_path=`$WHICH "$new_path" 2> /dev/null`
20400
20401  if test "x$new_path" = x; then
20402    # Oops. Which didn't find the executable.
20403    # The splitting of arguments from the executable at a space might have been incorrect,
20404    # since paths with space are more likely in Windows. Give it another try with the whole
20405    # argument.
20406    path="$complete"
20407    arguments="EOL"
20408    new_path="$path"
20409
20410  windows_path="$new_path"
20411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20412    unix_path=`$CYGPATH -u "$windows_path"`
20413    new_path="$unix_path"
20414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20416    new_path="$unix_path"
20417  fi
20418
20419
20420    new_path=`$WHICH "$new_path" 2> /dev/null`
20421
20422    if test "x$new_path" = x; then
20423      # It's still not found. Now this is an unrecoverable error.
20424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20425$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20426      has_space=`$ECHO "$complete" | $GREP " "`
20427      if test "x$has_space" != x; then
20428        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20429$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20430      fi
20431      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20432    fi
20433  fi
20434
20435  # Now new_path has a complete unix path to the binary
20436  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20437    # Keep paths in /bin as-is, but remove trailing .exe if any
20438    new_path="${new_path/%.exe/}"
20439    # Do not save /bin paths to all_fixpath_prefixes!
20440  else
20441    # Not in mixed or Windows style, start by that.
20442    new_path=`cmd //c echo $new_path`
20443
20444  input_path="$new_path"
20445  # Check if we need to convert this using DOS-style short mode. If the path
20446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20447  # take no chances and rewrite it.
20448  # Note: m4 eats our [], so we need to use [ and ] instead.
20449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20450  if test "x$has_forbidden_chars" != x; then
20451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20453  fi
20454
20455    # Output is in $new_path
20456
20457  windows_path="$new_path"
20458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20459    unix_path=`$CYGPATH -u "$windows_path"`
20460    new_path="$unix_path"
20461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20463    new_path="$unix_path"
20464  fi
20465
20466    # remove trailing .exe if any
20467    new_path="${new_path/%.exe/}"
20468
20469    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20470    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20471  fi
20472
20473  else
20474    # We're on a posix platform. Hooray! :)
20475    # First separate the path from the arguments. This will split at the first
20476    # space.
20477    complete="$PROPER_COMPILER_CXX"
20478    path="${complete%% *}"
20479    tmp="$complete EOL"
20480    arguments="${tmp#* }"
20481
20482    # Cannot rely on the command "which" here since it doesn't always work.
20483    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20484    if test -z "$is_absolute_path"; then
20485      # Path to executable is not absolute. Find it.
20486      IFS_save="$IFS"
20487      IFS=:
20488      for p in $PATH; do
20489        if test -f "$p/$path" && test -x "$p/$path"; then
20490          new_path="$p/$path"
20491          break
20492        fi
20493      done
20494      IFS="$IFS_save"
20495    else
20496      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20497$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20498      new_path="$path"
20499    fi
20500
20501    if test "x$new_path" = x; then
20502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20503$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20504        has_space=`$ECHO "$complete" | $GREP " "`
20505        if test "x$has_space" != x; then
20506          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20507$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20508        fi
20509        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20510      fi
20511  fi
20512
20513      # Now join together the path and the arguments once again
20514      if test "x$arguments" != xEOL; then
20515        new_complete="$new_path ${arguments% *}"
20516      else
20517        new_complete="$new_path"
20518      fi
20519
20520  if test "x$complete" != "x$new_complete"; then
20521      PROPER_COMPILER_CXX="$new_complete"
20522      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20523$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20524    fi
20525
20526    PATH="$RETRY_COMPILER_SAVED_PATH"
20527
20528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20529$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20530
20531    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20532        # Follow a chain of symbolic links. Use readlink
20533        # where it exists, else fall back to horribly
20534        # complicated shell code.
20535        if test "x$READLINK_TESTED" != yes; then
20536            # On MacOSX there is a readlink tool with a different
20537            # purpose than the GNU readlink tool. Check the found readlink.
20538            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20539            if test "x$ISGNU" = x; then
20540                 # A readlink that we do not know how to use.
20541                 # Are there other non-GNU readlinks out there?
20542                 READLINK_TESTED=yes
20543                 READLINK=
20544            fi
20545        fi
20546
20547        if test "x$READLINK" != x; then
20548            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20549        else
20550            # Save the current directory for restoring afterwards
20551            STARTDIR=$PWD
20552            COUNTER=0
20553            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20554            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20555            # Use the system pwd and not the shell builtin to resolve directory symlinks
20556            cd $sym_link_dir
20557            cd `$THEPWDCMD`
20558            sym_link_dir=`$THEPWDCMD`
20559            # Resolve file symlinks
20560            while test $COUNTER -lt 20; do
20561                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20562                if test "x$ISLINK" == x; then
20563                    # This is not a symbolic link! We are done!
20564                    break
20565                fi
20566                # Again resolve directory symlinks since the target of the just found
20567                # link could be in a different directory
20568                cd `$DIRNAME $ISLINK`
20569                sym_link_dir=`$THEPWDCMD`
20570                sym_link_file=`$BASENAME $ISLINK`
20571                let COUNTER=COUNTER+1
20572            done
20573            cd $STARTDIR
20574            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20575        fi
20576    fi
20577
20578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20579$as_echo "$PROPER_COMPILER_CXX" >&6; }
20580    CXX="$PROPER_COMPILER_CXX"
20581  else
20582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20583$as_echo "no, keeping CXX" >&6; }
20584    CXX="$TEST_COMPILER"
20585  fi
20586
20587  COMPILER=$CXX
20588  COMPILER_NAME=$COMPILER_NAME
20589
20590  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20591    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20592    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20593    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20594    if test $? -ne 0; then
20595      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20596
20597      { $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
20598$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20599      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20600$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20601      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20602    else
20603      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20604      COMPILER_VENDOR="Sun Studio"
20605    fi
20606  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20607    # First line typically looks something like:
20608    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20609    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20610    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20611    COMPILER_VENDOR="Microsoft CL.EXE"
20612    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20613    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20614      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20615        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20616      fi
20617    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20618      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20619        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20620      fi
20621    fi
20622  else
20623    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20624    # Check that this is likely to be GCC.
20625    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20626    if test $? -ne 0; then
20627      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20628$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20629      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20630$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20631      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20632    fi
20633
20634    # First line typically looks something like:
20635    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20636    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20637    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20638  fi
20639  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20640  CXX_VERSION="$COMPILER_VERSION"
20641  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20642  CXX_VENDOR="$COMPILER_VENDOR"
20643
20644  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20645$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20646
20647
20648# Now that we have resolved CXX ourself, let autoconf have it's go at it
20649ac_ext=cpp
20650ac_cpp='$CXXCPP $CPPFLAGS'
20651ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20652ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20653ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20654if test -z "$CXX"; then
20655  if test -n "$CCC"; then
20656    CXX=$CCC
20657  else
20658    if test -n "$ac_tool_prefix"; then
20659  for ac_prog in $CXX
20660  do
20661    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20662set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20664$as_echo_n "checking for $ac_word... " >&6; }
20665if ${ac_cv_prog_CXX+:} false; then :
20666  $as_echo_n "(cached) " >&6
20667else
20668  if test -n "$CXX"; then
20669  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20670else
20671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20672for as_dir in $PATH
20673do
20674  IFS=$as_save_IFS
20675  test -z "$as_dir" && as_dir=.
20676    for ac_exec_ext in '' $ac_executable_extensions; do
20677  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20678    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20680    break 2
20681  fi
20682done
20683  done
20684IFS=$as_save_IFS
20685
20686fi
20687fi
20688CXX=$ac_cv_prog_CXX
20689if test -n "$CXX"; then
20690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20691$as_echo "$CXX" >&6; }
20692else
20693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20694$as_echo "no" >&6; }
20695fi
20696
20697
20698    test -n "$CXX" && break
20699  done
20700fi
20701if test -z "$CXX"; then
20702  ac_ct_CXX=$CXX
20703  for ac_prog in $CXX
20704do
20705  # Extract the first word of "$ac_prog", so it can be a program name with args.
20706set dummy $ac_prog; ac_word=$2
20707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20708$as_echo_n "checking for $ac_word... " >&6; }
20709if ${ac_cv_prog_ac_ct_CXX+:} false; then :
20710  $as_echo_n "(cached) " >&6
20711else
20712  if test -n "$ac_ct_CXX"; then
20713  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20714else
20715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20716for as_dir in $PATH
20717do
20718  IFS=$as_save_IFS
20719  test -z "$as_dir" && as_dir=.
20720    for ac_exec_ext in '' $ac_executable_extensions; do
20721  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20722    ac_cv_prog_ac_ct_CXX="$ac_prog"
20723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20724    break 2
20725  fi
20726done
20727  done
20728IFS=$as_save_IFS
20729
20730fi
20731fi
20732ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20733if test -n "$ac_ct_CXX"; then
20734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20735$as_echo "$ac_ct_CXX" >&6; }
20736else
20737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20738$as_echo "no" >&6; }
20739fi
20740
20741
20742  test -n "$ac_ct_CXX" && break
20743done
20744
20745  if test "x$ac_ct_CXX" = x; then
20746    CXX="g++"
20747  else
20748    case $cross_compiling:$ac_tool_warned in
20749yes:)
20750{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20751$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20752ac_tool_warned=yes ;;
20753esac
20754    CXX=$ac_ct_CXX
20755  fi
20756fi
20757
20758  fi
20759fi
20760# Provide some information about the compiler.
20761$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20762set X $ac_compile
20763ac_compiler=$2
20764for ac_option in --version -v -V -qversion; do
20765  { { ac_try="$ac_compiler $ac_option >&5"
20766case "(($ac_try" in
20767  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20768  *) ac_try_echo=$ac_try;;
20769esac
20770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20771$as_echo "$ac_try_echo"; } >&5
20772  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20773  ac_status=$?
20774  if test -s conftest.err; then
20775    sed '10a\
20776... rest of stderr output deleted ...
20777         10q' conftest.err >conftest.er1
20778    cat conftest.er1 >&5
20779  fi
20780  rm -f conftest.er1 conftest.err
20781  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20782  test $ac_status = 0; }
20783done
20784
20785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20786$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20787if ${ac_cv_cxx_compiler_gnu+:} false; then :
20788  $as_echo_n "(cached) " >&6
20789else
20790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20791/* end confdefs.h.  */
20792
20793int
20794main ()
20795{
20796#ifndef __GNUC__
20797       choke me
20798#endif
20799
20800  ;
20801  return 0;
20802}
20803_ACEOF
20804if ac_fn_cxx_try_compile "$LINENO"; then :
20805  ac_compiler_gnu=yes
20806else
20807  ac_compiler_gnu=no
20808fi
20809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20810ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20811
20812fi
20813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20814$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20815if test $ac_compiler_gnu = yes; then
20816  GXX=yes
20817else
20818  GXX=
20819fi
20820ac_test_CXXFLAGS=${CXXFLAGS+set}
20821ac_save_CXXFLAGS=$CXXFLAGS
20822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20823$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20824if ${ac_cv_prog_cxx_g+:} false; then :
20825  $as_echo_n "(cached) " >&6
20826else
20827  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20828   ac_cxx_werror_flag=yes
20829   ac_cv_prog_cxx_g=no
20830   CXXFLAGS="-g"
20831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20832/* end confdefs.h.  */
20833
20834int
20835main ()
20836{
20837
20838  ;
20839  return 0;
20840}
20841_ACEOF
20842if ac_fn_cxx_try_compile "$LINENO"; then :
20843  ac_cv_prog_cxx_g=yes
20844else
20845  CXXFLAGS=""
20846      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20847/* end confdefs.h.  */
20848
20849int
20850main ()
20851{
20852
20853  ;
20854  return 0;
20855}
20856_ACEOF
20857if ac_fn_cxx_try_compile "$LINENO"; then :
20858
20859else
20860  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20861	 CXXFLAGS="-g"
20862	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20863/* end confdefs.h.  */
20864
20865int
20866main ()
20867{
20868
20869  ;
20870  return 0;
20871}
20872_ACEOF
20873if ac_fn_cxx_try_compile "$LINENO"; then :
20874  ac_cv_prog_cxx_g=yes
20875fi
20876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20877fi
20878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20879fi
20880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20881   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20882fi
20883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20884$as_echo "$ac_cv_prog_cxx_g" >&6; }
20885if test "$ac_test_CXXFLAGS" = set; then
20886  CXXFLAGS=$ac_save_CXXFLAGS
20887elif test $ac_cv_prog_cxx_g = yes; then
20888  if test "$GXX" = yes; then
20889    CXXFLAGS="-g -O2"
20890  else
20891    CXXFLAGS="-g"
20892  fi
20893else
20894  if test "$GXX" = yes; then
20895    CXXFLAGS="-O2"
20896  else
20897    CXXFLAGS=
20898  fi
20899fi
20900ac_ext=cpp
20901ac_cpp='$CXXCPP $CPPFLAGS'
20902ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20903ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20904ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20905
20906
20907### Locate other tools
20908
20909if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20910    ac_ext=m
20911ac_cpp='$OBJCPP $CPPFLAGS'
20912ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20913ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20914ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20915if test -n "$ac_tool_prefix"; then
20916  for ac_prog in gcc objcc objc cc CC
20917  do
20918    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20919set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20921$as_echo_n "checking for $ac_word... " >&6; }
20922if ${ac_cv_prog_OBJC+:} false; then :
20923  $as_echo_n "(cached) " >&6
20924else
20925  if test -n "$OBJC"; then
20926  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20927else
20928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20929for as_dir in $PATH
20930do
20931  IFS=$as_save_IFS
20932  test -z "$as_dir" && as_dir=.
20933    for ac_exec_ext in '' $ac_executable_extensions; do
20934  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20935    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20937    break 2
20938  fi
20939done
20940  done
20941IFS=$as_save_IFS
20942
20943fi
20944fi
20945OBJC=$ac_cv_prog_OBJC
20946if test -n "$OBJC"; then
20947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20948$as_echo "$OBJC" >&6; }
20949else
20950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20951$as_echo "no" >&6; }
20952fi
20953
20954
20955    test -n "$OBJC" && break
20956  done
20957fi
20958if test -z "$OBJC"; then
20959  ac_ct_OBJC=$OBJC
20960  for ac_prog in gcc objcc objc cc CC
20961do
20962  # Extract the first word of "$ac_prog", so it can be a program name with args.
20963set dummy $ac_prog; ac_word=$2
20964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20965$as_echo_n "checking for $ac_word... " >&6; }
20966if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
20967  $as_echo_n "(cached) " >&6
20968else
20969  if test -n "$ac_ct_OBJC"; then
20970  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20971else
20972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20973for as_dir in $PATH
20974do
20975  IFS=$as_save_IFS
20976  test -z "$as_dir" && as_dir=.
20977    for ac_exec_ext in '' $ac_executable_extensions; do
20978  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20979    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20981    break 2
20982  fi
20983done
20984  done
20985IFS=$as_save_IFS
20986
20987fi
20988fi
20989ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20990if test -n "$ac_ct_OBJC"; then
20991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20992$as_echo "$ac_ct_OBJC" >&6; }
20993else
20994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20995$as_echo "no" >&6; }
20996fi
20997
20998
20999  test -n "$ac_ct_OBJC" && break
21000done
21001
21002  if test "x$ac_ct_OBJC" = x; then
21003    OBJC="gcc"
21004  else
21005    case $cross_compiling:$ac_tool_warned in
21006yes:)
21007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21009ac_tool_warned=yes ;;
21010esac
21011    OBJC=$ac_ct_OBJC
21012  fi
21013fi
21014
21015# Provide some information about the compiler.
21016$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21017set X $ac_compile
21018ac_compiler=$2
21019for ac_option in --version -v -V -qversion; do
21020  { { ac_try="$ac_compiler $ac_option >&5"
21021case "(($ac_try" in
21022  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21023  *) ac_try_echo=$ac_try;;
21024esac
21025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21026$as_echo "$ac_try_echo"; } >&5
21027  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21028  ac_status=$?
21029  if test -s conftest.err; then
21030    sed '10a\
21031... rest of stderr output deleted ...
21032         10q' conftest.err >conftest.er1
21033    cat conftest.er1 >&5
21034  fi
21035  rm -f conftest.er1 conftest.err
21036  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21037  test $ac_status = 0; }
21038done
21039
21040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21041$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21042if ${ac_cv_objc_compiler_gnu+:} false; then :
21043  $as_echo_n "(cached) " >&6
21044else
21045  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21046/* end confdefs.h.  */
21047
21048int
21049main ()
21050{
21051#ifndef __GNUC__
21052       choke me
21053#endif
21054
21055  ;
21056  return 0;
21057}
21058_ACEOF
21059if ac_fn_objc_try_compile "$LINENO"; then :
21060  ac_compiler_gnu=yes
21061else
21062  ac_compiler_gnu=no
21063fi
21064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21065ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21066
21067fi
21068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21069$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21070if test $ac_compiler_gnu = yes; then
21071  GOBJC=yes
21072else
21073  GOBJC=
21074fi
21075ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21076ac_save_OBJCFLAGS=$OBJCFLAGS
21077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21078$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21079if ${ac_cv_prog_objc_g+:} false; then :
21080  $as_echo_n "(cached) " >&6
21081else
21082  ac_save_objc_werror_flag=$ac_objc_werror_flag
21083   ac_objc_werror_flag=yes
21084   ac_cv_prog_objc_g=no
21085   OBJCFLAGS="-g"
21086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21087/* end confdefs.h.  */
21088
21089int
21090main ()
21091{
21092
21093  ;
21094  return 0;
21095}
21096_ACEOF
21097if ac_fn_objc_try_compile "$LINENO"; then :
21098  ac_cv_prog_objc_g=yes
21099else
21100  OBJCFLAGS=""
21101      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21102/* end confdefs.h.  */
21103
21104int
21105main ()
21106{
21107
21108  ;
21109  return 0;
21110}
21111_ACEOF
21112if ac_fn_objc_try_compile "$LINENO"; then :
21113
21114else
21115  ac_objc_werror_flag=$ac_save_objc_werror_flag
21116	 OBJCFLAGS="-g"
21117	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21118/* end confdefs.h.  */
21119
21120int
21121main ()
21122{
21123
21124  ;
21125  return 0;
21126}
21127_ACEOF
21128if ac_fn_objc_try_compile "$LINENO"; then :
21129  ac_cv_prog_objc_g=yes
21130fi
21131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21132fi
21133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21134fi
21135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21136   ac_objc_werror_flag=$ac_save_objc_werror_flag
21137fi
21138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21139$as_echo "$ac_cv_prog_objc_g" >&6; }
21140if test "$ac_test_OBJCFLAGS" = set; then
21141  OBJCFLAGS=$ac_save_OBJCFLAGS
21142elif test $ac_cv_prog_objc_g = yes; then
21143  if test "$GOBJC" = yes; then
21144    OBJCFLAGS="-g -O2"
21145  else
21146    OBJCFLAGS="-g"
21147  fi
21148else
21149  if test "$GOBJC" = yes; then
21150    OBJCFLAGS="-O2"
21151  else
21152    OBJCFLAGS=
21153  fi
21154fi
21155ac_ext=cpp
21156ac_cpp='$CXXCPP $CPPFLAGS'
21157ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21158ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21159ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21160
21161
21162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21163
21164  # First separate the path from the arguments. This will split at the first
21165  # space.
21166  complete="$OBJC"
21167  path="${complete%% *}"
21168  tmp="$complete EOL"
21169  arguments="${tmp#* }"
21170
21171  # Input might be given as Windows format, start by converting to
21172  # unix format.
21173  new_path=`$CYGPATH -u "$path"`
21174
21175  # Now try to locate executable using which
21176  new_path=`$WHICH "$new_path" 2> /dev/null`
21177  # bat and cmd files are not always considered executable in cygwin causing which
21178  # to not find them
21179  if test "x$new_path" = x \
21180           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21181           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21182    new_path=`$CYGPATH -u "$path"`
21183  fi
21184  if test "x$new_path" = x; then
21185    # Oops. Which didn't find the executable.
21186    # The splitting of arguments from the executable at a space might have been incorrect,
21187    # since paths with space are more likely in Windows. Give it another try with the whole
21188    # argument.
21189    path="$complete"
21190    arguments="EOL"
21191    new_path=`$CYGPATH -u "$path"`
21192    new_path=`$WHICH "$new_path" 2> /dev/null`
21193    # bat and cmd files are not always considered executable in cygwin causing which
21194    # to not find them
21195    if test "x$new_path" = x \
21196             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21197             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21198      new_path=`$CYGPATH -u "$path"`
21199    fi
21200    if test "x$new_path" = x; then
21201      # It's still not found. Now this is an unrecoverable error.
21202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21203$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21204      has_space=`$ECHO "$complete" | $GREP " "`
21205      if test "x$has_space" != x; then
21206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21208      fi
21209      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21210    fi
21211  fi
21212
21213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21216  # "foo.exe" is OK but "foo" is an error.
21217  #
21218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21219  # It is also a way to make sure we got the proper file name for the real test later on.
21220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21221  if test "x$test_shortpath" = x; then
21222    # Short path failed, file does not exist as specified.
21223    # Try adding .exe or .cmd
21224    if test -f "${new_path}.exe"; then
21225       input_to_shortpath="${new_path}.exe"
21226    elif test -f "${new_path}.cmd"; then
21227       input_to_shortpath="${new_path}.cmd"
21228    else
21229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21230$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21231      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21232$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21233      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21234    fi
21235  else
21236    input_to_shortpath="$new_path"
21237  fi
21238
21239  # Call helper function which possibly converts this using DOS-style short mode.
21240  # If so, the updated path is stored in $new_path.
21241  new_path="$input_to_shortpath"
21242
21243  input_path="$input_to_shortpath"
21244  # Check if we need to convert this using DOS-style short mode. If the path
21245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21246  # take no chances and rewrite it.
21247  # Note: m4 eats our [], so we need to use [ and ] instead.
21248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21249  if test "x$has_forbidden_chars" != x; then
21250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21254      # Going to short mode and back again did indeed matter. Since short mode is
21255      # case insensitive, let's make it lowercase to improve readability.
21256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21257      # Now convert it back to Unix-stile (cygpath)
21258      input_path=`$CYGPATH -u "$shortmode_path"`
21259      new_path="$input_path"
21260    fi
21261  fi
21262
21263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21264  if test "x$test_cygdrive_prefix" = x; then
21265    # As a simple fix, exclude /usr/bin since it's not a real path.
21266    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21268      # a path prefixed by /cygdrive for fixpath to work.
21269      new_path="$CYGWIN_ROOT_PATH$input_path"
21270    fi
21271  fi
21272
21273  # remove trailing .exe if any
21274  new_path="${new_path/%.exe/}"
21275
21276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21277
21278  # First separate the path from the arguments. This will split at the first
21279  # space.
21280  complete="$OBJC"
21281  path="${complete%% *}"
21282  tmp="$complete EOL"
21283  arguments="${tmp#* }"
21284
21285  # Input might be given as Windows format, start by converting to
21286  # unix format.
21287  new_path="$path"
21288
21289  windows_path="$new_path"
21290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21291    unix_path=`$CYGPATH -u "$windows_path"`
21292    new_path="$unix_path"
21293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21295    new_path="$unix_path"
21296  fi
21297
21298
21299  # Now try to locate executable using which
21300  new_path=`$WHICH "$new_path" 2> /dev/null`
21301
21302  if test "x$new_path" = x; then
21303    # Oops. Which didn't find the executable.
21304    # The splitting of arguments from the executable at a space might have been incorrect,
21305    # since paths with space are more likely in Windows. Give it another try with the whole
21306    # argument.
21307    path="$complete"
21308    arguments="EOL"
21309    new_path="$path"
21310
21311  windows_path="$new_path"
21312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21313    unix_path=`$CYGPATH -u "$windows_path"`
21314    new_path="$unix_path"
21315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21317    new_path="$unix_path"
21318  fi
21319
21320
21321    new_path=`$WHICH "$new_path" 2> /dev/null`
21322
21323    if test "x$new_path" = x; then
21324      # It's still not found. Now this is an unrecoverable error.
21325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21326$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21327      has_space=`$ECHO "$complete" | $GREP " "`
21328      if test "x$has_space" != x; then
21329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21331      fi
21332      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21333    fi
21334  fi
21335
21336  # Now new_path has a complete unix path to the binary
21337  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21338    # Keep paths in /bin as-is, but remove trailing .exe if any
21339    new_path="${new_path/%.exe/}"
21340    # Do not save /bin paths to all_fixpath_prefixes!
21341  else
21342    # Not in mixed or Windows style, start by that.
21343    new_path=`cmd //c echo $new_path`
21344
21345  input_path="$new_path"
21346  # Check if we need to convert this using DOS-style short mode. If the path
21347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21348  # take no chances and rewrite it.
21349  # Note: m4 eats our [], so we need to use [ and ] instead.
21350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21351  if test "x$has_forbidden_chars" != x; then
21352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21354  fi
21355
21356    # Output is in $new_path
21357
21358  windows_path="$new_path"
21359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21360    unix_path=`$CYGPATH -u "$windows_path"`
21361    new_path="$unix_path"
21362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21364    new_path="$unix_path"
21365  fi
21366
21367    # remove trailing .exe if any
21368    new_path="${new_path/%.exe/}"
21369
21370    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21371    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21372  fi
21373
21374  else
21375    # We're on a posix platform. Hooray! :)
21376    # First separate the path from the arguments. This will split at the first
21377    # space.
21378    complete="$OBJC"
21379    path="${complete%% *}"
21380    tmp="$complete EOL"
21381    arguments="${tmp#* }"
21382
21383    # Cannot rely on the command "which" here since it doesn't always work.
21384    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21385    if test -z "$is_absolute_path"; then
21386      # Path to executable is not absolute. Find it.
21387      IFS_save="$IFS"
21388      IFS=:
21389      for p in $PATH; do
21390        if test -f "$p/$path" && test -x "$p/$path"; then
21391          new_path="$p/$path"
21392          break
21393        fi
21394      done
21395      IFS="$IFS_save"
21396    else
21397      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21398$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21399      new_path="$path"
21400    fi
21401
21402    if test "x$new_path" = x; then
21403        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21404$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21405        has_space=`$ECHO "$complete" | $GREP " "`
21406        if test "x$has_space" != x; then
21407          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21408$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21409        fi
21410        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21411      fi
21412  fi
21413
21414      # Now join together the path and the arguments once again
21415      if test "x$arguments" != xEOL; then
21416        new_complete="$new_path ${arguments% *}"
21417      else
21418        new_complete="$new_path"
21419      fi
21420
21421  if test "x$complete" != "x$new_complete"; then
21422      OBJC="$new_complete"
21423      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21424$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21425    fi
21426
21427else
21428    OBJC=
21429fi
21430
21431# Restore the flags to the user specified values.
21432# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21433CFLAGS="$ORG_CFLAGS"
21434CXXFLAGS="$ORG_CXXFLAGS"
21435OBJCFLAGS="$ORG_OBJCFLAGS"
21436
21437LD="$CC"
21438LDEXE="$CC"
21439LDCXX="$CXX"
21440LDEXECXX="$CXX"
21441
21442# LDEXE is the linker to use, when creating executables.
21443
21444# Linking C++ libraries.
21445
21446# Linking C++ executables.
21447
21448
21449if test "x$OPENJDK_TARGET_OS" != xwindows; then
21450    if test -n "$ac_tool_prefix"; then
21451  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21452set dummy ${ac_tool_prefix}ar; ac_word=$2
21453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21454$as_echo_n "checking for $ac_word... " >&6; }
21455if ${ac_cv_prog_AR+:} false; then :
21456  $as_echo_n "(cached) " >&6
21457else
21458  if test -n "$AR"; then
21459  ac_cv_prog_AR="$AR" # Let the user override the test.
21460else
21461as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21462for as_dir in $PATH
21463do
21464  IFS=$as_save_IFS
21465  test -z "$as_dir" && as_dir=.
21466    for ac_exec_ext in '' $ac_executable_extensions; do
21467  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21468    ac_cv_prog_AR="${ac_tool_prefix}ar"
21469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21470    break 2
21471  fi
21472done
21473  done
21474IFS=$as_save_IFS
21475
21476fi
21477fi
21478AR=$ac_cv_prog_AR
21479if test -n "$AR"; then
21480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21481$as_echo "$AR" >&6; }
21482else
21483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21484$as_echo "no" >&6; }
21485fi
21486
21487
21488fi
21489if test -z "$ac_cv_prog_AR"; then
21490  ac_ct_AR=$AR
21491  # Extract the first word of "ar", so it can be a program name with args.
21492set dummy ar; ac_word=$2
21493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21494$as_echo_n "checking for $ac_word... " >&6; }
21495if ${ac_cv_prog_ac_ct_AR+:} false; then :
21496  $as_echo_n "(cached) " >&6
21497else
21498  if test -n "$ac_ct_AR"; then
21499  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21500else
21501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21502for as_dir in $PATH
21503do
21504  IFS=$as_save_IFS
21505  test -z "$as_dir" && as_dir=.
21506    for ac_exec_ext in '' $ac_executable_extensions; do
21507  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21508    ac_cv_prog_ac_ct_AR="ar"
21509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21510    break 2
21511  fi
21512done
21513  done
21514IFS=$as_save_IFS
21515
21516fi
21517fi
21518ac_ct_AR=$ac_cv_prog_ac_ct_AR
21519if test -n "$ac_ct_AR"; then
21520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21521$as_echo "$ac_ct_AR" >&6; }
21522else
21523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21524$as_echo "no" >&6; }
21525fi
21526
21527  if test "x$ac_ct_AR" = x; then
21528    AR=""
21529  else
21530    case $cross_compiling:$ac_tool_warned in
21531yes:)
21532{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21533$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21534ac_tool_warned=yes ;;
21535esac
21536    AR=$ac_ct_AR
21537  fi
21538else
21539  AR="$ac_cv_prog_AR"
21540fi
21541
21542
21543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21544
21545  # First separate the path from the arguments. This will split at the first
21546  # space.
21547  complete="$AR"
21548  path="${complete%% *}"
21549  tmp="$complete EOL"
21550  arguments="${tmp#* }"
21551
21552  # Input might be given as Windows format, start by converting to
21553  # unix format.
21554  new_path=`$CYGPATH -u "$path"`
21555
21556  # Now try to locate executable using which
21557  new_path=`$WHICH "$new_path" 2> /dev/null`
21558  # bat and cmd files are not always considered executable in cygwin causing which
21559  # to not find them
21560  if test "x$new_path" = x \
21561           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21562           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21563    new_path=`$CYGPATH -u "$path"`
21564  fi
21565  if test "x$new_path" = x; then
21566    # Oops. Which didn't find the executable.
21567    # The splitting of arguments from the executable at a space might have been incorrect,
21568    # since paths with space are more likely in Windows. Give it another try with the whole
21569    # argument.
21570    path="$complete"
21571    arguments="EOL"
21572    new_path=`$CYGPATH -u "$path"`
21573    new_path=`$WHICH "$new_path" 2> /dev/null`
21574    # bat and cmd files are not always considered executable in cygwin causing which
21575    # to not find them
21576    if test "x$new_path" = x \
21577             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21578             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21579      new_path=`$CYGPATH -u "$path"`
21580    fi
21581    if test "x$new_path" = x; then
21582      # It's still not found. Now this is an unrecoverable error.
21583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21584$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21585      has_space=`$ECHO "$complete" | $GREP " "`
21586      if test "x$has_space" != x; then
21587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21589      fi
21590      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21591    fi
21592  fi
21593
21594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21597  # "foo.exe" is OK but "foo" is an error.
21598  #
21599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21600  # It is also a way to make sure we got the proper file name for the real test later on.
21601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21602  if test "x$test_shortpath" = x; then
21603    # Short path failed, file does not exist as specified.
21604    # Try adding .exe or .cmd
21605    if test -f "${new_path}.exe"; then
21606       input_to_shortpath="${new_path}.exe"
21607    elif test -f "${new_path}.cmd"; then
21608       input_to_shortpath="${new_path}.cmd"
21609    else
21610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21611$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21612      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21613$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21614      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21615    fi
21616  else
21617    input_to_shortpath="$new_path"
21618  fi
21619
21620  # Call helper function which possibly converts this using DOS-style short mode.
21621  # If so, the updated path is stored in $new_path.
21622  new_path="$input_to_shortpath"
21623
21624  input_path="$input_to_shortpath"
21625  # Check if we need to convert this using DOS-style short mode. If the path
21626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21627  # take no chances and rewrite it.
21628  # Note: m4 eats our [], so we need to use [ and ] instead.
21629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21630  if test "x$has_forbidden_chars" != x; then
21631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21635      # Going to short mode and back again did indeed matter. Since short mode is
21636      # case insensitive, let's make it lowercase to improve readability.
21637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21638      # Now convert it back to Unix-stile (cygpath)
21639      input_path=`$CYGPATH -u "$shortmode_path"`
21640      new_path="$input_path"
21641    fi
21642  fi
21643
21644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21645  if test "x$test_cygdrive_prefix" = x; then
21646    # As a simple fix, exclude /usr/bin since it's not a real path.
21647    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21649      # a path prefixed by /cygdrive for fixpath to work.
21650      new_path="$CYGWIN_ROOT_PATH$input_path"
21651    fi
21652  fi
21653
21654  # remove trailing .exe if any
21655  new_path="${new_path/%.exe/}"
21656
21657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21658
21659  # First separate the path from the arguments. This will split at the first
21660  # space.
21661  complete="$AR"
21662  path="${complete%% *}"
21663  tmp="$complete EOL"
21664  arguments="${tmp#* }"
21665
21666  # Input might be given as Windows format, start by converting to
21667  # unix format.
21668  new_path="$path"
21669
21670  windows_path="$new_path"
21671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21672    unix_path=`$CYGPATH -u "$windows_path"`
21673    new_path="$unix_path"
21674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21676    new_path="$unix_path"
21677  fi
21678
21679
21680  # Now try to locate executable using which
21681  new_path=`$WHICH "$new_path" 2> /dev/null`
21682
21683  if test "x$new_path" = x; then
21684    # Oops. Which didn't find the executable.
21685    # The splitting of arguments from the executable at a space might have been incorrect,
21686    # since paths with space are more likely in Windows. Give it another try with the whole
21687    # argument.
21688    path="$complete"
21689    arguments="EOL"
21690    new_path="$path"
21691
21692  windows_path="$new_path"
21693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21694    unix_path=`$CYGPATH -u "$windows_path"`
21695    new_path="$unix_path"
21696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21698    new_path="$unix_path"
21699  fi
21700
21701
21702    new_path=`$WHICH "$new_path" 2> /dev/null`
21703
21704    if test "x$new_path" = x; then
21705      # It's still not found. Now this is an unrecoverable error.
21706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21707$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21708      has_space=`$ECHO "$complete" | $GREP " "`
21709      if test "x$has_space" != x; then
21710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21712      fi
21713      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21714    fi
21715  fi
21716
21717  # Now new_path has a complete unix path to the binary
21718  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21719    # Keep paths in /bin as-is, but remove trailing .exe if any
21720    new_path="${new_path/%.exe/}"
21721    # Do not save /bin paths to all_fixpath_prefixes!
21722  else
21723    # Not in mixed or Windows style, start by that.
21724    new_path=`cmd //c echo $new_path`
21725
21726  input_path="$new_path"
21727  # Check if we need to convert this using DOS-style short mode. If the path
21728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21729  # take no chances and rewrite it.
21730  # Note: m4 eats our [], so we need to use [ and ] instead.
21731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21732  if test "x$has_forbidden_chars" != x; then
21733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21735  fi
21736
21737    # Output is in $new_path
21738
21739  windows_path="$new_path"
21740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21741    unix_path=`$CYGPATH -u "$windows_path"`
21742    new_path="$unix_path"
21743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21745    new_path="$unix_path"
21746  fi
21747
21748    # remove trailing .exe if any
21749    new_path="${new_path/%.exe/}"
21750
21751    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21752    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21753  fi
21754
21755  else
21756    # We're on a posix platform. Hooray! :)
21757    # First separate the path from the arguments. This will split at the first
21758    # space.
21759    complete="$AR"
21760    path="${complete%% *}"
21761    tmp="$complete EOL"
21762    arguments="${tmp#* }"
21763
21764    # Cannot rely on the command "which" here since it doesn't always work.
21765    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21766    if test -z "$is_absolute_path"; then
21767      # Path to executable is not absolute. Find it.
21768      IFS_save="$IFS"
21769      IFS=:
21770      for p in $PATH; do
21771        if test -f "$p/$path" && test -x "$p/$path"; then
21772          new_path="$p/$path"
21773          break
21774        fi
21775      done
21776      IFS="$IFS_save"
21777    else
21778      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21779$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21780      new_path="$path"
21781    fi
21782
21783    if test "x$new_path" = x; then
21784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21785$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21786        has_space=`$ECHO "$complete" | $GREP " "`
21787        if test "x$has_space" != x; then
21788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21790        fi
21791        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21792      fi
21793  fi
21794
21795      # Now join together the path and the arguments once again
21796      if test "x$arguments" != xEOL; then
21797        new_complete="$new_path ${arguments% *}"
21798      else
21799        new_complete="$new_path"
21800      fi
21801
21802  if test "x$complete" != "x$new_complete"; then
21803      AR="$new_complete"
21804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21805$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21806    fi
21807
21808fi
21809if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21810    ARFLAGS="-r"
21811else
21812    ARFLAGS=""
21813fi
21814
21815
21816# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21817HOTSPOT_CXX="$CXX"
21818HOTSPOT_LD="$LD"
21819
21820
21821
21822COMPILER_NAME=gcc
21823COMPILER_TYPE=CC
21824if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21825
21826    # For now, assume that we are always compiling using cl.exe.
21827    CC_OUT_OPTION=-Fo
21828    EXE_OUT_OPTION=-out:
21829    LD_OUT_OPTION=-out:
21830    AR_OUT_OPTION=-out:
21831    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21832    # program for something completely different.
21833    # Extract the first word of "link", so it can be a program name with args.
21834set dummy link; ac_word=$2
21835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21836$as_echo_n "checking for $ac_word... " >&6; }
21837if ${ac_cv_prog_WINLD+:} false; then :
21838  $as_echo_n "(cached) " >&6
21839else
21840  if test -n "$WINLD"; then
21841  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21842else
21843  ac_prog_rejected=no
21844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21845for as_dir in $PATH
21846do
21847  IFS=$as_save_IFS
21848  test -z "$as_dir" && as_dir=.
21849    for ac_exec_ext in '' $ac_executable_extensions; do
21850  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21851    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21852       ac_prog_rejected=yes
21853       continue
21854     fi
21855    ac_cv_prog_WINLD="link"
21856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21857    break 2
21858  fi
21859done
21860  done
21861IFS=$as_save_IFS
21862
21863if test $ac_prog_rejected = yes; then
21864  # We found a bogon in the path, so make sure we never use it.
21865  set dummy $ac_cv_prog_WINLD
21866  shift
21867  if test $# != 0; then
21868    # We chose a different compiler from the bogus one.
21869    # However, it has the same basename, so the bogon will be chosen
21870    # first if we set WINLD to just the basename; use the full file name.
21871    shift
21872    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21873  fi
21874fi
21875fi
21876fi
21877WINLD=$ac_cv_prog_WINLD
21878if test -n "$WINLD"; then
21879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21880$as_echo "$WINLD" >&6; }
21881else
21882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21883$as_echo "no" >&6; }
21884fi
21885
21886
21887    # Since we must ignore the first found link, WINLD will contain
21888    # the full path to the link.exe program.
21889
21890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21891
21892  # First separate the path from the arguments. This will split at the first
21893  # space.
21894  complete="$WINLD"
21895  path="${complete%% *}"
21896  tmp="$complete EOL"
21897  arguments="${tmp#* }"
21898
21899  # Input might be given as Windows format, start by converting to
21900  # unix format.
21901  new_path=`$CYGPATH -u "$path"`
21902
21903  # Now try to locate executable using which
21904  new_path=`$WHICH "$new_path" 2> /dev/null`
21905  # bat and cmd files are not always considered executable in cygwin causing which
21906  # to not find them
21907  if test "x$new_path" = x \
21908           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21909           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21910    new_path=`$CYGPATH -u "$path"`
21911  fi
21912  if test "x$new_path" = x; then
21913    # Oops. Which didn't find the executable.
21914    # The splitting of arguments from the executable at a space might have been incorrect,
21915    # since paths with space are more likely in Windows. Give it another try with the whole
21916    # argument.
21917    path="$complete"
21918    arguments="EOL"
21919    new_path=`$CYGPATH -u "$path"`
21920    new_path=`$WHICH "$new_path" 2> /dev/null`
21921    # bat and cmd files are not always considered executable in cygwin causing which
21922    # to not find them
21923    if test "x$new_path" = x \
21924             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21925             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21926      new_path=`$CYGPATH -u "$path"`
21927    fi
21928    if test "x$new_path" = x; then
21929      # It's still not found. Now this is an unrecoverable error.
21930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21931$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21932      has_space=`$ECHO "$complete" | $GREP " "`
21933      if test "x$has_space" != x; then
21934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21936      fi
21937      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21938    fi
21939  fi
21940
21941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21944  # "foo.exe" is OK but "foo" is an error.
21945  #
21946  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21947  # It is also a way to make sure we got the proper file name for the real test later on.
21948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21949  if test "x$test_shortpath" = x; then
21950    # Short path failed, file does not exist as specified.
21951    # Try adding .exe or .cmd
21952    if test -f "${new_path}.exe"; then
21953       input_to_shortpath="${new_path}.exe"
21954    elif test -f "${new_path}.cmd"; then
21955       input_to_shortpath="${new_path}.cmd"
21956    else
21957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21958$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21959      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21960$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21961      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21962    fi
21963  else
21964    input_to_shortpath="$new_path"
21965  fi
21966
21967  # Call helper function which possibly converts this using DOS-style short mode.
21968  # If so, the updated path is stored in $new_path.
21969  new_path="$input_to_shortpath"
21970
21971  input_path="$input_to_shortpath"
21972  # Check if we need to convert this using DOS-style short mode. If the path
21973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21974  # take no chances and rewrite it.
21975  # Note: m4 eats our [], so we need to use [ and ] instead.
21976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21977  if test "x$has_forbidden_chars" != x; then
21978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21982      # Going to short mode and back again did indeed matter. Since short mode is
21983      # case insensitive, let's make it lowercase to improve readability.
21984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21985      # Now convert it back to Unix-stile (cygpath)
21986      input_path=`$CYGPATH -u "$shortmode_path"`
21987      new_path="$input_path"
21988    fi
21989  fi
21990
21991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21992  if test "x$test_cygdrive_prefix" = x; then
21993    # As a simple fix, exclude /usr/bin since it's not a real path.
21994    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21996      # a path prefixed by /cygdrive for fixpath to work.
21997      new_path="$CYGWIN_ROOT_PATH$input_path"
21998    fi
21999  fi
22000
22001  # remove trailing .exe if any
22002  new_path="${new_path/%.exe/}"
22003
22004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22005
22006  # First separate the path from the arguments. This will split at the first
22007  # space.
22008  complete="$WINLD"
22009  path="${complete%% *}"
22010  tmp="$complete EOL"
22011  arguments="${tmp#* }"
22012
22013  # Input might be given as Windows format, start by converting to
22014  # unix format.
22015  new_path="$path"
22016
22017  windows_path="$new_path"
22018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22019    unix_path=`$CYGPATH -u "$windows_path"`
22020    new_path="$unix_path"
22021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22023    new_path="$unix_path"
22024  fi
22025
22026
22027  # Now try to locate executable using which
22028  new_path=`$WHICH "$new_path" 2> /dev/null`
22029
22030  if test "x$new_path" = x; then
22031    # Oops. Which didn't find the executable.
22032    # The splitting of arguments from the executable at a space might have been incorrect,
22033    # since paths with space are more likely in Windows. Give it another try with the whole
22034    # argument.
22035    path="$complete"
22036    arguments="EOL"
22037    new_path="$path"
22038
22039  windows_path="$new_path"
22040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22041    unix_path=`$CYGPATH -u "$windows_path"`
22042    new_path="$unix_path"
22043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22045    new_path="$unix_path"
22046  fi
22047
22048
22049    new_path=`$WHICH "$new_path" 2> /dev/null`
22050
22051    if test "x$new_path" = x; then
22052      # It's still not found. Now this is an unrecoverable error.
22053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22054$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22055      has_space=`$ECHO "$complete" | $GREP " "`
22056      if test "x$has_space" != x; then
22057        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22059      fi
22060      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22061    fi
22062  fi
22063
22064  # Now new_path has a complete unix path to the binary
22065  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22066    # Keep paths in /bin as-is, but remove trailing .exe if any
22067    new_path="${new_path/%.exe/}"
22068    # Do not save /bin paths to all_fixpath_prefixes!
22069  else
22070    # Not in mixed or Windows style, start by that.
22071    new_path=`cmd //c echo $new_path`
22072
22073  input_path="$new_path"
22074  # Check if we need to convert this using DOS-style short mode. If the path
22075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22076  # take no chances and rewrite it.
22077  # Note: m4 eats our [], so we need to use [ and ] instead.
22078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22079  if test "x$has_forbidden_chars" != x; then
22080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22082  fi
22083
22084    # Output is in $new_path
22085
22086  windows_path="$new_path"
22087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22088    unix_path=`$CYGPATH -u "$windows_path"`
22089    new_path="$unix_path"
22090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22092    new_path="$unix_path"
22093  fi
22094
22095    # remove trailing .exe if any
22096    new_path="${new_path/%.exe/}"
22097
22098    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22099    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22100  fi
22101
22102  else
22103    # We're on a posix platform. Hooray! :)
22104    # First separate the path from the arguments. This will split at the first
22105    # space.
22106    complete="$WINLD"
22107    path="${complete%% *}"
22108    tmp="$complete EOL"
22109    arguments="${tmp#* }"
22110
22111    # Cannot rely on the command "which" here since it doesn't always work.
22112    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22113    if test -z "$is_absolute_path"; then
22114      # Path to executable is not absolute. Find it.
22115      IFS_save="$IFS"
22116      IFS=:
22117      for p in $PATH; do
22118        if test -f "$p/$path" && test -x "$p/$path"; then
22119          new_path="$p/$path"
22120          break
22121        fi
22122      done
22123      IFS="$IFS_save"
22124    else
22125      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22126$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22127      new_path="$path"
22128    fi
22129
22130    if test "x$new_path" = x; then
22131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22132$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22133        has_space=`$ECHO "$complete" | $GREP " "`
22134        if test "x$has_space" != x; then
22135          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22136$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22137        fi
22138        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22139      fi
22140  fi
22141
22142      # Now join together the path and the arguments once again
22143      if test "x$arguments" != xEOL; then
22144        new_complete="$new_path ${arguments% *}"
22145      else
22146        new_complete="$new_path"
22147      fi
22148
22149  if test "x$complete" != "x$new_complete"; then
22150      WINLD="$new_complete"
22151      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22152$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22153    fi
22154
22155    printf "Windows linker was found at $WINLD\n"
22156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22157$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22158    "$WINLD" --version > /dev/null
22159    if test $? -eq 0 ; then
22160      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22161$as_echo "no" >&6; }
22162      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22163    else
22164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22165$as_echo "yes" >&6; }
22166    fi
22167    LD="$WINLD"
22168    LDEXE="$WINLD"
22169    LDCXX="$WINLD"
22170    LDEXECXX="$WINLD"
22171
22172    # Extract the first word of "mt", so it can be a program name with args.
22173set dummy mt; ac_word=$2
22174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22175$as_echo_n "checking for $ac_word... " >&6; }
22176if ${ac_cv_prog_MT+:} false; then :
22177  $as_echo_n "(cached) " >&6
22178else
22179  if test -n "$MT"; then
22180  ac_cv_prog_MT="$MT" # Let the user override the test.
22181else
22182  ac_prog_rejected=no
22183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22184for as_dir in $PATH
22185do
22186  IFS=$as_save_IFS
22187  test -z "$as_dir" && as_dir=.
22188    for ac_exec_ext in '' $ac_executable_extensions; do
22189  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22190    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22191       ac_prog_rejected=yes
22192       continue
22193     fi
22194    ac_cv_prog_MT="mt"
22195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22196    break 2
22197  fi
22198done
22199  done
22200IFS=$as_save_IFS
22201
22202if test $ac_prog_rejected = yes; then
22203  # We found a bogon in the path, so make sure we never use it.
22204  set dummy $ac_cv_prog_MT
22205  shift
22206  if test $# != 0; then
22207    # We chose a different compiler from the bogus one.
22208    # However, it has the same basename, so the bogon will be chosen
22209    # first if we set MT to just the basename; use the full file name.
22210    shift
22211    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22212  fi
22213fi
22214fi
22215fi
22216MT=$ac_cv_prog_MT
22217if test -n "$MT"; then
22218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22219$as_echo "$MT" >&6; }
22220else
22221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22222$as_echo "no" >&6; }
22223fi
22224
22225
22226
22227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22228
22229  # First separate the path from the arguments. This will split at the first
22230  # space.
22231  complete="$MT"
22232  path="${complete%% *}"
22233  tmp="$complete EOL"
22234  arguments="${tmp#* }"
22235
22236  # Input might be given as Windows format, start by converting to
22237  # unix format.
22238  new_path=`$CYGPATH -u "$path"`
22239
22240  # Now try to locate executable using which
22241  new_path=`$WHICH "$new_path" 2> /dev/null`
22242  # bat and cmd files are not always considered executable in cygwin causing which
22243  # to not find them
22244  if test "x$new_path" = x \
22245           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22246           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22247    new_path=`$CYGPATH -u "$path"`
22248  fi
22249  if test "x$new_path" = x; then
22250    # Oops. Which didn't find the executable.
22251    # The splitting of arguments from the executable at a space might have been incorrect,
22252    # since paths with space are more likely in Windows. Give it another try with the whole
22253    # argument.
22254    path="$complete"
22255    arguments="EOL"
22256    new_path=`$CYGPATH -u "$path"`
22257    new_path=`$WHICH "$new_path" 2> /dev/null`
22258    # bat and cmd files are not always considered executable in cygwin causing which
22259    # to not find them
22260    if test "x$new_path" = x \
22261             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22262             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22263      new_path=`$CYGPATH -u "$path"`
22264    fi
22265    if test "x$new_path" = x; then
22266      # It's still not found. Now this is an unrecoverable error.
22267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22268$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22269      has_space=`$ECHO "$complete" | $GREP " "`
22270      if test "x$has_space" != x; then
22271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22273      fi
22274      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22275    fi
22276  fi
22277
22278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22281  # "foo.exe" is OK but "foo" is an error.
22282  #
22283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22284  # It is also a way to make sure we got the proper file name for the real test later on.
22285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22286  if test "x$test_shortpath" = x; then
22287    # Short path failed, file does not exist as specified.
22288    # Try adding .exe or .cmd
22289    if test -f "${new_path}.exe"; then
22290       input_to_shortpath="${new_path}.exe"
22291    elif test -f "${new_path}.cmd"; then
22292       input_to_shortpath="${new_path}.cmd"
22293    else
22294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22295$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22298      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22299    fi
22300  else
22301    input_to_shortpath="$new_path"
22302  fi
22303
22304  # Call helper function which possibly converts this using DOS-style short mode.
22305  # If so, the updated path is stored in $new_path.
22306  new_path="$input_to_shortpath"
22307
22308  input_path="$input_to_shortpath"
22309  # Check if we need to convert this using DOS-style short mode. If the path
22310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22311  # take no chances and rewrite it.
22312  # Note: m4 eats our [], so we need to use [ and ] instead.
22313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22314  if test "x$has_forbidden_chars" != x; then
22315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22319      # Going to short mode and back again did indeed matter. Since short mode is
22320      # case insensitive, let's make it lowercase to improve readability.
22321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22322      # Now convert it back to Unix-stile (cygpath)
22323      input_path=`$CYGPATH -u "$shortmode_path"`
22324      new_path="$input_path"
22325    fi
22326  fi
22327
22328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22329  if test "x$test_cygdrive_prefix" = x; then
22330    # As a simple fix, exclude /usr/bin since it's not a real path.
22331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22333      # a path prefixed by /cygdrive for fixpath to work.
22334      new_path="$CYGWIN_ROOT_PATH$input_path"
22335    fi
22336  fi
22337
22338  # remove trailing .exe if any
22339  new_path="${new_path/%.exe/}"
22340
22341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22342
22343  # First separate the path from the arguments. This will split at the first
22344  # space.
22345  complete="$MT"
22346  path="${complete%% *}"
22347  tmp="$complete EOL"
22348  arguments="${tmp#* }"
22349
22350  # Input might be given as Windows format, start by converting to
22351  # unix format.
22352  new_path="$path"
22353
22354  windows_path="$new_path"
22355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22356    unix_path=`$CYGPATH -u "$windows_path"`
22357    new_path="$unix_path"
22358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22360    new_path="$unix_path"
22361  fi
22362
22363
22364  # Now try to locate executable using which
22365  new_path=`$WHICH "$new_path" 2> /dev/null`
22366
22367  if test "x$new_path" = x; then
22368    # Oops. Which didn't find the executable.
22369    # The splitting of arguments from the executable at a space might have been incorrect,
22370    # since paths with space are more likely in Windows. Give it another try with the whole
22371    # argument.
22372    path="$complete"
22373    arguments="EOL"
22374    new_path="$path"
22375
22376  windows_path="$new_path"
22377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22378    unix_path=`$CYGPATH -u "$windows_path"`
22379    new_path="$unix_path"
22380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22382    new_path="$unix_path"
22383  fi
22384
22385
22386    new_path=`$WHICH "$new_path" 2> /dev/null`
22387
22388    if test "x$new_path" = x; then
22389      # It's still not found. Now this is an unrecoverable error.
22390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22391$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22392      has_space=`$ECHO "$complete" | $GREP " "`
22393      if test "x$has_space" != x; then
22394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22396      fi
22397      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22398    fi
22399  fi
22400
22401  # Now new_path has a complete unix path to the binary
22402  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22403    # Keep paths in /bin as-is, but remove trailing .exe if any
22404    new_path="${new_path/%.exe/}"
22405    # Do not save /bin paths to all_fixpath_prefixes!
22406  else
22407    # Not in mixed or Windows style, start by that.
22408    new_path=`cmd //c echo $new_path`
22409
22410  input_path="$new_path"
22411  # Check if we need to convert this using DOS-style short mode. If the path
22412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22413  # take no chances and rewrite it.
22414  # Note: m4 eats our [], so we need to use [ and ] instead.
22415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22416  if test "x$has_forbidden_chars" != x; then
22417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22419  fi
22420
22421    # Output is in $new_path
22422
22423  windows_path="$new_path"
22424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22425    unix_path=`$CYGPATH -u "$windows_path"`
22426    new_path="$unix_path"
22427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22429    new_path="$unix_path"
22430  fi
22431
22432    # remove trailing .exe if any
22433    new_path="${new_path/%.exe/}"
22434
22435    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22436    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22437  fi
22438
22439  else
22440    # We're on a posix platform. Hooray! :)
22441    # First separate the path from the arguments. This will split at the first
22442    # space.
22443    complete="$MT"
22444    path="${complete%% *}"
22445    tmp="$complete EOL"
22446    arguments="${tmp#* }"
22447
22448    # Cannot rely on the command "which" here since it doesn't always work.
22449    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22450    if test -z "$is_absolute_path"; then
22451      # Path to executable is not absolute. Find it.
22452      IFS_save="$IFS"
22453      IFS=:
22454      for p in $PATH; do
22455        if test -f "$p/$path" && test -x "$p/$path"; then
22456          new_path="$p/$path"
22457          break
22458        fi
22459      done
22460      IFS="$IFS_save"
22461    else
22462      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22463$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22464      new_path="$path"
22465    fi
22466
22467    if test "x$new_path" = x; then
22468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22469$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22470        has_space=`$ECHO "$complete" | $GREP " "`
22471        if test "x$has_space" != x; then
22472          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22473$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22474        fi
22475        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22476      fi
22477  fi
22478
22479      # Now join together the path and the arguments once again
22480      if test "x$arguments" != xEOL; then
22481        new_complete="$new_path ${arguments% *}"
22482      else
22483        new_complete="$new_path"
22484      fi
22485
22486  if test "x$complete" != "x$new_complete"; then
22487      MT="$new_complete"
22488      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22489$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22490    fi
22491
22492    # The resource compiler
22493    # Extract the first word of "rc", so it can be a program name with args.
22494set dummy rc; ac_word=$2
22495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22496$as_echo_n "checking for $ac_word... " >&6; }
22497if ${ac_cv_prog_RC+:} false; then :
22498  $as_echo_n "(cached) " >&6
22499else
22500  if test -n "$RC"; then
22501  ac_cv_prog_RC="$RC" # Let the user override the test.
22502else
22503  ac_prog_rejected=no
22504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22505for as_dir in $PATH
22506do
22507  IFS=$as_save_IFS
22508  test -z "$as_dir" && as_dir=.
22509    for ac_exec_ext in '' $ac_executable_extensions; do
22510  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22511    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22512       ac_prog_rejected=yes
22513       continue
22514     fi
22515    ac_cv_prog_RC="rc"
22516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22517    break 2
22518  fi
22519done
22520  done
22521IFS=$as_save_IFS
22522
22523if test $ac_prog_rejected = yes; then
22524  # We found a bogon in the path, so make sure we never use it.
22525  set dummy $ac_cv_prog_RC
22526  shift
22527  if test $# != 0; then
22528    # We chose a different compiler from the bogus one.
22529    # However, it has the same basename, so the bogon will be chosen
22530    # first if we set RC to just the basename; use the full file name.
22531    shift
22532    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22533  fi
22534fi
22535fi
22536fi
22537RC=$ac_cv_prog_RC
22538if test -n "$RC"; then
22539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22540$as_echo "$RC" >&6; }
22541else
22542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22543$as_echo "no" >&6; }
22544fi
22545
22546
22547
22548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22549
22550  # First separate the path from the arguments. This will split at the first
22551  # space.
22552  complete="$RC"
22553  path="${complete%% *}"
22554  tmp="$complete EOL"
22555  arguments="${tmp#* }"
22556
22557  # Input might be given as Windows format, start by converting to
22558  # unix format.
22559  new_path=`$CYGPATH -u "$path"`
22560
22561  # Now try to locate executable using which
22562  new_path=`$WHICH "$new_path" 2> /dev/null`
22563  # bat and cmd files are not always considered executable in cygwin causing which
22564  # to not find them
22565  if test "x$new_path" = x \
22566           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22567           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22568    new_path=`$CYGPATH -u "$path"`
22569  fi
22570  if test "x$new_path" = x; then
22571    # Oops. Which didn't find the executable.
22572    # The splitting of arguments from the executable at a space might have been incorrect,
22573    # since paths with space are more likely in Windows. Give it another try with the whole
22574    # argument.
22575    path="$complete"
22576    arguments="EOL"
22577    new_path=`$CYGPATH -u "$path"`
22578    new_path=`$WHICH "$new_path" 2> /dev/null`
22579    # bat and cmd files are not always considered executable in cygwin causing which
22580    # to not find them
22581    if test "x$new_path" = x \
22582             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22583             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22584      new_path=`$CYGPATH -u "$path"`
22585    fi
22586    if test "x$new_path" = x; then
22587      # It's still not found. Now this is an unrecoverable error.
22588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22589$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22590      has_space=`$ECHO "$complete" | $GREP " "`
22591      if test "x$has_space" != x; then
22592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22594      fi
22595      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22596    fi
22597  fi
22598
22599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22602  # "foo.exe" is OK but "foo" is an error.
22603  #
22604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22605  # It is also a way to make sure we got the proper file name for the real test later on.
22606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22607  if test "x$test_shortpath" = x; then
22608    # Short path failed, file does not exist as specified.
22609    # Try adding .exe or .cmd
22610    if test -f "${new_path}.exe"; then
22611       input_to_shortpath="${new_path}.exe"
22612    elif test -f "${new_path}.cmd"; then
22613       input_to_shortpath="${new_path}.cmd"
22614    else
22615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22616$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22617      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22618$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22619      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22620    fi
22621  else
22622    input_to_shortpath="$new_path"
22623  fi
22624
22625  # Call helper function which possibly converts this using DOS-style short mode.
22626  # If so, the updated path is stored in $new_path.
22627  new_path="$input_to_shortpath"
22628
22629  input_path="$input_to_shortpath"
22630  # Check if we need to convert this using DOS-style short mode. If the path
22631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22632  # take no chances and rewrite it.
22633  # Note: m4 eats our [], so we need to use [ and ] instead.
22634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22635  if test "x$has_forbidden_chars" != x; then
22636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22640      # Going to short mode and back again did indeed matter. Since short mode is
22641      # case insensitive, let's make it lowercase to improve readability.
22642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22643      # Now convert it back to Unix-stile (cygpath)
22644      input_path=`$CYGPATH -u "$shortmode_path"`
22645      new_path="$input_path"
22646    fi
22647  fi
22648
22649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22650  if test "x$test_cygdrive_prefix" = x; then
22651    # As a simple fix, exclude /usr/bin since it's not a real path.
22652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22654      # a path prefixed by /cygdrive for fixpath to work.
22655      new_path="$CYGWIN_ROOT_PATH$input_path"
22656    fi
22657  fi
22658
22659  # remove trailing .exe if any
22660  new_path="${new_path/%.exe/}"
22661
22662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22663
22664  # First separate the path from the arguments. This will split at the first
22665  # space.
22666  complete="$RC"
22667  path="${complete%% *}"
22668  tmp="$complete EOL"
22669  arguments="${tmp#* }"
22670
22671  # Input might be given as Windows format, start by converting to
22672  # unix format.
22673  new_path="$path"
22674
22675  windows_path="$new_path"
22676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22677    unix_path=`$CYGPATH -u "$windows_path"`
22678    new_path="$unix_path"
22679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22681    new_path="$unix_path"
22682  fi
22683
22684
22685  # Now try to locate executable using which
22686  new_path=`$WHICH "$new_path" 2> /dev/null`
22687
22688  if test "x$new_path" = x; then
22689    # Oops. Which didn't find the executable.
22690    # The splitting of arguments from the executable at a space might have been incorrect,
22691    # since paths with space are more likely in Windows. Give it another try with the whole
22692    # argument.
22693    path="$complete"
22694    arguments="EOL"
22695    new_path="$path"
22696
22697  windows_path="$new_path"
22698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22699    unix_path=`$CYGPATH -u "$windows_path"`
22700    new_path="$unix_path"
22701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22703    new_path="$unix_path"
22704  fi
22705
22706
22707    new_path=`$WHICH "$new_path" 2> /dev/null`
22708
22709    if test "x$new_path" = x; then
22710      # It's still not found. Now this is an unrecoverable error.
22711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22712$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22713      has_space=`$ECHO "$complete" | $GREP " "`
22714      if test "x$has_space" != x; then
22715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22717      fi
22718      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22719    fi
22720  fi
22721
22722  # Now new_path has a complete unix path to the binary
22723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22724    # Keep paths in /bin as-is, but remove trailing .exe if any
22725    new_path="${new_path/%.exe/}"
22726    # Do not save /bin paths to all_fixpath_prefixes!
22727  else
22728    # Not in mixed or Windows style, start by that.
22729    new_path=`cmd //c echo $new_path`
22730
22731  input_path="$new_path"
22732  # Check if we need to convert this using DOS-style short mode. If the path
22733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22734  # take no chances and rewrite it.
22735  # Note: m4 eats our [], so we need to use [ and ] instead.
22736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22737  if test "x$has_forbidden_chars" != x; then
22738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22740  fi
22741
22742    # Output is in $new_path
22743
22744  windows_path="$new_path"
22745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22746    unix_path=`$CYGPATH -u "$windows_path"`
22747    new_path="$unix_path"
22748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22750    new_path="$unix_path"
22751  fi
22752
22753    # remove trailing .exe if any
22754    new_path="${new_path/%.exe/}"
22755
22756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22758  fi
22759
22760  else
22761    # We're on a posix platform. Hooray! :)
22762    # First separate the path from the arguments. This will split at the first
22763    # space.
22764    complete="$RC"
22765    path="${complete%% *}"
22766    tmp="$complete EOL"
22767    arguments="${tmp#* }"
22768
22769    # Cannot rely on the command "which" here since it doesn't always work.
22770    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22771    if test -z "$is_absolute_path"; then
22772      # Path to executable is not absolute. Find it.
22773      IFS_save="$IFS"
22774      IFS=:
22775      for p in $PATH; do
22776        if test -f "$p/$path" && test -x "$p/$path"; then
22777          new_path="$p/$path"
22778          break
22779        fi
22780      done
22781      IFS="$IFS_save"
22782    else
22783      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22784$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22785      new_path="$path"
22786    fi
22787
22788    if test "x$new_path" = x; then
22789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22790$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22791        has_space=`$ECHO "$complete" | $GREP " "`
22792        if test "x$has_space" != x; then
22793          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22795        fi
22796        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22797      fi
22798  fi
22799
22800      # Now join together the path and the arguments once again
22801      if test "x$arguments" != xEOL; then
22802        new_complete="$new_path ${arguments% *}"
22803      else
22804        new_complete="$new_path"
22805      fi
22806
22807  if test "x$complete" != "x$new_complete"; then
22808      RC="$new_complete"
22809      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22810$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22811    fi
22812
22813
22814    # For hotspot, we need these in Windows mixed path,
22815    # so rewrite them all. Need added .exe suffix.
22816    HOTSPOT_CXX="$CXX.exe"
22817    HOTSPOT_LD="$LD.exe"
22818    HOTSPOT_MT="$MT.exe"
22819    HOTSPOT_RC="$RC.exe"
22820
22821  unix_path="$HOTSPOT_CXX"
22822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22823    windows_path=`$CYGPATH -m "$unix_path"`
22824    HOTSPOT_CXX="$windows_path"
22825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22826    windows_path=`cmd //c echo $unix_path`
22827    HOTSPOT_CXX="$windows_path"
22828  fi
22829
22830
22831  unix_path="$HOTSPOT_LD"
22832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22833    windows_path=`$CYGPATH -m "$unix_path"`
22834    HOTSPOT_LD="$windows_path"
22835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22836    windows_path=`cmd //c echo $unix_path`
22837    HOTSPOT_LD="$windows_path"
22838  fi
22839
22840
22841  unix_path="$HOTSPOT_MT"
22842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22843    windows_path=`$CYGPATH -m "$unix_path"`
22844    HOTSPOT_MT="$windows_path"
22845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22846    windows_path=`cmd //c echo $unix_path`
22847    HOTSPOT_MT="$windows_path"
22848  fi
22849
22850
22851  unix_path="$HOTSPOT_RC"
22852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22853    windows_path=`$CYGPATH -m "$unix_path"`
22854    HOTSPOT_RC="$windows_path"
22855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22856    windows_path=`cmd //c echo $unix_path`
22857    HOTSPOT_RC="$windows_path"
22858  fi
22859
22860
22861
22862
22863    RC_FLAGS="-nologo -l 0x409 -r"
22864    if test "x$VARIANT" = xOPT; then :
22865
22866        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22867
22868fi
22869    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22870    if test "x$JDK_UPDATE_VERSION" = x; then :
22871
22872        JDK_UPDATE_VERSION_NOTNULL=0
22873
22874fi
22875    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22876    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22877    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22878    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22879    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22880    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22881    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22882
22883    # lib.exe is used to create static libraries.
22884    # Extract the first word of "lib", so it can be a program name with args.
22885set dummy lib; ac_word=$2
22886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22887$as_echo_n "checking for $ac_word... " >&6; }
22888if ${ac_cv_prog_WINAR+:} false; then :
22889  $as_echo_n "(cached) " >&6
22890else
22891  if test -n "$WINAR"; then
22892  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22893else
22894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22895for as_dir in $PATH
22896do
22897  IFS=$as_save_IFS
22898  test -z "$as_dir" && as_dir=.
22899    for ac_exec_ext in '' $ac_executable_extensions; do
22900  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22901    ac_cv_prog_WINAR="lib"
22902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22903    break 2
22904  fi
22905done
22906  done
22907IFS=$as_save_IFS
22908
22909fi
22910fi
22911WINAR=$ac_cv_prog_WINAR
22912if test -n "$WINAR"; then
22913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22914$as_echo "$WINAR" >&6; }
22915else
22916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22917$as_echo "no" >&6; }
22918fi
22919
22920
22921
22922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22923
22924  # First separate the path from the arguments. This will split at the first
22925  # space.
22926  complete="$WINAR"
22927  path="${complete%% *}"
22928  tmp="$complete EOL"
22929  arguments="${tmp#* }"
22930
22931  # Input might be given as Windows format, start by converting to
22932  # unix format.
22933  new_path=`$CYGPATH -u "$path"`
22934
22935  # Now try to locate executable using which
22936  new_path=`$WHICH "$new_path" 2> /dev/null`
22937  # bat and cmd files are not always considered executable in cygwin causing which
22938  # to not find them
22939  if test "x$new_path" = x \
22940           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22941           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22942    new_path=`$CYGPATH -u "$path"`
22943  fi
22944  if test "x$new_path" = x; then
22945    # Oops. Which didn't find the executable.
22946    # The splitting of arguments from the executable at a space might have been incorrect,
22947    # since paths with space are more likely in Windows. Give it another try with the whole
22948    # argument.
22949    path="$complete"
22950    arguments="EOL"
22951    new_path=`$CYGPATH -u "$path"`
22952    new_path=`$WHICH "$new_path" 2> /dev/null`
22953    # bat and cmd files are not always considered executable in cygwin causing which
22954    # to not find them
22955    if test "x$new_path" = x \
22956             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22957             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22958      new_path=`$CYGPATH -u "$path"`
22959    fi
22960    if test "x$new_path" = x; then
22961      # It's still not found. Now this is an unrecoverable error.
22962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22963$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22964      has_space=`$ECHO "$complete" | $GREP " "`
22965      if test "x$has_space" != x; then
22966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22968      fi
22969      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22970    fi
22971  fi
22972
22973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22976  # "foo.exe" is OK but "foo" is an error.
22977  #
22978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22979  # It is also a way to make sure we got the proper file name for the real test later on.
22980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22981  if test "x$test_shortpath" = x; then
22982    # Short path failed, file does not exist as specified.
22983    # Try adding .exe or .cmd
22984    if test -f "${new_path}.exe"; then
22985       input_to_shortpath="${new_path}.exe"
22986    elif test -f "${new_path}.cmd"; then
22987       input_to_shortpath="${new_path}.cmd"
22988    else
22989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22990$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22991      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22992$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22993      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22994    fi
22995  else
22996    input_to_shortpath="$new_path"
22997  fi
22998
22999  # Call helper function which possibly converts this using DOS-style short mode.
23000  # If so, the updated path is stored in $new_path.
23001  new_path="$input_to_shortpath"
23002
23003  input_path="$input_to_shortpath"
23004  # Check if we need to convert this using DOS-style short mode. If the path
23005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23006  # take no chances and rewrite it.
23007  # Note: m4 eats our [], so we need to use [ and ] instead.
23008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23009  if test "x$has_forbidden_chars" != x; then
23010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23014      # Going to short mode and back again did indeed matter. Since short mode is
23015      # case insensitive, let's make it lowercase to improve readability.
23016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23017      # Now convert it back to Unix-stile (cygpath)
23018      input_path=`$CYGPATH -u "$shortmode_path"`
23019      new_path="$input_path"
23020    fi
23021  fi
23022
23023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23024  if test "x$test_cygdrive_prefix" = x; then
23025    # As a simple fix, exclude /usr/bin since it's not a real path.
23026    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23028      # a path prefixed by /cygdrive for fixpath to work.
23029      new_path="$CYGWIN_ROOT_PATH$input_path"
23030    fi
23031  fi
23032
23033  # remove trailing .exe if any
23034  new_path="${new_path/%.exe/}"
23035
23036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23037
23038  # First separate the path from the arguments. This will split at the first
23039  # space.
23040  complete="$WINAR"
23041  path="${complete%% *}"
23042  tmp="$complete EOL"
23043  arguments="${tmp#* }"
23044
23045  # Input might be given as Windows format, start by converting to
23046  # unix format.
23047  new_path="$path"
23048
23049  windows_path="$new_path"
23050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23051    unix_path=`$CYGPATH -u "$windows_path"`
23052    new_path="$unix_path"
23053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23055    new_path="$unix_path"
23056  fi
23057
23058
23059  # Now try to locate executable using which
23060  new_path=`$WHICH "$new_path" 2> /dev/null`
23061
23062  if test "x$new_path" = x; then
23063    # Oops. Which didn't find the executable.
23064    # The splitting of arguments from the executable at a space might have been incorrect,
23065    # since paths with space are more likely in Windows. Give it another try with the whole
23066    # argument.
23067    path="$complete"
23068    arguments="EOL"
23069    new_path="$path"
23070
23071  windows_path="$new_path"
23072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23073    unix_path=`$CYGPATH -u "$windows_path"`
23074    new_path="$unix_path"
23075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23077    new_path="$unix_path"
23078  fi
23079
23080
23081    new_path=`$WHICH "$new_path" 2> /dev/null`
23082
23083    if test "x$new_path" = x; then
23084      # It's still not found. Now this is an unrecoverable error.
23085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23086$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23087      has_space=`$ECHO "$complete" | $GREP " "`
23088      if test "x$has_space" != x; then
23089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23091      fi
23092      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23093    fi
23094  fi
23095
23096  # Now new_path has a complete unix path to the binary
23097  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23098    # Keep paths in /bin as-is, but remove trailing .exe if any
23099    new_path="${new_path/%.exe/}"
23100    # Do not save /bin paths to all_fixpath_prefixes!
23101  else
23102    # Not in mixed or Windows style, start by that.
23103    new_path=`cmd //c echo $new_path`
23104
23105  input_path="$new_path"
23106  # Check if we need to convert this using DOS-style short mode. If the path
23107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23108  # take no chances and rewrite it.
23109  # Note: m4 eats our [], so we need to use [ and ] instead.
23110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23111  if test "x$has_forbidden_chars" != x; then
23112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23114  fi
23115
23116    # Output is in $new_path
23117
23118  windows_path="$new_path"
23119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23120    unix_path=`$CYGPATH -u "$windows_path"`
23121    new_path="$unix_path"
23122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23124    new_path="$unix_path"
23125  fi
23126
23127    # remove trailing .exe if any
23128    new_path="${new_path/%.exe/}"
23129
23130    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23131    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23132  fi
23133
23134  else
23135    # We're on a posix platform. Hooray! :)
23136    # First separate the path from the arguments. This will split at the first
23137    # space.
23138    complete="$WINAR"
23139    path="${complete%% *}"
23140    tmp="$complete EOL"
23141    arguments="${tmp#* }"
23142
23143    # Cannot rely on the command "which" here since it doesn't always work.
23144    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23145    if test -z "$is_absolute_path"; then
23146      # Path to executable is not absolute. Find it.
23147      IFS_save="$IFS"
23148      IFS=:
23149      for p in $PATH; do
23150        if test -f "$p/$path" && test -x "$p/$path"; then
23151          new_path="$p/$path"
23152          break
23153        fi
23154      done
23155      IFS="$IFS_save"
23156    else
23157      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23158$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23159      new_path="$path"
23160    fi
23161
23162    if test "x$new_path" = x; then
23163        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23164$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23165        has_space=`$ECHO "$complete" | $GREP " "`
23166        if test "x$has_space" != x; then
23167          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23168$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23169        fi
23170        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23171      fi
23172  fi
23173
23174      # Now join together the path and the arguments once again
23175      if test "x$arguments" != xEOL; then
23176        new_complete="$new_path ${arguments% *}"
23177      else
23178        new_complete="$new_path"
23179      fi
23180
23181  if test "x$complete" != "x$new_complete"; then
23182      WINAR="$new_complete"
23183      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23184$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23185    fi
23186
23187    AR="$WINAR"
23188    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23189
23190    # Extract the first word of "dumpbin", so it can be a program name with args.
23191set dummy dumpbin; ac_word=$2
23192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23193$as_echo_n "checking for $ac_word... " >&6; }
23194if ${ac_cv_prog_DUMPBIN+:} false; then :
23195  $as_echo_n "(cached) " >&6
23196else
23197  if test -n "$DUMPBIN"; then
23198  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23199else
23200as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23201for as_dir in $PATH
23202do
23203  IFS=$as_save_IFS
23204  test -z "$as_dir" && as_dir=.
23205    for ac_exec_ext in '' $ac_executable_extensions; do
23206  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23207    ac_cv_prog_DUMPBIN="dumpbin"
23208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23209    break 2
23210  fi
23211done
23212  done
23213IFS=$as_save_IFS
23214
23215fi
23216fi
23217DUMPBIN=$ac_cv_prog_DUMPBIN
23218if test -n "$DUMPBIN"; then
23219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23220$as_echo "$DUMPBIN" >&6; }
23221else
23222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23223$as_echo "no" >&6; }
23224fi
23225
23226
23227
23228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23229
23230  # First separate the path from the arguments. This will split at the first
23231  # space.
23232  complete="$DUMPBIN"
23233  path="${complete%% *}"
23234  tmp="$complete EOL"
23235  arguments="${tmp#* }"
23236
23237  # Input might be given as Windows format, start by converting to
23238  # unix format.
23239  new_path=`$CYGPATH -u "$path"`
23240
23241  # Now try to locate executable using which
23242  new_path=`$WHICH "$new_path" 2> /dev/null`
23243  # bat and cmd files are not always considered executable in cygwin causing which
23244  # to not find them
23245  if test "x$new_path" = x \
23246           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23247           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23248    new_path=`$CYGPATH -u "$path"`
23249  fi
23250  if test "x$new_path" = x; then
23251    # Oops. Which didn't find the executable.
23252    # The splitting of arguments from the executable at a space might have been incorrect,
23253    # since paths with space are more likely in Windows. Give it another try with the whole
23254    # argument.
23255    path="$complete"
23256    arguments="EOL"
23257    new_path=`$CYGPATH -u "$path"`
23258    new_path=`$WHICH "$new_path" 2> /dev/null`
23259    # bat and cmd files are not always considered executable in cygwin causing which
23260    # to not find them
23261    if test "x$new_path" = x \
23262             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23263             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23264      new_path=`$CYGPATH -u "$path"`
23265    fi
23266    if test "x$new_path" = x; then
23267      # It's still not found. Now this is an unrecoverable error.
23268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23269$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23270      has_space=`$ECHO "$complete" | $GREP " "`
23271      if test "x$has_space" != x; then
23272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23274      fi
23275      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23276    fi
23277  fi
23278
23279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23282  # "foo.exe" is OK but "foo" is an error.
23283  #
23284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23285  # It is also a way to make sure we got the proper file name for the real test later on.
23286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23287  if test "x$test_shortpath" = x; then
23288    # Short path failed, file does not exist as specified.
23289    # Try adding .exe or .cmd
23290    if test -f "${new_path}.exe"; then
23291       input_to_shortpath="${new_path}.exe"
23292    elif test -f "${new_path}.cmd"; then
23293       input_to_shortpath="${new_path}.cmd"
23294    else
23295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23296$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23297      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23298$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23299      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23300    fi
23301  else
23302    input_to_shortpath="$new_path"
23303  fi
23304
23305  # Call helper function which possibly converts this using DOS-style short mode.
23306  # If so, the updated path is stored in $new_path.
23307  new_path="$input_to_shortpath"
23308
23309  input_path="$input_to_shortpath"
23310  # Check if we need to convert this using DOS-style short mode. If the path
23311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23312  # take no chances and rewrite it.
23313  # Note: m4 eats our [], so we need to use [ and ] instead.
23314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23315  if test "x$has_forbidden_chars" != x; then
23316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23320      # Going to short mode and back again did indeed matter. Since short mode is
23321      # case insensitive, let's make it lowercase to improve readability.
23322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23323      # Now convert it back to Unix-stile (cygpath)
23324      input_path=`$CYGPATH -u "$shortmode_path"`
23325      new_path="$input_path"
23326    fi
23327  fi
23328
23329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23330  if test "x$test_cygdrive_prefix" = x; then
23331    # As a simple fix, exclude /usr/bin since it's not a real path.
23332    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23334      # a path prefixed by /cygdrive for fixpath to work.
23335      new_path="$CYGWIN_ROOT_PATH$input_path"
23336    fi
23337  fi
23338
23339  # remove trailing .exe if any
23340  new_path="${new_path/%.exe/}"
23341
23342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23343
23344  # First separate the path from the arguments. This will split at the first
23345  # space.
23346  complete="$DUMPBIN"
23347  path="${complete%% *}"
23348  tmp="$complete EOL"
23349  arguments="${tmp#* }"
23350
23351  # Input might be given as Windows format, start by converting to
23352  # unix format.
23353  new_path="$path"
23354
23355  windows_path="$new_path"
23356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23357    unix_path=`$CYGPATH -u "$windows_path"`
23358    new_path="$unix_path"
23359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23361    new_path="$unix_path"
23362  fi
23363
23364
23365  # Now try to locate executable using which
23366  new_path=`$WHICH "$new_path" 2> /dev/null`
23367
23368  if test "x$new_path" = x; then
23369    # Oops. Which didn't find the executable.
23370    # The splitting of arguments from the executable at a space might have been incorrect,
23371    # since paths with space are more likely in Windows. Give it another try with the whole
23372    # argument.
23373    path="$complete"
23374    arguments="EOL"
23375    new_path="$path"
23376
23377  windows_path="$new_path"
23378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23379    unix_path=`$CYGPATH -u "$windows_path"`
23380    new_path="$unix_path"
23381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23383    new_path="$unix_path"
23384  fi
23385
23386
23387    new_path=`$WHICH "$new_path" 2> /dev/null`
23388
23389    if test "x$new_path" = x; then
23390      # It's still not found. Now this is an unrecoverable error.
23391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23392$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23393      has_space=`$ECHO "$complete" | $GREP " "`
23394      if test "x$has_space" != x; then
23395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23397      fi
23398      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23399    fi
23400  fi
23401
23402  # Now new_path has a complete unix path to the binary
23403  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23404    # Keep paths in /bin as-is, but remove trailing .exe if any
23405    new_path="${new_path/%.exe/}"
23406    # Do not save /bin paths to all_fixpath_prefixes!
23407  else
23408    # Not in mixed or Windows style, start by that.
23409    new_path=`cmd //c echo $new_path`
23410
23411  input_path="$new_path"
23412  # Check if we need to convert this using DOS-style short mode. If the path
23413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23414  # take no chances and rewrite it.
23415  # Note: m4 eats our [], so we need to use [ and ] instead.
23416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23417  if test "x$has_forbidden_chars" != x; then
23418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23420  fi
23421
23422    # Output is in $new_path
23423
23424  windows_path="$new_path"
23425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23426    unix_path=`$CYGPATH -u "$windows_path"`
23427    new_path="$unix_path"
23428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23430    new_path="$unix_path"
23431  fi
23432
23433    # remove trailing .exe if any
23434    new_path="${new_path/%.exe/}"
23435
23436    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23437    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23438  fi
23439
23440  else
23441    # We're on a posix platform. Hooray! :)
23442    # First separate the path from the arguments. This will split at the first
23443    # space.
23444    complete="$DUMPBIN"
23445    path="${complete%% *}"
23446    tmp="$complete EOL"
23447    arguments="${tmp#* }"
23448
23449    # Cannot rely on the command "which" here since it doesn't always work.
23450    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23451    if test -z "$is_absolute_path"; then
23452      # Path to executable is not absolute. Find it.
23453      IFS_save="$IFS"
23454      IFS=:
23455      for p in $PATH; do
23456        if test -f "$p/$path" && test -x "$p/$path"; then
23457          new_path="$p/$path"
23458          break
23459        fi
23460      done
23461      IFS="$IFS_save"
23462    else
23463      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23464$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23465      new_path="$path"
23466    fi
23467
23468    if test "x$new_path" = x; then
23469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23470$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23471        has_space=`$ECHO "$complete" | $GREP " "`
23472        if test "x$has_space" != x; then
23473          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23474$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23475        fi
23476        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23477      fi
23478  fi
23479
23480      # Now join together the path and the arguments once again
23481      if test "x$arguments" != xEOL; then
23482        new_complete="$new_path ${arguments% *}"
23483      else
23484        new_complete="$new_path"
23485      fi
23486
23487  if test "x$complete" != "x$new_complete"; then
23488      DUMPBIN="$new_complete"
23489      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23490$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23491    fi
23492
23493
23494    COMPILER_TYPE=CL
23495    CCXXFLAGS="$CCXXFLAGS -nologo"
23496
23497fi
23498
23499
23500
23501ac_ext=c
23502ac_cpp='$CPP $CPPFLAGS'
23503ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23504ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23505ac_compiler_gnu=$ac_cv_c_compiler_gnu
23506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23507$as_echo_n "checking how to run the C preprocessor... " >&6; }
23508# On Suns, sometimes $CPP names a directory.
23509if test -n "$CPP" && test -d "$CPP"; then
23510  CPP=
23511fi
23512if test -z "$CPP"; then
23513  if ${ac_cv_prog_CPP+:} false; then :
23514  $as_echo_n "(cached) " >&6
23515else
23516      # Double quotes because CPP needs to be expanded
23517    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23518    do
23519      ac_preproc_ok=false
23520for ac_c_preproc_warn_flag in '' yes
23521do
23522  # Use a header file that comes with gcc, so configuring glibc
23523  # with a fresh cross-compiler works.
23524  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23525  # <limits.h> exists even on freestanding compilers.
23526  # On the NeXT, cc -E runs the code through the compiler's parser,
23527  # not just through cpp. "Syntax error" is here to catch this case.
23528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23529/* end confdefs.h.  */
23530#ifdef __STDC__
23531# include <limits.h>
23532#else
23533# include <assert.h>
23534#endif
23535		     Syntax error
23536_ACEOF
23537if ac_fn_c_try_cpp "$LINENO"; then :
23538
23539else
23540  # Broken: fails on valid input.
23541continue
23542fi
23543rm -f conftest.err conftest.i conftest.$ac_ext
23544
23545  # OK, works on sane cases.  Now check whether nonexistent headers
23546  # can be detected and how.
23547  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23548/* end confdefs.h.  */
23549#include <ac_nonexistent.h>
23550_ACEOF
23551if ac_fn_c_try_cpp "$LINENO"; then :
23552  # Broken: success on invalid input.
23553continue
23554else
23555  # Passes both tests.
23556ac_preproc_ok=:
23557break
23558fi
23559rm -f conftest.err conftest.i conftest.$ac_ext
23560
23561done
23562# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23563rm -f conftest.i conftest.err conftest.$ac_ext
23564if $ac_preproc_ok; then :
23565  break
23566fi
23567
23568    done
23569    ac_cv_prog_CPP=$CPP
23570
23571fi
23572  CPP=$ac_cv_prog_CPP
23573else
23574  ac_cv_prog_CPP=$CPP
23575fi
23576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23577$as_echo "$CPP" >&6; }
23578ac_preproc_ok=false
23579for ac_c_preproc_warn_flag in '' yes
23580do
23581  # Use a header file that comes with gcc, so configuring glibc
23582  # with a fresh cross-compiler works.
23583  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23584  # <limits.h> exists even on freestanding compilers.
23585  # On the NeXT, cc -E runs the code through the compiler's parser,
23586  # not just through cpp. "Syntax error" is here to catch this case.
23587  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23588/* end confdefs.h.  */
23589#ifdef __STDC__
23590# include <limits.h>
23591#else
23592# include <assert.h>
23593#endif
23594		     Syntax error
23595_ACEOF
23596if ac_fn_c_try_cpp "$LINENO"; then :
23597
23598else
23599  # Broken: fails on valid input.
23600continue
23601fi
23602rm -f conftest.err conftest.i conftest.$ac_ext
23603
23604  # OK, works on sane cases.  Now check whether nonexistent headers
23605  # can be detected and how.
23606  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23607/* end confdefs.h.  */
23608#include <ac_nonexistent.h>
23609_ACEOF
23610if ac_fn_c_try_cpp "$LINENO"; then :
23611  # Broken: success on invalid input.
23612continue
23613else
23614  # Passes both tests.
23615ac_preproc_ok=:
23616break
23617fi
23618rm -f conftest.err conftest.i conftest.$ac_ext
23619
23620done
23621# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23622rm -f conftest.i conftest.err conftest.$ac_ext
23623if $ac_preproc_ok; then :
23624
23625else
23626  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23627$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23628as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23629See \`config.log' for more details" "$LINENO" 5; }
23630fi
23631
23632ac_ext=cpp
23633ac_cpp='$CXXCPP $CPPFLAGS'
23634ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23635ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23636ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23637
23638
23639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23640
23641  # First separate the path from the arguments. This will split at the first
23642  # space.
23643  complete="$CPP"
23644  path="${complete%% *}"
23645  tmp="$complete EOL"
23646  arguments="${tmp#* }"
23647
23648  # Input might be given as Windows format, start by converting to
23649  # unix format.
23650  new_path=`$CYGPATH -u "$path"`
23651
23652  # Now try to locate executable using which
23653  new_path=`$WHICH "$new_path" 2> /dev/null`
23654  # bat and cmd files are not always considered executable in cygwin causing which
23655  # to not find them
23656  if test "x$new_path" = x \
23657           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23658           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23659    new_path=`$CYGPATH -u "$path"`
23660  fi
23661  if test "x$new_path" = x; then
23662    # Oops. Which didn't find the executable.
23663    # The splitting of arguments from the executable at a space might have been incorrect,
23664    # since paths with space are more likely in Windows. Give it another try with the whole
23665    # argument.
23666    path="$complete"
23667    arguments="EOL"
23668    new_path=`$CYGPATH -u "$path"`
23669    new_path=`$WHICH "$new_path" 2> /dev/null`
23670    # bat and cmd files are not always considered executable in cygwin causing which
23671    # to not find them
23672    if test "x$new_path" = x \
23673             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23674             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23675      new_path=`$CYGPATH -u "$path"`
23676    fi
23677    if test "x$new_path" = x; then
23678      # It's still not found. Now this is an unrecoverable error.
23679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23680$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23681      has_space=`$ECHO "$complete" | $GREP " "`
23682      if test "x$has_space" != x; then
23683        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23684$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23685      fi
23686      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23687    fi
23688  fi
23689
23690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23693  # "foo.exe" is OK but "foo" is an error.
23694  #
23695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23696  # It is also a way to make sure we got the proper file name for the real test later on.
23697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23698  if test "x$test_shortpath" = x; then
23699    # Short path failed, file does not exist as specified.
23700    # Try adding .exe or .cmd
23701    if test -f "${new_path}.exe"; then
23702       input_to_shortpath="${new_path}.exe"
23703    elif test -f "${new_path}.cmd"; then
23704       input_to_shortpath="${new_path}.cmd"
23705    else
23706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23707$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23708      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23709$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23710      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23711    fi
23712  else
23713    input_to_shortpath="$new_path"
23714  fi
23715
23716  # Call helper function which possibly converts this using DOS-style short mode.
23717  # If so, the updated path is stored in $new_path.
23718  new_path="$input_to_shortpath"
23719
23720  input_path="$input_to_shortpath"
23721  # Check if we need to convert this using DOS-style short mode. If the path
23722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23723  # take no chances and rewrite it.
23724  # Note: m4 eats our [], so we need to use [ and ] instead.
23725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23726  if test "x$has_forbidden_chars" != x; then
23727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23731      # Going to short mode and back again did indeed matter. Since short mode is
23732      # case insensitive, let's make it lowercase to improve readability.
23733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23734      # Now convert it back to Unix-stile (cygpath)
23735      input_path=`$CYGPATH -u "$shortmode_path"`
23736      new_path="$input_path"
23737    fi
23738  fi
23739
23740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23741  if test "x$test_cygdrive_prefix" = x; then
23742    # As a simple fix, exclude /usr/bin since it's not a real path.
23743    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23745      # a path prefixed by /cygdrive for fixpath to work.
23746      new_path="$CYGWIN_ROOT_PATH$input_path"
23747    fi
23748  fi
23749
23750  # remove trailing .exe if any
23751  new_path="${new_path/%.exe/}"
23752
23753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23754
23755  # First separate the path from the arguments. This will split at the first
23756  # space.
23757  complete="$CPP"
23758  path="${complete%% *}"
23759  tmp="$complete EOL"
23760  arguments="${tmp#* }"
23761
23762  # Input might be given as Windows format, start by converting to
23763  # unix format.
23764  new_path="$path"
23765
23766  windows_path="$new_path"
23767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23768    unix_path=`$CYGPATH -u "$windows_path"`
23769    new_path="$unix_path"
23770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23772    new_path="$unix_path"
23773  fi
23774
23775
23776  # Now try to locate executable using which
23777  new_path=`$WHICH "$new_path" 2> /dev/null`
23778
23779  if test "x$new_path" = x; then
23780    # Oops. Which didn't find the executable.
23781    # The splitting of arguments from the executable at a space might have been incorrect,
23782    # since paths with space are more likely in Windows. Give it another try with the whole
23783    # argument.
23784    path="$complete"
23785    arguments="EOL"
23786    new_path="$path"
23787
23788  windows_path="$new_path"
23789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23790    unix_path=`$CYGPATH -u "$windows_path"`
23791    new_path="$unix_path"
23792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23794    new_path="$unix_path"
23795  fi
23796
23797
23798    new_path=`$WHICH "$new_path" 2> /dev/null`
23799
23800    if test "x$new_path" = x; then
23801      # It's still not found. Now this is an unrecoverable error.
23802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23803$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23804      has_space=`$ECHO "$complete" | $GREP " "`
23805      if test "x$has_space" != x; then
23806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23808      fi
23809      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23810    fi
23811  fi
23812
23813  # Now new_path has a complete unix path to the binary
23814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23815    # Keep paths in /bin as-is, but remove trailing .exe if any
23816    new_path="${new_path/%.exe/}"
23817    # Do not save /bin paths to all_fixpath_prefixes!
23818  else
23819    # Not in mixed or Windows style, start by that.
23820    new_path=`cmd //c echo $new_path`
23821
23822  input_path="$new_path"
23823  # Check if we need to convert this using DOS-style short mode. If the path
23824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23825  # take no chances and rewrite it.
23826  # Note: m4 eats our [], so we need to use [ and ] instead.
23827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23828  if test "x$has_forbidden_chars" != x; then
23829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23831  fi
23832
23833    # Output is in $new_path
23834
23835  windows_path="$new_path"
23836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23837    unix_path=`$CYGPATH -u "$windows_path"`
23838    new_path="$unix_path"
23839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23841    new_path="$unix_path"
23842  fi
23843
23844    # remove trailing .exe if any
23845    new_path="${new_path/%.exe/}"
23846
23847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23849  fi
23850
23851  else
23852    # We're on a posix platform. Hooray! :)
23853    # First separate the path from the arguments. This will split at the first
23854    # space.
23855    complete="$CPP"
23856    path="${complete%% *}"
23857    tmp="$complete EOL"
23858    arguments="${tmp#* }"
23859
23860    # Cannot rely on the command "which" here since it doesn't always work.
23861    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23862    if test -z "$is_absolute_path"; then
23863      # Path to executable is not absolute. Find it.
23864      IFS_save="$IFS"
23865      IFS=:
23866      for p in $PATH; do
23867        if test -f "$p/$path" && test -x "$p/$path"; then
23868          new_path="$p/$path"
23869          break
23870        fi
23871      done
23872      IFS="$IFS_save"
23873    else
23874      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23875$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23876      new_path="$path"
23877    fi
23878
23879    if test "x$new_path" = x; then
23880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23881$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23882        has_space=`$ECHO "$complete" | $GREP " "`
23883        if test "x$has_space" != x; then
23884          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23885$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23886        fi
23887        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23888      fi
23889  fi
23890
23891      # Now join together the path and the arguments once again
23892      if test "x$arguments" != xEOL; then
23893        new_complete="$new_path ${arguments% *}"
23894      else
23895        new_complete="$new_path"
23896      fi
23897
23898  if test "x$complete" != "x$new_complete"; then
23899      CPP="$new_complete"
23900      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23901$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23902    fi
23903
23904
23905ac_ext=cpp
23906ac_cpp='$CXXCPP $CPPFLAGS'
23907ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23908ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23909ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23911$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23912if test -z "$CXXCPP"; then
23913  if ${ac_cv_prog_CXXCPP+:} false; then :
23914  $as_echo_n "(cached) " >&6
23915else
23916      # Double quotes because CXXCPP needs to be expanded
23917    for CXXCPP in "$CXX -E" "/lib/cpp"
23918    do
23919      ac_preproc_ok=false
23920for ac_cxx_preproc_warn_flag in '' yes
23921do
23922  # Use a header file that comes with gcc, so configuring glibc
23923  # with a fresh cross-compiler works.
23924  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23925  # <limits.h> exists even on freestanding compilers.
23926  # On the NeXT, cc -E runs the code through the compiler's parser,
23927  # not just through cpp. "Syntax error" is here to catch this case.
23928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23929/* end confdefs.h.  */
23930#ifdef __STDC__
23931# include <limits.h>
23932#else
23933# include <assert.h>
23934#endif
23935		     Syntax error
23936_ACEOF
23937if ac_fn_cxx_try_cpp "$LINENO"; then :
23938
23939else
23940  # Broken: fails on valid input.
23941continue
23942fi
23943rm -f conftest.err conftest.i conftest.$ac_ext
23944
23945  # OK, works on sane cases.  Now check whether nonexistent headers
23946  # can be detected and how.
23947  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23948/* end confdefs.h.  */
23949#include <ac_nonexistent.h>
23950_ACEOF
23951if ac_fn_cxx_try_cpp "$LINENO"; then :
23952  # Broken: success on invalid input.
23953continue
23954else
23955  # Passes both tests.
23956ac_preproc_ok=:
23957break
23958fi
23959rm -f conftest.err conftest.i conftest.$ac_ext
23960
23961done
23962# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23963rm -f conftest.i conftest.err conftest.$ac_ext
23964if $ac_preproc_ok; then :
23965  break
23966fi
23967
23968    done
23969    ac_cv_prog_CXXCPP=$CXXCPP
23970
23971fi
23972  CXXCPP=$ac_cv_prog_CXXCPP
23973else
23974  ac_cv_prog_CXXCPP=$CXXCPP
23975fi
23976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23977$as_echo "$CXXCPP" >&6; }
23978ac_preproc_ok=false
23979for ac_cxx_preproc_warn_flag in '' yes
23980do
23981  # Use a header file that comes with gcc, so configuring glibc
23982  # with a fresh cross-compiler works.
23983  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23984  # <limits.h> exists even on freestanding compilers.
23985  # On the NeXT, cc -E runs the code through the compiler's parser,
23986  # not just through cpp. "Syntax error" is here to catch this case.
23987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23988/* end confdefs.h.  */
23989#ifdef __STDC__
23990# include <limits.h>
23991#else
23992# include <assert.h>
23993#endif
23994		     Syntax error
23995_ACEOF
23996if ac_fn_cxx_try_cpp "$LINENO"; then :
23997
23998else
23999  # Broken: fails on valid input.
24000continue
24001fi
24002rm -f conftest.err conftest.i conftest.$ac_ext
24003
24004  # OK, works on sane cases.  Now check whether nonexistent headers
24005  # can be detected and how.
24006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24007/* end confdefs.h.  */
24008#include <ac_nonexistent.h>
24009_ACEOF
24010if ac_fn_cxx_try_cpp "$LINENO"; then :
24011  # Broken: success on invalid input.
24012continue
24013else
24014  # Passes both tests.
24015ac_preproc_ok=:
24016break
24017fi
24018rm -f conftest.err conftest.i conftest.$ac_ext
24019
24020done
24021# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24022rm -f conftest.i conftest.err conftest.$ac_ext
24023if $ac_preproc_ok; then :
24024
24025else
24026  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24028as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24029See \`config.log' for more details" "$LINENO" 5; }
24030fi
24031
24032ac_ext=cpp
24033ac_cpp='$CXXCPP $CPPFLAGS'
24034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24037
24038
24039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24040
24041  # First separate the path from the arguments. This will split at the first
24042  # space.
24043  complete="$CXXCPP"
24044  path="${complete%% *}"
24045  tmp="$complete EOL"
24046  arguments="${tmp#* }"
24047
24048  # Input might be given as Windows format, start by converting to
24049  # unix format.
24050  new_path=`$CYGPATH -u "$path"`
24051
24052  # Now try to locate executable using which
24053  new_path=`$WHICH "$new_path" 2> /dev/null`
24054  # bat and cmd files are not always considered executable in cygwin causing which
24055  # to not find them
24056  if test "x$new_path" = x \
24057           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24058           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24059    new_path=`$CYGPATH -u "$path"`
24060  fi
24061  if test "x$new_path" = x; then
24062    # Oops. Which didn't find the executable.
24063    # The splitting of arguments from the executable at a space might have been incorrect,
24064    # since paths with space are more likely in Windows. Give it another try with the whole
24065    # argument.
24066    path="$complete"
24067    arguments="EOL"
24068    new_path=`$CYGPATH -u "$path"`
24069    new_path=`$WHICH "$new_path" 2> /dev/null`
24070    # bat and cmd files are not always considered executable in cygwin causing which
24071    # to not find them
24072    if test "x$new_path" = x \
24073             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24074             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24075      new_path=`$CYGPATH -u "$path"`
24076    fi
24077    if test "x$new_path" = x; then
24078      # It's still not found. Now this is an unrecoverable error.
24079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24080$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24081      has_space=`$ECHO "$complete" | $GREP " "`
24082      if test "x$has_space" != x; then
24083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24085      fi
24086      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24087    fi
24088  fi
24089
24090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24093  # "foo.exe" is OK but "foo" is an error.
24094  #
24095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24096  # It is also a way to make sure we got the proper file name for the real test later on.
24097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24098  if test "x$test_shortpath" = x; then
24099    # Short path failed, file does not exist as specified.
24100    # Try adding .exe or .cmd
24101    if test -f "${new_path}.exe"; then
24102       input_to_shortpath="${new_path}.exe"
24103    elif test -f "${new_path}.cmd"; then
24104       input_to_shortpath="${new_path}.cmd"
24105    else
24106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24107$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24108      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24109$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24110      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24111    fi
24112  else
24113    input_to_shortpath="$new_path"
24114  fi
24115
24116  # Call helper function which possibly converts this using DOS-style short mode.
24117  # If so, the updated path is stored in $new_path.
24118  new_path="$input_to_shortpath"
24119
24120  input_path="$input_to_shortpath"
24121  # Check if we need to convert this using DOS-style short mode. If the path
24122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24123  # take no chances and rewrite it.
24124  # Note: m4 eats our [], so we need to use [ and ] instead.
24125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24126  if test "x$has_forbidden_chars" != x; then
24127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24131      # Going to short mode and back again did indeed matter. Since short mode is
24132      # case insensitive, let's make it lowercase to improve readability.
24133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24134      # Now convert it back to Unix-stile (cygpath)
24135      input_path=`$CYGPATH -u "$shortmode_path"`
24136      new_path="$input_path"
24137    fi
24138  fi
24139
24140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24141  if test "x$test_cygdrive_prefix" = x; then
24142    # As a simple fix, exclude /usr/bin since it's not a real path.
24143    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24145      # a path prefixed by /cygdrive for fixpath to work.
24146      new_path="$CYGWIN_ROOT_PATH$input_path"
24147    fi
24148  fi
24149
24150  # remove trailing .exe if any
24151  new_path="${new_path/%.exe/}"
24152
24153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24154
24155  # First separate the path from the arguments. This will split at the first
24156  # space.
24157  complete="$CXXCPP"
24158  path="${complete%% *}"
24159  tmp="$complete EOL"
24160  arguments="${tmp#* }"
24161
24162  # Input might be given as Windows format, start by converting to
24163  # unix format.
24164  new_path="$path"
24165
24166  windows_path="$new_path"
24167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24168    unix_path=`$CYGPATH -u "$windows_path"`
24169    new_path="$unix_path"
24170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24172    new_path="$unix_path"
24173  fi
24174
24175
24176  # Now try to locate executable using which
24177  new_path=`$WHICH "$new_path" 2> /dev/null`
24178
24179  if test "x$new_path" = x; then
24180    # Oops. Which didn't find the executable.
24181    # The splitting of arguments from the executable at a space might have been incorrect,
24182    # since paths with space are more likely in Windows. Give it another try with the whole
24183    # argument.
24184    path="$complete"
24185    arguments="EOL"
24186    new_path="$path"
24187
24188  windows_path="$new_path"
24189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24190    unix_path=`$CYGPATH -u "$windows_path"`
24191    new_path="$unix_path"
24192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24194    new_path="$unix_path"
24195  fi
24196
24197
24198    new_path=`$WHICH "$new_path" 2> /dev/null`
24199
24200    if test "x$new_path" = x; then
24201      # It's still not found. Now this is an unrecoverable error.
24202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24203$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24204      has_space=`$ECHO "$complete" | $GREP " "`
24205      if test "x$has_space" != x; then
24206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24208      fi
24209      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24210    fi
24211  fi
24212
24213  # Now new_path has a complete unix path to the binary
24214  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24215    # Keep paths in /bin as-is, but remove trailing .exe if any
24216    new_path="${new_path/%.exe/}"
24217    # Do not save /bin paths to all_fixpath_prefixes!
24218  else
24219    # Not in mixed or Windows style, start by that.
24220    new_path=`cmd //c echo $new_path`
24221
24222  input_path="$new_path"
24223  # Check if we need to convert this using DOS-style short mode. If the path
24224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24225  # take no chances and rewrite it.
24226  # Note: m4 eats our [], so we need to use [ and ] instead.
24227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24228  if test "x$has_forbidden_chars" != x; then
24229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24231  fi
24232
24233    # Output is in $new_path
24234
24235  windows_path="$new_path"
24236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24237    unix_path=`$CYGPATH -u "$windows_path"`
24238    new_path="$unix_path"
24239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24241    new_path="$unix_path"
24242  fi
24243
24244    # remove trailing .exe if any
24245    new_path="${new_path/%.exe/}"
24246
24247    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24248    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24249  fi
24250
24251  else
24252    # We're on a posix platform. Hooray! :)
24253    # First separate the path from the arguments. This will split at the first
24254    # space.
24255    complete="$CXXCPP"
24256    path="${complete%% *}"
24257    tmp="$complete EOL"
24258    arguments="${tmp#* }"
24259
24260    # Cannot rely on the command "which" here since it doesn't always work.
24261    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24262    if test -z "$is_absolute_path"; then
24263      # Path to executable is not absolute. Find it.
24264      IFS_save="$IFS"
24265      IFS=:
24266      for p in $PATH; do
24267        if test -f "$p/$path" && test -x "$p/$path"; then
24268          new_path="$p/$path"
24269          break
24270        fi
24271      done
24272      IFS="$IFS_save"
24273    else
24274      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24275$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24276      new_path="$path"
24277    fi
24278
24279    if test "x$new_path" = x; then
24280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24281$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24282        has_space=`$ECHO "$complete" | $GREP " "`
24283        if test "x$has_space" != x; then
24284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24286        fi
24287        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24288      fi
24289  fi
24290
24291      # Now join together the path and the arguments once again
24292      if test "x$arguments" != xEOL; then
24293        new_complete="$new_path ${arguments% *}"
24294      else
24295        new_complete="$new_path"
24296      fi
24297
24298  if test "x$complete" != "x$new_complete"; then
24299      CXXCPP="$new_complete"
24300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24301$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24302    fi
24303
24304
24305if test "x$COMPILE_TYPE" != "xcross"; then
24306    # If we are not cross compiling, use the same compilers for
24307    # building the build platform executables. The cross-compilation
24308    # case needed to be done earlier, but this can only be done after
24309    # the native tools have been localized.
24310    BUILD_CC="$CC"
24311    BUILD_CXX="$CXX"
24312    BUILD_LD="$LD"
24313fi
24314
24315# for solaris we really need solaris tools, and not gnu equivalent
24316#   these seems to normally reside in /usr/ccs/bin so add that to path before
24317#   starting to probe
24318#
24319#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24320#         so that it can be overriden --with-tools-dir
24321if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24322    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24323fi
24324
24325# Find the right assembler.
24326if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24327    # Extract the first word of "as", so it can be a program name with args.
24328set dummy as; ac_word=$2
24329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24330$as_echo_n "checking for $ac_word... " >&6; }
24331if ${ac_cv_path_AS+:} false; then :
24332  $as_echo_n "(cached) " >&6
24333else
24334  case $AS in
24335  [\\/]* | ?:[\\/]*)
24336  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24337  ;;
24338  *)
24339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24340for as_dir in $PATH
24341do
24342  IFS=$as_save_IFS
24343  test -z "$as_dir" && as_dir=.
24344    for ac_exec_ext in '' $ac_executable_extensions; do
24345  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24346    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24348    break 2
24349  fi
24350done
24351  done
24352IFS=$as_save_IFS
24353
24354  ;;
24355esac
24356fi
24357AS=$ac_cv_path_AS
24358if test -n "$AS"; then
24359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24360$as_echo "$AS" >&6; }
24361else
24362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24363$as_echo "no" >&6; }
24364fi
24365
24366
24367
24368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24369
24370  # First separate the path from the arguments. This will split at the first
24371  # space.
24372  complete="$AS"
24373  path="${complete%% *}"
24374  tmp="$complete EOL"
24375  arguments="${tmp#* }"
24376
24377  # Input might be given as Windows format, start by converting to
24378  # unix format.
24379  new_path=`$CYGPATH -u "$path"`
24380
24381  # Now try to locate executable using which
24382  new_path=`$WHICH "$new_path" 2> /dev/null`
24383  # bat and cmd files are not always considered executable in cygwin causing which
24384  # to not find them
24385  if test "x$new_path" = x \
24386           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24387           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24388    new_path=`$CYGPATH -u "$path"`
24389  fi
24390  if test "x$new_path" = x; then
24391    # Oops. Which didn't find the executable.
24392    # The splitting of arguments from the executable at a space might have been incorrect,
24393    # since paths with space are more likely in Windows. Give it another try with the whole
24394    # argument.
24395    path="$complete"
24396    arguments="EOL"
24397    new_path=`$CYGPATH -u "$path"`
24398    new_path=`$WHICH "$new_path" 2> /dev/null`
24399    # bat and cmd files are not always considered executable in cygwin causing which
24400    # to not find them
24401    if test "x$new_path" = x \
24402             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24403             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24404      new_path=`$CYGPATH -u "$path"`
24405    fi
24406    if test "x$new_path" = x; then
24407      # It's still not found. Now this is an unrecoverable error.
24408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24409$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24410      has_space=`$ECHO "$complete" | $GREP " "`
24411      if test "x$has_space" != x; then
24412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24414      fi
24415      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24416    fi
24417  fi
24418
24419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24422  # "foo.exe" is OK but "foo" is an error.
24423  #
24424  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24425  # It is also a way to make sure we got the proper file name for the real test later on.
24426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24427  if test "x$test_shortpath" = x; then
24428    # Short path failed, file does not exist as specified.
24429    # Try adding .exe or .cmd
24430    if test -f "${new_path}.exe"; then
24431       input_to_shortpath="${new_path}.exe"
24432    elif test -f "${new_path}.cmd"; then
24433       input_to_shortpath="${new_path}.cmd"
24434    else
24435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24436$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24437      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24438$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24439      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24440    fi
24441  else
24442    input_to_shortpath="$new_path"
24443  fi
24444
24445  # Call helper function which possibly converts this using DOS-style short mode.
24446  # If so, the updated path is stored in $new_path.
24447  new_path="$input_to_shortpath"
24448
24449  input_path="$input_to_shortpath"
24450  # Check if we need to convert this using DOS-style short mode. If the path
24451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24452  # take no chances and rewrite it.
24453  # Note: m4 eats our [], so we need to use [ and ] instead.
24454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24455  if test "x$has_forbidden_chars" != x; then
24456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24460      # Going to short mode and back again did indeed matter. Since short mode is
24461      # case insensitive, let's make it lowercase to improve readability.
24462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24463      # Now convert it back to Unix-stile (cygpath)
24464      input_path=`$CYGPATH -u "$shortmode_path"`
24465      new_path="$input_path"
24466    fi
24467  fi
24468
24469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24470  if test "x$test_cygdrive_prefix" = x; then
24471    # As a simple fix, exclude /usr/bin since it's not a real path.
24472    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24474      # a path prefixed by /cygdrive for fixpath to work.
24475      new_path="$CYGWIN_ROOT_PATH$input_path"
24476    fi
24477  fi
24478
24479  # remove trailing .exe if any
24480  new_path="${new_path/%.exe/}"
24481
24482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24483
24484  # First separate the path from the arguments. This will split at the first
24485  # space.
24486  complete="$AS"
24487  path="${complete%% *}"
24488  tmp="$complete EOL"
24489  arguments="${tmp#* }"
24490
24491  # Input might be given as Windows format, start by converting to
24492  # unix format.
24493  new_path="$path"
24494
24495  windows_path="$new_path"
24496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24497    unix_path=`$CYGPATH -u "$windows_path"`
24498    new_path="$unix_path"
24499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24501    new_path="$unix_path"
24502  fi
24503
24504
24505  # Now try to locate executable using which
24506  new_path=`$WHICH "$new_path" 2> /dev/null`
24507
24508  if test "x$new_path" = x; then
24509    # Oops. Which didn't find the executable.
24510    # The splitting of arguments from the executable at a space might have been incorrect,
24511    # since paths with space are more likely in Windows. Give it another try with the whole
24512    # argument.
24513    path="$complete"
24514    arguments="EOL"
24515    new_path="$path"
24516
24517  windows_path="$new_path"
24518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24519    unix_path=`$CYGPATH -u "$windows_path"`
24520    new_path="$unix_path"
24521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24523    new_path="$unix_path"
24524  fi
24525
24526
24527    new_path=`$WHICH "$new_path" 2> /dev/null`
24528
24529    if test "x$new_path" = x; then
24530      # It's still not found. Now this is an unrecoverable error.
24531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24532$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24533      has_space=`$ECHO "$complete" | $GREP " "`
24534      if test "x$has_space" != x; then
24535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24537      fi
24538      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24539    fi
24540  fi
24541
24542  # Now new_path has a complete unix path to the binary
24543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24544    # Keep paths in /bin as-is, but remove trailing .exe if any
24545    new_path="${new_path/%.exe/}"
24546    # Do not save /bin paths to all_fixpath_prefixes!
24547  else
24548    # Not in mixed or Windows style, start by that.
24549    new_path=`cmd //c echo $new_path`
24550
24551  input_path="$new_path"
24552  # Check if we need to convert this using DOS-style short mode. If the path
24553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24554  # take no chances and rewrite it.
24555  # Note: m4 eats our [], so we need to use [ and ] instead.
24556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24557  if test "x$has_forbidden_chars" != x; then
24558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24560  fi
24561
24562    # Output is in $new_path
24563
24564  windows_path="$new_path"
24565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24566    unix_path=`$CYGPATH -u "$windows_path"`
24567    new_path="$unix_path"
24568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24570    new_path="$unix_path"
24571  fi
24572
24573    # remove trailing .exe if any
24574    new_path="${new_path/%.exe/}"
24575
24576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24578  fi
24579
24580  else
24581    # We're on a posix platform. Hooray! :)
24582    # First separate the path from the arguments. This will split at the first
24583    # space.
24584    complete="$AS"
24585    path="${complete%% *}"
24586    tmp="$complete EOL"
24587    arguments="${tmp#* }"
24588
24589    # Cannot rely on the command "which" here since it doesn't always work.
24590    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24591    if test -z "$is_absolute_path"; then
24592      # Path to executable is not absolute. Find it.
24593      IFS_save="$IFS"
24594      IFS=:
24595      for p in $PATH; do
24596        if test -f "$p/$path" && test -x "$p/$path"; then
24597          new_path="$p/$path"
24598          break
24599        fi
24600      done
24601      IFS="$IFS_save"
24602    else
24603      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24604$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24605      new_path="$path"
24606    fi
24607
24608    if test "x$new_path" = x; then
24609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24610$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24611        has_space=`$ECHO "$complete" | $GREP " "`
24612        if test "x$has_space" != x; then
24613          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24615        fi
24616        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24617      fi
24618  fi
24619
24620      # Now join together the path and the arguments once again
24621      if test "x$arguments" != xEOL; then
24622        new_complete="$new_path ${arguments% *}"
24623      else
24624        new_complete="$new_path"
24625      fi
24626
24627  if test "x$complete" != "x$new_complete"; then
24628      AS="$new_complete"
24629      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24630$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24631    fi
24632
24633else
24634    AS="$CC -c"
24635fi
24636
24637
24638if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24639    for ac_prog in gnm nm
24640do
24641  # Extract the first word of "$ac_prog", so it can be a program name with args.
24642set dummy $ac_prog; ac_word=$2
24643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24644$as_echo_n "checking for $ac_word... " >&6; }
24645if ${ac_cv_path_NM+:} false; then :
24646  $as_echo_n "(cached) " >&6
24647else
24648  case $NM in
24649  [\\/]* | ?:[\\/]*)
24650  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24651  ;;
24652  *)
24653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24654for as_dir in $PATH
24655do
24656  IFS=$as_save_IFS
24657  test -z "$as_dir" && as_dir=.
24658    for ac_exec_ext in '' $ac_executable_extensions; do
24659  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24660    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24662    break 2
24663  fi
24664done
24665  done
24666IFS=$as_save_IFS
24667
24668  ;;
24669esac
24670fi
24671NM=$ac_cv_path_NM
24672if test -n "$NM"; then
24673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24674$as_echo "$NM" >&6; }
24675else
24676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24677$as_echo "no" >&6; }
24678fi
24679
24680
24681  test -n "$NM" && break
24682done
24683
24684
24685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24686
24687  # First separate the path from the arguments. This will split at the first
24688  # space.
24689  complete="$NM"
24690  path="${complete%% *}"
24691  tmp="$complete EOL"
24692  arguments="${tmp#* }"
24693
24694  # Input might be given as Windows format, start by converting to
24695  # unix format.
24696  new_path=`$CYGPATH -u "$path"`
24697
24698  # Now try to locate executable using which
24699  new_path=`$WHICH "$new_path" 2> /dev/null`
24700  # bat and cmd files are not always considered executable in cygwin causing which
24701  # to not find them
24702  if test "x$new_path" = x \
24703           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24704           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24705    new_path=`$CYGPATH -u "$path"`
24706  fi
24707  if test "x$new_path" = x; then
24708    # Oops. Which didn't find the executable.
24709    # The splitting of arguments from the executable at a space might have been incorrect,
24710    # since paths with space are more likely in Windows. Give it another try with the whole
24711    # argument.
24712    path="$complete"
24713    arguments="EOL"
24714    new_path=`$CYGPATH -u "$path"`
24715    new_path=`$WHICH "$new_path" 2> /dev/null`
24716    # bat and cmd files are not always considered executable in cygwin causing which
24717    # to not find them
24718    if test "x$new_path" = x \
24719             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24720             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24721      new_path=`$CYGPATH -u "$path"`
24722    fi
24723    if test "x$new_path" = x; then
24724      # It's still not found. Now this is an unrecoverable error.
24725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24726$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24727      has_space=`$ECHO "$complete" | $GREP " "`
24728      if test "x$has_space" != x; then
24729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24731      fi
24732      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24733    fi
24734  fi
24735
24736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24739  # "foo.exe" is OK but "foo" is an error.
24740  #
24741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24742  # It is also a way to make sure we got the proper file name for the real test later on.
24743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24744  if test "x$test_shortpath" = x; then
24745    # Short path failed, file does not exist as specified.
24746    # Try adding .exe or .cmd
24747    if test -f "${new_path}.exe"; then
24748       input_to_shortpath="${new_path}.exe"
24749    elif test -f "${new_path}.cmd"; then
24750       input_to_shortpath="${new_path}.cmd"
24751    else
24752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24753$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24754      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24755$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24756      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24757    fi
24758  else
24759    input_to_shortpath="$new_path"
24760  fi
24761
24762  # Call helper function which possibly converts this using DOS-style short mode.
24763  # If so, the updated path is stored in $new_path.
24764  new_path="$input_to_shortpath"
24765
24766  input_path="$input_to_shortpath"
24767  # Check if we need to convert this using DOS-style short mode. If the path
24768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24769  # take no chances and rewrite it.
24770  # Note: m4 eats our [], so we need to use [ and ] instead.
24771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24772  if test "x$has_forbidden_chars" != x; then
24773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24777      # Going to short mode and back again did indeed matter. Since short mode is
24778      # case insensitive, let's make it lowercase to improve readability.
24779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24780      # Now convert it back to Unix-stile (cygpath)
24781      input_path=`$CYGPATH -u "$shortmode_path"`
24782      new_path="$input_path"
24783    fi
24784  fi
24785
24786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24787  if test "x$test_cygdrive_prefix" = x; then
24788    # As a simple fix, exclude /usr/bin since it's not a real path.
24789    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24791      # a path prefixed by /cygdrive for fixpath to work.
24792      new_path="$CYGWIN_ROOT_PATH$input_path"
24793    fi
24794  fi
24795
24796  # remove trailing .exe if any
24797  new_path="${new_path/%.exe/}"
24798
24799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24800
24801  # First separate the path from the arguments. This will split at the first
24802  # space.
24803  complete="$NM"
24804  path="${complete%% *}"
24805  tmp="$complete EOL"
24806  arguments="${tmp#* }"
24807
24808  # Input might be given as Windows format, start by converting to
24809  # unix format.
24810  new_path="$path"
24811
24812  windows_path="$new_path"
24813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24814    unix_path=`$CYGPATH -u "$windows_path"`
24815    new_path="$unix_path"
24816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24818    new_path="$unix_path"
24819  fi
24820
24821
24822  # Now try to locate executable using which
24823  new_path=`$WHICH "$new_path" 2> /dev/null`
24824
24825  if test "x$new_path" = x; then
24826    # Oops. Which didn't find the executable.
24827    # The splitting of arguments from the executable at a space might have been incorrect,
24828    # since paths with space are more likely in Windows. Give it another try with the whole
24829    # argument.
24830    path="$complete"
24831    arguments="EOL"
24832    new_path="$path"
24833
24834  windows_path="$new_path"
24835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24836    unix_path=`$CYGPATH -u "$windows_path"`
24837    new_path="$unix_path"
24838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24840    new_path="$unix_path"
24841  fi
24842
24843
24844    new_path=`$WHICH "$new_path" 2> /dev/null`
24845
24846    if test "x$new_path" = x; then
24847      # It's still not found. Now this is an unrecoverable error.
24848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24849$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24850      has_space=`$ECHO "$complete" | $GREP " "`
24851      if test "x$has_space" != x; then
24852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24854      fi
24855      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24856    fi
24857  fi
24858
24859  # Now new_path has a complete unix path to the binary
24860  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24861    # Keep paths in /bin as-is, but remove trailing .exe if any
24862    new_path="${new_path/%.exe/}"
24863    # Do not save /bin paths to all_fixpath_prefixes!
24864  else
24865    # Not in mixed or Windows style, start by that.
24866    new_path=`cmd //c echo $new_path`
24867
24868  input_path="$new_path"
24869  # Check if we need to convert this using DOS-style short mode. If the path
24870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24871  # take no chances and rewrite it.
24872  # Note: m4 eats our [], so we need to use [ and ] instead.
24873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24874  if test "x$has_forbidden_chars" != x; then
24875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24877  fi
24878
24879    # Output is in $new_path
24880
24881  windows_path="$new_path"
24882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24883    unix_path=`$CYGPATH -u "$windows_path"`
24884    new_path="$unix_path"
24885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24887    new_path="$unix_path"
24888  fi
24889
24890    # remove trailing .exe if any
24891    new_path="${new_path/%.exe/}"
24892
24893    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24894    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24895  fi
24896
24897  else
24898    # We're on a posix platform. Hooray! :)
24899    # First separate the path from the arguments. This will split at the first
24900    # space.
24901    complete="$NM"
24902    path="${complete%% *}"
24903    tmp="$complete EOL"
24904    arguments="${tmp#* }"
24905
24906    # Cannot rely on the command "which" here since it doesn't always work.
24907    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24908    if test -z "$is_absolute_path"; then
24909      # Path to executable is not absolute. Find it.
24910      IFS_save="$IFS"
24911      IFS=:
24912      for p in $PATH; do
24913        if test -f "$p/$path" && test -x "$p/$path"; then
24914          new_path="$p/$path"
24915          break
24916        fi
24917      done
24918      IFS="$IFS_save"
24919    else
24920      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24921$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24922      new_path="$path"
24923    fi
24924
24925    if test "x$new_path" = x; then
24926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24927$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24928        has_space=`$ECHO "$complete" | $GREP " "`
24929        if test "x$has_space" != x; then
24930          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24931$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24932        fi
24933        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24934      fi
24935  fi
24936
24937      # Now join together the path and the arguments once again
24938      if test "x$arguments" != xEOL; then
24939        new_complete="$new_path ${arguments% *}"
24940      else
24941        new_complete="$new_path"
24942      fi
24943
24944  if test "x$complete" != "x$new_complete"; then
24945      NM="$new_complete"
24946      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24947$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24948    fi
24949
24950    # Extract the first word of "strip", so it can be a program name with args.
24951set dummy strip; ac_word=$2
24952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24953$as_echo_n "checking for $ac_word... " >&6; }
24954if ${ac_cv_path_STRIP+:} false; then :
24955  $as_echo_n "(cached) " >&6
24956else
24957  case $STRIP in
24958  [\\/]* | ?:[\\/]*)
24959  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24960  ;;
24961  *)
24962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24963for as_dir in $PATH
24964do
24965  IFS=$as_save_IFS
24966  test -z "$as_dir" && as_dir=.
24967    for ac_exec_ext in '' $ac_executable_extensions; do
24968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24969    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24971    break 2
24972  fi
24973done
24974  done
24975IFS=$as_save_IFS
24976
24977  ;;
24978esac
24979fi
24980STRIP=$ac_cv_path_STRIP
24981if test -n "$STRIP"; then
24982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24983$as_echo "$STRIP" >&6; }
24984else
24985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24986$as_echo "no" >&6; }
24987fi
24988
24989
24990
24991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24992
24993  # First separate the path from the arguments. This will split at the first
24994  # space.
24995  complete="$STRIP"
24996  path="${complete%% *}"
24997  tmp="$complete EOL"
24998  arguments="${tmp#* }"
24999
25000  # Input might be given as Windows format, start by converting to
25001  # unix format.
25002  new_path=`$CYGPATH -u "$path"`
25003
25004  # Now try to locate executable using which
25005  new_path=`$WHICH "$new_path" 2> /dev/null`
25006  # bat and cmd files are not always considered executable in cygwin causing which
25007  # to not find them
25008  if test "x$new_path" = x \
25009           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25010           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25011    new_path=`$CYGPATH -u "$path"`
25012  fi
25013  if test "x$new_path" = x; then
25014    # Oops. Which didn't find the executable.
25015    # The splitting of arguments from the executable at a space might have been incorrect,
25016    # since paths with space are more likely in Windows. Give it another try with the whole
25017    # argument.
25018    path="$complete"
25019    arguments="EOL"
25020    new_path=`$CYGPATH -u "$path"`
25021    new_path=`$WHICH "$new_path" 2> /dev/null`
25022    # bat and cmd files are not always considered executable in cygwin causing which
25023    # to not find them
25024    if test "x$new_path" = x \
25025             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25026             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25027      new_path=`$CYGPATH -u "$path"`
25028    fi
25029    if test "x$new_path" = x; then
25030      # It's still not found. Now this is an unrecoverable error.
25031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25032$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25033      has_space=`$ECHO "$complete" | $GREP " "`
25034      if test "x$has_space" != x; then
25035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25037      fi
25038      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25039    fi
25040  fi
25041
25042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25045  # "foo.exe" is OK but "foo" is an error.
25046  #
25047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25048  # It is also a way to make sure we got the proper file name for the real test later on.
25049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25050  if test "x$test_shortpath" = x; then
25051    # Short path failed, file does not exist as specified.
25052    # Try adding .exe or .cmd
25053    if test -f "${new_path}.exe"; then
25054       input_to_shortpath="${new_path}.exe"
25055    elif test -f "${new_path}.cmd"; then
25056       input_to_shortpath="${new_path}.cmd"
25057    else
25058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25059$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25060      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25061$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25062      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25063    fi
25064  else
25065    input_to_shortpath="$new_path"
25066  fi
25067
25068  # Call helper function which possibly converts this using DOS-style short mode.
25069  # If so, the updated path is stored in $new_path.
25070  new_path="$input_to_shortpath"
25071
25072  input_path="$input_to_shortpath"
25073  # Check if we need to convert this using DOS-style short mode. If the path
25074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25075  # take no chances and rewrite it.
25076  # Note: m4 eats our [], so we need to use [ and ] instead.
25077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25078  if test "x$has_forbidden_chars" != x; then
25079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25083      # Going to short mode and back again did indeed matter. Since short mode is
25084      # case insensitive, let's make it lowercase to improve readability.
25085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25086      # Now convert it back to Unix-stile (cygpath)
25087      input_path=`$CYGPATH -u "$shortmode_path"`
25088      new_path="$input_path"
25089    fi
25090  fi
25091
25092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25093  if test "x$test_cygdrive_prefix" = x; then
25094    # As a simple fix, exclude /usr/bin since it's not a real path.
25095    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25097      # a path prefixed by /cygdrive for fixpath to work.
25098      new_path="$CYGWIN_ROOT_PATH$input_path"
25099    fi
25100  fi
25101
25102  # remove trailing .exe if any
25103  new_path="${new_path/%.exe/}"
25104
25105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25106
25107  # First separate the path from the arguments. This will split at the first
25108  # space.
25109  complete="$STRIP"
25110  path="${complete%% *}"
25111  tmp="$complete EOL"
25112  arguments="${tmp#* }"
25113
25114  # Input might be given as Windows format, start by converting to
25115  # unix format.
25116  new_path="$path"
25117
25118  windows_path="$new_path"
25119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25120    unix_path=`$CYGPATH -u "$windows_path"`
25121    new_path="$unix_path"
25122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25124    new_path="$unix_path"
25125  fi
25126
25127
25128  # Now try to locate executable using which
25129  new_path=`$WHICH "$new_path" 2> /dev/null`
25130
25131  if test "x$new_path" = x; then
25132    # Oops. Which didn't find the executable.
25133    # The splitting of arguments from the executable at a space might have been incorrect,
25134    # since paths with space are more likely in Windows. Give it another try with the whole
25135    # argument.
25136    path="$complete"
25137    arguments="EOL"
25138    new_path="$path"
25139
25140  windows_path="$new_path"
25141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25142    unix_path=`$CYGPATH -u "$windows_path"`
25143    new_path="$unix_path"
25144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25146    new_path="$unix_path"
25147  fi
25148
25149
25150    new_path=`$WHICH "$new_path" 2> /dev/null`
25151
25152    if test "x$new_path" = x; then
25153      # It's still not found. Now this is an unrecoverable error.
25154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25155$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25156      has_space=`$ECHO "$complete" | $GREP " "`
25157      if test "x$has_space" != x; then
25158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25160      fi
25161      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25162    fi
25163  fi
25164
25165  # Now new_path has a complete unix path to the binary
25166  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25167    # Keep paths in /bin as-is, but remove trailing .exe if any
25168    new_path="${new_path/%.exe/}"
25169    # Do not save /bin paths to all_fixpath_prefixes!
25170  else
25171    # Not in mixed or Windows style, start by that.
25172    new_path=`cmd //c echo $new_path`
25173
25174  input_path="$new_path"
25175  # Check if we need to convert this using DOS-style short mode. If the path
25176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25177  # take no chances and rewrite it.
25178  # Note: m4 eats our [], so we need to use [ and ] instead.
25179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25180  if test "x$has_forbidden_chars" != x; then
25181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25183  fi
25184
25185    # Output is in $new_path
25186
25187  windows_path="$new_path"
25188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25189    unix_path=`$CYGPATH -u "$windows_path"`
25190    new_path="$unix_path"
25191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25193    new_path="$unix_path"
25194  fi
25195
25196    # remove trailing .exe if any
25197    new_path="${new_path/%.exe/}"
25198
25199    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25200    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25201  fi
25202
25203  else
25204    # We're on a posix platform. Hooray! :)
25205    # First separate the path from the arguments. This will split at the first
25206    # space.
25207    complete="$STRIP"
25208    path="${complete%% *}"
25209    tmp="$complete EOL"
25210    arguments="${tmp#* }"
25211
25212    # Cannot rely on the command "which" here since it doesn't always work.
25213    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25214    if test -z "$is_absolute_path"; then
25215      # Path to executable is not absolute. Find it.
25216      IFS_save="$IFS"
25217      IFS=:
25218      for p in $PATH; do
25219        if test -f "$p/$path" && test -x "$p/$path"; then
25220          new_path="$p/$path"
25221          break
25222        fi
25223      done
25224      IFS="$IFS_save"
25225    else
25226      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25227$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25228      new_path="$path"
25229    fi
25230
25231    if test "x$new_path" = x; then
25232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25233$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25234        has_space=`$ECHO "$complete" | $GREP " "`
25235        if test "x$has_space" != x; then
25236          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25237$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25238        fi
25239        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25240      fi
25241  fi
25242
25243      # Now join together the path and the arguments once again
25244      if test "x$arguments" != xEOL; then
25245        new_complete="$new_path ${arguments% *}"
25246      else
25247        new_complete="$new_path"
25248      fi
25249
25250  if test "x$complete" != "x$new_complete"; then
25251      STRIP="$new_complete"
25252      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25253$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25254    fi
25255
25256    # Extract the first word of "mcs", so it can be a program name with args.
25257set dummy mcs; ac_word=$2
25258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25259$as_echo_n "checking for $ac_word... " >&6; }
25260if ${ac_cv_path_MCS+:} false; then :
25261  $as_echo_n "(cached) " >&6
25262else
25263  case $MCS in
25264  [\\/]* | ?:[\\/]*)
25265  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25266  ;;
25267  *)
25268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25269for as_dir in $PATH
25270do
25271  IFS=$as_save_IFS
25272  test -z "$as_dir" && as_dir=.
25273    for ac_exec_ext in '' $ac_executable_extensions; do
25274  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25275    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25277    break 2
25278  fi
25279done
25280  done
25281IFS=$as_save_IFS
25282
25283  ;;
25284esac
25285fi
25286MCS=$ac_cv_path_MCS
25287if test -n "$MCS"; then
25288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25289$as_echo "$MCS" >&6; }
25290else
25291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25292$as_echo "no" >&6; }
25293fi
25294
25295
25296
25297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25298
25299  # First separate the path from the arguments. This will split at the first
25300  # space.
25301  complete="$MCS"
25302  path="${complete%% *}"
25303  tmp="$complete EOL"
25304  arguments="${tmp#* }"
25305
25306  # Input might be given as Windows format, start by converting to
25307  # unix format.
25308  new_path=`$CYGPATH -u "$path"`
25309
25310  # Now try to locate executable using which
25311  new_path=`$WHICH "$new_path" 2> /dev/null`
25312  # bat and cmd files are not always considered executable in cygwin causing which
25313  # to not find them
25314  if test "x$new_path" = x \
25315           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25316           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25317    new_path=`$CYGPATH -u "$path"`
25318  fi
25319  if test "x$new_path" = x; then
25320    # Oops. Which didn't find the executable.
25321    # The splitting of arguments from the executable at a space might have been incorrect,
25322    # since paths with space are more likely in Windows. Give it another try with the whole
25323    # argument.
25324    path="$complete"
25325    arguments="EOL"
25326    new_path=`$CYGPATH -u "$path"`
25327    new_path=`$WHICH "$new_path" 2> /dev/null`
25328    # bat and cmd files are not always considered executable in cygwin causing which
25329    # to not find them
25330    if test "x$new_path" = x \
25331             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25332             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25333      new_path=`$CYGPATH -u "$path"`
25334    fi
25335    if test "x$new_path" = x; then
25336      # It's still not found. Now this is an unrecoverable error.
25337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25338$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25339      has_space=`$ECHO "$complete" | $GREP " "`
25340      if test "x$has_space" != x; then
25341        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25343      fi
25344      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25345    fi
25346  fi
25347
25348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25351  # "foo.exe" is OK but "foo" is an error.
25352  #
25353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25354  # It is also a way to make sure we got the proper file name for the real test later on.
25355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25356  if test "x$test_shortpath" = x; then
25357    # Short path failed, file does not exist as specified.
25358    # Try adding .exe or .cmd
25359    if test -f "${new_path}.exe"; then
25360       input_to_shortpath="${new_path}.exe"
25361    elif test -f "${new_path}.cmd"; then
25362       input_to_shortpath="${new_path}.cmd"
25363    else
25364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25365$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25366      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25367$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25368      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25369    fi
25370  else
25371    input_to_shortpath="$new_path"
25372  fi
25373
25374  # Call helper function which possibly converts this using DOS-style short mode.
25375  # If so, the updated path is stored in $new_path.
25376  new_path="$input_to_shortpath"
25377
25378  input_path="$input_to_shortpath"
25379  # Check if we need to convert this using DOS-style short mode. If the path
25380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25381  # take no chances and rewrite it.
25382  # Note: m4 eats our [], so we need to use [ and ] instead.
25383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25384  if test "x$has_forbidden_chars" != x; then
25385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25389      # Going to short mode and back again did indeed matter. Since short mode is
25390      # case insensitive, let's make it lowercase to improve readability.
25391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25392      # Now convert it back to Unix-stile (cygpath)
25393      input_path=`$CYGPATH -u "$shortmode_path"`
25394      new_path="$input_path"
25395    fi
25396  fi
25397
25398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25399  if test "x$test_cygdrive_prefix" = x; then
25400    # As a simple fix, exclude /usr/bin since it's not a real path.
25401    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25403      # a path prefixed by /cygdrive for fixpath to work.
25404      new_path="$CYGWIN_ROOT_PATH$input_path"
25405    fi
25406  fi
25407
25408  # remove trailing .exe if any
25409  new_path="${new_path/%.exe/}"
25410
25411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25412
25413  # First separate the path from the arguments. This will split at the first
25414  # space.
25415  complete="$MCS"
25416  path="${complete%% *}"
25417  tmp="$complete EOL"
25418  arguments="${tmp#* }"
25419
25420  # Input might be given as Windows format, start by converting to
25421  # unix format.
25422  new_path="$path"
25423
25424  windows_path="$new_path"
25425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25426    unix_path=`$CYGPATH -u "$windows_path"`
25427    new_path="$unix_path"
25428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25430    new_path="$unix_path"
25431  fi
25432
25433
25434  # Now try to locate executable using which
25435  new_path=`$WHICH "$new_path" 2> /dev/null`
25436
25437  if test "x$new_path" = x; then
25438    # Oops. Which didn't find the executable.
25439    # The splitting of arguments from the executable at a space might have been incorrect,
25440    # since paths with space are more likely in Windows. Give it another try with the whole
25441    # argument.
25442    path="$complete"
25443    arguments="EOL"
25444    new_path="$path"
25445
25446  windows_path="$new_path"
25447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25448    unix_path=`$CYGPATH -u "$windows_path"`
25449    new_path="$unix_path"
25450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25452    new_path="$unix_path"
25453  fi
25454
25455
25456    new_path=`$WHICH "$new_path" 2> /dev/null`
25457
25458    if test "x$new_path" = x; then
25459      # It's still not found. Now this is an unrecoverable error.
25460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25461$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25462      has_space=`$ECHO "$complete" | $GREP " "`
25463      if test "x$has_space" != x; then
25464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25466      fi
25467      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25468    fi
25469  fi
25470
25471  # Now new_path has a complete unix path to the binary
25472  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25473    # Keep paths in /bin as-is, but remove trailing .exe if any
25474    new_path="${new_path/%.exe/}"
25475    # Do not save /bin paths to all_fixpath_prefixes!
25476  else
25477    # Not in mixed or Windows style, start by that.
25478    new_path=`cmd //c echo $new_path`
25479
25480  input_path="$new_path"
25481  # Check if we need to convert this using DOS-style short mode. If the path
25482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25483  # take no chances and rewrite it.
25484  # Note: m4 eats our [], so we need to use [ and ] instead.
25485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25486  if test "x$has_forbidden_chars" != x; then
25487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25489  fi
25490
25491    # Output is in $new_path
25492
25493  windows_path="$new_path"
25494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25495    unix_path=`$CYGPATH -u "$windows_path"`
25496    new_path="$unix_path"
25497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25499    new_path="$unix_path"
25500  fi
25501
25502    # remove trailing .exe if any
25503    new_path="${new_path/%.exe/}"
25504
25505    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25506    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25507  fi
25508
25509  else
25510    # We're on a posix platform. Hooray! :)
25511    # First separate the path from the arguments. This will split at the first
25512    # space.
25513    complete="$MCS"
25514    path="${complete%% *}"
25515    tmp="$complete EOL"
25516    arguments="${tmp#* }"
25517
25518    # Cannot rely on the command "which" here since it doesn't always work.
25519    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25520    if test -z "$is_absolute_path"; then
25521      # Path to executable is not absolute. Find it.
25522      IFS_save="$IFS"
25523      IFS=:
25524      for p in $PATH; do
25525        if test -f "$p/$path" && test -x "$p/$path"; then
25526          new_path="$p/$path"
25527          break
25528        fi
25529      done
25530      IFS="$IFS_save"
25531    else
25532      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25533$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25534      new_path="$path"
25535    fi
25536
25537    if test "x$new_path" = x; then
25538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25539$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25540        has_space=`$ECHO "$complete" | $GREP " "`
25541        if test "x$has_space" != x; then
25542          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25543$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25544        fi
25545        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25546      fi
25547  fi
25548
25549      # Now join together the path and the arguments once again
25550      if test "x$arguments" != xEOL; then
25551        new_complete="$new_path ${arguments% *}"
25552      else
25553        new_complete="$new_path"
25554      fi
25555
25556  if test "x$complete" != "x$new_complete"; then
25557      MCS="$new_complete"
25558      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25559$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25560    fi
25561
25562elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25563    if test -n "$ac_tool_prefix"; then
25564  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25565set dummy ${ac_tool_prefix}nm; ac_word=$2
25566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25567$as_echo_n "checking for $ac_word... " >&6; }
25568if ${ac_cv_prog_NM+:} false; then :
25569  $as_echo_n "(cached) " >&6
25570else
25571  if test -n "$NM"; then
25572  ac_cv_prog_NM="$NM" # Let the user override the test.
25573else
25574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25575for as_dir in $PATH
25576do
25577  IFS=$as_save_IFS
25578  test -z "$as_dir" && as_dir=.
25579    for ac_exec_ext in '' $ac_executable_extensions; do
25580  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25581    ac_cv_prog_NM="${ac_tool_prefix}nm"
25582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25583    break 2
25584  fi
25585done
25586  done
25587IFS=$as_save_IFS
25588
25589fi
25590fi
25591NM=$ac_cv_prog_NM
25592if test -n "$NM"; then
25593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25594$as_echo "$NM" >&6; }
25595else
25596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25597$as_echo "no" >&6; }
25598fi
25599
25600
25601fi
25602if test -z "$ac_cv_prog_NM"; then
25603  ac_ct_NM=$NM
25604  # Extract the first word of "nm", so it can be a program name with args.
25605set dummy nm; ac_word=$2
25606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25607$as_echo_n "checking for $ac_word... " >&6; }
25608if ${ac_cv_prog_ac_ct_NM+:} false; then :
25609  $as_echo_n "(cached) " >&6
25610else
25611  if test -n "$ac_ct_NM"; then
25612  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25613else
25614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25615for as_dir in $PATH
25616do
25617  IFS=$as_save_IFS
25618  test -z "$as_dir" && as_dir=.
25619    for ac_exec_ext in '' $ac_executable_extensions; do
25620  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25621    ac_cv_prog_ac_ct_NM="nm"
25622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25623    break 2
25624  fi
25625done
25626  done
25627IFS=$as_save_IFS
25628
25629fi
25630fi
25631ac_ct_NM=$ac_cv_prog_ac_ct_NM
25632if test -n "$ac_ct_NM"; then
25633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25634$as_echo "$ac_ct_NM" >&6; }
25635else
25636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25637$as_echo "no" >&6; }
25638fi
25639
25640  if test "x$ac_ct_NM" = x; then
25641    NM=""
25642  else
25643    case $cross_compiling:$ac_tool_warned in
25644yes:)
25645{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25646$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25647ac_tool_warned=yes ;;
25648esac
25649    NM=$ac_ct_NM
25650  fi
25651else
25652  NM="$ac_cv_prog_NM"
25653fi
25654
25655
25656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25657
25658  # First separate the path from the arguments. This will split at the first
25659  # space.
25660  complete="$NM"
25661  path="${complete%% *}"
25662  tmp="$complete EOL"
25663  arguments="${tmp#* }"
25664
25665  # Input might be given as Windows format, start by converting to
25666  # unix format.
25667  new_path=`$CYGPATH -u "$path"`
25668
25669  # Now try to locate executable using which
25670  new_path=`$WHICH "$new_path" 2> /dev/null`
25671  # bat and cmd files are not always considered executable in cygwin causing which
25672  # to not find them
25673  if test "x$new_path" = x \
25674           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25675           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25676    new_path=`$CYGPATH -u "$path"`
25677  fi
25678  if test "x$new_path" = x; then
25679    # Oops. Which didn't find the executable.
25680    # The splitting of arguments from the executable at a space might have been incorrect,
25681    # since paths with space are more likely in Windows. Give it another try with the whole
25682    # argument.
25683    path="$complete"
25684    arguments="EOL"
25685    new_path=`$CYGPATH -u "$path"`
25686    new_path=`$WHICH "$new_path" 2> /dev/null`
25687    # bat and cmd files are not always considered executable in cygwin causing which
25688    # to not find them
25689    if test "x$new_path" = x \
25690             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25691             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25692      new_path=`$CYGPATH -u "$path"`
25693    fi
25694    if test "x$new_path" = x; then
25695      # It's still not found. Now this is an unrecoverable error.
25696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25697$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25698      has_space=`$ECHO "$complete" | $GREP " "`
25699      if test "x$has_space" != x; then
25700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25702      fi
25703      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25704    fi
25705  fi
25706
25707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25710  # "foo.exe" is OK but "foo" is an error.
25711  #
25712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25713  # It is also a way to make sure we got the proper file name for the real test later on.
25714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25715  if test "x$test_shortpath" = x; then
25716    # Short path failed, file does not exist as specified.
25717    # Try adding .exe or .cmd
25718    if test -f "${new_path}.exe"; then
25719       input_to_shortpath="${new_path}.exe"
25720    elif test -f "${new_path}.cmd"; then
25721       input_to_shortpath="${new_path}.cmd"
25722    else
25723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25724$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25725      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25726$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25727      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25728    fi
25729  else
25730    input_to_shortpath="$new_path"
25731  fi
25732
25733  # Call helper function which possibly converts this using DOS-style short mode.
25734  # If so, the updated path is stored in $new_path.
25735  new_path="$input_to_shortpath"
25736
25737  input_path="$input_to_shortpath"
25738  # Check if we need to convert this using DOS-style short mode. If the path
25739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25740  # take no chances and rewrite it.
25741  # Note: m4 eats our [], so we need to use [ and ] instead.
25742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25743  if test "x$has_forbidden_chars" != x; then
25744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25748      # Going to short mode and back again did indeed matter. Since short mode is
25749      # case insensitive, let's make it lowercase to improve readability.
25750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25751      # Now convert it back to Unix-stile (cygpath)
25752      input_path=`$CYGPATH -u "$shortmode_path"`
25753      new_path="$input_path"
25754    fi
25755  fi
25756
25757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25758  if test "x$test_cygdrive_prefix" = x; then
25759    # As a simple fix, exclude /usr/bin since it's not a real path.
25760    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25762      # a path prefixed by /cygdrive for fixpath to work.
25763      new_path="$CYGWIN_ROOT_PATH$input_path"
25764    fi
25765  fi
25766
25767  # remove trailing .exe if any
25768  new_path="${new_path/%.exe/}"
25769
25770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25771
25772  # First separate the path from the arguments. This will split at the first
25773  # space.
25774  complete="$NM"
25775  path="${complete%% *}"
25776  tmp="$complete EOL"
25777  arguments="${tmp#* }"
25778
25779  # Input might be given as Windows format, start by converting to
25780  # unix format.
25781  new_path="$path"
25782
25783  windows_path="$new_path"
25784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25785    unix_path=`$CYGPATH -u "$windows_path"`
25786    new_path="$unix_path"
25787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25789    new_path="$unix_path"
25790  fi
25791
25792
25793  # Now try to locate executable using which
25794  new_path=`$WHICH "$new_path" 2> /dev/null`
25795
25796  if test "x$new_path" = x; then
25797    # Oops. Which didn't find the executable.
25798    # The splitting of arguments from the executable at a space might have been incorrect,
25799    # since paths with space are more likely in Windows. Give it another try with the whole
25800    # argument.
25801    path="$complete"
25802    arguments="EOL"
25803    new_path="$path"
25804
25805  windows_path="$new_path"
25806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25807    unix_path=`$CYGPATH -u "$windows_path"`
25808    new_path="$unix_path"
25809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25811    new_path="$unix_path"
25812  fi
25813
25814
25815    new_path=`$WHICH "$new_path" 2> /dev/null`
25816
25817    if test "x$new_path" = x; then
25818      # It's still not found. Now this is an unrecoverable error.
25819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25820$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25821      has_space=`$ECHO "$complete" | $GREP " "`
25822      if test "x$has_space" != x; then
25823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25825      fi
25826      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25827    fi
25828  fi
25829
25830  # Now new_path has a complete unix path to the binary
25831  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25832    # Keep paths in /bin as-is, but remove trailing .exe if any
25833    new_path="${new_path/%.exe/}"
25834    # Do not save /bin paths to all_fixpath_prefixes!
25835  else
25836    # Not in mixed or Windows style, start by that.
25837    new_path=`cmd //c echo $new_path`
25838
25839  input_path="$new_path"
25840  # Check if we need to convert this using DOS-style short mode. If the path
25841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25842  # take no chances and rewrite it.
25843  # Note: m4 eats our [], so we need to use [ and ] instead.
25844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25845  if test "x$has_forbidden_chars" != x; then
25846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25848  fi
25849
25850    # Output is in $new_path
25851
25852  windows_path="$new_path"
25853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25854    unix_path=`$CYGPATH -u "$windows_path"`
25855    new_path="$unix_path"
25856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25858    new_path="$unix_path"
25859  fi
25860
25861    # remove trailing .exe if any
25862    new_path="${new_path/%.exe/}"
25863
25864    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25865    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25866  fi
25867
25868  else
25869    # We're on a posix platform. Hooray! :)
25870    # First separate the path from the arguments. This will split at the first
25871    # space.
25872    complete="$NM"
25873    path="${complete%% *}"
25874    tmp="$complete EOL"
25875    arguments="${tmp#* }"
25876
25877    # Cannot rely on the command "which" here since it doesn't always work.
25878    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25879    if test -z "$is_absolute_path"; then
25880      # Path to executable is not absolute. Find it.
25881      IFS_save="$IFS"
25882      IFS=:
25883      for p in $PATH; do
25884        if test -f "$p/$path" && test -x "$p/$path"; then
25885          new_path="$p/$path"
25886          break
25887        fi
25888      done
25889      IFS="$IFS_save"
25890    else
25891      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25892$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25893      new_path="$path"
25894    fi
25895
25896    if test "x$new_path" = x; then
25897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25898$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25899        has_space=`$ECHO "$complete" | $GREP " "`
25900        if test "x$has_space" != x; then
25901          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25903        fi
25904        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25905      fi
25906  fi
25907
25908      # Now join together the path and the arguments once again
25909      if test "x$arguments" != xEOL; then
25910        new_complete="$new_path ${arguments% *}"
25911      else
25912        new_complete="$new_path"
25913      fi
25914
25915  if test "x$complete" != "x$new_complete"; then
25916      NM="$new_complete"
25917      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25918$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25919    fi
25920
25921    if test -n "$ac_tool_prefix"; then
25922  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25923set dummy ${ac_tool_prefix}strip; ac_word=$2
25924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25925$as_echo_n "checking for $ac_word... " >&6; }
25926if ${ac_cv_prog_STRIP+:} false; then :
25927  $as_echo_n "(cached) " >&6
25928else
25929  if test -n "$STRIP"; then
25930  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25931else
25932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25933for as_dir in $PATH
25934do
25935  IFS=$as_save_IFS
25936  test -z "$as_dir" && as_dir=.
25937    for ac_exec_ext in '' $ac_executable_extensions; do
25938  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25939    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25941    break 2
25942  fi
25943done
25944  done
25945IFS=$as_save_IFS
25946
25947fi
25948fi
25949STRIP=$ac_cv_prog_STRIP
25950if test -n "$STRIP"; then
25951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25952$as_echo "$STRIP" >&6; }
25953else
25954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25955$as_echo "no" >&6; }
25956fi
25957
25958
25959fi
25960if test -z "$ac_cv_prog_STRIP"; then
25961  ac_ct_STRIP=$STRIP
25962  # Extract the first word of "strip", so it can be a program name with args.
25963set dummy strip; ac_word=$2
25964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25965$as_echo_n "checking for $ac_word... " >&6; }
25966if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
25967  $as_echo_n "(cached) " >&6
25968else
25969  if test -n "$ac_ct_STRIP"; then
25970  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25971else
25972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25973for as_dir in $PATH
25974do
25975  IFS=$as_save_IFS
25976  test -z "$as_dir" && as_dir=.
25977    for ac_exec_ext in '' $ac_executable_extensions; do
25978  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25979    ac_cv_prog_ac_ct_STRIP="strip"
25980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25981    break 2
25982  fi
25983done
25984  done
25985IFS=$as_save_IFS
25986
25987fi
25988fi
25989ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25990if test -n "$ac_ct_STRIP"; then
25991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25992$as_echo "$ac_ct_STRIP" >&6; }
25993else
25994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25995$as_echo "no" >&6; }
25996fi
25997
25998  if test "x$ac_ct_STRIP" = x; then
25999    STRIP=""
26000  else
26001    case $cross_compiling:$ac_tool_warned in
26002yes:)
26003{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26004$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26005ac_tool_warned=yes ;;
26006esac
26007    STRIP=$ac_ct_STRIP
26008  fi
26009else
26010  STRIP="$ac_cv_prog_STRIP"
26011fi
26012
26013
26014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26015
26016  # First separate the path from the arguments. This will split at the first
26017  # space.
26018  complete="$STRIP"
26019  path="${complete%% *}"
26020  tmp="$complete EOL"
26021  arguments="${tmp#* }"
26022
26023  # Input might be given as Windows format, start by converting to
26024  # unix format.
26025  new_path=`$CYGPATH -u "$path"`
26026
26027  # Now try to locate executable using which
26028  new_path=`$WHICH "$new_path" 2> /dev/null`
26029  # bat and cmd files are not always considered executable in cygwin causing which
26030  # to not find them
26031  if test "x$new_path" = x \
26032           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26033           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26034    new_path=`$CYGPATH -u "$path"`
26035  fi
26036  if test "x$new_path" = x; then
26037    # Oops. Which didn't find the executable.
26038    # The splitting of arguments from the executable at a space might have been incorrect,
26039    # since paths with space are more likely in Windows. Give it another try with the whole
26040    # argument.
26041    path="$complete"
26042    arguments="EOL"
26043    new_path=`$CYGPATH -u "$path"`
26044    new_path=`$WHICH "$new_path" 2> /dev/null`
26045    # bat and cmd files are not always considered executable in cygwin causing which
26046    # to not find them
26047    if test "x$new_path" = x \
26048             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26049             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26050      new_path=`$CYGPATH -u "$path"`
26051    fi
26052    if test "x$new_path" = x; then
26053      # It's still not found. Now this is an unrecoverable error.
26054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26055$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26056      has_space=`$ECHO "$complete" | $GREP " "`
26057      if test "x$has_space" != x; then
26058        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26059$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26060      fi
26061      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26062    fi
26063  fi
26064
26065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26068  # "foo.exe" is OK but "foo" is an error.
26069  #
26070  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26071  # It is also a way to make sure we got the proper file name for the real test later on.
26072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26073  if test "x$test_shortpath" = x; then
26074    # Short path failed, file does not exist as specified.
26075    # Try adding .exe or .cmd
26076    if test -f "${new_path}.exe"; then
26077       input_to_shortpath="${new_path}.exe"
26078    elif test -f "${new_path}.cmd"; then
26079       input_to_shortpath="${new_path}.cmd"
26080    else
26081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26082$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26083      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26084$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26085      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26086    fi
26087  else
26088    input_to_shortpath="$new_path"
26089  fi
26090
26091  # Call helper function which possibly converts this using DOS-style short mode.
26092  # If so, the updated path is stored in $new_path.
26093  new_path="$input_to_shortpath"
26094
26095  input_path="$input_to_shortpath"
26096  # Check if we need to convert this using DOS-style short mode. If the path
26097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26098  # take no chances and rewrite it.
26099  # Note: m4 eats our [], so we need to use [ and ] instead.
26100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26101  if test "x$has_forbidden_chars" != x; then
26102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26106      # Going to short mode and back again did indeed matter. Since short mode is
26107      # case insensitive, let's make it lowercase to improve readability.
26108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26109      # Now convert it back to Unix-stile (cygpath)
26110      input_path=`$CYGPATH -u "$shortmode_path"`
26111      new_path="$input_path"
26112    fi
26113  fi
26114
26115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26116  if test "x$test_cygdrive_prefix" = x; then
26117    # As a simple fix, exclude /usr/bin since it's not a real path.
26118    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26120      # a path prefixed by /cygdrive for fixpath to work.
26121      new_path="$CYGWIN_ROOT_PATH$input_path"
26122    fi
26123  fi
26124
26125  # remove trailing .exe if any
26126  new_path="${new_path/%.exe/}"
26127
26128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26129
26130  # First separate the path from the arguments. This will split at the first
26131  # space.
26132  complete="$STRIP"
26133  path="${complete%% *}"
26134  tmp="$complete EOL"
26135  arguments="${tmp#* }"
26136
26137  # Input might be given as Windows format, start by converting to
26138  # unix format.
26139  new_path="$path"
26140
26141  windows_path="$new_path"
26142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26143    unix_path=`$CYGPATH -u "$windows_path"`
26144    new_path="$unix_path"
26145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26147    new_path="$unix_path"
26148  fi
26149
26150
26151  # Now try to locate executable using which
26152  new_path=`$WHICH "$new_path" 2> /dev/null`
26153
26154  if test "x$new_path" = x; then
26155    # Oops. Which didn't find the executable.
26156    # The splitting of arguments from the executable at a space might have been incorrect,
26157    # since paths with space are more likely in Windows. Give it another try with the whole
26158    # argument.
26159    path="$complete"
26160    arguments="EOL"
26161    new_path="$path"
26162
26163  windows_path="$new_path"
26164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26165    unix_path=`$CYGPATH -u "$windows_path"`
26166    new_path="$unix_path"
26167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26169    new_path="$unix_path"
26170  fi
26171
26172
26173    new_path=`$WHICH "$new_path" 2> /dev/null`
26174
26175    if test "x$new_path" = x; then
26176      # It's still not found. Now this is an unrecoverable error.
26177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26178$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26179      has_space=`$ECHO "$complete" | $GREP " "`
26180      if test "x$has_space" != x; then
26181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26183      fi
26184      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26185    fi
26186  fi
26187
26188  # Now new_path has a complete unix path to the binary
26189  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26190    # Keep paths in /bin as-is, but remove trailing .exe if any
26191    new_path="${new_path/%.exe/}"
26192    # Do not save /bin paths to all_fixpath_prefixes!
26193  else
26194    # Not in mixed or Windows style, start by that.
26195    new_path=`cmd //c echo $new_path`
26196
26197  input_path="$new_path"
26198  # Check if we need to convert this using DOS-style short mode. If the path
26199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26200  # take no chances and rewrite it.
26201  # Note: m4 eats our [], so we need to use [ and ] instead.
26202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26203  if test "x$has_forbidden_chars" != x; then
26204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26206  fi
26207
26208    # Output is in $new_path
26209
26210  windows_path="$new_path"
26211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26212    unix_path=`$CYGPATH -u "$windows_path"`
26213    new_path="$unix_path"
26214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26216    new_path="$unix_path"
26217  fi
26218
26219    # remove trailing .exe if any
26220    new_path="${new_path/%.exe/}"
26221
26222    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26223    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26224  fi
26225
26226  else
26227    # We're on a posix platform. Hooray! :)
26228    # First separate the path from the arguments. This will split at the first
26229    # space.
26230    complete="$STRIP"
26231    path="${complete%% *}"
26232    tmp="$complete EOL"
26233    arguments="${tmp#* }"
26234
26235    # Cannot rely on the command "which" here since it doesn't always work.
26236    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26237    if test -z "$is_absolute_path"; then
26238      # Path to executable is not absolute. Find it.
26239      IFS_save="$IFS"
26240      IFS=:
26241      for p in $PATH; do
26242        if test -f "$p/$path" && test -x "$p/$path"; then
26243          new_path="$p/$path"
26244          break
26245        fi
26246      done
26247      IFS="$IFS_save"
26248    else
26249      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26250$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26251      new_path="$path"
26252    fi
26253
26254    if test "x$new_path" = x; then
26255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26256$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26257        has_space=`$ECHO "$complete" | $GREP " "`
26258        if test "x$has_space" != x; then
26259          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26260$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26261        fi
26262        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26263      fi
26264  fi
26265
26266      # Now join together the path and the arguments once again
26267      if test "x$arguments" != xEOL; then
26268        new_complete="$new_path ${arguments% *}"
26269      else
26270        new_complete="$new_path"
26271      fi
26272
26273  if test "x$complete" != "x$new_complete"; then
26274      STRIP="$new_complete"
26275      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26276$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26277    fi
26278
26279fi
26280
26281# objcopy is used for moving debug symbols to separate files when
26282# full debug symbols are enabled.
26283if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26284    if test -n "$ac_tool_prefix"; then
26285  for ac_prog in gobjcopy objcopy
26286  do
26287    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26288set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26290$as_echo_n "checking for $ac_word... " >&6; }
26291if ${ac_cv_prog_OBJCOPY+:} false; then :
26292  $as_echo_n "(cached) " >&6
26293else
26294  if test -n "$OBJCOPY"; then
26295  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26296else
26297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26298for as_dir in $PATH
26299do
26300  IFS=$as_save_IFS
26301  test -z "$as_dir" && as_dir=.
26302    for ac_exec_ext in '' $ac_executable_extensions; do
26303  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26304    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26306    break 2
26307  fi
26308done
26309  done
26310IFS=$as_save_IFS
26311
26312fi
26313fi
26314OBJCOPY=$ac_cv_prog_OBJCOPY
26315if test -n "$OBJCOPY"; then
26316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26317$as_echo "$OBJCOPY" >&6; }
26318else
26319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26320$as_echo "no" >&6; }
26321fi
26322
26323
26324    test -n "$OBJCOPY" && break
26325  done
26326fi
26327if test -z "$OBJCOPY"; then
26328  ac_ct_OBJCOPY=$OBJCOPY
26329  for ac_prog in gobjcopy objcopy
26330do
26331  # Extract the first word of "$ac_prog", so it can be a program name with args.
26332set dummy $ac_prog; ac_word=$2
26333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26334$as_echo_n "checking for $ac_word... " >&6; }
26335if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
26336  $as_echo_n "(cached) " >&6
26337else
26338  if test -n "$ac_ct_OBJCOPY"; then
26339  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26340else
26341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26342for as_dir in $PATH
26343do
26344  IFS=$as_save_IFS
26345  test -z "$as_dir" && as_dir=.
26346    for ac_exec_ext in '' $ac_executable_extensions; do
26347  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26348    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26350    break 2
26351  fi
26352done
26353  done
26354IFS=$as_save_IFS
26355
26356fi
26357fi
26358ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26359if test -n "$ac_ct_OBJCOPY"; then
26360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26361$as_echo "$ac_ct_OBJCOPY" >&6; }
26362else
26363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26364$as_echo "no" >&6; }
26365fi
26366
26367
26368  test -n "$ac_ct_OBJCOPY" && break
26369done
26370
26371  if test "x$ac_ct_OBJCOPY" = x; then
26372    OBJCOPY=""
26373  else
26374    case $cross_compiling:$ac_tool_warned in
26375yes:)
26376{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26377$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26378ac_tool_warned=yes ;;
26379esac
26380    OBJCOPY=$ac_ct_OBJCOPY
26381  fi
26382fi
26383
26384    # Only call fixup if objcopy was found.
26385    if test -n "$OBJCOPY"; then
26386
26387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26388
26389  # First separate the path from the arguments. This will split at the first
26390  # space.
26391  complete="$OBJCOPY"
26392  path="${complete%% *}"
26393  tmp="$complete EOL"
26394  arguments="${tmp#* }"
26395
26396  # Input might be given as Windows format, start by converting to
26397  # unix format.
26398  new_path=`$CYGPATH -u "$path"`
26399
26400  # Now try to locate executable using which
26401  new_path=`$WHICH "$new_path" 2> /dev/null`
26402  # bat and cmd files are not always considered executable in cygwin causing which
26403  # to not find them
26404  if test "x$new_path" = x \
26405           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26406           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26407    new_path=`$CYGPATH -u "$path"`
26408  fi
26409  if test "x$new_path" = x; then
26410    # Oops. Which didn't find the executable.
26411    # The splitting of arguments from the executable at a space might have been incorrect,
26412    # since paths with space are more likely in Windows. Give it another try with the whole
26413    # argument.
26414    path="$complete"
26415    arguments="EOL"
26416    new_path=`$CYGPATH -u "$path"`
26417    new_path=`$WHICH "$new_path" 2> /dev/null`
26418    # bat and cmd files are not always considered executable in cygwin causing which
26419    # to not find them
26420    if test "x$new_path" = x \
26421             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26422             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26423      new_path=`$CYGPATH -u "$path"`
26424    fi
26425    if test "x$new_path" = x; then
26426      # It's still not found. Now this is an unrecoverable error.
26427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26428$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26429      has_space=`$ECHO "$complete" | $GREP " "`
26430      if test "x$has_space" != x; then
26431        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26432$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26433      fi
26434      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26435    fi
26436  fi
26437
26438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26441  # "foo.exe" is OK but "foo" is an error.
26442  #
26443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26444  # It is also a way to make sure we got the proper file name for the real test later on.
26445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26446  if test "x$test_shortpath" = x; then
26447    # Short path failed, file does not exist as specified.
26448    # Try adding .exe or .cmd
26449    if test -f "${new_path}.exe"; then
26450       input_to_shortpath="${new_path}.exe"
26451    elif test -f "${new_path}.cmd"; then
26452       input_to_shortpath="${new_path}.cmd"
26453    else
26454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26455$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26456      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26457$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26458      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26459    fi
26460  else
26461    input_to_shortpath="$new_path"
26462  fi
26463
26464  # Call helper function which possibly converts this using DOS-style short mode.
26465  # If so, the updated path is stored in $new_path.
26466  new_path="$input_to_shortpath"
26467
26468  input_path="$input_to_shortpath"
26469  # Check if we need to convert this using DOS-style short mode. If the path
26470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26471  # take no chances and rewrite it.
26472  # Note: m4 eats our [], so we need to use [ and ] instead.
26473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26474  if test "x$has_forbidden_chars" != x; then
26475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26479      # Going to short mode and back again did indeed matter. Since short mode is
26480      # case insensitive, let's make it lowercase to improve readability.
26481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26482      # Now convert it back to Unix-stile (cygpath)
26483      input_path=`$CYGPATH -u "$shortmode_path"`
26484      new_path="$input_path"
26485    fi
26486  fi
26487
26488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26489  if test "x$test_cygdrive_prefix" = x; then
26490    # As a simple fix, exclude /usr/bin since it's not a real path.
26491    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26493      # a path prefixed by /cygdrive for fixpath to work.
26494      new_path="$CYGWIN_ROOT_PATH$input_path"
26495    fi
26496  fi
26497
26498  # remove trailing .exe if any
26499  new_path="${new_path/%.exe/}"
26500
26501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26502
26503  # First separate the path from the arguments. This will split at the first
26504  # space.
26505  complete="$OBJCOPY"
26506  path="${complete%% *}"
26507  tmp="$complete EOL"
26508  arguments="${tmp#* }"
26509
26510  # Input might be given as Windows format, start by converting to
26511  # unix format.
26512  new_path="$path"
26513
26514  windows_path="$new_path"
26515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26516    unix_path=`$CYGPATH -u "$windows_path"`
26517    new_path="$unix_path"
26518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26520    new_path="$unix_path"
26521  fi
26522
26523
26524  # Now try to locate executable using which
26525  new_path=`$WHICH "$new_path" 2> /dev/null`
26526
26527  if test "x$new_path" = x; then
26528    # Oops. Which didn't find the executable.
26529    # The splitting of arguments from the executable at a space might have been incorrect,
26530    # since paths with space are more likely in Windows. Give it another try with the whole
26531    # argument.
26532    path="$complete"
26533    arguments="EOL"
26534    new_path="$path"
26535
26536  windows_path="$new_path"
26537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26538    unix_path=`$CYGPATH -u "$windows_path"`
26539    new_path="$unix_path"
26540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26542    new_path="$unix_path"
26543  fi
26544
26545
26546    new_path=`$WHICH "$new_path" 2> /dev/null`
26547
26548    if test "x$new_path" = x; then
26549      # It's still not found. Now this is an unrecoverable error.
26550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26551$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26552      has_space=`$ECHO "$complete" | $GREP " "`
26553      if test "x$has_space" != x; then
26554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26556      fi
26557      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26558    fi
26559  fi
26560
26561  # Now new_path has a complete unix path to the binary
26562  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26563    # Keep paths in /bin as-is, but remove trailing .exe if any
26564    new_path="${new_path/%.exe/}"
26565    # Do not save /bin paths to all_fixpath_prefixes!
26566  else
26567    # Not in mixed or Windows style, start by that.
26568    new_path=`cmd //c echo $new_path`
26569
26570  input_path="$new_path"
26571  # Check if we need to convert this using DOS-style short mode. If the path
26572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26573  # take no chances and rewrite it.
26574  # Note: m4 eats our [], so we need to use [ and ] instead.
26575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26576  if test "x$has_forbidden_chars" != x; then
26577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26579  fi
26580
26581    # Output is in $new_path
26582
26583  windows_path="$new_path"
26584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26585    unix_path=`$CYGPATH -u "$windows_path"`
26586    new_path="$unix_path"
26587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26589    new_path="$unix_path"
26590  fi
26591
26592    # remove trailing .exe if any
26593    new_path="${new_path/%.exe/}"
26594
26595    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26596    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26597  fi
26598
26599  else
26600    # We're on a posix platform. Hooray! :)
26601    # First separate the path from the arguments. This will split at the first
26602    # space.
26603    complete="$OBJCOPY"
26604    path="${complete%% *}"
26605    tmp="$complete EOL"
26606    arguments="${tmp#* }"
26607
26608    # Cannot rely on the command "which" here since it doesn't always work.
26609    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26610    if test -z "$is_absolute_path"; then
26611      # Path to executable is not absolute. Find it.
26612      IFS_save="$IFS"
26613      IFS=:
26614      for p in $PATH; do
26615        if test -f "$p/$path" && test -x "$p/$path"; then
26616          new_path="$p/$path"
26617          break
26618        fi
26619      done
26620      IFS="$IFS_save"
26621    else
26622      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26623$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26624      new_path="$path"
26625    fi
26626
26627    if test "x$new_path" = x; then
26628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26629$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26630        has_space=`$ECHO "$complete" | $GREP " "`
26631        if test "x$has_space" != x; then
26632          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26633$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26634        fi
26635        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26636      fi
26637  fi
26638
26639      # Now join together the path and the arguments once again
26640      if test "x$arguments" != xEOL; then
26641        new_complete="$new_path ${arguments% *}"
26642      else
26643        new_complete="$new_path"
26644      fi
26645
26646  if test "x$complete" != "x$new_complete"; then
26647      OBJCOPY="$new_complete"
26648      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26649$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26650    fi
26651
26652    fi
26653fi
26654
26655if test -n "$ac_tool_prefix"; then
26656  for ac_prog in gobjdump objdump
26657  do
26658    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26659set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26661$as_echo_n "checking for $ac_word... " >&6; }
26662if ${ac_cv_prog_OBJDUMP+:} false; then :
26663  $as_echo_n "(cached) " >&6
26664else
26665  if test -n "$OBJDUMP"; then
26666  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26667else
26668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26669for as_dir in $PATH
26670do
26671  IFS=$as_save_IFS
26672  test -z "$as_dir" && as_dir=.
26673    for ac_exec_ext in '' $ac_executable_extensions; do
26674  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26675    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26677    break 2
26678  fi
26679done
26680  done
26681IFS=$as_save_IFS
26682
26683fi
26684fi
26685OBJDUMP=$ac_cv_prog_OBJDUMP
26686if test -n "$OBJDUMP"; then
26687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26688$as_echo "$OBJDUMP" >&6; }
26689else
26690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26691$as_echo "no" >&6; }
26692fi
26693
26694
26695    test -n "$OBJDUMP" && break
26696  done
26697fi
26698if test -z "$OBJDUMP"; then
26699  ac_ct_OBJDUMP=$OBJDUMP
26700  for ac_prog in gobjdump objdump
26701do
26702  # Extract the first word of "$ac_prog", so it can be a program name with args.
26703set dummy $ac_prog; ac_word=$2
26704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26705$as_echo_n "checking for $ac_word... " >&6; }
26706if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
26707  $as_echo_n "(cached) " >&6
26708else
26709  if test -n "$ac_ct_OBJDUMP"; then
26710  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26711else
26712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26713for as_dir in $PATH
26714do
26715  IFS=$as_save_IFS
26716  test -z "$as_dir" && as_dir=.
26717    for ac_exec_ext in '' $ac_executable_extensions; do
26718  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26719    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26721    break 2
26722  fi
26723done
26724  done
26725IFS=$as_save_IFS
26726
26727fi
26728fi
26729ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26730if test -n "$ac_ct_OBJDUMP"; then
26731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26732$as_echo "$ac_ct_OBJDUMP" >&6; }
26733else
26734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26735$as_echo "no" >&6; }
26736fi
26737
26738
26739  test -n "$ac_ct_OBJDUMP" && break
26740done
26741
26742  if test "x$ac_ct_OBJDUMP" = x; then
26743    OBJDUMP=""
26744  else
26745    case $cross_compiling:$ac_tool_warned in
26746yes:)
26747{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26748$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26749ac_tool_warned=yes ;;
26750esac
26751    OBJDUMP=$ac_ct_OBJDUMP
26752  fi
26753fi
26754
26755if test "x$OBJDUMP" != x; then
26756  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26757
26758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26759
26760  # First separate the path from the arguments. This will split at the first
26761  # space.
26762  complete="$OBJDUMP"
26763  path="${complete%% *}"
26764  tmp="$complete EOL"
26765  arguments="${tmp#* }"
26766
26767  # Input might be given as Windows format, start by converting to
26768  # unix format.
26769  new_path=`$CYGPATH -u "$path"`
26770
26771  # Now try to locate executable using which
26772  new_path=`$WHICH "$new_path" 2> /dev/null`
26773  # bat and cmd files are not always considered executable in cygwin causing which
26774  # to not find them
26775  if test "x$new_path" = x \
26776           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26777           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26778    new_path=`$CYGPATH -u "$path"`
26779  fi
26780  if test "x$new_path" = x; then
26781    # Oops. Which didn't find the executable.
26782    # The splitting of arguments from the executable at a space might have been incorrect,
26783    # since paths with space are more likely in Windows. Give it another try with the whole
26784    # argument.
26785    path="$complete"
26786    arguments="EOL"
26787    new_path=`$CYGPATH -u "$path"`
26788    new_path=`$WHICH "$new_path" 2> /dev/null`
26789    # bat and cmd files are not always considered executable in cygwin causing which
26790    # to not find them
26791    if test "x$new_path" = x \
26792             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26793             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26794      new_path=`$CYGPATH -u "$path"`
26795    fi
26796    if test "x$new_path" = x; then
26797      # It's still not found. Now this is an unrecoverable error.
26798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26799$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26800      has_space=`$ECHO "$complete" | $GREP " "`
26801      if test "x$has_space" != x; then
26802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26804      fi
26805      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26806    fi
26807  fi
26808
26809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26812  # "foo.exe" is OK but "foo" is an error.
26813  #
26814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26815  # It is also a way to make sure we got the proper file name for the real test later on.
26816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26817  if test "x$test_shortpath" = x; then
26818    # Short path failed, file does not exist as specified.
26819    # Try adding .exe or .cmd
26820    if test -f "${new_path}.exe"; then
26821       input_to_shortpath="${new_path}.exe"
26822    elif test -f "${new_path}.cmd"; then
26823       input_to_shortpath="${new_path}.cmd"
26824    else
26825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26826$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26827      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26828$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26829      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26830    fi
26831  else
26832    input_to_shortpath="$new_path"
26833  fi
26834
26835  # Call helper function which possibly converts this using DOS-style short mode.
26836  # If so, the updated path is stored in $new_path.
26837  new_path="$input_to_shortpath"
26838
26839  input_path="$input_to_shortpath"
26840  # Check if we need to convert this using DOS-style short mode. If the path
26841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26842  # take no chances and rewrite it.
26843  # Note: m4 eats our [], so we need to use [ and ] instead.
26844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26845  if test "x$has_forbidden_chars" != x; then
26846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26850      # Going to short mode and back again did indeed matter. Since short mode is
26851      # case insensitive, let's make it lowercase to improve readability.
26852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26853      # Now convert it back to Unix-stile (cygpath)
26854      input_path=`$CYGPATH -u "$shortmode_path"`
26855      new_path="$input_path"
26856    fi
26857  fi
26858
26859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26860  if test "x$test_cygdrive_prefix" = x; then
26861    # As a simple fix, exclude /usr/bin since it's not a real path.
26862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26864      # a path prefixed by /cygdrive for fixpath to work.
26865      new_path="$CYGWIN_ROOT_PATH$input_path"
26866    fi
26867  fi
26868
26869  # remove trailing .exe if any
26870  new_path="${new_path/%.exe/}"
26871
26872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26873
26874  # First separate the path from the arguments. This will split at the first
26875  # space.
26876  complete="$OBJDUMP"
26877  path="${complete%% *}"
26878  tmp="$complete EOL"
26879  arguments="${tmp#* }"
26880
26881  # Input might be given as Windows format, start by converting to
26882  # unix format.
26883  new_path="$path"
26884
26885  windows_path="$new_path"
26886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26887    unix_path=`$CYGPATH -u "$windows_path"`
26888    new_path="$unix_path"
26889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26891    new_path="$unix_path"
26892  fi
26893
26894
26895  # Now try to locate executable using which
26896  new_path=`$WHICH "$new_path" 2> /dev/null`
26897
26898  if test "x$new_path" = x; then
26899    # Oops. Which didn't find the executable.
26900    # The splitting of arguments from the executable at a space might have been incorrect,
26901    # since paths with space are more likely in Windows. Give it another try with the whole
26902    # argument.
26903    path="$complete"
26904    arguments="EOL"
26905    new_path="$path"
26906
26907  windows_path="$new_path"
26908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26909    unix_path=`$CYGPATH -u "$windows_path"`
26910    new_path="$unix_path"
26911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26913    new_path="$unix_path"
26914  fi
26915
26916
26917    new_path=`$WHICH "$new_path" 2> /dev/null`
26918
26919    if test "x$new_path" = x; then
26920      # It's still not found. Now this is an unrecoverable error.
26921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26922$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26923      has_space=`$ECHO "$complete" | $GREP " "`
26924      if test "x$has_space" != x; then
26925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26927      fi
26928      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26929    fi
26930  fi
26931
26932  # Now new_path has a complete unix path to the binary
26933  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26934    # Keep paths in /bin as-is, but remove trailing .exe if any
26935    new_path="${new_path/%.exe/}"
26936    # Do not save /bin paths to all_fixpath_prefixes!
26937  else
26938    # Not in mixed or Windows style, start by that.
26939    new_path=`cmd //c echo $new_path`
26940
26941  input_path="$new_path"
26942  # Check if we need to convert this using DOS-style short mode. If the path
26943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26944  # take no chances and rewrite it.
26945  # Note: m4 eats our [], so we need to use [ and ] instead.
26946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26947  if test "x$has_forbidden_chars" != x; then
26948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26950  fi
26951
26952    # Output is in $new_path
26953
26954  windows_path="$new_path"
26955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26956    unix_path=`$CYGPATH -u "$windows_path"`
26957    new_path="$unix_path"
26958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26960    new_path="$unix_path"
26961  fi
26962
26963    # remove trailing .exe if any
26964    new_path="${new_path/%.exe/}"
26965
26966    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26967    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26968  fi
26969
26970  else
26971    # We're on a posix platform. Hooray! :)
26972    # First separate the path from the arguments. This will split at the first
26973    # space.
26974    complete="$OBJDUMP"
26975    path="${complete%% *}"
26976    tmp="$complete EOL"
26977    arguments="${tmp#* }"
26978
26979    # Cannot rely on the command "which" here since it doesn't always work.
26980    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26981    if test -z "$is_absolute_path"; then
26982      # Path to executable is not absolute. Find it.
26983      IFS_save="$IFS"
26984      IFS=:
26985      for p in $PATH; do
26986        if test -f "$p/$path" && test -x "$p/$path"; then
26987          new_path="$p/$path"
26988          break
26989        fi
26990      done
26991      IFS="$IFS_save"
26992    else
26993      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26994$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26995      new_path="$path"
26996    fi
26997
26998    if test "x$new_path" = x; then
26999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27000$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27001        has_space=`$ECHO "$complete" | $GREP " "`
27002        if test "x$has_space" != x; then
27003          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27004$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27005        fi
27006        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27007      fi
27008  fi
27009
27010      # Now join together the path and the arguments once again
27011      if test "x$arguments" != xEOL; then
27012        new_complete="$new_path ${arguments% *}"
27013      else
27014        new_complete="$new_path"
27015      fi
27016
27017  if test "x$complete" != "x$new_complete"; then
27018      OBJDUMP="$new_complete"
27019      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27020$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27021    fi
27022
27023fi
27024
27025if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27026   # Extract the first word of "lipo", so it can be a program name with args.
27027set dummy lipo; ac_word=$2
27028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27029$as_echo_n "checking for $ac_word... " >&6; }
27030if ${ac_cv_path_LIPO+:} false; then :
27031  $as_echo_n "(cached) " >&6
27032else
27033  case $LIPO in
27034  [\\/]* | ?:[\\/]*)
27035  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27036  ;;
27037  *)
27038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27039for as_dir in $PATH
27040do
27041  IFS=$as_save_IFS
27042  test -z "$as_dir" && as_dir=.
27043    for ac_exec_ext in '' $ac_executable_extensions; do
27044  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27045    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27047    break 2
27048  fi
27049done
27050  done
27051IFS=$as_save_IFS
27052
27053  ;;
27054esac
27055fi
27056LIPO=$ac_cv_path_LIPO
27057if test -n "$LIPO"; then
27058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27059$as_echo "$LIPO" >&6; }
27060else
27061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27062$as_echo "no" >&6; }
27063fi
27064
27065
27066
27067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27068
27069  # First separate the path from the arguments. This will split at the first
27070  # space.
27071  complete="$LIPO"
27072  path="${complete%% *}"
27073  tmp="$complete EOL"
27074  arguments="${tmp#* }"
27075
27076  # Input might be given as Windows format, start by converting to
27077  # unix format.
27078  new_path=`$CYGPATH -u "$path"`
27079
27080  # Now try to locate executable using which
27081  new_path=`$WHICH "$new_path" 2> /dev/null`
27082  # bat and cmd files are not always considered executable in cygwin causing which
27083  # to not find them
27084  if test "x$new_path" = x \
27085           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27086           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27087    new_path=`$CYGPATH -u "$path"`
27088  fi
27089  if test "x$new_path" = x; then
27090    # Oops. Which didn't find the executable.
27091    # The splitting of arguments from the executable at a space might have been incorrect,
27092    # since paths with space are more likely in Windows. Give it another try with the whole
27093    # argument.
27094    path="$complete"
27095    arguments="EOL"
27096    new_path=`$CYGPATH -u "$path"`
27097    new_path=`$WHICH "$new_path" 2> /dev/null`
27098    # bat and cmd files are not always considered executable in cygwin causing which
27099    # to not find them
27100    if test "x$new_path" = x \
27101             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27102             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27103      new_path=`$CYGPATH -u "$path"`
27104    fi
27105    if test "x$new_path" = x; then
27106      # It's still not found. Now this is an unrecoverable error.
27107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27108$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27109      has_space=`$ECHO "$complete" | $GREP " "`
27110      if test "x$has_space" != x; then
27111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27113      fi
27114      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27115    fi
27116  fi
27117
27118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27121  # "foo.exe" is OK but "foo" is an error.
27122  #
27123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27124  # It is also a way to make sure we got the proper file name for the real test later on.
27125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27126  if test "x$test_shortpath" = x; then
27127    # Short path failed, file does not exist as specified.
27128    # Try adding .exe or .cmd
27129    if test -f "${new_path}.exe"; then
27130       input_to_shortpath="${new_path}.exe"
27131    elif test -f "${new_path}.cmd"; then
27132       input_to_shortpath="${new_path}.cmd"
27133    else
27134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27135$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27136      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27137$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27138      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27139    fi
27140  else
27141    input_to_shortpath="$new_path"
27142  fi
27143
27144  # Call helper function which possibly converts this using DOS-style short mode.
27145  # If so, the updated path is stored in $new_path.
27146  new_path="$input_to_shortpath"
27147
27148  input_path="$input_to_shortpath"
27149  # Check if we need to convert this using DOS-style short mode. If the path
27150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27151  # take no chances and rewrite it.
27152  # Note: m4 eats our [], so we need to use [ and ] instead.
27153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27154  if test "x$has_forbidden_chars" != x; then
27155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27159      # Going to short mode and back again did indeed matter. Since short mode is
27160      # case insensitive, let's make it lowercase to improve readability.
27161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27162      # Now convert it back to Unix-stile (cygpath)
27163      input_path=`$CYGPATH -u "$shortmode_path"`
27164      new_path="$input_path"
27165    fi
27166  fi
27167
27168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27169  if test "x$test_cygdrive_prefix" = x; then
27170    # As a simple fix, exclude /usr/bin since it's not a real path.
27171    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27173      # a path prefixed by /cygdrive for fixpath to work.
27174      new_path="$CYGWIN_ROOT_PATH$input_path"
27175    fi
27176  fi
27177
27178  # remove trailing .exe if any
27179  new_path="${new_path/%.exe/}"
27180
27181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27182
27183  # First separate the path from the arguments. This will split at the first
27184  # space.
27185  complete="$LIPO"
27186  path="${complete%% *}"
27187  tmp="$complete EOL"
27188  arguments="${tmp#* }"
27189
27190  # Input might be given as Windows format, start by converting to
27191  # unix format.
27192  new_path="$path"
27193
27194  windows_path="$new_path"
27195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27196    unix_path=`$CYGPATH -u "$windows_path"`
27197    new_path="$unix_path"
27198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27200    new_path="$unix_path"
27201  fi
27202
27203
27204  # Now try to locate executable using which
27205  new_path=`$WHICH "$new_path" 2> /dev/null`
27206
27207  if test "x$new_path" = x; then
27208    # Oops. Which didn't find the executable.
27209    # The splitting of arguments from the executable at a space might have been incorrect,
27210    # since paths with space are more likely in Windows. Give it another try with the whole
27211    # argument.
27212    path="$complete"
27213    arguments="EOL"
27214    new_path="$path"
27215
27216  windows_path="$new_path"
27217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27218    unix_path=`$CYGPATH -u "$windows_path"`
27219    new_path="$unix_path"
27220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27222    new_path="$unix_path"
27223  fi
27224
27225
27226    new_path=`$WHICH "$new_path" 2> /dev/null`
27227
27228    if test "x$new_path" = x; then
27229      # It's still not found. Now this is an unrecoverable error.
27230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27231$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27232      has_space=`$ECHO "$complete" | $GREP " "`
27233      if test "x$has_space" != x; then
27234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27236      fi
27237      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27238    fi
27239  fi
27240
27241  # Now new_path has a complete unix path to the binary
27242  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27243    # Keep paths in /bin as-is, but remove trailing .exe if any
27244    new_path="${new_path/%.exe/}"
27245    # Do not save /bin paths to all_fixpath_prefixes!
27246  else
27247    # Not in mixed or Windows style, start by that.
27248    new_path=`cmd //c echo $new_path`
27249
27250  input_path="$new_path"
27251  # Check if we need to convert this using DOS-style short mode. If the path
27252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27253  # take no chances and rewrite it.
27254  # Note: m4 eats our [], so we need to use [ and ] instead.
27255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27256  if test "x$has_forbidden_chars" != x; then
27257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27259  fi
27260
27261    # Output is in $new_path
27262
27263  windows_path="$new_path"
27264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27265    unix_path=`$CYGPATH -u "$windows_path"`
27266    new_path="$unix_path"
27267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27269    new_path="$unix_path"
27270  fi
27271
27272    # remove trailing .exe if any
27273    new_path="${new_path/%.exe/}"
27274
27275    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27276    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27277  fi
27278
27279  else
27280    # We're on a posix platform. Hooray! :)
27281    # First separate the path from the arguments. This will split at the first
27282    # space.
27283    complete="$LIPO"
27284    path="${complete%% *}"
27285    tmp="$complete EOL"
27286    arguments="${tmp#* }"
27287
27288    # Cannot rely on the command "which" here since it doesn't always work.
27289    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27290    if test -z "$is_absolute_path"; then
27291      # Path to executable is not absolute. Find it.
27292      IFS_save="$IFS"
27293      IFS=:
27294      for p in $PATH; do
27295        if test -f "$p/$path" && test -x "$p/$path"; then
27296          new_path="$p/$path"
27297          break
27298        fi
27299      done
27300      IFS="$IFS_save"
27301    else
27302      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27303$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27304      new_path="$path"
27305    fi
27306
27307    if test "x$new_path" = x; then
27308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27309$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27310        has_space=`$ECHO "$complete" | $GREP " "`
27311        if test "x$has_space" != x; then
27312          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27313$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27314        fi
27315        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27316      fi
27317  fi
27318
27319      # Now join together the path and the arguments once again
27320      if test "x$arguments" != xEOL; then
27321        new_complete="$new_path ${arguments% *}"
27322      else
27323        new_complete="$new_path"
27324      fi
27325
27326  if test "x$complete" != "x$new_complete"; then
27327      LIPO="$new_complete"
27328      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27329$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27330    fi
27331
27332fi
27333
27334# Restore old path without tools dir
27335PATH="$OLD_PATH"
27336
27337
27338# FIXME: Currently we must test this after paths but before flags. Fix!
27339
27340# And we can test some aspects on the target using configure macros.
27341
27342
27343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27344$as_echo_n "checking for ANSI C header files... " >&6; }
27345if ${ac_cv_header_stdc+:} false; then :
27346  $as_echo_n "(cached) " >&6
27347else
27348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27349/* end confdefs.h.  */
27350#include <stdlib.h>
27351#include <stdarg.h>
27352#include <string.h>
27353#include <float.h>
27354
27355int
27356main ()
27357{
27358
27359  ;
27360  return 0;
27361}
27362_ACEOF
27363if ac_fn_cxx_try_compile "$LINENO"; then :
27364  ac_cv_header_stdc=yes
27365else
27366  ac_cv_header_stdc=no
27367fi
27368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27369
27370if test $ac_cv_header_stdc = yes; then
27371  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27373/* end confdefs.h.  */
27374#include <string.h>
27375
27376_ACEOF
27377if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27378  $EGREP "memchr" >/dev/null 2>&1; then :
27379
27380else
27381  ac_cv_header_stdc=no
27382fi
27383rm -f conftest*
27384
27385fi
27386
27387if test $ac_cv_header_stdc = yes; then
27388  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27389  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27390/* end confdefs.h.  */
27391#include <stdlib.h>
27392
27393_ACEOF
27394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27395  $EGREP "free" >/dev/null 2>&1; then :
27396
27397else
27398  ac_cv_header_stdc=no
27399fi
27400rm -f conftest*
27401
27402fi
27403
27404if test $ac_cv_header_stdc = yes; then
27405  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27406  if test "$cross_compiling" = yes; then :
27407  :
27408else
27409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27410/* end confdefs.h.  */
27411#include <ctype.h>
27412#include <stdlib.h>
27413#if ((' ' & 0x0FF) == 0x020)
27414# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27415# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27416#else
27417# define ISLOWER(c) \
27418		   (('a' <= (c) && (c) <= 'i') \
27419		     || ('j' <= (c) && (c) <= 'r') \
27420		     || ('s' <= (c) && (c) <= 'z'))
27421# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27422#endif
27423
27424#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27425int
27426main ()
27427{
27428  int i;
27429  for (i = 0; i < 256; i++)
27430    if (XOR (islower (i), ISLOWER (i))
27431	|| toupper (i) != TOUPPER (i))
27432      return 2;
27433  return 0;
27434}
27435_ACEOF
27436if ac_fn_cxx_try_run "$LINENO"; then :
27437
27438else
27439  ac_cv_header_stdc=no
27440fi
27441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27442  conftest.$ac_objext conftest.beam conftest.$ac_ext
27443fi
27444
27445fi
27446fi
27447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27448$as_echo "$ac_cv_header_stdc" >&6; }
27449if test $ac_cv_header_stdc = yes; then
27450
27451$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27452
27453fi
27454
27455# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27456for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27457		  inttypes.h stdint.h unistd.h
27458do :
27459  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27460ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27461"
27462if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27463  cat >>confdefs.h <<_ACEOF
27464#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27465_ACEOF
27466
27467fi
27468
27469done
27470
27471
27472
27473###############################################################################
27474#
27475# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27476# (The JVM can use 32 or 64 bit Java pointers but that decision
27477# is made at runtime.)
27478#
27479if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27480  # Always specify -m flags on Solaris
27481
27482  # keep track of c/cxx flags that we added outselves...
27483  #   to prevent emitting warning...
27484  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27485  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27486  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27487
27488  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27489  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27490  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27491
27492  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27493  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27494  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27495
27496elif test "x$COMPILE_TYPE" = xreduced; then
27497  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27498    # Specify -m if running reduced on other Posix platforms
27499
27500  # keep track of c/cxx flags that we added outselves...
27501  #   to prevent emitting warning...
27502  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27503  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27504  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27505
27506  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27507  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27508  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27509
27510  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27511  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27512  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27513
27514  fi
27515fi
27516
27517# Make compilation sanity check
27518for ac_header in stdio.h
27519do :
27520  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27521if test "x$ac_cv_header_stdio_h" = xyes; then :
27522  cat >>confdefs.h <<_ACEOF
27523#define HAVE_STDIO_H 1
27524_ACEOF
27525
27526else
27527
27528  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27529$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27530  if test "x$COMPILE_TYPE" = xreduced; then
27531    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27532$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27533  elif test "x$COMPILE_TYPE" = xcross; then
27534    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27535$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27536  fi
27537  as_fn_error $? "Cannot continue." "$LINENO" 5
27538
27539fi
27540
27541done
27542
27543
27544# The cast to long int works around a bug in the HP C Compiler
27545# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27546# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27547# This bug is HP SR number 8606223364.
27548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27549$as_echo_n "checking size of int *... " >&6; }
27550if ${ac_cv_sizeof_int_p+:} false; then :
27551  $as_echo_n "(cached) " >&6
27552else
27553  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27554
27555else
27556  if test "$ac_cv_type_int_p" = yes; then
27557     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27558$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27559as_fn_error 77 "cannot compute sizeof (int *)
27560See \`config.log' for more details" "$LINENO" 5; }
27561   else
27562     ac_cv_sizeof_int_p=0
27563   fi
27564fi
27565
27566fi
27567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27568$as_echo "$ac_cv_sizeof_int_p" >&6; }
27569
27570
27571
27572cat >>confdefs.h <<_ACEOF
27573#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27574_ACEOF
27575
27576
27577
27578if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27579  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27580  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27581fi
27582
27583if test "x$SIZEOF_INT_P" = x; then
27584    # The test failed, lets stick to the assumed value.
27585    { $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
27586$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27587else
27588    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27589
27590    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27591        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
27592    fi
27593fi
27594
27595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27596$as_echo_n "checking for target address size... " >&6; }
27597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27598$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27599
27600
27601###############################################################################
27602#
27603# Is the target little of big endian?
27604#
27605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27606$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27607if ${ac_cv_c_bigendian+:} false; then :
27608  $as_echo_n "(cached) " >&6
27609else
27610  ac_cv_c_bigendian=unknown
27611    # See if we're dealing with a universal compiler.
27612    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27613/* end confdefs.h.  */
27614#ifndef __APPLE_CC__
27615	       not a universal capable compiler
27616	     #endif
27617	     typedef int dummy;
27618
27619_ACEOF
27620if ac_fn_cxx_try_compile "$LINENO"; then :
27621
27622	# Check for potential -arch flags.  It is not universal unless
27623	# there are at least two -arch flags with different values.
27624	ac_arch=
27625	ac_prev=
27626	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27627	 if test -n "$ac_prev"; then
27628	   case $ac_word in
27629	     i?86 | x86_64 | ppc | ppc64)
27630	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27631		 ac_arch=$ac_word
27632	       else
27633		 ac_cv_c_bigendian=universal
27634		 break
27635	       fi
27636	       ;;
27637	   esac
27638	   ac_prev=
27639	 elif test "x$ac_word" = "x-arch"; then
27640	   ac_prev=arch
27641	 fi
27642       done
27643fi
27644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27645    if test $ac_cv_c_bigendian = unknown; then
27646      # See if sys/param.h defines the BYTE_ORDER macro.
27647      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27648/* end confdefs.h.  */
27649#include <sys/types.h>
27650	     #include <sys/param.h>
27651
27652int
27653main ()
27654{
27655#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27656		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27657		     && LITTLE_ENDIAN)
27658	      bogus endian macros
27659	     #endif
27660
27661  ;
27662  return 0;
27663}
27664_ACEOF
27665if ac_fn_cxx_try_compile "$LINENO"; then :
27666  # It does; now see whether it defined to BIG_ENDIAN or not.
27667	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27668/* end confdefs.h.  */
27669#include <sys/types.h>
27670		#include <sys/param.h>
27671
27672int
27673main ()
27674{
27675#if BYTE_ORDER != BIG_ENDIAN
27676		 not big endian
27677		#endif
27678
27679  ;
27680  return 0;
27681}
27682_ACEOF
27683if ac_fn_cxx_try_compile "$LINENO"; then :
27684  ac_cv_c_bigendian=yes
27685else
27686  ac_cv_c_bigendian=no
27687fi
27688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27689fi
27690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27691    fi
27692    if test $ac_cv_c_bigendian = unknown; then
27693      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27694      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27695/* end confdefs.h.  */
27696#include <limits.h>
27697
27698int
27699main ()
27700{
27701#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27702	      bogus endian macros
27703	     #endif
27704
27705  ;
27706  return 0;
27707}
27708_ACEOF
27709if ac_fn_cxx_try_compile "$LINENO"; then :
27710  # It does; now see whether it defined to _BIG_ENDIAN or not.
27711	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27712/* end confdefs.h.  */
27713#include <limits.h>
27714
27715int
27716main ()
27717{
27718#ifndef _BIG_ENDIAN
27719		 not big endian
27720		#endif
27721
27722  ;
27723  return 0;
27724}
27725_ACEOF
27726if ac_fn_cxx_try_compile "$LINENO"; then :
27727  ac_cv_c_bigendian=yes
27728else
27729  ac_cv_c_bigendian=no
27730fi
27731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27732fi
27733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27734    fi
27735    if test $ac_cv_c_bigendian = unknown; then
27736      # Compile a test program.
27737      if test "$cross_compiling" = yes; then :
27738  # Try to guess by grepping values from an object file.
27739	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27740/* end confdefs.h.  */
27741short int ascii_mm[] =
27742		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27743		short int ascii_ii[] =
27744		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27745		int use_ascii (int i) {
27746		  return ascii_mm[i] + ascii_ii[i];
27747		}
27748		short int ebcdic_ii[] =
27749		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27750		short int ebcdic_mm[] =
27751		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27752		int use_ebcdic (int i) {
27753		  return ebcdic_mm[i] + ebcdic_ii[i];
27754		}
27755		extern int foo;
27756
27757int
27758main ()
27759{
27760return use_ascii (foo) == use_ebcdic (foo);
27761  ;
27762  return 0;
27763}
27764_ACEOF
27765if ac_fn_cxx_try_compile "$LINENO"; then :
27766  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27767	      ac_cv_c_bigendian=yes
27768	    fi
27769	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27770	      if test "$ac_cv_c_bigendian" = unknown; then
27771		ac_cv_c_bigendian=no
27772	      else
27773		# finding both strings is unlikely to happen, but who knows?
27774		ac_cv_c_bigendian=unknown
27775	      fi
27776	    fi
27777fi
27778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27779else
27780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27781/* end confdefs.h.  */
27782$ac_includes_default
27783int
27784main ()
27785{
27786
27787	     /* Are we little or big endian?  From Harbison&Steele.  */
27788	     union
27789	     {
27790	       long int l;
27791	       char c[sizeof (long int)];
27792	     } u;
27793	     u.l = 1;
27794	     return u.c[sizeof (long int) - 1] == 1;
27795
27796  ;
27797  return 0;
27798}
27799_ACEOF
27800if ac_fn_cxx_try_run "$LINENO"; then :
27801  ac_cv_c_bigendian=no
27802else
27803  ac_cv_c_bigendian=yes
27804fi
27805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27806  conftest.$ac_objext conftest.beam conftest.$ac_ext
27807fi
27808
27809    fi
27810fi
27811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27812$as_echo "$ac_cv_c_bigendian" >&6; }
27813 case $ac_cv_c_bigendian in #(
27814   yes)
27815     ENDIAN="big";; #(
27816   no)
27817     ENDIAN="little" ;; #(
27818   universal)
27819     ENDIAN="universal_endianness"
27820     ;; #(
27821   *)
27822     ENDIAN="unknown" ;;
27823 esac
27824
27825
27826if test "x$ENDIAN" = xuniversal_endianness; then
27827    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27828fi
27829if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27830    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
27831fi
27832
27833
27834# Configure flags for the tools
27835
27836
27837###############################################################################
27838#
27839# How to compile shared libraries.
27840#
27841
27842if test "x$GCC" = xyes; then
27843    COMPILER_NAME=gcc
27844    PICFLAG="-fPIC"
27845    LIBRARY_PREFIX=lib
27846    SHARED_LIBRARY='lib$1.so'
27847    STATIC_LIBRARY='lib$1.a'
27848    SHARED_LIBRARY_FLAGS="-shared"
27849    SHARED_LIBRARY_SUFFIX='.so'
27850    STATIC_LIBRARY_SUFFIX='.a'
27851    OBJ_SUFFIX='.o'
27852    EXE_SUFFIX=''
27853    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27854    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27855    C_FLAG_REORDER=''
27856    CXX_FLAG_REORDER=''
27857    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27858    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27859    LD="$CC"
27860    LDEXE="$CC"
27861    LDCXX="$CXX"
27862    LDEXECXX="$CXX"
27863    POST_STRIP_CMD="$STRIP -g"
27864
27865    # Linking is different on MacOSX
27866    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27867        # Might change in the future to clang.
27868        COMPILER_NAME=gcc
27869        SHARED_LIBRARY='lib$1.dylib'
27870        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27871        SHARED_LIBRARY_SUFFIX='.dylib'
27872        EXE_SUFFIX=''
27873        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27874        SET_SHARED_LIBRARY_MAPFILE=''
27875        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27876        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27877        POST_STRIP_CMD="$STRIP -S"
27878    fi
27879else
27880    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27881        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27882        COMPILER_NAME=ossc
27883        PICFLAG="-KPIC"
27884        LIBRARY_PREFIX=lib
27885        SHARED_LIBRARY='lib$1.so'
27886        STATIC_LIBRARY='lib$1.a'
27887        SHARED_LIBRARY_FLAGS="-G"
27888        SHARED_LIBRARY_SUFFIX='.so'
27889        STATIC_LIBRARY_SUFFIX='.a'
27890        OBJ_SUFFIX='.o'
27891        EXE_SUFFIX=''
27892        SET_SHARED_LIBRARY_NAME=''
27893        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27894	C_FLAG_REORDER='-xF'
27895	CXX_FLAG_REORDER='-xF'
27896        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27897        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27898        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27899        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27900        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27901        POST_STRIP_CMD="$STRIP -x"
27902        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27903    fi
27904    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27905        # If it is not gcc, then assume it is the MS Visual Studio compiler
27906        COMPILER_NAME=cl
27907        PICFLAG=""
27908        LIBRARY_PREFIX=
27909        SHARED_LIBRARY='$1.dll'
27910        STATIC_LIBRARY='$1.lib'
27911        SHARED_LIBRARY_FLAGS="-LD"
27912        SHARED_LIBRARY_SUFFIX='.dll'
27913        STATIC_LIBRARY_SUFFIX='.lib'
27914        OBJ_SUFFIX='.obj'
27915        EXE_SUFFIX='.exe'
27916        SET_SHARED_LIBRARY_NAME=''
27917        SET_SHARED_LIBRARY_MAPFILE=''
27918        SET_SHARED_LIBRARY_ORIGIN=''
27919        SET_EXECUTABLE_ORIGIN=''
27920    fi
27921fi
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940# The (cross) compiler is now configured, we can now test capabilities
27941# of the target platform.
27942
27943
27944
27945###############################################################################
27946#
27947# Setup the opt flags for different compilers
27948# and different operating systems.
27949#
27950
27951#
27952# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27953#
27954if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27955    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27956    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27957    CFLAGS="$CFLAGS -mstackrealign"
27958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27959$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27960    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27961/* end confdefs.h.  */
27962int main() { return 0; }
27963_ACEOF
27964if ac_fn_cxx_try_link "$LINENO"; then :
27965
27966		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27967$as_echo "yes" >&6; }
27968
27969else
27970
27971		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27972$as_echo "no" >&6; }
27973	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27974
27975fi
27976rm -f core conftest.err conftest.$ac_objext \
27977    conftest$ac_exeext conftest.$ac_ext
27978fi
27979
27980C_FLAG_DEPS="-MMD -MF"
27981CXX_FLAG_DEPS="-MMD -MF"
27982
27983case $COMPILER_TYPE in
27984  CC )
27985    D_FLAG="-g"
27986    case $COMPILER_NAME in
27987      gcc )
27988      	case $OPENJDK_TARGET_OS in
27989	  macosx )
27990	    # On MacOSX we optimize for size, something
27991	    # we should do for all platforms?
27992	    C_O_FLAG_HI="-Os"
27993	    C_O_FLAG_NORM="-Os"
27994	    C_O_FLAG_NONE=""
27995	    ;;
27996	  *)
27997	    C_O_FLAG_HI="-O3"
27998	    C_O_FLAG_NORM="-O2"
27999	    C_O_FLAG_NONE="-O0"
28000	    CFLAGS_DEBUG_SYMBOLS="-g"
28001	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28002	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28003	       CFLAGS_DEBUG_SYMBOLS="-g1"
28004	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28005	    fi
28006	    ;;
28007	esac
28008        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28009        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28010        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28011        ;;
28012      ossc )
28013        #
28014        # Forte has different names for this with their C++ compiler...
28015        #
28016        C_FLAG_DEPS="-xMMD -xMF"
28017        CXX_FLAG_DEPS="-xMMD -xMF"
28018
28019        # Extra options used with HIGHEST
28020        #
28021        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28022        #          done with care, there are some assumptions below that need to
28023        #          be understood about the use of pointers, and IEEE behavior.
28024        #
28025        # Use non-standard floating point mode (not IEEE 754)
28026        CC_HIGHEST="$CC_HIGHEST -fns"
28027        # Do some simplification of floating point arithmetic (not IEEE 754)
28028        CC_HIGHEST="$CC_HIGHEST -fsimple"
28029        # Use single precision floating point with 'float'
28030        CC_HIGHEST="$CC_HIGHEST -fsingle"
28031        # Assume memory references via basic pointer types do not alias
28032        #   (Source with excessing pointer casting and data access with mixed
28033        #    pointer types are not recommended)
28034        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28035        # Use intrinsic or inline versions for math/std functions
28036        #   (If you expect perfect errno behavior, do not use this)
28037        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28038        # Loop data dependency optimizations (need -xO3 or higher)
28039        CC_HIGHEST="$CC_HIGHEST -xdepend"
28040        # Pointer parameters to functions do not overlap
28041        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28042        #    If you pass in multiple pointers to the same data, do not use this)
28043        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28044        # Inline some library routines
28045        #   (If you expect perfect errno behavior, do not use this)
28046        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28047        # Use optimized math routines
28048        #   (If you expect perfect errno behavior, do not use this)
28049        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28050        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28051
28052        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28053          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28054          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28055        fi
28056
28057        case $OPENJDK_TARGET_CPU_ARCH in
28058          x86)
28059            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28060            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28061            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28062            C_O_FLAG_NONE="-xregs=no%frameptr"
28063            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28064            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28065            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28066            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28067            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28068               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28069               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28070            fi
28071            ;;
28072          sparc)
28073            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28074            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28075            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28076            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28077            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28078            C_O_FLAG_NONE=""
28079            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28080            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28081            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28082            CXX_O_FLAG_NONE=""
28083            ;;
28084        esac
28085
28086    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28087    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28088    esac
28089    ;;
28090  CL )
28091    D_FLAG=
28092    C_O_FLAG_HIGHEST="-O2"
28093    C_O_FLAG_HI="-O1"
28094    C_O_FLAG_NORM="-O1"
28095    C_O_FLAG_NONE="-Od"
28096    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28097    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28098    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28099    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28100    ;;
28101esac
28102
28103if test -z "$C_O_FLAG_HIGHEST"; then
28104   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28105fi
28106
28107if test -z "$CXX_O_FLAG_HIGHEST"; then
28108   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28109fi
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28125   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28126$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28127fi
28128
28129if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28130   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28131$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28132fi
28133
28134if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28135   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28136$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28137fi
28138
28139
28140# Check whether --with-extra-cflags was given.
28141if test "${with_extra_cflags+set}" = set; then :
28142  withval=$with_extra_cflags;
28143fi
28144
28145
28146
28147# Check whether --with-extra-cxxflags was given.
28148if test "${with_extra_cxxflags+set}" = set; then :
28149  withval=$with_extra_cxxflags;
28150fi
28151
28152
28153
28154# Check whether --with-extra-ldflags was given.
28155if test "${with_extra_ldflags+set}" = set; then :
28156  withval=$with_extra_ldflags;
28157fi
28158
28159
28160CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28161CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28162LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28163
28164# Hotspot needs these set in their legacy form
28165LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28166LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28167LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28168
28169
28170
28171
28172
28173###############################################################################
28174#
28175# Now setup the CFLAGS and LDFLAGS for the JDK build.
28176# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28177#
28178case $COMPILER_NAME in
28179      gcc )
28180      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28181                          -pipe \
28182                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28183	  case $OPENJDK_TARGET_CPU_ARCH in
28184	  arm )
28185            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28186	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28187	  ;;
28188	  ppc )
28189            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28190	  ;;
28191	  * )
28192	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28193	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28194          ;;
28195	  esac
28196          ;;
28197      ossc )
28198          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28199          case $OPENJDK_TARGET_CPU_ARCH in
28200          x86 )
28201            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28202       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28203          ;;
28204          esac
28205
28206      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28207      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28208
28209          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28210          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28211          ;;
28212      cl )
28213          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28214               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28215	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28216	       -DWIN32 -DIAL"
28217          case $OPENJDK_TARGET_CPU in
28218              x86 )
28219                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28220                  ;;
28221              x86_64 )
28222                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28223                  ;;
28224          esac
28225          ;;
28226esac
28227
28228###############################################################################
28229
28230CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28231
28232# The package path is used only on macosx?
28233PACKAGE_PATH=/opt/local
28234
28235
28236if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28237    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28238    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28239    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28240    #   Note: -Dmacro         is the same as    #define macro 1
28241    #         -Dmacro=	    is the same as    #define macro
28242    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28243        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28244    else
28245        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28246    fi
28247else
28248    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28249fi
28250if test "x$OPENJDK_TARGET_OS" = xlinux; then
28251    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28252fi
28253if test "x$OPENJDK_TARGET_OS" = xwindows; then
28254    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28255fi
28256if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28257    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28258fi
28259if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28260    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28261    # Adding these macros will make it an error to link to mac APIs newer than OS version 10.7
28262    MACOSX_REQUIRED_VERSION=1070
28263
28264    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(MACOSX_REQUIRED_VERSION) -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(MACOSX_REQUIRED_VERSION)"
28265fi
28266if test "x$OPENJDK_TARGET_OS" = xbsd; then
28267    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28268fi
28269if test "x$DEBUG_LEVEL" = xrelease; then
28270    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28271    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28272        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28273    fi
28274else
28275    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28276fi
28277
28278CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28279CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28280
28281CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28282        -I${JDK_OUTPUTDIR}/include \
28283        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28284        -I${JDK_TOPDIR}/src/share/javavm/export \
28285        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28286        -I${JDK_TOPDIR}/src/share/native/common \
28287        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28288
28289# The shared libraries are compiled using the picflag.
28290CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28291CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28292
28293# Executable flags
28294CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28295CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28296
28297# Now this is odd. The JDK native libraries have to link against libjvm.so
28298# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28299# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28300# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28301# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28302# libraries will link to whatever is in memory. Yuck.
28303#
28304# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28305if test "x$COMPILER_NAME" = xcl; then
28306    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28307    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28308        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28309    fi
28310    # TODO: make -debug optional "--disable-full-debug-symbols"
28311    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28312    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28313    LDFLAGS_JDKLIB_SUFFIX=""
28314    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28315        LDFLAGS_STACK_SIZE=1048576
28316    else
28317        LDFLAGS_STACK_SIZE=327680
28318    fi
28319    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28320else
28321    if test "x$COMPILER_NAME" = xgcc; then
28322        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28323        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28324        if test -n "$HAS_GNU_HASH"; then
28325            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28326        fi
28327        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28328          # And since we now know that the linker is gnu, then add -z defs, to forbid
28329          # undefined symbols in object files.
28330          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28331          if test "x$DEBUG_LEVEL" = "xrelease"; then
28332              # When building release libraries, tell the linker optimize them.
28333              # Should this be supplied to the OSS linker as well?
28334              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28335          fi
28336        fi
28337    fi
28338    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28339                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28340
28341    # On some platforms (mac) the linker warns about non existing -L dirs.
28342    # Add server first if available. Linking aginst client does not always produce the same results.
28343    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28344    # Default to server for other variants.
28345    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28346        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28347    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28348        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28349    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28350        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28351    else
28352        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28353    fi
28354
28355    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28356    if test "x$COMPILER_NAME" = xossc; then
28357        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28358    fi
28359
28360    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28361    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28362        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28363    fi
28364fi
28365
28366# Adjust flags according to debug level.
28367case $DEBUG_LEVEL in
28368      fastdebug )
28369              CFLAGS="$CFLAGS $D_FLAG"
28370              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28371              ;;
28372      slowdebug )
28373              CFLAGS="$CFLAGS $D_FLAG"
28374	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28375	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28376	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28377	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28378              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28379              ;;
28380esac
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396# Setup debug symbols (need objcopy from the toolchain for that)
28397
28398#
28399# ENABLE_DEBUG_SYMBOLS
28400# This must be done after the toolchain is setup, since we're looking at objcopy.
28401#
28402# Check whether --enable-debug-symbols was given.
28403if test "${enable_debug_symbols+set}" = set; then :
28404  enableval=$enable_debug_symbols;
28405fi
28406
28407
28408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28409$as_echo_n "checking if we should generate debug symbols... " >&6; }
28410
28411if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28412   # explicit enabling of enable-debug-symbols and can't find objcopy
28413   #   this is an error
28414   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28415fi
28416
28417if test "x$enable_debug_symbols" = "xyes"; then
28418  ENABLE_DEBUG_SYMBOLS=true
28419elif test "x$enable_debug_symbols" = "xno"; then
28420  ENABLE_DEBUG_SYMBOLS=false
28421else
28422  # default on macosx is false
28423  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28424    ENABLE_DEBUG_SYMBOLS=false
28425  # Default is on if objcopy is found, otherwise off
28426  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28427    ENABLE_DEBUG_SYMBOLS=true
28428  else
28429    ENABLE_DEBUG_SYMBOLS=false
28430  fi
28431fi
28432
28433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28434$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28435
28436#
28437# ZIP_DEBUGINFO_FILES
28438#
28439# Check whether --enable-zip-debug-info was given.
28440if test "${enable_zip_debug_info+set}" = set; then :
28441  enableval=$enable_zip_debug_info;
28442fi
28443
28444
28445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28446$as_echo_n "checking if we should zip debug-info files... " >&6; }
28447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28448$as_echo "${enable_zip_debug_info}" >&6; }
28449
28450if test "x${enable_zip_debug_info}" = "xno"; then
28451   ZIP_DEBUGINFO_FILES=false
28452else
28453   ZIP_DEBUGINFO_FILES=true
28454fi
28455
28456
28457
28458
28459
28460
28461
28462###############################################################################
28463#
28464# Check dependencies for external and internal libraries.
28465#
28466###############################################################################
28467
28468
28469
28470###############################################################################
28471#
28472# OS specific settings that we never will need to probe.
28473#
28474if test "x$OPENJDK_TARGET_OS" = xlinux; then
28475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28476$as_echo_n "checking what is not needed on Linux?... " >&6; }
28477    PULSE_NOT_NEEDED=yes
28478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28479$as_echo "pulse" >&6; }
28480fi
28481
28482if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28484$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28485    ALSA_NOT_NEEDED=yes
28486    PULSE_NOT_NEEDED=yes
28487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28488$as_echo "alsa pulse" >&6; }
28489fi
28490
28491if test "x$OPENJDK_TARGET_OS" = xwindows; then
28492    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28493$as_echo_n "checking what is not needed on Windows?... " >&6; }
28494    CUPS_NOT_NEEDED=yes
28495    ALSA_NOT_NEEDED=yes
28496    PULSE_NOT_NEEDED=yes
28497    X11_NOT_NEEDED=yes
28498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28499$as_echo "alsa cups pulse x11" >&6; }
28500fi
28501
28502if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28503    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28504$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28505    ALSA_NOT_NEEDED=yes
28506    PULSE_NOT_NEEDED=yes
28507    X11_NOT_NEEDED=yes
28508    FREETYPE2_NOT_NEEDED=yes
28509    # If the java runtime framework is disabled, then we need X11.
28510    # This will be adjusted below.
28511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28512$as_echo "alsa pulse x11" >&6; }
28513fi
28514
28515if test "x$OPENJDK_TARGET_OS" = xbsd; then
28516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28517$as_echo_n "checking what is not needed on bsd?... " >&6; }
28518    ALSA_NOT_NEEDED=yes
28519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28520$as_echo "alsa" >&6; }
28521fi
28522
28523if test "x$OPENJDK" = "xfalse"; then
28524    FREETYPE2_NOT_NEEDED=yes
28525fi
28526
28527if test "x$SUPPORT_HEADFUL" = xno; then
28528    X11_NOT_NEEDED=yes
28529fi
28530
28531###############################################################################
28532#
28533# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28534# that uses this API.
28535#
28536# Check whether --enable-macosx-runtime-support was given.
28537if test "${enable_macosx_runtime_support+set}" = set; then :
28538  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28539else
28540  MACOSX_RUNTIME_SUPPORT="no"
28541fi
28542
28543
28544USE_MACOSX_RUNTIME_SUPPORT=no
28545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28546$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28547if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28548    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28549        MACOSX_RUNTIME_SUPPORT=yes
28550        USE_MACOSX_RUNTIME_SUPPORT=yes
28551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28552$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28553    else
28554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28555$as_echo "yes, but explicitly disabled." >&6; }
28556    fi
28557else
28558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28559$as_echo "no" >&6; }
28560fi
28561
28562if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28563    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28564$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28565    X11_NOT_NEEDED=
28566    FREETYPE2_NOT_NEEDED=
28567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28568$as_echo "alsa pulse" >&6; }
28569fi
28570
28571
28572
28573
28574###############################################################################
28575#
28576# Check for X Windows
28577#
28578
28579# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28580# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28581# --x-libraries for the sysroot, if that seems to be correct.
28582if test "x$SYS_ROOT" != "x/"; then
28583  if test "x$x_includes" = xNONE; then
28584    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28585      x_includes="$SYS_ROOT/usr/X11R6/include"
28586    fi
28587  fi
28588  if test "x$x_libraries" = xNONE; then
28589    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28590      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28591    fi
28592  fi
28593fi
28594
28595# Now let autoconf do it's magic
28596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28597$as_echo_n "checking for X... " >&6; }
28598
28599
28600# Check whether --with-x was given.
28601if test "${with_x+set}" = set; then :
28602  withval=$with_x;
28603fi
28604
28605# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28606if test "x$with_x" = xno; then
28607  # The user explicitly disabled X.
28608  have_x=disabled
28609else
28610  case $x_includes,$x_libraries in #(
28611    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
28612    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
28613  $as_echo_n "(cached) " >&6
28614else
28615  # One or both of the vars are not set, and there is no cached value.
28616ac_x_includes=no ac_x_libraries=no
28617rm -f -r conftest.dir
28618if mkdir conftest.dir; then
28619  cd conftest.dir
28620  cat >Imakefile <<'_ACEOF'
28621incroot:
28622	@echo incroot='${INCROOT}'
28623usrlibdir:
28624	@echo usrlibdir='${USRLIBDIR}'
28625libdir:
28626	@echo libdir='${LIBDIR}'
28627_ACEOF
28628  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28629    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28630    for ac_var in incroot usrlibdir libdir; do
28631      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28632    done
28633    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28634    for ac_extension in a so sl dylib la dll; do
28635      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28636	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28637	ac_im_usrlibdir=$ac_im_libdir; break
28638      fi
28639    done
28640    # Screen out bogus values from the imake configuration.  They are
28641    # bogus both because they are the default anyway, and because
28642    # using them would break gcc on systems where it needs fixed includes.
28643    case $ac_im_incroot in
28644	/usr/include) ac_x_includes= ;;
28645	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28646    esac
28647    case $ac_im_usrlibdir in
28648	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28649	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28650    esac
28651  fi
28652  cd ..
28653  rm -f -r conftest.dir
28654fi
28655
28656# Standard set of common directories for X headers.
28657# Check X11 before X11Rn because it is often a symlink to the current release.
28658ac_x_header_dirs='
28659/usr/X11/include
28660/usr/X11R7/include
28661/usr/X11R6/include
28662/usr/X11R5/include
28663/usr/X11R4/include
28664
28665/usr/include/X11
28666/usr/include/X11R7
28667/usr/include/X11R6
28668/usr/include/X11R5
28669/usr/include/X11R4
28670
28671/usr/local/X11/include
28672/usr/local/X11R7/include
28673/usr/local/X11R6/include
28674/usr/local/X11R5/include
28675/usr/local/X11R4/include
28676
28677/usr/local/include/X11
28678/usr/local/include/X11R7
28679/usr/local/include/X11R6
28680/usr/local/include/X11R5
28681/usr/local/include/X11R4
28682
28683/usr/X386/include
28684/usr/x386/include
28685/usr/XFree86/include/X11
28686
28687/usr/include
28688/usr/local/include
28689/usr/unsupported/include
28690/usr/athena/include
28691/usr/local/x11r5/include
28692/usr/lpp/Xamples/include
28693
28694/usr/openwin/include
28695/usr/openwin/share/include'
28696
28697if test "$ac_x_includes" = no; then
28698  # Guess where to find include files, by looking for Xlib.h.
28699  # First, try using that file with no special directory specified.
28700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28701/* end confdefs.h.  */
28702#include <X11/Xlib.h>
28703_ACEOF
28704if ac_fn_cxx_try_cpp "$LINENO"; then :
28705  # We can compile using X headers with no special include directory.
28706ac_x_includes=
28707else
28708  for ac_dir in $ac_x_header_dirs; do
28709  if test -r "$ac_dir/X11/Xlib.h"; then
28710    ac_x_includes=$ac_dir
28711    break
28712  fi
28713done
28714fi
28715rm -f conftest.err conftest.i conftest.$ac_ext
28716fi # $ac_x_includes = no
28717
28718if test "$ac_x_libraries" = no; then
28719  # Check for the libraries.
28720  # See if we find them without any special options.
28721  # Don't add to $LIBS permanently.
28722  ac_save_LIBS=$LIBS
28723  LIBS="-lX11 $LIBS"
28724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28725/* end confdefs.h.  */
28726#include <X11/Xlib.h>
28727int
28728main ()
28729{
28730XrmInitialize ()
28731  ;
28732  return 0;
28733}
28734_ACEOF
28735if ac_fn_cxx_try_link "$LINENO"; then :
28736  LIBS=$ac_save_LIBS
28737# We can link X programs with no special library path.
28738ac_x_libraries=
28739else
28740  LIBS=$ac_save_LIBS
28741for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28742do
28743  # Don't even attempt the hair of trying to link an X program!
28744  for ac_extension in a so sl dylib la dll; do
28745    if test -r "$ac_dir/libX11.$ac_extension"; then
28746      ac_x_libraries=$ac_dir
28747      break 2
28748    fi
28749  done
28750done
28751fi
28752rm -f core conftest.err conftest.$ac_objext \
28753    conftest$ac_exeext conftest.$ac_ext
28754fi # $ac_x_libraries = no
28755
28756case $ac_x_includes,$ac_x_libraries in #(
28757  no,* | *,no | *\'*)
28758    # Didn't find X, or a directory has "'" in its name.
28759    ac_cv_have_x="have_x=no";; #(
28760  *)
28761    # Record where we found X for the cache.
28762    ac_cv_have_x="have_x=yes\
28763	ac_x_includes='$ac_x_includes'\
28764	ac_x_libraries='$ac_x_libraries'"
28765esac
28766fi
28767;; #(
28768    *) have_x=yes;;
28769  esac
28770  eval "$ac_cv_have_x"
28771fi # $with_x != no
28772
28773if test "$have_x" != yes; then
28774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28775$as_echo "$have_x" >&6; }
28776  no_x=yes
28777else
28778  # If each of the values was on the command line, it overrides each guess.
28779  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28780  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28781  # Update the cache value to reflect the command line values.
28782  ac_cv_have_x="have_x=yes\
28783	ac_x_includes='$x_includes'\
28784	ac_x_libraries='$x_libraries'"
28785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28786$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28787fi
28788
28789if test "$no_x" = yes; then
28790  # Not all programs may use this symbol, but it does not hurt to define it.
28791
28792$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28793
28794  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28795else
28796  if test -n "$x_includes"; then
28797    X_CFLAGS="$X_CFLAGS -I$x_includes"
28798  fi
28799
28800  # It would also be nice to do this for all -L options, not just this one.
28801  if test -n "$x_libraries"; then
28802    X_LIBS="$X_LIBS -L$x_libraries"
28803    # For Solaris; some versions of Sun CC require a space after -R and
28804    # others require no space.  Words are not sufficient . . . .
28805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28806$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28807    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28808    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28809    ac_cxx_werror_flag=yes
28810    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28811/* end confdefs.h.  */
28812
28813int
28814main ()
28815{
28816
28817  ;
28818  return 0;
28819}
28820_ACEOF
28821if ac_fn_cxx_try_link "$LINENO"; then :
28822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28823$as_echo "no" >&6; }
28824       X_LIBS="$X_LIBS -R$x_libraries"
28825else
28826  LIBS="$ac_xsave_LIBS -R $x_libraries"
28827       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28828/* end confdefs.h.  */
28829
28830int
28831main ()
28832{
28833
28834  ;
28835  return 0;
28836}
28837_ACEOF
28838if ac_fn_cxx_try_link "$LINENO"; then :
28839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28840$as_echo "yes" >&6; }
28841	  X_LIBS="$X_LIBS -R $x_libraries"
28842else
28843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28844$as_echo "neither works" >&6; }
28845fi
28846rm -f core conftest.err conftest.$ac_objext \
28847    conftest$ac_exeext conftest.$ac_ext
28848fi
28849rm -f core conftest.err conftest.$ac_objext \
28850    conftest$ac_exeext conftest.$ac_ext
28851    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28852    LIBS=$ac_xsave_LIBS
28853  fi
28854
28855  # Check for system-dependent libraries X programs must link with.
28856  # Do this before checking for the system-independent R6 libraries
28857  # (-lICE), since we may need -lsocket or whatever for X linking.
28858
28859  if test "$ISC" = yes; then
28860    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28861  else
28862    # Martyn Johnson says this is needed for Ultrix, if the X
28863    # libraries were built with DECnet support.  And Karl Berry says
28864    # the Alpha needs dnet_stub (dnet does not exist).
28865    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28866    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28867/* end confdefs.h.  */
28868
28869/* Override any GCC internal prototype to avoid an error.
28870   Use char because int might match the return type of a GCC
28871   builtin and then its argument prototype would still apply.  */
28872#ifdef __cplusplus
28873extern "C"
28874#endif
28875char XOpenDisplay ();
28876int
28877main ()
28878{
28879return XOpenDisplay ();
28880  ;
28881  return 0;
28882}
28883_ACEOF
28884if ac_fn_cxx_try_link "$LINENO"; then :
28885
28886else
28887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28888$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28889if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
28890  $as_echo_n "(cached) " >&6
28891else
28892  ac_check_lib_save_LIBS=$LIBS
28893LIBS="-ldnet  $LIBS"
28894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28895/* end confdefs.h.  */
28896
28897/* Override any GCC internal prototype to avoid an error.
28898   Use char because int might match the return type of a GCC
28899   builtin and then its argument prototype would still apply.  */
28900#ifdef __cplusplus
28901extern "C"
28902#endif
28903char dnet_ntoa ();
28904int
28905main ()
28906{
28907return dnet_ntoa ();
28908  ;
28909  return 0;
28910}
28911_ACEOF
28912if ac_fn_cxx_try_link "$LINENO"; then :
28913  ac_cv_lib_dnet_dnet_ntoa=yes
28914else
28915  ac_cv_lib_dnet_dnet_ntoa=no
28916fi
28917rm -f core conftest.err conftest.$ac_objext \
28918    conftest$ac_exeext conftest.$ac_ext
28919LIBS=$ac_check_lib_save_LIBS
28920fi
28921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28922$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28923if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
28924  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28925fi
28926
28927    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28928      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28929$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28930if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
28931  $as_echo_n "(cached) " >&6
28932else
28933  ac_check_lib_save_LIBS=$LIBS
28934LIBS="-ldnet_stub  $LIBS"
28935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28936/* end confdefs.h.  */
28937
28938/* Override any GCC internal prototype to avoid an error.
28939   Use char because int might match the return type of a GCC
28940   builtin and then its argument prototype would still apply.  */
28941#ifdef __cplusplus
28942extern "C"
28943#endif
28944char dnet_ntoa ();
28945int
28946main ()
28947{
28948return dnet_ntoa ();
28949  ;
28950  return 0;
28951}
28952_ACEOF
28953if ac_fn_cxx_try_link "$LINENO"; then :
28954  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28955else
28956  ac_cv_lib_dnet_stub_dnet_ntoa=no
28957fi
28958rm -f core conftest.err conftest.$ac_objext \
28959    conftest$ac_exeext conftest.$ac_ext
28960LIBS=$ac_check_lib_save_LIBS
28961fi
28962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28963$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28964if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
28965  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28966fi
28967
28968    fi
28969fi
28970rm -f core conftest.err conftest.$ac_objext \
28971    conftest$ac_exeext conftest.$ac_ext
28972    LIBS="$ac_xsave_LIBS"
28973
28974    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28975    # to get the SysV transport functions.
28976    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28977    # needs -lnsl.
28978    # The nsl library prevents programs from opening the X display
28979    # on Irix 5.2, according to T.E. Dickey.
28980    # The functions gethostbyname, getservbyname, and inet_addr are
28981    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28982    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28983if test "x$ac_cv_func_gethostbyname" = xyes; then :
28984
28985fi
28986
28987    if test $ac_cv_func_gethostbyname = no; then
28988      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28989$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28990if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
28991  $as_echo_n "(cached) " >&6
28992else
28993  ac_check_lib_save_LIBS=$LIBS
28994LIBS="-lnsl  $LIBS"
28995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28996/* end confdefs.h.  */
28997
28998/* Override any GCC internal prototype to avoid an error.
28999   Use char because int might match the return type of a GCC
29000   builtin and then its argument prototype would still apply.  */
29001#ifdef __cplusplus
29002extern "C"
29003#endif
29004char gethostbyname ();
29005int
29006main ()
29007{
29008return gethostbyname ();
29009  ;
29010  return 0;
29011}
29012_ACEOF
29013if ac_fn_cxx_try_link "$LINENO"; then :
29014  ac_cv_lib_nsl_gethostbyname=yes
29015else
29016  ac_cv_lib_nsl_gethostbyname=no
29017fi
29018rm -f core conftest.err conftest.$ac_objext \
29019    conftest$ac_exeext conftest.$ac_ext
29020LIBS=$ac_check_lib_save_LIBS
29021fi
29022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29023$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29024if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
29025  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29026fi
29027
29028      if test $ac_cv_lib_nsl_gethostbyname = no; then
29029	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29030$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29031if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
29032  $as_echo_n "(cached) " >&6
29033else
29034  ac_check_lib_save_LIBS=$LIBS
29035LIBS="-lbsd  $LIBS"
29036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29037/* end confdefs.h.  */
29038
29039/* Override any GCC internal prototype to avoid an error.
29040   Use char because int might match the return type of a GCC
29041   builtin and then its argument prototype would still apply.  */
29042#ifdef __cplusplus
29043extern "C"
29044#endif
29045char gethostbyname ();
29046int
29047main ()
29048{
29049return gethostbyname ();
29050  ;
29051  return 0;
29052}
29053_ACEOF
29054if ac_fn_cxx_try_link "$LINENO"; then :
29055  ac_cv_lib_bsd_gethostbyname=yes
29056else
29057  ac_cv_lib_bsd_gethostbyname=no
29058fi
29059rm -f core conftest.err conftest.$ac_objext \
29060    conftest$ac_exeext conftest.$ac_ext
29061LIBS=$ac_check_lib_save_LIBS
29062fi
29063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29064$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29065if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
29066  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29067fi
29068
29069      fi
29070    fi
29071
29072    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29073    # socket/setsockopt and other routines are undefined under SCO ODT
29074    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29075    # on later versions), says Simon Leinen: it contains gethostby*
29076    # variants that don't use the name server (or something).  -lsocket
29077    # must be given before -lnsl if both are needed.  We assume that
29078    # if connect needs -lnsl, so does gethostbyname.
29079    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29080if test "x$ac_cv_func_connect" = xyes; then :
29081
29082fi
29083
29084    if test $ac_cv_func_connect = no; then
29085      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29086$as_echo_n "checking for connect in -lsocket... " >&6; }
29087if ${ac_cv_lib_socket_connect+:} false; then :
29088  $as_echo_n "(cached) " >&6
29089else
29090  ac_check_lib_save_LIBS=$LIBS
29091LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29093/* end confdefs.h.  */
29094
29095/* Override any GCC internal prototype to avoid an error.
29096   Use char because int might match the return type of a GCC
29097   builtin and then its argument prototype would still apply.  */
29098#ifdef __cplusplus
29099extern "C"
29100#endif
29101char connect ();
29102int
29103main ()
29104{
29105return connect ();
29106  ;
29107  return 0;
29108}
29109_ACEOF
29110if ac_fn_cxx_try_link "$LINENO"; then :
29111  ac_cv_lib_socket_connect=yes
29112else
29113  ac_cv_lib_socket_connect=no
29114fi
29115rm -f core conftest.err conftest.$ac_objext \
29116    conftest$ac_exeext conftest.$ac_ext
29117LIBS=$ac_check_lib_save_LIBS
29118fi
29119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29120$as_echo "$ac_cv_lib_socket_connect" >&6; }
29121if test "x$ac_cv_lib_socket_connect" = xyes; then :
29122  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29123fi
29124
29125    fi
29126
29127    # Guillermo Gomez says -lposix is necessary on A/UX.
29128    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29129if test "x$ac_cv_func_remove" = xyes; then :
29130
29131fi
29132
29133    if test $ac_cv_func_remove = no; then
29134      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29135$as_echo_n "checking for remove in -lposix... " >&6; }
29136if ${ac_cv_lib_posix_remove+:} false; then :
29137  $as_echo_n "(cached) " >&6
29138else
29139  ac_check_lib_save_LIBS=$LIBS
29140LIBS="-lposix  $LIBS"
29141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29142/* end confdefs.h.  */
29143
29144/* Override any GCC internal prototype to avoid an error.
29145   Use char because int might match the return type of a GCC
29146   builtin and then its argument prototype would still apply.  */
29147#ifdef __cplusplus
29148extern "C"
29149#endif
29150char remove ();
29151int
29152main ()
29153{
29154return remove ();
29155  ;
29156  return 0;
29157}
29158_ACEOF
29159if ac_fn_cxx_try_link "$LINENO"; then :
29160  ac_cv_lib_posix_remove=yes
29161else
29162  ac_cv_lib_posix_remove=no
29163fi
29164rm -f core conftest.err conftest.$ac_objext \
29165    conftest$ac_exeext conftest.$ac_ext
29166LIBS=$ac_check_lib_save_LIBS
29167fi
29168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29169$as_echo "$ac_cv_lib_posix_remove" >&6; }
29170if test "x$ac_cv_lib_posix_remove" = xyes; then :
29171  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29172fi
29173
29174    fi
29175
29176    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29177    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29178if test "x$ac_cv_func_shmat" = xyes; then :
29179
29180fi
29181
29182    if test $ac_cv_func_shmat = no; then
29183      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29184$as_echo_n "checking for shmat in -lipc... " >&6; }
29185if ${ac_cv_lib_ipc_shmat+:} false; then :
29186  $as_echo_n "(cached) " >&6
29187else
29188  ac_check_lib_save_LIBS=$LIBS
29189LIBS="-lipc  $LIBS"
29190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29191/* end confdefs.h.  */
29192
29193/* Override any GCC internal prototype to avoid an error.
29194   Use char because int might match the return type of a GCC
29195   builtin and then its argument prototype would still apply.  */
29196#ifdef __cplusplus
29197extern "C"
29198#endif
29199char shmat ();
29200int
29201main ()
29202{
29203return shmat ();
29204  ;
29205  return 0;
29206}
29207_ACEOF
29208if ac_fn_cxx_try_link "$LINENO"; then :
29209  ac_cv_lib_ipc_shmat=yes
29210else
29211  ac_cv_lib_ipc_shmat=no
29212fi
29213rm -f core conftest.err conftest.$ac_objext \
29214    conftest$ac_exeext conftest.$ac_ext
29215LIBS=$ac_check_lib_save_LIBS
29216fi
29217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29218$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29219if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
29220  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29221fi
29222
29223    fi
29224  fi
29225
29226  # Check for libraries that X11R6 Xt/Xaw programs need.
29227  ac_save_LDFLAGS=$LDFLAGS
29228  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29229  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29230  # check for ICE first), but we must link in the order -lSM -lICE or
29231  # we get undefined symbols.  So assume we have SM if we have ICE.
29232  # These have to be linked with before -lX11, unlike the other
29233  # libraries we check for below, so use a different variable.
29234  # John Interrante, Karl Berry
29235  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29236$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29237if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
29238  $as_echo_n "(cached) " >&6
29239else
29240  ac_check_lib_save_LIBS=$LIBS
29241LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29243/* end confdefs.h.  */
29244
29245/* Override any GCC internal prototype to avoid an error.
29246   Use char because int might match the return type of a GCC
29247   builtin and then its argument prototype would still apply.  */
29248#ifdef __cplusplus
29249extern "C"
29250#endif
29251char IceConnectionNumber ();
29252int
29253main ()
29254{
29255return IceConnectionNumber ();
29256  ;
29257  return 0;
29258}
29259_ACEOF
29260if ac_fn_cxx_try_link "$LINENO"; then :
29261  ac_cv_lib_ICE_IceConnectionNumber=yes
29262else
29263  ac_cv_lib_ICE_IceConnectionNumber=no
29264fi
29265rm -f core conftest.err conftest.$ac_objext \
29266    conftest$ac_exeext conftest.$ac_ext
29267LIBS=$ac_check_lib_save_LIBS
29268fi
29269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29270$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29271if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
29272  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29273fi
29274
29275  LDFLAGS=$ac_save_LDFLAGS
29276
29277fi
29278
29279
29280# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29281# this doesn't make sense so we remove it.
29282if test "x$COMPILE_TYPE" = xcross; then
29283  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29284fi
29285
29286if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29287
29288    # Print a helpful message on how to acquire the necessary build dependency.
29289    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29290    MISSING_DEPENDENCY=x11
29291    PKGHANDLER_COMMAND=
29292
29293    case $PKGHANDLER in
29294	apt-get)
29295                apt_help     $MISSING_DEPENDENCY ;;
29296    yum)
29297                yum_help     $MISSING_DEPENDENCY ;;
29298	port)
29299                port_help    $MISSING_DEPENDENCY ;;
29300	pkgutil)
29301                pkgutil_help $MISSING_DEPENDENCY ;;
29302	pkgadd)
29303                pkgadd_help  $MISSING_DEPENDENCY ;;
29304    * )
29305      break ;;
29306    esac
29307
29308    if test "x$PKGHANDLER_COMMAND" != x; then
29309        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29310    fi
29311
29312    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29313fi
29314
29315# Some of the old makefiles require a setting of OPENWIN_HOME
29316# Since the X11R6 directory has disappeared on later Linuxes,
29317# we need to probe for it.
29318if test "x$OPENJDK_TARGET_OS" = xlinux; then
29319    if test -d "$SYS_ROOT/usr/X11R6"; then
29320        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29321    fi
29322    if test -d "$SYS_ROOT/usr/include/X11"; then
29323        OPENWIN_HOME="$SYS_ROOT/usr"
29324    fi
29325fi
29326if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29327    OPENWIN_HOME="/usr/openwin"
29328fi
29329
29330
29331
29332#
29333# Weird Sol10 something check...TODO change to try compile
29334#
29335if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29336  if test "`uname -r`" = "5.10"; then
29337     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29338     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29339     fi
29340  fi
29341fi
29342
29343ac_ext=c
29344ac_cpp='$CPP $CPPFLAGS'
29345ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29346ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29347ac_compiler_gnu=$ac_cv_c_compiler_gnu
29348
29349OLD_CFLAGS="$CFLAGS"
29350CFLAGS="$CFLAGS $X_CFLAGS"
29351
29352# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29353for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29354do :
29355  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29356ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29357                   # include <X11/Xutil.h>
29358
29359"
29360if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29361  cat >>confdefs.h <<_ACEOF
29362#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29363_ACEOF
29364 X11_A_OK=yes
29365else
29366  X11_A_OK=no
29367fi
29368
29369done
29370
29371
29372CFLAGS="$OLD_CFLAGS"
29373ac_ext=cpp
29374ac_cpp='$CXXCPP $CPPFLAGS'
29375ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29376ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29377ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29378
29379
29380if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29381
29382    # Print a helpful message on how to acquire the necessary build dependency.
29383    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29384    MISSING_DEPENDENCY=x11
29385    PKGHANDLER_COMMAND=
29386
29387    case $PKGHANDLER in
29388	apt-get)
29389                apt_help     $MISSING_DEPENDENCY ;;
29390    yum)
29391                yum_help     $MISSING_DEPENDENCY ;;
29392	port)
29393                port_help    $MISSING_DEPENDENCY ;;
29394	pkgutil)
29395                pkgutil_help $MISSING_DEPENDENCY ;;
29396	pkgadd)
29397                pkgadd_help  $MISSING_DEPENDENCY ;;
29398    * )
29399      break ;;
29400    esac
29401
29402    if test "x$PKGHANDLER_COMMAND" != x; then
29403        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29404    fi
29405
29406    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29407fi
29408
29409
29410
29411
29412
29413
29414###############################################################################
29415#
29416# The common unix printing system cups is used to print from java.
29417#
29418
29419# Check whether --with-cups was given.
29420if test "${with_cups+set}" = set; then :
29421  withval=$with_cups;
29422fi
29423
29424
29425# Check whether --with-cups-include was given.
29426if test "${with_cups_include+set}" = set; then :
29427  withval=$with_cups_include;
29428fi
29429
29430
29431if test "x$CUPS_NOT_NEEDED" = xyes; then
29432	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29433		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29434$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29435	fi
29436	CUPS_CFLAGS=
29437else
29438	CUPS_FOUND=no
29439
29440	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29441	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29442	fi
29443
29444	if test "x${with_cups}" != x; then
29445	    CUPS_CFLAGS="-I${with_cups}/include"
29446	    CUPS_FOUND=yes
29447	fi
29448	if test "x${with_cups_include}" != x; then
29449	    CUPS_CFLAGS="-I${with_cups_include}"
29450	    CUPS_FOUND=yes
29451	fi
29452	if test "x$CUPS_FOUND" = xno; then
29453
29454
29455    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29456        # Source the builddeps file again, to make sure it uses the latest variables!
29457        . $builddepsfile
29458        # Look for a target and build machine specific resource!
29459        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29460        if test "x$resource" = x; then
29461            # Ok, lets instead look for a target specific resource
29462            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29463        fi
29464        if test "x$resource" = x; then
29465            # Ok, lets instead look for a build specific resource
29466            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29467        fi
29468        if test "x$resource" = x; then
29469            # Ok, lets instead look for a generic resource
29470            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29471            resource=${builddep_cups}
29472        fi
29473        if test "x$resource" != x; then
29474            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29475$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29476	    # If the resource in the builddeps.conf file is an existing directory,
29477	    # for example /java/linux/cups
29478	    if test -d ${resource}; then
29479	       depdir=${resource}
29480	    else
29481
29482# cups is for example mymodule
29483# $resource is for example libs/general/libmymod_1_2_3.zip
29484# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29485# $with_builddeps_dir is for example /localhome/builddeps
29486# depdir is the name of the variable into which we store the depdir, eg MYMOD
29487# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29488# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29489    filename=`basename $resource`
29490    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29491    filebase=${filename%%.*}
29492    extension=${filename#*.}
29493    installdir=$with_builddeps_dir/$filebase
29494    if test ! -f $installdir/$filename.unpacked; then
29495        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29496$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29497        if test ! -d $installdir; then
29498            mkdir -p $installdir
29499        fi
29500        if test ! -d $installdir; then
29501            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29502        fi
29503        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29504        touch $tmpfile
29505        if test ! -f $tmpfile; then
29506            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29507        fi
29508
29509    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29510    # $tmpfile is the local file name for the downloaded file.
29511    VALID_TOOL=no
29512    if test "x$BDEPS_FTP" = xwget; then
29513       VALID_TOOL=yes
29514       wget -O $tmpfile $with_builddeps_server/$resource
29515    fi
29516    if test "x$BDEPS_FTP" = xlftp; then
29517       VALID_TOOL=yes
29518       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29519    fi
29520    if test "x$BDEPS_FTP" = xftp; then
29521        VALID_TOOL=yes
29522        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29523        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29524        FTPUSERPWD=${FTPSERVER%%@*}
29525        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29526            FTPUSER=${userpwd%%:*}
29527            FTPPWD=${userpwd#*@}
29528            FTPSERVER=${FTPSERVER#*@}
29529        else
29530            FTPUSER=ftp
29531            FTPPWD=ftp
29532        fi
29533        # the "pass" command does not work on some
29534        # ftp clients (read ftp.exe) but if it works,
29535        # passive mode is better!
29536        (\
29537            echo "user $FTPUSER $FTPPWD"        ;\
29538            echo "pass"                         ;\
29539            echo "bin"                          ;\
29540            echo "get $FTPPATH $tmpfile"              ;\
29541        ) | ftp -in $FTPSERVER
29542    fi
29543    if test "x$VALID_TOOL" != xyes; then
29544       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29545    fi
29546
29547        mv $tmpfile $installdir/$filename
29548        if test ! -s $installdir/$filename; then
29549            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29550        fi
29551        case "$extension" in
29552            zip)  echo "Unzipping $installdir/$filename..."
29553               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29554            ;;
29555            tar.gz) echo "Untaring $installdir/$filename..."
29556               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29557            ;;
29558            tgz) echo "Untaring $installdir/$filename..."
29559               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29560            ;;
29561            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29562            ;;
29563        esac
29564    fi
29565    if test -f $installdir/$filename.unpacked; then
29566        depdir=$installdir
29567    fi
29568
29569	    fi
29570            # Source the builddeps file again, because in the previous command, the depdir
29571            # was updated to point at the current build dependency install directory.
29572            . $builddepsfile
29573            # Now extract variables from the builddeps.conf files.
29574            theroot=${builddep_cups_ROOT}
29575            thecflags=${builddep_cups_CFLAGS}
29576            thelibs=${builddep_cups_LIBS}
29577            if test "x$depdir" = x; then
29578                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29579            fi
29580            CUPS=$depdir
29581            if test "x$theroot" != x; then
29582               CUPS="$theroot"
29583            fi
29584            if test "x$thecflags" != x; then
29585               CUPS_CFLAGS="$thecflags"
29586            fi
29587            if test "x$thelibs" != x; then
29588               CUPS_LIBS="$thelibs"
29589            fi
29590            CUPS_FOUND=yes
29591
29592        fi
29593
29594    fi
29595
29596	fi
29597	if test "x$CUPS_FOUND" = xno; then
29598	    # Are the cups headers installed in the default /usr/include location?
29599	    for ac_header in cups/cups.h cups/ppd.h
29600do :
29601  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29602ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29603if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29604  cat >>confdefs.h <<_ACEOF
29605#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29606_ACEOF
29607 CUPS_FOUND=yes
29608	                      CUPS_CFLAGS=
29609	                      DEFAULT_CUPS=yes
29610fi
29611
29612done
29613
29614	fi
29615	if test "x$CUPS_FOUND" = xno; then
29616	    # Getting nervous now? Lets poke around for standard Solaris third-party
29617	    # package installation locations.
29618	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29619$as_echo_n "checking for cups headers... " >&6; }
29620	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29621	       # An SFW package seems to be installed!
29622	       CUPS_FOUND=yes
29623	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29624	    elif test -s /opt/csw/include/cups/cups.h; then
29625	       # A CSW package seems to be installed!
29626	       CUPS_FOUND=yes
29627	       CUPS_CFLAGS="-I/opt/csw/include"
29628	    fi
29629	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29630$as_echo "$CUPS_FOUND" >&6; }
29631	fi
29632	if test "x$CUPS_FOUND" = xno; then
29633
29634    # Print a helpful message on how to acquire the necessary build dependency.
29635    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29636    MISSING_DEPENDENCY=cups
29637    PKGHANDLER_COMMAND=
29638
29639    case $PKGHANDLER in
29640	apt-get)
29641                apt_help     $MISSING_DEPENDENCY ;;
29642    yum)
29643                yum_help     $MISSING_DEPENDENCY ;;
29644	port)
29645                port_help    $MISSING_DEPENDENCY ;;
29646	pkgutil)
29647                pkgutil_help $MISSING_DEPENDENCY ;;
29648	pkgadd)
29649                pkgadd_help  $MISSING_DEPENDENCY ;;
29650    * )
29651      break ;;
29652    esac
29653
29654    if test "x$PKGHANDLER_COMMAND" != x; then
29655        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29656    fi
29657
29658	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29659	fi
29660fi
29661
29662
29663
29664
29665
29666
29667###############################################################################
29668#
29669# The ubiquitous freetype2 library is used to render fonts.
29670#
29671
29672# Check whether --with-freetype was given.
29673if test "${with_freetype+set}" = set; then :
29674  withval=$with_freetype;
29675fi
29676
29677
29678# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29679USING_SYSTEM_FT_LIB=false
29680
29681if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29682	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29683		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29684$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29685	fi
29686	FREETYPE2_CFLAGS=
29687	FREETYPE2_LIBS=
29688        FREETYPE2_LIB_PATH=
29689else
29690	FREETYPE2_FOUND=no
29691
29692	if test "x$with_freetype" != x; then
29693
29694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29695
29696  # Input might be given as Windows format, start by converting to
29697  # unix format.
29698  path="$with_freetype"
29699  new_path=`$CYGPATH -u "$path"`
29700
29701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29704  # "foo.exe" is OK but "foo" is an error.
29705  #
29706  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29707  # It is also a way to make sure we got the proper file name for the real test later on.
29708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29709  if test "x$test_shortpath" = x; then
29710    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29711$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29712    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29713  fi
29714
29715  # Call helper function which possibly converts this using DOS-style short mode.
29716  # If so, the updated path is stored in $new_path.
29717
29718  input_path="$new_path"
29719  # Check if we need to convert this using DOS-style short mode. If the path
29720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29721  # take no chances and rewrite it.
29722  # Note: m4 eats our [], so we need to use [ and ] instead.
29723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29724  if test "x$has_forbidden_chars" != x; then
29725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29729      # Going to short mode and back again did indeed matter. Since short mode is
29730      # case insensitive, let's make it lowercase to improve readability.
29731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29732      # Now convert it back to Unix-stile (cygpath)
29733      input_path=`$CYGPATH -u "$shortmode_path"`
29734      new_path="$input_path"
29735    fi
29736  fi
29737
29738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29739  if test "x$test_cygdrive_prefix" = x; then
29740    # As a simple fix, exclude /usr/bin since it's not a real path.
29741    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29743      # a path prefixed by /cygdrive for fixpath to work.
29744      new_path="$CYGWIN_ROOT_PATH$input_path"
29745    fi
29746  fi
29747
29748
29749  if test "x$path" != "x$new_path"; then
29750    with_freetype="$new_path"
29751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29752$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29753  fi
29754
29755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29756
29757  path="$with_freetype"
29758  has_colon=`$ECHO $path | $GREP ^.:`
29759  new_path="$path"
29760  if test "x$has_colon" = x; then
29761    # Not in mixed or Windows style, start by that.
29762    new_path=`cmd //c echo $path`
29763  fi
29764
29765
29766  input_path="$new_path"
29767  # Check if we need to convert this using DOS-style short mode. If the path
29768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29769  # take no chances and rewrite it.
29770  # Note: m4 eats our [], so we need to use [ and ] instead.
29771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29772  if test "x$has_forbidden_chars" != x; then
29773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29775  fi
29776
29777
29778  windows_path="$new_path"
29779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29780    unix_path=`$CYGPATH -u "$windows_path"`
29781    new_path="$unix_path"
29782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29784    new_path="$unix_path"
29785  fi
29786
29787  if test "x$path" != "x$new_path"; then
29788    with_freetype="$new_path"
29789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29790$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29791  fi
29792
29793  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29794  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29795
29796  else
29797    # We're on a posix platform. Hooray! :)
29798    path="$with_freetype"
29799
29800    if test ! -f "$path" && test ! -d "$path"; then
29801      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29802    fi
29803
29804    has_space=`$ECHO "$path" | $GREP " "`
29805    if test "x$has_space" != x; then
29806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29807$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29808      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29809    fi
29810  fi
29811
29812	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29813            FREETYPE2_LIB_PATH="$with_freetype/lib"
29814            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29815                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29816                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29817            fi
29818            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29819                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29820            fi
29821	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29822            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29823                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29824            fi
29825 	    FREETYPE2_FOUND=yes
29826   	    if test "x$FREETYPE2_FOUND" = xyes; then
29827	        # Verify that the directories exist
29828                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29829		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29830		fi
29831	        # List the contents of the lib.
29832		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29833                if test "x$FREETYPELIB" = x; then
29834		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29835		fi
29836	        # Check one h-file
29837                if ! test -s "$with_freetype/include/ft2build.h"; then
29838		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29839		fi
29840            fi
29841        fi
29842	if test "x$FREETYPE2_FOUND" = xno; then
29843
29844
29845    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29846        # Source the builddeps file again, to make sure it uses the latest variables!
29847        . $builddepsfile
29848        # Look for a target and build machine specific resource!
29849        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29850        if test "x$resource" = x; then
29851            # Ok, lets instead look for a target specific resource
29852            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29853        fi
29854        if test "x$resource" = x; then
29855            # Ok, lets instead look for a build specific resource
29856            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29857        fi
29858        if test "x$resource" = x; then
29859            # Ok, lets instead look for a generic resource
29860            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29861            resource=${builddep_freetype2}
29862        fi
29863        if test "x$resource" != x; then
29864            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29865$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29866	    # If the resource in the builddeps.conf file is an existing directory,
29867	    # for example /java/linux/cups
29868	    if test -d ${resource}; then
29869	       depdir=${resource}
29870	    else
29871
29872# freetype2 is for example mymodule
29873# $resource is for example libs/general/libmymod_1_2_3.zip
29874# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29875# $with_builddeps_dir is for example /localhome/builddeps
29876# depdir is the name of the variable into which we store the depdir, eg MYMOD
29877# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29878# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29879    filename=`basename $resource`
29880    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29881    filebase=${filename%%.*}
29882    extension=${filename#*.}
29883    installdir=$with_builddeps_dir/$filebase
29884    if test ! -f $installdir/$filename.unpacked; then
29885        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29886$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29887        if test ! -d $installdir; then
29888            mkdir -p $installdir
29889        fi
29890        if test ! -d $installdir; then
29891            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29892        fi
29893        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29894        touch $tmpfile
29895        if test ! -f $tmpfile; then
29896            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29897        fi
29898
29899    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29900    # $tmpfile is the local file name for the downloaded file.
29901    VALID_TOOL=no
29902    if test "x$BDEPS_FTP" = xwget; then
29903       VALID_TOOL=yes
29904       wget -O $tmpfile $with_builddeps_server/$resource
29905    fi
29906    if test "x$BDEPS_FTP" = xlftp; then
29907       VALID_TOOL=yes
29908       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29909    fi
29910    if test "x$BDEPS_FTP" = xftp; then
29911        VALID_TOOL=yes
29912        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29913        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29914        FTPUSERPWD=${FTPSERVER%%@*}
29915        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29916            FTPUSER=${userpwd%%:*}
29917            FTPPWD=${userpwd#*@}
29918            FTPSERVER=${FTPSERVER#*@}
29919        else
29920            FTPUSER=ftp
29921            FTPPWD=ftp
29922        fi
29923        # the "pass" command does not work on some
29924        # ftp clients (read ftp.exe) but if it works,
29925        # passive mode is better!
29926        (\
29927            echo "user $FTPUSER $FTPPWD"        ;\
29928            echo "pass"                         ;\
29929            echo "bin"                          ;\
29930            echo "get $FTPPATH $tmpfile"              ;\
29931        ) | ftp -in $FTPSERVER
29932    fi
29933    if test "x$VALID_TOOL" != xyes; then
29934       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29935    fi
29936
29937        mv $tmpfile $installdir/$filename
29938        if test ! -s $installdir/$filename; then
29939            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29940        fi
29941        case "$extension" in
29942            zip)  echo "Unzipping $installdir/$filename..."
29943               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29944            ;;
29945            tar.gz) echo "Untaring $installdir/$filename..."
29946               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29947            ;;
29948            tgz) echo "Untaring $installdir/$filename..."
29949               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29950            ;;
29951            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29952            ;;
29953        esac
29954    fi
29955    if test -f $installdir/$filename.unpacked; then
29956        depdir=$installdir
29957    fi
29958
29959	    fi
29960            # Source the builddeps file again, because in the previous command, the depdir
29961            # was updated to point at the current build dependency install directory.
29962            . $builddepsfile
29963            # Now extract variables from the builddeps.conf files.
29964            theroot=${builddep_freetype2_ROOT}
29965            thecflags=${builddep_freetype2_CFLAGS}
29966            thelibs=${builddep_freetype2_LIBS}
29967            if test "x$depdir" = x; then
29968                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29969            fi
29970            FREETYPE2=$depdir
29971            if test "x$theroot" != x; then
29972               FREETYPE2="$theroot"
29973            fi
29974            if test "x$thecflags" != x; then
29975               FREETYPE2_CFLAGS="$thecflags"
29976            fi
29977            if test "x$thelibs" != x; then
29978               FREETYPE2_LIBS="$thelibs"
29979            fi
29980            FREETYPE2_FOUND=yes
29981            else FREETYPE2_FOUND=no
29982
29983        fi
29984        else FREETYPE2_FOUND=no
29985
29986    fi
29987
29988            USING_SYSTEM_FT_LIB=true
29989	fi
29990	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29991            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29992
29993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29994
29995  # Input might be given as Windows format, start by converting to
29996  # unix format.
29997  path="$FREETYPELOCATION"
29998  new_path=`$CYGPATH -u "$path"`
29999
30000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30003  # "foo.exe" is OK but "foo" is an error.
30004  #
30005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30006  # It is also a way to make sure we got the proper file name for the real test later on.
30007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30008  if test "x$test_shortpath" = x; then
30009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30010$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30011    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30012  fi
30013
30014  # Call helper function which possibly converts this using DOS-style short mode.
30015  # If so, the updated path is stored in $new_path.
30016
30017  input_path="$new_path"
30018  # Check if we need to convert this using DOS-style short mode. If the path
30019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30020  # take no chances and rewrite it.
30021  # Note: m4 eats our [], so we need to use [ and ] instead.
30022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30023  if test "x$has_forbidden_chars" != x; then
30024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30028      # Going to short mode and back again did indeed matter. Since short mode is
30029      # case insensitive, let's make it lowercase to improve readability.
30030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30031      # Now convert it back to Unix-stile (cygpath)
30032      input_path=`$CYGPATH -u "$shortmode_path"`
30033      new_path="$input_path"
30034    fi
30035  fi
30036
30037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30038  if test "x$test_cygdrive_prefix" = x; then
30039    # As a simple fix, exclude /usr/bin since it's not a real path.
30040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30042      # a path prefixed by /cygdrive for fixpath to work.
30043      new_path="$CYGWIN_ROOT_PATH$input_path"
30044    fi
30045  fi
30046
30047
30048  if test "x$path" != "x$new_path"; then
30049    FREETYPELOCATION="$new_path"
30050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30051$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30052  fi
30053
30054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30055
30056  path="$FREETYPELOCATION"
30057  has_colon=`$ECHO $path | $GREP ^.:`
30058  new_path="$path"
30059  if test "x$has_colon" = x; then
30060    # Not in mixed or Windows style, start by that.
30061    new_path=`cmd //c echo $path`
30062  fi
30063
30064
30065  input_path="$new_path"
30066  # Check if we need to convert this using DOS-style short mode. If the path
30067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30068  # take no chances and rewrite it.
30069  # Note: m4 eats our [], so we need to use [ and ] instead.
30070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30071  if test "x$has_forbidden_chars" != x; then
30072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30074  fi
30075
30076
30077  windows_path="$new_path"
30078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30079    unix_path=`$CYGPATH -u "$windows_path"`
30080    new_path="$unix_path"
30081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30083    new_path="$unix_path"
30084  fi
30085
30086  if test "x$path" != "x$new_path"; then
30087    FREETYPELOCATION="$new_path"
30088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30089$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30090  fi
30091
30092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30094
30095  else
30096    # We're on a posix platform. Hooray! :)
30097    path="$FREETYPELOCATION"
30098
30099    if test ! -f "$path" && test ! -d "$path"; then
30100      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30101    fi
30102
30103    has_space=`$ECHO "$path" | $GREP " "`
30104    if test "x$has_space" != x; then
30105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30106$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30107      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30108    fi
30109  fi
30110
30111	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30112$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30113	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30114	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30115	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30116 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30117                if ! test -s "$FREETYPE2_LIBS"; then
30118		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30119		fi
30120                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30121		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30122		fi
30123                USING_SYSTEM_FT_LIB=true
30124                FREETYPE2_FOUND=yes
30125	    fi
30126	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30127$as_echo "$FREETYPE2_FOUND" >&6; }
30128        fi
30129	if test "x$FREETYPE2_FOUND" = xno; then
30130
30131pkg_failed=no
30132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30133$as_echo_n "checking for FREETYPE2... " >&6; }
30134
30135if test -n "$FREETYPE2_CFLAGS"; then
30136    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30137 elif test -n "$PKG_CONFIG"; then
30138    if test -n "$PKG_CONFIG" && \
30139    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30140  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30141  ac_status=$?
30142  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30143  test $ac_status = 0; }; then
30144  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30145else
30146  pkg_failed=yes
30147fi
30148 else
30149    pkg_failed=untried
30150fi
30151if test -n "$FREETYPE2_LIBS"; then
30152    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30153 elif test -n "$PKG_CONFIG"; then
30154    if test -n "$PKG_CONFIG" && \
30155    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30156  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30157  ac_status=$?
30158  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30159  test $ac_status = 0; }; then
30160  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30161else
30162  pkg_failed=yes
30163fi
30164 else
30165    pkg_failed=untried
30166fi
30167
30168
30169
30170if test $pkg_failed = yes; then
30171
30172if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30173        _pkg_short_errors_supported=yes
30174else
30175        _pkg_short_errors_supported=no
30176fi
30177        if test $_pkg_short_errors_supported = yes; then
30178	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30179        else
30180	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30181        fi
30182	# Put the nasty error message in config.log where it belongs
30183	echo "$FREETYPE2_PKG_ERRORS" >&5
30184
30185	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30186$as_echo "no" >&6; }
30187                FREETYPE2_FOUND=no
30188elif test $pkg_failed = untried; then
30189	FREETYPE2_FOUND=no
30190else
30191	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30192	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30194$as_echo "yes" >&6; }
30195	FREETYPE2_FOUND=yes
30196fi
30197            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30198            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30199            USING_SYSTEM_FT_LIB=true
30200            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30201            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30202              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30203            fi
30204	fi
30205	if test "x$FREETYPE2_FOUND" = xno; then
30206	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30207$as_echo_n "checking for freetype in some standard locations... " >&6; }
30208
30209	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30210	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30211	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30212	    fi
30213	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30214	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30215	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30216	    fi
30217
30218	    PREV_CXXCFLAGS="$CXXFLAGS"
30219	    PREV_LDFLAGS="$LDFLAGS"
30220	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30221	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30222	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30223/* end confdefs.h.  */
30224#include<ft2build.h>
30225	                    #include FT_FREETYPE_H
30226	                   int main() { return 0; }
30227
30228_ACEOF
30229if ac_fn_cxx_try_link "$LINENO"; then :
30230
30231	                      # Yes, the default cflags and libs did the trick.
30232	                      FREETYPE2_FOUND=yes
30233	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30234	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30235
30236else
30237
30238	                      FREETYPE2_FOUND=no
30239
30240fi
30241rm -f core conftest.err conftest.$ac_objext \
30242    conftest$ac_exeext conftest.$ac_ext
30243            CXXCFLAGS="$PREV_CXXFLAGS"
30244	    LDFLAGS="$PREV_LDFLAGS"
30245	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30246$as_echo "$FREETYPE2_FOUND" >&6; }
30247            USING_SYSTEM_FT_LIB=true
30248	fi
30249	if test "x$FREETYPE2_FOUND" = xno; then
30250
30251    # Print a helpful message on how to acquire the necessary build dependency.
30252    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30253    MISSING_DEPENDENCY=freetype2
30254    PKGHANDLER_COMMAND=
30255
30256    case $PKGHANDLER in
30257	apt-get)
30258                apt_help     $MISSING_DEPENDENCY ;;
30259    yum)
30260                yum_help     $MISSING_DEPENDENCY ;;
30261	port)
30262                port_help    $MISSING_DEPENDENCY ;;
30263	pkgutil)
30264                pkgutil_help $MISSING_DEPENDENCY ;;
30265	pkgadd)
30266                pkgadd_help  $MISSING_DEPENDENCY ;;
30267    * )
30268      break ;;
30269    esac
30270
30271    if test "x$PKGHANDLER_COMMAND" != x; then
30272        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30273    fi
30274
30275		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30276	fi
30277
30278        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30279            # AC_CHECK_LIB does not support use of cl.exe
30280            PREV_LDFLAGS="$LDFLAGS"
30281            LDFLAGS="$FREETYPE2_LIBS"
30282            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30283$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30284if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
30285  $as_echo_n "(cached) " >&6
30286else
30287  ac_check_lib_save_LIBS=$LIBS
30288LIBS="-lfreetype  $LIBS"
30289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30290/* end confdefs.h.  */
30291
30292/* Override any GCC internal prototype to avoid an error.
30293   Use char because int might match the return type of a GCC
30294   builtin and then its argument prototype would still apply.  */
30295#ifdef __cplusplus
30296extern "C"
30297#endif
30298char FT_Init_FreeType ();
30299int
30300main ()
30301{
30302return FT_Init_FreeType ();
30303  ;
30304  return 0;
30305}
30306_ACEOF
30307if ac_fn_cxx_try_link "$LINENO"; then :
30308  ac_cv_lib_freetype_FT_Init_FreeType=yes
30309else
30310  ac_cv_lib_freetype_FT_Init_FreeType=no
30311fi
30312rm -f core conftest.err conftest.$ac_objext \
30313    conftest$ac_exeext conftest.$ac_ext
30314LIBS=$ac_check_lib_save_LIBS
30315fi
30316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30317$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30318if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
30319  FREETYPE2_FOUND=true
30320else
30321  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30322fi
30323
30324            LDFLAGS="$PREV_LDFLAGS"
30325        fi
30326fi
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336###############################################################################
30337#
30338# Check for alsa headers and libraries. Used on Linux/GNU systems.
30339#
30340
30341# Check whether --with-alsa was given.
30342if test "${with_alsa+set}" = set; then :
30343  withval=$with_alsa;
30344fi
30345
30346
30347# Check whether --with-alsa-include was given.
30348if test "${with_alsa_include+set}" = set; then :
30349  withval=$with_alsa_include;
30350fi
30351
30352
30353# Check whether --with-alsa-lib was given.
30354if test "${with_alsa_lib+set}" = set; then :
30355  withval=$with_alsa_lib;
30356fi
30357
30358
30359if test "x$ALSA_NOT_NEEDED" = xyes; then
30360	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30361		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30362$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30363	fi
30364	ALSA_CFLAGS=
30365	ALSA_LIBS=
30366else
30367	ALSA_FOUND=no
30368
30369	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30370	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30371	fi
30372
30373	if test "x${with_alsa}" != x; then
30374	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30375	    ALSA_CFLAGS="-I${with_alsa}/include"
30376	    ALSA_FOUND=yes
30377	fi
30378	if test "x${with_alsa_include}" != x; then
30379	    ALSA_CFLAGS="-I${with_alsa_include}"
30380	    ALSA_FOUND=yes
30381	fi
30382	if test "x${with_alsa_lib}" != x; then
30383	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30384	    ALSA_FOUND=yes
30385	fi
30386	if test "x$ALSA_FOUND" = xno; then
30387
30388
30389    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30390        # Source the builddeps file again, to make sure it uses the latest variables!
30391        . $builddepsfile
30392        # Look for a target and build machine specific resource!
30393        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30394        if test "x$resource" = x; then
30395            # Ok, lets instead look for a target specific resource
30396            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30397        fi
30398        if test "x$resource" = x; then
30399            # Ok, lets instead look for a build specific resource
30400            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30401        fi
30402        if test "x$resource" = x; then
30403            # Ok, lets instead look for a generic resource
30404            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30405            resource=${builddep_alsa}
30406        fi
30407        if test "x$resource" != x; then
30408            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30409$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30410	    # If the resource in the builddeps.conf file is an existing directory,
30411	    # for example /java/linux/cups
30412	    if test -d ${resource}; then
30413	       depdir=${resource}
30414	    else
30415
30416# alsa is for example mymodule
30417# $resource is for example libs/general/libmymod_1_2_3.zip
30418# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30419# $with_builddeps_dir is for example /localhome/builddeps
30420# depdir is the name of the variable into which we store the depdir, eg MYMOD
30421# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30422# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30423    filename=`basename $resource`
30424    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30425    filebase=${filename%%.*}
30426    extension=${filename#*.}
30427    installdir=$with_builddeps_dir/$filebase
30428    if test ! -f $installdir/$filename.unpacked; then
30429        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30430$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30431        if test ! -d $installdir; then
30432            mkdir -p $installdir
30433        fi
30434        if test ! -d $installdir; then
30435            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30436        fi
30437        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30438        touch $tmpfile
30439        if test ! -f $tmpfile; then
30440            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30441        fi
30442
30443    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30444    # $tmpfile is the local file name for the downloaded file.
30445    VALID_TOOL=no
30446    if test "x$BDEPS_FTP" = xwget; then
30447       VALID_TOOL=yes
30448       wget -O $tmpfile $with_builddeps_server/$resource
30449    fi
30450    if test "x$BDEPS_FTP" = xlftp; then
30451       VALID_TOOL=yes
30452       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30453    fi
30454    if test "x$BDEPS_FTP" = xftp; then
30455        VALID_TOOL=yes
30456        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30457        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30458        FTPUSERPWD=${FTPSERVER%%@*}
30459        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30460            FTPUSER=${userpwd%%:*}
30461            FTPPWD=${userpwd#*@}
30462            FTPSERVER=${FTPSERVER#*@}
30463        else
30464            FTPUSER=ftp
30465            FTPPWD=ftp
30466        fi
30467        # the "pass" command does not work on some
30468        # ftp clients (read ftp.exe) but if it works,
30469        # passive mode is better!
30470        (\
30471            echo "user $FTPUSER $FTPPWD"        ;\
30472            echo "pass"                         ;\
30473            echo "bin"                          ;\
30474            echo "get $FTPPATH $tmpfile"              ;\
30475        ) | ftp -in $FTPSERVER
30476    fi
30477    if test "x$VALID_TOOL" != xyes; then
30478       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30479    fi
30480
30481        mv $tmpfile $installdir/$filename
30482        if test ! -s $installdir/$filename; then
30483            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30484        fi
30485        case "$extension" in
30486            zip)  echo "Unzipping $installdir/$filename..."
30487               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30488            ;;
30489            tar.gz) echo "Untaring $installdir/$filename..."
30490               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30491            ;;
30492            tgz) echo "Untaring $installdir/$filename..."
30493               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30494            ;;
30495            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30496            ;;
30497        esac
30498    fi
30499    if test -f $installdir/$filename.unpacked; then
30500        depdir=$installdir
30501    fi
30502
30503	    fi
30504            # Source the builddeps file again, because in the previous command, the depdir
30505            # was updated to point at the current build dependency install directory.
30506            . $builddepsfile
30507            # Now extract variables from the builddeps.conf files.
30508            theroot=${builddep_alsa_ROOT}
30509            thecflags=${builddep_alsa_CFLAGS}
30510            thelibs=${builddep_alsa_LIBS}
30511            if test "x$depdir" = x; then
30512                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30513            fi
30514            ALSA=$depdir
30515            if test "x$theroot" != x; then
30516               ALSA="$theroot"
30517            fi
30518            if test "x$thecflags" != x; then
30519               ALSA_CFLAGS="$thecflags"
30520            fi
30521            if test "x$thelibs" != x; then
30522               ALSA_LIBS="$thelibs"
30523            fi
30524            ALSA_FOUND=yes
30525            else ALSA_FOUND=no
30526
30527        fi
30528        else ALSA_FOUND=no
30529
30530    fi
30531
30532	fi
30533	if test "x$ALSA_FOUND" = xno; then
30534
30535pkg_failed=no
30536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30537$as_echo_n "checking for ALSA... " >&6; }
30538
30539if test -n "$ALSA_CFLAGS"; then
30540    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30541 elif test -n "$PKG_CONFIG"; then
30542    if test -n "$PKG_CONFIG" && \
30543    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30544  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30545  ac_status=$?
30546  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30547  test $ac_status = 0; }; then
30548  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30549else
30550  pkg_failed=yes
30551fi
30552 else
30553    pkg_failed=untried
30554fi
30555if test -n "$ALSA_LIBS"; then
30556    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30557 elif test -n "$PKG_CONFIG"; then
30558    if test -n "$PKG_CONFIG" && \
30559    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30560  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30561  ac_status=$?
30562  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30563  test $ac_status = 0; }; then
30564  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30565else
30566  pkg_failed=yes
30567fi
30568 else
30569    pkg_failed=untried
30570fi
30571
30572
30573
30574if test $pkg_failed = yes; then
30575
30576if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30577        _pkg_short_errors_supported=yes
30578else
30579        _pkg_short_errors_supported=no
30580fi
30581        if test $_pkg_short_errors_supported = yes; then
30582	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30583        else
30584	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30585        fi
30586	# Put the nasty error message in config.log where it belongs
30587	echo "$ALSA_PKG_ERRORS" >&5
30588
30589	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30590$as_echo "no" >&6; }
30591                ALSA_FOUND=no
30592elif test $pkg_failed = untried; then
30593	ALSA_FOUND=no
30594else
30595	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30596	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30598$as_echo "yes" >&6; }
30599	ALSA_FOUND=yes
30600fi
30601	fi
30602	if test "x$ALSA_FOUND" = xno; then
30603	    for ac_header in alsa/asoundlib.h
30604do :
30605  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30606if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
30607  cat >>confdefs.h <<_ACEOF
30608#define HAVE_ALSA_ASOUNDLIB_H 1
30609_ACEOF
30610 ALSA_FOUND=yes
30611	                      ALSA_CFLAGS=-Iignoreme
30612	                      ALSA_LIBS=-lasound
30613	                      DEFAULT_ALSA=yes
30614else
30615  ALSA_FOUND=no
30616fi
30617
30618done
30619
30620	fi
30621	if test "x$ALSA_FOUND" = xno; then
30622
30623    # Print a helpful message on how to acquire the necessary build dependency.
30624    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30625    MISSING_DEPENDENCY=alsa
30626    PKGHANDLER_COMMAND=
30627
30628    case $PKGHANDLER in
30629	apt-get)
30630                apt_help     $MISSING_DEPENDENCY ;;
30631    yum)
30632                yum_help     $MISSING_DEPENDENCY ;;
30633	port)
30634                port_help    $MISSING_DEPENDENCY ;;
30635	pkgutil)
30636                pkgutil_help $MISSING_DEPENDENCY ;;
30637	pkgadd)
30638                pkgadd_help  $MISSING_DEPENDENCY ;;
30639    * )
30640      break ;;
30641    esac
30642
30643    if test "x$PKGHANDLER_COMMAND" != x; then
30644        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30645    fi
30646
30647	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30648	fi
30649fi
30650
30651
30652
30653
30654
30655
30656
30657###############################################################################
30658#
30659# Check for the jpeg library
30660#
30661
30662USE_EXTERNAL_LIBJPEG=true
30663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30664$as_echo_n "checking for main in -ljpeg... " >&6; }
30665if ${ac_cv_lib_jpeg_main+:} false; then :
30666  $as_echo_n "(cached) " >&6
30667else
30668  ac_check_lib_save_LIBS=$LIBS
30669LIBS="-ljpeg  $LIBS"
30670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30671/* end confdefs.h.  */
30672
30673
30674int
30675main ()
30676{
30677return main ();
30678  ;
30679  return 0;
30680}
30681_ACEOF
30682if ac_fn_cxx_try_link "$LINENO"; then :
30683  ac_cv_lib_jpeg_main=yes
30684else
30685  ac_cv_lib_jpeg_main=no
30686fi
30687rm -f core conftest.err conftest.$ac_objext \
30688    conftest$ac_exeext conftest.$ac_ext
30689LIBS=$ac_check_lib_save_LIBS
30690fi
30691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30692$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30693if test "x$ac_cv_lib_jpeg_main" = xyes; then :
30694  cat >>confdefs.h <<_ACEOF
30695#define HAVE_LIBJPEG 1
30696_ACEOF
30697
30698  LIBS="-ljpeg $LIBS"
30699
30700else
30701   USE_EXTERNAL_LIBJPEG=false
30702               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30703$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30704
30705fi
30706
30707
30708
30709###############################################################################
30710#
30711# Check for the gif library
30712#
30713
30714USE_EXTERNAL_LIBJPEG=true
30715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30716$as_echo_n "checking for main in -lgif... " >&6; }
30717if ${ac_cv_lib_gif_main+:} false; then :
30718  $as_echo_n "(cached) " >&6
30719else
30720  ac_check_lib_save_LIBS=$LIBS
30721LIBS="-lgif  $LIBS"
30722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30723/* end confdefs.h.  */
30724
30725
30726int
30727main ()
30728{
30729return main ();
30730  ;
30731  return 0;
30732}
30733_ACEOF
30734if ac_fn_cxx_try_link "$LINENO"; then :
30735  ac_cv_lib_gif_main=yes
30736else
30737  ac_cv_lib_gif_main=no
30738fi
30739rm -f core conftest.err conftest.$ac_objext \
30740    conftest$ac_exeext conftest.$ac_ext
30741LIBS=$ac_check_lib_save_LIBS
30742fi
30743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30744$as_echo "$ac_cv_lib_gif_main" >&6; }
30745if test "x$ac_cv_lib_gif_main" = xyes; then :
30746  cat >>confdefs.h <<_ACEOF
30747#define HAVE_LIBGIF 1
30748_ACEOF
30749
30750  LIBS="-lgif $LIBS"
30751
30752else
30753   USE_EXTERNAL_LIBGIF=false
30754               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30755$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30756
30757fi
30758
30759
30760
30761###############################################################################
30762#
30763# Check for the zlib library
30764#
30765
30766
30767# Check whether --with-zlib was given.
30768if test "${with_zlib+set}" = set; then :
30769  withval=$with_zlib;
30770fi
30771
30772
30773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30774$as_echo_n "checking for compress in -lz... " >&6; }
30775if ${ac_cv_lib_z_compress+:} false; then :
30776  $as_echo_n "(cached) " >&6
30777else
30778  ac_check_lib_save_LIBS=$LIBS
30779LIBS="-lz  $LIBS"
30780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30781/* end confdefs.h.  */
30782
30783/* Override any GCC internal prototype to avoid an error.
30784   Use char because int might match the return type of a GCC
30785   builtin and then its argument prototype would still apply.  */
30786#ifdef __cplusplus
30787extern "C"
30788#endif
30789char compress ();
30790int
30791main ()
30792{
30793return compress ();
30794  ;
30795  return 0;
30796}
30797_ACEOF
30798if ac_fn_cxx_try_link "$LINENO"; then :
30799  ac_cv_lib_z_compress=yes
30800else
30801  ac_cv_lib_z_compress=no
30802fi
30803rm -f core conftest.err conftest.$ac_objext \
30804    conftest$ac_exeext conftest.$ac_ext
30805LIBS=$ac_check_lib_save_LIBS
30806fi
30807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30808$as_echo "$ac_cv_lib_z_compress" >&6; }
30809if test "x$ac_cv_lib_z_compress" = xyes; then :
30810   ZLIB_FOUND=yes
30811else
30812   ZLIB_FOUND=no
30813fi
30814
30815
30816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30817$as_echo_n "checking for which zlib to use... " >&6; }
30818
30819DEFAULT_ZLIB=bundled
30820if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30821#
30822# On macosx default is system...on others default is
30823#
30824    DEFAULT_ZLIB=system
30825fi
30826
30827if test "x${ZLIB_FOUND}" != "xyes"; then
30828#
30829# If we don't find any system...set default to bundled
30830#
30831    DEFAULT_ZLIB=bundled
30832fi
30833
30834#
30835# If user didn't specify, use DEFAULT_ZLIB
30836#
30837if test "x${with_zlib}" = "x"; then
30838    with_zlib=${DEFAULT_ZLIB}
30839fi
30840
30841if test "x${with_zlib}" = "xbundled"; then
30842    USE_EXTERNAL_LIBZ=false
30843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30844$as_echo "bundled" >&6; }
30845elif test "x${with_zlib}" = "xsystem"; then
30846    if test "x${ZLIB_FOUND}" = "xyes"; then
30847        USE_EXTERNAL_LIBZ=true
30848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30849$as_echo "system" >&6; }
30850    else
30851        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30852$as_echo "system not found" >&6; }
30853        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30854    fi
30855else
30856    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30857fi
30858
30859
30860
30861###############################################################################
30862LIBZIP_CAN_USE_MMAP=true
30863
30864
30865
30866###############################################################################
30867#
30868# Check if altzone exists in time.h
30869#
30870
30871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30872/* end confdefs.h.  */
30873#include <time.h>
30874int
30875main ()
30876{
30877return (int)altzone;
30878  ;
30879  return 0;
30880}
30881_ACEOF
30882if ac_fn_cxx_try_link "$LINENO"; then :
30883  has_altzone=yes
30884else
30885  has_altzone=no
30886fi
30887rm -f core conftest.err conftest.$ac_objext \
30888    conftest$ac_exeext conftest.$ac_ext
30889if test "x$has_altzone" = xyes; then
30890
30891$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30892
30893fi
30894
30895###############################################################################
30896#
30897# Check the maths library
30898#
30899
30900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30901$as_echo_n "checking for cos in -lm... " >&6; }
30902if ${ac_cv_lib_m_cos+:} false; then :
30903  $as_echo_n "(cached) " >&6
30904else
30905  ac_check_lib_save_LIBS=$LIBS
30906LIBS="-lm  $LIBS"
30907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30908/* end confdefs.h.  */
30909
30910/* Override any GCC internal prototype to avoid an error.
30911   Use char because int might match the return type of a GCC
30912   builtin and then its argument prototype would still apply.  */
30913#ifdef __cplusplus
30914extern "C"
30915#endif
30916char cos ();
30917int
30918main ()
30919{
30920return cos ();
30921  ;
30922  return 0;
30923}
30924_ACEOF
30925if ac_fn_cxx_try_link "$LINENO"; then :
30926  ac_cv_lib_m_cos=yes
30927else
30928  ac_cv_lib_m_cos=no
30929fi
30930rm -f core conftest.err conftest.$ac_objext \
30931    conftest$ac_exeext conftest.$ac_ext
30932LIBS=$ac_check_lib_save_LIBS
30933fi
30934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30935$as_echo "$ac_cv_lib_m_cos" >&6; }
30936if test "x$ac_cv_lib_m_cos" = xyes; then :
30937  cat >>confdefs.h <<_ACEOF
30938#define HAVE_LIBM 1
30939_ACEOF
30940
30941  LIBS="-lm $LIBS"
30942
30943else
30944
30945                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30946$as_echo "$as_me: Maths library was not found" >&6;}
30947
30948fi
30949
30950
30951
30952###############################################################################
30953#
30954# Check for libdl.so
30955
30956save_LIBS="$LIBS"
30957LIBS=""
30958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30959$as_echo_n "checking for dlopen in -ldl... " >&6; }
30960if ${ac_cv_lib_dl_dlopen+:} false; then :
30961  $as_echo_n "(cached) " >&6
30962else
30963  ac_check_lib_save_LIBS=$LIBS
30964LIBS="-ldl  $LIBS"
30965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30966/* end confdefs.h.  */
30967
30968/* Override any GCC internal prototype to avoid an error.
30969   Use char because int might match the return type of a GCC
30970   builtin and then its argument prototype would still apply.  */
30971#ifdef __cplusplus
30972extern "C"
30973#endif
30974char dlopen ();
30975int
30976main ()
30977{
30978return dlopen ();
30979  ;
30980  return 0;
30981}
30982_ACEOF
30983if ac_fn_cxx_try_link "$LINENO"; then :
30984  ac_cv_lib_dl_dlopen=yes
30985else
30986  ac_cv_lib_dl_dlopen=no
30987fi
30988rm -f core conftest.err conftest.$ac_objext \
30989    conftest$ac_exeext conftest.$ac_ext
30990LIBS=$ac_check_lib_save_LIBS
30991fi
30992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30993$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30994if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
30995  cat >>confdefs.h <<_ACEOF
30996#define HAVE_LIBDL 1
30997_ACEOF
30998
30999  LIBS="-ldl $LIBS"
31000
31001fi
31002
31003LIBDL="$LIBS"
31004
31005LIBS="$save_LIBS"
31006
31007
31008
31009###############################################################################
31010#
31011# statically link libstdc++ before C++ ABI is stablized on Linux unless
31012# dynamic build is configured on command line.
31013#
31014
31015# Check whether --with-stdc++lib was given.
31016if test "${with_stdc__lib+set}" = set; then :
31017  withval=$with_stdc__lib;
31018    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31019        && test "x$with_stdc__lib" != xdefault; then
31020      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31021    fi
31022
31023else
31024  with_stdc__lib=default
31025
31026fi
31027
31028
31029if test "x$OPENJDK_TARGET_OS" = xlinux; then
31030    # Test if -lstdc++ works.
31031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31032$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31033    ac_ext=cpp
31034ac_cpp='$CXXCPP $CPPFLAGS'
31035ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31036ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31037ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31038
31039    OLD_CXXFLAGS="$CXXFLAGS"
31040    CXXFLAGS="$CXXFLAGS -lstdc++"
31041    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31042/* end confdefs.h.  */
31043
31044int
31045main ()
31046{
31047return 0;
31048  ;
31049  return 0;
31050}
31051_ACEOF
31052if ac_fn_cxx_try_link "$LINENO"; then :
31053  has_dynamic_libstdcxx=yes
31054else
31055  has_dynamic_libstdcxx=no
31056fi
31057rm -f core conftest.err conftest.$ac_objext \
31058    conftest$ac_exeext conftest.$ac_ext
31059    CXXFLAGS="$OLD_CXXFLAGS"
31060    ac_ext=cpp
31061ac_cpp='$CXXCPP $CPPFLAGS'
31062ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31063ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31064ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31065
31066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31067$as_echo "$has_dynamic_libstdcxx" >&6; }
31068
31069    # Test if stdc++ can be linked statically.
31070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31071$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31072    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31073    ac_ext=cpp
31074ac_cpp='$CXXCPP $CPPFLAGS'
31075ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31076ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31077ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31078
31079    OLD_LIBS="$LIBS"
31080    OLD_CXX="$CXX"
31081    LIBS="$STATIC_STDCXX_FLAGS"
31082    CXX="$CC"
31083    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31084/* end confdefs.h.  */
31085
31086int
31087main ()
31088{
31089return 0;
31090  ;
31091  return 0;
31092}
31093_ACEOF
31094if ac_fn_cxx_try_link "$LINENO"; then :
31095  has_static_libstdcxx=yes
31096else
31097  has_static_libstdcxx=no
31098fi
31099rm -f core conftest.err conftest.$ac_objext \
31100    conftest$ac_exeext conftest.$ac_ext
31101    LIBS="$OLD_LIBS"
31102    CXX="$OLD_CXX"
31103    ac_ext=cpp
31104ac_cpp='$CXXCPP $CPPFLAGS'
31105ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31106ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31107ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31108
31109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31110$as_echo "$has_static_libstdcxx" >&6; }
31111
31112    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31113        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31114    fi
31115
31116    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31117        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31118    fi
31119
31120    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31121        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31122    fi
31123
31124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31125$as_echo_n "checking how to link with libstdc++... " >&6; }
31126    # If dynamic was requested, it's available since it would fail above otherwise.
31127    # If dynamic wasn't requested, go with static unless it isn't available.
31128    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31129        LIBCXX="$LIBCXX -lstdc++"
31130        LDCXX="$CXX"
31131        STATIC_CXX_SETTING="STATIC_CXX=false"
31132        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31133$as_echo "dynamic" >&6; }
31134    else
31135        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31136        LDCXX="$CC"
31137        STATIC_CXX_SETTING="STATIC_CXX=true"
31138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31139$as_echo "static" >&6; }
31140    fi
31141fi
31142
31143
31144# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31145if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31146    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31147fi
31148
31149# TODO better (platform agnostic) test
31150if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31151    LIBCXX="-lstdc++"
31152fi
31153
31154
31155
31156
31157
31158# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31159
31160# When using cygwin or msys, we need a wrapper binary that renames
31161# /cygdrive/c/ arguments into c:/ arguments and peeks into
31162# @files and rewrites these too! This wrapper binary is
31163# called fixpath.
31164FIXPATH=
31165if test "x$OPENJDK_BUILD_OS" = xwindows; then
31166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31167$as_echo_n "checking if fixpath can be created... " >&6; }
31168    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31169    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31170    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31171      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31172      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31173      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31174      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31175    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31176      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31177      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31178
31179      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31180      # @ was chosen as separator to minimize risk of other tools messing around with it
31181      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31182      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31183
31184      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31185    fi
31186    rm -f $OUTPUT_ROOT/fixpath*
31187    cd $OUTPUT_ROOT
31188    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31189    cd $CURDIR
31190
31191    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31193$as_echo "no" >&6; }
31194        cat $OUTPUT_ROOT/fixpath1.log
31195        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31196    fi
31197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31198$as_echo "yes" >&6; }
31199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31200$as_echo_n "checking if fixpath.exe works... " >&6; }
31201    cd $OUTPUT_ROOT
31202    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31203    cd $CURDIR
31204    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31206$as_echo "no" >&6; }
31207        cat $OUTPUT_ROOT/fixpath2.log
31208        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31209    fi
31210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31211$as_echo "yes" >&6; }
31212    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31213fi
31214
31215
31216
31217
31218###############################################################################
31219#
31220# We need to do some final tweaking, when everything else is done.
31221#
31222###############################################################################
31223
31224
31225HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31226
31227
31228# The name of the Service Agent jar.
31229SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31230if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31231  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31232fi
31233
31234
31235
31236
31237###############################################################################
31238#
31239# Configure parts of the build that only affect the build performance,
31240# not the result.
31241#
31242###############################################################################
31243
31244
31245# How many cores do we have on this build system?
31246
31247# Check whether --with-num-cores was given.
31248if test "${with_num_cores+set}" = set; then :
31249  withval=$with_num_cores;
31250fi
31251
31252if test "x$with_num_cores" = x; then
31253    # The number of cores were not specified, try to probe them.
31254
31255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31256$as_echo_n "checking for number of cores... " >&6; }
31257    NUM_CORES=1
31258    FOUND_CORES=no
31259
31260    if test -f /proc/cpuinfo; then
31261        # Looks like a Linux (or cygwin) system
31262        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31263        FOUND_CORES=yes
31264    elif test -x /usr/sbin/psrinfo; then
31265        # Looks like a Solaris system
31266        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31267        FOUND_CORES=yes
31268    elif test -x /usr/sbin/system_profiler; then
31269        # Looks like a MacOSX system
31270        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31271        FOUND_CORES=yes
31272    elif test -n "$NUMBER_OF_PROCESSORS"; then
31273        # On windows, look in the env
31274        NUM_CORES=$NUMBER_OF_PROCESSORS
31275        FOUND_CORES=yes
31276    fi
31277
31278    # For c/c++ code we run twice as many concurrent build
31279    # jobs than we have cores, otherwise we will stall on io.
31280    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31281
31282    if test "x$FOUND_CORES" = xyes; then
31283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31284$as_echo "$NUM_CORES" >&6; }
31285    else
31286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31287$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31288        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31289$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31290    fi
31291
31292
31293else
31294    NUM_CORES=$with_num_cores
31295    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31296fi
31297
31298
31299
31300
31301# How much memory do we have on this build system?
31302
31303# Check whether --with-memory-size was given.
31304if test "${with_memory_size+set}" = set; then :
31305  withval=$with_memory_size;
31306fi
31307
31308if test "x$with_memory_size" = x; then
31309    # The memory size was not specified, try to probe it.
31310
31311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31312$as_echo_n "checking for memory size... " >&6; }
31313    # Default to 1024 MB
31314    MEMORY_SIZE=1024
31315    FOUND_MEM=no
31316
31317    if test -f /proc/meminfo; then
31318        # Looks like a Linux (or cygwin) system
31319        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31320        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31321        FOUND_MEM=yes
31322    elif test -x /usr/sbin/prtconf; then
31323        # Looks like a Solaris system
31324        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31325        FOUND_MEM=yes
31326    elif test -x /usr/sbin/system_profiler; then
31327        # Looks like a MacOSX system
31328        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31329        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31330        FOUND_MEM=yes
31331    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31332        # Windows, but without cygwin
31333        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31334        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31335        FOUND_MEM=yes
31336    fi
31337
31338    if test "x$FOUND_MEM" = xyes; then
31339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31340$as_echo "$MEMORY_SIZE MB" >&6; }
31341    else
31342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31343$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31345$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31346    fi
31347
31348else
31349    MEMORY_SIZE=$with_memory_size
31350fi
31351
31352
31353
31354# Setup smart javac (after cores and memory have been setup)
31355
31356
31357# Check whether --with-sjavac-server-java was given.
31358if test "${with_sjavac_server_java+set}" = set; then :
31359  withval=$with_sjavac_server_java;
31360fi
31361
31362
31363if test "x$with_sjavac_server_java" != x; then
31364    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31365    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31366    if test "x$FOUND_VERSION" = x; then
31367        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31368    fi
31369else
31370    SJAVAC_SERVER_JAVA=""
31371    # Hotspot specific options.
31372
31373    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31374    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31375    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31376    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31377    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31378        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31379    fi
31380
31381    # JRockit specific options.
31382
31383    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31384    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31385    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31386    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31387    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31388        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31389    fi
31390
31391    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31392fi
31393
31394
31395
31396# Check whether --with-sjavac-server-cores was given.
31397if test "${with_sjavac_server_cores+set}" = set; then :
31398  withval=$with_sjavac_server_cores;
31399fi
31400
31401if test "x$with_sjavac_server_cores" != x; then
31402    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31403else
31404    if test "$NUM_CORES" -gt 16; then
31405        # We set this arbitrary limit because we want to limit the heap
31406        # size of the javac server.
31407        # In the future we will make the javac compilers in the server
31408        # share more and more state, thus enabling us to use more and
31409        # more concurrent threads in the server.
31410        SJAVAC_SERVER_CORES="16"
31411    else
31412        SJAVAC_SERVER_CORES="$NUM_CORES"
31413    fi
31414
31415    if test "$MEMORY_SIZE" -gt "17000"; then
31416        MAX_HEAP_MEM=10000
31417
31418    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31419    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31420    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31421    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31422    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31423        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31424    fi
31425
31426
31427    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31428    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31429    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31430    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31431    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31432        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31433    fi
31434
31435    elif test "$MEMORY_SIZE" -gt "10000"; then
31436        MAX_HEAP_MEM=6000
31437
31438    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31439    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31440    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31441    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31442    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31443        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31444    fi
31445
31446
31447    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31448    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31449    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31450    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31451    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31452        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31453    fi
31454
31455    elif test "$MEMORY_SIZE" -gt "5000"; then
31456        MAX_HEAP_MEM=3000
31457
31458    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31459    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31460    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31461    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31462    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31463        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31464    fi
31465
31466
31467    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31468    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31469    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31470    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31471    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31472        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31473    fi
31474
31475    elif test "$MEMORY_SIZE" -gt "3800"; then
31476        MAX_HEAP_MEM=2500
31477
31478    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31479    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31480    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31481    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31482    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31483        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31484    fi
31485
31486    elif test "$MEMORY_SIZE" -gt "1900"; then
31487        MAX_HEAP_MEM=1200
31488
31489    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31490    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31491    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31492    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31493    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31494        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31495    fi
31496
31497    elif test "$MEMORY_SIZE" -gt "1000"; then
31498        MAX_HEAP_MEM=900
31499
31500    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31501    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31502    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31503    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31504    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31505        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31506    fi
31507
31508    else
31509        MAX_HEAP_MEM=512
31510
31511    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31512    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31513    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31514    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31515    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31516        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31517    fi
31518
31519    fi
31520
31521
31522    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31523    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31524    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31525    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31526    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31527        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31528    fi
31529
31530
31531    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31532    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31533    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31534    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31535    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31536        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31537    fi
31538
31539
31540    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31541    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31542    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31543    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31544    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31545        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31546    fi
31547
31548
31549    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31550    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31551        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31552$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31553        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31555$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31556    fi
31557fi
31558
31559
31560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31561$as_echo_n "checking whether to use sjavac... " >&6; }
31562# Check whether --enable-sjavac was given.
31563if test "${enable_sjavac+set}" = set; then :
31564  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31565else
31566  ENABLE_SJAVAC='no'
31567fi
31568
31569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31570$as_echo "$ENABLE_SJAVAC" >&6; }
31571
31572
31573if test "x$ENABLE_SJAVAC" = xyes; then
31574    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31575else
31576    SJAVAC_SERVER_DIR=
31577fi
31578
31579
31580
31581
31582# Can the C/C++ compiler use precompiled headers?
31583
31584
31585###############################################################################
31586#
31587# Can the C/C++ compiler use precompiled headers?
31588#
31589# Check whether --enable-precompiled-headers was given.
31590if test "${enable_precompiled_headers+set}" = set; then :
31591  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31592else
31593  ENABLE_PRECOMPH=yes
31594fi
31595
31596
31597USE_PRECOMPILED_HEADER=1
31598if test "x$ENABLE_PRECOMPH" = xno; then
31599    USE_PRECOMPILED_HEADER=0
31600fi
31601
31602if test "x$ENABLE_PRECOMPH" = xyes; then
31603    # Check that the compiler actually supports precomp headers.
31604    if test "x$GCC" = xyes; then
31605         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31606$as_echo_n "checking that precompiled headers work... " >&6; }
31607         echo "int alfa();" > conftest.h
31608         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31609         if test ! -f conftest.hpp.gch; then
31610             USE_PRECOMPILED_HEADER=0
31611             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31612$as_echo "no" >&6; }
31613         else
31614             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31615$as_echo "yes" >&6; }
31616         fi
31617         rm -f conftest.h conftest.hpp.gch
31618    fi
31619fi
31620
31621
31622
31623
31624# Setup use of ccache, if available
31625
31626    # Check whether --enable-ccache was given.
31627if test "${enable_ccache+set}" = set; then :
31628  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31629else
31630  ENABLE_CCACHE=yes
31631fi
31632
31633    if test "x$ENABLE_CCACHE" = xyes; then
31634        # Extract the first word of "ccache", so it can be a program name with args.
31635set dummy ccache; ac_word=$2
31636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31637$as_echo_n "checking for $ac_word... " >&6; }
31638if ${ac_cv_path_CCACHE+:} false; then :
31639  $as_echo_n "(cached) " >&6
31640else
31641  case $CCACHE in
31642  [\\/]* | ?:[\\/]*)
31643  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31644  ;;
31645  *)
31646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31647for as_dir in $PATH
31648do
31649  IFS=$as_save_IFS
31650  test -z "$as_dir" && as_dir=.
31651    for ac_exec_ext in '' $ac_executable_extensions; do
31652  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31653    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31655    break 2
31656  fi
31657done
31658  done
31659IFS=$as_save_IFS
31660
31661  ;;
31662esac
31663fi
31664CCACHE=$ac_cv_path_CCACHE
31665if test -n "$CCACHE"; then
31666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31667$as_echo "$CCACHE" >&6; }
31668else
31669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31670$as_echo "no" >&6; }
31671fi
31672
31673
31674    else
31675        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31676$as_echo_n "checking for ccache... " >&6; }
31677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31678$as_echo "explicitly disabled" >&6; }
31679        CCACHE=
31680    fi
31681
31682
31683
31684# Check whether --with-ccache-dir was given.
31685if test "${with_ccache_dir+set}" = set; then :
31686  withval=$with_ccache_dir;
31687fi
31688
31689
31690    if test "x$with_ccache_dir" != x; then
31691        # When using a non home ccache directory, assume the use is to share ccache files
31692        # with other users. Thus change the umask.
31693        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31694    fi
31695    CCACHE_FOUND=""
31696    if test "x$CCACHE" != x; then
31697
31698    if test "x$CCACHE" != x; then
31699        CCACHE_FOUND="true"
31700        # Only use ccache if it is 3.1.4 or later, which supports
31701        # precompiled headers.
31702        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31703$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31704        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31705        if test "x$HAS_GOOD_CCACHE" = x; then
31706            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31707$as_echo "no, disabling ccache" >&6; }
31708            CCACHE=
31709        else
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 C-compiler supports ccache precompiled headers" >&5
31713$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31714            PUSHED_FLAGS="$CXXFLAGS"
31715            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31716            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31717/* end confdefs.h.  */
31718
31719int
31720main ()
31721{
31722
31723  ;
31724  return 0;
31725}
31726_ACEOF
31727if ac_fn_cxx_try_compile "$LINENO"; then :
31728  CC_KNOWS_CCACHE_TRICK=yes
31729else
31730  CC_KNOWS_CCACHE_TRICK=no
31731fi
31732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31733            CXXFLAGS="$PUSHED_FLAGS"
31734            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31735                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31736$as_echo "yes" >&6; }
31737            else
31738                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31739$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31740                CCACHE=
31741            fi
31742        fi
31743    fi
31744
31745    if test "x$CCACHE" != x; then
31746        CCACHE_SLOPPINESS=time_macros
31747        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31748        CCACHE_FLAGS=-fpch-preprocess
31749
31750        if test "x$SET_CCACHE_DIR" != x; then
31751            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31752	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31753        fi
31754    fi
31755
31756    fi
31757
31758
31759###############################################################################
31760#
31761# And now the finish...
31762#
31763###############################################################################
31764
31765# Check for some common pitfalls
31766
31767  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31768    file_to_test="$SRC_ROOT/LICENSE"
31769    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31770      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
31771    fi
31772  fi
31773
31774
31775
31776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31777$as_echo_n "checking if build directory is on local disk... " >&6; }
31778
31779	# df -l lists only local disks; if the given directory is not found then
31780	# a non-zero exit code is given
31781  if test "x$DF" = x; then
31782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31783      # msys does not have df; use Windows "net use" instead.
31784      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31785      if test "x$IS_NETWORK_DISK" = x; then
31786        OUTPUT_DIR_IS_LOCAL="yes"
31787      else
31788        OUTPUT_DIR_IS_LOCAL="no"
31789      fi
31790    else
31791      # No df here, say it's local
31792      OUTPUT_DIR_IS_LOCAL="yes"
31793    fi
31794  else
31795    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31796      OUTPUT_DIR_IS_LOCAL="yes"
31797    else
31798      OUTPUT_DIR_IS_LOCAL="no"
31799    fi
31800  fi
31801
31802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31803$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31804
31805
31806
31807# Check if the user has any old-style ALT_ variables set.
31808FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31809
31810# Before generating output files, test if they exist. If they do, this is a reconfigure.
31811# Since we can't properly handle the dependencies for this, warn the user about the situation
31812if test -e $OUTPUT_ROOT/spec.gmk; then
31813  IS_RECONFIGURE=yes
31814else
31815  IS_RECONFIGURE=no
31816fi
31817
31818if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31819  HIDE_PERFORMANCE_HINTS=yes
31820else
31821  HIDE_PERFORMANCE_HINTS=no
31822  # Hide it the next time around...
31823  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31824fi
31825
31826
31827
31828# At the end, call the custom hook. (Dummy macro if no custom sources available)
31829
31830
31831# We're messing a bit with internal autoconf variables to put the config.status
31832# in the output directory instead of the current directory.
31833CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31834# Create the actual output files. Now the main work of configure is done.
31835cat >confcache <<\_ACEOF
31836# This file is a shell script that caches the results of configure
31837# tests run on this system so they can be shared between configure
31838# scripts and configure runs, see configure's option --config-cache.
31839# It is not useful on other systems.  If it contains results you don't
31840# want to keep, you may remove or edit it.
31841#
31842# config.status only pays attention to the cache file if you give it
31843# the --recheck option to rerun configure.
31844#
31845# `ac_cv_env_foo' variables (set or unset) will be overridden when
31846# loading this file, other *unset* `ac_cv_foo' will be assigned the
31847# following values.
31848
31849_ACEOF
31850
31851# The following way of writing the cache mishandles newlines in values,
31852# but we know of no workaround that is simple, portable, and efficient.
31853# So, we kill variables containing newlines.
31854# Ultrix sh set writes to stderr and can't be redirected directly,
31855# and sets the high bit in the cache file unless we assign to the vars.
31856(
31857  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31858    eval ac_val=\$$ac_var
31859    case $ac_val in #(
31860    *${as_nl}*)
31861      case $ac_var in #(
31862      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31863$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31864      esac
31865      case $ac_var in #(
31866      _ | IFS | as_nl) ;; #(
31867      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31868      *) { eval $ac_var=; unset $ac_var;} ;;
31869      esac ;;
31870    esac
31871  done
31872
31873  (set) 2>&1 |
31874    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31875    *${as_nl}ac_space=\ *)
31876      # `set' does not quote correctly, so add quotes: double-quote
31877      # substitution turns \\\\ into \\, and sed turns \\ into \.
31878      sed -n \
31879	"s/'/'\\\\''/g;
31880	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31881      ;; #(
31882    *)
31883      # `set' quotes correctly as required by POSIX, so do not add quotes.
31884      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31885      ;;
31886    esac |
31887    sort
31888) |
31889  sed '
31890     /^ac_cv_env_/b end
31891     t clear
31892     :clear
31893     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31894     t end
31895     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31896     :end' >>confcache
31897if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31898  if test -w "$cache_file"; then
31899    if test "x$cache_file" != "x/dev/null"; then
31900      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31901$as_echo "$as_me: updating cache $cache_file" >&6;}
31902      if test ! -f "$cache_file" || test -h "$cache_file"; then
31903	cat confcache >"$cache_file"
31904      else
31905        case $cache_file in #(
31906        */* | ?:*)
31907	  mv -f confcache "$cache_file"$$ &&
31908	  mv -f "$cache_file"$$ "$cache_file" ;; #(
31909        *)
31910	  mv -f confcache "$cache_file" ;;
31911	esac
31912      fi
31913    fi
31914  else
31915    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31916$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31917  fi
31918fi
31919rm -f confcache
31920
31921test "x$prefix" = xNONE && prefix=$ac_default_prefix
31922# Let make expand exec_prefix.
31923test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31924
31925DEFS=-DHAVE_CONFIG_H
31926
31927ac_libobjs=
31928ac_ltlibobjs=
31929U=
31930for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31931  # 1. Remove the extension, and $U if already installed.
31932  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31933  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31934  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31935  #    will be set to the directory where LIBOBJS objects are built.
31936  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31937  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31938done
31939LIBOBJS=$ac_libobjs
31940
31941LTLIBOBJS=$ac_ltlibobjs
31942
31943
31944
31945: "${CONFIG_STATUS=./config.status}"
31946ac_write_fail=0
31947ac_clean_files_save=$ac_clean_files
31948ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31949{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31950$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31951as_write_fail=0
31952cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31953#! $SHELL
31954# Generated by $as_me.
31955# Run this file to recreate the current configuration.
31956# Compiler output produced by configure, useful for debugging
31957# configure, is in config.log if it exists.
31958
31959debug=false
31960ac_cs_recheck=false
31961ac_cs_silent=false
31962
31963SHELL=\${CONFIG_SHELL-$SHELL}
31964export SHELL
31965_ASEOF
31966cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31967## -------------------- ##
31968## M4sh Initialization. ##
31969## -------------------- ##
31970
31971# Be more Bourne compatible
31972DUALCASE=1; export DUALCASE # for MKS sh
31973if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31974  emulate sh
31975  NULLCMD=:
31976  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31977  # is contrary to our usage.  Disable this feature.
31978  alias -g '${1+"$@"}'='"$@"'
31979  setopt NO_GLOB_SUBST
31980else
31981  case `(set -o) 2>/dev/null` in #(
31982  *posix*) :
31983    set -o posix ;; #(
31984  *) :
31985     ;;
31986esac
31987fi
31988
31989
31990as_nl='
31991'
31992export as_nl
31993# Printing a long string crashes Solaris 7 /usr/bin/printf.
31994as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31995as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31996as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31997# Prefer a ksh shell builtin over an external printf program on Solaris,
31998# but without wasting forks for bash or zsh.
31999if test -z "$BASH_VERSION$ZSH_VERSION" \
32000    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32001  as_echo='print -r --'
32002  as_echo_n='print -rn --'
32003elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32004  as_echo='printf %s\n'
32005  as_echo_n='printf %s'
32006else
32007  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32008    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32009    as_echo_n='/usr/ucb/echo -n'
32010  else
32011    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32012    as_echo_n_body='eval
32013      arg=$1;
32014      case $arg in #(
32015      *"$as_nl"*)
32016	expr "X$arg" : "X\\(.*\\)$as_nl";
32017	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32018      esac;
32019      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32020    '
32021    export as_echo_n_body
32022    as_echo_n='sh -c $as_echo_n_body as_echo'
32023  fi
32024  export as_echo_body
32025  as_echo='sh -c $as_echo_body as_echo'
32026fi
32027
32028# The user is always right.
32029if test "${PATH_SEPARATOR+set}" != set; then
32030  PATH_SEPARATOR=:
32031  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32032    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32033      PATH_SEPARATOR=';'
32034  }
32035fi
32036
32037
32038# IFS
32039# We need space, tab and new line, in precisely that order.  Quoting is
32040# there to prevent editors from complaining about space-tab.
32041# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32042# splitting by setting IFS to empty value.)
32043IFS=" ""	$as_nl"
32044
32045# Find who we are.  Look in the path if we contain no directory separator.
32046as_myself=
32047case $0 in #((
32048  *[\\/]* ) as_myself=$0 ;;
32049  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32050for as_dir in $PATH
32051do
32052  IFS=$as_save_IFS
32053  test -z "$as_dir" && as_dir=.
32054    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32055  done
32056IFS=$as_save_IFS
32057
32058     ;;
32059esac
32060# We did not find ourselves, most probably we were run as `sh COMMAND'
32061# in which case we are not to be found in the path.
32062if test "x$as_myself" = x; then
32063  as_myself=$0
32064fi
32065if test ! -f "$as_myself"; then
32066  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32067  exit 1
32068fi
32069
32070# Unset variables that we do not need and which cause bugs (e.g. in
32071# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32072# suppresses any "Segmentation fault" message there.  '((' could
32073# trigger a bug in pdksh 5.2.14.
32074for as_var in BASH_ENV ENV MAIL MAILPATH
32075do eval test x\${$as_var+set} = xset \
32076  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32077done
32078PS1='$ '
32079PS2='> '
32080PS4='+ '
32081
32082# NLS nuisances.
32083LC_ALL=C
32084export LC_ALL
32085LANGUAGE=C
32086export LANGUAGE
32087
32088# CDPATH.
32089(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32090
32091
32092# as_fn_error STATUS ERROR [LINENO LOG_FD]
32093# ----------------------------------------
32094# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32095# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32096# script with STATUS, using 1 if that was 0.
32097as_fn_error ()
32098{
32099  as_status=$1; test $as_status -eq 0 && as_status=1
32100  if test "$4"; then
32101    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32102    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32103  fi
32104  $as_echo "$as_me: error: $2" >&2
32105  as_fn_exit $as_status
32106} # as_fn_error
32107
32108
32109# as_fn_set_status STATUS
32110# -----------------------
32111# Set $? to STATUS, without forking.
32112as_fn_set_status ()
32113{
32114  return $1
32115} # as_fn_set_status
32116
32117# as_fn_exit STATUS
32118# -----------------
32119# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32120as_fn_exit ()
32121{
32122  set +e
32123  as_fn_set_status $1
32124  exit $1
32125} # as_fn_exit
32126
32127# as_fn_unset VAR
32128# ---------------
32129# Portably unset VAR.
32130as_fn_unset ()
32131{
32132  { eval $1=; unset $1;}
32133}
32134as_unset=as_fn_unset
32135# as_fn_append VAR VALUE
32136# ----------------------
32137# Append the text in VALUE to the end of the definition contained in VAR. Take
32138# advantage of any shell optimizations that allow amortized linear growth over
32139# repeated appends, instead of the typical quadratic growth present in naive
32140# implementations.
32141if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32142  eval 'as_fn_append ()
32143  {
32144    eval $1+=\$2
32145  }'
32146else
32147  as_fn_append ()
32148  {
32149    eval $1=\$$1\$2
32150  }
32151fi # as_fn_append
32152
32153# as_fn_arith ARG...
32154# ------------------
32155# Perform arithmetic evaluation on the ARGs, and store the result in the
32156# global $as_val. Take advantage of shells that can avoid forks. The arguments
32157# must be portable across $(()) and expr.
32158if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32159  eval 'as_fn_arith ()
32160  {
32161    as_val=$(( $* ))
32162  }'
32163else
32164  as_fn_arith ()
32165  {
32166    as_val=`expr "$@" || test $? -eq 1`
32167  }
32168fi # as_fn_arith
32169
32170
32171if expr a : '\(a\)' >/dev/null 2>&1 &&
32172   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32173  as_expr=expr
32174else
32175  as_expr=false
32176fi
32177
32178if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32179  as_basename=basename
32180else
32181  as_basename=false
32182fi
32183
32184if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32185  as_dirname=dirname
32186else
32187  as_dirname=false
32188fi
32189
32190as_me=`$as_basename -- "$0" ||
32191$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32192	 X"$0" : 'X\(//\)$' \| \
32193	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32194$as_echo X/"$0" |
32195    sed '/^.*\/\([^/][^/]*\)\/*$/{
32196	    s//\1/
32197	    q
32198	  }
32199	  /^X\/\(\/\/\)$/{
32200	    s//\1/
32201	    q
32202	  }
32203	  /^X\/\(\/\).*/{
32204	    s//\1/
32205	    q
32206	  }
32207	  s/.*/./; q'`
32208
32209# Avoid depending upon Character Ranges.
32210as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32211as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32212as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32213as_cr_digits='0123456789'
32214as_cr_alnum=$as_cr_Letters$as_cr_digits
32215
32216ECHO_C= ECHO_N= ECHO_T=
32217case `echo -n x` in #(((((
32218-n*)
32219  case `echo 'xy\c'` in
32220  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32221  xy)  ECHO_C='\c';;
32222  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32223       ECHO_T='	';;
32224  esac;;
32225*)
32226  ECHO_N='-n';;
32227esac
32228
32229rm -f conf$$ conf$$.exe conf$$.file
32230if test -d conf$$.dir; then
32231  rm -f conf$$.dir/conf$$.file
32232else
32233  rm -f conf$$.dir
32234  mkdir conf$$.dir 2>/dev/null
32235fi
32236if (echo >conf$$.file) 2>/dev/null; then
32237  if ln -s conf$$.file conf$$ 2>/dev/null; then
32238    as_ln_s='ln -s'
32239    # ... but there are two gotchas:
32240    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32241    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32242    # In both cases, we have to default to `cp -p'.
32243    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32244      as_ln_s='cp -p'
32245  elif ln conf$$.file conf$$ 2>/dev/null; then
32246    as_ln_s=ln
32247  else
32248    as_ln_s='cp -p'
32249  fi
32250else
32251  as_ln_s='cp -p'
32252fi
32253rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32254rmdir conf$$.dir 2>/dev/null
32255
32256
32257# as_fn_mkdir_p
32258# -------------
32259# Create "$as_dir" as a directory, including parents if necessary.
32260as_fn_mkdir_p ()
32261{
32262
32263  case $as_dir in #(
32264  -*) as_dir=./$as_dir;;
32265  esac
32266  test -d "$as_dir" || eval $as_mkdir_p || {
32267    as_dirs=
32268    while :; do
32269      case $as_dir in #(
32270      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32271      *) as_qdir=$as_dir;;
32272      esac
32273      as_dirs="'$as_qdir' $as_dirs"
32274      as_dir=`$as_dirname -- "$as_dir" ||
32275$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32276	 X"$as_dir" : 'X\(//\)[^/]' \| \
32277	 X"$as_dir" : 'X\(//\)$' \| \
32278	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32279$as_echo X"$as_dir" |
32280    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32281	    s//\1/
32282	    q
32283	  }
32284	  /^X\(\/\/\)[^/].*/{
32285	    s//\1/
32286	    q
32287	  }
32288	  /^X\(\/\/\)$/{
32289	    s//\1/
32290	    q
32291	  }
32292	  /^X\(\/\).*/{
32293	    s//\1/
32294	    q
32295	  }
32296	  s/.*/./; q'`
32297      test -d "$as_dir" && break
32298    done
32299    test -z "$as_dirs" || eval "mkdir $as_dirs"
32300  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32301
32302
32303} # as_fn_mkdir_p
32304if mkdir -p . 2>/dev/null; then
32305  as_mkdir_p='mkdir -p "$as_dir"'
32306else
32307  test -d ./-p && rmdir ./-p
32308  as_mkdir_p=false
32309fi
32310
32311if test -x / >/dev/null 2>&1; then
32312  as_test_x='test -x'
32313else
32314  if ls -dL / >/dev/null 2>&1; then
32315    as_ls_L_option=L
32316  else
32317    as_ls_L_option=
32318  fi
32319  as_test_x='
32320    eval sh -c '\''
32321      if test -d "$1"; then
32322	test -d "$1/.";
32323      else
32324	case $1 in #(
32325	-*)set "./$1";;
32326	esac;
32327	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32328	???[sx]*):;;*)false;;esac;fi
32329    '\'' sh
32330  '
32331fi
32332as_executable_p=$as_test_x
32333
32334# Sed expression to map a string onto a valid CPP name.
32335as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32336
32337# Sed expression to map a string onto a valid variable name.
32338as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32339
32340
32341exec 6>&1
32342## ----------------------------------- ##
32343## Main body of $CONFIG_STATUS script. ##
32344## ----------------------------------- ##
32345_ASEOF
32346test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32347
32348cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32349# Save the log message, to keep $0 and so on meaningful, and to
32350# report actual input values of CONFIG_FILES etc. instead of their
32351# values after options handling.
32352ac_log="
32353This file was extended by OpenJDK $as_me jdk8, which was
32354generated by GNU Autoconf 2.68.  Invocation command line was
32355
32356  CONFIG_FILES    = $CONFIG_FILES
32357  CONFIG_HEADERS  = $CONFIG_HEADERS
32358  CONFIG_LINKS    = $CONFIG_LINKS
32359  CONFIG_COMMANDS = $CONFIG_COMMANDS
32360  $ $0 $@
32361
32362on `(hostname || uname -n) 2>/dev/null | sed 1q`
32363"
32364
32365_ACEOF
32366
32367case $ac_config_files in *"
32368"*) set x $ac_config_files; shift; ac_config_files=$*;;
32369esac
32370
32371case $ac_config_headers in *"
32372"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32373esac
32374
32375
32376cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32377# Files that config.status was made for.
32378config_files="$ac_config_files"
32379config_headers="$ac_config_headers"
32380
32381_ACEOF
32382
32383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32384ac_cs_usage="\
32385\`$as_me' instantiates files and other configuration actions
32386from templates according to the current configuration.  Unless the files
32387and actions are specified as TAGs, all are instantiated by default.
32388
32389Usage: $0 [OPTION]... [TAG]...
32390
32391  -h, --help       print this help, then exit
32392  -V, --version    print version number and configuration settings, then exit
32393      --config     print configuration, then exit
32394  -q, --quiet, --silent
32395                   do not print progress messages
32396  -d, --debug      don't remove temporary files
32397      --recheck    update $as_me by reconfiguring in the same conditions
32398      --file=FILE[:TEMPLATE]
32399                   instantiate the configuration file FILE
32400      --header=FILE[:TEMPLATE]
32401                   instantiate the configuration header FILE
32402
32403Configuration files:
32404$config_files
32405
32406Configuration headers:
32407$config_headers
32408
32409Report bugs to <build-dev@openjdk.java.net>.
32410OpenJDK home page: <http://openjdk.java.net>."
32411
32412_ACEOF
32413cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32414ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32415ac_cs_version="\\
32416OpenJDK config.status jdk8
32417configured by $0, generated by GNU Autoconf 2.68,
32418  with options \\"\$ac_cs_config\\"
32419
32420Copyright (C) 2010 Free Software Foundation, Inc.
32421This config.status script is free software; the Free Software Foundation
32422gives unlimited permission to copy, distribute and modify it."
32423
32424ac_pwd='$ac_pwd'
32425srcdir='$srcdir'
32426AWK='$AWK'
32427test -n "\$AWK" || AWK=awk
32428_ACEOF
32429
32430cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32431# The default lists apply if the user does not specify any file.
32432ac_need_defaults=:
32433while test $# != 0
32434do
32435  case $1 in
32436  --*=?*)
32437    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32438    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32439    ac_shift=:
32440    ;;
32441  --*=)
32442    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32443    ac_optarg=
32444    ac_shift=:
32445    ;;
32446  *)
32447    ac_option=$1
32448    ac_optarg=$2
32449    ac_shift=shift
32450    ;;
32451  esac
32452
32453  case $ac_option in
32454  # Handling of the options.
32455  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32456    ac_cs_recheck=: ;;
32457  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32458    $as_echo "$ac_cs_version"; exit ;;
32459  --config | --confi | --conf | --con | --co | --c )
32460    $as_echo "$ac_cs_config"; exit ;;
32461  --debug | --debu | --deb | --de | --d | -d )
32462    debug=: ;;
32463  --file | --fil | --fi | --f )
32464    $ac_shift
32465    case $ac_optarg in
32466    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32467    '') as_fn_error $? "missing file argument" ;;
32468    esac
32469    as_fn_append CONFIG_FILES " '$ac_optarg'"
32470    ac_need_defaults=false;;
32471  --header | --heade | --head | --hea )
32472    $ac_shift
32473    case $ac_optarg in
32474    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32475    esac
32476    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32477    ac_need_defaults=false;;
32478  --he | --h)
32479    # Conflict between --help and --header
32480    as_fn_error $? "ambiguous option: \`$1'
32481Try \`$0 --help' for more information.";;
32482  --help | --hel | -h )
32483    $as_echo "$ac_cs_usage"; exit ;;
32484  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32485  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32486    ac_cs_silent=: ;;
32487
32488  # This is an error.
32489  -*) as_fn_error $? "unrecognized option: \`$1'
32490Try \`$0 --help' for more information." ;;
32491
32492  *) as_fn_append ac_config_targets " $1"
32493     ac_need_defaults=false ;;
32494
32495  esac
32496  shift
32497done
32498
32499ac_configure_extra_args=
32500
32501if $ac_cs_silent; then
32502  exec 6>/dev/null
32503  ac_configure_extra_args="$ac_configure_extra_args --silent"
32504fi
32505
32506_ACEOF
32507cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32508if \$ac_cs_recheck; then
32509  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32510  shift
32511  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32512  CONFIG_SHELL='$SHELL'
32513  export CONFIG_SHELL
32514  exec "\$@"
32515fi
32516
32517_ACEOF
32518cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32519exec 5>>config.log
32520{
32521  echo
32522  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32523## Running $as_me. ##
32524_ASBOX
32525  $as_echo "$ac_log"
32526} >&5
32527
32528_ACEOF
32529cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32530_ACEOF
32531
32532cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32533
32534# Handling of arguments.
32535for ac_config_target in $ac_config_targets
32536do
32537  case $ac_config_target in
32538    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32539    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32540    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32541    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32542    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32543    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32544    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32545
32546  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
32547  esac
32548done
32549
32550
32551# If the user did not use the arguments to specify the items to instantiate,
32552# then the envvar interface is used.  Set only those that are not.
32553# We use the long form for the default assignment because of an extremely
32554# bizarre bug on SunOS 4.1.3.
32555if $ac_need_defaults; then
32556  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32557  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32558fi
32559
32560# Have a temporary directory for convenience.  Make it in the build tree
32561# simply because there is no reason against having it here, and in addition,
32562# creating and moving files from /tmp can sometimes cause problems.
32563# Hook for its removal unless debugging.
32564# Note that there is a small window in which the directory will not be cleaned:
32565# after its creation but before its name has been assigned to `$tmp'.
32566$debug ||
32567{
32568  tmp= ac_tmp=
32569  trap 'exit_status=$?
32570  : "${ac_tmp:=$tmp}"
32571  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
32572' 0
32573  trap 'as_fn_exit 1' 1 2 13 15
32574}
32575# Create a (secure) tmp directory for tmp files.
32576
32577{
32578  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32579  test -d "$tmp"
32580}  ||
32581{
32582  tmp=./conf$$-$RANDOM
32583  (umask 077 && mkdir "$tmp")
32584} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32585ac_tmp=$tmp
32586
32587# Set up the scripts for CONFIG_FILES section.
32588# No need to generate them if there are no CONFIG_FILES.
32589# This happens for instance with `./config.status config.h'.
32590if test -n "$CONFIG_FILES"; then
32591
32592
32593ac_cr=`echo X | tr X '\015'`
32594# On cygwin, bash can eat \r inside `` if the user requested igncr.
32595# But we know of no other shell where ac_cr would be empty at this
32596# point, so we can use a bashism as a fallback.
32597if test "x$ac_cr" = x; then
32598  eval ac_cr=\$\'\\r\'
32599fi
32600ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32601if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32602  ac_cs_awk_cr='\\r'
32603else
32604  ac_cs_awk_cr=$ac_cr
32605fi
32606
32607echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
32608_ACEOF
32609
32610
32611{
32612  echo "cat >conf$$subs.awk <<_ACEOF" &&
32613  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32614  echo "_ACEOF"
32615} >conf$$subs.sh ||
32616  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32617ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32618ac_delim='%!_!# '
32619for ac_last_try in false false false false false :; do
32620  . ./conf$$subs.sh ||
32621    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32622
32623  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32624  if test $ac_delim_n = $ac_delim_num; then
32625    break
32626  elif $ac_last_try; then
32627    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32628  else
32629    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32630  fi
32631done
32632rm -f conf$$subs.sh
32633
32634cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32635cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
32636_ACEOF
32637sed -n '
32638h
32639s/^/S["/; s/!.*/"]=/
32640p
32641g
32642s/^[^!]*!//
32643:repl
32644t repl
32645s/'"$ac_delim"'$//
32646t delim
32647:nl
32648h
32649s/\(.\{148\}\)..*/\1/
32650t more1
32651s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32652p
32653n
32654b repl
32655:more1
32656s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32657p
32658g
32659s/.\{148\}//
32660t nl
32661:delim
32662h
32663s/\(.\{148\}\)..*/\1/
32664t more2
32665s/["\\]/\\&/g; s/^/"/; s/$/"/
32666p
32667b
32668:more2
32669s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32670p
32671g
32672s/.\{148\}//
32673t delim
32674' <conf$$subs.awk | sed '
32675/^[^""]/{
32676  N
32677  s/\n//
32678}
32679' >>$CONFIG_STATUS || ac_write_fail=1
32680rm -f conf$$subs.awk
32681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32682_ACAWK
32683cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
32684  for (key in S) S_is_set[key] = 1
32685  FS = ""
32686
32687}
32688{
32689  line = $ 0
32690  nfields = split(line, field, "@")
32691  substed = 0
32692  len = length(field[1])
32693  for (i = 2; i < nfields; i++) {
32694    key = field[i]
32695    keylen = length(key)
32696    if (S_is_set[key]) {
32697      value = S[key]
32698      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32699      len += length(value) + length(field[++i])
32700      substed = 1
32701    } else
32702      len += 1 + keylen
32703  }
32704
32705  print line
32706}
32707
32708_ACAWK
32709_ACEOF
32710cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32711if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32712  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32713else
32714  cat
32715fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
32716  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32717_ACEOF
32718
32719# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32720# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32721# trailing colons and then remove the whole line if VPATH becomes empty
32722# (actually we leave an empty line to preserve line numbers).
32723if test "x$srcdir" = x.; then
32724  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32725h
32726s///
32727s/^/:/
32728s/[	 ]*$/:/
32729s/:\$(srcdir):/:/g
32730s/:\${srcdir}:/:/g
32731s/:@srcdir@:/:/g
32732s/^:*//
32733s/:*$//
32734x
32735s/\(=[	 ]*\).*/\1/
32736G
32737s/\n//
32738s/^[^=]*=[	 ]*$//
32739}'
32740fi
32741
32742cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32743fi # test -n "$CONFIG_FILES"
32744
32745# Set up the scripts for CONFIG_HEADERS section.
32746# No need to generate them if there are no CONFIG_HEADERS.
32747# This happens for instance with `./config.status Makefile'.
32748if test -n "$CONFIG_HEADERS"; then
32749cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
32750BEGIN {
32751_ACEOF
32752
32753# Transform confdefs.h into an awk script `defines.awk', embedded as
32754# here-document in config.status, that substitutes the proper values into
32755# config.h.in to produce config.h.
32756
32757# Create a delimiter string that does not exist in confdefs.h, to ease
32758# handling of long lines.
32759ac_delim='%!_!# '
32760for ac_last_try in false false :; do
32761  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
32762  if test -z "$ac_tt"; then
32763    break
32764  elif $ac_last_try; then
32765    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32766  else
32767    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32768  fi
32769done
32770
32771# For the awk script, D is an array of macro values keyed by name,
32772# likewise P contains macro parameters if any.  Preserve backslash
32773# newline sequences.
32774
32775ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32776sed -n '
32777s/.\{148\}/&'"$ac_delim"'/g
32778t rset
32779:rset
32780s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32781t def
32782d
32783:def
32784s/\\$//
32785t bsnl
32786s/["\\]/\\&/g
32787s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32788D["\1"]=" \3"/p
32789s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32790d
32791:bsnl
32792s/["\\]/\\&/g
32793s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32794D["\1"]=" \3\\\\\\n"\\/p
32795t cont
32796s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32797t cont
32798d
32799:cont
32800n
32801s/.\{148\}/&'"$ac_delim"'/g
32802t clear
32803:clear
32804s/\\$//
32805t bsnlc
32806s/["\\]/\\&/g; s/^/"/; s/$/"/p
32807d
32808:bsnlc
32809s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32810b cont
32811' <confdefs.h | sed '
32812s/'"$ac_delim"'/"\\\
32813"/g' >>$CONFIG_STATUS || ac_write_fail=1
32814
32815cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32816  for (key in D) D_is_set[key] = 1
32817  FS = ""
32818}
32819/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32820  line = \$ 0
32821  split(line, arg, " ")
32822  if (arg[1] == "#") {
32823    defundef = arg[2]
32824    mac1 = arg[3]
32825  } else {
32826    defundef = substr(arg[1], 2)
32827    mac1 = arg[2]
32828  }
32829  split(mac1, mac2, "(") #)
32830  macro = mac2[1]
32831  prefix = substr(line, 1, index(line, defundef) - 1)
32832  if (D_is_set[macro]) {
32833    # Preserve the white space surrounding the "#".
32834    print prefix "define", macro P[macro] D[macro]
32835    next
32836  } else {
32837    # Replace #undef with comments.  This is necessary, for example,
32838    # in the case of _POSIX_SOURCE, which is predefined and required
32839    # on some systems where configure will not decide to define it.
32840    if (defundef == "undef") {
32841      print "/*", prefix defundef, macro, "*/"
32842      next
32843    }
32844  }
32845}
32846{ print }
32847_ACAWK
32848_ACEOF
32849cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32850  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32851fi # test -n "$CONFIG_HEADERS"
32852
32853
32854eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32855shift
32856for ac_tag
32857do
32858  case $ac_tag in
32859  :[FHLC]) ac_mode=$ac_tag; continue;;
32860  esac
32861  case $ac_mode$ac_tag in
32862  :[FHL]*:*);;
32863  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32864  :[FH]-) ac_tag=-:-;;
32865  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32866  esac
32867  ac_save_IFS=$IFS
32868  IFS=:
32869  set x $ac_tag
32870  IFS=$ac_save_IFS
32871  shift
32872  ac_file=$1
32873  shift
32874
32875  case $ac_mode in
32876  :L) ac_source=$1;;
32877  :[FH])
32878    ac_file_inputs=
32879    for ac_f
32880    do
32881      case $ac_f in
32882      -) ac_f="$ac_tmp/stdin";;
32883      *) # Look for the file first in the build tree, then in the source tree
32884	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32885	 # because $ac_f cannot contain `:'.
32886	 test -f "$ac_f" ||
32887	   case $ac_f in
32888	   [\\/$]*) false;;
32889	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32890	   esac ||
32891	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32892      esac
32893      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32894      as_fn_append ac_file_inputs " '$ac_f'"
32895    done
32896
32897    # Let's still pretend it is `configure' which instantiates (i.e., don't
32898    # use $as_me), people would be surprised to read:
32899    #    /* config.h.  Generated by config.status.  */
32900    configure_input='Generated from '`
32901	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32902	`' by configure.'
32903    if test x"$ac_file" != x-; then
32904      configure_input="$ac_file.  $configure_input"
32905      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32906$as_echo "$as_me: creating $ac_file" >&6;}
32907    fi
32908    # Neutralize special characters interpreted by sed in replacement strings.
32909    case $configure_input in #(
32910    *\&* | *\|* | *\\* )
32911       ac_sed_conf_input=`$as_echo "$configure_input" |
32912       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32913    *) ac_sed_conf_input=$configure_input;;
32914    esac
32915
32916    case $ac_tag in
32917    *:-:* | *:-) cat >"$ac_tmp/stdin" \
32918      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32919    esac
32920    ;;
32921  esac
32922
32923  ac_dir=`$as_dirname -- "$ac_file" ||
32924$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32925	 X"$ac_file" : 'X\(//\)[^/]' \| \
32926	 X"$ac_file" : 'X\(//\)$' \| \
32927	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32928$as_echo X"$ac_file" |
32929    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32930	    s//\1/
32931	    q
32932	  }
32933	  /^X\(\/\/\)[^/].*/{
32934	    s//\1/
32935	    q
32936	  }
32937	  /^X\(\/\/\)$/{
32938	    s//\1/
32939	    q
32940	  }
32941	  /^X\(\/\).*/{
32942	    s//\1/
32943	    q
32944	  }
32945	  s/.*/./; q'`
32946  as_dir="$ac_dir"; as_fn_mkdir_p
32947  ac_builddir=.
32948
32949case "$ac_dir" in
32950.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32951*)
32952  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32953  # A ".." for each directory in $ac_dir_suffix.
32954  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32955  case $ac_top_builddir_sub in
32956  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32957  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32958  esac ;;
32959esac
32960ac_abs_top_builddir=$ac_pwd
32961ac_abs_builddir=$ac_pwd$ac_dir_suffix
32962# for backward compatibility:
32963ac_top_builddir=$ac_top_build_prefix
32964
32965case $srcdir in
32966  .)  # We are building in place.
32967    ac_srcdir=.
32968    ac_top_srcdir=$ac_top_builddir_sub
32969    ac_abs_top_srcdir=$ac_pwd ;;
32970  [\\/]* | ?:[\\/]* )  # Absolute name.
32971    ac_srcdir=$srcdir$ac_dir_suffix;
32972    ac_top_srcdir=$srcdir
32973    ac_abs_top_srcdir=$srcdir ;;
32974  *) # Relative name.
32975    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32976    ac_top_srcdir=$ac_top_build_prefix$srcdir
32977    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32978esac
32979ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32980
32981
32982  case $ac_mode in
32983  :F)
32984  #
32985  # CONFIG_FILE
32986  #
32987
32988_ACEOF
32989
32990cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32991# If the template does not know about datarootdir, expand it.
32992# FIXME: This hack should be removed a few years after 2.60.
32993ac_datarootdir_hack=; ac_datarootdir_seen=
32994ac_sed_dataroot='
32995/datarootdir/ {
32996  p
32997  q
32998}
32999/@datadir@/p
33000/@docdir@/p
33001/@infodir@/p
33002/@localedir@/p
33003/@mandir@/p'
33004case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33005*datarootdir*) ac_datarootdir_seen=yes;;
33006*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33007  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33008$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33009_ACEOF
33010cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33011  ac_datarootdir_hack='
33012  s&@datadir@&$datadir&g
33013  s&@docdir@&$docdir&g
33014  s&@infodir@&$infodir&g
33015  s&@localedir@&$localedir&g
33016  s&@mandir@&$mandir&g
33017  s&\\\${datarootdir}&$datarootdir&g' ;;
33018esac
33019_ACEOF
33020
33021# Neutralize VPATH when `$srcdir' = `.'.
33022# Shell code in configure.ac might set extrasub.
33023# FIXME: do we really want to maintain this feature?
33024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33025ac_sed_extra="$ac_vpsub
33026$extrasub
33027_ACEOF
33028cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33029:t
33030/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33031s|@configure_input@|$ac_sed_conf_input|;t t
33032s&@top_builddir@&$ac_top_builddir_sub&;t t
33033s&@top_build_prefix@&$ac_top_build_prefix&;t t
33034s&@srcdir@&$ac_srcdir&;t t
33035s&@abs_srcdir@&$ac_abs_srcdir&;t t
33036s&@top_srcdir@&$ac_top_srcdir&;t t
33037s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33038s&@builddir@&$ac_builddir&;t t
33039s&@abs_builddir@&$ac_abs_builddir&;t t
33040s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33041$ac_datarootdir_hack
33042"
33043eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
33044  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33045
33046test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33047  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
33048  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
33049      "$ac_tmp/out"`; test -z "$ac_out"; } &&
33050  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33051which seems to be undefined.  Please make sure it is defined" >&5
33052$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33053which seems to be undefined.  Please make sure it is defined" >&2;}
33054
33055  rm -f "$ac_tmp/stdin"
33056  case $ac_file in
33057  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33058  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33059  esac \
33060  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33061 ;;
33062  :H)
33063  #
33064  # CONFIG_HEADER
33065  #
33066  if test x"$ac_file" != x-; then
33067    {
33068      $as_echo "/* $configure_input  */" \
33069      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33070    } >"$ac_tmp/config.h" \
33071      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33072    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33073      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33074$as_echo "$as_me: $ac_file is unchanged" >&6;}
33075    else
33076      rm -f "$ac_file"
33077      mv "$ac_tmp/config.h" "$ac_file" \
33078	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33079    fi
33080  else
33081    $as_echo "/* $configure_input  */" \
33082      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33083      || as_fn_error $? "could not create -" "$LINENO" 5
33084  fi
33085 ;;
33086
33087
33088  esac
33089
33090done # for ac_tag
33091
33092
33093as_fn_exit 0
33094_ACEOF
33095ac_clean_files=$ac_clean_files_save
33096
33097test $ac_write_fail = 0 ||
33098  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33099
33100
33101# configure is writing to config.log, and then calls config.status.
33102# config.status does its own redirection, appending to config.log.
33103# Unfortunately, on DOS this fails, as config.log is still kept open
33104# by configure, so config.status won't be able to write to it; its
33105# output is simply discarded.  So we exec the FD to /dev/null,
33106# effectively closing config.log, so it can be properly (re)opened and
33107# appended to by config.status.  When coming back to configure, we
33108# need to make the FD available again.
33109if test "$no_create" != yes; then
33110  ac_cs_success=:
33111  ac_config_status_args=
33112  test "$silent" = yes &&
33113    ac_config_status_args="$ac_config_status_args --quiet"
33114  exec 5>/dev/null
33115  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33116  exec 5>>config.log
33117  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33118  # would make configure fail if this is the last instruction.
33119  $ac_cs_success || as_fn_exit 1
33120fi
33121if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33122  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33123$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33124fi
33125
33126
33127# Make the compare script executable
33128$CHMOD +x $OUTPUT_ROOT/compare.sh
33129
33130# Finally output some useful information to the user
33131
33132# Finally output some useful information to the user
33133
33134if test "x$CCACHE_FOUND" != x; then
33135	if  test "x$HAS_GOOD_CCACHE" = x; then
33136		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33137		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33138	else
33139		CCACHE_STATUS="installed and in use"
33140	fi
33141else
33142	if test "x$GCC" = xyes; then
33143		CCACHE_STATUS="not installed (consider installing)"
33144		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33145	else
33146		CCACHE_STATUS="not available for your system"
33147	fi
33148fi
33149
33150printf "\n"
33151printf "====================================================\n"
33152printf "A new configuration has been successfully created in\n"
33153printf "$OUTPUT_ROOT\n"
33154if test "x$CONFIGURE_COMMAND_LINE" != x; then
33155	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33156else
33157	printf "using default settings.\n"
33158fi
33159
33160printf "\n"
33161printf "Configuration summary:\n"
33162printf "* Debug level:    $DEBUG_LEVEL\n"
33163printf "* JDK variant:    $JDK_VARIANT\n"
33164printf "* JVM variants:   $with_jvm_variants\n"
33165printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33166
33167printf "\n"
33168printf "Tools summary:\n"
33169if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33170  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33171fi
33172printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33173printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33174printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33175
33176printf "\n"
33177printf "Build performance summary:\n"
33178printf "* Cores to use:   $NUM_CORES\n"
33179printf "* Memory limit:   $MEMORY_SIZE MB\n"
33180printf "* ccache status:  $CCACHE_STATUS\n"
33181printf "\n"
33182
33183if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33184	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33185	printf "$CCACHE_HELP_MSG\n"
33186
33187    # Print a helpful message on how to acquire the necessary build dependency.
33188    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33189    MISSING_DEPENDENCY=ccache
33190    PKGHANDLER_COMMAND=
33191
33192    case $PKGHANDLER in
33193	apt-get)
33194                apt_help     $MISSING_DEPENDENCY ;;
33195    yum)
33196                yum_help     $MISSING_DEPENDENCY ;;
33197	port)
33198                port_help    $MISSING_DEPENDENCY ;;
33199	pkgutil)
33200                pkgutil_help $MISSING_DEPENDENCY ;;
33201	pkgadd)
33202                pkgadd_help  $MISSING_DEPENDENCY ;;
33203    * )
33204      break ;;
33205    esac
33206
33207    if test "x$PKGHANDLER_COMMAND" != x; then
33208        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33209    fi
33210
33211	printf "$HELP_MSG\n"
33212	printf "\n"
33213fi
33214
33215if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33216	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33217	printf "will result in longer build times.\n"
33218	printf "\n"
33219fi
33220
33221if test "x$FOUND_ALT_VARIABLES" != "x"; then
33222	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33223	printf "These are not respected, and will be ignored. It is recommended\n"
33224	printf "that you clean your environment. The following variables are set:\n"
33225	printf "$FOUND_ALT_VARIABLES\n"
33226	printf "\n"
33227fi
33228
33229if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33230	printf "WARNING: Your build output directory is not on a local disk.\n"
33231	printf "This will severely degrade build performance!\n"
33232	printf "It is recommended that you create an output directory on a local disk,\n"
33233	printf "and run the configure script again from that directory.\n"
33234	printf "\n"
33235fi
33236
33237if test "x$IS_RECONFIGURE" = "xyes"; then
33238	printf "WARNING: The result of this configuration has overridden an older\n"
33239	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33240	printf "proper build. Failure to do so might result in strange build problems.\n"
33241	printf "\n"
33242fi
33243
33244