generated-configure.sh revision 646:a9c8a32d09f9
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=1362517596
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# On windows, only cl.exe is supported.
18109# On Solaris, cc is preferred to gcc.
18110# Elsewhere, gcc is preferred to cc.
18111
18112if test "x$CC" != x; then
18113  COMPILER_CHECK_LIST="$CC"
18114elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18115  COMPILER_CHECK_LIST="cl"
18116elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18117  COMPILER_CHECK_LIST="cc gcc"
18118else
18119  COMPILER_CHECK_LIST="gcc cc"
18120fi
18121
18122
18123  COMPILER_NAME=C
18124
18125  CC=
18126  # If TOOLS_DIR is set, check for all compiler names in there first
18127  # before checking the rest of the PATH.
18128  if test -n "$TOOLS_DIR"; then
18129    PATH_save="$PATH"
18130    PATH="$TOOLS_DIR"
18131    for ac_prog in $COMPILER_CHECK_LIST
18132do
18133  # Extract the first word of "$ac_prog", so it can be a program name with args.
18134set dummy $ac_prog; ac_word=$2
18135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18136$as_echo_n "checking for $ac_word... " >&6; }
18137if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18138  $as_echo_n "(cached) " >&6
18139else
18140  case $TOOLS_DIR_CC in
18141  [\\/]* | ?:[\\/]*)
18142  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18143  ;;
18144  *)
18145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18146for as_dir in $PATH
18147do
18148  IFS=$as_save_IFS
18149  test -z "$as_dir" && as_dir=.
18150    for ac_exec_ext in '' $ac_executable_extensions; do
18151  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18152    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18154    break 2
18155  fi
18156done
18157  done
18158IFS=$as_save_IFS
18159
18160  ;;
18161esac
18162fi
18163TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18164if test -n "$TOOLS_DIR_CC"; then
18165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18166$as_echo "$TOOLS_DIR_CC" >&6; }
18167else
18168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18169$as_echo "no" >&6; }
18170fi
18171
18172
18173  test -n "$TOOLS_DIR_CC" && break
18174done
18175
18176    CC=$TOOLS_DIR_CC
18177    PATH="$PATH_save"
18178  fi
18179
18180  # AC_PATH_PROGS can't be run multiple times with the same variable,
18181  # so create a new name for this run.
18182  if test "x$CC" = x; then
18183    for ac_prog in $COMPILER_CHECK_LIST
18184do
18185  # Extract the first word of "$ac_prog", so it can be a program name with args.
18186set dummy $ac_prog; ac_word=$2
18187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18188$as_echo_n "checking for $ac_word... " >&6; }
18189if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18190  $as_echo_n "(cached) " >&6
18191else
18192  case $POTENTIAL_CC in
18193  [\\/]* | ?:[\\/]*)
18194  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18195  ;;
18196  *)
18197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18198for as_dir in $PATH
18199do
18200  IFS=$as_save_IFS
18201  test -z "$as_dir" && as_dir=.
18202    for ac_exec_ext in '' $ac_executable_extensions; do
18203  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18204    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18206    break 2
18207  fi
18208done
18209  done
18210IFS=$as_save_IFS
18211
18212  ;;
18213esac
18214fi
18215POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18216if test -n "$POTENTIAL_CC"; then
18217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18218$as_echo "$POTENTIAL_CC" >&6; }
18219else
18220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18221$as_echo "no" >&6; }
18222fi
18223
18224
18225  test -n "$POTENTIAL_CC" && break
18226done
18227
18228    CC=$POTENTIAL_CC
18229  fi
18230
18231  if test "x$CC" = x; then
18232
18233    # Print a helpful message on how to acquire the necessary build dependency.
18234    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18235    MISSING_DEPENDENCY=devkit
18236    PKGHANDLER_COMMAND=
18237
18238    case $PKGHANDLER in
18239	apt-get)
18240                apt_help     $MISSING_DEPENDENCY ;;
18241    yum)
18242                yum_help     $MISSING_DEPENDENCY ;;
18243	port)
18244                port_help    $MISSING_DEPENDENCY ;;
18245	pkgutil)
18246                pkgutil_help $MISSING_DEPENDENCY ;;
18247	pkgadd)
18248                pkgadd_help  $MISSING_DEPENDENCY ;;
18249    * )
18250      break ;;
18251    esac
18252
18253    if test "x$PKGHANDLER_COMMAND" != x; then
18254        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18255    fi
18256
18257      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18258  fi
18259
18260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18261
18262  # First separate the path from the arguments. This will split at the first
18263  # space.
18264  complete="$CC"
18265  path="${complete%% *}"
18266  tmp="$complete EOL"
18267  arguments="${tmp#* }"
18268
18269  # Input might be given as Windows format, start by converting to
18270  # unix format.
18271  new_path=`$CYGPATH -u "$path"`
18272
18273  # Now try to locate executable using which
18274  new_path=`$WHICH "$new_path" 2> /dev/null`
18275  # bat and cmd files are not always considered executable in cygwin causing which
18276  # to not find them
18277  if test "x$new_path" = x \
18278           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18279           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18280    new_path=`$CYGPATH -u "$path"`
18281  fi
18282  if test "x$new_path" = x; then
18283    # Oops. Which didn't find the executable.
18284    # The splitting of arguments from the executable at a space might have been incorrect,
18285    # since paths with space are more likely in Windows. Give it another try with the whole
18286    # argument.
18287    path="$complete"
18288    arguments="EOL"
18289    new_path=`$CYGPATH -u "$path"`
18290    new_path=`$WHICH "$new_path" 2> /dev/null`
18291    # bat and cmd files are not always considered executable in cygwin causing which
18292    # to not find them
18293    if test "x$new_path" = x \
18294             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18295             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18296      new_path=`$CYGPATH -u "$path"`
18297    fi
18298    if test "x$new_path" = x; then
18299      # It's still not found. Now this is an unrecoverable error.
18300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18301$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18302      has_space=`$ECHO "$complete" | $GREP " "`
18303      if test "x$has_space" != x; then
18304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18306      fi
18307      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18308    fi
18309  fi
18310
18311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18314  # "foo.exe" is OK but "foo" is an error.
18315  #
18316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18317  # It is also a way to make sure we got the proper file name for the real test later on.
18318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18319  if test "x$test_shortpath" = x; then
18320    # Short path failed, file does not exist as specified.
18321    # Try adding .exe or .cmd
18322    if test -f "${new_path}.exe"; then
18323       input_to_shortpath="${new_path}.exe"
18324    elif test -f "${new_path}.cmd"; then
18325       input_to_shortpath="${new_path}.cmd"
18326    else
18327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18328$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18329      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18330$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18331      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18332    fi
18333  else
18334    input_to_shortpath="$new_path"
18335  fi
18336
18337  # Call helper function which possibly converts this using DOS-style short mode.
18338  # If so, the updated path is stored in $new_path.
18339  new_path="$input_to_shortpath"
18340
18341  input_path="$input_to_shortpath"
18342  # Check if we need to convert this using DOS-style short mode. If the path
18343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18344  # take no chances and rewrite it.
18345  # Note: m4 eats our [], so we need to use [ and ] instead.
18346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18347  if test "x$has_forbidden_chars" != x; then
18348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18352      # Going to short mode and back again did indeed matter. Since short mode is
18353      # case insensitive, let's make it lowercase to improve readability.
18354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18355      # Now convert it back to Unix-stile (cygpath)
18356      input_path=`$CYGPATH -u "$shortmode_path"`
18357      new_path="$input_path"
18358    fi
18359  fi
18360
18361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18362  if test "x$test_cygdrive_prefix" = x; then
18363    # As a simple fix, exclude /usr/bin since it's not a real path.
18364    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18366      # a path prefixed by /cygdrive for fixpath to work.
18367      new_path="$CYGWIN_ROOT_PATH$input_path"
18368    fi
18369  fi
18370
18371  # remove trailing .exe if any
18372  new_path="${new_path/%.exe/}"
18373
18374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18375
18376  # First separate the path from the arguments. This will split at the first
18377  # space.
18378  complete="$CC"
18379  path="${complete%% *}"
18380  tmp="$complete EOL"
18381  arguments="${tmp#* }"
18382
18383  # Input might be given as Windows format, start by converting to
18384  # unix format.
18385  new_path="$path"
18386
18387  windows_path="$new_path"
18388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18389    unix_path=`$CYGPATH -u "$windows_path"`
18390    new_path="$unix_path"
18391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18393    new_path="$unix_path"
18394  fi
18395
18396
18397  # Now try to locate executable using which
18398  new_path=`$WHICH "$new_path" 2> /dev/null`
18399
18400  if test "x$new_path" = x; then
18401    # Oops. Which didn't find the executable.
18402    # The splitting of arguments from the executable at a space might have been incorrect,
18403    # since paths with space are more likely in Windows. Give it another try with the whole
18404    # argument.
18405    path="$complete"
18406    arguments="EOL"
18407    new_path="$path"
18408
18409  windows_path="$new_path"
18410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18411    unix_path=`$CYGPATH -u "$windows_path"`
18412    new_path="$unix_path"
18413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18415    new_path="$unix_path"
18416  fi
18417
18418
18419    new_path=`$WHICH "$new_path" 2> /dev/null`
18420
18421    if test "x$new_path" = x; then
18422      # It's still not found. Now this is an unrecoverable error.
18423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18424$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18425      has_space=`$ECHO "$complete" | $GREP " "`
18426      if test "x$has_space" != x; then
18427        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18428$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18429      fi
18430      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18431    fi
18432  fi
18433
18434  # Now new_path has a complete unix path to the binary
18435  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18436    # Keep paths in /bin as-is, but remove trailing .exe if any
18437    new_path="${new_path/%.exe/}"
18438    # Do not save /bin paths to all_fixpath_prefixes!
18439  else
18440    # Not in mixed or Windows style, start by that.
18441    new_path=`cmd //c echo $new_path`
18442
18443  input_path="$new_path"
18444  # Check if we need to convert this using DOS-style short mode. If the path
18445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18446  # take no chances and rewrite it.
18447  # Note: m4 eats our [], so we need to use [ and ] instead.
18448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18449  if test "x$has_forbidden_chars" != x; then
18450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18452  fi
18453
18454    # Output is in $new_path
18455
18456  windows_path="$new_path"
18457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18458    unix_path=`$CYGPATH -u "$windows_path"`
18459    new_path="$unix_path"
18460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18462    new_path="$unix_path"
18463  fi
18464
18465    # remove trailing .exe if any
18466    new_path="${new_path/%.exe/}"
18467
18468    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18469    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18470  fi
18471
18472  else
18473    # We're on a posix platform. Hooray! :)
18474    # First separate the path from the arguments. This will split at the first
18475    # space.
18476    complete="$CC"
18477    path="${complete%% *}"
18478    tmp="$complete EOL"
18479    arguments="${tmp#* }"
18480
18481    # Cannot rely on the command "which" here since it doesn't always work.
18482    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18483    if test -z "$is_absolute_path"; then
18484      # Path to executable is not absolute. Find it.
18485      IFS_save="$IFS"
18486      IFS=:
18487      for p in $PATH; do
18488        if test -f "$p/$path" && test -x "$p/$path"; then
18489          new_path="$p/$path"
18490          break
18491        fi
18492      done
18493      IFS="$IFS_save"
18494    else
18495      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18496$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18497      new_path="$path"
18498    fi
18499
18500    if test "x$new_path" = x; then
18501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18502$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18503        has_space=`$ECHO "$complete" | $GREP " "`
18504        if test "x$has_space" != x; then
18505          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18506$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18507        fi
18508        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18509      fi
18510  fi
18511
18512      # Now join together the path and the arguments once again
18513      if test "x$arguments" != xEOL; then
18514        new_complete="$new_path ${arguments% *}"
18515      else
18516        new_complete="$new_path"
18517      fi
18518
18519  if test "x$complete" != "x$new_complete"; then
18520      CC="$new_complete"
18521      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18522$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18523    fi
18524
18525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18526$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18527  TEST_COMPILER="$CC"
18528
18529    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18530        # Follow a chain of symbolic links. Use readlink
18531        # where it exists, else fall back to horribly
18532        # complicated shell code.
18533        if test "x$READLINK_TESTED" != yes; then
18534            # On MacOSX there is a readlink tool with a different
18535            # purpose than the GNU readlink tool. Check the found readlink.
18536            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18537            if test "x$ISGNU" = x; then
18538                 # A readlink that we do not know how to use.
18539                 # Are there other non-GNU readlinks out there?
18540                 READLINK_TESTED=yes
18541                 READLINK=
18542            fi
18543        fi
18544
18545        if test "x$READLINK" != x; then
18546            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18547        else
18548            # Save the current directory for restoring afterwards
18549            STARTDIR=$PWD
18550            COUNTER=0
18551            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18552            sym_link_file=`$BASENAME $TEST_COMPILER`
18553            # Use the system pwd and not the shell builtin to resolve directory symlinks
18554            cd $sym_link_dir
18555            cd `$THEPWDCMD`
18556            sym_link_dir=`$THEPWDCMD`
18557            # Resolve file symlinks
18558            while test $COUNTER -lt 20; do
18559                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18560                if test "x$ISLINK" == x; then
18561                    # This is not a symbolic link! We are done!
18562                    break
18563                fi
18564                # Again resolve directory symlinks since the target of the just found
18565                # link could be in a different directory
18566                cd `$DIRNAME $ISLINK`
18567                sym_link_dir=`$THEPWDCMD`
18568                sym_link_file=`$BASENAME $ISLINK`
18569                let COUNTER=COUNTER+1
18570            done
18571            cd $STARTDIR
18572            TEST_COMPILER=$sym_link_dir/$sym_link_file
18573        fi
18574    fi
18575
18576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18577$as_echo "$TEST_COMPILER" >&6; }
18578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18579$as_echo_n "checking if CC is disguised ccache... " >&6; }
18580
18581  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18582  if test "x$COMPILER_BASENAME" = "xccache"; then
18583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18584$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18585    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18586    # We want to control ccache invocation ourselves, so ignore this cc and try
18587    # searching again.
18588
18589    # Remove the path to the fake ccache cc from the PATH
18590    RETRY_COMPILER_SAVED_PATH="$PATH"
18591    COMPILER_DIRNAME=`$DIRNAME $CC`
18592    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18593
18594    # Try again looking for our compiler
18595    if test -n "$ac_tool_prefix"; then
18596  for ac_prog in $COMPILER_CHECK_LIST
18597  do
18598    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18599set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18601$as_echo_n "checking for $ac_word... " >&6; }
18602if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
18603  $as_echo_n "(cached) " >&6
18604else
18605  if test -n "$PROPER_COMPILER_CC"; then
18606  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18607else
18608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18609for as_dir in $PATH
18610do
18611  IFS=$as_save_IFS
18612  test -z "$as_dir" && as_dir=.
18613    for ac_exec_ext in '' $ac_executable_extensions; do
18614  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18615    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18617    break 2
18618  fi
18619done
18620  done
18621IFS=$as_save_IFS
18622
18623fi
18624fi
18625PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18626if test -n "$PROPER_COMPILER_CC"; then
18627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18628$as_echo "$PROPER_COMPILER_CC" >&6; }
18629else
18630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18631$as_echo "no" >&6; }
18632fi
18633
18634
18635    test -n "$PROPER_COMPILER_CC" && break
18636  done
18637fi
18638if test -z "$PROPER_COMPILER_CC"; then
18639  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18640  for ac_prog in $COMPILER_CHECK_LIST
18641do
18642  # Extract the first word of "$ac_prog", so it can be a program name with args.
18643set dummy $ac_prog; ac_word=$2
18644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18645$as_echo_n "checking for $ac_word... " >&6; }
18646if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
18647  $as_echo_n "(cached) " >&6
18648else
18649  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18650  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18651else
18652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18653for as_dir in $PATH
18654do
18655  IFS=$as_save_IFS
18656  test -z "$as_dir" && as_dir=.
18657    for ac_exec_ext in '' $ac_executable_extensions; do
18658  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18659    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18661    break 2
18662  fi
18663done
18664  done
18665IFS=$as_save_IFS
18666
18667fi
18668fi
18669ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18670if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18672$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18673else
18674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18675$as_echo "no" >&6; }
18676fi
18677
18678
18679  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18680done
18681
18682  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18683    PROPER_COMPILER_CC=""
18684  else
18685    case $cross_compiling:$ac_tool_warned in
18686yes:)
18687{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18688$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18689ac_tool_warned=yes ;;
18690esac
18691    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18692  fi
18693fi
18694
18695
18696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18697
18698  # First separate the path from the arguments. This will split at the first
18699  # space.
18700  complete="$PROPER_COMPILER_CC"
18701  path="${complete%% *}"
18702  tmp="$complete EOL"
18703  arguments="${tmp#* }"
18704
18705  # Input might be given as Windows format, start by converting to
18706  # unix format.
18707  new_path=`$CYGPATH -u "$path"`
18708
18709  # Now try to locate executable using which
18710  new_path=`$WHICH "$new_path" 2> /dev/null`
18711  # bat and cmd files are not always considered executable in cygwin causing which
18712  # to not find them
18713  if test "x$new_path" = x \
18714           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18715           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18716    new_path=`$CYGPATH -u "$path"`
18717  fi
18718  if test "x$new_path" = x; then
18719    # Oops. Which didn't find the executable.
18720    # The splitting of arguments from the executable at a space might have been incorrect,
18721    # since paths with space are more likely in Windows. Give it another try with the whole
18722    # argument.
18723    path="$complete"
18724    arguments="EOL"
18725    new_path=`$CYGPATH -u "$path"`
18726    new_path=`$WHICH "$new_path" 2> /dev/null`
18727    # bat and cmd files are not always considered executable in cygwin causing which
18728    # to not find them
18729    if test "x$new_path" = x \
18730             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18731             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18732      new_path=`$CYGPATH -u "$path"`
18733    fi
18734    if test "x$new_path" = x; then
18735      # It's still not found. Now this is an unrecoverable error.
18736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18737$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18738      has_space=`$ECHO "$complete" | $GREP " "`
18739      if test "x$has_space" != x; then
18740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18742      fi
18743      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18744    fi
18745  fi
18746
18747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18750  # "foo.exe" is OK but "foo" is an error.
18751  #
18752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18753  # It is also a way to make sure we got the proper file name for the real test later on.
18754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18755  if test "x$test_shortpath" = x; then
18756    # Short path failed, file does not exist as specified.
18757    # Try adding .exe or .cmd
18758    if test -f "${new_path}.exe"; then
18759       input_to_shortpath="${new_path}.exe"
18760    elif test -f "${new_path}.cmd"; then
18761       input_to_shortpath="${new_path}.cmd"
18762    else
18763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18764$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18765      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18766$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18767      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18768    fi
18769  else
18770    input_to_shortpath="$new_path"
18771  fi
18772
18773  # Call helper function which possibly converts this using DOS-style short mode.
18774  # If so, the updated path is stored in $new_path.
18775  new_path="$input_to_shortpath"
18776
18777  input_path="$input_to_shortpath"
18778  # Check if we need to convert this using DOS-style short mode. If the path
18779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18780  # take no chances and rewrite it.
18781  # Note: m4 eats our [], so we need to use [ and ] instead.
18782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18783  if test "x$has_forbidden_chars" != x; then
18784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18788      # Going to short mode and back again did indeed matter. Since short mode is
18789      # case insensitive, let's make it lowercase to improve readability.
18790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18791      # Now convert it back to Unix-stile (cygpath)
18792      input_path=`$CYGPATH -u "$shortmode_path"`
18793      new_path="$input_path"
18794    fi
18795  fi
18796
18797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18798  if test "x$test_cygdrive_prefix" = x; then
18799    # As a simple fix, exclude /usr/bin since it's not a real path.
18800    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18802      # a path prefixed by /cygdrive for fixpath to work.
18803      new_path="$CYGWIN_ROOT_PATH$input_path"
18804    fi
18805  fi
18806
18807  # remove trailing .exe if any
18808  new_path="${new_path/%.exe/}"
18809
18810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18811
18812  # First separate the path from the arguments. This will split at the first
18813  # space.
18814  complete="$PROPER_COMPILER_CC"
18815  path="${complete%% *}"
18816  tmp="$complete EOL"
18817  arguments="${tmp#* }"
18818
18819  # Input might be given as Windows format, start by converting to
18820  # unix format.
18821  new_path="$path"
18822
18823  windows_path="$new_path"
18824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18825    unix_path=`$CYGPATH -u "$windows_path"`
18826    new_path="$unix_path"
18827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18829    new_path="$unix_path"
18830  fi
18831
18832
18833  # Now try to locate executable using which
18834  new_path=`$WHICH "$new_path" 2> /dev/null`
18835
18836  if test "x$new_path" = x; then
18837    # Oops. Which didn't find the executable.
18838    # The splitting of arguments from the executable at a space might have been incorrect,
18839    # since paths with space are more likely in Windows. Give it another try with the whole
18840    # argument.
18841    path="$complete"
18842    arguments="EOL"
18843    new_path="$path"
18844
18845  windows_path="$new_path"
18846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18847    unix_path=`$CYGPATH -u "$windows_path"`
18848    new_path="$unix_path"
18849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18851    new_path="$unix_path"
18852  fi
18853
18854
18855    new_path=`$WHICH "$new_path" 2> /dev/null`
18856
18857    if test "x$new_path" = x; then
18858      # It's still not found. Now this is an unrecoverable error.
18859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18860$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18861      has_space=`$ECHO "$complete" | $GREP " "`
18862      if test "x$has_space" != x; then
18863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18865      fi
18866      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18867    fi
18868  fi
18869
18870  # Now new_path has a complete unix path to the binary
18871  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18872    # Keep paths in /bin as-is, but remove trailing .exe if any
18873    new_path="${new_path/%.exe/}"
18874    # Do not save /bin paths to all_fixpath_prefixes!
18875  else
18876    # Not in mixed or Windows style, start by that.
18877    new_path=`cmd //c echo $new_path`
18878
18879  input_path="$new_path"
18880  # Check if we need to convert this using DOS-style short mode. If the path
18881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18882  # take no chances and rewrite it.
18883  # Note: m4 eats our [], so we need to use [ and ] instead.
18884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18885  if test "x$has_forbidden_chars" != x; then
18886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18888  fi
18889
18890    # Output is in $new_path
18891
18892  windows_path="$new_path"
18893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18894    unix_path=`$CYGPATH -u "$windows_path"`
18895    new_path="$unix_path"
18896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18898    new_path="$unix_path"
18899  fi
18900
18901    # remove trailing .exe if any
18902    new_path="${new_path/%.exe/}"
18903
18904    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18905    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18906  fi
18907
18908  else
18909    # We're on a posix platform. Hooray! :)
18910    # First separate the path from the arguments. This will split at the first
18911    # space.
18912    complete="$PROPER_COMPILER_CC"
18913    path="${complete%% *}"
18914    tmp="$complete EOL"
18915    arguments="${tmp#* }"
18916
18917    # Cannot rely on the command "which" here since it doesn't always work.
18918    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18919    if test -z "$is_absolute_path"; then
18920      # Path to executable is not absolute. Find it.
18921      IFS_save="$IFS"
18922      IFS=:
18923      for p in $PATH; do
18924        if test -f "$p/$path" && test -x "$p/$path"; then
18925          new_path="$p/$path"
18926          break
18927        fi
18928      done
18929      IFS="$IFS_save"
18930    else
18931      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18932$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18933      new_path="$path"
18934    fi
18935
18936    if test "x$new_path" = x; then
18937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18938$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18939        has_space=`$ECHO "$complete" | $GREP " "`
18940        if test "x$has_space" != x; then
18941          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18942$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18943        fi
18944        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18945      fi
18946  fi
18947
18948      # Now join together the path and the arguments once again
18949      if test "x$arguments" != xEOL; then
18950        new_complete="$new_path ${arguments% *}"
18951      else
18952        new_complete="$new_path"
18953      fi
18954
18955  if test "x$complete" != "x$new_complete"; then
18956      PROPER_COMPILER_CC="$new_complete"
18957      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18958$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18959    fi
18960
18961    PATH="$RETRY_COMPILER_SAVED_PATH"
18962
18963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18964$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18965
18966    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18967        # Follow a chain of symbolic links. Use readlink
18968        # where it exists, else fall back to horribly
18969        # complicated shell code.
18970        if test "x$READLINK_TESTED" != yes; then
18971            # On MacOSX there is a readlink tool with a different
18972            # purpose than the GNU readlink tool. Check the found readlink.
18973            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18974            if test "x$ISGNU" = x; then
18975                 # A readlink that we do not know how to use.
18976                 # Are there other non-GNU readlinks out there?
18977                 READLINK_TESTED=yes
18978                 READLINK=
18979            fi
18980        fi
18981
18982        if test "x$READLINK" != x; then
18983            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18984        else
18985            # Save the current directory for restoring afterwards
18986            STARTDIR=$PWD
18987            COUNTER=0
18988            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18989            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18990            # Use the system pwd and not the shell builtin to resolve directory symlinks
18991            cd $sym_link_dir
18992            cd `$THEPWDCMD`
18993            sym_link_dir=`$THEPWDCMD`
18994            # Resolve file symlinks
18995            while test $COUNTER -lt 20; do
18996                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18997                if test "x$ISLINK" == x; then
18998                    # This is not a symbolic link! We are done!
18999                    break
19000                fi
19001                # Again resolve directory symlinks since the target of the just found
19002                # link could be in a different directory
19003                cd `$DIRNAME $ISLINK`
19004                sym_link_dir=`$THEPWDCMD`
19005                sym_link_file=`$BASENAME $ISLINK`
19006                let COUNTER=COUNTER+1
19007            done
19008            cd $STARTDIR
19009            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19010        fi
19011    fi
19012
19013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19014$as_echo "$PROPER_COMPILER_CC" >&6; }
19015    CC="$PROPER_COMPILER_CC"
19016  else
19017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19018$as_echo "no, keeping CC" >&6; }
19019    CC="$TEST_COMPILER"
19020  fi
19021
19022  COMPILER=$CC
19023  COMPILER_NAME=$COMPILER_NAME
19024
19025  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19026    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19027    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19028    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19029    if test $? -ne 0; then
19030      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19031
19032      { $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
19033$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19034      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19035$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19036      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19037    else
19038      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19039      COMPILER_VENDOR="Sun Studio"
19040    fi
19041  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19042    # First line typically looks something like:
19043    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19044    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19045    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19046    COMPILER_VENDOR="Microsoft CL.EXE"
19047    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19048    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19049      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19050        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19051      fi
19052    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19053      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19054        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19055      fi
19056    fi
19057  else
19058    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19059    # Check that this is likely to be GCC.
19060    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19061    if test $? -ne 0; then
19062      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19063$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19064      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19065$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19066      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19067    fi
19068
19069    # First line typically looks something like:
19070    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19071    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19072    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19073  fi
19074  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19075  CC_VERSION="$COMPILER_VERSION"
19076  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19077  CC_VENDOR="$COMPILER_VENDOR"
19078
19079  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19080$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19081
19082
19083# Now that we have resolved CC ourself, let autoconf have its go at it
19084ac_ext=c
19085ac_cpp='$CPP $CPPFLAGS'
19086ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19087ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19088ac_compiler_gnu=$ac_cv_c_compiler_gnu
19089if test -n "$ac_tool_prefix"; then
19090  for ac_prog in $CC
19091  do
19092    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19093set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19095$as_echo_n "checking for $ac_word... " >&6; }
19096if ${ac_cv_prog_CC+:} false; then :
19097  $as_echo_n "(cached) " >&6
19098else
19099  if test -n "$CC"; then
19100  ac_cv_prog_CC="$CC" # Let the user override the test.
19101else
19102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19103for as_dir in $PATH
19104do
19105  IFS=$as_save_IFS
19106  test -z "$as_dir" && as_dir=.
19107    for ac_exec_ext in '' $ac_executable_extensions; do
19108  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19109    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19111    break 2
19112  fi
19113done
19114  done
19115IFS=$as_save_IFS
19116
19117fi
19118fi
19119CC=$ac_cv_prog_CC
19120if test -n "$CC"; then
19121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19122$as_echo "$CC" >&6; }
19123else
19124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19125$as_echo "no" >&6; }
19126fi
19127
19128
19129    test -n "$CC" && break
19130  done
19131fi
19132if test -z "$CC"; then
19133  ac_ct_CC=$CC
19134  for ac_prog in $CC
19135do
19136  # Extract the first word of "$ac_prog", so it can be a program name with args.
19137set dummy $ac_prog; ac_word=$2
19138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19139$as_echo_n "checking for $ac_word... " >&6; }
19140if ${ac_cv_prog_ac_ct_CC+:} false; then :
19141  $as_echo_n "(cached) " >&6
19142else
19143  if test -n "$ac_ct_CC"; then
19144  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19145else
19146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19147for as_dir in $PATH
19148do
19149  IFS=$as_save_IFS
19150  test -z "$as_dir" && as_dir=.
19151    for ac_exec_ext in '' $ac_executable_extensions; do
19152  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19153    ac_cv_prog_ac_ct_CC="$ac_prog"
19154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19155    break 2
19156  fi
19157done
19158  done
19159IFS=$as_save_IFS
19160
19161fi
19162fi
19163ac_ct_CC=$ac_cv_prog_ac_ct_CC
19164if test -n "$ac_ct_CC"; then
19165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19166$as_echo "$ac_ct_CC" >&6; }
19167else
19168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19169$as_echo "no" >&6; }
19170fi
19171
19172
19173  test -n "$ac_ct_CC" && break
19174done
19175
19176  if test "x$ac_ct_CC" = x; then
19177    CC=""
19178  else
19179    case $cross_compiling:$ac_tool_warned in
19180yes:)
19181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19183ac_tool_warned=yes ;;
19184esac
19185    CC=$ac_ct_CC
19186  fi
19187fi
19188
19189
19190test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19192as_fn_error $? "no acceptable C compiler found in \$PATH
19193See \`config.log' for more details" "$LINENO" 5; }
19194
19195# Provide some information about the compiler.
19196$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19197set X $ac_compile
19198ac_compiler=$2
19199for ac_option in --version -v -V -qversion; do
19200  { { ac_try="$ac_compiler $ac_option >&5"
19201case "(($ac_try" in
19202  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19203  *) ac_try_echo=$ac_try;;
19204esac
19205eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19206$as_echo "$ac_try_echo"; } >&5
19207  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19208  ac_status=$?
19209  if test -s conftest.err; then
19210    sed '10a\
19211... rest of stderr output deleted ...
19212         10q' conftest.err >conftest.er1
19213    cat conftest.er1 >&5
19214  fi
19215  rm -f conftest.er1 conftest.err
19216  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19217  test $ac_status = 0; }
19218done
19219
19220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19221/* end confdefs.h.  */
19222
19223int
19224main ()
19225{
19226
19227  ;
19228  return 0;
19229}
19230_ACEOF
19231ac_clean_files_save=$ac_clean_files
19232ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19233# Try to create an executable without -o first, disregard a.out.
19234# It will help us diagnose broken compilers, and finding out an intuition
19235# of exeext.
19236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19237$as_echo_n "checking whether the C compiler works... " >&6; }
19238ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19239
19240# The possible output files:
19241ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19242
19243ac_rmfiles=
19244for ac_file in $ac_files
19245do
19246  case $ac_file in
19247    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19248    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19249  esac
19250done
19251rm -f $ac_rmfiles
19252
19253if { { ac_try="$ac_link_default"
19254case "(($ac_try" in
19255  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19256  *) ac_try_echo=$ac_try;;
19257esac
19258eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19259$as_echo "$ac_try_echo"; } >&5
19260  (eval "$ac_link_default") 2>&5
19261  ac_status=$?
19262  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19263  test $ac_status = 0; }; then :
19264  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19265# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19266# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19267# so that the user can short-circuit this test for compilers unknown to
19268# Autoconf.
19269for ac_file in $ac_files ''
19270do
19271  test -f "$ac_file" || continue
19272  case $ac_file in
19273    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19274	;;
19275    [ab].out )
19276	# We found the default executable, but exeext='' is most
19277	# certainly right.
19278	break;;
19279    *.* )
19280	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19281	then :; else
19282	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19283	fi
19284	# We set ac_cv_exeext here because the later test for it is not
19285	# safe: cross compilers may not add the suffix if given an `-o'
19286	# argument, so we may need to know it at that point already.
19287	# Even if this section looks crufty: it has the advantage of
19288	# actually working.
19289	break;;
19290    * )
19291	break;;
19292  esac
19293done
19294test "$ac_cv_exeext" = no && ac_cv_exeext=
19295
19296else
19297  ac_file=''
19298fi
19299if test -z "$ac_file"; then :
19300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19301$as_echo "no" >&6; }
19302$as_echo "$as_me: failed program was:" >&5
19303sed 's/^/| /' conftest.$ac_ext >&5
19304
19305{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19307as_fn_error 77 "C compiler cannot create executables
19308See \`config.log' for more details" "$LINENO" 5; }
19309else
19310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19311$as_echo "yes" >&6; }
19312fi
19313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19314$as_echo_n "checking for C compiler default output file name... " >&6; }
19315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19316$as_echo "$ac_file" >&6; }
19317ac_exeext=$ac_cv_exeext
19318
19319rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19320ac_clean_files=$ac_clean_files_save
19321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19322$as_echo_n "checking for suffix of executables... " >&6; }
19323if { { ac_try="$ac_link"
19324case "(($ac_try" in
19325  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19326  *) ac_try_echo=$ac_try;;
19327esac
19328eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19329$as_echo "$ac_try_echo"; } >&5
19330  (eval "$ac_link") 2>&5
19331  ac_status=$?
19332  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19333  test $ac_status = 0; }; then :
19334  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19335# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19336# work properly (i.e., refer to `conftest.exe'), while it won't with
19337# `rm'.
19338for ac_file in conftest.exe conftest conftest.*; do
19339  test -f "$ac_file" || continue
19340  case $ac_file in
19341    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19342    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19343	  break;;
19344    * ) break;;
19345  esac
19346done
19347else
19348  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19349$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19350as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19351See \`config.log' for more details" "$LINENO" 5; }
19352fi
19353rm -f conftest conftest$ac_cv_exeext
19354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19355$as_echo "$ac_cv_exeext" >&6; }
19356
19357rm -f conftest.$ac_ext
19358EXEEXT=$ac_cv_exeext
19359ac_exeext=$EXEEXT
19360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19361/* end confdefs.h.  */
19362#include <stdio.h>
19363int
19364main ()
19365{
19366FILE *f = fopen ("conftest.out", "w");
19367 return ferror (f) || fclose (f) != 0;
19368
19369  ;
19370  return 0;
19371}
19372_ACEOF
19373ac_clean_files="$ac_clean_files conftest.out"
19374# Check that the compiler produces executables we can run.  If not, either
19375# the compiler is broken, or we cross compile.
19376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19377$as_echo_n "checking whether we are cross compiling... " >&6; }
19378if test "$cross_compiling" != yes; then
19379  { { ac_try="$ac_link"
19380case "(($ac_try" in
19381  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19382  *) ac_try_echo=$ac_try;;
19383esac
19384eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19385$as_echo "$ac_try_echo"; } >&5
19386  (eval "$ac_link") 2>&5
19387  ac_status=$?
19388  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19389  test $ac_status = 0; }
19390  if { ac_try='./conftest$ac_cv_exeext'
19391  { { case "(($ac_try" in
19392  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19393  *) ac_try_echo=$ac_try;;
19394esac
19395eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19396$as_echo "$ac_try_echo"; } >&5
19397  (eval "$ac_try") 2>&5
19398  ac_status=$?
19399  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19400  test $ac_status = 0; }; }; then
19401    cross_compiling=no
19402  else
19403    if test "$cross_compiling" = maybe; then
19404	cross_compiling=yes
19405    else
19406	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19407$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19408as_fn_error $? "cannot run C compiled programs.
19409If you meant to cross compile, use \`--host'.
19410See \`config.log' for more details" "$LINENO" 5; }
19411    fi
19412  fi
19413fi
19414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19415$as_echo "$cross_compiling" >&6; }
19416
19417rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19418ac_clean_files=$ac_clean_files_save
19419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19420$as_echo_n "checking for suffix of object files... " >&6; }
19421if ${ac_cv_objext+:} false; then :
19422  $as_echo_n "(cached) " >&6
19423else
19424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19425/* end confdefs.h.  */
19426
19427int
19428main ()
19429{
19430
19431  ;
19432  return 0;
19433}
19434_ACEOF
19435rm -f conftest.o conftest.obj
19436if { { ac_try="$ac_compile"
19437case "(($ac_try" in
19438  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19439  *) ac_try_echo=$ac_try;;
19440esac
19441eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19442$as_echo "$ac_try_echo"; } >&5
19443  (eval "$ac_compile") 2>&5
19444  ac_status=$?
19445  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19446  test $ac_status = 0; }; then :
19447  for ac_file in conftest.o conftest.obj conftest.*; do
19448  test -f "$ac_file" || continue;
19449  case $ac_file in
19450    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19451    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19452       break;;
19453  esac
19454done
19455else
19456  $as_echo "$as_me: failed program was:" >&5
19457sed 's/^/| /' conftest.$ac_ext >&5
19458
19459{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19460$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19461as_fn_error $? "cannot compute suffix of object files: cannot compile
19462See \`config.log' for more details" "$LINENO" 5; }
19463fi
19464rm -f conftest.$ac_cv_objext conftest.$ac_ext
19465fi
19466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19467$as_echo "$ac_cv_objext" >&6; }
19468OBJEXT=$ac_cv_objext
19469ac_objext=$OBJEXT
19470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19471$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19472if ${ac_cv_c_compiler_gnu+:} false; then :
19473  $as_echo_n "(cached) " >&6
19474else
19475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19476/* end confdefs.h.  */
19477
19478int
19479main ()
19480{
19481#ifndef __GNUC__
19482       choke me
19483#endif
19484
19485  ;
19486  return 0;
19487}
19488_ACEOF
19489if ac_fn_c_try_compile "$LINENO"; then :
19490  ac_compiler_gnu=yes
19491else
19492  ac_compiler_gnu=no
19493fi
19494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19495ac_cv_c_compiler_gnu=$ac_compiler_gnu
19496
19497fi
19498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19499$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19500if test $ac_compiler_gnu = yes; then
19501  GCC=yes
19502else
19503  GCC=
19504fi
19505ac_test_CFLAGS=${CFLAGS+set}
19506ac_save_CFLAGS=$CFLAGS
19507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19508$as_echo_n "checking whether $CC accepts -g... " >&6; }
19509if ${ac_cv_prog_cc_g+:} false; then :
19510  $as_echo_n "(cached) " >&6
19511else
19512  ac_save_c_werror_flag=$ac_c_werror_flag
19513   ac_c_werror_flag=yes
19514   ac_cv_prog_cc_g=no
19515   CFLAGS="-g"
19516   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19517/* end confdefs.h.  */
19518
19519int
19520main ()
19521{
19522
19523  ;
19524  return 0;
19525}
19526_ACEOF
19527if ac_fn_c_try_compile "$LINENO"; then :
19528  ac_cv_prog_cc_g=yes
19529else
19530  CFLAGS=""
19531      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19532/* end confdefs.h.  */
19533
19534int
19535main ()
19536{
19537
19538  ;
19539  return 0;
19540}
19541_ACEOF
19542if ac_fn_c_try_compile "$LINENO"; then :
19543
19544else
19545  ac_c_werror_flag=$ac_save_c_werror_flag
19546	 CFLAGS="-g"
19547	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19548/* end confdefs.h.  */
19549
19550int
19551main ()
19552{
19553
19554  ;
19555  return 0;
19556}
19557_ACEOF
19558if ac_fn_c_try_compile "$LINENO"; then :
19559  ac_cv_prog_cc_g=yes
19560fi
19561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19562fi
19563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19564fi
19565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19566   ac_c_werror_flag=$ac_save_c_werror_flag
19567fi
19568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19569$as_echo "$ac_cv_prog_cc_g" >&6; }
19570if test "$ac_test_CFLAGS" = set; then
19571  CFLAGS=$ac_save_CFLAGS
19572elif test $ac_cv_prog_cc_g = yes; then
19573  if test "$GCC" = yes; then
19574    CFLAGS="-g -O2"
19575  else
19576    CFLAGS="-g"
19577  fi
19578else
19579  if test "$GCC" = yes; then
19580    CFLAGS="-O2"
19581  else
19582    CFLAGS=
19583  fi
19584fi
19585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19586$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19587if ${ac_cv_prog_cc_c89+:} false; then :
19588  $as_echo_n "(cached) " >&6
19589else
19590  ac_cv_prog_cc_c89=no
19591ac_save_CC=$CC
19592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19593/* end confdefs.h.  */
19594#include <stdarg.h>
19595#include <stdio.h>
19596#include <sys/types.h>
19597#include <sys/stat.h>
19598/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19599struct buf { int x; };
19600FILE * (*rcsopen) (struct buf *, struct stat *, int);
19601static char *e (p, i)
19602     char **p;
19603     int i;
19604{
19605  return p[i];
19606}
19607static char *f (char * (*g) (char **, int), char **p, ...)
19608{
19609  char *s;
19610  va_list v;
19611  va_start (v,p);
19612  s = g (p, va_arg (v,int));
19613  va_end (v);
19614  return s;
19615}
19616
19617/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19618   function prototypes and stuff, but not '\xHH' hex character constants.
19619   These don't provoke an error unfortunately, instead are silently treated
19620   as 'x'.  The following induces an error, until -std is added to get
19621   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19622   array size at least.  It's necessary to write '\x00'==0 to get something
19623   that's true only with -std.  */
19624int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19625
19626/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19627   inside strings and character constants.  */
19628#define FOO(x) 'x'
19629int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19630
19631int test (int i, double x);
19632struct s1 {int (*f) (int a);};
19633struct s2 {int (*f) (double a);};
19634int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19635int argc;
19636char **argv;
19637int
19638main ()
19639{
19640return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19641  ;
19642  return 0;
19643}
19644_ACEOF
19645for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19646	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19647do
19648  CC="$ac_save_CC $ac_arg"
19649  if ac_fn_c_try_compile "$LINENO"; then :
19650  ac_cv_prog_cc_c89=$ac_arg
19651fi
19652rm -f core conftest.err conftest.$ac_objext
19653  test "x$ac_cv_prog_cc_c89" != "xno" && break
19654done
19655rm -f conftest.$ac_ext
19656CC=$ac_save_CC
19657
19658fi
19659# AC_CACHE_VAL
19660case "x$ac_cv_prog_cc_c89" in
19661  x)
19662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19663$as_echo "none needed" >&6; } ;;
19664  xno)
19665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19666$as_echo "unsupported" >&6; } ;;
19667  *)
19668    CC="$CC $ac_cv_prog_cc_c89"
19669    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19670$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19671esac
19672if test "x$ac_cv_prog_cc_c89" != xno; then :
19673
19674fi
19675
19676ac_ext=cpp
19677ac_cpp='$CXXCPP $CPPFLAGS'
19678ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19679ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19680ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19681
19682
19683### Locate C++ compiler (CXX)
19684
19685if test "x$CXX" != x; then
19686  COMPILER_CHECK_LIST="$CXX"
19687elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19688  COMPILER_CHECK_LIST="cl"
19689elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19690  COMPILER_CHECK_LIST="CC g++"
19691else
19692  COMPILER_CHECK_LIST="g++ CC"
19693fi
19694
19695
19696  COMPILER_NAME=C++
19697
19698  CXX=
19699  # If TOOLS_DIR is set, check for all compiler names in there first
19700  # before checking the rest of the PATH.
19701  if test -n "$TOOLS_DIR"; then
19702    PATH_save="$PATH"
19703    PATH="$TOOLS_DIR"
19704    for ac_prog in $COMPILER_CHECK_LIST
19705do
19706  # Extract the first word of "$ac_prog", so it can be a program name with args.
19707set dummy $ac_prog; ac_word=$2
19708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19709$as_echo_n "checking for $ac_word... " >&6; }
19710if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
19711  $as_echo_n "(cached) " >&6
19712else
19713  case $TOOLS_DIR_CXX in
19714  [\\/]* | ?:[\\/]*)
19715  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19716  ;;
19717  *)
19718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19719for as_dir in $PATH
19720do
19721  IFS=$as_save_IFS
19722  test -z "$as_dir" && as_dir=.
19723    for ac_exec_ext in '' $ac_executable_extensions; do
19724  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19725    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19727    break 2
19728  fi
19729done
19730  done
19731IFS=$as_save_IFS
19732
19733  ;;
19734esac
19735fi
19736TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19737if test -n "$TOOLS_DIR_CXX"; then
19738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19739$as_echo "$TOOLS_DIR_CXX" >&6; }
19740else
19741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19742$as_echo "no" >&6; }
19743fi
19744
19745
19746  test -n "$TOOLS_DIR_CXX" && break
19747done
19748
19749    CXX=$TOOLS_DIR_CXX
19750    PATH="$PATH_save"
19751  fi
19752
19753  # AC_PATH_PROGS can't be run multiple times with the same variable,
19754  # so create a new name for this run.
19755  if test "x$CXX" = x; then
19756    for ac_prog in $COMPILER_CHECK_LIST
19757do
19758  # Extract the first word of "$ac_prog", so it can be a program name with args.
19759set dummy $ac_prog; ac_word=$2
19760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19761$as_echo_n "checking for $ac_word... " >&6; }
19762if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
19763  $as_echo_n "(cached) " >&6
19764else
19765  case $POTENTIAL_CXX in
19766  [\\/]* | ?:[\\/]*)
19767  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19768  ;;
19769  *)
19770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19771for as_dir in $PATH
19772do
19773  IFS=$as_save_IFS
19774  test -z "$as_dir" && as_dir=.
19775    for ac_exec_ext in '' $ac_executable_extensions; do
19776  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19777    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19779    break 2
19780  fi
19781done
19782  done
19783IFS=$as_save_IFS
19784
19785  ;;
19786esac
19787fi
19788POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19789if test -n "$POTENTIAL_CXX"; then
19790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19791$as_echo "$POTENTIAL_CXX" >&6; }
19792else
19793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19794$as_echo "no" >&6; }
19795fi
19796
19797
19798  test -n "$POTENTIAL_CXX" && break
19799done
19800
19801    CXX=$POTENTIAL_CXX
19802  fi
19803
19804  if test "x$CXX" = x; then
19805
19806    # Print a helpful message on how to acquire the necessary build dependency.
19807    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19808    MISSING_DEPENDENCY=devkit
19809    PKGHANDLER_COMMAND=
19810
19811    case $PKGHANDLER in
19812	apt-get)
19813                apt_help     $MISSING_DEPENDENCY ;;
19814    yum)
19815                yum_help     $MISSING_DEPENDENCY ;;
19816	port)
19817                port_help    $MISSING_DEPENDENCY ;;
19818	pkgutil)
19819                pkgutil_help $MISSING_DEPENDENCY ;;
19820	pkgadd)
19821                pkgadd_help  $MISSING_DEPENDENCY ;;
19822    * )
19823      break ;;
19824    esac
19825
19826    if test "x$PKGHANDLER_COMMAND" != x; then
19827        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19828    fi
19829
19830      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19831  fi
19832
19833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19834
19835  # First separate the path from the arguments. This will split at the first
19836  # space.
19837  complete="$CXX"
19838  path="${complete%% *}"
19839  tmp="$complete EOL"
19840  arguments="${tmp#* }"
19841
19842  # Input might be given as Windows format, start by converting to
19843  # unix format.
19844  new_path=`$CYGPATH -u "$path"`
19845
19846  # Now try to locate executable using which
19847  new_path=`$WHICH "$new_path" 2> /dev/null`
19848  # bat and cmd files are not always considered executable in cygwin causing which
19849  # to not find them
19850  if test "x$new_path" = x \
19851           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19852           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19853    new_path=`$CYGPATH -u "$path"`
19854  fi
19855  if test "x$new_path" = x; then
19856    # Oops. Which didn't find the executable.
19857    # The splitting of arguments from the executable at a space might have been incorrect,
19858    # since paths with space are more likely in Windows. Give it another try with the whole
19859    # argument.
19860    path="$complete"
19861    arguments="EOL"
19862    new_path=`$CYGPATH -u "$path"`
19863    new_path=`$WHICH "$new_path" 2> /dev/null`
19864    # bat and cmd files are not always considered executable in cygwin causing which
19865    # to not find them
19866    if test "x$new_path" = x \
19867             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19868             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19869      new_path=`$CYGPATH -u "$path"`
19870    fi
19871    if test "x$new_path" = x; then
19872      # It's still not found. Now this is an unrecoverable error.
19873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19874$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19875      has_space=`$ECHO "$complete" | $GREP " "`
19876      if test "x$has_space" != x; then
19877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19879      fi
19880      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19881    fi
19882  fi
19883
19884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19887  # "foo.exe" is OK but "foo" is an error.
19888  #
19889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19890  # It is also a way to make sure we got the proper file name for the real test later on.
19891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19892  if test "x$test_shortpath" = x; then
19893    # Short path failed, file does not exist as specified.
19894    # Try adding .exe or .cmd
19895    if test -f "${new_path}.exe"; then
19896       input_to_shortpath="${new_path}.exe"
19897    elif test -f "${new_path}.cmd"; then
19898       input_to_shortpath="${new_path}.cmd"
19899    else
19900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19901$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19904      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19905    fi
19906  else
19907    input_to_shortpath="$new_path"
19908  fi
19909
19910  # Call helper function which possibly converts this using DOS-style short mode.
19911  # If so, the updated path is stored in $new_path.
19912  new_path="$input_to_shortpath"
19913
19914  input_path="$input_to_shortpath"
19915  # Check if we need to convert this using DOS-style short mode. If the path
19916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19917  # take no chances and rewrite it.
19918  # Note: m4 eats our [], so we need to use [ and ] instead.
19919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19920  if test "x$has_forbidden_chars" != x; then
19921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19925      # Going to short mode and back again did indeed matter. Since short mode is
19926      # case insensitive, let's make it lowercase to improve readability.
19927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19928      # Now convert it back to Unix-stile (cygpath)
19929      input_path=`$CYGPATH -u "$shortmode_path"`
19930      new_path="$input_path"
19931    fi
19932  fi
19933
19934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19935  if test "x$test_cygdrive_prefix" = x; then
19936    # As a simple fix, exclude /usr/bin since it's not a real path.
19937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19939      # a path prefixed by /cygdrive for fixpath to work.
19940      new_path="$CYGWIN_ROOT_PATH$input_path"
19941    fi
19942  fi
19943
19944  # remove trailing .exe if any
19945  new_path="${new_path/%.exe/}"
19946
19947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19948
19949  # First separate the path from the arguments. This will split at the first
19950  # space.
19951  complete="$CXX"
19952  path="${complete%% *}"
19953  tmp="$complete EOL"
19954  arguments="${tmp#* }"
19955
19956  # Input might be given as Windows format, start by converting to
19957  # unix format.
19958  new_path="$path"
19959
19960  windows_path="$new_path"
19961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19962    unix_path=`$CYGPATH -u "$windows_path"`
19963    new_path="$unix_path"
19964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19966    new_path="$unix_path"
19967  fi
19968
19969
19970  # Now try to locate executable using which
19971  new_path=`$WHICH "$new_path" 2> /dev/null`
19972
19973  if test "x$new_path" = x; then
19974    # Oops. Which didn't find the executable.
19975    # The splitting of arguments from the executable at a space might have been incorrect,
19976    # since paths with space are more likely in Windows. Give it another try with the whole
19977    # argument.
19978    path="$complete"
19979    arguments="EOL"
19980    new_path="$path"
19981
19982  windows_path="$new_path"
19983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19984    unix_path=`$CYGPATH -u "$windows_path"`
19985    new_path="$unix_path"
19986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19988    new_path="$unix_path"
19989  fi
19990
19991
19992    new_path=`$WHICH "$new_path" 2> /dev/null`
19993
19994    if test "x$new_path" = x; then
19995      # It's still not found. Now this is an unrecoverable error.
19996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19997$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19998      has_space=`$ECHO "$complete" | $GREP " "`
19999      if test "x$has_space" != x; then
20000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20002      fi
20003      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20004    fi
20005  fi
20006
20007  # Now new_path has a complete unix path to the binary
20008  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20009    # Keep paths in /bin as-is, but remove trailing .exe if any
20010    new_path="${new_path/%.exe/}"
20011    # Do not save /bin paths to all_fixpath_prefixes!
20012  else
20013    # Not in mixed or Windows style, start by that.
20014    new_path=`cmd //c echo $new_path`
20015
20016  input_path="$new_path"
20017  # Check if we need to convert this using DOS-style short mode. If the path
20018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20019  # take no chances and rewrite it.
20020  # Note: m4 eats our [], so we need to use [ and ] instead.
20021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20022  if test "x$has_forbidden_chars" != x; then
20023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20025  fi
20026
20027    # Output is in $new_path
20028
20029  windows_path="$new_path"
20030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20031    unix_path=`$CYGPATH -u "$windows_path"`
20032    new_path="$unix_path"
20033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20035    new_path="$unix_path"
20036  fi
20037
20038    # remove trailing .exe if any
20039    new_path="${new_path/%.exe/}"
20040
20041    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20042    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20043  fi
20044
20045  else
20046    # We're on a posix platform. Hooray! :)
20047    # First separate the path from the arguments. This will split at the first
20048    # space.
20049    complete="$CXX"
20050    path="${complete%% *}"
20051    tmp="$complete EOL"
20052    arguments="${tmp#* }"
20053
20054    # Cannot rely on the command "which" here since it doesn't always work.
20055    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20056    if test -z "$is_absolute_path"; then
20057      # Path to executable is not absolute. Find it.
20058      IFS_save="$IFS"
20059      IFS=:
20060      for p in $PATH; do
20061        if test -f "$p/$path" && test -x "$p/$path"; then
20062          new_path="$p/$path"
20063          break
20064        fi
20065      done
20066      IFS="$IFS_save"
20067    else
20068      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20069$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20070      new_path="$path"
20071    fi
20072
20073    if test "x$new_path" = x; then
20074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20075$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20076        has_space=`$ECHO "$complete" | $GREP " "`
20077        if test "x$has_space" != x; then
20078          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20079$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20080        fi
20081        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20082      fi
20083  fi
20084
20085      # Now join together the path and the arguments once again
20086      if test "x$arguments" != xEOL; then
20087        new_complete="$new_path ${arguments% *}"
20088      else
20089        new_complete="$new_path"
20090      fi
20091
20092  if test "x$complete" != "x$new_complete"; then
20093      CXX="$new_complete"
20094      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20095$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20096    fi
20097
20098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20099$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20100  TEST_COMPILER="$CXX"
20101
20102    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20103        # Follow a chain of symbolic links. Use readlink
20104        # where it exists, else fall back to horribly
20105        # complicated shell code.
20106        if test "x$READLINK_TESTED" != yes; then
20107            # On MacOSX there is a readlink tool with a different
20108            # purpose than the GNU readlink tool. Check the found readlink.
20109            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20110            if test "x$ISGNU" = x; then
20111                 # A readlink that we do not know how to use.
20112                 # Are there other non-GNU readlinks out there?
20113                 READLINK_TESTED=yes
20114                 READLINK=
20115            fi
20116        fi
20117
20118        if test "x$READLINK" != x; then
20119            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20120        else
20121            # Save the current directory for restoring afterwards
20122            STARTDIR=$PWD
20123            COUNTER=0
20124            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20125            sym_link_file=`$BASENAME $TEST_COMPILER`
20126            # Use the system pwd and not the shell builtin to resolve directory symlinks
20127            cd $sym_link_dir
20128            cd `$THEPWDCMD`
20129            sym_link_dir=`$THEPWDCMD`
20130            # Resolve file symlinks
20131            while test $COUNTER -lt 20; do
20132                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20133                if test "x$ISLINK" == x; then
20134                    # This is not a symbolic link! We are done!
20135                    break
20136                fi
20137                # Again resolve directory symlinks since the target of the just found
20138                # link could be in a different directory
20139                cd `$DIRNAME $ISLINK`
20140                sym_link_dir=`$THEPWDCMD`
20141                sym_link_file=`$BASENAME $ISLINK`
20142                let COUNTER=COUNTER+1
20143            done
20144            cd $STARTDIR
20145            TEST_COMPILER=$sym_link_dir/$sym_link_file
20146        fi
20147    fi
20148
20149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20150$as_echo "$TEST_COMPILER" >&6; }
20151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20152$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20153
20154  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20155  if test "x$COMPILER_BASENAME" = "xccache"; then
20156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20157$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20158    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20159    # We want to control ccache invocation ourselves, so ignore this cc and try
20160    # searching again.
20161
20162    # Remove the path to the fake ccache cc from the PATH
20163    RETRY_COMPILER_SAVED_PATH="$PATH"
20164    COMPILER_DIRNAME=`$DIRNAME $CXX`
20165    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20166
20167    # Try again looking for our compiler
20168    if test -n "$ac_tool_prefix"; then
20169  for ac_prog in $COMPILER_CHECK_LIST
20170  do
20171    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20172set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20174$as_echo_n "checking for $ac_word... " >&6; }
20175if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20176  $as_echo_n "(cached) " >&6
20177else
20178  if test -n "$PROPER_COMPILER_CXX"; then
20179  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20180else
20181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20182for as_dir in $PATH
20183do
20184  IFS=$as_save_IFS
20185  test -z "$as_dir" && as_dir=.
20186    for ac_exec_ext in '' $ac_executable_extensions; do
20187  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20188    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20190    break 2
20191  fi
20192done
20193  done
20194IFS=$as_save_IFS
20195
20196fi
20197fi
20198PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20199if test -n "$PROPER_COMPILER_CXX"; then
20200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20201$as_echo "$PROPER_COMPILER_CXX" >&6; }
20202else
20203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20204$as_echo "no" >&6; }
20205fi
20206
20207
20208    test -n "$PROPER_COMPILER_CXX" && break
20209  done
20210fi
20211if test -z "$PROPER_COMPILER_CXX"; then
20212  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20213  for ac_prog in $COMPILER_CHECK_LIST
20214do
20215  # Extract the first word of "$ac_prog", so it can be a program name with args.
20216set dummy $ac_prog; ac_word=$2
20217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20218$as_echo_n "checking for $ac_word... " >&6; }
20219if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20220  $as_echo_n "(cached) " >&6
20221else
20222  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20223  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20224else
20225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20226for as_dir in $PATH
20227do
20228  IFS=$as_save_IFS
20229  test -z "$as_dir" && as_dir=.
20230    for ac_exec_ext in '' $ac_executable_extensions; do
20231  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20232    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20234    break 2
20235  fi
20236done
20237  done
20238IFS=$as_save_IFS
20239
20240fi
20241fi
20242ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20243if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20245$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20246else
20247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20248$as_echo "no" >&6; }
20249fi
20250
20251
20252  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20253done
20254
20255  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20256    PROPER_COMPILER_CXX=""
20257  else
20258    case $cross_compiling:$ac_tool_warned in
20259yes:)
20260{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20261$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20262ac_tool_warned=yes ;;
20263esac
20264    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20265  fi
20266fi
20267
20268
20269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20270
20271  # First separate the path from the arguments. This will split at the first
20272  # space.
20273  complete="$PROPER_COMPILER_CXX"
20274  path="${complete%% *}"
20275  tmp="$complete EOL"
20276  arguments="${tmp#* }"
20277
20278  # Input might be given as Windows format, start by converting to
20279  # unix format.
20280  new_path=`$CYGPATH -u "$path"`
20281
20282  # Now try to locate executable using which
20283  new_path=`$WHICH "$new_path" 2> /dev/null`
20284  # bat and cmd files are not always considered executable in cygwin causing which
20285  # to not find them
20286  if test "x$new_path" = x \
20287           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20288           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20289    new_path=`$CYGPATH -u "$path"`
20290  fi
20291  if test "x$new_path" = x; then
20292    # Oops. Which didn't find the executable.
20293    # The splitting of arguments from the executable at a space might have been incorrect,
20294    # since paths with space are more likely in Windows. Give it another try with the whole
20295    # argument.
20296    path="$complete"
20297    arguments="EOL"
20298    new_path=`$CYGPATH -u "$path"`
20299    new_path=`$WHICH "$new_path" 2> /dev/null`
20300    # bat and cmd files are not always considered executable in cygwin causing which
20301    # to not find them
20302    if test "x$new_path" = x \
20303             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20304             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20305      new_path=`$CYGPATH -u "$path"`
20306    fi
20307    if test "x$new_path" = x; then
20308      # It's still not found. Now this is an unrecoverable error.
20309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20310$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20311      has_space=`$ECHO "$complete" | $GREP " "`
20312      if test "x$has_space" != x; then
20313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20315      fi
20316      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20317    fi
20318  fi
20319
20320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20323  # "foo.exe" is OK but "foo" is an error.
20324  #
20325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20326  # It is also a way to make sure we got the proper file name for the real test later on.
20327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20328  if test "x$test_shortpath" = x; then
20329    # Short path failed, file does not exist as specified.
20330    # Try adding .exe or .cmd
20331    if test -f "${new_path}.exe"; then
20332       input_to_shortpath="${new_path}.exe"
20333    elif test -f "${new_path}.cmd"; then
20334       input_to_shortpath="${new_path}.cmd"
20335    else
20336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20337$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20340      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20341    fi
20342  else
20343    input_to_shortpath="$new_path"
20344  fi
20345
20346  # Call helper function which possibly converts this using DOS-style short mode.
20347  # If so, the updated path is stored in $new_path.
20348  new_path="$input_to_shortpath"
20349
20350  input_path="$input_to_shortpath"
20351  # Check if we need to convert this using DOS-style short mode. If the path
20352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20353  # take no chances and rewrite it.
20354  # Note: m4 eats our [], so we need to use [ and ] instead.
20355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20356  if test "x$has_forbidden_chars" != x; then
20357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20361      # Going to short mode and back again did indeed matter. Since short mode is
20362      # case insensitive, let's make it lowercase to improve readability.
20363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20364      # Now convert it back to Unix-stile (cygpath)
20365      input_path=`$CYGPATH -u "$shortmode_path"`
20366      new_path="$input_path"
20367    fi
20368  fi
20369
20370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20371  if test "x$test_cygdrive_prefix" = x; then
20372    # As a simple fix, exclude /usr/bin since it's not a real path.
20373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20375      # a path prefixed by /cygdrive for fixpath to work.
20376      new_path="$CYGWIN_ROOT_PATH$input_path"
20377    fi
20378  fi
20379
20380  # remove trailing .exe if any
20381  new_path="${new_path/%.exe/}"
20382
20383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20384
20385  # First separate the path from the arguments. This will split at the first
20386  # space.
20387  complete="$PROPER_COMPILER_CXX"
20388  path="${complete%% *}"
20389  tmp="$complete EOL"
20390  arguments="${tmp#* }"
20391
20392  # Input might be given as Windows format, start by converting to
20393  # unix format.
20394  new_path="$path"
20395
20396  windows_path="$new_path"
20397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20398    unix_path=`$CYGPATH -u "$windows_path"`
20399    new_path="$unix_path"
20400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20402    new_path="$unix_path"
20403  fi
20404
20405
20406  # Now try to locate executable using which
20407  new_path=`$WHICH "$new_path" 2> /dev/null`
20408
20409  if test "x$new_path" = x; then
20410    # Oops. Which didn't find the executable.
20411    # The splitting of arguments from the executable at a space might have been incorrect,
20412    # since paths with space are more likely in Windows. Give it another try with the whole
20413    # argument.
20414    path="$complete"
20415    arguments="EOL"
20416    new_path="$path"
20417
20418  windows_path="$new_path"
20419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20420    unix_path=`$CYGPATH -u "$windows_path"`
20421    new_path="$unix_path"
20422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20424    new_path="$unix_path"
20425  fi
20426
20427
20428    new_path=`$WHICH "$new_path" 2> /dev/null`
20429
20430    if test "x$new_path" = x; then
20431      # It's still not found. Now this is an unrecoverable error.
20432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20433$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20434      has_space=`$ECHO "$complete" | $GREP " "`
20435      if test "x$has_space" != x; then
20436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20438      fi
20439      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20440    fi
20441  fi
20442
20443  # Now new_path has a complete unix path to the binary
20444  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20445    # Keep paths in /bin as-is, but remove trailing .exe if any
20446    new_path="${new_path/%.exe/}"
20447    # Do not save /bin paths to all_fixpath_prefixes!
20448  else
20449    # Not in mixed or Windows style, start by that.
20450    new_path=`cmd //c echo $new_path`
20451
20452  input_path="$new_path"
20453  # Check if we need to convert this using DOS-style short mode. If the path
20454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20455  # take no chances and rewrite it.
20456  # Note: m4 eats our [], so we need to use [ and ] instead.
20457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20458  if test "x$has_forbidden_chars" != x; then
20459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20461  fi
20462
20463    # Output is in $new_path
20464
20465  windows_path="$new_path"
20466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20467    unix_path=`$CYGPATH -u "$windows_path"`
20468    new_path="$unix_path"
20469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20471    new_path="$unix_path"
20472  fi
20473
20474    # remove trailing .exe if any
20475    new_path="${new_path/%.exe/}"
20476
20477    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20478    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20479  fi
20480
20481  else
20482    # We're on a posix platform. Hooray! :)
20483    # First separate the path from the arguments. This will split at the first
20484    # space.
20485    complete="$PROPER_COMPILER_CXX"
20486    path="${complete%% *}"
20487    tmp="$complete EOL"
20488    arguments="${tmp#* }"
20489
20490    # Cannot rely on the command "which" here since it doesn't always work.
20491    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20492    if test -z "$is_absolute_path"; then
20493      # Path to executable is not absolute. Find it.
20494      IFS_save="$IFS"
20495      IFS=:
20496      for p in $PATH; do
20497        if test -f "$p/$path" && test -x "$p/$path"; then
20498          new_path="$p/$path"
20499          break
20500        fi
20501      done
20502      IFS="$IFS_save"
20503    else
20504      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20505$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20506      new_path="$path"
20507    fi
20508
20509    if test "x$new_path" = x; then
20510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20511$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20512        has_space=`$ECHO "$complete" | $GREP " "`
20513        if test "x$has_space" != x; then
20514          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20515$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20516        fi
20517        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20518      fi
20519  fi
20520
20521      # Now join together the path and the arguments once again
20522      if test "x$arguments" != xEOL; then
20523        new_complete="$new_path ${arguments% *}"
20524      else
20525        new_complete="$new_path"
20526      fi
20527
20528  if test "x$complete" != "x$new_complete"; then
20529      PROPER_COMPILER_CXX="$new_complete"
20530      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20531$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20532    fi
20533
20534    PATH="$RETRY_COMPILER_SAVED_PATH"
20535
20536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20537$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20538
20539    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20540        # Follow a chain of symbolic links. Use readlink
20541        # where it exists, else fall back to horribly
20542        # complicated shell code.
20543        if test "x$READLINK_TESTED" != yes; then
20544            # On MacOSX there is a readlink tool with a different
20545            # purpose than the GNU readlink tool. Check the found readlink.
20546            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20547            if test "x$ISGNU" = x; then
20548                 # A readlink that we do not know how to use.
20549                 # Are there other non-GNU readlinks out there?
20550                 READLINK_TESTED=yes
20551                 READLINK=
20552            fi
20553        fi
20554
20555        if test "x$READLINK" != x; then
20556            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20557        else
20558            # Save the current directory for restoring afterwards
20559            STARTDIR=$PWD
20560            COUNTER=0
20561            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20562            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20563            # Use the system pwd and not the shell builtin to resolve directory symlinks
20564            cd $sym_link_dir
20565            cd `$THEPWDCMD`
20566            sym_link_dir=`$THEPWDCMD`
20567            # Resolve file symlinks
20568            while test $COUNTER -lt 20; do
20569                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20570                if test "x$ISLINK" == x; then
20571                    # This is not a symbolic link! We are done!
20572                    break
20573                fi
20574                # Again resolve directory symlinks since the target of the just found
20575                # link could be in a different directory
20576                cd `$DIRNAME $ISLINK`
20577                sym_link_dir=`$THEPWDCMD`
20578                sym_link_file=`$BASENAME $ISLINK`
20579                let COUNTER=COUNTER+1
20580            done
20581            cd $STARTDIR
20582            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20583        fi
20584    fi
20585
20586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20587$as_echo "$PROPER_COMPILER_CXX" >&6; }
20588    CXX="$PROPER_COMPILER_CXX"
20589  else
20590    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20591$as_echo "no, keeping CXX" >&6; }
20592    CXX="$TEST_COMPILER"
20593  fi
20594
20595  COMPILER=$CXX
20596  COMPILER_NAME=$COMPILER_NAME
20597
20598  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20599    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20600    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20601    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20602    if test $? -ne 0; then
20603      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20604
20605      { $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
20606$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20607      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20608$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20609      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20610    else
20611      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20612      COMPILER_VENDOR="Sun Studio"
20613    fi
20614  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20615    # First line typically looks something like:
20616    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20617    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20618    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20619    COMPILER_VENDOR="Microsoft CL.EXE"
20620    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20621    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20622      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20623        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20624      fi
20625    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20626      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20627        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20628      fi
20629    fi
20630  else
20631    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20632    # Check that this is likely to be GCC.
20633    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20634    if test $? -ne 0; then
20635      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20636$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20637      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20638$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20639      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20640    fi
20641
20642    # First line typically looks something like:
20643    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20644    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20645    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20646  fi
20647  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20648  CXX_VERSION="$COMPILER_VERSION"
20649  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20650  CXX_VENDOR="$COMPILER_VENDOR"
20651
20652  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20653$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20654
20655
20656# Now that we have resolved CXX ourself, let autoconf have its go at it
20657ac_ext=cpp
20658ac_cpp='$CXXCPP $CPPFLAGS'
20659ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20660ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20661ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20662if test -z "$CXX"; then
20663  if test -n "$CCC"; then
20664    CXX=$CCC
20665  else
20666    if test -n "$ac_tool_prefix"; then
20667  for ac_prog in $CXX
20668  do
20669    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20670set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20672$as_echo_n "checking for $ac_word... " >&6; }
20673if ${ac_cv_prog_CXX+:} false; then :
20674  $as_echo_n "(cached) " >&6
20675else
20676  if test -n "$CXX"; then
20677  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20678else
20679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20680for as_dir in $PATH
20681do
20682  IFS=$as_save_IFS
20683  test -z "$as_dir" && as_dir=.
20684    for ac_exec_ext in '' $ac_executable_extensions; do
20685  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20686    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20688    break 2
20689  fi
20690done
20691  done
20692IFS=$as_save_IFS
20693
20694fi
20695fi
20696CXX=$ac_cv_prog_CXX
20697if test -n "$CXX"; then
20698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20699$as_echo "$CXX" >&6; }
20700else
20701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20702$as_echo "no" >&6; }
20703fi
20704
20705
20706    test -n "$CXX" && break
20707  done
20708fi
20709if test -z "$CXX"; then
20710  ac_ct_CXX=$CXX
20711  for ac_prog in $CXX
20712do
20713  # Extract the first word of "$ac_prog", so it can be a program name with args.
20714set dummy $ac_prog; ac_word=$2
20715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20716$as_echo_n "checking for $ac_word... " >&6; }
20717if ${ac_cv_prog_ac_ct_CXX+:} false; then :
20718  $as_echo_n "(cached) " >&6
20719else
20720  if test -n "$ac_ct_CXX"; then
20721  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20722else
20723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20724for as_dir in $PATH
20725do
20726  IFS=$as_save_IFS
20727  test -z "$as_dir" && as_dir=.
20728    for ac_exec_ext in '' $ac_executable_extensions; do
20729  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20730    ac_cv_prog_ac_ct_CXX="$ac_prog"
20731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20732    break 2
20733  fi
20734done
20735  done
20736IFS=$as_save_IFS
20737
20738fi
20739fi
20740ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20741if test -n "$ac_ct_CXX"; then
20742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20743$as_echo "$ac_ct_CXX" >&6; }
20744else
20745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20746$as_echo "no" >&6; }
20747fi
20748
20749
20750  test -n "$ac_ct_CXX" && break
20751done
20752
20753  if test "x$ac_ct_CXX" = x; then
20754    CXX="g++"
20755  else
20756    case $cross_compiling:$ac_tool_warned in
20757yes:)
20758{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20759$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20760ac_tool_warned=yes ;;
20761esac
20762    CXX=$ac_ct_CXX
20763  fi
20764fi
20765
20766  fi
20767fi
20768# Provide some information about the compiler.
20769$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20770set X $ac_compile
20771ac_compiler=$2
20772for ac_option in --version -v -V -qversion; do
20773  { { ac_try="$ac_compiler $ac_option >&5"
20774case "(($ac_try" in
20775  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20776  *) ac_try_echo=$ac_try;;
20777esac
20778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20779$as_echo "$ac_try_echo"; } >&5
20780  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20781  ac_status=$?
20782  if test -s conftest.err; then
20783    sed '10a\
20784... rest of stderr output deleted ...
20785         10q' conftest.err >conftest.er1
20786    cat conftest.er1 >&5
20787  fi
20788  rm -f conftest.er1 conftest.err
20789  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20790  test $ac_status = 0; }
20791done
20792
20793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20794$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20795if ${ac_cv_cxx_compiler_gnu+:} false; then :
20796  $as_echo_n "(cached) " >&6
20797else
20798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20799/* end confdefs.h.  */
20800
20801int
20802main ()
20803{
20804#ifndef __GNUC__
20805       choke me
20806#endif
20807
20808  ;
20809  return 0;
20810}
20811_ACEOF
20812if ac_fn_cxx_try_compile "$LINENO"; then :
20813  ac_compiler_gnu=yes
20814else
20815  ac_compiler_gnu=no
20816fi
20817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20818ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20819
20820fi
20821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20822$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20823if test $ac_compiler_gnu = yes; then
20824  GXX=yes
20825else
20826  GXX=
20827fi
20828ac_test_CXXFLAGS=${CXXFLAGS+set}
20829ac_save_CXXFLAGS=$CXXFLAGS
20830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20831$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20832if ${ac_cv_prog_cxx_g+:} false; then :
20833  $as_echo_n "(cached) " >&6
20834else
20835  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20836   ac_cxx_werror_flag=yes
20837   ac_cv_prog_cxx_g=no
20838   CXXFLAGS="-g"
20839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20840/* end confdefs.h.  */
20841
20842int
20843main ()
20844{
20845
20846  ;
20847  return 0;
20848}
20849_ACEOF
20850if ac_fn_cxx_try_compile "$LINENO"; then :
20851  ac_cv_prog_cxx_g=yes
20852else
20853  CXXFLAGS=""
20854      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20855/* end confdefs.h.  */
20856
20857int
20858main ()
20859{
20860
20861  ;
20862  return 0;
20863}
20864_ACEOF
20865if ac_fn_cxx_try_compile "$LINENO"; then :
20866
20867else
20868  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20869	 CXXFLAGS="-g"
20870	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20871/* end confdefs.h.  */
20872
20873int
20874main ()
20875{
20876
20877  ;
20878  return 0;
20879}
20880_ACEOF
20881if ac_fn_cxx_try_compile "$LINENO"; then :
20882  ac_cv_prog_cxx_g=yes
20883fi
20884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20885fi
20886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20887fi
20888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20889   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20890fi
20891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20892$as_echo "$ac_cv_prog_cxx_g" >&6; }
20893if test "$ac_test_CXXFLAGS" = set; then
20894  CXXFLAGS=$ac_save_CXXFLAGS
20895elif test $ac_cv_prog_cxx_g = yes; then
20896  if test "$GXX" = yes; then
20897    CXXFLAGS="-g -O2"
20898  else
20899    CXXFLAGS="-g"
20900  fi
20901else
20902  if test "$GXX" = yes; then
20903    CXXFLAGS="-O2"
20904  else
20905    CXXFLAGS=
20906  fi
20907fi
20908ac_ext=cpp
20909ac_cpp='$CXXCPP $CPPFLAGS'
20910ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20911ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20912ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20913
20914
20915### Locate other tools
20916
20917if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20918    ac_ext=m
20919ac_cpp='$OBJCPP $CPPFLAGS'
20920ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20921ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20922ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20923if test -n "$ac_tool_prefix"; then
20924  for ac_prog in gcc objcc objc cc CC
20925  do
20926    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20927set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20929$as_echo_n "checking for $ac_word... " >&6; }
20930if ${ac_cv_prog_OBJC+:} false; then :
20931  $as_echo_n "(cached) " >&6
20932else
20933  if test -n "$OBJC"; then
20934  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20935else
20936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20937for as_dir in $PATH
20938do
20939  IFS=$as_save_IFS
20940  test -z "$as_dir" && as_dir=.
20941    for ac_exec_ext in '' $ac_executable_extensions; do
20942  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20943    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20945    break 2
20946  fi
20947done
20948  done
20949IFS=$as_save_IFS
20950
20951fi
20952fi
20953OBJC=$ac_cv_prog_OBJC
20954if test -n "$OBJC"; then
20955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20956$as_echo "$OBJC" >&6; }
20957else
20958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20959$as_echo "no" >&6; }
20960fi
20961
20962
20963    test -n "$OBJC" && break
20964  done
20965fi
20966if test -z "$OBJC"; then
20967  ac_ct_OBJC=$OBJC
20968  for ac_prog in gcc objcc objc cc CC
20969do
20970  # Extract the first word of "$ac_prog", so it can be a program name with args.
20971set dummy $ac_prog; ac_word=$2
20972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20973$as_echo_n "checking for $ac_word... " >&6; }
20974if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
20975  $as_echo_n "(cached) " >&6
20976else
20977  if test -n "$ac_ct_OBJC"; then
20978  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20979else
20980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20981for as_dir in $PATH
20982do
20983  IFS=$as_save_IFS
20984  test -z "$as_dir" && as_dir=.
20985    for ac_exec_ext in '' $ac_executable_extensions; do
20986  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20987    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20989    break 2
20990  fi
20991done
20992  done
20993IFS=$as_save_IFS
20994
20995fi
20996fi
20997ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20998if test -n "$ac_ct_OBJC"; then
20999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21000$as_echo "$ac_ct_OBJC" >&6; }
21001else
21002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21003$as_echo "no" >&6; }
21004fi
21005
21006
21007  test -n "$ac_ct_OBJC" && break
21008done
21009
21010  if test "x$ac_ct_OBJC" = x; then
21011    OBJC="gcc"
21012  else
21013    case $cross_compiling:$ac_tool_warned in
21014yes:)
21015{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21016$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21017ac_tool_warned=yes ;;
21018esac
21019    OBJC=$ac_ct_OBJC
21020  fi
21021fi
21022
21023# Provide some information about the compiler.
21024$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21025set X $ac_compile
21026ac_compiler=$2
21027for ac_option in --version -v -V -qversion; do
21028  { { ac_try="$ac_compiler $ac_option >&5"
21029case "(($ac_try" in
21030  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21031  *) ac_try_echo=$ac_try;;
21032esac
21033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21034$as_echo "$ac_try_echo"; } >&5
21035  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21036  ac_status=$?
21037  if test -s conftest.err; then
21038    sed '10a\
21039... rest of stderr output deleted ...
21040         10q' conftest.err >conftest.er1
21041    cat conftest.er1 >&5
21042  fi
21043  rm -f conftest.er1 conftest.err
21044  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21045  test $ac_status = 0; }
21046done
21047
21048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21049$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21050if ${ac_cv_objc_compiler_gnu+:} false; then :
21051  $as_echo_n "(cached) " >&6
21052else
21053  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21054/* end confdefs.h.  */
21055
21056int
21057main ()
21058{
21059#ifndef __GNUC__
21060       choke me
21061#endif
21062
21063  ;
21064  return 0;
21065}
21066_ACEOF
21067if ac_fn_objc_try_compile "$LINENO"; then :
21068  ac_compiler_gnu=yes
21069else
21070  ac_compiler_gnu=no
21071fi
21072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21073ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21074
21075fi
21076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21077$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21078if test $ac_compiler_gnu = yes; then
21079  GOBJC=yes
21080else
21081  GOBJC=
21082fi
21083ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21084ac_save_OBJCFLAGS=$OBJCFLAGS
21085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21086$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21087if ${ac_cv_prog_objc_g+:} false; then :
21088  $as_echo_n "(cached) " >&6
21089else
21090  ac_save_objc_werror_flag=$ac_objc_werror_flag
21091   ac_objc_werror_flag=yes
21092   ac_cv_prog_objc_g=no
21093   OBJCFLAGS="-g"
21094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21095/* end confdefs.h.  */
21096
21097int
21098main ()
21099{
21100
21101  ;
21102  return 0;
21103}
21104_ACEOF
21105if ac_fn_objc_try_compile "$LINENO"; then :
21106  ac_cv_prog_objc_g=yes
21107else
21108  OBJCFLAGS=""
21109      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21110/* end confdefs.h.  */
21111
21112int
21113main ()
21114{
21115
21116  ;
21117  return 0;
21118}
21119_ACEOF
21120if ac_fn_objc_try_compile "$LINENO"; then :
21121
21122else
21123  ac_objc_werror_flag=$ac_save_objc_werror_flag
21124	 OBJCFLAGS="-g"
21125	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21126/* end confdefs.h.  */
21127
21128int
21129main ()
21130{
21131
21132  ;
21133  return 0;
21134}
21135_ACEOF
21136if ac_fn_objc_try_compile "$LINENO"; then :
21137  ac_cv_prog_objc_g=yes
21138fi
21139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21140fi
21141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21142fi
21143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21144   ac_objc_werror_flag=$ac_save_objc_werror_flag
21145fi
21146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21147$as_echo "$ac_cv_prog_objc_g" >&6; }
21148if test "$ac_test_OBJCFLAGS" = set; then
21149  OBJCFLAGS=$ac_save_OBJCFLAGS
21150elif test $ac_cv_prog_objc_g = yes; then
21151  if test "$GOBJC" = yes; then
21152    OBJCFLAGS="-g -O2"
21153  else
21154    OBJCFLAGS="-g"
21155  fi
21156else
21157  if test "$GOBJC" = yes; then
21158    OBJCFLAGS="-O2"
21159  else
21160    OBJCFLAGS=
21161  fi
21162fi
21163ac_ext=cpp
21164ac_cpp='$CXXCPP $CPPFLAGS'
21165ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21166ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21167ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21168
21169
21170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21171
21172  # First separate the path from the arguments. This will split at the first
21173  # space.
21174  complete="$OBJC"
21175  path="${complete%% *}"
21176  tmp="$complete EOL"
21177  arguments="${tmp#* }"
21178
21179  # Input might be given as Windows format, start by converting to
21180  # unix format.
21181  new_path=`$CYGPATH -u "$path"`
21182
21183  # Now try to locate executable using which
21184  new_path=`$WHICH "$new_path" 2> /dev/null`
21185  # bat and cmd files are not always considered executable in cygwin causing which
21186  # to not find them
21187  if test "x$new_path" = x \
21188           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21189           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21190    new_path=`$CYGPATH -u "$path"`
21191  fi
21192  if test "x$new_path" = x; then
21193    # Oops. Which didn't find the executable.
21194    # The splitting of arguments from the executable at a space might have been incorrect,
21195    # since paths with space are more likely in Windows. Give it another try with the whole
21196    # argument.
21197    path="$complete"
21198    arguments="EOL"
21199    new_path=`$CYGPATH -u "$path"`
21200    new_path=`$WHICH "$new_path" 2> /dev/null`
21201    # bat and cmd files are not always considered executable in cygwin causing which
21202    # to not find them
21203    if test "x$new_path" = x \
21204             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21205             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21206      new_path=`$CYGPATH -u "$path"`
21207    fi
21208    if test "x$new_path" = x; then
21209      # It's still not found. Now this is an unrecoverable error.
21210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21211$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21212      has_space=`$ECHO "$complete" | $GREP " "`
21213      if test "x$has_space" != x; then
21214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21216      fi
21217      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21218    fi
21219  fi
21220
21221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21224  # "foo.exe" is OK but "foo" is an error.
21225  #
21226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21227  # It is also a way to make sure we got the proper file name for the real test later on.
21228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21229  if test "x$test_shortpath" = x; then
21230    # Short path failed, file does not exist as specified.
21231    # Try adding .exe or .cmd
21232    if test -f "${new_path}.exe"; then
21233       input_to_shortpath="${new_path}.exe"
21234    elif test -f "${new_path}.cmd"; then
21235       input_to_shortpath="${new_path}.cmd"
21236    else
21237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21238$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21239      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21240$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21241      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21242    fi
21243  else
21244    input_to_shortpath="$new_path"
21245  fi
21246
21247  # Call helper function which possibly converts this using DOS-style short mode.
21248  # If so, the updated path is stored in $new_path.
21249  new_path="$input_to_shortpath"
21250
21251  input_path="$input_to_shortpath"
21252  # Check if we need to convert this using DOS-style short mode. If the path
21253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21254  # take no chances and rewrite it.
21255  # Note: m4 eats our [], so we need to use [ and ] instead.
21256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21257  if test "x$has_forbidden_chars" != x; then
21258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21262      # Going to short mode and back again did indeed matter. Since short mode is
21263      # case insensitive, let's make it lowercase to improve readability.
21264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21265      # Now convert it back to Unix-stile (cygpath)
21266      input_path=`$CYGPATH -u "$shortmode_path"`
21267      new_path="$input_path"
21268    fi
21269  fi
21270
21271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21272  if test "x$test_cygdrive_prefix" = x; then
21273    # As a simple fix, exclude /usr/bin since it's not a real path.
21274    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21276      # a path prefixed by /cygdrive for fixpath to work.
21277      new_path="$CYGWIN_ROOT_PATH$input_path"
21278    fi
21279  fi
21280
21281  # remove trailing .exe if any
21282  new_path="${new_path/%.exe/}"
21283
21284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21285
21286  # First separate the path from the arguments. This will split at the first
21287  # space.
21288  complete="$OBJC"
21289  path="${complete%% *}"
21290  tmp="$complete EOL"
21291  arguments="${tmp#* }"
21292
21293  # Input might be given as Windows format, start by converting to
21294  # unix format.
21295  new_path="$path"
21296
21297  windows_path="$new_path"
21298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21299    unix_path=`$CYGPATH -u "$windows_path"`
21300    new_path="$unix_path"
21301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21303    new_path="$unix_path"
21304  fi
21305
21306
21307  # Now try to locate executable using which
21308  new_path=`$WHICH "$new_path" 2> /dev/null`
21309
21310  if test "x$new_path" = x; then
21311    # Oops. Which didn't find the executable.
21312    # The splitting of arguments from the executable at a space might have been incorrect,
21313    # since paths with space are more likely in Windows. Give it another try with the whole
21314    # argument.
21315    path="$complete"
21316    arguments="EOL"
21317    new_path="$path"
21318
21319  windows_path="$new_path"
21320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21321    unix_path=`$CYGPATH -u "$windows_path"`
21322    new_path="$unix_path"
21323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21325    new_path="$unix_path"
21326  fi
21327
21328
21329    new_path=`$WHICH "$new_path" 2> /dev/null`
21330
21331    if test "x$new_path" = x; then
21332      # It's still not found. Now this is an unrecoverable error.
21333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21334$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21335      has_space=`$ECHO "$complete" | $GREP " "`
21336      if test "x$has_space" != x; then
21337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21339      fi
21340      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21341    fi
21342  fi
21343
21344  # Now new_path has a complete unix path to the binary
21345  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21346    # Keep paths in /bin as-is, but remove trailing .exe if any
21347    new_path="${new_path/%.exe/}"
21348    # Do not save /bin paths to all_fixpath_prefixes!
21349  else
21350    # Not in mixed or Windows style, start by that.
21351    new_path=`cmd //c echo $new_path`
21352
21353  input_path="$new_path"
21354  # Check if we need to convert this using DOS-style short mode. If the path
21355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21356  # take no chances and rewrite it.
21357  # Note: m4 eats our [], so we need to use [ and ] instead.
21358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21359  if test "x$has_forbidden_chars" != x; then
21360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21362  fi
21363
21364    # Output is in $new_path
21365
21366  windows_path="$new_path"
21367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21368    unix_path=`$CYGPATH -u "$windows_path"`
21369    new_path="$unix_path"
21370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21372    new_path="$unix_path"
21373  fi
21374
21375    # remove trailing .exe if any
21376    new_path="${new_path/%.exe/}"
21377
21378    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21379    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21380  fi
21381
21382  else
21383    # We're on a posix platform. Hooray! :)
21384    # First separate the path from the arguments. This will split at the first
21385    # space.
21386    complete="$OBJC"
21387    path="${complete%% *}"
21388    tmp="$complete EOL"
21389    arguments="${tmp#* }"
21390
21391    # Cannot rely on the command "which" here since it doesn't always work.
21392    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21393    if test -z "$is_absolute_path"; then
21394      # Path to executable is not absolute. Find it.
21395      IFS_save="$IFS"
21396      IFS=:
21397      for p in $PATH; do
21398        if test -f "$p/$path" && test -x "$p/$path"; then
21399          new_path="$p/$path"
21400          break
21401        fi
21402      done
21403      IFS="$IFS_save"
21404    else
21405      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21406$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21407      new_path="$path"
21408    fi
21409
21410    if test "x$new_path" = x; then
21411        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21412$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21413        has_space=`$ECHO "$complete" | $GREP " "`
21414        if test "x$has_space" != x; then
21415          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21416$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21417        fi
21418        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21419      fi
21420  fi
21421
21422      # Now join together the path and the arguments once again
21423      if test "x$arguments" != xEOL; then
21424        new_complete="$new_path ${arguments% *}"
21425      else
21426        new_complete="$new_path"
21427      fi
21428
21429  if test "x$complete" != "x$new_complete"; then
21430      OBJC="$new_complete"
21431      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21432$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21433    fi
21434
21435else
21436    OBJC=
21437fi
21438
21439# Restore the flags to the user specified values.
21440# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21441CFLAGS="$ORG_CFLAGS"
21442CXXFLAGS="$ORG_CXXFLAGS"
21443OBJCFLAGS="$ORG_OBJCFLAGS"
21444
21445LD="$CC"
21446LDEXE="$CC"
21447LDCXX="$CXX"
21448LDEXECXX="$CXX"
21449
21450# LDEXE is the linker to use, when creating executables.
21451
21452# Linking C++ libraries.
21453
21454# Linking C++ executables.
21455
21456
21457if test "x$OPENJDK_TARGET_OS" != xwindows; then
21458    if test -n "$ac_tool_prefix"; then
21459  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21460set dummy ${ac_tool_prefix}ar; ac_word=$2
21461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21462$as_echo_n "checking for $ac_word... " >&6; }
21463if ${ac_cv_prog_AR+:} false; then :
21464  $as_echo_n "(cached) " >&6
21465else
21466  if test -n "$AR"; then
21467  ac_cv_prog_AR="$AR" # Let the user override the test.
21468else
21469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21470for as_dir in $PATH
21471do
21472  IFS=$as_save_IFS
21473  test -z "$as_dir" && as_dir=.
21474    for ac_exec_ext in '' $ac_executable_extensions; do
21475  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21476    ac_cv_prog_AR="${ac_tool_prefix}ar"
21477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21478    break 2
21479  fi
21480done
21481  done
21482IFS=$as_save_IFS
21483
21484fi
21485fi
21486AR=$ac_cv_prog_AR
21487if test -n "$AR"; then
21488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21489$as_echo "$AR" >&6; }
21490else
21491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21492$as_echo "no" >&6; }
21493fi
21494
21495
21496fi
21497if test -z "$ac_cv_prog_AR"; then
21498  ac_ct_AR=$AR
21499  # Extract the first word of "ar", so it can be a program name with args.
21500set dummy ar; ac_word=$2
21501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21502$as_echo_n "checking for $ac_word... " >&6; }
21503if ${ac_cv_prog_ac_ct_AR+:} false; then :
21504  $as_echo_n "(cached) " >&6
21505else
21506  if test -n "$ac_ct_AR"; then
21507  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21508else
21509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21510for as_dir in $PATH
21511do
21512  IFS=$as_save_IFS
21513  test -z "$as_dir" && as_dir=.
21514    for ac_exec_ext in '' $ac_executable_extensions; do
21515  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21516    ac_cv_prog_ac_ct_AR="ar"
21517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21518    break 2
21519  fi
21520done
21521  done
21522IFS=$as_save_IFS
21523
21524fi
21525fi
21526ac_ct_AR=$ac_cv_prog_ac_ct_AR
21527if test -n "$ac_ct_AR"; then
21528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21529$as_echo "$ac_ct_AR" >&6; }
21530else
21531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21532$as_echo "no" >&6; }
21533fi
21534
21535  if test "x$ac_ct_AR" = x; then
21536    AR=""
21537  else
21538    case $cross_compiling:$ac_tool_warned in
21539yes:)
21540{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21541$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21542ac_tool_warned=yes ;;
21543esac
21544    AR=$ac_ct_AR
21545  fi
21546else
21547  AR="$ac_cv_prog_AR"
21548fi
21549
21550
21551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21552
21553  # First separate the path from the arguments. This will split at the first
21554  # space.
21555  complete="$AR"
21556  path="${complete%% *}"
21557  tmp="$complete EOL"
21558  arguments="${tmp#* }"
21559
21560  # Input might be given as Windows format, start by converting to
21561  # unix format.
21562  new_path=`$CYGPATH -u "$path"`
21563
21564  # Now try to locate executable using which
21565  new_path=`$WHICH "$new_path" 2> /dev/null`
21566  # bat and cmd files are not always considered executable in cygwin causing which
21567  # to not find them
21568  if test "x$new_path" = x \
21569           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21570           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21571    new_path=`$CYGPATH -u "$path"`
21572  fi
21573  if test "x$new_path" = x; then
21574    # Oops. Which didn't find the executable.
21575    # The splitting of arguments from the executable at a space might have been incorrect,
21576    # since paths with space are more likely in Windows. Give it another try with the whole
21577    # argument.
21578    path="$complete"
21579    arguments="EOL"
21580    new_path=`$CYGPATH -u "$path"`
21581    new_path=`$WHICH "$new_path" 2> /dev/null`
21582    # bat and cmd files are not always considered executable in cygwin causing which
21583    # to not find them
21584    if test "x$new_path" = x \
21585             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21586             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21587      new_path=`$CYGPATH -u "$path"`
21588    fi
21589    if test "x$new_path" = x; then
21590      # It's still not found. Now this is an unrecoverable error.
21591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21592$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21593      has_space=`$ECHO "$complete" | $GREP " "`
21594      if test "x$has_space" != x; then
21595        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21596$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21597      fi
21598      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21599    fi
21600  fi
21601
21602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21605  # "foo.exe" is OK but "foo" is an error.
21606  #
21607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21608  # It is also a way to make sure we got the proper file name for the real test later on.
21609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21610  if test "x$test_shortpath" = x; then
21611    # Short path failed, file does not exist as specified.
21612    # Try adding .exe or .cmd
21613    if test -f "${new_path}.exe"; then
21614       input_to_shortpath="${new_path}.exe"
21615    elif test -f "${new_path}.cmd"; then
21616       input_to_shortpath="${new_path}.cmd"
21617    else
21618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21619$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21620      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21621$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21622      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21623    fi
21624  else
21625    input_to_shortpath="$new_path"
21626  fi
21627
21628  # Call helper function which possibly converts this using DOS-style short mode.
21629  # If so, the updated path is stored in $new_path.
21630  new_path="$input_to_shortpath"
21631
21632  input_path="$input_to_shortpath"
21633  # Check if we need to convert this using DOS-style short mode. If the path
21634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21635  # take no chances and rewrite it.
21636  # Note: m4 eats our [], so we need to use [ and ] instead.
21637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21638  if test "x$has_forbidden_chars" != x; then
21639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21643      # Going to short mode and back again did indeed matter. Since short mode is
21644      # case insensitive, let's make it lowercase to improve readability.
21645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21646      # Now convert it back to Unix-stile (cygpath)
21647      input_path=`$CYGPATH -u "$shortmode_path"`
21648      new_path="$input_path"
21649    fi
21650  fi
21651
21652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21653  if test "x$test_cygdrive_prefix" = x; then
21654    # As a simple fix, exclude /usr/bin since it's not a real path.
21655    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21657      # a path prefixed by /cygdrive for fixpath to work.
21658      new_path="$CYGWIN_ROOT_PATH$input_path"
21659    fi
21660  fi
21661
21662  # remove trailing .exe if any
21663  new_path="${new_path/%.exe/}"
21664
21665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21666
21667  # First separate the path from the arguments. This will split at the first
21668  # space.
21669  complete="$AR"
21670  path="${complete%% *}"
21671  tmp="$complete EOL"
21672  arguments="${tmp#* }"
21673
21674  # Input might be given as Windows format, start by converting to
21675  # unix format.
21676  new_path="$path"
21677
21678  windows_path="$new_path"
21679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21680    unix_path=`$CYGPATH -u "$windows_path"`
21681    new_path="$unix_path"
21682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21684    new_path="$unix_path"
21685  fi
21686
21687
21688  # Now try to locate executable using which
21689  new_path=`$WHICH "$new_path" 2> /dev/null`
21690
21691  if test "x$new_path" = x; then
21692    # Oops. Which didn't find the executable.
21693    # The splitting of arguments from the executable at a space might have been incorrect,
21694    # since paths with space are more likely in Windows. Give it another try with the whole
21695    # argument.
21696    path="$complete"
21697    arguments="EOL"
21698    new_path="$path"
21699
21700  windows_path="$new_path"
21701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21702    unix_path=`$CYGPATH -u "$windows_path"`
21703    new_path="$unix_path"
21704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21706    new_path="$unix_path"
21707  fi
21708
21709
21710    new_path=`$WHICH "$new_path" 2> /dev/null`
21711
21712    if test "x$new_path" = x; then
21713      # It's still not found. Now this is an unrecoverable error.
21714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21715$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21716      has_space=`$ECHO "$complete" | $GREP " "`
21717      if test "x$has_space" != x; then
21718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21720      fi
21721      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21722    fi
21723  fi
21724
21725  # Now new_path has a complete unix path to the binary
21726  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21727    # Keep paths in /bin as-is, but remove trailing .exe if any
21728    new_path="${new_path/%.exe/}"
21729    # Do not save /bin paths to all_fixpath_prefixes!
21730  else
21731    # Not in mixed or Windows style, start by that.
21732    new_path=`cmd //c echo $new_path`
21733
21734  input_path="$new_path"
21735  # Check if we need to convert this using DOS-style short mode. If the path
21736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21737  # take no chances and rewrite it.
21738  # Note: m4 eats our [], so we need to use [ and ] instead.
21739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21740  if test "x$has_forbidden_chars" != x; then
21741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21743  fi
21744
21745    # Output is in $new_path
21746
21747  windows_path="$new_path"
21748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21749    unix_path=`$CYGPATH -u "$windows_path"`
21750    new_path="$unix_path"
21751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21753    new_path="$unix_path"
21754  fi
21755
21756    # remove trailing .exe if any
21757    new_path="${new_path/%.exe/}"
21758
21759    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21760    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21761  fi
21762
21763  else
21764    # We're on a posix platform. Hooray! :)
21765    # First separate the path from the arguments. This will split at the first
21766    # space.
21767    complete="$AR"
21768    path="${complete%% *}"
21769    tmp="$complete EOL"
21770    arguments="${tmp#* }"
21771
21772    # Cannot rely on the command "which" here since it doesn't always work.
21773    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21774    if test -z "$is_absolute_path"; then
21775      # Path to executable is not absolute. Find it.
21776      IFS_save="$IFS"
21777      IFS=:
21778      for p in $PATH; do
21779        if test -f "$p/$path" && test -x "$p/$path"; then
21780          new_path="$p/$path"
21781          break
21782        fi
21783      done
21784      IFS="$IFS_save"
21785    else
21786      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21787$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21788      new_path="$path"
21789    fi
21790
21791    if test "x$new_path" = x; then
21792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21793$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21794        has_space=`$ECHO "$complete" | $GREP " "`
21795        if test "x$has_space" != x; then
21796          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21797$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21798        fi
21799        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21800      fi
21801  fi
21802
21803      # Now join together the path and the arguments once again
21804      if test "x$arguments" != xEOL; then
21805        new_complete="$new_path ${arguments% *}"
21806      else
21807        new_complete="$new_path"
21808      fi
21809
21810  if test "x$complete" != "x$new_complete"; then
21811      AR="$new_complete"
21812      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21813$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21814    fi
21815
21816fi
21817if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21818    ARFLAGS="-r"
21819else
21820    ARFLAGS=""
21821fi
21822
21823
21824# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21825HOTSPOT_CXX="$CXX"
21826HOTSPOT_LD="$LD"
21827
21828
21829
21830COMPILER_NAME=gcc
21831COMPILER_TYPE=CC
21832if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21833
21834    # For now, assume that we are always compiling using cl.exe.
21835    CC_OUT_OPTION=-Fo
21836    EXE_OUT_OPTION=-out:
21837    LD_OUT_OPTION=-out:
21838    AR_OUT_OPTION=-out:
21839    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21840    # program for something completely different.
21841    # Extract the first word of "link", so it can be a program name with args.
21842set dummy link; ac_word=$2
21843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21844$as_echo_n "checking for $ac_word... " >&6; }
21845if ${ac_cv_prog_WINLD+:} false; then :
21846  $as_echo_n "(cached) " >&6
21847else
21848  if test -n "$WINLD"; then
21849  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21850else
21851  ac_prog_rejected=no
21852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21853for as_dir in $PATH
21854do
21855  IFS=$as_save_IFS
21856  test -z "$as_dir" && as_dir=.
21857    for ac_exec_ext in '' $ac_executable_extensions; do
21858  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21859    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21860       ac_prog_rejected=yes
21861       continue
21862     fi
21863    ac_cv_prog_WINLD="link"
21864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21865    break 2
21866  fi
21867done
21868  done
21869IFS=$as_save_IFS
21870
21871if test $ac_prog_rejected = yes; then
21872  # We found a bogon in the path, so make sure we never use it.
21873  set dummy $ac_cv_prog_WINLD
21874  shift
21875  if test $# != 0; then
21876    # We chose a different compiler from the bogus one.
21877    # However, it has the same basename, so the bogon will be chosen
21878    # first if we set WINLD to just the basename; use the full file name.
21879    shift
21880    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21881  fi
21882fi
21883fi
21884fi
21885WINLD=$ac_cv_prog_WINLD
21886if test -n "$WINLD"; then
21887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21888$as_echo "$WINLD" >&6; }
21889else
21890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21891$as_echo "no" >&6; }
21892fi
21893
21894
21895    # Since we must ignore the first found link, WINLD will contain
21896    # the full path to the link.exe program.
21897
21898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21899
21900  # First separate the path from the arguments. This will split at the first
21901  # space.
21902  complete="$WINLD"
21903  path="${complete%% *}"
21904  tmp="$complete EOL"
21905  arguments="${tmp#* }"
21906
21907  # Input might be given as Windows format, start by converting to
21908  # unix format.
21909  new_path=`$CYGPATH -u "$path"`
21910
21911  # Now try to locate executable using which
21912  new_path=`$WHICH "$new_path" 2> /dev/null`
21913  # bat and cmd files are not always considered executable in cygwin causing which
21914  # to not find them
21915  if test "x$new_path" = x \
21916           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21917           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21918    new_path=`$CYGPATH -u "$path"`
21919  fi
21920  if test "x$new_path" = x; then
21921    # Oops. Which didn't find the executable.
21922    # The splitting of arguments from the executable at a space might have been incorrect,
21923    # since paths with space are more likely in Windows. Give it another try with the whole
21924    # argument.
21925    path="$complete"
21926    arguments="EOL"
21927    new_path=`$CYGPATH -u "$path"`
21928    new_path=`$WHICH "$new_path" 2> /dev/null`
21929    # bat and cmd files are not always considered executable in cygwin causing which
21930    # to not find them
21931    if test "x$new_path" = x \
21932             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21933             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21934      new_path=`$CYGPATH -u "$path"`
21935    fi
21936    if test "x$new_path" = x; then
21937      # It's still not found. Now this is an unrecoverable error.
21938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21939$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21940      has_space=`$ECHO "$complete" | $GREP " "`
21941      if test "x$has_space" != x; then
21942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21944      fi
21945      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21946    fi
21947  fi
21948
21949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21952  # "foo.exe" is OK but "foo" is an error.
21953  #
21954  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21955  # It is also a way to make sure we got the proper file name for the real test later on.
21956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21957  if test "x$test_shortpath" = x; then
21958    # Short path failed, file does not exist as specified.
21959    # Try adding .exe or .cmd
21960    if test -f "${new_path}.exe"; then
21961       input_to_shortpath="${new_path}.exe"
21962    elif test -f "${new_path}.cmd"; then
21963       input_to_shortpath="${new_path}.cmd"
21964    else
21965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21966$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21967      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21968$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21969      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21970    fi
21971  else
21972    input_to_shortpath="$new_path"
21973  fi
21974
21975  # Call helper function which possibly converts this using DOS-style short mode.
21976  # If so, the updated path is stored in $new_path.
21977  new_path="$input_to_shortpath"
21978
21979  input_path="$input_to_shortpath"
21980  # Check if we need to convert this using DOS-style short mode. If the path
21981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21982  # take no chances and rewrite it.
21983  # Note: m4 eats our [], so we need to use [ and ] instead.
21984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21985  if test "x$has_forbidden_chars" != x; then
21986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21990      # Going to short mode and back again did indeed matter. Since short mode is
21991      # case insensitive, let's make it lowercase to improve readability.
21992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21993      # Now convert it back to Unix-stile (cygpath)
21994      input_path=`$CYGPATH -u "$shortmode_path"`
21995      new_path="$input_path"
21996    fi
21997  fi
21998
21999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22000  if test "x$test_cygdrive_prefix" = x; then
22001    # As a simple fix, exclude /usr/bin since it's not a real path.
22002    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22004      # a path prefixed by /cygdrive for fixpath to work.
22005      new_path="$CYGWIN_ROOT_PATH$input_path"
22006    fi
22007  fi
22008
22009  # remove trailing .exe if any
22010  new_path="${new_path/%.exe/}"
22011
22012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22013
22014  # First separate the path from the arguments. This will split at the first
22015  # space.
22016  complete="$WINLD"
22017  path="${complete%% *}"
22018  tmp="$complete EOL"
22019  arguments="${tmp#* }"
22020
22021  # Input might be given as Windows format, start by converting to
22022  # unix format.
22023  new_path="$path"
22024
22025  windows_path="$new_path"
22026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22027    unix_path=`$CYGPATH -u "$windows_path"`
22028    new_path="$unix_path"
22029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22031    new_path="$unix_path"
22032  fi
22033
22034
22035  # Now try to locate executable using which
22036  new_path=`$WHICH "$new_path" 2> /dev/null`
22037
22038  if test "x$new_path" = x; then
22039    # Oops. Which didn't find the executable.
22040    # The splitting of arguments from the executable at a space might have been incorrect,
22041    # since paths with space are more likely in Windows. Give it another try with the whole
22042    # argument.
22043    path="$complete"
22044    arguments="EOL"
22045    new_path="$path"
22046
22047  windows_path="$new_path"
22048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22049    unix_path=`$CYGPATH -u "$windows_path"`
22050    new_path="$unix_path"
22051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22053    new_path="$unix_path"
22054  fi
22055
22056
22057    new_path=`$WHICH "$new_path" 2> /dev/null`
22058
22059    if test "x$new_path" = x; then
22060      # It's still not found. Now this is an unrecoverable error.
22061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22062$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22063      has_space=`$ECHO "$complete" | $GREP " "`
22064      if test "x$has_space" != x; then
22065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22067      fi
22068      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22069    fi
22070  fi
22071
22072  # Now new_path has a complete unix path to the binary
22073  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22074    # Keep paths in /bin as-is, but remove trailing .exe if any
22075    new_path="${new_path/%.exe/}"
22076    # Do not save /bin paths to all_fixpath_prefixes!
22077  else
22078    # Not in mixed or Windows style, start by that.
22079    new_path=`cmd //c echo $new_path`
22080
22081  input_path="$new_path"
22082  # Check if we need to convert this using DOS-style short mode. If the path
22083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22084  # take no chances and rewrite it.
22085  # Note: m4 eats our [], so we need to use [ and ] instead.
22086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22087  if test "x$has_forbidden_chars" != x; then
22088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22090  fi
22091
22092    # Output is in $new_path
22093
22094  windows_path="$new_path"
22095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22096    unix_path=`$CYGPATH -u "$windows_path"`
22097    new_path="$unix_path"
22098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22100    new_path="$unix_path"
22101  fi
22102
22103    # remove trailing .exe if any
22104    new_path="${new_path/%.exe/}"
22105
22106    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22107    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22108  fi
22109
22110  else
22111    # We're on a posix platform. Hooray! :)
22112    # First separate the path from the arguments. This will split at the first
22113    # space.
22114    complete="$WINLD"
22115    path="${complete%% *}"
22116    tmp="$complete EOL"
22117    arguments="${tmp#* }"
22118
22119    # Cannot rely on the command "which" here since it doesn't always work.
22120    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22121    if test -z "$is_absolute_path"; then
22122      # Path to executable is not absolute. Find it.
22123      IFS_save="$IFS"
22124      IFS=:
22125      for p in $PATH; do
22126        if test -f "$p/$path" && test -x "$p/$path"; then
22127          new_path="$p/$path"
22128          break
22129        fi
22130      done
22131      IFS="$IFS_save"
22132    else
22133      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22134$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22135      new_path="$path"
22136    fi
22137
22138    if test "x$new_path" = x; then
22139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22140$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22141        has_space=`$ECHO "$complete" | $GREP " "`
22142        if test "x$has_space" != x; then
22143          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22144$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22145        fi
22146        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22147      fi
22148  fi
22149
22150      # Now join together the path and the arguments once again
22151      if test "x$arguments" != xEOL; then
22152        new_complete="$new_path ${arguments% *}"
22153      else
22154        new_complete="$new_path"
22155      fi
22156
22157  if test "x$complete" != "x$new_complete"; then
22158      WINLD="$new_complete"
22159      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22160$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22161    fi
22162
22163    printf "Windows linker was found at $WINLD\n"
22164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22165$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22166    "$WINLD" --version > /dev/null
22167    if test $? -eq 0 ; then
22168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22169$as_echo "no" >&6; }
22170      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22171    else
22172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22173$as_echo "yes" >&6; }
22174    fi
22175    LD="$WINLD"
22176    LDEXE="$WINLD"
22177    LDCXX="$WINLD"
22178    LDEXECXX="$WINLD"
22179
22180    # Extract the first word of "mt", so it can be a program name with args.
22181set dummy mt; ac_word=$2
22182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22183$as_echo_n "checking for $ac_word... " >&6; }
22184if ${ac_cv_prog_MT+:} false; then :
22185  $as_echo_n "(cached) " >&6
22186else
22187  if test -n "$MT"; then
22188  ac_cv_prog_MT="$MT" # Let the user override the test.
22189else
22190  ac_prog_rejected=no
22191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22192for as_dir in $PATH
22193do
22194  IFS=$as_save_IFS
22195  test -z "$as_dir" && as_dir=.
22196    for ac_exec_ext in '' $ac_executable_extensions; do
22197  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22198    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22199       ac_prog_rejected=yes
22200       continue
22201     fi
22202    ac_cv_prog_MT="mt"
22203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22204    break 2
22205  fi
22206done
22207  done
22208IFS=$as_save_IFS
22209
22210if test $ac_prog_rejected = yes; then
22211  # We found a bogon in the path, so make sure we never use it.
22212  set dummy $ac_cv_prog_MT
22213  shift
22214  if test $# != 0; then
22215    # We chose a different compiler from the bogus one.
22216    # However, it has the same basename, so the bogon will be chosen
22217    # first if we set MT to just the basename; use the full file name.
22218    shift
22219    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22220  fi
22221fi
22222fi
22223fi
22224MT=$ac_cv_prog_MT
22225if test -n "$MT"; then
22226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22227$as_echo "$MT" >&6; }
22228else
22229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22230$as_echo "no" >&6; }
22231fi
22232
22233
22234
22235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22236
22237  # First separate the path from the arguments. This will split at the first
22238  # space.
22239  complete="$MT"
22240  path="${complete%% *}"
22241  tmp="$complete EOL"
22242  arguments="${tmp#* }"
22243
22244  # Input might be given as Windows format, start by converting to
22245  # unix format.
22246  new_path=`$CYGPATH -u "$path"`
22247
22248  # Now try to locate executable using which
22249  new_path=`$WHICH "$new_path" 2> /dev/null`
22250  # bat and cmd files are not always considered executable in cygwin causing which
22251  # to not find them
22252  if test "x$new_path" = x \
22253           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22254           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22255    new_path=`$CYGPATH -u "$path"`
22256  fi
22257  if test "x$new_path" = x; then
22258    # Oops. Which didn't find the executable.
22259    # The splitting of arguments from the executable at a space might have been incorrect,
22260    # since paths with space are more likely in Windows. Give it another try with the whole
22261    # argument.
22262    path="$complete"
22263    arguments="EOL"
22264    new_path=`$CYGPATH -u "$path"`
22265    new_path=`$WHICH "$new_path" 2> /dev/null`
22266    # bat and cmd files are not always considered executable in cygwin causing which
22267    # to not find them
22268    if test "x$new_path" = x \
22269             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22270             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22271      new_path=`$CYGPATH -u "$path"`
22272    fi
22273    if test "x$new_path" = x; then
22274      # It's still not found. Now this is an unrecoverable error.
22275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22276$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22277      has_space=`$ECHO "$complete" | $GREP " "`
22278      if test "x$has_space" != x; then
22279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22281      fi
22282      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22283    fi
22284  fi
22285
22286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22289  # "foo.exe" is OK but "foo" is an error.
22290  #
22291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22292  # It is also a way to make sure we got the proper file name for the real test later on.
22293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22294  if test "x$test_shortpath" = x; then
22295    # Short path failed, file does not exist as specified.
22296    # Try adding .exe or .cmd
22297    if test -f "${new_path}.exe"; then
22298       input_to_shortpath="${new_path}.exe"
22299    elif test -f "${new_path}.cmd"; then
22300       input_to_shortpath="${new_path}.cmd"
22301    else
22302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22303$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22306      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22307    fi
22308  else
22309    input_to_shortpath="$new_path"
22310  fi
22311
22312  # Call helper function which possibly converts this using DOS-style short mode.
22313  # If so, the updated path is stored in $new_path.
22314  new_path="$input_to_shortpath"
22315
22316  input_path="$input_to_shortpath"
22317  # Check if we need to convert this using DOS-style short mode. If the path
22318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22319  # take no chances and rewrite it.
22320  # Note: m4 eats our [], so we need to use [ and ] instead.
22321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22322  if test "x$has_forbidden_chars" != x; then
22323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22327      # Going to short mode and back again did indeed matter. Since short mode is
22328      # case insensitive, let's make it lowercase to improve readability.
22329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22330      # Now convert it back to Unix-stile (cygpath)
22331      input_path=`$CYGPATH -u "$shortmode_path"`
22332      new_path="$input_path"
22333    fi
22334  fi
22335
22336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22337  if test "x$test_cygdrive_prefix" = x; then
22338    # As a simple fix, exclude /usr/bin since it's not a real path.
22339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22341      # a path prefixed by /cygdrive for fixpath to work.
22342      new_path="$CYGWIN_ROOT_PATH$input_path"
22343    fi
22344  fi
22345
22346  # remove trailing .exe if any
22347  new_path="${new_path/%.exe/}"
22348
22349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22350
22351  # First separate the path from the arguments. This will split at the first
22352  # space.
22353  complete="$MT"
22354  path="${complete%% *}"
22355  tmp="$complete EOL"
22356  arguments="${tmp#* }"
22357
22358  # Input might be given as Windows format, start by converting to
22359  # unix format.
22360  new_path="$path"
22361
22362  windows_path="$new_path"
22363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22364    unix_path=`$CYGPATH -u "$windows_path"`
22365    new_path="$unix_path"
22366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22368    new_path="$unix_path"
22369  fi
22370
22371
22372  # Now try to locate executable using which
22373  new_path=`$WHICH "$new_path" 2> /dev/null`
22374
22375  if test "x$new_path" = x; then
22376    # Oops. Which didn't find the executable.
22377    # The splitting of arguments from the executable at a space might have been incorrect,
22378    # since paths with space are more likely in Windows. Give it another try with the whole
22379    # argument.
22380    path="$complete"
22381    arguments="EOL"
22382    new_path="$path"
22383
22384  windows_path="$new_path"
22385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22386    unix_path=`$CYGPATH -u "$windows_path"`
22387    new_path="$unix_path"
22388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22390    new_path="$unix_path"
22391  fi
22392
22393
22394    new_path=`$WHICH "$new_path" 2> /dev/null`
22395
22396    if test "x$new_path" = x; then
22397      # It's still not found. Now this is an unrecoverable error.
22398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22399$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22400      has_space=`$ECHO "$complete" | $GREP " "`
22401      if test "x$has_space" != x; then
22402        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22403$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22404      fi
22405      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22406    fi
22407  fi
22408
22409  # Now new_path has a complete unix path to the binary
22410  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22411    # Keep paths in /bin as-is, but remove trailing .exe if any
22412    new_path="${new_path/%.exe/}"
22413    # Do not save /bin paths to all_fixpath_prefixes!
22414  else
22415    # Not in mixed or Windows style, start by that.
22416    new_path=`cmd //c echo $new_path`
22417
22418  input_path="$new_path"
22419  # Check if we need to convert this using DOS-style short mode. If the path
22420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22421  # take no chances and rewrite it.
22422  # Note: m4 eats our [], so we need to use [ and ] instead.
22423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22424  if test "x$has_forbidden_chars" != x; then
22425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22427  fi
22428
22429    # Output is in $new_path
22430
22431  windows_path="$new_path"
22432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22433    unix_path=`$CYGPATH -u "$windows_path"`
22434    new_path="$unix_path"
22435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22437    new_path="$unix_path"
22438  fi
22439
22440    # remove trailing .exe if any
22441    new_path="${new_path/%.exe/}"
22442
22443    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22444    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22445  fi
22446
22447  else
22448    # We're on a posix platform. Hooray! :)
22449    # First separate the path from the arguments. This will split at the first
22450    # space.
22451    complete="$MT"
22452    path="${complete%% *}"
22453    tmp="$complete EOL"
22454    arguments="${tmp#* }"
22455
22456    # Cannot rely on the command "which" here since it doesn't always work.
22457    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22458    if test -z "$is_absolute_path"; then
22459      # Path to executable is not absolute. Find it.
22460      IFS_save="$IFS"
22461      IFS=:
22462      for p in $PATH; do
22463        if test -f "$p/$path" && test -x "$p/$path"; then
22464          new_path="$p/$path"
22465          break
22466        fi
22467      done
22468      IFS="$IFS_save"
22469    else
22470      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22471$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22472      new_path="$path"
22473    fi
22474
22475    if test "x$new_path" = x; then
22476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22477$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22478        has_space=`$ECHO "$complete" | $GREP " "`
22479        if test "x$has_space" != x; then
22480          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22481$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22482        fi
22483        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22484      fi
22485  fi
22486
22487      # Now join together the path and the arguments once again
22488      if test "x$arguments" != xEOL; then
22489        new_complete="$new_path ${arguments% *}"
22490      else
22491        new_complete="$new_path"
22492      fi
22493
22494  if test "x$complete" != "x$new_complete"; then
22495      MT="$new_complete"
22496      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22497$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22498    fi
22499
22500    # The resource compiler
22501    # Extract the first word of "rc", so it can be a program name with args.
22502set dummy rc; ac_word=$2
22503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22504$as_echo_n "checking for $ac_word... " >&6; }
22505if ${ac_cv_prog_RC+:} false; then :
22506  $as_echo_n "(cached) " >&6
22507else
22508  if test -n "$RC"; then
22509  ac_cv_prog_RC="$RC" # Let the user override the test.
22510else
22511  ac_prog_rejected=no
22512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22513for as_dir in $PATH
22514do
22515  IFS=$as_save_IFS
22516  test -z "$as_dir" && as_dir=.
22517    for ac_exec_ext in '' $ac_executable_extensions; do
22518  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22519    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22520       ac_prog_rejected=yes
22521       continue
22522     fi
22523    ac_cv_prog_RC="rc"
22524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22525    break 2
22526  fi
22527done
22528  done
22529IFS=$as_save_IFS
22530
22531if test $ac_prog_rejected = yes; then
22532  # We found a bogon in the path, so make sure we never use it.
22533  set dummy $ac_cv_prog_RC
22534  shift
22535  if test $# != 0; then
22536    # We chose a different compiler from the bogus one.
22537    # However, it has the same basename, so the bogon will be chosen
22538    # first if we set RC to just the basename; use the full file name.
22539    shift
22540    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22541  fi
22542fi
22543fi
22544fi
22545RC=$ac_cv_prog_RC
22546if test -n "$RC"; then
22547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22548$as_echo "$RC" >&6; }
22549else
22550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22551$as_echo "no" >&6; }
22552fi
22553
22554
22555
22556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22557
22558  # First separate the path from the arguments. This will split at the first
22559  # space.
22560  complete="$RC"
22561  path="${complete%% *}"
22562  tmp="$complete EOL"
22563  arguments="${tmp#* }"
22564
22565  # Input might be given as Windows format, start by converting to
22566  # unix format.
22567  new_path=`$CYGPATH -u "$path"`
22568
22569  # Now try to locate executable using which
22570  new_path=`$WHICH "$new_path" 2> /dev/null`
22571  # bat and cmd files are not always considered executable in cygwin causing which
22572  # to not find them
22573  if test "x$new_path" = x \
22574           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22575           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22576    new_path=`$CYGPATH -u "$path"`
22577  fi
22578  if test "x$new_path" = x; then
22579    # Oops. Which didn't find the executable.
22580    # The splitting of arguments from the executable at a space might have been incorrect,
22581    # since paths with space are more likely in Windows. Give it another try with the whole
22582    # argument.
22583    path="$complete"
22584    arguments="EOL"
22585    new_path=`$CYGPATH -u "$path"`
22586    new_path=`$WHICH "$new_path" 2> /dev/null`
22587    # bat and cmd files are not always considered executable in cygwin causing which
22588    # to not find them
22589    if test "x$new_path" = x \
22590             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22591             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22592      new_path=`$CYGPATH -u "$path"`
22593    fi
22594    if test "x$new_path" = x; then
22595      # It's still not found. Now this is an unrecoverable error.
22596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22597$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22598      has_space=`$ECHO "$complete" | $GREP " "`
22599      if test "x$has_space" != x; then
22600        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22601$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22602      fi
22603      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22604    fi
22605  fi
22606
22607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22610  # "foo.exe" is OK but "foo" is an error.
22611  #
22612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22613  # It is also a way to make sure we got the proper file name for the real test later on.
22614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22615  if test "x$test_shortpath" = x; then
22616    # Short path failed, file does not exist as specified.
22617    # Try adding .exe or .cmd
22618    if test -f "${new_path}.exe"; then
22619       input_to_shortpath="${new_path}.exe"
22620    elif test -f "${new_path}.cmd"; then
22621       input_to_shortpath="${new_path}.cmd"
22622    else
22623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22624$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22625      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22626$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22627      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22628    fi
22629  else
22630    input_to_shortpath="$new_path"
22631  fi
22632
22633  # Call helper function which possibly converts this using DOS-style short mode.
22634  # If so, the updated path is stored in $new_path.
22635  new_path="$input_to_shortpath"
22636
22637  input_path="$input_to_shortpath"
22638  # Check if we need to convert this using DOS-style short mode. If the path
22639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22640  # take no chances and rewrite it.
22641  # Note: m4 eats our [], so we need to use [ and ] instead.
22642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22643  if test "x$has_forbidden_chars" != x; then
22644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22648      # Going to short mode and back again did indeed matter. Since short mode is
22649      # case insensitive, let's make it lowercase to improve readability.
22650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22651      # Now convert it back to Unix-stile (cygpath)
22652      input_path=`$CYGPATH -u "$shortmode_path"`
22653      new_path="$input_path"
22654    fi
22655  fi
22656
22657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22658  if test "x$test_cygdrive_prefix" = x; then
22659    # As a simple fix, exclude /usr/bin since it's not a real path.
22660    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22662      # a path prefixed by /cygdrive for fixpath to work.
22663      new_path="$CYGWIN_ROOT_PATH$input_path"
22664    fi
22665  fi
22666
22667  # remove trailing .exe if any
22668  new_path="${new_path/%.exe/}"
22669
22670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22671
22672  # First separate the path from the arguments. This will split at the first
22673  # space.
22674  complete="$RC"
22675  path="${complete%% *}"
22676  tmp="$complete EOL"
22677  arguments="${tmp#* }"
22678
22679  # Input might be given as Windows format, start by converting to
22680  # unix format.
22681  new_path="$path"
22682
22683  windows_path="$new_path"
22684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22685    unix_path=`$CYGPATH -u "$windows_path"`
22686    new_path="$unix_path"
22687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22689    new_path="$unix_path"
22690  fi
22691
22692
22693  # Now try to locate executable using which
22694  new_path=`$WHICH "$new_path" 2> /dev/null`
22695
22696  if test "x$new_path" = x; then
22697    # Oops. Which didn't find the executable.
22698    # The splitting of arguments from the executable at a space might have been incorrect,
22699    # since paths with space are more likely in Windows. Give it another try with the whole
22700    # argument.
22701    path="$complete"
22702    arguments="EOL"
22703    new_path="$path"
22704
22705  windows_path="$new_path"
22706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22707    unix_path=`$CYGPATH -u "$windows_path"`
22708    new_path="$unix_path"
22709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22711    new_path="$unix_path"
22712  fi
22713
22714
22715    new_path=`$WHICH "$new_path" 2> /dev/null`
22716
22717    if test "x$new_path" = x; then
22718      # It's still not found. Now this is an unrecoverable error.
22719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22720$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22721      has_space=`$ECHO "$complete" | $GREP " "`
22722      if test "x$has_space" != x; then
22723        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22724$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22725      fi
22726      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22727    fi
22728  fi
22729
22730  # Now new_path has a complete unix path to the binary
22731  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22732    # Keep paths in /bin as-is, but remove trailing .exe if any
22733    new_path="${new_path/%.exe/}"
22734    # Do not save /bin paths to all_fixpath_prefixes!
22735  else
22736    # Not in mixed or Windows style, start by that.
22737    new_path=`cmd //c echo $new_path`
22738
22739  input_path="$new_path"
22740  # Check if we need to convert this using DOS-style short mode. If the path
22741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22742  # take no chances and rewrite it.
22743  # Note: m4 eats our [], so we need to use [ and ] instead.
22744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22745  if test "x$has_forbidden_chars" != x; then
22746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22748  fi
22749
22750    # Output is in $new_path
22751
22752  windows_path="$new_path"
22753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22754    unix_path=`$CYGPATH -u "$windows_path"`
22755    new_path="$unix_path"
22756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22758    new_path="$unix_path"
22759  fi
22760
22761    # remove trailing .exe if any
22762    new_path="${new_path/%.exe/}"
22763
22764    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22765    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22766  fi
22767
22768  else
22769    # We're on a posix platform. Hooray! :)
22770    # First separate the path from the arguments. This will split at the first
22771    # space.
22772    complete="$RC"
22773    path="${complete%% *}"
22774    tmp="$complete EOL"
22775    arguments="${tmp#* }"
22776
22777    # Cannot rely on the command "which" here since it doesn't always work.
22778    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22779    if test -z "$is_absolute_path"; then
22780      # Path to executable is not absolute. Find it.
22781      IFS_save="$IFS"
22782      IFS=:
22783      for p in $PATH; do
22784        if test -f "$p/$path" && test -x "$p/$path"; then
22785          new_path="$p/$path"
22786          break
22787        fi
22788      done
22789      IFS="$IFS_save"
22790    else
22791      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22792$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22793      new_path="$path"
22794    fi
22795
22796    if test "x$new_path" = x; then
22797        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22798$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22799        has_space=`$ECHO "$complete" | $GREP " "`
22800        if test "x$has_space" != x; then
22801          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22802$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22803        fi
22804        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22805      fi
22806  fi
22807
22808      # Now join together the path and the arguments once again
22809      if test "x$arguments" != xEOL; then
22810        new_complete="$new_path ${arguments% *}"
22811      else
22812        new_complete="$new_path"
22813      fi
22814
22815  if test "x$complete" != "x$new_complete"; then
22816      RC="$new_complete"
22817      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22818$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22819    fi
22820
22821
22822    # For hotspot, we need these in Windows mixed path,
22823    # so rewrite them all. Need added .exe suffix.
22824    HOTSPOT_CXX="$CXX.exe"
22825    HOTSPOT_LD="$LD.exe"
22826    HOTSPOT_MT="$MT.exe"
22827    HOTSPOT_RC="$RC.exe"
22828
22829  unix_path="$HOTSPOT_CXX"
22830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22831    windows_path=`$CYGPATH -m "$unix_path"`
22832    HOTSPOT_CXX="$windows_path"
22833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22834    windows_path=`cmd //c echo $unix_path`
22835    HOTSPOT_CXX="$windows_path"
22836  fi
22837
22838
22839  unix_path="$HOTSPOT_LD"
22840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22841    windows_path=`$CYGPATH -m "$unix_path"`
22842    HOTSPOT_LD="$windows_path"
22843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22844    windows_path=`cmd //c echo $unix_path`
22845    HOTSPOT_LD="$windows_path"
22846  fi
22847
22848
22849  unix_path="$HOTSPOT_MT"
22850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22851    windows_path=`$CYGPATH -m "$unix_path"`
22852    HOTSPOT_MT="$windows_path"
22853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22854    windows_path=`cmd //c echo $unix_path`
22855    HOTSPOT_MT="$windows_path"
22856  fi
22857
22858
22859  unix_path="$HOTSPOT_RC"
22860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22861    windows_path=`$CYGPATH -m "$unix_path"`
22862    HOTSPOT_RC="$windows_path"
22863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22864    windows_path=`cmd //c echo $unix_path`
22865    HOTSPOT_RC="$windows_path"
22866  fi
22867
22868
22869
22870
22871    RC_FLAGS="-nologo -l 0x409 -r"
22872    if test "x$VARIANT" = xOPT; then :
22873
22874        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22875
22876fi
22877    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22878    if test "x$JDK_UPDATE_VERSION" = x; then :
22879
22880        JDK_UPDATE_VERSION_NOTNULL=0
22881
22882fi
22883    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22884    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22885    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22886    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22887    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22888    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22889    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22890
22891    # lib.exe is used to create static libraries.
22892    # Extract the first word of "lib", so it can be a program name with args.
22893set dummy lib; ac_word=$2
22894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22895$as_echo_n "checking for $ac_word... " >&6; }
22896if ${ac_cv_prog_WINAR+:} false; then :
22897  $as_echo_n "(cached) " >&6
22898else
22899  if test -n "$WINAR"; then
22900  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22901else
22902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22903for as_dir in $PATH
22904do
22905  IFS=$as_save_IFS
22906  test -z "$as_dir" && as_dir=.
22907    for ac_exec_ext in '' $ac_executable_extensions; do
22908  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22909    ac_cv_prog_WINAR="lib"
22910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22911    break 2
22912  fi
22913done
22914  done
22915IFS=$as_save_IFS
22916
22917fi
22918fi
22919WINAR=$ac_cv_prog_WINAR
22920if test -n "$WINAR"; then
22921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22922$as_echo "$WINAR" >&6; }
22923else
22924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22925$as_echo "no" >&6; }
22926fi
22927
22928
22929
22930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22931
22932  # First separate the path from the arguments. This will split at the first
22933  # space.
22934  complete="$WINAR"
22935  path="${complete%% *}"
22936  tmp="$complete EOL"
22937  arguments="${tmp#* }"
22938
22939  # Input might be given as Windows format, start by converting to
22940  # unix format.
22941  new_path=`$CYGPATH -u "$path"`
22942
22943  # Now try to locate executable using which
22944  new_path=`$WHICH "$new_path" 2> /dev/null`
22945  # bat and cmd files are not always considered executable in cygwin causing which
22946  # to not find them
22947  if test "x$new_path" = x \
22948           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22949           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22950    new_path=`$CYGPATH -u "$path"`
22951  fi
22952  if test "x$new_path" = x; then
22953    # Oops. Which didn't find the executable.
22954    # The splitting of arguments from the executable at a space might have been incorrect,
22955    # since paths with space are more likely in Windows. Give it another try with the whole
22956    # argument.
22957    path="$complete"
22958    arguments="EOL"
22959    new_path=`$CYGPATH -u "$path"`
22960    new_path=`$WHICH "$new_path" 2> /dev/null`
22961    # bat and cmd files are not always considered executable in cygwin causing which
22962    # to not find them
22963    if test "x$new_path" = x \
22964             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22965             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22966      new_path=`$CYGPATH -u "$path"`
22967    fi
22968    if test "x$new_path" = x; then
22969      # It's still not found. Now this is an unrecoverable error.
22970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22971$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22972      has_space=`$ECHO "$complete" | $GREP " "`
22973      if test "x$has_space" != x; then
22974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22976      fi
22977      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22978    fi
22979  fi
22980
22981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22984  # "foo.exe" is OK but "foo" is an error.
22985  #
22986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22987  # It is also a way to make sure we got the proper file name for the real test later on.
22988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22989  if test "x$test_shortpath" = x; then
22990    # Short path failed, file does not exist as specified.
22991    # Try adding .exe or .cmd
22992    if test -f "${new_path}.exe"; then
22993       input_to_shortpath="${new_path}.exe"
22994    elif test -f "${new_path}.cmd"; then
22995       input_to_shortpath="${new_path}.cmd"
22996    else
22997      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22998$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22999      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23000$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23001      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23002    fi
23003  else
23004    input_to_shortpath="$new_path"
23005  fi
23006
23007  # Call helper function which possibly converts this using DOS-style short mode.
23008  # If so, the updated path is stored in $new_path.
23009  new_path="$input_to_shortpath"
23010
23011  input_path="$input_to_shortpath"
23012  # Check if we need to convert this using DOS-style short mode. If the path
23013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23014  # take no chances and rewrite it.
23015  # Note: m4 eats our [], so we need to use [ and ] instead.
23016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23017  if test "x$has_forbidden_chars" != x; then
23018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23022      # Going to short mode and back again did indeed matter. Since short mode is
23023      # case insensitive, let's make it lowercase to improve readability.
23024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23025      # Now convert it back to Unix-stile (cygpath)
23026      input_path=`$CYGPATH -u "$shortmode_path"`
23027      new_path="$input_path"
23028    fi
23029  fi
23030
23031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23032  if test "x$test_cygdrive_prefix" = x; then
23033    # As a simple fix, exclude /usr/bin since it's not a real path.
23034    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23036      # a path prefixed by /cygdrive for fixpath to work.
23037      new_path="$CYGWIN_ROOT_PATH$input_path"
23038    fi
23039  fi
23040
23041  # remove trailing .exe if any
23042  new_path="${new_path/%.exe/}"
23043
23044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23045
23046  # First separate the path from the arguments. This will split at the first
23047  # space.
23048  complete="$WINAR"
23049  path="${complete%% *}"
23050  tmp="$complete EOL"
23051  arguments="${tmp#* }"
23052
23053  # Input might be given as Windows format, start by converting to
23054  # unix format.
23055  new_path="$path"
23056
23057  windows_path="$new_path"
23058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23059    unix_path=`$CYGPATH -u "$windows_path"`
23060    new_path="$unix_path"
23061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23063    new_path="$unix_path"
23064  fi
23065
23066
23067  # Now try to locate executable using which
23068  new_path=`$WHICH "$new_path" 2> /dev/null`
23069
23070  if test "x$new_path" = x; then
23071    # Oops. Which didn't find the executable.
23072    # The splitting of arguments from the executable at a space might have been incorrect,
23073    # since paths with space are more likely in Windows. Give it another try with the whole
23074    # argument.
23075    path="$complete"
23076    arguments="EOL"
23077    new_path="$path"
23078
23079  windows_path="$new_path"
23080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23081    unix_path=`$CYGPATH -u "$windows_path"`
23082    new_path="$unix_path"
23083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23085    new_path="$unix_path"
23086  fi
23087
23088
23089    new_path=`$WHICH "$new_path" 2> /dev/null`
23090
23091    if test "x$new_path" = x; then
23092      # It's still not found. Now this is an unrecoverable error.
23093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23094$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23095      has_space=`$ECHO "$complete" | $GREP " "`
23096      if test "x$has_space" != x; then
23097        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23098$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23099      fi
23100      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23101    fi
23102  fi
23103
23104  # Now new_path has a complete unix path to the binary
23105  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23106    # Keep paths in /bin as-is, but remove trailing .exe if any
23107    new_path="${new_path/%.exe/}"
23108    # Do not save /bin paths to all_fixpath_prefixes!
23109  else
23110    # Not in mixed or Windows style, start by that.
23111    new_path=`cmd //c echo $new_path`
23112
23113  input_path="$new_path"
23114  # Check if we need to convert this using DOS-style short mode. If the path
23115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23116  # take no chances and rewrite it.
23117  # Note: m4 eats our [], so we need to use [ and ] instead.
23118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23119  if test "x$has_forbidden_chars" != x; then
23120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23122  fi
23123
23124    # Output is in $new_path
23125
23126  windows_path="$new_path"
23127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23128    unix_path=`$CYGPATH -u "$windows_path"`
23129    new_path="$unix_path"
23130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23132    new_path="$unix_path"
23133  fi
23134
23135    # remove trailing .exe if any
23136    new_path="${new_path/%.exe/}"
23137
23138    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23139    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23140  fi
23141
23142  else
23143    # We're on a posix platform. Hooray! :)
23144    # First separate the path from the arguments. This will split at the first
23145    # space.
23146    complete="$WINAR"
23147    path="${complete%% *}"
23148    tmp="$complete EOL"
23149    arguments="${tmp#* }"
23150
23151    # Cannot rely on the command "which" here since it doesn't always work.
23152    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23153    if test -z "$is_absolute_path"; then
23154      # Path to executable is not absolute. Find it.
23155      IFS_save="$IFS"
23156      IFS=:
23157      for p in $PATH; do
23158        if test -f "$p/$path" && test -x "$p/$path"; then
23159          new_path="$p/$path"
23160          break
23161        fi
23162      done
23163      IFS="$IFS_save"
23164    else
23165      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23166$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23167      new_path="$path"
23168    fi
23169
23170    if test "x$new_path" = x; then
23171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23172$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23173        has_space=`$ECHO "$complete" | $GREP " "`
23174        if test "x$has_space" != x; then
23175          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23176$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23177        fi
23178        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23179      fi
23180  fi
23181
23182      # Now join together the path and the arguments once again
23183      if test "x$arguments" != xEOL; then
23184        new_complete="$new_path ${arguments% *}"
23185      else
23186        new_complete="$new_path"
23187      fi
23188
23189  if test "x$complete" != "x$new_complete"; then
23190      WINAR="$new_complete"
23191      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23192$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23193    fi
23194
23195    AR="$WINAR"
23196    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23197
23198    # Extract the first word of "dumpbin", so it can be a program name with args.
23199set dummy dumpbin; ac_word=$2
23200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23201$as_echo_n "checking for $ac_word... " >&6; }
23202if ${ac_cv_prog_DUMPBIN+:} false; then :
23203  $as_echo_n "(cached) " >&6
23204else
23205  if test -n "$DUMPBIN"; then
23206  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23207else
23208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23209for as_dir in $PATH
23210do
23211  IFS=$as_save_IFS
23212  test -z "$as_dir" && as_dir=.
23213    for ac_exec_ext in '' $ac_executable_extensions; do
23214  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23215    ac_cv_prog_DUMPBIN="dumpbin"
23216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23217    break 2
23218  fi
23219done
23220  done
23221IFS=$as_save_IFS
23222
23223fi
23224fi
23225DUMPBIN=$ac_cv_prog_DUMPBIN
23226if test -n "$DUMPBIN"; then
23227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23228$as_echo "$DUMPBIN" >&6; }
23229else
23230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23231$as_echo "no" >&6; }
23232fi
23233
23234
23235
23236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23237
23238  # First separate the path from the arguments. This will split at the first
23239  # space.
23240  complete="$DUMPBIN"
23241  path="${complete%% *}"
23242  tmp="$complete EOL"
23243  arguments="${tmp#* }"
23244
23245  # Input might be given as Windows format, start by converting to
23246  # unix format.
23247  new_path=`$CYGPATH -u "$path"`
23248
23249  # Now try to locate executable using which
23250  new_path=`$WHICH "$new_path" 2> /dev/null`
23251  # bat and cmd files are not always considered executable in cygwin causing which
23252  # to not find them
23253  if test "x$new_path" = x \
23254           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23255           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23256    new_path=`$CYGPATH -u "$path"`
23257  fi
23258  if test "x$new_path" = x; then
23259    # Oops. Which didn't find the executable.
23260    # The splitting of arguments from the executable at a space might have been incorrect,
23261    # since paths with space are more likely in Windows. Give it another try with the whole
23262    # argument.
23263    path="$complete"
23264    arguments="EOL"
23265    new_path=`$CYGPATH -u "$path"`
23266    new_path=`$WHICH "$new_path" 2> /dev/null`
23267    # bat and cmd files are not always considered executable in cygwin causing which
23268    # to not find them
23269    if test "x$new_path" = x \
23270             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23271             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23272      new_path=`$CYGPATH -u "$path"`
23273    fi
23274    if test "x$new_path" = x; then
23275      # It's still not found. Now this is an unrecoverable error.
23276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23277$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23278      has_space=`$ECHO "$complete" | $GREP " "`
23279      if test "x$has_space" != x; then
23280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23282      fi
23283      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23284    fi
23285  fi
23286
23287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23290  # "foo.exe" is OK but "foo" is an error.
23291  #
23292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23293  # It is also a way to make sure we got the proper file name for the real test later on.
23294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23295  if test "x$test_shortpath" = x; then
23296    # Short path failed, file does not exist as specified.
23297    # Try adding .exe or .cmd
23298    if test -f "${new_path}.exe"; then
23299       input_to_shortpath="${new_path}.exe"
23300    elif test -f "${new_path}.cmd"; then
23301       input_to_shortpath="${new_path}.cmd"
23302    else
23303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23304$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23305      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23306$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23307      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23308    fi
23309  else
23310    input_to_shortpath="$new_path"
23311  fi
23312
23313  # Call helper function which possibly converts this using DOS-style short mode.
23314  # If so, the updated path is stored in $new_path.
23315  new_path="$input_to_shortpath"
23316
23317  input_path="$input_to_shortpath"
23318  # Check if we need to convert this using DOS-style short mode. If the path
23319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23320  # take no chances and rewrite it.
23321  # Note: m4 eats our [], so we need to use [ and ] instead.
23322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23323  if test "x$has_forbidden_chars" != x; then
23324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23328      # Going to short mode and back again did indeed matter. Since short mode is
23329      # case insensitive, let's make it lowercase to improve readability.
23330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23331      # Now convert it back to Unix-stile (cygpath)
23332      input_path=`$CYGPATH -u "$shortmode_path"`
23333      new_path="$input_path"
23334    fi
23335  fi
23336
23337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23338  if test "x$test_cygdrive_prefix" = x; then
23339    # As a simple fix, exclude /usr/bin since it's not a real path.
23340    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23342      # a path prefixed by /cygdrive for fixpath to work.
23343      new_path="$CYGWIN_ROOT_PATH$input_path"
23344    fi
23345  fi
23346
23347  # remove trailing .exe if any
23348  new_path="${new_path/%.exe/}"
23349
23350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23351
23352  # First separate the path from the arguments. This will split at the first
23353  # space.
23354  complete="$DUMPBIN"
23355  path="${complete%% *}"
23356  tmp="$complete EOL"
23357  arguments="${tmp#* }"
23358
23359  # Input might be given as Windows format, start by converting to
23360  # unix format.
23361  new_path="$path"
23362
23363  windows_path="$new_path"
23364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23365    unix_path=`$CYGPATH -u "$windows_path"`
23366    new_path="$unix_path"
23367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23369    new_path="$unix_path"
23370  fi
23371
23372
23373  # Now try to locate executable using which
23374  new_path=`$WHICH "$new_path" 2> /dev/null`
23375
23376  if test "x$new_path" = x; then
23377    # Oops. Which didn't find the executable.
23378    # The splitting of arguments from the executable at a space might have been incorrect,
23379    # since paths with space are more likely in Windows. Give it another try with the whole
23380    # argument.
23381    path="$complete"
23382    arguments="EOL"
23383    new_path="$path"
23384
23385  windows_path="$new_path"
23386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23387    unix_path=`$CYGPATH -u "$windows_path"`
23388    new_path="$unix_path"
23389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23391    new_path="$unix_path"
23392  fi
23393
23394
23395    new_path=`$WHICH "$new_path" 2> /dev/null`
23396
23397    if test "x$new_path" = x; then
23398      # It's still not found. Now this is an unrecoverable error.
23399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23400$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23401      has_space=`$ECHO "$complete" | $GREP " "`
23402      if test "x$has_space" != x; then
23403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23405      fi
23406      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23407    fi
23408  fi
23409
23410  # Now new_path has a complete unix path to the binary
23411  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23412    # Keep paths in /bin as-is, but remove trailing .exe if any
23413    new_path="${new_path/%.exe/}"
23414    # Do not save /bin paths to all_fixpath_prefixes!
23415  else
23416    # Not in mixed or Windows style, start by that.
23417    new_path=`cmd //c echo $new_path`
23418
23419  input_path="$new_path"
23420  # Check if we need to convert this using DOS-style short mode. If the path
23421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23422  # take no chances and rewrite it.
23423  # Note: m4 eats our [], so we need to use [ and ] instead.
23424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23425  if test "x$has_forbidden_chars" != x; then
23426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23428  fi
23429
23430    # Output is in $new_path
23431
23432  windows_path="$new_path"
23433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23434    unix_path=`$CYGPATH -u "$windows_path"`
23435    new_path="$unix_path"
23436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23438    new_path="$unix_path"
23439  fi
23440
23441    # remove trailing .exe if any
23442    new_path="${new_path/%.exe/}"
23443
23444    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23445    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23446  fi
23447
23448  else
23449    # We're on a posix platform. Hooray! :)
23450    # First separate the path from the arguments. This will split at the first
23451    # space.
23452    complete="$DUMPBIN"
23453    path="${complete%% *}"
23454    tmp="$complete EOL"
23455    arguments="${tmp#* }"
23456
23457    # Cannot rely on the command "which" here since it doesn't always work.
23458    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23459    if test -z "$is_absolute_path"; then
23460      # Path to executable is not absolute. Find it.
23461      IFS_save="$IFS"
23462      IFS=:
23463      for p in $PATH; do
23464        if test -f "$p/$path" && test -x "$p/$path"; then
23465          new_path="$p/$path"
23466          break
23467        fi
23468      done
23469      IFS="$IFS_save"
23470    else
23471      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23472$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23473      new_path="$path"
23474    fi
23475
23476    if test "x$new_path" = x; then
23477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23478$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23479        has_space=`$ECHO "$complete" | $GREP " "`
23480        if test "x$has_space" != x; then
23481          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23482$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23483        fi
23484        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23485      fi
23486  fi
23487
23488      # Now join together the path and the arguments once again
23489      if test "x$arguments" != xEOL; then
23490        new_complete="$new_path ${arguments% *}"
23491      else
23492        new_complete="$new_path"
23493      fi
23494
23495  if test "x$complete" != "x$new_complete"; then
23496      DUMPBIN="$new_complete"
23497      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23498$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23499    fi
23500
23501
23502    COMPILER_TYPE=CL
23503    CCXXFLAGS="$CCXXFLAGS -nologo"
23504
23505fi
23506
23507
23508
23509ac_ext=c
23510ac_cpp='$CPP $CPPFLAGS'
23511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23513ac_compiler_gnu=$ac_cv_c_compiler_gnu
23514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23515$as_echo_n "checking how to run the C preprocessor... " >&6; }
23516# On Suns, sometimes $CPP names a directory.
23517if test -n "$CPP" && test -d "$CPP"; then
23518  CPP=
23519fi
23520if test -z "$CPP"; then
23521  if ${ac_cv_prog_CPP+:} false; then :
23522  $as_echo_n "(cached) " >&6
23523else
23524      # Double quotes because CPP needs to be expanded
23525    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23526    do
23527      ac_preproc_ok=false
23528for ac_c_preproc_warn_flag in '' yes
23529do
23530  # Use a header file that comes with gcc, so configuring glibc
23531  # with a fresh cross-compiler works.
23532  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23533  # <limits.h> exists even on freestanding compilers.
23534  # On the NeXT, cc -E runs the code through the compiler's parser,
23535  # not just through cpp. "Syntax error" is here to catch this case.
23536  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23537/* end confdefs.h.  */
23538#ifdef __STDC__
23539# include <limits.h>
23540#else
23541# include <assert.h>
23542#endif
23543		     Syntax error
23544_ACEOF
23545if ac_fn_c_try_cpp "$LINENO"; then :
23546
23547else
23548  # Broken: fails on valid input.
23549continue
23550fi
23551rm -f conftest.err conftest.i conftest.$ac_ext
23552
23553  # OK, works on sane cases.  Now check whether nonexistent headers
23554  # can be detected and how.
23555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23556/* end confdefs.h.  */
23557#include <ac_nonexistent.h>
23558_ACEOF
23559if ac_fn_c_try_cpp "$LINENO"; then :
23560  # Broken: success on invalid input.
23561continue
23562else
23563  # Passes both tests.
23564ac_preproc_ok=:
23565break
23566fi
23567rm -f conftest.err conftest.i conftest.$ac_ext
23568
23569done
23570# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23571rm -f conftest.i conftest.err conftest.$ac_ext
23572if $ac_preproc_ok; then :
23573  break
23574fi
23575
23576    done
23577    ac_cv_prog_CPP=$CPP
23578
23579fi
23580  CPP=$ac_cv_prog_CPP
23581else
23582  ac_cv_prog_CPP=$CPP
23583fi
23584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23585$as_echo "$CPP" >&6; }
23586ac_preproc_ok=false
23587for ac_c_preproc_warn_flag in '' yes
23588do
23589  # Use a header file that comes with gcc, so configuring glibc
23590  # with a fresh cross-compiler works.
23591  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23592  # <limits.h> exists even on freestanding compilers.
23593  # On the NeXT, cc -E runs the code through the compiler's parser,
23594  # not just through cpp. "Syntax error" is here to catch this case.
23595  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23596/* end confdefs.h.  */
23597#ifdef __STDC__
23598# include <limits.h>
23599#else
23600# include <assert.h>
23601#endif
23602		     Syntax error
23603_ACEOF
23604if ac_fn_c_try_cpp "$LINENO"; then :
23605
23606else
23607  # Broken: fails on valid input.
23608continue
23609fi
23610rm -f conftest.err conftest.i conftest.$ac_ext
23611
23612  # OK, works on sane cases.  Now check whether nonexistent headers
23613  # can be detected and how.
23614  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23615/* end confdefs.h.  */
23616#include <ac_nonexistent.h>
23617_ACEOF
23618if ac_fn_c_try_cpp "$LINENO"; then :
23619  # Broken: success on invalid input.
23620continue
23621else
23622  # Passes both tests.
23623ac_preproc_ok=:
23624break
23625fi
23626rm -f conftest.err conftest.i conftest.$ac_ext
23627
23628done
23629# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23630rm -f conftest.i conftest.err conftest.$ac_ext
23631if $ac_preproc_ok; then :
23632
23633else
23634  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23636as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23637See \`config.log' for more details" "$LINENO" 5; }
23638fi
23639
23640ac_ext=cpp
23641ac_cpp='$CXXCPP $CPPFLAGS'
23642ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23643ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23644ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23645
23646
23647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23648
23649  # First separate the path from the arguments. This will split at the first
23650  # space.
23651  complete="$CPP"
23652  path="${complete%% *}"
23653  tmp="$complete EOL"
23654  arguments="${tmp#* }"
23655
23656  # Input might be given as Windows format, start by converting to
23657  # unix format.
23658  new_path=`$CYGPATH -u "$path"`
23659
23660  # Now try to locate executable using which
23661  new_path=`$WHICH "$new_path" 2> /dev/null`
23662  # bat and cmd files are not always considered executable in cygwin causing which
23663  # to not find them
23664  if test "x$new_path" = x \
23665           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23666           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23667    new_path=`$CYGPATH -u "$path"`
23668  fi
23669  if test "x$new_path" = x; then
23670    # Oops. Which didn't find the executable.
23671    # The splitting of arguments from the executable at a space might have been incorrect,
23672    # since paths with space are more likely in Windows. Give it another try with the whole
23673    # argument.
23674    path="$complete"
23675    arguments="EOL"
23676    new_path=`$CYGPATH -u "$path"`
23677    new_path=`$WHICH "$new_path" 2> /dev/null`
23678    # bat and cmd files are not always considered executable in cygwin causing which
23679    # to not find them
23680    if test "x$new_path" = x \
23681             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23682             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23683      new_path=`$CYGPATH -u "$path"`
23684    fi
23685    if test "x$new_path" = x; then
23686      # It's still not found. Now this is an unrecoverable error.
23687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23688$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23689      has_space=`$ECHO "$complete" | $GREP " "`
23690      if test "x$has_space" != x; then
23691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23693      fi
23694      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23695    fi
23696  fi
23697
23698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23701  # "foo.exe" is OK but "foo" is an error.
23702  #
23703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23704  # It is also a way to make sure we got the proper file name for the real test later on.
23705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23706  if test "x$test_shortpath" = x; then
23707    # Short path failed, file does not exist as specified.
23708    # Try adding .exe or .cmd
23709    if test -f "${new_path}.exe"; then
23710       input_to_shortpath="${new_path}.exe"
23711    elif test -f "${new_path}.cmd"; then
23712       input_to_shortpath="${new_path}.cmd"
23713    else
23714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23715$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23716      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23717$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23718      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23719    fi
23720  else
23721    input_to_shortpath="$new_path"
23722  fi
23723
23724  # Call helper function which possibly converts this using DOS-style short mode.
23725  # If so, the updated path is stored in $new_path.
23726  new_path="$input_to_shortpath"
23727
23728  input_path="$input_to_shortpath"
23729  # Check if we need to convert this using DOS-style short mode. If the path
23730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23731  # take no chances and rewrite it.
23732  # Note: m4 eats our [], so we need to use [ and ] instead.
23733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23734  if test "x$has_forbidden_chars" != x; then
23735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23739      # Going to short mode and back again did indeed matter. Since short mode is
23740      # case insensitive, let's make it lowercase to improve readability.
23741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23742      # Now convert it back to Unix-stile (cygpath)
23743      input_path=`$CYGPATH -u "$shortmode_path"`
23744      new_path="$input_path"
23745    fi
23746  fi
23747
23748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23749  if test "x$test_cygdrive_prefix" = x; then
23750    # As a simple fix, exclude /usr/bin since it's not a real path.
23751    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23753      # a path prefixed by /cygdrive for fixpath to work.
23754      new_path="$CYGWIN_ROOT_PATH$input_path"
23755    fi
23756  fi
23757
23758  # remove trailing .exe if any
23759  new_path="${new_path/%.exe/}"
23760
23761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23762
23763  # First separate the path from the arguments. This will split at the first
23764  # space.
23765  complete="$CPP"
23766  path="${complete%% *}"
23767  tmp="$complete EOL"
23768  arguments="${tmp#* }"
23769
23770  # Input might be given as Windows format, start by converting to
23771  # unix format.
23772  new_path="$path"
23773
23774  windows_path="$new_path"
23775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23776    unix_path=`$CYGPATH -u "$windows_path"`
23777    new_path="$unix_path"
23778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23780    new_path="$unix_path"
23781  fi
23782
23783
23784  # Now try to locate executable using which
23785  new_path=`$WHICH "$new_path" 2> /dev/null`
23786
23787  if test "x$new_path" = x; then
23788    # Oops. Which didn't find the executable.
23789    # The splitting of arguments from the executable at a space might have been incorrect,
23790    # since paths with space are more likely in Windows. Give it another try with the whole
23791    # argument.
23792    path="$complete"
23793    arguments="EOL"
23794    new_path="$path"
23795
23796  windows_path="$new_path"
23797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23798    unix_path=`$CYGPATH -u "$windows_path"`
23799    new_path="$unix_path"
23800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23802    new_path="$unix_path"
23803  fi
23804
23805
23806    new_path=`$WHICH "$new_path" 2> /dev/null`
23807
23808    if test "x$new_path" = x; then
23809      # It's still not found. Now this is an unrecoverable error.
23810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23811$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23812      has_space=`$ECHO "$complete" | $GREP " "`
23813      if test "x$has_space" != x; then
23814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23816      fi
23817      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23818    fi
23819  fi
23820
23821  # Now new_path has a complete unix path to the binary
23822  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23823    # Keep paths in /bin as-is, but remove trailing .exe if any
23824    new_path="${new_path/%.exe/}"
23825    # Do not save /bin paths to all_fixpath_prefixes!
23826  else
23827    # Not in mixed or Windows style, start by that.
23828    new_path=`cmd //c echo $new_path`
23829
23830  input_path="$new_path"
23831  # Check if we need to convert this using DOS-style short mode. If the path
23832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23833  # take no chances and rewrite it.
23834  # Note: m4 eats our [], so we need to use [ and ] instead.
23835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23836  if test "x$has_forbidden_chars" != x; then
23837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23839  fi
23840
23841    # Output is in $new_path
23842
23843  windows_path="$new_path"
23844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23845    unix_path=`$CYGPATH -u "$windows_path"`
23846    new_path="$unix_path"
23847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23849    new_path="$unix_path"
23850  fi
23851
23852    # remove trailing .exe if any
23853    new_path="${new_path/%.exe/}"
23854
23855    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23856    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23857  fi
23858
23859  else
23860    # We're on a posix platform. Hooray! :)
23861    # First separate the path from the arguments. This will split at the first
23862    # space.
23863    complete="$CPP"
23864    path="${complete%% *}"
23865    tmp="$complete EOL"
23866    arguments="${tmp#* }"
23867
23868    # Cannot rely on the command "which" here since it doesn't always work.
23869    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23870    if test -z "$is_absolute_path"; then
23871      # Path to executable is not absolute. Find it.
23872      IFS_save="$IFS"
23873      IFS=:
23874      for p in $PATH; do
23875        if test -f "$p/$path" && test -x "$p/$path"; then
23876          new_path="$p/$path"
23877          break
23878        fi
23879      done
23880      IFS="$IFS_save"
23881    else
23882      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23883$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23884      new_path="$path"
23885    fi
23886
23887    if test "x$new_path" = x; then
23888        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23889$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23890        has_space=`$ECHO "$complete" | $GREP " "`
23891        if test "x$has_space" != x; then
23892          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23893$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23894        fi
23895        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23896      fi
23897  fi
23898
23899      # Now join together the path and the arguments once again
23900      if test "x$arguments" != xEOL; then
23901        new_complete="$new_path ${arguments% *}"
23902      else
23903        new_complete="$new_path"
23904      fi
23905
23906  if test "x$complete" != "x$new_complete"; then
23907      CPP="$new_complete"
23908      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23909$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23910    fi
23911
23912
23913ac_ext=cpp
23914ac_cpp='$CXXCPP $CPPFLAGS'
23915ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23916ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23917ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23919$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23920if test -z "$CXXCPP"; then
23921  if ${ac_cv_prog_CXXCPP+:} false; then :
23922  $as_echo_n "(cached) " >&6
23923else
23924      # Double quotes because CXXCPP needs to be expanded
23925    for CXXCPP in "$CXX -E" "/lib/cpp"
23926    do
23927      ac_preproc_ok=false
23928for ac_cxx_preproc_warn_flag in '' yes
23929do
23930  # Use a header file that comes with gcc, so configuring glibc
23931  # with a fresh cross-compiler works.
23932  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23933  # <limits.h> exists even on freestanding compilers.
23934  # On the NeXT, cc -E runs the code through the compiler's parser,
23935  # not just through cpp. "Syntax error" is here to catch this case.
23936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23937/* end confdefs.h.  */
23938#ifdef __STDC__
23939# include <limits.h>
23940#else
23941# include <assert.h>
23942#endif
23943		     Syntax error
23944_ACEOF
23945if ac_fn_cxx_try_cpp "$LINENO"; then :
23946
23947else
23948  # Broken: fails on valid input.
23949continue
23950fi
23951rm -f conftest.err conftest.i conftest.$ac_ext
23952
23953  # OK, works on sane cases.  Now check whether nonexistent headers
23954  # can be detected and how.
23955  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23956/* end confdefs.h.  */
23957#include <ac_nonexistent.h>
23958_ACEOF
23959if ac_fn_cxx_try_cpp "$LINENO"; then :
23960  # Broken: success on invalid input.
23961continue
23962else
23963  # Passes both tests.
23964ac_preproc_ok=:
23965break
23966fi
23967rm -f conftest.err conftest.i conftest.$ac_ext
23968
23969done
23970# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23971rm -f conftest.i conftest.err conftest.$ac_ext
23972if $ac_preproc_ok; then :
23973  break
23974fi
23975
23976    done
23977    ac_cv_prog_CXXCPP=$CXXCPP
23978
23979fi
23980  CXXCPP=$ac_cv_prog_CXXCPP
23981else
23982  ac_cv_prog_CXXCPP=$CXXCPP
23983fi
23984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23985$as_echo "$CXXCPP" >&6; }
23986ac_preproc_ok=false
23987for ac_cxx_preproc_warn_flag in '' yes
23988do
23989  # Use a header file that comes with gcc, so configuring glibc
23990  # with a fresh cross-compiler works.
23991  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23992  # <limits.h> exists even on freestanding compilers.
23993  # On the NeXT, cc -E runs the code through the compiler's parser,
23994  # not just through cpp. "Syntax error" is here to catch this case.
23995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23996/* end confdefs.h.  */
23997#ifdef __STDC__
23998# include <limits.h>
23999#else
24000# include <assert.h>
24001#endif
24002		     Syntax error
24003_ACEOF
24004if ac_fn_cxx_try_cpp "$LINENO"; then :
24005
24006else
24007  # Broken: fails on valid input.
24008continue
24009fi
24010rm -f conftest.err conftest.i conftest.$ac_ext
24011
24012  # OK, works on sane cases.  Now check whether nonexistent headers
24013  # can be detected and how.
24014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24015/* end confdefs.h.  */
24016#include <ac_nonexistent.h>
24017_ACEOF
24018if ac_fn_cxx_try_cpp "$LINENO"; then :
24019  # Broken: success on invalid input.
24020continue
24021else
24022  # Passes both tests.
24023ac_preproc_ok=:
24024break
24025fi
24026rm -f conftest.err conftest.i conftest.$ac_ext
24027
24028done
24029# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24030rm -f conftest.i conftest.err conftest.$ac_ext
24031if $ac_preproc_ok; then :
24032
24033else
24034  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24036as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24037See \`config.log' for more details" "$LINENO" 5; }
24038fi
24039
24040ac_ext=cpp
24041ac_cpp='$CXXCPP $CPPFLAGS'
24042ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24043ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24044ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24045
24046
24047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24048
24049  # First separate the path from the arguments. This will split at the first
24050  # space.
24051  complete="$CXXCPP"
24052  path="${complete%% *}"
24053  tmp="$complete EOL"
24054  arguments="${tmp#* }"
24055
24056  # Input might be given as Windows format, start by converting to
24057  # unix format.
24058  new_path=`$CYGPATH -u "$path"`
24059
24060  # Now try to locate executable using which
24061  new_path=`$WHICH "$new_path" 2> /dev/null`
24062  # bat and cmd files are not always considered executable in cygwin causing which
24063  # to not find them
24064  if test "x$new_path" = x \
24065           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24066           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24067    new_path=`$CYGPATH -u "$path"`
24068  fi
24069  if test "x$new_path" = x; then
24070    # Oops. Which didn't find the executable.
24071    # The splitting of arguments from the executable at a space might have been incorrect,
24072    # since paths with space are more likely in Windows. Give it another try with the whole
24073    # argument.
24074    path="$complete"
24075    arguments="EOL"
24076    new_path=`$CYGPATH -u "$path"`
24077    new_path=`$WHICH "$new_path" 2> /dev/null`
24078    # bat and cmd files are not always considered executable in cygwin causing which
24079    # to not find them
24080    if test "x$new_path" = x \
24081             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24082             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24083      new_path=`$CYGPATH -u "$path"`
24084    fi
24085    if test "x$new_path" = x; then
24086      # It's still not found. Now this is an unrecoverable error.
24087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24088$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24089      has_space=`$ECHO "$complete" | $GREP " "`
24090      if test "x$has_space" != x; then
24091        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24092$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24093      fi
24094      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24095    fi
24096  fi
24097
24098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24101  # "foo.exe" is OK but "foo" is an error.
24102  #
24103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24104  # It is also a way to make sure we got the proper file name for the real test later on.
24105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24106  if test "x$test_shortpath" = x; then
24107    # Short path failed, file does not exist as specified.
24108    # Try adding .exe or .cmd
24109    if test -f "${new_path}.exe"; then
24110       input_to_shortpath="${new_path}.exe"
24111    elif test -f "${new_path}.cmd"; then
24112       input_to_shortpath="${new_path}.cmd"
24113    else
24114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24115$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24116      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24117$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24118      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24119    fi
24120  else
24121    input_to_shortpath="$new_path"
24122  fi
24123
24124  # Call helper function which possibly converts this using DOS-style short mode.
24125  # If so, the updated path is stored in $new_path.
24126  new_path="$input_to_shortpath"
24127
24128  input_path="$input_to_shortpath"
24129  # Check if we need to convert this using DOS-style short mode. If the path
24130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24131  # take no chances and rewrite it.
24132  # Note: m4 eats our [], so we need to use [ and ] instead.
24133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24134  if test "x$has_forbidden_chars" != x; then
24135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24139      # Going to short mode and back again did indeed matter. Since short mode is
24140      # case insensitive, let's make it lowercase to improve readability.
24141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24142      # Now convert it back to Unix-stile (cygpath)
24143      input_path=`$CYGPATH -u "$shortmode_path"`
24144      new_path="$input_path"
24145    fi
24146  fi
24147
24148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24149  if test "x$test_cygdrive_prefix" = x; then
24150    # As a simple fix, exclude /usr/bin since it's not a real path.
24151    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24153      # a path prefixed by /cygdrive for fixpath to work.
24154      new_path="$CYGWIN_ROOT_PATH$input_path"
24155    fi
24156  fi
24157
24158  # remove trailing .exe if any
24159  new_path="${new_path/%.exe/}"
24160
24161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24162
24163  # First separate the path from the arguments. This will split at the first
24164  # space.
24165  complete="$CXXCPP"
24166  path="${complete%% *}"
24167  tmp="$complete EOL"
24168  arguments="${tmp#* }"
24169
24170  # Input might be given as Windows format, start by converting to
24171  # unix format.
24172  new_path="$path"
24173
24174  windows_path="$new_path"
24175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24176    unix_path=`$CYGPATH -u "$windows_path"`
24177    new_path="$unix_path"
24178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24180    new_path="$unix_path"
24181  fi
24182
24183
24184  # Now try to locate executable using which
24185  new_path=`$WHICH "$new_path" 2> /dev/null`
24186
24187  if test "x$new_path" = x; then
24188    # Oops. Which didn't find the executable.
24189    # The splitting of arguments from the executable at a space might have been incorrect,
24190    # since paths with space are more likely in Windows. Give it another try with the whole
24191    # argument.
24192    path="$complete"
24193    arguments="EOL"
24194    new_path="$path"
24195
24196  windows_path="$new_path"
24197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24198    unix_path=`$CYGPATH -u "$windows_path"`
24199    new_path="$unix_path"
24200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24202    new_path="$unix_path"
24203  fi
24204
24205
24206    new_path=`$WHICH "$new_path" 2> /dev/null`
24207
24208    if test "x$new_path" = x; then
24209      # It's still not found. Now this is an unrecoverable error.
24210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24211$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24212      has_space=`$ECHO "$complete" | $GREP " "`
24213      if test "x$has_space" != x; then
24214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24216      fi
24217      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24218    fi
24219  fi
24220
24221  # Now new_path has a complete unix path to the binary
24222  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24223    # Keep paths in /bin as-is, but remove trailing .exe if any
24224    new_path="${new_path/%.exe/}"
24225    # Do not save /bin paths to all_fixpath_prefixes!
24226  else
24227    # Not in mixed or Windows style, start by that.
24228    new_path=`cmd //c echo $new_path`
24229
24230  input_path="$new_path"
24231  # Check if we need to convert this using DOS-style short mode. If the path
24232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24233  # take no chances and rewrite it.
24234  # Note: m4 eats our [], so we need to use [ and ] instead.
24235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24236  if test "x$has_forbidden_chars" != x; then
24237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24239  fi
24240
24241    # Output is in $new_path
24242
24243  windows_path="$new_path"
24244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24245    unix_path=`$CYGPATH -u "$windows_path"`
24246    new_path="$unix_path"
24247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24249    new_path="$unix_path"
24250  fi
24251
24252    # remove trailing .exe if any
24253    new_path="${new_path/%.exe/}"
24254
24255    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24256    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24257  fi
24258
24259  else
24260    # We're on a posix platform. Hooray! :)
24261    # First separate the path from the arguments. This will split at the first
24262    # space.
24263    complete="$CXXCPP"
24264    path="${complete%% *}"
24265    tmp="$complete EOL"
24266    arguments="${tmp#* }"
24267
24268    # Cannot rely on the command "which" here since it doesn't always work.
24269    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24270    if test -z "$is_absolute_path"; then
24271      # Path to executable is not absolute. Find it.
24272      IFS_save="$IFS"
24273      IFS=:
24274      for p in $PATH; do
24275        if test -f "$p/$path" && test -x "$p/$path"; then
24276          new_path="$p/$path"
24277          break
24278        fi
24279      done
24280      IFS="$IFS_save"
24281    else
24282      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24283$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24284      new_path="$path"
24285    fi
24286
24287    if test "x$new_path" = x; then
24288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24289$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24290        has_space=`$ECHO "$complete" | $GREP " "`
24291        if test "x$has_space" != x; then
24292          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24293$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24294        fi
24295        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24296      fi
24297  fi
24298
24299      # Now join together the path and the arguments once again
24300      if test "x$arguments" != xEOL; then
24301        new_complete="$new_path ${arguments% *}"
24302      else
24303        new_complete="$new_path"
24304      fi
24305
24306  if test "x$complete" != "x$new_complete"; then
24307      CXXCPP="$new_complete"
24308      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24309$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24310    fi
24311
24312
24313if test "x$COMPILE_TYPE" != "xcross"; then
24314    # If we are not cross compiling, use the same compilers for
24315    # building the build platform executables. The cross-compilation
24316    # case needed to be done earlier, but this can only be done after
24317    # the native tools have been localized.
24318    BUILD_CC="$CC"
24319    BUILD_CXX="$CXX"
24320    BUILD_LD="$LD"
24321fi
24322
24323# for solaris we really need solaris tools, and not gnu equivalent
24324#   these seems to normally reside in /usr/ccs/bin so add that to path before
24325#   starting to probe
24326#
24327#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24328#         so that it can be overriden --with-tools-dir
24329if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24330    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24331fi
24332
24333# Find the right assembler.
24334if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24335    # Extract the first word of "as", so it can be a program name with args.
24336set dummy as; ac_word=$2
24337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24338$as_echo_n "checking for $ac_word... " >&6; }
24339if ${ac_cv_path_AS+:} false; then :
24340  $as_echo_n "(cached) " >&6
24341else
24342  case $AS in
24343  [\\/]* | ?:[\\/]*)
24344  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24345  ;;
24346  *)
24347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24348for as_dir in $PATH
24349do
24350  IFS=$as_save_IFS
24351  test -z "$as_dir" && as_dir=.
24352    for ac_exec_ext in '' $ac_executable_extensions; do
24353  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24354    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24356    break 2
24357  fi
24358done
24359  done
24360IFS=$as_save_IFS
24361
24362  ;;
24363esac
24364fi
24365AS=$ac_cv_path_AS
24366if test -n "$AS"; then
24367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24368$as_echo "$AS" >&6; }
24369else
24370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24371$as_echo "no" >&6; }
24372fi
24373
24374
24375
24376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24377
24378  # First separate the path from the arguments. This will split at the first
24379  # space.
24380  complete="$AS"
24381  path="${complete%% *}"
24382  tmp="$complete EOL"
24383  arguments="${tmp#* }"
24384
24385  # Input might be given as Windows format, start by converting to
24386  # unix format.
24387  new_path=`$CYGPATH -u "$path"`
24388
24389  # Now try to locate executable using which
24390  new_path=`$WHICH "$new_path" 2> /dev/null`
24391  # bat and cmd files are not always considered executable in cygwin causing which
24392  # to not find them
24393  if test "x$new_path" = x \
24394           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24395           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24396    new_path=`$CYGPATH -u "$path"`
24397  fi
24398  if test "x$new_path" = x; then
24399    # Oops. Which didn't find the executable.
24400    # The splitting of arguments from the executable at a space might have been incorrect,
24401    # since paths with space are more likely in Windows. Give it another try with the whole
24402    # argument.
24403    path="$complete"
24404    arguments="EOL"
24405    new_path=`$CYGPATH -u "$path"`
24406    new_path=`$WHICH "$new_path" 2> /dev/null`
24407    # bat and cmd files are not always considered executable in cygwin causing which
24408    # to not find them
24409    if test "x$new_path" = x \
24410             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24411             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24412      new_path=`$CYGPATH -u "$path"`
24413    fi
24414    if test "x$new_path" = x; then
24415      # It's still not found. Now this is an unrecoverable error.
24416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24417$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24418      has_space=`$ECHO "$complete" | $GREP " "`
24419      if test "x$has_space" != x; then
24420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24422      fi
24423      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24424    fi
24425  fi
24426
24427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24430  # "foo.exe" is OK but "foo" is an error.
24431  #
24432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24433  # It is also a way to make sure we got the proper file name for the real test later on.
24434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24435  if test "x$test_shortpath" = x; then
24436    # Short path failed, file does not exist as specified.
24437    # Try adding .exe or .cmd
24438    if test -f "${new_path}.exe"; then
24439       input_to_shortpath="${new_path}.exe"
24440    elif test -f "${new_path}.cmd"; then
24441       input_to_shortpath="${new_path}.cmd"
24442    else
24443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24444$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24445      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24446$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24447      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24448    fi
24449  else
24450    input_to_shortpath="$new_path"
24451  fi
24452
24453  # Call helper function which possibly converts this using DOS-style short mode.
24454  # If so, the updated path is stored in $new_path.
24455  new_path="$input_to_shortpath"
24456
24457  input_path="$input_to_shortpath"
24458  # Check if we need to convert this using DOS-style short mode. If the path
24459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24460  # take no chances and rewrite it.
24461  # Note: m4 eats our [], so we need to use [ and ] instead.
24462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24463  if test "x$has_forbidden_chars" != x; then
24464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24468      # Going to short mode and back again did indeed matter. Since short mode is
24469      # case insensitive, let's make it lowercase to improve readability.
24470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24471      # Now convert it back to Unix-stile (cygpath)
24472      input_path=`$CYGPATH -u "$shortmode_path"`
24473      new_path="$input_path"
24474    fi
24475  fi
24476
24477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24478  if test "x$test_cygdrive_prefix" = x; then
24479    # As a simple fix, exclude /usr/bin since it's not a real path.
24480    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24482      # a path prefixed by /cygdrive for fixpath to work.
24483      new_path="$CYGWIN_ROOT_PATH$input_path"
24484    fi
24485  fi
24486
24487  # remove trailing .exe if any
24488  new_path="${new_path/%.exe/}"
24489
24490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24491
24492  # First separate the path from the arguments. This will split at the first
24493  # space.
24494  complete="$AS"
24495  path="${complete%% *}"
24496  tmp="$complete EOL"
24497  arguments="${tmp#* }"
24498
24499  # Input might be given as Windows format, start by converting to
24500  # unix format.
24501  new_path="$path"
24502
24503  windows_path="$new_path"
24504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24505    unix_path=`$CYGPATH -u "$windows_path"`
24506    new_path="$unix_path"
24507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24509    new_path="$unix_path"
24510  fi
24511
24512
24513  # Now try to locate executable using which
24514  new_path=`$WHICH "$new_path" 2> /dev/null`
24515
24516  if test "x$new_path" = x; then
24517    # Oops. Which didn't find the executable.
24518    # The splitting of arguments from the executable at a space might have been incorrect,
24519    # since paths with space are more likely in Windows. Give it another try with the whole
24520    # argument.
24521    path="$complete"
24522    arguments="EOL"
24523    new_path="$path"
24524
24525  windows_path="$new_path"
24526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24527    unix_path=`$CYGPATH -u "$windows_path"`
24528    new_path="$unix_path"
24529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24531    new_path="$unix_path"
24532  fi
24533
24534
24535    new_path=`$WHICH "$new_path" 2> /dev/null`
24536
24537    if test "x$new_path" = x; then
24538      # It's still not found. Now this is an unrecoverable error.
24539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24540$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24541      has_space=`$ECHO "$complete" | $GREP " "`
24542      if test "x$has_space" != x; then
24543        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24544$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24545      fi
24546      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24547    fi
24548  fi
24549
24550  # Now new_path has a complete unix path to the binary
24551  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24552    # Keep paths in /bin as-is, but remove trailing .exe if any
24553    new_path="${new_path/%.exe/}"
24554    # Do not save /bin paths to all_fixpath_prefixes!
24555  else
24556    # Not in mixed or Windows style, start by that.
24557    new_path=`cmd //c echo $new_path`
24558
24559  input_path="$new_path"
24560  # Check if we need to convert this using DOS-style short mode. If the path
24561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24562  # take no chances and rewrite it.
24563  # Note: m4 eats our [], so we need to use [ and ] instead.
24564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24565  if test "x$has_forbidden_chars" != x; then
24566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24568  fi
24569
24570    # Output is in $new_path
24571
24572  windows_path="$new_path"
24573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24574    unix_path=`$CYGPATH -u "$windows_path"`
24575    new_path="$unix_path"
24576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24578    new_path="$unix_path"
24579  fi
24580
24581    # remove trailing .exe if any
24582    new_path="${new_path/%.exe/}"
24583
24584    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24585    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24586  fi
24587
24588  else
24589    # We're on a posix platform. Hooray! :)
24590    # First separate the path from the arguments. This will split at the first
24591    # space.
24592    complete="$AS"
24593    path="${complete%% *}"
24594    tmp="$complete EOL"
24595    arguments="${tmp#* }"
24596
24597    # Cannot rely on the command "which" here since it doesn't always work.
24598    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24599    if test -z "$is_absolute_path"; then
24600      # Path to executable is not absolute. Find it.
24601      IFS_save="$IFS"
24602      IFS=:
24603      for p in $PATH; do
24604        if test -f "$p/$path" && test -x "$p/$path"; then
24605          new_path="$p/$path"
24606          break
24607        fi
24608      done
24609      IFS="$IFS_save"
24610    else
24611      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24612$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24613      new_path="$path"
24614    fi
24615
24616    if test "x$new_path" = x; then
24617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24618$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24619        has_space=`$ECHO "$complete" | $GREP " "`
24620        if test "x$has_space" != x; then
24621          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24622$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24623        fi
24624        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24625      fi
24626  fi
24627
24628      # Now join together the path and the arguments once again
24629      if test "x$arguments" != xEOL; then
24630        new_complete="$new_path ${arguments% *}"
24631      else
24632        new_complete="$new_path"
24633      fi
24634
24635  if test "x$complete" != "x$new_complete"; then
24636      AS="$new_complete"
24637      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24638$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24639    fi
24640
24641else
24642    AS="$CC -c"
24643fi
24644
24645
24646if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24647    for ac_prog in gnm nm
24648do
24649  # Extract the first word of "$ac_prog", so it can be a program name with args.
24650set dummy $ac_prog; ac_word=$2
24651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24652$as_echo_n "checking for $ac_word... " >&6; }
24653if ${ac_cv_path_NM+:} false; then :
24654  $as_echo_n "(cached) " >&6
24655else
24656  case $NM in
24657  [\\/]* | ?:[\\/]*)
24658  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24659  ;;
24660  *)
24661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24662for as_dir in $PATH
24663do
24664  IFS=$as_save_IFS
24665  test -z "$as_dir" && as_dir=.
24666    for ac_exec_ext in '' $ac_executable_extensions; do
24667  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24668    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24670    break 2
24671  fi
24672done
24673  done
24674IFS=$as_save_IFS
24675
24676  ;;
24677esac
24678fi
24679NM=$ac_cv_path_NM
24680if test -n "$NM"; then
24681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24682$as_echo "$NM" >&6; }
24683else
24684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24685$as_echo "no" >&6; }
24686fi
24687
24688
24689  test -n "$NM" && break
24690done
24691
24692
24693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24694
24695  # First separate the path from the arguments. This will split at the first
24696  # space.
24697  complete="$NM"
24698  path="${complete%% *}"
24699  tmp="$complete EOL"
24700  arguments="${tmp#* }"
24701
24702  # Input might be given as Windows format, start by converting to
24703  # unix format.
24704  new_path=`$CYGPATH -u "$path"`
24705
24706  # Now try to locate executable using which
24707  new_path=`$WHICH "$new_path" 2> /dev/null`
24708  # bat and cmd files are not always considered executable in cygwin causing which
24709  # to not find them
24710  if test "x$new_path" = x \
24711           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24712           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24713    new_path=`$CYGPATH -u "$path"`
24714  fi
24715  if test "x$new_path" = x; then
24716    # Oops. Which didn't find the executable.
24717    # The splitting of arguments from the executable at a space might have been incorrect,
24718    # since paths with space are more likely in Windows. Give it another try with the whole
24719    # argument.
24720    path="$complete"
24721    arguments="EOL"
24722    new_path=`$CYGPATH -u "$path"`
24723    new_path=`$WHICH "$new_path" 2> /dev/null`
24724    # bat and cmd files are not always considered executable in cygwin causing which
24725    # to not find them
24726    if test "x$new_path" = x \
24727             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24728             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24729      new_path=`$CYGPATH -u "$path"`
24730    fi
24731    if test "x$new_path" = x; then
24732      # It's still not found. Now this is an unrecoverable error.
24733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24734$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24735      has_space=`$ECHO "$complete" | $GREP " "`
24736      if test "x$has_space" != x; then
24737        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24738$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24739      fi
24740      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24741    fi
24742  fi
24743
24744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24747  # "foo.exe" is OK but "foo" is an error.
24748  #
24749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24750  # It is also a way to make sure we got the proper file name for the real test later on.
24751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24752  if test "x$test_shortpath" = x; then
24753    # Short path failed, file does not exist as specified.
24754    # Try adding .exe or .cmd
24755    if test -f "${new_path}.exe"; then
24756       input_to_shortpath="${new_path}.exe"
24757    elif test -f "${new_path}.cmd"; then
24758       input_to_shortpath="${new_path}.cmd"
24759    else
24760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24761$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24762      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24763$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24764      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24765    fi
24766  else
24767    input_to_shortpath="$new_path"
24768  fi
24769
24770  # Call helper function which possibly converts this using DOS-style short mode.
24771  # If so, the updated path is stored in $new_path.
24772  new_path="$input_to_shortpath"
24773
24774  input_path="$input_to_shortpath"
24775  # Check if we need to convert this using DOS-style short mode. If the path
24776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24777  # take no chances and rewrite it.
24778  # Note: m4 eats our [], so we need to use [ and ] instead.
24779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24780  if test "x$has_forbidden_chars" != x; then
24781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24785      # Going to short mode and back again did indeed matter. Since short mode is
24786      # case insensitive, let's make it lowercase to improve readability.
24787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24788      # Now convert it back to Unix-stile (cygpath)
24789      input_path=`$CYGPATH -u "$shortmode_path"`
24790      new_path="$input_path"
24791    fi
24792  fi
24793
24794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24795  if test "x$test_cygdrive_prefix" = x; then
24796    # As a simple fix, exclude /usr/bin since it's not a real path.
24797    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24799      # a path prefixed by /cygdrive for fixpath to work.
24800      new_path="$CYGWIN_ROOT_PATH$input_path"
24801    fi
24802  fi
24803
24804  # remove trailing .exe if any
24805  new_path="${new_path/%.exe/}"
24806
24807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24808
24809  # First separate the path from the arguments. This will split at the first
24810  # space.
24811  complete="$NM"
24812  path="${complete%% *}"
24813  tmp="$complete EOL"
24814  arguments="${tmp#* }"
24815
24816  # Input might be given as Windows format, start by converting to
24817  # unix format.
24818  new_path="$path"
24819
24820  windows_path="$new_path"
24821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24822    unix_path=`$CYGPATH -u "$windows_path"`
24823    new_path="$unix_path"
24824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24826    new_path="$unix_path"
24827  fi
24828
24829
24830  # Now try to locate executable using which
24831  new_path=`$WHICH "$new_path" 2> /dev/null`
24832
24833  if test "x$new_path" = x; then
24834    # Oops. Which didn't find the executable.
24835    # The splitting of arguments from the executable at a space might have been incorrect,
24836    # since paths with space are more likely in Windows. Give it another try with the whole
24837    # argument.
24838    path="$complete"
24839    arguments="EOL"
24840    new_path="$path"
24841
24842  windows_path="$new_path"
24843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24844    unix_path=`$CYGPATH -u "$windows_path"`
24845    new_path="$unix_path"
24846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24848    new_path="$unix_path"
24849  fi
24850
24851
24852    new_path=`$WHICH "$new_path" 2> /dev/null`
24853
24854    if test "x$new_path" = x; then
24855      # It's still not found. Now this is an unrecoverable error.
24856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24857$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24858      has_space=`$ECHO "$complete" | $GREP " "`
24859      if test "x$has_space" != x; then
24860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24862      fi
24863      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24864    fi
24865  fi
24866
24867  # Now new_path has a complete unix path to the binary
24868  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24869    # Keep paths in /bin as-is, but remove trailing .exe if any
24870    new_path="${new_path/%.exe/}"
24871    # Do not save /bin paths to all_fixpath_prefixes!
24872  else
24873    # Not in mixed or Windows style, start by that.
24874    new_path=`cmd //c echo $new_path`
24875
24876  input_path="$new_path"
24877  # Check if we need to convert this using DOS-style short mode. If the path
24878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24879  # take no chances and rewrite it.
24880  # Note: m4 eats our [], so we need to use [ and ] instead.
24881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24882  if test "x$has_forbidden_chars" != x; then
24883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24885  fi
24886
24887    # Output is in $new_path
24888
24889  windows_path="$new_path"
24890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24891    unix_path=`$CYGPATH -u "$windows_path"`
24892    new_path="$unix_path"
24893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24895    new_path="$unix_path"
24896  fi
24897
24898    # remove trailing .exe if any
24899    new_path="${new_path/%.exe/}"
24900
24901    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24902    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24903  fi
24904
24905  else
24906    # We're on a posix platform. Hooray! :)
24907    # First separate the path from the arguments. This will split at the first
24908    # space.
24909    complete="$NM"
24910    path="${complete%% *}"
24911    tmp="$complete EOL"
24912    arguments="${tmp#* }"
24913
24914    # Cannot rely on the command "which" here since it doesn't always work.
24915    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24916    if test -z "$is_absolute_path"; then
24917      # Path to executable is not absolute. Find it.
24918      IFS_save="$IFS"
24919      IFS=:
24920      for p in $PATH; do
24921        if test -f "$p/$path" && test -x "$p/$path"; then
24922          new_path="$p/$path"
24923          break
24924        fi
24925      done
24926      IFS="$IFS_save"
24927    else
24928      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24929$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24930      new_path="$path"
24931    fi
24932
24933    if test "x$new_path" = x; then
24934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24935$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24936        has_space=`$ECHO "$complete" | $GREP " "`
24937        if test "x$has_space" != x; then
24938          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24939$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24940        fi
24941        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24942      fi
24943  fi
24944
24945      # Now join together the path and the arguments once again
24946      if test "x$arguments" != xEOL; then
24947        new_complete="$new_path ${arguments% *}"
24948      else
24949        new_complete="$new_path"
24950      fi
24951
24952  if test "x$complete" != "x$new_complete"; then
24953      NM="$new_complete"
24954      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24955$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24956    fi
24957
24958    # Extract the first word of "strip", so it can be a program name with args.
24959set dummy strip; ac_word=$2
24960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24961$as_echo_n "checking for $ac_word... " >&6; }
24962if ${ac_cv_path_STRIP+:} false; then :
24963  $as_echo_n "(cached) " >&6
24964else
24965  case $STRIP in
24966  [\\/]* | ?:[\\/]*)
24967  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24968  ;;
24969  *)
24970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24971for as_dir in $PATH
24972do
24973  IFS=$as_save_IFS
24974  test -z "$as_dir" && as_dir=.
24975    for ac_exec_ext in '' $ac_executable_extensions; do
24976  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24977    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24979    break 2
24980  fi
24981done
24982  done
24983IFS=$as_save_IFS
24984
24985  ;;
24986esac
24987fi
24988STRIP=$ac_cv_path_STRIP
24989if test -n "$STRIP"; then
24990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24991$as_echo "$STRIP" >&6; }
24992else
24993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24994$as_echo "no" >&6; }
24995fi
24996
24997
24998
24999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25000
25001  # First separate the path from the arguments. This will split at the first
25002  # space.
25003  complete="$STRIP"
25004  path="${complete%% *}"
25005  tmp="$complete EOL"
25006  arguments="${tmp#* }"
25007
25008  # Input might be given as Windows format, start by converting to
25009  # unix format.
25010  new_path=`$CYGPATH -u "$path"`
25011
25012  # Now try to locate executable using which
25013  new_path=`$WHICH "$new_path" 2> /dev/null`
25014  # bat and cmd files are not always considered executable in cygwin causing which
25015  # to not find them
25016  if test "x$new_path" = x \
25017           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25018           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25019    new_path=`$CYGPATH -u "$path"`
25020  fi
25021  if test "x$new_path" = x; then
25022    # Oops. Which didn't find the executable.
25023    # The splitting of arguments from the executable at a space might have been incorrect,
25024    # since paths with space are more likely in Windows. Give it another try with the whole
25025    # argument.
25026    path="$complete"
25027    arguments="EOL"
25028    new_path=`$CYGPATH -u "$path"`
25029    new_path=`$WHICH "$new_path" 2> /dev/null`
25030    # bat and cmd files are not always considered executable in cygwin causing which
25031    # to not find them
25032    if test "x$new_path" = x \
25033             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25034             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25035      new_path=`$CYGPATH -u "$path"`
25036    fi
25037    if test "x$new_path" = x; then
25038      # It's still not found. Now this is an unrecoverable error.
25039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25040$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25041      has_space=`$ECHO "$complete" | $GREP " "`
25042      if test "x$has_space" != x; then
25043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25045      fi
25046      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25047    fi
25048  fi
25049
25050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25053  # "foo.exe" is OK but "foo" is an error.
25054  #
25055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25056  # It is also a way to make sure we got the proper file name for the real test later on.
25057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25058  if test "x$test_shortpath" = x; then
25059    # Short path failed, file does not exist as specified.
25060    # Try adding .exe or .cmd
25061    if test -f "${new_path}.exe"; then
25062       input_to_shortpath="${new_path}.exe"
25063    elif test -f "${new_path}.cmd"; then
25064       input_to_shortpath="${new_path}.cmd"
25065    else
25066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25067$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25068      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25069$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25070      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25071    fi
25072  else
25073    input_to_shortpath="$new_path"
25074  fi
25075
25076  # Call helper function which possibly converts this using DOS-style short mode.
25077  # If so, the updated path is stored in $new_path.
25078  new_path="$input_to_shortpath"
25079
25080  input_path="$input_to_shortpath"
25081  # Check if we need to convert this using DOS-style short mode. If the path
25082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25083  # take no chances and rewrite it.
25084  # Note: m4 eats our [], so we need to use [ and ] instead.
25085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25086  if test "x$has_forbidden_chars" != x; then
25087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25091      # Going to short mode and back again did indeed matter. Since short mode is
25092      # case insensitive, let's make it lowercase to improve readability.
25093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25094      # Now convert it back to Unix-stile (cygpath)
25095      input_path=`$CYGPATH -u "$shortmode_path"`
25096      new_path="$input_path"
25097    fi
25098  fi
25099
25100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25101  if test "x$test_cygdrive_prefix" = x; then
25102    # As a simple fix, exclude /usr/bin since it's not a real path.
25103    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25105      # a path prefixed by /cygdrive for fixpath to work.
25106      new_path="$CYGWIN_ROOT_PATH$input_path"
25107    fi
25108  fi
25109
25110  # remove trailing .exe if any
25111  new_path="${new_path/%.exe/}"
25112
25113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25114
25115  # First separate the path from the arguments. This will split at the first
25116  # space.
25117  complete="$STRIP"
25118  path="${complete%% *}"
25119  tmp="$complete EOL"
25120  arguments="${tmp#* }"
25121
25122  # Input might be given as Windows format, start by converting to
25123  # unix format.
25124  new_path="$path"
25125
25126  windows_path="$new_path"
25127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25128    unix_path=`$CYGPATH -u "$windows_path"`
25129    new_path="$unix_path"
25130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25132    new_path="$unix_path"
25133  fi
25134
25135
25136  # Now try to locate executable using which
25137  new_path=`$WHICH "$new_path" 2> /dev/null`
25138
25139  if test "x$new_path" = x; then
25140    # Oops. Which didn't find the executable.
25141    # The splitting of arguments from the executable at a space might have been incorrect,
25142    # since paths with space are more likely in Windows. Give it another try with the whole
25143    # argument.
25144    path="$complete"
25145    arguments="EOL"
25146    new_path="$path"
25147
25148  windows_path="$new_path"
25149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25150    unix_path=`$CYGPATH -u "$windows_path"`
25151    new_path="$unix_path"
25152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25154    new_path="$unix_path"
25155  fi
25156
25157
25158    new_path=`$WHICH "$new_path" 2> /dev/null`
25159
25160    if test "x$new_path" = x; then
25161      # It's still not found. Now this is an unrecoverable error.
25162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25163$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25164      has_space=`$ECHO "$complete" | $GREP " "`
25165      if test "x$has_space" != x; then
25166        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25167$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25168      fi
25169      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25170    fi
25171  fi
25172
25173  # Now new_path has a complete unix path to the binary
25174  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25175    # Keep paths in /bin as-is, but remove trailing .exe if any
25176    new_path="${new_path/%.exe/}"
25177    # Do not save /bin paths to all_fixpath_prefixes!
25178  else
25179    # Not in mixed or Windows style, start by that.
25180    new_path=`cmd //c echo $new_path`
25181
25182  input_path="$new_path"
25183  # Check if we need to convert this using DOS-style short mode. If the path
25184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25185  # take no chances and rewrite it.
25186  # Note: m4 eats our [], so we need to use [ and ] instead.
25187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25188  if test "x$has_forbidden_chars" != x; then
25189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25191  fi
25192
25193    # Output is in $new_path
25194
25195  windows_path="$new_path"
25196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25197    unix_path=`$CYGPATH -u "$windows_path"`
25198    new_path="$unix_path"
25199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25201    new_path="$unix_path"
25202  fi
25203
25204    # remove trailing .exe if any
25205    new_path="${new_path/%.exe/}"
25206
25207    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25208    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25209  fi
25210
25211  else
25212    # We're on a posix platform. Hooray! :)
25213    # First separate the path from the arguments. This will split at the first
25214    # space.
25215    complete="$STRIP"
25216    path="${complete%% *}"
25217    tmp="$complete EOL"
25218    arguments="${tmp#* }"
25219
25220    # Cannot rely on the command "which" here since it doesn't always work.
25221    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25222    if test -z "$is_absolute_path"; then
25223      # Path to executable is not absolute. Find it.
25224      IFS_save="$IFS"
25225      IFS=:
25226      for p in $PATH; do
25227        if test -f "$p/$path" && test -x "$p/$path"; then
25228          new_path="$p/$path"
25229          break
25230        fi
25231      done
25232      IFS="$IFS_save"
25233    else
25234      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25235$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25236      new_path="$path"
25237    fi
25238
25239    if test "x$new_path" = x; then
25240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25241$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25242        has_space=`$ECHO "$complete" | $GREP " "`
25243        if test "x$has_space" != x; then
25244          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25245$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25246        fi
25247        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25248      fi
25249  fi
25250
25251      # Now join together the path and the arguments once again
25252      if test "x$arguments" != xEOL; then
25253        new_complete="$new_path ${arguments% *}"
25254      else
25255        new_complete="$new_path"
25256      fi
25257
25258  if test "x$complete" != "x$new_complete"; then
25259      STRIP="$new_complete"
25260      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25261$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25262    fi
25263
25264    # Extract the first word of "mcs", so it can be a program name with args.
25265set dummy mcs; ac_word=$2
25266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25267$as_echo_n "checking for $ac_word... " >&6; }
25268if ${ac_cv_path_MCS+:} false; then :
25269  $as_echo_n "(cached) " >&6
25270else
25271  case $MCS in
25272  [\\/]* | ?:[\\/]*)
25273  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25274  ;;
25275  *)
25276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25277for as_dir in $PATH
25278do
25279  IFS=$as_save_IFS
25280  test -z "$as_dir" && as_dir=.
25281    for ac_exec_ext in '' $ac_executable_extensions; do
25282  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25283    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25285    break 2
25286  fi
25287done
25288  done
25289IFS=$as_save_IFS
25290
25291  ;;
25292esac
25293fi
25294MCS=$ac_cv_path_MCS
25295if test -n "$MCS"; then
25296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25297$as_echo "$MCS" >&6; }
25298else
25299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25300$as_echo "no" >&6; }
25301fi
25302
25303
25304
25305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25306
25307  # First separate the path from the arguments. This will split at the first
25308  # space.
25309  complete="$MCS"
25310  path="${complete%% *}"
25311  tmp="$complete EOL"
25312  arguments="${tmp#* }"
25313
25314  # Input might be given as Windows format, start by converting to
25315  # unix format.
25316  new_path=`$CYGPATH -u "$path"`
25317
25318  # Now try to locate executable using which
25319  new_path=`$WHICH "$new_path" 2> /dev/null`
25320  # bat and cmd files are not always considered executable in cygwin causing which
25321  # to not find them
25322  if test "x$new_path" = x \
25323           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25324           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25325    new_path=`$CYGPATH -u "$path"`
25326  fi
25327  if test "x$new_path" = x; then
25328    # Oops. Which didn't find the executable.
25329    # The splitting of arguments from the executable at a space might have been incorrect,
25330    # since paths with space are more likely in Windows. Give it another try with the whole
25331    # argument.
25332    path="$complete"
25333    arguments="EOL"
25334    new_path=`$CYGPATH -u "$path"`
25335    new_path=`$WHICH "$new_path" 2> /dev/null`
25336    # bat and cmd files are not always considered executable in cygwin causing which
25337    # to not find them
25338    if test "x$new_path" = x \
25339             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25340             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25341      new_path=`$CYGPATH -u "$path"`
25342    fi
25343    if test "x$new_path" = x; then
25344      # It's still not found. Now this is an unrecoverable error.
25345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25346$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25347      has_space=`$ECHO "$complete" | $GREP " "`
25348      if test "x$has_space" != x; then
25349        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25350$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25351      fi
25352      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25353    fi
25354  fi
25355
25356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25359  # "foo.exe" is OK but "foo" is an error.
25360  #
25361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25362  # It is also a way to make sure we got the proper file name for the real test later on.
25363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25364  if test "x$test_shortpath" = x; then
25365    # Short path failed, file does not exist as specified.
25366    # Try adding .exe or .cmd
25367    if test -f "${new_path}.exe"; then
25368       input_to_shortpath="${new_path}.exe"
25369    elif test -f "${new_path}.cmd"; then
25370       input_to_shortpath="${new_path}.cmd"
25371    else
25372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25373$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25374      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25375$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25376      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25377    fi
25378  else
25379    input_to_shortpath="$new_path"
25380  fi
25381
25382  # Call helper function which possibly converts this using DOS-style short mode.
25383  # If so, the updated path is stored in $new_path.
25384  new_path="$input_to_shortpath"
25385
25386  input_path="$input_to_shortpath"
25387  # Check if we need to convert this using DOS-style short mode. If the path
25388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25389  # take no chances and rewrite it.
25390  # Note: m4 eats our [], so we need to use [ and ] instead.
25391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25392  if test "x$has_forbidden_chars" != x; then
25393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25397      # Going to short mode and back again did indeed matter. Since short mode is
25398      # case insensitive, let's make it lowercase to improve readability.
25399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25400      # Now convert it back to Unix-stile (cygpath)
25401      input_path=`$CYGPATH -u "$shortmode_path"`
25402      new_path="$input_path"
25403    fi
25404  fi
25405
25406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25407  if test "x$test_cygdrive_prefix" = x; then
25408    # As a simple fix, exclude /usr/bin since it's not a real path.
25409    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25411      # a path prefixed by /cygdrive for fixpath to work.
25412      new_path="$CYGWIN_ROOT_PATH$input_path"
25413    fi
25414  fi
25415
25416  # remove trailing .exe if any
25417  new_path="${new_path/%.exe/}"
25418
25419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25420
25421  # First separate the path from the arguments. This will split at the first
25422  # space.
25423  complete="$MCS"
25424  path="${complete%% *}"
25425  tmp="$complete EOL"
25426  arguments="${tmp#* }"
25427
25428  # Input might be given as Windows format, start by converting to
25429  # unix format.
25430  new_path="$path"
25431
25432  windows_path="$new_path"
25433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25434    unix_path=`$CYGPATH -u "$windows_path"`
25435    new_path="$unix_path"
25436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25438    new_path="$unix_path"
25439  fi
25440
25441
25442  # Now try to locate executable using which
25443  new_path=`$WHICH "$new_path" 2> /dev/null`
25444
25445  if test "x$new_path" = x; then
25446    # Oops. Which didn't find the executable.
25447    # The splitting of arguments from the executable at a space might have been incorrect,
25448    # since paths with space are more likely in Windows. Give it another try with the whole
25449    # argument.
25450    path="$complete"
25451    arguments="EOL"
25452    new_path="$path"
25453
25454  windows_path="$new_path"
25455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25456    unix_path=`$CYGPATH -u "$windows_path"`
25457    new_path="$unix_path"
25458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25460    new_path="$unix_path"
25461  fi
25462
25463
25464    new_path=`$WHICH "$new_path" 2> /dev/null`
25465
25466    if test "x$new_path" = x; then
25467      # It's still not found. Now this is an unrecoverable error.
25468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25469$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25470      has_space=`$ECHO "$complete" | $GREP " "`
25471      if test "x$has_space" != x; then
25472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25474      fi
25475      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25476    fi
25477  fi
25478
25479  # Now new_path has a complete unix path to the binary
25480  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25481    # Keep paths in /bin as-is, but remove trailing .exe if any
25482    new_path="${new_path/%.exe/}"
25483    # Do not save /bin paths to all_fixpath_prefixes!
25484  else
25485    # Not in mixed or Windows style, start by that.
25486    new_path=`cmd //c echo $new_path`
25487
25488  input_path="$new_path"
25489  # Check if we need to convert this using DOS-style short mode. If the path
25490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25491  # take no chances and rewrite it.
25492  # Note: m4 eats our [], so we need to use [ and ] instead.
25493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25494  if test "x$has_forbidden_chars" != x; then
25495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25497  fi
25498
25499    # Output is in $new_path
25500
25501  windows_path="$new_path"
25502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25503    unix_path=`$CYGPATH -u "$windows_path"`
25504    new_path="$unix_path"
25505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25507    new_path="$unix_path"
25508  fi
25509
25510    # remove trailing .exe if any
25511    new_path="${new_path/%.exe/}"
25512
25513    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25514    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25515  fi
25516
25517  else
25518    # We're on a posix platform. Hooray! :)
25519    # First separate the path from the arguments. This will split at the first
25520    # space.
25521    complete="$MCS"
25522    path="${complete%% *}"
25523    tmp="$complete EOL"
25524    arguments="${tmp#* }"
25525
25526    # Cannot rely on the command "which" here since it doesn't always work.
25527    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25528    if test -z "$is_absolute_path"; then
25529      # Path to executable is not absolute. Find it.
25530      IFS_save="$IFS"
25531      IFS=:
25532      for p in $PATH; do
25533        if test -f "$p/$path" && test -x "$p/$path"; then
25534          new_path="$p/$path"
25535          break
25536        fi
25537      done
25538      IFS="$IFS_save"
25539    else
25540      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25541$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25542      new_path="$path"
25543    fi
25544
25545    if test "x$new_path" = x; then
25546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25547$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25548        has_space=`$ECHO "$complete" | $GREP " "`
25549        if test "x$has_space" != x; then
25550          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25551$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25552        fi
25553        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25554      fi
25555  fi
25556
25557      # Now join together the path and the arguments once again
25558      if test "x$arguments" != xEOL; then
25559        new_complete="$new_path ${arguments% *}"
25560      else
25561        new_complete="$new_path"
25562      fi
25563
25564  if test "x$complete" != "x$new_complete"; then
25565      MCS="$new_complete"
25566      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25567$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25568    fi
25569
25570elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25571    if test -n "$ac_tool_prefix"; then
25572  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25573set dummy ${ac_tool_prefix}nm; ac_word=$2
25574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25575$as_echo_n "checking for $ac_word... " >&6; }
25576if ${ac_cv_prog_NM+:} false; then :
25577  $as_echo_n "(cached) " >&6
25578else
25579  if test -n "$NM"; then
25580  ac_cv_prog_NM="$NM" # Let the user override the test.
25581else
25582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25583for as_dir in $PATH
25584do
25585  IFS=$as_save_IFS
25586  test -z "$as_dir" && as_dir=.
25587    for ac_exec_ext in '' $ac_executable_extensions; do
25588  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25589    ac_cv_prog_NM="${ac_tool_prefix}nm"
25590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25591    break 2
25592  fi
25593done
25594  done
25595IFS=$as_save_IFS
25596
25597fi
25598fi
25599NM=$ac_cv_prog_NM
25600if test -n "$NM"; then
25601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25602$as_echo "$NM" >&6; }
25603else
25604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25605$as_echo "no" >&6; }
25606fi
25607
25608
25609fi
25610if test -z "$ac_cv_prog_NM"; then
25611  ac_ct_NM=$NM
25612  # Extract the first word of "nm", so it can be a program name with args.
25613set dummy nm; ac_word=$2
25614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25615$as_echo_n "checking for $ac_word... " >&6; }
25616if ${ac_cv_prog_ac_ct_NM+:} false; then :
25617  $as_echo_n "(cached) " >&6
25618else
25619  if test -n "$ac_ct_NM"; then
25620  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25621else
25622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25623for as_dir in $PATH
25624do
25625  IFS=$as_save_IFS
25626  test -z "$as_dir" && as_dir=.
25627    for ac_exec_ext in '' $ac_executable_extensions; do
25628  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25629    ac_cv_prog_ac_ct_NM="nm"
25630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25631    break 2
25632  fi
25633done
25634  done
25635IFS=$as_save_IFS
25636
25637fi
25638fi
25639ac_ct_NM=$ac_cv_prog_ac_ct_NM
25640if test -n "$ac_ct_NM"; then
25641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25642$as_echo "$ac_ct_NM" >&6; }
25643else
25644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25645$as_echo "no" >&6; }
25646fi
25647
25648  if test "x$ac_ct_NM" = x; then
25649    NM=""
25650  else
25651    case $cross_compiling:$ac_tool_warned in
25652yes:)
25653{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25654$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25655ac_tool_warned=yes ;;
25656esac
25657    NM=$ac_ct_NM
25658  fi
25659else
25660  NM="$ac_cv_prog_NM"
25661fi
25662
25663
25664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25665
25666  # First separate the path from the arguments. This will split at the first
25667  # space.
25668  complete="$NM"
25669  path="${complete%% *}"
25670  tmp="$complete EOL"
25671  arguments="${tmp#* }"
25672
25673  # Input might be given as Windows format, start by converting to
25674  # unix format.
25675  new_path=`$CYGPATH -u "$path"`
25676
25677  # Now try to locate executable using which
25678  new_path=`$WHICH "$new_path" 2> /dev/null`
25679  # bat and cmd files are not always considered executable in cygwin causing which
25680  # to not find them
25681  if test "x$new_path" = x \
25682           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25683           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25684    new_path=`$CYGPATH -u "$path"`
25685  fi
25686  if test "x$new_path" = x; then
25687    # Oops. Which didn't find the executable.
25688    # The splitting of arguments from the executable at a space might have been incorrect,
25689    # since paths with space are more likely in Windows. Give it another try with the whole
25690    # argument.
25691    path="$complete"
25692    arguments="EOL"
25693    new_path=`$CYGPATH -u "$path"`
25694    new_path=`$WHICH "$new_path" 2> /dev/null`
25695    # bat and cmd files are not always considered executable in cygwin causing which
25696    # to not find them
25697    if test "x$new_path" = x \
25698             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25699             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25700      new_path=`$CYGPATH -u "$path"`
25701    fi
25702    if test "x$new_path" = x; then
25703      # It's still not found. Now this is an unrecoverable error.
25704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25705$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25706      has_space=`$ECHO "$complete" | $GREP " "`
25707      if test "x$has_space" != x; then
25708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25710      fi
25711      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25712    fi
25713  fi
25714
25715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25718  # "foo.exe" is OK but "foo" is an error.
25719  #
25720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25721  # It is also a way to make sure we got the proper file name for the real test later on.
25722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25723  if test "x$test_shortpath" = x; then
25724    # Short path failed, file does not exist as specified.
25725    # Try adding .exe or .cmd
25726    if test -f "${new_path}.exe"; then
25727       input_to_shortpath="${new_path}.exe"
25728    elif test -f "${new_path}.cmd"; then
25729       input_to_shortpath="${new_path}.cmd"
25730    else
25731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25732$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25733      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25734$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25735      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25736    fi
25737  else
25738    input_to_shortpath="$new_path"
25739  fi
25740
25741  # Call helper function which possibly converts this using DOS-style short mode.
25742  # If so, the updated path is stored in $new_path.
25743  new_path="$input_to_shortpath"
25744
25745  input_path="$input_to_shortpath"
25746  # Check if we need to convert this using DOS-style short mode. If the path
25747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25748  # take no chances and rewrite it.
25749  # Note: m4 eats our [], so we need to use [ and ] instead.
25750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25751  if test "x$has_forbidden_chars" != x; then
25752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25756      # Going to short mode and back again did indeed matter. Since short mode is
25757      # case insensitive, let's make it lowercase to improve readability.
25758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25759      # Now convert it back to Unix-stile (cygpath)
25760      input_path=`$CYGPATH -u "$shortmode_path"`
25761      new_path="$input_path"
25762    fi
25763  fi
25764
25765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25766  if test "x$test_cygdrive_prefix" = x; then
25767    # As a simple fix, exclude /usr/bin since it's not a real path.
25768    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25770      # a path prefixed by /cygdrive for fixpath to work.
25771      new_path="$CYGWIN_ROOT_PATH$input_path"
25772    fi
25773  fi
25774
25775  # remove trailing .exe if any
25776  new_path="${new_path/%.exe/}"
25777
25778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25779
25780  # First separate the path from the arguments. This will split at the first
25781  # space.
25782  complete="$NM"
25783  path="${complete%% *}"
25784  tmp="$complete EOL"
25785  arguments="${tmp#* }"
25786
25787  # Input might be given as Windows format, start by converting to
25788  # unix format.
25789  new_path="$path"
25790
25791  windows_path="$new_path"
25792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25793    unix_path=`$CYGPATH -u "$windows_path"`
25794    new_path="$unix_path"
25795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25797    new_path="$unix_path"
25798  fi
25799
25800
25801  # Now try to locate executable using which
25802  new_path=`$WHICH "$new_path" 2> /dev/null`
25803
25804  if test "x$new_path" = x; then
25805    # Oops. Which didn't find the executable.
25806    # The splitting of arguments from the executable at a space might have been incorrect,
25807    # since paths with space are more likely in Windows. Give it another try with the whole
25808    # argument.
25809    path="$complete"
25810    arguments="EOL"
25811    new_path="$path"
25812
25813  windows_path="$new_path"
25814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25815    unix_path=`$CYGPATH -u "$windows_path"`
25816    new_path="$unix_path"
25817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25819    new_path="$unix_path"
25820  fi
25821
25822
25823    new_path=`$WHICH "$new_path" 2> /dev/null`
25824
25825    if test "x$new_path" = x; then
25826      # It's still not found. Now this is an unrecoverable error.
25827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25828$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25829      has_space=`$ECHO "$complete" | $GREP " "`
25830      if test "x$has_space" != x; then
25831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25833      fi
25834      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25835    fi
25836  fi
25837
25838  # Now new_path has a complete unix path to the binary
25839  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25840    # Keep paths in /bin as-is, but remove trailing .exe if any
25841    new_path="${new_path/%.exe/}"
25842    # Do not save /bin paths to all_fixpath_prefixes!
25843  else
25844    # Not in mixed or Windows style, start by that.
25845    new_path=`cmd //c echo $new_path`
25846
25847  input_path="$new_path"
25848  # Check if we need to convert this using DOS-style short mode. If the path
25849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25850  # take no chances and rewrite it.
25851  # Note: m4 eats our [], so we need to use [ and ] instead.
25852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25853  if test "x$has_forbidden_chars" != x; then
25854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25856  fi
25857
25858    # Output is in $new_path
25859
25860  windows_path="$new_path"
25861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25862    unix_path=`$CYGPATH -u "$windows_path"`
25863    new_path="$unix_path"
25864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25866    new_path="$unix_path"
25867  fi
25868
25869    # remove trailing .exe if any
25870    new_path="${new_path/%.exe/}"
25871
25872    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25873    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25874  fi
25875
25876  else
25877    # We're on a posix platform. Hooray! :)
25878    # First separate the path from the arguments. This will split at the first
25879    # space.
25880    complete="$NM"
25881    path="${complete%% *}"
25882    tmp="$complete EOL"
25883    arguments="${tmp#* }"
25884
25885    # Cannot rely on the command "which" here since it doesn't always work.
25886    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25887    if test -z "$is_absolute_path"; then
25888      # Path to executable is not absolute. Find it.
25889      IFS_save="$IFS"
25890      IFS=:
25891      for p in $PATH; do
25892        if test -f "$p/$path" && test -x "$p/$path"; then
25893          new_path="$p/$path"
25894          break
25895        fi
25896      done
25897      IFS="$IFS_save"
25898    else
25899      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25900$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25901      new_path="$path"
25902    fi
25903
25904    if test "x$new_path" = x; then
25905        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25906$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25907        has_space=`$ECHO "$complete" | $GREP " "`
25908        if test "x$has_space" != x; then
25909          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25910$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25911        fi
25912        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25913      fi
25914  fi
25915
25916      # Now join together the path and the arguments once again
25917      if test "x$arguments" != xEOL; then
25918        new_complete="$new_path ${arguments% *}"
25919      else
25920        new_complete="$new_path"
25921      fi
25922
25923  if test "x$complete" != "x$new_complete"; then
25924      NM="$new_complete"
25925      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25926$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25927    fi
25928
25929    if test -n "$ac_tool_prefix"; then
25930  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25931set dummy ${ac_tool_prefix}strip; ac_word=$2
25932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25933$as_echo_n "checking for $ac_word... " >&6; }
25934if ${ac_cv_prog_STRIP+:} false; then :
25935  $as_echo_n "(cached) " >&6
25936else
25937  if test -n "$STRIP"; then
25938  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25939else
25940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25941for as_dir in $PATH
25942do
25943  IFS=$as_save_IFS
25944  test -z "$as_dir" && as_dir=.
25945    for ac_exec_ext in '' $ac_executable_extensions; do
25946  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25947    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25949    break 2
25950  fi
25951done
25952  done
25953IFS=$as_save_IFS
25954
25955fi
25956fi
25957STRIP=$ac_cv_prog_STRIP
25958if test -n "$STRIP"; then
25959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25960$as_echo "$STRIP" >&6; }
25961else
25962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25963$as_echo "no" >&6; }
25964fi
25965
25966
25967fi
25968if test -z "$ac_cv_prog_STRIP"; then
25969  ac_ct_STRIP=$STRIP
25970  # Extract the first word of "strip", so it can be a program name with args.
25971set dummy strip; ac_word=$2
25972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25973$as_echo_n "checking for $ac_word... " >&6; }
25974if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
25975  $as_echo_n "(cached) " >&6
25976else
25977  if test -n "$ac_ct_STRIP"; then
25978  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25979else
25980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25981for as_dir in $PATH
25982do
25983  IFS=$as_save_IFS
25984  test -z "$as_dir" && as_dir=.
25985    for ac_exec_ext in '' $ac_executable_extensions; do
25986  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25987    ac_cv_prog_ac_ct_STRIP="strip"
25988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25989    break 2
25990  fi
25991done
25992  done
25993IFS=$as_save_IFS
25994
25995fi
25996fi
25997ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25998if test -n "$ac_ct_STRIP"; then
25999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26000$as_echo "$ac_ct_STRIP" >&6; }
26001else
26002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26003$as_echo "no" >&6; }
26004fi
26005
26006  if test "x$ac_ct_STRIP" = x; then
26007    STRIP=""
26008  else
26009    case $cross_compiling:$ac_tool_warned in
26010yes:)
26011{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26012$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26013ac_tool_warned=yes ;;
26014esac
26015    STRIP=$ac_ct_STRIP
26016  fi
26017else
26018  STRIP="$ac_cv_prog_STRIP"
26019fi
26020
26021
26022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26023
26024  # First separate the path from the arguments. This will split at the first
26025  # space.
26026  complete="$STRIP"
26027  path="${complete%% *}"
26028  tmp="$complete EOL"
26029  arguments="${tmp#* }"
26030
26031  # Input might be given as Windows format, start by converting to
26032  # unix format.
26033  new_path=`$CYGPATH -u "$path"`
26034
26035  # Now try to locate executable using which
26036  new_path=`$WHICH "$new_path" 2> /dev/null`
26037  # bat and cmd files are not always considered executable in cygwin causing which
26038  # to not find them
26039  if test "x$new_path" = x \
26040           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26041           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26042    new_path=`$CYGPATH -u "$path"`
26043  fi
26044  if test "x$new_path" = x; then
26045    # Oops. Which didn't find the executable.
26046    # The splitting of arguments from the executable at a space might have been incorrect,
26047    # since paths with space are more likely in Windows. Give it another try with the whole
26048    # argument.
26049    path="$complete"
26050    arguments="EOL"
26051    new_path=`$CYGPATH -u "$path"`
26052    new_path=`$WHICH "$new_path" 2> /dev/null`
26053    # bat and cmd files are not always considered executable in cygwin causing which
26054    # to not find them
26055    if test "x$new_path" = x \
26056             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26057             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26058      new_path=`$CYGPATH -u "$path"`
26059    fi
26060    if test "x$new_path" = x; then
26061      # It's still not found. Now this is an unrecoverable error.
26062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26063$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26064      has_space=`$ECHO "$complete" | $GREP " "`
26065      if test "x$has_space" != x; then
26066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26068      fi
26069      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26070    fi
26071  fi
26072
26073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26076  # "foo.exe" is OK but "foo" is an error.
26077  #
26078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26079  # It is also a way to make sure we got the proper file name for the real test later on.
26080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26081  if test "x$test_shortpath" = x; then
26082    # Short path failed, file does not exist as specified.
26083    # Try adding .exe or .cmd
26084    if test -f "${new_path}.exe"; then
26085       input_to_shortpath="${new_path}.exe"
26086    elif test -f "${new_path}.cmd"; then
26087       input_to_shortpath="${new_path}.cmd"
26088    else
26089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26090$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26093      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26094    fi
26095  else
26096    input_to_shortpath="$new_path"
26097  fi
26098
26099  # Call helper function which possibly converts this using DOS-style short mode.
26100  # If so, the updated path is stored in $new_path.
26101  new_path="$input_to_shortpath"
26102
26103  input_path="$input_to_shortpath"
26104  # Check if we need to convert this using DOS-style short mode. If the path
26105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26106  # take no chances and rewrite it.
26107  # Note: m4 eats our [], so we need to use [ and ] instead.
26108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26109  if test "x$has_forbidden_chars" != x; then
26110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26114      # Going to short mode and back again did indeed matter. Since short mode is
26115      # case insensitive, let's make it lowercase to improve readability.
26116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26117      # Now convert it back to Unix-stile (cygpath)
26118      input_path=`$CYGPATH -u "$shortmode_path"`
26119      new_path="$input_path"
26120    fi
26121  fi
26122
26123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26124  if test "x$test_cygdrive_prefix" = x; then
26125    # As a simple fix, exclude /usr/bin since it's not a real path.
26126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26128      # a path prefixed by /cygdrive for fixpath to work.
26129      new_path="$CYGWIN_ROOT_PATH$input_path"
26130    fi
26131  fi
26132
26133  # remove trailing .exe if any
26134  new_path="${new_path/%.exe/}"
26135
26136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26137
26138  # First separate the path from the arguments. This will split at the first
26139  # space.
26140  complete="$STRIP"
26141  path="${complete%% *}"
26142  tmp="$complete EOL"
26143  arguments="${tmp#* }"
26144
26145  # Input might be given as Windows format, start by converting to
26146  # unix format.
26147  new_path="$path"
26148
26149  windows_path="$new_path"
26150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26151    unix_path=`$CYGPATH -u "$windows_path"`
26152    new_path="$unix_path"
26153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26155    new_path="$unix_path"
26156  fi
26157
26158
26159  # Now try to locate executable using which
26160  new_path=`$WHICH "$new_path" 2> /dev/null`
26161
26162  if test "x$new_path" = x; then
26163    # Oops. Which didn't find the executable.
26164    # The splitting of arguments from the executable at a space might have been incorrect,
26165    # since paths with space are more likely in Windows. Give it another try with the whole
26166    # argument.
26167    path="$complete"
26168    arguments="EOL"
26169    new_path="$path"
26170
26171  windows_path="$new_path"
26172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26173    unix_path=`$CYGPATH -u "$windows_path"`
26174    new_path="$unix_path"
26175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26177    new_path="$unix_path"
26178  fi
26179
26180
26181    new_path=`$WHICH "$new_path" 2> /dev/null`
26182
26183    if test "x$new_path" = x; then
26184      # It's still not found. Now this is an unrecoverable error.
26185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26186$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26187      has_space=`$ECHO "$complete" | $GREP " "`
26188      if test "x$has_space" != x; then
26189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26191      fi
26192      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26193    fi
26194  fi
26195
26196  # Now new_path has a complete unix path to the binary
26197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26198    # Keep paths in /bin as-is, but remove trailing .exe if any
26199    new_path="${new_path/%.exe/}"
26200    # Do not save /bin paths to all_fixpath_prefixes!
26201  else
26202    # Not in mixed or Windows style, start by that.
26203    new_path=`cmd //c echo $new_path`
26204
26205  input_path="$new_path"
26206  # Check if we need to convert this using DOS-style short mode. If the path
26207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26208  # take no chances and rewrite it.
26209  # Note: m4 eats our [], so we need to use [ and ] instead.
26210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26211  if test "x$has_forbidden_chars" != x; then
26212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26214  fi
26215
26216    # Output is in $new_path
26217
26218  windows_path="$new_path"
26219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26220    unix_path=`$CYGPATH -u "$windows_path"`
26221    new_path="$unix_path"
26222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26224    new_path="$unix_path"
26225  fi
26226
26227    # remove trailing .exe if any
26228    new_path="${new_path/%.exe/}"
26229
26230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26232  fi
26233
26234  else
26235    # We're on a posix platform. Hooray! :)
26236    # First separate the path from the arguments. This will split at the first
26237    # space.
26238    complete="$STRIP"
26239    path="${complete%% *}"
26240    tmp="$complete EOL"
26241    arguments="${tmp#* }"
26242
26243    # Cannot rely on the command "which" here since it doesn't always work.
26244    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26245    if test -z "$is_absolute_path"; then
26246      # Path to executable is not absolute. Find it.
26247      IFS_save="$IFS"
26248      IFS=:
26249      for p in $PATH; do
26250        if test -f "$p/$path" && test -x "$p/$path"; then
26251          new_path="$p/$path"
26252          break
26253        fi
26254      done
26255      IFS="$IFS_save"
26256    else
26257      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26258$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26259      new_path="$path"
26260    fi
26261
26262    if test "x$new_path" = x; then
26263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26264$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26265        has_space=`$ECHO "$complete" | $GREP " "`
26266        if test "x$has_space" != x; then
26267          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26268$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26269        fi
26270        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26271      fi
26272  fi
26273
26274      # Now join together the path and the arguments once again
26275      if test "x$arguments" != xEOL; then
26276        new_complete="$new_path ${arguments% *}"
26277      else
26278        new_complete="$new_path"
26279      fi
26280
26281  if test "x$complete" != "x$new_complete"; then
26282      STRIP="$new_complete"
26283      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26284$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26285    fi
26286
26287fi
26288
26289# objcopy is used for moving debug symbols to separate files when
26290# full debug symbols are enabled.
26291if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26292    if test -n "$ac_tool_prefix"; then
26293  for ac_prog in gobjcopy objcopy
26294  do
26295    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26296set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26298$as_echo_n "checking for $ac_word... " >&6; }
26299if ${ac_cv_prog_OBJCOPY+:} false; then :
26300  $as_echo_n "(cached) " >&6
26301else
26302  if test -n "$OBJCOPY"; then
26303  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26304else
26305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26306for as_dir in $PATH
26307do
26308  IFS=$as_save_IFS
26309  test -z "$as_dir" && as_dir=.
26310    for ac_exec_ext in '' $ac_executable_extensions; do
26311  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26312    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26314    break 2
26315  fi
26316done
26317  done
26318IFS=$as_save_IFS
26319
26320fi
26321fi
26322OBJCOPY=$ac_cv_prog_OBJCOPY
26323if test -n "$OBJCOPY"; then
26324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26325$as_echo "$OBJCOPY" >&6; }
26326else
26327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26328$as_echo "no" >&6; }
26329fi
26330
26331
26332    test -n "$OBJCOPY" && break
26333  done
26334fi
26335if test -z "$OBJCOPY"; then
26336  ac_ct_OBJCOPY=$OBJCOPY
26337  for ac_prog in gobjcopy objcopy
26338do
26339  # Extract the first word of "$ac_prog", so it can be a program name with args.
26340set dummy $ac_prog; ac_word=$2
26341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26342$as_echo_n "checking for $ac_word... " >&6; }
26343if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
26344  $as_echo_n "(cached) " >&6
26345else
26346  if test -n "$ac_ct_OBJCOPY"; then
26347  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26348else
26349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26350for as_dir in $PATH
26351do
26352  IFS=$as_save_IFS
26353  test -z "$as_dir" && as_dir=.
26354    for ac_exec_ext in '' $ac_executable_extensions; do
26355  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26356    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26358    break 2
26359  fi
26360done
26361  done
26362IFS=$as_save_IFS
26363
26364fi
26365fi
26366ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26367if test -n "$ac_ct_OBJCOPY"; then
26368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26369$as_echo "$ac_ct_OBJCOPY" >&6; }
26370else
26371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26372$as_echo "no" >&6; }
26373fi
26374
26375
26376  test -n "$ac_ct_OBJCOPY" && break
26377done
26378
26379  if test "x$ac_ct_OBJCOPY" = x; then
26380    OBJCOPY=""
26381  else
26382    case $cross_compiling:$ac_tool_warned in
26383yes:)
26384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26386ac_tool_warned=yes ;;
26387esac
26388    OBJCOPY=$ac_ct_OBJCOPY
26389  fi
26390fi
26391
26392    # Only call fixup if objcopy was found.
26393    if test -n "$OBJCOPY"; then
26394
26395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26396
26397  # First separate the path from the arguments. This will split at the first
26398  # space.
26399  complete="$OBJCOPY"
26400  path="${complete%% *}"
26401  tmp="$complete EOL"
26402  arguments="${tmp#* }"
26403
26404  # Input might be given as Windows format, start by converting to
26405  # unix format.
26406  new_path=`$CYGPATH -u "$path"`
26407
26408  # Now try to locate executable using which
26409  new_path=`$WHICH "$new_path" 2> /dev/null`
26410  # bat and cmd files are not always considered executable in cygwin causing which
26411  # to not find them
26412  if test "x$new_path" = x \
26413           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26414           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26415    new_path=`$CYGPATH -u "$path"`
26416  fi
26417  if test "x$new_path" = x; then
26418    # Oops. Which didn't find the executable.
26419    # The splitting of arguments from the executable at a space might have been incorrect,
26420    # since paths with space are more likely in Windows. Give it another try with the whole
26421    # argument.
26422    path="$complete"
26423    arguments="EOL"
26424    new_path=`$CYGPATH -u "$path"`
26425    new_path=`$WHICH "$new_path" 2> /dev/null`
26426    # bat and cmd files are not always considered executable in cygwin causing which
26427    # to not find them
26428    if test "x$new_path" = x \
26429             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26430             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26431      new_path=`$CYGPATH -u "$path"`
26432    fi
26433    if test "x$new_path" = x; then
26434      # It's still not found. Now this is an unrecoverable error.
26435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26436$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26437      has_space=`$ECHO "$complete" | $GREP " "`
26438      if test "x$has_space" != x; then
26439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26441      fi
26442      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26443    fi
26444  fi
26445
26446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26449  # "foo.exe" is OK but "foo" is an error.
26450  #
26451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26452  # It is also a way to make sure we got the proper file name for the real test later on.
26453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26454  if test "x$test_shortpath" = x; then
26455    # Short path failed, file does not exist as specified.
26456    # Try adding .exe or .cmd
26457    if test -f "${new_path}.exe"; then
26458       input_to_shortpath="${new_path}.exe"
26459    elif test -f "${new_path}.cmd"; then
26460       input_to_shortpath="${new_path}.cmd"
26461    else
26462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26463$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26464      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26465$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26466      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26467    fi
26468  else
26469    input_to_shortpath="$new_path"
26470  fi
26471
26472  # Call helper function which possibly converts this using DOS-style short mode.
26473  # If so, the updated path is stored in $new_path.
26474  new_path="$input_to_shortpath"
26475
26476  input_path="$input_to_shortpath"
26477  # Check if we need to convert this using DOS-style short mode. If the path
26478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26479  # take no chances and rewrite it.
26480  # Note: m4 eats our [], so we need to use [ and ] instead.
26481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26482  if test "x$has_forbidden_chars" != x; then
26483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26484    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26485    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26486    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26487      # Going to short mode and back again did indeed matter. Since short mode is
26488      # case insensitive, let's make it lowercase to improve readability.
26489      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26490      # Now convert it back to Unix-stile (cygpath)
26491      input_path=`$CYGPATH -u "$shortmode_path"`
26492      new_path="$input_path"
26493    fi
26494  fi
26495
26496  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26497  if test "x$test_cygdrive_prefix" = x; then
26498    # As a simple fix, exclude /usr/bin since it's not a real path.
26499    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26500      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26501      # a path prefixed by /cygdrive for fixpath to work.
26502      new_path="$CYGWIN_ROOT_PATH$input_path"
26503    fi
26504  fi
26505
26506  # remove trailing .exe if any
26507  new_path="${new_path/%.exe/}"
26508
26509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26510
26511  # First separate the path from the arguments. This will split at the first
26512  # space.
26513  complete="$OBJCOPY"
26514  path="${complete%% *}"
26515  tmp="$complete EOL"
26516  arguments="${tmp#* }"
26517
26518  # Input might be given as Windows format, start by converting to
26519  # unix format.
26520  new_path="$path"
26521
26522  windows_path="$new_path"
26523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26524    unix_path=`$CYGPATH -u "$windows_path"`
26525    new_path="$unix_path"
26526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26528    new_path="$unix_path"
26529  fi
26530
26531
26532  # Now try to locate executable using which
26533  new_path=`$WHICH "$new_path" 2> /dev/null`
26534
26535  if test "x$new_path" = x; then
26536    # Oops. Which didn't find the executable.
26537    # The splitting of arguments from the executable at a space might have been incorrect,
26538    # since paths with space are more likely in Windows. Give it another try with the whole
26539    # argument.
26540    path="$complete"
26541    arguments="EOL"
26542    new_path="$path"
26543
26544  windows_path="$new_path"
26545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26546    unix_path=`$CYGPATH -u "$windows_path"`
26547    new_path="$unix_path"
26548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26550    new_path="$unix_path"
26551  fi
26552
26553
26554    new_path=`$WHICH "$new_path" 2> /dev/null`
26555
26556    if test "x$new_path" = x; then
26557      # It's still not found. Now this is an unrecoverable error.
26558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26559$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26560      has_space=`$ECHO "$complete" | $GREP " "`
26561      if test "x$has_space" != x; then
26562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26564      fi
26565      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26566    fi
26567  fi
26568
26569  # Now new_path has a complete unix path to the binary
26570  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26571    # Keep paths in /bin as-is, but remove trailing .exe if any
26572    new_path="${new_path/%.exe/}"
26573    # Do not save /bin paths to all_fixpath_prefixes!
26574  else
26575    # Not in mixed or Windows style, start by that.
26576    new_path=`cmd //c echo $new_path`
26577
26578  input_path="$new_path"
26579  # Check if we need to convert this using DOS-style short mode. If the path
26580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26581  # take no chances and rewrite it.
26582  # Note: m4 eats our [], so we need to use [ and ] instead.
26583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26584  if test "x$has_forbidden_chars" != x; then
26585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26587  fi
26588
26589    # Output is in $new_path
26590
26591  windows_path="$new_path"
26592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26593    unix_path=`$CYGPATH -u "$windows_path"`
26594    new_path="$unix_path"
26595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26597    new_path="$unix_path"
26598  fi
26599
26600    # remove trailing .exe if any
26601    new_path="${new_path/%.exe/}"
26602
26603    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26604    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26605  fi
26606
26607  else
26608    # We're on a posix platform. Hooray! :)
26609    # First separate the path from the arguments. This will split at the first
26610    # space.
26611    complete="$OBJCOPY"
26612    path="${complete%% *}"
26613    tmp="$complete EOL"
26614    arguments="${tmp#* }"
26615
26616    # Cannot rely on the command "which" here since it doesn't always work.
26617    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26618    if test -z "$is_absolute_path"; then
26619      # Path to executable is not absolute. Find it.
26620      IFS_save="$IFS"
26621      IFS=:
26622      for p in $PATH; do
26623        if test -f "$p/$path" && test -x "$p/$path"; then
26624          new_path="$p/$path"
26625          break
26626        fi
26627      done
26628      IFS="$IFS_save"
26629    else
26630      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26631$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26632      new_path="$path"
26633    fi
26634
26635    if test "x$new_path" = x; then
26636        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26637$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26638        has_space=`$ECHO "$complete" | $GREP " "`
26639        if test "x$has_space" != x; then
26640          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26641$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26642        fi
26643        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26644      fi
26645  fi
26646
26647      # Now join together the path and the arguments once again
26648      if test "x$arguments" != xEOL; then
26649        new_complete="$new_path ${arguments% *}"
26650      else
26651        new_complete="$new_path"
26652      fi
26653
26654  if test "x$complete" != "x$new_complete"; then
26655      OBJCOPY="$new_complete"
26656      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26657$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26658    fi
26659
26660    fi
26661fi
26662
26663if test -n "$ac_tool_prefix"; then
26664  for ac_prog in gobjdump objdump
26665  do
26666    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26667set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26669$as_echo_n "checking for $ac_word... " >&6; }
26670if ${ac_cv_prog_OBJDUMP+:} false; then :
26671  $as_echo_n "(cached) " >&6
26672else
26673  if test -n "$OBJDUMP"; then
26674  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26675else
26676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26677for as_dir in $PATH
26678do
26679  IFS=$as_save_IFS
26680  test -z "$as_dir" && as_dir=.
26681    for ac_exec_ext in '' $ac_executable_extensions; do
26682  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26683    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26685    break 2
26686  fi
26687done
26688  done
26689IFS=$as_save_IFS
26690
26691fi
26692fi
26693OBJDUMP=$ac_cv_prog_OBJDUMP
26694if test -n "$OBJDUMP"; then
26695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26696$as_echo "$OBJDUMP" >&6; }
26697else
26698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26699$as_echo "no" >&6; }
26700fi
26701
26702
26703    test -n "$OBJDUMP" && break
26704  done
26705fi
26706if test -z "$OBJDUMP"; then
26707  ac_ct_OBJDUMP=$OBJDUMP
26708  for ac_prog in gobjdump objdump
26709do
26710  # Extract the first word of "$ac_prog", so it can be a program name with args.
26711set dummy $ac_prog; ac_word=$2
26712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26713$as_echo_n "checking for $ac_word... " >&6; }
26714if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
26715  $as_echo_n "(cached) " >&6
26716else
26717  if test -n "$ac_ct_OBJDUMP"; then
26718  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26719else
26720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26721for as_dir in $PATH
26722do
26723  IFS=$as_save_IFS
26724  test -z "$as_dir" && as_dir=.
26725    for ac_exec_ext in '' $ac_executable_extensions; do
26726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26727    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26729    break 2
26730  fi
26731done
26732  done
26733IFS=$as_save_IFS
26734
26735fi
26736fi
26737ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26738if test -n "$ac_ct_OBJDUMP"; then
26739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26740$as_echo "$ac_ct_OBJDUMP" >&6; }
26741else
26742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26743$as_echo "no" >&6; }
26744fi
26745
26746
26747  test -n "$ac_ct_OBJDUMP" && break
26748done
26749
26750  if test "x$ac_ct_OBJDUMP" = x; then
26751    OBJDUMP=""
26752  else
26753    case $cross_compiling:$ac_tool_warned in
26754yes:)
26755{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26756$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26757ac_tool_warned=yes ;;
26758esac
26759    OBJDUMP=$ac_ct_OBJDUMP
26760  fi
26761fi
26762
26763if test "x$OBJDUMP" != x; then
26764  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26765
26766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26767
26768  # First separate the path from the arguments. This will split at the first
26769  # space.
26770  complete="$OBJDUMP"
26771  path="${complete%% *}"
26772  tmp="$complete EOL"
26773  arguments="${tmp#* }"
26774
26775  # Input might be given as Windows format, start by converting to
26776  # unix format.
26777  new_path=`$CYGPATH -u "$path"`
26778
26779  # Now try to locate executable using which
26780  new_path=`$WHICH "$new_path" 2> /dev/null`
26781  # bat and cmd files are not always considered executable in cygwin causing which
26782  # to not find them
26783  if test "x$new_path" = x \
26784           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26785           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26786    new_path=`$CYGPATH -u "$path"`
26787  fi
26788  if test "x$new_path" = x; then
26789    # Oops. Which didn't find the executable.
26790    # The splitting of arguments from the executable at a space might have been incorrect,
26791    # since paths with space are more likely in Windows. Give it another try with the whole
26792    # argument.
26793    path="$complete"
26794    arguments="EOL"
26795    new_path=`$CYGPATH -u "$path"`
26796    new_path=`$WHICH "$new_path" 2> /dev/null`
26797    # bat and cmd files are not always considered executable in cygwin causing which
26798    # to not find them
26799    if test "x$new_path" = x \
26800             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26801             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26802      new_path=`$CYGPATH -u "$path"`
26803    fi
26804    if test "x$new_path" = x; then
26805      # It's still not found. Now this is an unrecoverable error.
26806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26807$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26808      has_space=`$ECHO "$complete" | $GREP " "`
26809      if test "x$has_space" != x; then
26810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26812      fi
26813      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26814    fi
26815  fi
26816
26817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26820  # "foo.exe" is OK but "foo" is an error.
26821  #
26822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26823  # It is also a way to make sure we got the proper file name for the real test later on.
26824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26825  if test "x$test_shortpath" = x; then
26826    # Short path failed, file does not exist as specified.
26827    # Try adding .exe or .cmd
26828    if test -f "${new_path}.exe"; then
26829       input_to_shortpath="${new_path}.exe"
26830    elif test -f "${new_path}.cmd"; then
26831       input_to_shortpath="${new_path}.cmd"
26832    else
26833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26834$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26835      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26836$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26837      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26838    fi
26839  else
26840    input_to_shortpath="$new_path"
26841  fi
26842
26843  # Call helper function which possibly converts this using DOS-style short mode.
26844  # If so, the updated path is stored in $new_path.
26845  new_path="$input_to_shortpath"
26846
26847  input_path="$input_to_shortpath"
26848  # Check if we need to convert this using DOS-style short mode. If the path
26849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26850  # take no chances and rewrite it.
26851  # Note: m4 eats our [], so we need to use [ and ] instead.
26852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26853  if test "x$has_forbidden_chars" != x; then
26854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26858      # Going to short mode and back again did indeed matter. Since short mode is
26859      # case insensitive, let's make it lowercase to improve readability.
26860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26861      # Now convert it back to Unix-stile (cygpath)
26862      input_path=`$CYGPATH -u "$shortmode_path"`
26863      new_path="$input_path"
26864    fi
26865  fi
26866
26867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26868  if test "x$test_cygdrive_prefix" = x; then
26869    # As a simple fix, exclude /usr/bin since it's not a real path.
26870    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26872      # a path prefixed by /cygdrive for fixpath to work.
26873      new_path="$CYGWIN_ROOT_PATH$input_path"
26874    fi
26875  fi
26876
26877  # remove trailing .exe if any
26878  new_path="${new_path/%.exe/}"
26879
26880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26881
26882  # First separate the path from the arguments. This will split at the first
26883  # space.
26884  complete="$OBJDUMP"
26885  path="${complete%% *}"
26886  tmp="$complete EOL"
26887  arguments="${tmp#* }"
26888
26889  # Input might be given as Windows format, start by converting to
26890  # unix format.
26891  new_path="$path"
26892
26893  windows_path="$new_path"
26894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26895    unix_path=`$CYGPATH -u "$windows_path"`
26896    new_path="$unix_path"
26897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26899    new_path="$unix_path"
26900  fi
26901
26902
26903  # Now try to locate executable using which
26904  new_path=`$WHICH "$new_path" 2> /dev/null`
26905
26906  if test "x$new_path" = x; then
26907    # Oops. Which didn't find the executable.
26908    # The splitting of arguments from the executable at a space might have been incorrect,
26909    # since paths with space are more likely in Windows. Give it another try with the whole
26910    # argument.
26911    path="$complete"
26912    arguments="EOL"
26913    new_path="$path"
26914
26915  windows_path="$new_path"
26916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26917    unix_path=`$CYGPATH -u "$windows_path"`
26918    new_path="$unix_path"
26919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26921    new_path="$unix_path"
26922  fi
26923
26924
26925    new_path=`$WHICH "$new_path" 2> /dev/null`
26926
26927    if test "x$new_path" = x; then
26928      # It's still not found. Now this is an unrecoverable error.
26929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26930$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26931      has_space=`$ECHO "$complete" | $GREP " "`
26932      if test "x$has_space" != x; then
26933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26935      fi
26936      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26937    fi
26938  fi
26939
26940  # Now new_path has a complete unix path to the binary
26941  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26942    # Keep paths in /bin as-is, but remove trailing .exe if any
26943    new_path="${new_path/%.exe/}"
26944    # Do not save /bin paths to all_fixpath_prefixes!
26945  else
26946    # Not in mixed or Windows style, start by that.
26947    new_path=`cmd //c echo $new_path`
26948
26949  input_path="$new_path"
26950  # Check if we need to convert this using DOS-style short mode. If the path
26951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26952  # take no chances and rewrite it.
26953  # Note: m4 eats our [], so we need to use [ and ] instead.
26954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26955  if test "x$has_forbidden_chars" != x; then
26956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26958  fi
26959
26960    # Output is in $new_path
26961
26962  windows_path="$new_path"
26963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26964    unix_path=`$CYGPATH -u "$windows_path"`
26965    new_path="$unix_path"
26966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26968    new_path="$unix_path"
26969  fi
26970
26971    # remove trailing .exe if any
26972    new_path="${new_path/%.exe/}"
26973
26974    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26975    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26976  fi
26977
26978  else
26979    # We're on a posix platform. Hooray! :)
26980    # First separate the path from the arguments. This will split at the first
26981    # space.
26982    complete="$OBJDUMP"
26983    path="${complete%% *}"
26984    tmp="$complete EOL"
26985    arguments="${tmp#* }"
26986
26987    # Cannot rely on the command "which" here since it doesn't always work.
26988    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26989    if test -z "$is_absolute_path"; then
26990      # Path to executable is not absolute. Find it.
26991      IFS_save="$IFS"
26992      IFS=:
26993      for p in $PATH; do
26994        if test -f "$p/$path" && test -x "$p/$path"; then
26995          new_path="$p/$path"
26996          break
26997        fi
26998      done
26999      IFS="$IFS_save"
27000    else
27001      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27002$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27003      new_path="$path"
27004    fi
27005
27006    if test "x$new_path" = x; then
27007        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27008$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27009        has_space=`$ECHO "$complete" | $GREP " "`
27010        if test "x$has_space" != x; then
27011          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27012$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27013        fi
27014        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27015      fi
27016  fi
27017
27018      # Now join together the path and the arguments once again
27019      if test "x$arguments" != xEOL; then
27020        new_complete="$new_path ${arguments% *}"
27021      else
27022        new_complete="$new_path"
27023      fi
27024
27025  if test "x$complete" != "x$new_complete"; then
27026      OBJDUMP="$new_complete"
27027      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27028$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27029    fi
27030
27031fi
27032
27033if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27034   # Extract the first word of "lipo", so it can be a program name with args.
27035set dummy lipo; ac_word=$2
27036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27037$as_echo_n "checking for $ac_word... " >&6; }
27038if ${ac_cv_path_LIPO+:} false; then :
27039  $as_echo_n "(cached) " >&6
27040else
27041  case $LIPO in
27042  [\\/]* | ?:[\\/]*)
27043  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27044  ;;
27045  *)
27046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27047for as_dir in $PATH
27048do
27049  IFS=$as_save_IFS
27050  test -z "$as_dir" && as_dir=.
27051    for ac_exec_ext in '' $ac_executable_extensions; do
27052  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27053    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27055    break 2
27056  fi
27057done
27058  done
27059IFS=$as_save_IFS
27060
27061  ;;
27062esac
27063fi
27064LIPO=$ac_cv_path_LIPO
27065if test -n "$LIPO"; then
27066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27067$as_echo "$LIPO" >&6; }
27068else
27069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27070$as_echo "no" >&6; }
27071fi
27072
27073
27074
27075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27076
27077  # First separate the path from the arguments. This will split at the first
27078  # space.
27079  complete="$LIPO"
27080  path="${complete%% *}"
27081  tmp="$complete EOL"
27082  arguments="${tmp#* }"
27083
27084  # Input might be given as Windows format, start by converting to
27085  # unix format.
27086  new_path=`$CYGPATH -u "$path"`
27087
27088  # Now try to locate executable using which
27089  new_path=`$WHICH "$new_path" 2> /dev/null`
27090  # bat and cmd files are not always considered executable in cygwin causing which
27091  # to not find them
27092  if test "x$new_path" = x \
27093           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27094           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27095    new_path=`$CYGPATH -u "$path"`
27096  fi
27097  if test "x$new_path" = x; then
27098    # Oops. Which didn't find the executable.
27099    # The splitting of arguments from the executable at a space might have been incorrect,
27100    # since paths with space are more likely in Windows. Give it another try with the whole
27101    # argument.
27102    path="$complete"
27103    arguments="EOL"
27104    new_path=`$CYGPATH -u "$path"`
27105    new_path=`$WHICH "$new_path" 2> /dev/null`
27106    # bat and cmd files are not always considered executable in cygwin causing which
27107    # to not find them
27108    if test "x$new_path" = x \
27109             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27110             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27111      new_path=`$CYGPATH -u "$path"`
27112    fi
27113    if test "x$new_path" = x; then
27114      # It's still not found. Now this is an unrecoverable error.
27115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27116$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27117      has_space=`$ECHO "$complete" | $GREP " "`
27118      if test "x$has_space" != x; then
27119        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27120$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27121      fi
27122      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27123    fi
27124  fi
27125
27126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27129  # "foo.exe" is OK but "foo" is an error.
27130  #
27131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27132  # It is also a way to make sure we got the proper file name for the real test later on.
27133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27134  if test "x$test_shortpath" = x; then
27135    # Short path failed, file does not exist as specified.
27136    # Try adding .exe or .cmd
27137    if test -f "${new_path}.exe"; then
27138       input_to_shortpath="${new_path}.exe"
27139    elif test -f "${new_path}.cmd"; then
27140       input_to_shortpath="${new_path}.cmd"
27141    else
27142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27143$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27144      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27145$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27146      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27147    fi
27148  else
27149    input_to_shortpath="$new_path"
27150  fi
27151
27152  # Call helper function which possibly converts this using DOS-style short mode.
27153  # If so, the updated path is stored in $new_path.
27154  new_path="$input_to_shortpath"
27155
27156  input_path="$input_to_shortpath"
27157  # Check if we need to convert this using DOS-style short mode. If the path
27158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27159  # take no chances and rewrite it.
27160  # Note: m4 eats our [], so we need to use [ and ] instead.
27161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27162  if test "x$has_forbidden_chars" != x; then
27163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27167      # Going to short mode and back again did indeed matter. Since short mode is
27168      # case insensitive, let's make it lowercase to improve readability.
27169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27170      # Now convert it back to Unix-stile (cygpath)
27171      input_path=`$CYGPATH -u "$shortmode_path"`
27172      new_path="$input_path"
27173    fi
27174  fi
27175
27176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27177  if test "x$test_cygdrive_prefix" = x; then
27178    # As a simple fix, exclude /usr/bin since it's not a real path.
27179    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27181      # a path prefixed by /cygdrive for fixpath to work.
27182      new_path="$CYGWIN_ROOT_PATH$input_path"
27183    fi
27184  fi
27185
27186  # remove trailing .exe if any
27187  new_path="${new_path/%.exe/}"
27188
27189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27190
27191  # First separate the path from the arguments. This will split at the first
27192  # space.
27193  complete="$LIPO"
27194  path="${complete%% *}"
27195  tmp="$complete EOL"
27196  arguments="${tmp#* }"
27197
27198  # Input might be given as Windows format, start by converting to
27199  # unix format.
27200  new_path="$path"
27201
27202  windows_path="$new_path"
27203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27204    unix_path=`$CYGPATH -u "$windows_path"`
27205    new_path="$unix_path"
27206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27208    new_path="$unix_path"
27209  fi
27210
27211
27212  # Now try to locate executable using which
27213  new_path=`$WHICH "$new_path" 2> /dev/null`
27214
27215  if test "x$new_path" = x; then
27216    # Oops. Which didn't find the executable.
27217    # The splitting of arguments from the executable at a space might have been incorrect,
27218    # since paths with space are more likely in Windows. Give it another try with the whole
27219    # argument.
27220    path="$complete"
27221    arguments="EOL"
27222    new_path="$path"
27223
27224  windows_path="$new_path"
27225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27226    unix_path=`$CYGPATH -u "$windows_path"`
27227    new_path="$unix_path"
27228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27230    new_path="$unix_path"
27231  fi
27232
27233
27234    new_path=`$WHICH "$new_path" 2> /dev/null`
27235
27236    if test "x$new_path" = x; then
27237      # It's still not found. Now this is an unrecoverable error.
27238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27239$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27240      has_space=`$ECHO "$complete" | $GREP " "`
27241      if test "x$has_space" != x; then
27242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27244      fi
27245      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27246    fi
27247  fi
27248
27249  # Now new_path has a complete unix path to the binary
27250  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27251    # Keep paths in /bin as-is, but remove trailing .exe if any
27252    new_path="${new_path/%.exe/}"
27253    # Do not save /bin paths to all_fixpath_prefixes!
27254  else
27255    # Not in mixed or Windows style, start by that.
27256    new_path=`cmd //c echo $new_path`
27257
27258  input_path="$new_path"
27259  # Check if we need to convert this using DOS-style short mode. If the path
27260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27261  # take no chances and rewrite it.
27262  # Note: m4 eats our [], so we need to use [ and ] instead.
27263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27264  if test "x$has_forbidden_chars" != x; then
27265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27267  fi
27268
27269    # Output is in $new_path
27270
27271  windows_path="$new_path"
27272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27273    unix_path=`$CYGPATH -u "$windows_path"`
27274    new_path="$unix_path"
27275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27277    new_path="$unix_path"
27278  fi
27279
27280    # remove trailing .exe if any
27281    new_path="${new_path/%.exe/}"
27282
27283    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27284    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27285  fi
27286
27287  else
27288    # We're on a posix platform. Hooray! :)
27289    # First separate the path from the arguments. This will split at the first
27290    # space.
27291    complete="$LIPO"
27292    path="${complete%% *}"
27293    tmp="$complete EOL"
27294    arguments="${tmp#* }"
27295
27296    # Cannot rely on the command "which" here since it doesn't always work.
27297    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27298    if test -z "$is_absolute_path"; then
27299      # Path to executable is not absolute. Find it.
27300      IFS_save="$IFS"
27301      IFS=:
27302      for p in $PATH; do
27303        if test -f "$p/$path" && test -x "$p/$path"; then
27304          new_path="$p/$path"
27305          break
27306        fi
27307      done
27308      IFS="$IFS_save"
27309    else
27310      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27311$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27312      new_path="$path"
27313    fi
27314
27315    if test "x$new_path" = x; then
27316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27317$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27318        has_space=`$ECHO "$complete" | $GREP " "`
27319        if test "x$has_space" != x; then
27320          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27321$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27322        fi
27323        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27324      fi
27325  fi
27326
27327      # Now join together the path and the arguments once again
27328      if test "x$arguments" != xEOL; then
27329        new_complete="$new_path ${arguments% *}"
27330      else
27331        new_complete="$new_path"
27332      fi
27333
27334  if test "x$complete" != "x$new_complete"; then
27335      LIPO="$new_complete"
27336      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27337$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27338    fi
27339
27340fi
27341
27342# Restore old path without tools dir
27343PATH="$OLD_PATH"
27344
27345
27346# FIXME: Currently we must test this after paths but before flags. Fix!
27347
27348# And we can test some aspects on the target using configure macros.
27349
27350
27351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27352$as_echo_n "checking for ANSI C header files... " >&6; }
27353if ${ac_cv_header_stdc+:} false; then :
27354  $as_echo_n "(cached) " >&6
27355else
27356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27357/* end confdefs.h.  */
27358#include <stdlib.h>
27359#include <stdarg.h>
27360#include <string.h>
27361#include <float.h>
27362
27363int
27364main ()
27365{
27366
27367  ;
27368  return 0;
27369}
27370_ACEOF
27371if ac_fn_cxx_try_compile "$LINENO"; then :
27372  ac_cv_header_stdc=yes
27373else
27374  ac_cv_header_stdc=no
27375fi
27376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27377
27378if test $ac_cv_header_stdc = yes; then
27379  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27380  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27381/* end confdefs.h.  */
27382#include <string.h>
27383
27384_ACEOF
27385if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27386  $EGREP "memchr" >/dev/null 2>&1; then :
27387
27388else
27389  ac_cv_header_stdc=no
27390fi
27391rm -f conftest*
27392
27393fi
27394
27395if test $ac_cv_header_stdc = yes; then
27396  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27398/* end confdefs.h.  */
27399#include <stdlib.h>
27400
27401_ACEOF
27402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27403  $EGREP "free" >/dev/null 2>&1; then :
27404
27405else
27406  ac_cv_header_stdc=no
27407fi
27408rm -f conftest*
27409
27410fi
27411
27412if test $ac_cv_header_stdc = yes; then
27413  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27414  if test "$cross_compiling" = yes; then :
27415  :
27416else
27417  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27418/* end confdefs.h.  */
27419#include <ctype.h>
27420#include <stdlib.h>
27421#if ((' ' & 0x0FF) == 0x020)
27422# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27423# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27424#else
27425# define ISLOWER(c) \
27426		   (('a' <= (c) && (c) <= 'i') \
27427		     || ('j' <= (c) && (c) <= 'r') \
27428		     || ('s' <= (c) && (c) <= 'z'))
27429# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27430#endif
27431
27432#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27433int
27434main ()
27435{
27436  int i;
27437  for (i = 0; i < 256; i++)
27438    if (XOR (islower (i), ISLOWER (i))
27439	|| toupper (i) != TOUPPER (i))
27440      return 2;
27441  return 0;
27442}
27443_ACEOF
27444if ac_fn_cxx_try_run "$LINENO"; then :
27445
27446else
27447  ac_cv_header_stdc=no
27448fi
27449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27450  conftest.$ac_objext conftest.beam conftest.$ac_ext
27451fi
27452
27453fi
27454fi
27455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27456$as_echo "$ac_cv_header_stdc" >&6; }
27457if test $ac_cv_header_stdc = yes; then
27458
27459$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27460
27461fi
27462
27463# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27464for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27465		  inttypes.h stdint.h unistd.h
27466do :
27467  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27468ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27469"
27470if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27471  cat >>confdefs.h <<_ACEOF
27472#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27473_ACEOF
27474
27475fi
27476
27477done
27478
27479
27480
27481###############################################################################
27482#
27483# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27484# (The JVM can use 32 or 64 bit Java pointers but that decision
27485# is made at runtime.)
27486#
27487if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27488  # Always specify -m flags on Solaris
27489
27490  # keep track of c/cxx flags that we added outselves...
27491  #   to prevent emitting warning...
27492  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27493  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27494  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27495
27496  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27497  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27498  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27499
27500  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27501  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27502  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27503
27504elif test "x$COMPILE_TYPE" = xreduced; then
27505  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27506    # Specify -m if running reduced on other Posix platforms
27507
27508  # keep track of c/cxx flags that we added outselves...
27509  #   to prevent emitting warning...
27510  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27511  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27512  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27513
27514  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27515  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27516  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27517
27518  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27519  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27520  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27521
27522  fi
27523fi
27524
27525# Make compilation sanity check
27526for ac_header in stdio.h
27527do :
27528  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27529if test "x$ac_cv_header_stdio_h" = xyes; then :
27530  cat >>confdefs.h <<_ACEOF
27531#define HAVE_STDIO_H 1
27532_ACEOF
27533
27534else
27535
27536  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27537$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27538  if test "x$COMPILE_TYPE" = xreduced; then
27539    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27540$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27541  elif test "x$COMPILE_TYPE" = xcross; then
27542    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27543$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27544  fi
27545  as_fn_error $? "Cannot continue." "$LINENO" 5
27546
27547fi
27548
27549done
27550
27551
27552# The cast to long int works around a bug in the HP C Compiler
27553# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27554# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27555# This bug is HP SR number 8606223364.
27556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27557$as_echo_n "checking size of int *... " >&6; }
27558if ${ac_cv_sizeof_int_p+:} false; then :
27559  $as_echo_n "(cached) " >&6
27560else
27561  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27562
27563else
27564  if test "$ac_cv_type_int_p" = yes; then
27565     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27567as_fn_error 77 "cannot compute sizeof (int *)
27568See \`config.log' for more details" "$LINENO" 5; }
27569   else
27570     ac_cv_sizeof_int_p=0
27571   fi
27572fi
27573
27574fi
27575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27576$as_echo "$ac_cv_sizeof_int_p" >&6; }
27577
27578
27579
27580cat >>confdefs.h <<_ACEOF
27581#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27582_ACEOF
27583
27584
27585
27586if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27587  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27588  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27589fi
27590
27591if test "x$SIZEOF_INT_P" = x; then
27592    # The test failed, lets stick to the assumed value.
27593    { $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
27594$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27595else
27596    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27597
27598    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27599        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
27600    fi
27601fi
27602
27603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27604$as_echo_n "checking for target address size... " >&6; }
27605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27606$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27607
27608
27609###############################################################################
27610#
27611# Is the target little of big endian?
27612#
27613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27614$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27615if ${ac_cv_c_bigendian+:} false; then :
27616  $as_echo_n "(cached) " >&6
27617else
27618  ac_cv_c_bigendian=unknown
27619    # See if we're dealing with a universal compiler.
27620    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27621/* end confdefs.h.  */
27622#ifndef __APPLE_CC__
27623	       not a universal capable compiler
27624	     #endif
27625	     typedef int dummy;
27626
27627_ACEOF
27628if ac_fn_cxx_try_compile "$LINENO"; then :
27629
27630	# Check for potential -arch flags.  It is not universal unless
27631	# there are at least two -arch flags with different values.
27632	ac_arch=
27633	ac_prev=
27634	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27635	 if test -n "$ac_prev"; then
27636	   case $ac_word in
27637	     i?86 | x86_64 | ppc | ppc64)
27638	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27639		 ac_arch=$ac_word
27640	       else
27641		 ac_cv_c_bigendian=universal
27642		 break
27643	       fi
27644	       ;;
27645	   esac
27646	   ac_prev=
27647	 elif test "x$ac_word" = "x-arch"; then
27648	   ac_prev=arch
27649	 fi
27650       done
27651fi
27652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27653    if test $ac_cv_c_bigendian = unknown; then
27654      # See if sys/param.h defines the BYTE_ORDER macro.
27655      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27656/* end confdefs.h.  */
27657#include <sys/types.h>
27658	     #include <sys/param.h>
27659
27660int
27661main ()
27662{
27663#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27664		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27665		     && LITTLE_ENDIAN)
27666	      bogus endian macros
27667	     #endif
27668
27669  ;
27670  return 0;
27671}
27672_ACEOF
27673if ac_fn_cxx_try_compile "$LINENO"; then :
27674  # It does; now see whether it defined to BIG_ENDIAN or not.
27675	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27676/* end confdefs.h.  */
27677#include <sys/types.h>
27678		#include <sys/param.h>
27679
27680int
27681main ()
27682{
27683#if BYTE_ORDER != BIG_ENDIAN
27684		 not big endian
27685		#endif
27686
27687  ;
27688  return 0;
27689}
27690_ACEOF
27691if ac_fn_cxx_try_compile "$LINENO"; then :
27692  ac_cv_c_bigendian=yes
27693else
27694  ac_cv_c_bigendian=no
27695fi
27696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27697fi
27698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27699    fi
27700    if test $ac_cv_c_bigendian = unknown; then
27701      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27702      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27703/* end confdefs.h.  */
27704#include <limits.h>
27705
27706int
27707main ()
27708{
27709#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27710	      bogus endian macros
27711	     #endif
27712
27713  ;
27714  return 0;
27715}
27716_ACEOF
27717if ac_fn_cxx_try_compile "$LINENO"; then :
27718  # It does; now see whether it defined to _BIG_ENDIAN or not.
27719	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27720/* end confdefs.h.  */
27721#include <limits.h>
27722
27723int
27724main ()
27725{
27726#ifndef _BIG_ENDIAN
27727		 not big endian
27728		#endif
27729
27730  ;
27731  return 0;
27732}
27733_ACEOF
27734if ac_fn_cxx_try_compile "$LINENO"; then :
27735  ac_cv_c_bigendian=yes
27736else
27737  ac_cv_c_bigendian=no
27738fi
27739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27740fi
27741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27742    fi
27743    if test $ac_cv_c_bigendian = unknown; then
27744      # Compile a test program.
27745      if test "$cross_compiling" = yes; then :
27746  # Try to guess by grepping values from an object file.
27747	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27748/* end confdefs.h.  */
27749short int ascii_mm[] =
27750		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27751		short int ascii_ii[] =
27752		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27753		int use_ascii (int i) {
27754		  return ascii_mm[i] + ascii_ii[i];
27755		}
27756		short int ebcdic_ii[] =
27757		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27758		short int ebcdic_mm[] =
27759		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27760		int use_ebcdic (int i) {
27761		  return ebcdic_mm[i] + ebcdic_ii[i];
27762		}
27763		extern int foo;
27764
27765int
27766main ()
27767{
27768return use_ascii (foo) == use_ebcdic (foo);
27769  ;
27770  return 0;
27771}
27772_ACEOF
27773if ac_fn_cxx_try_compile "$LINENO"; then :
27774  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27775	      ac_cv_c_bigendian=yes
27776	    fi
27777	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27778	      if test "$ac_cv_c_bigendian" = unknown; then
27779		ac_cv_c_bigendian=no
27780	      else
27781		# finding both strings is unlikely to happen, but who knows?
27782		ac_cv_c_bigendian=unknown
27783	      fi
27784	    fi
27785fi
27786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27787else
27788  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27789/* end confdefs.h.  */
27790$ac_includes_default
27791int
27792main ()
27793{
27794
27795	     /* Are we little or big endian?  From Harbison&Steele.  */
27796	     union
27797	     {
27798	       long int l;
27799	       char c[sizeof (long int)];
27800	     } u;
27801	     u.l = 1;
27802	     return u.c[sizeof (long int) - 1] == 1;
27803
27804  ;
27805  return 0;
27806}
27807_ACEOF
27808if ac_fn_cxx_try_run "$LINENO"; then :
27809  ac_cv_c_bigendian=no
27810else
27811  ac_cv_c_bigendian=yes
27812fi
27813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27814  conftest.$ac_objext conftest.beam conftest.$ac_ext
27815fi
27816
27817    fi
27818fi
27819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27820$as_echo "$ac_cv_c_bigendian" >&6; }
27821 case $ac_cv_c_bigendian in #(
27822   yes)
27823     ENDIAN="big";; #(
27824   no)
27825     ENDIAN="little" ;; #(
27826   universal)
27827     ENDIAN="universal_endianness"
27828     ;; #(
27829   *)
27830     ENDIAN="unknown" ;;
27831 esac
27832
27833
27834if test "x$ENDIAN" = xuniversal_endianness; then
27835    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27836fi
27837if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27838    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
27839fi
27840
27841
27842# Configure flags for the tools
27843
27844
27845###############################################################################
27846#
27847# How to compile shared libraries.
27848#
27849
27850if test "x$GCC" = xyes; then
27851    COMPILER_NAME=gcc
27852    PICFLAG="-fPIC"
27853    LIBRARY_PREFIX=lib
27854    SHARED_LIBRARY='lib$1.so'
27855    STATIC_LIBRARY='lib$1.a'
27856    SHARED_LIBRARY_FLAGS="-shared"
27857    SHARED_LIBRARY_SUFFIX='.so'
27858    STATIC_LIBRARY_SUFFIX='.a'
27859    OBJ_SUFFIX='.o'
27860    EXE_SUFFIX=''
27861    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27862    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27863    C_FLAG_REORDER=''
27864    CXX_FLAG_REORDER=''
27865    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27866    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27867    LD="$CC"
27868    LDEXE="$CC"
27869    LDCXX="$CXX"
27870    LDEXECXX="$CXX"
27871    POST_STRIP_CMD="$STRIP -g"
27872
27873    # Linking is different on MacOSX
27874    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27875        # Might change in the future to clang.
27876        COMPILER_NAME=gcc
27877        SHARED_LIBRARY='lib$1.dylib'
27878        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27879        SHARED_LIBRARY_SUFFIX='.dylib'
27880        EXE_SUFFIX=''
27881        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27882        SET_SHARED_LIBRARY_MAPFILE=''
27883        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27884        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27885        POST_STRIP_CMD="$STRIP -S"
27886    fi
27887else
27888    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27889        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27890        COMPILER_NAME=ossc
27891        PICFLAG="-KPIC"
27892        LIBRARY_PREFIX=lib
27893        SHARED_LIBRARY='lib$1.so'
27894        STATIC_LIBRARY='lib$1.a'
27895        SHARED_LIBRARY_FLAGS="-G"
27896        SHARED_LIBRARY_SUFFIX='.so'
27897        STATIC_LIBRARY_SUFFIX='.a'
27898        OBJ_SUFFIX='.o'
27899        EXE_SUFFIX=''
27900        SET_SHARED_LIBRARY_NAME=''
27901        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27902	C_FLAG_REORDER='-xF'
27903	CXX_FLAG_REORDER='-xF'
27904        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27905        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27906        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27907        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27908        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27909        POST_STRIP_CMD="$STRIP -x"
27910        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27911    fi
27912    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27913        # If it is not gcc, then assume it is the MS Visual Studio compiler
27914        COMPILER_NAME=cl
27915        PICFLAG=""
27916        LIBRARY_PREFIX=
27917        SHARED_LIBRARY='$1.dll'
27918        STATIC_LIBRARY='$1.lib'
27919        SHARED_LIBRARY_FLAGS="-LD"
27920        SHARED_LIBRARY_SUFFIX='.dll'
27921        STATIC_LIBRARY_SUFFIX='.lib'
27922        OBJ_SUFFIX='.obj'
27923        EXE_SUFFIX='.exe'
27924        SET_SHARED_LIBRARY_NAME=''
27925        SET_SHARED_LIBRARY_MAPFILE=''
27926        SET_SHARED_LIBRARY_ORIGIN=''
27927        SET_EXECUTABLE_ORIGIN=''
27928    fi
27929fi
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948# The (cross) compiler is now configured, we can now test capabilities
27949# of the target platform.
27950
27951
27952
27953###############################################################################
27954#
27955# Setup the opt flags for different compilers
27956# and different operating systems.
27957#
27958
27959#
27960# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27961#
27962if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27963    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27964    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27965    CFLAGS="$CFLAGS -mstackrealign"
27966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27967$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27968    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27969/* end confdefs.h.  */
27970int main() { return 0; }
27971_ACEOF
27972if ac_fn_cxx_try_link "$LINENO"; then :
27973
27974		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27975$as_echo "yes" >&6; }
27976
27977else
27978
27979		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27980$as_echo "no" >&6; }
27981	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27982
27983fi
27984rm -f core conftest.err conftest.$ac_objext \
27985    conftest$ac_exeext conftest.$ac_ext
27986fi
27987
27988C_FLAG_DEPS="-MMD -MF"
27989CXX_FLAG_DEPS="-MMD -MF"
27990
27991case $COMPILER_TYPE in
27992  CC )
27993    D_FLAG="-g"
27994    case $COMPILER_NAME in
27995      gcc )
27996      	case $OPENJDK_TARGET_OS in
27997	  macosx )
27998	    # On MacOSX we optimize for size, something
27999	    # we should do for all platforms?
28000	    C_O_FLAG_HI="-Os"
28001	    C_O_FLAG_NORM="-Os"
28002	    C_O_FLAG_NONE=""
28003	    ;;
28004	  *)
28005	    C_O_FLAG_HI="-O3"
28006	    C_O_FLAG_NORM="-O2"
28007	    C_O_FLAG_NONE="-O0"
28008	    CFLAGS_DEBUG_SYMBOLS="-g"
28009	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28010	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28011	       CFLAGS_DEBUG_SYMBOLS="-g1"
28012	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28013	    fi
28014	    ;;
28015	esac
28016        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28017        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28018        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28019        ;;
28020      ossc )
28021        #
28022        # Forte has different names for this with their C++ compiler...
28023        #
28024        C_FLAG_DEPS="-xMMD -xMF"
28025        CXX_FLAG_DEPS="-xMMD -xMF"
28026
28027        # Extra options used with HIGHEST
28028        #
28029        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28030        #          done with care, there are some assumptions below that need to
28031        #          be understood about the use of pointers, and IEEE behavior.
28032        #
28033        # Use non-standard floating point mode (not IEEE 754)
28034        CC_HIGHEST="$CC_HIGHEST -fns"
28035        # Do some simplification of floating point arithmetic (not IEEE 754)
28036        CC_HIGHEST="$CC_HIGHEST -fsimple"
28037        # Use single precision floating point with 'float'
28038        CC_HIGHEST="$CC_HIGHEST -fsingle"
28039        # Assume memory references via basic pointer types do not alias
28040        #   (Source with excessing pointer casting and data access with mixed
28041        #    pointer types are not recommended)
28042        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28043        # Use intrinsic or inline versions for math/std functions
28044        #   (If you expect perfect errno behavior, do not use this)
28045        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28046        # Loop data dependency optimizations (need -xO3 or higher)
28047        CC_HIGHEST="$CC_HIGHEST -xdepend"
28048        # Pointer parameters to functions do not overlap
28049        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28050        #    If you pass in multiple pointers to the same data, do not use this)
28051        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28052        # Inline some library routines
28053        #   (If you expect perfect errno behavior, do not use this)
28054        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28055        # Use optimized math routines
28056        #   (If you expect perfect errno behavior, do not use this)
28057        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28058        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28059
28060        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28061          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28062          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28063        fi
28064
28065        case $OPENJDK_TARGET_CPU_ARCH in
28066          x86)
28067            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28068            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28069            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28070            C_O_FLAG_NONE="-xregs=no%frameptr"
28071            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28072            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28073            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28074            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28075            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28076               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28077               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28078            fi
28079            ;;
28080          sparc)
28081            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28082            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28083            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28084            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28085            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28086            C_O_FLAG_NONE=""
28087            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28088            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28089            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28090            CXX_O_FLAG_NONE=""
28091            ;;
28092        esac
28093
28094    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28095    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28096    esac
28097    ;;
28098  CL )
28099    D_FLAG=
28100    C_O_FLAG_HIGHEST="-O2"
28101    C_O_FLAG_HI="-O1"
28102    C_O_FLAG_NORM="-O1"
28103    C_O_FLAG_NONE="-Od"
28104    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28105    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28106    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28107    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28108    ;;
28109esac
28110
28111if test -z "$C_O_FLAG_HIGHEST"; then
28112   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28113fi
28114
28115if test -z "$CXX_O_FLAG_HIGHEST"; then
28116   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28117fi
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28133   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28134$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28135fi
28136
28137if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28138   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28139$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28140fi
28141
28142if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28143   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28144$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28145fi
28146
28147
28148# Check whether --with-extra-cflags was given.
28149if test "${with_extra_cflags+set}" = set; then :
28150  withval=$with_extra_cflags;
28151fi
28152
28153
28154
28155# Check whether --with-extra-cxxflags was given.
28156if test "${with_extra_cxxflags+set}" = set; then :
28157  withval=$with_extra_cxxflags;
28158fi
28159
28160
28161
28162# Check whether --with-extra-ldflags was given.
28163if test "${with_extra_ldflags+set}" = set; then :
28164  withval=$with_extra_ldflags;
28165fi
28166
28167
28168CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28169CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28170LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28171
28172# Hotspot needs these set in their legacy form
28173LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28174LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28175LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28176
28177
28178
28179
28180
28181###############################################################################
28182#
28183# Now setup the CFLAGS and LDFLAGS for the JDK build.
28184# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28185#
28186case $COMPILER_NAME in
28187      gcc )
28188      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28189                          -pipe \
28190                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28191	  case $OPENJDK_TARGET_CPU_ARCH in
28192	  arm )
28193            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28194	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28195	  ;;
28196	  ppc )
28197            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28198	  ;;
28199	  * )
28200	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28201	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28202          ;;
28203	  esac
28204          ;;
28205      ossc )
28206          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28207          case $OPENJDK_TARGET_CPU_ARCH in
28208          x86 )
28209            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28210       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28211          ;;
28212          esac
28213
28214      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28215      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28216
28217          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28218          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28219          ;;
28220      cl )
28221          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28222               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28223	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28224	       -DWIN32 -DIAL"
28225          case $OPENJDK_TARGET_CPU in
28226              x86 )
28227                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28228                  ;;
28229              x86_64 )
28230                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28231                  ;;
28232          esac
28233          ;;
28234esac
28235
28236###############################################################################
28237
28238CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28239
28240# The package path is used only on macosx?
28241PACKAGE_PATH=/opt/local
28242
28243
28244if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28245    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28246    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28247    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28248    #   Note: -Dmacro         is the same as    #define macro 1
28249    #         -Dmacro=	    is the same as    #define macro
28250    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28251        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28252    else
28253        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28254    fi
28255else
28256    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28257fi
28258if test "x$OPENJDK_TARGET_OS" = xlinux; then
28259    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28260fi
28261if test "x$OPENJDK_TARGET_OS" = xwindows; then
28262    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28263fi
28264if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28265    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28266fi
28267if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28268    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28269    # Adding these macros will make it an error to link to mac APIs newer than OS version 10.7
28270    MACOSX_REQUIRED_VERSION=1070
28271
28272    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(MACOSX_REQUIRED_VERSION) -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(MACOSX_REQUIRED_VERSION)"
28273fi
28274if test "x$OPENJDK_TARGET_OS" = xbsd; then
28275    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28276fi
28277if test "x$DEBUG_LEVEL" = xrelease; then
28278    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28279    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28280        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28281    fi
28282else
28283    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28284fi
28285
28286CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28287CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28288
28289CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28290        -I${JDK_OUTPUTDIR}/include \
28291        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28292        -I${JDK_TOPDIR}/src/share/javavm/export \
28293        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28294        -I${JDK_TOPDIR}/src/share/native/common \
28295        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28296
28297# The shared libraries are compiled using the picflag.
28298CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28299CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28300
28301# Executable flags
28302CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28303CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28304
28305# Now this is odd. The JDK native libraries have to link against libjvm.so
28306# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28307# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28308# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28309# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28310# libraries will link to whatever is in memory. Yuck.
28311#
28312# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28313if test "x$COMPILER_NAME" = xcl; then
28314    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28315    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28316        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28317    fi
28318    # TODO: make -debug optional "--disable-full-debug-symbols"
28319    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28320    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28321    LDFLAGS_JDKLIB_SUFFIX=""
28322    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28323        LDFLAGS_STACK_SIZE=1048576
28324    else
28325        LDFLAGS_STACK_SIZE=327680
28326    fi
28327    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28328else
28329    if test "x$COMPILER_NAME" = xgcc; then
28330        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28331        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28332        if test -n "$HAS_GNU_HASH"; then
28333            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28334        fi
28335        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28336          # And since we now know that the linker is gnu, then add -z defs, to forbid
28337          # undefined symbols in object files.
28338          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28339          if test "x$DEBUG_LEVEL" = "xrelease"; then
28340              # When building release libraries, tell the linker optimize them.
28341              # Should this be supplied to the OSS linker as well?
28342              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28343          fi
28344        fi
28345    fi
28346    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28347                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28348
28349    # On some platforms (mac) the linker warns about non existing -L dirs.
28350    # Add server first if available. Linking aginst client does not always produce the same results.
28351    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28352    # Default to server for other variants.
28353    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28354        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28355    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28356        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28357    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28358        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28359    else
28360        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28361    fi
28362
28363    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28364    if test "x$COMPILER_NAME" = xossc; then
28365        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28366    fi
28367
28368    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28369    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28370        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28371    fi
28372fi
28373
28374# Adjust flags according to debug level.
28375case $DEBUG_LEVEL in
28376      fastdebug )
28377              CFLAGS="$CFLAGS $D_FLAG"
28378              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28379              ;;
28380      slowdebug )
28381              CFLAGS="$CFLAGS $D_FLAG"
28382	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28383	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28384	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28385	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28386              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28387              ;;
28388esac
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404# Setup debug symbols (need objcopy from the toolchain for that)
28405
28406#
28407# ENABLE_DEBUG_SYMBOLS
28408# This must be done after the toolchain is setup, since we're looking at objcopy.
28409#
28410# Check whether --enable-debug-symbols was given.
28411if test "${enable_debug_symbols+set}" = set; then :
28412  enableval=$enable_debug_symbols;
28413fi
28414
28415
28416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28417$as_echo_n "checking if we should generate debug symbols... " >&6; }
28418
28419if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28420   # explicit enabling of enable-debug-symbols and can't find objcopy
28421   #   this is an error
28422   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28423fi
28424
28425if test "x$enable_debug_symbols" = "xyes"; then
28426  ENABLE_DEBUG_SYMBOLS=true
28427elif test "x$enable_debug_symbols" = "xno"; then
28428  ENABLE_DEBUG_SYMBOLS=false
28429else
28430  # default on macosx is false
28431  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28432    ENABLE_DEBUG_SYMBOLS=false
28433  # Default is on if objcopy is found, otherwise off
28434  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28435    ENABLE_DEBUG_SYMBOLS=true
28436  else
28437    ENABLE_DEBUG_SYMBOLS=false
28438  fi
28439fi
28440
28441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28442$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28443
28444#
28445# ZIP_DEBUGINFO_FILES
28446#
28447# Check whether --enable-zip-debug-info was given.
28448if test "${enable_zip_debug_info+set}" = set; then :
28449  enableval=$enable_zip_debug_info;
28450fi
28451
28452
28453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28454$as_echo_n "checking if we should zip debug-info files... " >&6; }
28455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28456$as_echo "${enable_zip_debug_info}" >&6; }
28457
28458if test "x${enable_zip_debug_info}" = "xno"; then
28459   ZIP_DEBUGINFO_FILES=false
28460else
28461   ZIP_DEBUGINFO_FILES=true
28462fi
28463
28464
28465
28466
28467
28468
28469
28470###############################################################################
28471#
28472# Check dependencies for external and internal libraries.
28473#
28474###############################################################################
28475
28476
28477
28478###############################################################################
28479#
28480# OS specific settings that we never will need to probe.
28481#
28482if test "x$OPENJDK_TARGET_OS" = xlinux; then
28483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28484$as_echo_n "checking what is not needed on Linux?... " >&6; }
28485    PULSE_NOT_NEEDED=yes
28486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28487$as_echo "pulse" >&6; }
28488fi
28489
28490if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28492$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28493    ALSA_NOT_NEEDED=yes
28494    PULSE_NOT_NEEDED=yes
28495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28496$as_echo "alsa pulse" >&6; }
28497fi
28498
28499if test "x$OPENJDK_TARGET_OS" = xwindows; then
28500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28501$as_echo_n "checking what is not needed on Windows?... " >&6; }
28502    CUPS_NOT_NEEDED=yes
28503    ALSA_NOT_NEEDED=yes
28504    PULSE_NOT_NEEDED=yes
28505    X11_NOT_NEEDED=yes
28506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28507$as_echo "alsa cups pulse x11" >&6; }
28508fi
28509
28510if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28511    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28512$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28513    ALSA_NOT_NEEDED=yes
28514    PULSE_NOT_NEEDED=yes
28515    X11_NOT_NEEDED=yes
28516    FREETYPE2_NOT_NEEDED=yes
28517    # If the java runtime framework is disabled, then we need X11.
28518    # This will be adjusted below.
28519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28520$as_echo "alsa pulse x11" >&6; }
28521fi
28522
28523if test "x$OPENJDK_TARGET_OS" = xbsd; then
28524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28525$as_echo_n "checking what is not needed on bsd?... " >&6; }
28526    ALSA_NOT_NEEDED=yes
28527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28528$as_echo "alsa" >&6; }
28529fi
28530
28531if test "x$OPENJDK" = "xfalse"; then
28532    FREETYPE2_NOT_NEEDED=yes
28533fi
28534
28535if test "x$SUPPORT_HEADFUL" = xno; then
28536    X11_NOT_NEEDED=yes
28537fi
28538
28539###############################################################################
28540#
28541# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28542# that uses this API.
28543#
28544# Check whether --enable-macosx-runtime-support was given.
28545if test "${enable_macosx_runtime_support+set}" = set; then :
28546  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28547else
28548  MACOSX_RUNTIME_SUPPORT="no"
28549fi
28550
28551
28552USE_MACOSX_RUNTIME_SUPPORT=no
28553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28554$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28555if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28556    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28557        MACOSX_RUNTIME_SUPPORT=yes
28558        USE_MACOSX_RUNTIME_SUPPORT=yes
28559        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28560$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28561    else
28562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28563$as_echo "yes, but explicitly disabled." >&6; }
28564    fi
28565else
28566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28567$as_echo "no" >&6; }
28568fi
28569
28570if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28572$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28573    X11_NOT_NEEDED=
28574    FREETYPE2_NOT_NEEDED=
28575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28576$as_echo "alsa pulse" >&6; }
28577fi
28578
28579
28580
28581
28582###############################################################################
28583#
28584# Check for X Windows
28585#
28586
28587# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28588# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28589# --x-libraries for the sysroot, if that seems to be correct.
28590if test "x$SYS_ROOT" != "x/"; then
28591  if test "x$x_includes" = xNONE; then
28592    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28593      x_includes="$SYS_ROOT/usr/X11R6/include"
28594    fi
28595  fi
28596  if test "x$x_libraries" = xNONE; then
28597    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28598      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28599    fi
28600  fi
28601fi
28602
28603# Now let autoconf do it's magic
28604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28605$as_echo_n "checking for X... " >&6; }
28606
28607
28608# Check whether --with-x was given.
28609if test "${with_x+set}" = set; then :
28610  withval=$with_x;
28611fi
28612
28613# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28614if test "x$with_x" = xno; then
28615  # The user explicitly disabled X.
28616  have_x=disabled
28617else
28618  case $x_includes,$x_libraries in #(
28619    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
28620    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
28621  $as_echo_n "(cached) " >&6
28622else
28623  # One or both of the vars are not set, and there is no cached value.
28624ac_x_includes=no ac_x_libraries=no
28625rm -f -r conftest.dir
28626if mkdir conftest.dir; then
28627  cd conftest.dir
28628  cat >Imakefile <<'_ACEOF'
28629incroot:
28630	@echo incroot='${INCROOT}'
28631usrlibdir:
28632	@echo usrlibdir='${USRLIBDIR}'
28633libdir:
28634	@echo libdir='${LIBDIR}'
28635_ACEOF
28636  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28637    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28638    for ac_var in incroot usrlibdir libdir; do
28639      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28640    done
28641    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28642    for ac_extension in a so sl dylib la dll; do
28643      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28644	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28645	ac_im_usrlibdir=$ac_im_libdir; break
28646      fi
28647    done
28648    # Screen out bogus values from the imake configuration.  They are
28649    # bogus both because they are the default anyway, and because
28650    # using them would break gcc on systems where it needs fixed includes.
28651    case $ac_im_incroot in
28652	/usr/include) ac_x_includes= ;;
28653	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28654    esac
28655    case $ac_im_usrlibdir in
28656	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28657	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28658    esac
28659  fi
28660  cd ..
28661  rm -f -r conftest.dir
28662fi
28663
28664# Standard set of common directories for X headers.
28665# Check X11 before X11Rn because it is often a symlink to the current release.
28666ac_x_header_dirs='
28667/usr/X11/include
28668/usr/X11R7/include
28669/usr/X11R6/include
28670/usr/X11R5/include
28671/usr/X11R4/include
28672
28673/usr/include/X11
28674/usr/include/X11R7
28675/usr/include/X11R6
28676/usr/include/X11R5
28677/usr/include/X11R4
28678
28679/usr/local/X11/include
28680/usr/local/X11R7/include
28681/usr/local/X11R6/include
28682/usr/local/X11R5/include
28683/usr/local/X11R4/include
28684
28685/usr/local/include/X11
28686/usr/local/include/X11R7
28687/usr/local/include/X11R6
28688/usr/local/include/X11R5
28689/usr/local/include/X11R4
28690
28691/usr/X386/include
28692/usr/x386/include
28693/usr/XFree86/include/X11
28694
28695/usr/include
28696/usr/local/include
28697/usr/unsupported/include
28698/usr/athena/include
28699/usr/local/x11r5/include
28700/usr/lpp/Xamples/include
28701
28702/usr/openwin/include
28703/usr/openwin/share/include'
28704
28705if test "$ac_x_includes" = no; then
28706  # Guess where to find include files, by looking for Xlib.h.
28707  # First, try using that file with no special directory specified.
28708  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28709/* end confdefs.h.  */
28710#include <X11/Xlib.h>
28711_ACEOF
28712if ac_fn_cxx_try_cpp "$LINENO"; then :
28713  # We can compile using X headers with no special include directory.
28714ac_x_includes=
28715else
28716  for ac_dir in $ac_x_header_dirs; do
28717  if test -r "$ac_dir/X11/Xlib.h"; then
28718    ac_x_includes=$ac_dir
28719    break
28720  fi
28721done
28722fi
28723rm -f conftest.err conftest.i conftest.$ac_ext
28724fi # $ac_x_includes = no
28725
28726if test "$ac_x_libraries" = no; then
28727  # Check for the libraries.
28728  # See if we find them without any special options.
28729  # Don't add to $LIBS permanently.
28730  ac_save_LIBS=$LIBS
28731  LIBS="-lX11 $LIBS"
28732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28733/* end confdefs.h.  */
28734#include <X11/Xlib.h>
28735int
28736main ()
28737{
28738XrmInitialize ()
28739  ;
28740  return 0;
28741}
28742_ACEOF
28743if ac_fn_cxx_try_link "$LINENO"; then :
28744  LIBS=$ac_save_LIBS
28745# We can link X programs with no special library path.
28746ac_x_libraries=
28747else
28748  LIBS=$ac_save_LIBS
28749for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28750do
28751  # Don't even attempt the hair of trying to link an X program!
28752  for ac_extension in a so sl dylib la dll; do
28753    if test -r "$ac_dir/libX11.$ac_extension"; then
28754      ac_x_libraries=$ac_dir
28755      break 2
28756    fi
28757  done
28758done
28759fi
28760rm -f core conftest.err conftest.$ac_objext \
28761    conftest$ac_exeext conftest.$ac_ext
28762fi # $ac_x_libraries = no
28763
28764case $ac_x_includes,$ac_x_libraries in #(
28765  no,* | *,no | *\'*)
28766    # Didn't find X, or a directory has "'" in its name.
28767    ac_cv_have_x="have_x=no";; #(
28768  *)
28769    # Record where we found X for the cache.
28770    ac_cv_have_x="have_x=yes\
28771	ac_x_includes='$ac_x_includes'\
28772	ac_x_libraries='$ac_x_libraries'"
28773esac
28774fi
28775;; #(
28776    *) have_x=yes;;
28777  esac
28778  eval "$ac_cv_have_x"
28779fi # $with_x != no
28780
28781if test "$have_x" != yes; then
28782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28783$as_echo "$have_x" >&6; }
28784  no_x=yes
28785else
28786  # If each of the values was on the command line, it overrides each guess.
28787  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28788  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28789  # Update the cache value to reflect the command line values.
28790  ac_cv_have_x="have_x=yes\
28791	ac_x_includes='$x_includes'\
28792	ac_x_libraries='$x_libraries'"
28793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28794$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28795fi
28796
28797if test "$no_x" = yes; then
28798  # Not all programs may use this symbol, but it does not hurt to define it.
28799
28800$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28801
28802  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28803else
28804  if test -n "$x_includes"; then
28805    X_CFLAGS="$X_CFLAGS -I$x_includes"
28806  fi
28807
28808  # It would also be nice to do this for all -L options, not just this one.
28809  if test -n "$x_libraries"; then
28810    X_LIBS="$X_LIBS -L$x_libraries"
28811    # For Solaris; some versions of Sun CC require a space after -R and
28812    # others require no space.  Words are not sufficient . . . .
28813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28814$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28815    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28816    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28817    ac_cxx_werror_flag=yes
28818    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28819/* end confdefs.h.  */
28820
28821int
28822main ()
28823{
28824
28825  ;
28826  return 0;
28827}
28828_ACEOF
28829if ac_fn_cxx_try_link "$LINENO"; then :
28830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28831$as_echo "no" >&6; }
28832       X_LIBS="$X_LIBS -R$x_libraries"
28833else
28834  LIBS="$ac_xsave_LIBS -R $x_libraries"
28835       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28836/* end confdefs.h.  */
28837
28838int
28839main ()
28840{
28841
28842  ;
28843  return 0;
28844}
28845_ACEOF
28846if ac_fn_cxx_try_link "$LINENO"; then :
28847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28848$as_echo "yes" >&6; }
28849	  X_LIBS="$X_LIBS -R $x_libraries"
28850else
28851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28852$as_echo "neither works" >&6; }
28853fi
28854rm -f core conftest.err conftest.$ac_objext \
28855    conftest$ac_exeext conftest.$ac_ext
28856fi
28857rm -f core conftest.err conftest.$ac_objext \
28858    conftest$ac_exeext conftest.$ac_ext
28859    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28860    LIBS=$ac_xsave_LIBS
28861  fi
28862
28863  # Check for system-dependent libraries X programs must link with.
28864  # Do this before checking for the system-independent R6 libraries
28865  # (-lICE), since we may need -lsocket or whatever for X linking.
28866
28867  if test "$ISC" = yes; then
28868    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28869  else
28870    # Martyn Johnson says this is needed for Ultrix, if the X
28871    # libraries were built with DECnet support.  And Karl Berry says
28872    # the Alpha needs dnet_stub (dnet does not exist).
28873    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28874    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28875/* end confdefs.h.  */
28876
28877/* Override any GCC internal prototype to avoid an error.
28878   Use char because int might match the return type of a GCC
28879   builtin and then its argument prototype would still apply.  */
28880#ifdef __cplusplus
28881extern "C"
28882#endif
28883char XOpenDisplay ();
28884int
28885main ()
28886{
28887return XOpenDisplay ();
28888  ;
28889  return 0;
28890}
28891_ACEOF
28892if ac_fn_cxx_try_link "$LINENO"; then :
28893
28894else
28895  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28896$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28897if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
28898  $as_echo_n "(cached) " >&6
28899else
28900  ac_check_lib_save_LIBS=$LIBS
28901LIBS="-ldnet  $LIBS"
28902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28903/* end confdefs.h.  */
28904
28905/* Override any GCC internal prototype to avoid an error.
28906   Use char because int might match the return type of a GCC
28907   builtin and then its argument prototype would still apply.  */
28908#ifdef __cplusplus
28909extern "C"
28910#endif
28911char dnet_ntoa ();
28912int
28913main ()
28914{
28915return dnet_ntoa ();
28916  ;
28917  return 0;
28918}
28919_ACEOF
28920if ac_fn_cxx_try_link "$LINENO"; then :
28921  ac_cv_lib_dnet_dnet_ntoa=yes
28922else
28923  ac_cv_lib_dnet_dnet_ntoa=no
28924fi
28925rm -f core conftest.err conftest.$ac_objext \
28926    conftest$ac_exeext conftest.$ac_ext
28927LIBS=$ac_check_lib_save_LIBS
28928fi
28929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28930$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28931if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
28932  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28933fi
28934
28935    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28936      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28937$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28938if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
28939  $as_echo_n "(cached) " >&6
28940else
28941  ac_check_lib_save_LIBS=$LIBS
28942LIBS="-ldnet_stub  $LIBS"
28943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28944/* end confdefs.h.  */
28945
28946/* Override any GCC internal prototype to avoid an error.
28947   Use char because int might match the return type of a GCC
28948   builtin and then its argument prototype would still apply.  */
28949#ifdef __cplusplus
28950extern "C"
28951#endif
28952char dnet_ntoa ();
28953int
28954main ()
28955{
28956return dnet_ntoa ();
28957  ;
28958  return 0;
28959}
28960_ACEOF
28961if ac_fn_cxx_try_link "$LINENO"; then :
28962  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28963else
28964  ac_cv_lib_dnet_stub_dnet_ntoa=no
28965fi
28966rm -f core conftest.err conftest.$ac_objext \
28967    conftest$ac_exeext conftest.$ac_ext
28968LIBS=$ac_check_lib_save_LIBS
28969fi
28970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28971$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28972if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
28973  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28974fi
28975
28976    fi
28977fi
28978rm -f core conftest.err conftest.$ac_objext \
28979    conftest$ac_exeext conftest.$ac_ext
28980    LIBS="$ac_xsave_LIBS"
28981
28982    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28983    # to get the SysV transport functions.
28984    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28985    # needs -lnsl.
28986    # The nsl library prevents programs from opening the X display
28987    # on Irix 5.2, according to T.E. Dickey.
28988    # The functions gethostbyname, getservbyname, and inet_addr are
28989    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28990    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28991if test "x$ac_cv_func_gethostbyname" = xyes; then :
28992
28993fi
28994
28995    if test $ac_cv_func_gethostbyname = no; then
28996      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28997$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28998if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
28999  $as_echo_n "(cached) " >&6
29000else
29001  ac_check_lib_save_LIBS=$LIBS
29002LIBS="-lnsl  $LIBS"
29003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29004/* end confdefs.h.  */
29005
29006/* Override any GCC internal prototype to avoid an error.
29007   Use char because int might match the return type of a GCC
29008   builtin and then its argument prototype would still apply.  */
29009#ifdef __cplusplus
29010extern "C"
29011#endif
29012char gethostbyname ();
29013int
29014main ()
29015{
29016return gethostbyname ();
29017  ;
29018  return 0;
29019}
29020_ACEOF
29021if ac_fn_cxx_try_link "$LINENO"; then :
29022  ac_cv_lib_nsl_gethostbyname=yes
29023else
29024  ac_cv_lib_nsl_gethostbyname=no
29025fi
29026rm -f core conftest.err conftest.$ac_objext \
29027    conftest$ac_exeext conftest.$ac_ext
29028LIBS=$ac_check_lib_save_LIBS
29029fi
29030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29031$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29032if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
29033  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29034fi
29035
29036      if test $ac_cv_lib_nsl_gethostbyname = no; then
29037	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29038$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29039if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
29040  $as_echo_n "(cached) " >&6
29041else
29042  ac_check_lib_save_LIBS=$LIBS
29043LIBS="-lbsd  $LIBS"
29044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29045/* end confdefs.h.  */
29046
29047/* Override any GCC internal prototype to avoid an error.
29048   Use char because int might match the return type of a GCC
29049   builtin and then its argument prototype would still apply.  */
29050#ifdef __cplusplus
29051extern "C"
29052#endif
29053char gethostbyname ();
29054int
29055main ()
29056{
29057return gethostbyname ();
29058  ;
29059  return 0;
29060}
29061_ACEOF
29062if ac_fn_cxx_try_link "$LINENO"; then :
29063  ac_cv_lib_bsd_gethostbyname=yes
29064else
29065  ac_cv_lib_bsd_gethostbyname=no
29066fi
29067rm -f core conftest.err conftest.$ac_objext \
29068    conftest$ac_exeext conftest.$ac_ext
29069LIBS=$ac_check_lib_save_LIBS
29070fi
29071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29072$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29073if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
29074  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29075fi
29076
29077      fi
29078    fi
29079
29080    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29081    # socket/setsockopt and other routines are undefined under SCO ODT
29082    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29083    # on later versions), says Simon Leinen: it contains gethostby*
29084    # variants that don't use the name server (or something).  -lsocket
29085    # must be given before -lnsl if both are needed.  We assume that
29086    # if connect needs -lnsl, so does gethostbyname.
29087    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29088if test "x$ac_cv_func_connect" = xyes; then :
29089
29090fi
29091
29092    if test $ac_cv_func_connect = no; then
29093      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29094$as_echo_n "checking for connect in -lsocket... " >&6; }
29095if ${ac_cv_lib_socket_connect+:} false; then :
29096  $as_echo_n "(cached) " >&6
29097else
29098  ac_check_lib_save_LIBS=$LIBS
29099LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29101/* end confdefs.h.  */
29102
29103/* Override any GCC internal prototype to avoid an error.
29104   Use char because int might match the return type of a GCC
29105   builtin and then its argument prototype would still apply.  */
29106#ifdef __cplusplus
29107extern "C"
29108#endif
29109char connect ();
29110int
29111main ()
29112{
29113return connect ();
29114  ;
29115  return 0;
29116}
29117_ACEOF
29118if ac_fn_cxx_try_link "$LINENO"; then :
29119  ac_cv_lib_socket_connect=yes
29120else
29121  ac_cv_lib_socket_connect=no
29122fi
29123rm -f core conftest.err conftest.$ac_objext \
29124    conftest$ac_exeext conftest.$ac_ext
29125LIBS=$ac_check_lib_save_LIBS
29126fi
29127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29128$as_echo "$ac_cv_lib_socket_connect" >&6; }
29129if test "x$ac_cv_lib_socket_connect" = xyes; then :
29130  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29131fi
29132
29133    fi
29134
29135    # Guillermo Gomez says -lposix is necessary on A/UX.
29136    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29137if test "x$ac_cv_func_remove" = xyes; then :
29138
29139fi
29140
29141    if test $ac_cv_func_remove = no; then
29142      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29143$as_echo_n "checking for remove in -lposix... " >&6; }
29144if ${ac_cv_lib_posix_remove+:} false; then :
29145  $as_echo_n "(cached) " >&6
29146else
29147  ac_check_lib_save_LIBS=$LIBS
29148LIBS="-lposix  $LIBS"
29149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29150/* end confdefs.h.  */
29151
29152/* Override any GCC internal prototype to avoid an error.
29153   Use char because int might match the return type of a GCC
29154   builtin and then its argument prototype would still apply.  */
29155#ifdef __cplusplus
29156extern "C"
29157#endif
29158char remove ();
29159int
29160main ()
29161{
29162return remove ();
29163  ;
29164  return 0;
29165}
29166_ACEOF
29167if ac_fn_cxx_try_link "$LINENO"; then :
29168  ac_cv_lib_posix_remove=yes
29169else
29170  ac_cv_lib_posix_remove=no
29171fi
29172rm -f core conftest.err conftest.$ac_objext \
29173    conftest$ac_exeext conftest.$ac_ext
29174LIBS=$ac_check_lib_save_LIBS
29175fi
29176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29177$as_echo "$ac_cv_lib_posix_remove" >&6; }
29178if test "x$ac_cv_lib_posix_remove" = xyes; then :
29179  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29180fi
29181
29182    fi
29183
29184    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29185    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29186if test "x$ac_cv_func_shmat" = xyes; then :
29187
29188fi
29189
29190    if test $ac_cv_func_shmat = no; then
29191      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29192$as_echo_n "checking for shmat in -lipc... " >&6; }
29193if ${ac_cv_lib_ipc_shmat+:} false; then :
29194  $as_echo_n "(cached) " >&6
29195else
29196  ac_check_lib_save_LIBS=$LIBS
29197LIBS="-lipc  $LIBS"
29198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29199/* end confdefs.h.  */
29200
29201/* Override any GCC internal prototype to avoid an error.
29202   Use char because int might match the return type of a GCC
29203   builtin and then its argument prototype would still apply.  */
29204#ifdef __cplusplus
29205extern "C"
29206#endif
29207char shmat ();
29208int
29209main ()
29210{
29211return shmat ();
29212  ;
29213  return 0;
29214}
29215_ACEOF
29216if ac_fn_cxx_try_link "$LINENO"; then :
29217  ac_cv_lib_ipc_shmat=yes
29218else
29219  ac_cv_lib_ipc_shmat=no
29220fi
29221rm -f core conftest.err conftest.$ac_objext \
29222    conftest$ac_exeext conftest.$ac_ext
29223LIBS=$ac_check_lib_save_LIBS
29224fi
29225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29226$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29227if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
29228  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29229fi
29230
29231    fi
29232  fi
29233
29234  # Check for libraries that X11R6 Xt/Xaw programs need.
29235  ac_save_LDFLAGS=$LDFLAGS
29236  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29237  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29238  # check for ICE first), but we must link in the order -lSM -lICE or
29239  # we get undefined symbols.  So assume we have SM if we have ICE.
29240  # These have to be linked with before -lX11, unlike the other
29241  # libraries we check for below, so use a different variable.
29242  # John Interrante, Karl Berry
29243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29244$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29245if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
29246  $as_echo_n "(cached) " >&6
29247else
29248  ac_check_lib_save_LIBS=$LIBS
29249LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29251/* end confdefs.h.  */
29252
29253/* Override any GCC internal prototype to avoid an error.
29254   Use char because int might match the return type of a GCC
29255   builtin and then its argument prototype would still apply.  */
29256#ifdef __cplusplus
29257extern "C"
29258#endif
29259char IceConnectionNumber ();
29260int
29261main ()
29262{
29263return IceConnectionNumber ();
29264  ;
29265  return 0;
29266}
29267_ACEOF
29268if ac_fn_cxx_try_link "$LINENO"; then :
29269  ac_cv_lib_ICE_IceConnectionNumber=yes
29270else
29271  ac_cv_lib_ICE_IceConnectionNumber=no
29272fi
29273rm -f core conftest.err conftest.$ac_objext \
29274    conftest$ac_exeext conftest.$ac_ext
29275LIBS=$ac_check_lib_save_LIBS
29276fi
29277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29278$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29279if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
29280  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29281fi
29282
29283  LDFLAGS=$ac_save_LDFLAGS
29284
29285fi
29286
29287
29288# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29289# this doesn't make sense so we remove it.
29290if test "x$COMPILE_TYPE" = xcross; then
29291  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29292fi
29293
29294if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29295
29296    # Print a helpful message on how to acquire the necessary build dependency.
29297    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29298    MISSING_DEPENDENCY=x11
29299    PKGHANDLER_COMMAND=
29300
29301    case $PKGHANDLER in
29302	apt-get)
29303                apt_help     $MISSING_DEPENDENCY ;;
29304    yum)
29305                yum_help     $MISSING_DEPENDENCY ;;
29306	port)
29307                port_help    $MISSING_DEPENDENCY ;;
29308	pkgutil)
29309                pkgutil_help $MISSING_DEPENDENCY ;;
29310	pkgadd)
29311                pkgadd_help  $MISSING_DEPENDENCY ;;
29312    * )
29313      break ;;
29314    esac
29315
29316    if test "x$PKGHANDLER_COMMAND" != x; then
29317        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29318    fi
29319
29320    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29321fi
29322
29323# Some of the old makefiles require a setting of OPENWIN_HOME
29324# Since the X11R6 directory has disappeared on later Linuxes,
29325# we need to probe for it.
29326if test "x$OPENJDK_TARGET_OS" = xlinux; then
29327    if test -d "$SYS_ROOT/usr/X11R6"; then
29328        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29329    fi
29330    if test -d "$SYS_ROOT/usr/include/X11"; then
29331        OPENWIN_HOME="$SYS_ROOT/usr"
29332    fi
29333fi
29334if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29335    OPENWIN_HOME="/usr/openwin"
29336fi
29337
29338
29339
29340#
29341# Weird Sol10 something check...TODO change to try compile
29342#
29343if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29344  if test "`uname -r`" = "5.10"; then
29345     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29346     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29347     fi
29348  fi
29349fi
29350
29351ac_ext=c
29352ac_cpp='$CPP $CPPFLAGS'
29353ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29354ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29355ac_compiler_gnu=$ac_cv_c_compiler_gnu
29356
29357OLD_CFLAGS="$CFLAGS"
29358CFLAGS="$CFLAGS $X_CFLAGS"
29359
29360# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29361for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29362do :
29363  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29364ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29365                   # include <X11/Xutil.h>
29366
29367"
29368if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29369  cat >>confdefs.h <<_ACEOF
29370#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29371_ACEOF
29372 X11_A_OK=yes
29373else
29374  X11_A_OK=no
29375fi
29376
29377done
29378
29379
29380CFLAGS="$OLD_CFLAGS"
29381ac_ext=cpp
29382ac_cpp='$CXXCPP $CPPFLAGS'
29383ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29384ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29385ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29386
29387
29388if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29389
29390    # Print a helpful message on how to acquire the necessary build dependency.
29391    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29392    MISSING_DEPENDENCY=x11
29393    PKGHANDLER_COMMAND=
29394
29395    case $PKGHANDLER in
29396	apt-get)
29397                apt_help     $MISSING_DEPENDENCY ;;
29398    yum)
29399                yum_help     $MISSING_DEPENDENCY ;;
29400	port)
29401                port_help    $MISSING_DEPENDENCY ;;
29402	pkgutil)
29403                pkgutil_help $MISSING_DEPENDENCY ;;
29404	pkgadd)
29405                pkgadd_help  $MISSING_DEPENDENCY ;;
29406    * )
29407      break ;;
29408    esac
29409
29410    if test "x$PKGHANDLER_COMMAND" != x; then
29411        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29412    fi
29413
29414    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29415fi
29416
29417
29418
29419
29420
29421
29422###############################################################################
29423#
29424# The common unix printing system cups is used to print from java.
29425#
29426
29427# Check whether --with-cups was given.
29428if test "${with_cups+set}" = set; then :
29429  withval=$with_cups;
29430fi
29431
29432
29433# Check whether --with-cups-include was given.
29434if test "${with_cups_include+set}" = set; then :
29435  withval=$with_cups_include;
29436fi
29437
29438
29439if test "x$CUPS_NOT_NEEDED" = xyes; then
29440	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29441		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29442$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29443	fi
29444	CUPS_CFLAGS=
29445else
29446	CUPS_FOUND=no
29447
29448	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29449	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29450	fi
29451
29452	if test "x${with_cups}" != x; then
29453	    CUPS_CFLAGS="-I${with_cups}/include"
29454	    CUPS_FOUND=yes
29455	fi
29456	if test "x${with_cups_include}" != x; then
29457	    CUPS_CFLAGS="-I${with_cups_include}"
29458	    CUPS_FOUND=yes
29459	fi
29460	if test "x$CUPS_FOUND" = xno; then
29461
29462
29463    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29464        # Source the builddeps file again, to make sure it uses the latest variables!
29465        . $builddepsfile
29466        # Look for a target and build machine specific resource!
29467        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29468        if test "x$resource" = x; then
29469            # Ok, lets instead look for a target specific resource
29470            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29471        fi
29472        if test "x$resource" = x; then
29473            # Ok, lets instead look for a build specific resource
29474            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29475        fi
29476        if test "x$resource" = x; then
29477            # Ok, lets instead look for a generic resource
29478            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29479            resource=${builddep_cups}
29480        fi
29481        if test "x$resource" != x; then
29482            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29483$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29484	    # If the resource in the builddeps.conf file is an existing directory,
29485	    # for example /java/linux/cups
29486	    if test -d ${resource}; then
29487	       depdir=${resource}
29488	    else
29489
29490# cups is for example mymodule
29491# $resource is for example libs/general/libmymod_1_2_3.zip
29492# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29493# $with_builddeps_dir is for example /localhome/builddeps
29494# depdir is the name of the variable into which we store the depdir, eg MYMOD
29495# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29496# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29497    filename=`basename $resource`
29498    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29499    filebase=${filename%%.*}
29500    extension=${filename#*.}
29501    installdir=$with_builddeps_dir/$filebase
29502    if test ! -f $installdir/$filename.unpacked; then
29503        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29504$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29505        if test ! -d $installdir; then
29506            mkdir -p $installdir
29507        fi
29508        if test ! -d $installdir; then
29509            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29510        fi
29511        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29512        touch $tmpfile
29513        if test ! -f $tmpfile; then
29514            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29515        fi
29516
29517    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29518    # $tmpfile is the local file name for the downloaded file.
29519    VALID_TOOL=no
29520    if test "x$BDEPS_FTP" = xwget; then
29521       VALID_TOOL=yes
29522       wget -O $tmpfile $with_builddeps_server/$resource
29523    fi
29524    if test "x$BDEPS_FTP" = xlftp; then
29525       VALID_TOOL=yes
29526       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29527    fi
29528    if test "x$BDEPS_FTP" = xftp; then
29529        VALID_TOOL=yes
29530        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29531        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29532        FTPUSERPWD=${FTPSERVER%%@*}
29533        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29534            FTPUSER=${userpwd%%:*}
29535            FTPPWD=${userpwd#*@}
29536            FTPSERVER=${FTPSERVER#*@}
29537        else
29538            FTPUSER=ftp
29539            FTPPWD=ftp
29540        fi
29541        # the "pass" command does not work on some
29542        # ftp clients (read ftp.exe) but if it works,
29543        # passive mode is better!
29544        (\
29545            echo "user $FTPUSER $FTPPWD"        ;\
29546            echo "pass"                         ;\
29547            echo "bin"                          ;\
29548            echo "get $FTPPATH $tmpfile"              ;\
29549        ) | ftp -in $FTPSERVER
29550    fi
29551    if test "x$VALID_TOOL" != xyes; then
29552       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29553    fi
29554
29555        mv $tmpfile $installdir/$filename
29556        if test ! -s $installdir/$filename; then
29557            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29558        fi
29559        case "$extension" in
29560            zip)  echo "Unzipping $installdir/$filename..."
29561               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29562            ;;
29563            tar.gz) echo "Untaring $installdir/$filename..."
29564               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29565            ;;
29566            tgz) echo "Untaring $installdir/$filename..."
29567               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29568            ;;
29569            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29570            ;;
29571        esac
29572    fi
29573    if test -f $installdir/$filename.unpacked; then
29574        depdir=$installdir
29575    fi
29576
29577	    fi
29578            # Source the builddeps file again, because in the previous command, the depdir
29579            # was updated to point at the current build dependency install directory.
29580            . $builddepsfile
29581            # Now extract variables from the builddeps.conf files.
29582            theroot=${builddep_cups_ROOT}
29583            thecflags=${builddep_cups_CFLAGS}
29584            thelibs=${builddep_cups_LIBS}
29585            if test "x$depdir" = x; then
29586                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29587            fi
29588            CUPS=$depdir
29589            if test "x$theroot" != x; then
29590               CUPS="$theroot"
29591            fi
29592            if test "x$thecflags" != x; then
29593               CUPS_CFLAGS="$thecflags"
29594            fi
29595            if test "x$thelibs" != x; then
29596               CUPS_LIBS="$thelibs"
29597            fi
29598            CUPS_FOUND=yes
29599
29600        fi
29601
29602    fi
29603
29604	fi
29605	if test "x$CUPS_FOUND" = xno; then
29606	    # Are the cups headers installed in the default /usr/include location?
29607	    for ac_header in cups/cups.h cups/ppd.h
29608do :
29609  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29610ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29611if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29612  cat >>confdefs.h <<_ACEOF
29613#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29614_ACEOF
29615 CUPS_FOUND=yes
29616	                      CUPS_CFLAGS=
29617	                      DEFAULT_CUPS=yes
29618fi
29619
29620done
29621
29622	fi
29623	if test "x$CUPS_FOUND" = xno; then
29624	    # Getting nervous now? Lets poke around for standard Solaris third-party
29625	    # package installation locations.
29626	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29627$as_echo_n "checking for cups headers... " >&6; }
29628	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29629	       # An SFW package seems to be installed!
29630	       CUPS_FOUND=yes
29631	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29632	    elif test -s /opt/csw/include/cups/cups.h; then
29633	       # A CSW package seems to be installed!
29634	       CUPS_FOUND=yes
29635	       CUPS_CFLAGS="-I/opt/csw/include"
29636	    fi
29637	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29638$as_echo "$CUPS_FOUND" >&6; }
29639	fi
29640	if test "x$CUPS_FOUND" = xno; then
29641
29642    # Print a helpful message on how to acquire the necessary build dependency.
29643    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29644    MISSING_DEPENDENCY=cups
29645    PKGHANDLER_COMMAND=
29646
29647    case $PKGHANDLER in
29648	apt-get)
29649                apt_help     $MISSING_DEPENDENCY ;;
29650    yum)
29651                yum_help     $MISSING_DEPENDENCY ;;
29652	port)
29653                port_help    $MISSING_DEPENDENCY ;;
29654	pkgutil)
29655                pkgutil_help $MISSING_DEPENDENCY ;;
29656	pkgadd)
29657                pkgadd_help  $MISSING_DEPENDENCY ;;
29658    * )
29659      break ;;
29660    esac
29661
29662    if test "x$PKGHANDLER_COMMAND" != x; then
29663        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29664    fi
29665
29666	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29667	fi
29668fi
29669
29670
29671
29672
29673
29674
29675###############################################################################
29676#
29677# The ubiquitous freetype2 library is used to render fonts.
29678#
29679
29680# Check whether --with-freetype was given.
29681if test "${with_freetype+set}" = set; then :
29682  withval=$with_freetype;
29683fi
29684
29685
29686# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29687USING_SYSTEM_FT_LIB=false
29688
29689if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29690	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29691		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29692$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29693	fi
29694	FREETYPE2_CFLAGS=
29695	FREETYPE2_LIBS=
29696        FREETYPE2_LIB_PATH=
29697else
29698	FREETYPE2_FOUND=no
29699
29700	if test "x$with_freetype" != x; then
29701
29702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29703
29704  # Input might be given as Windows format, start by converting to
29705  # unix format.
29706  path="$with_freetype"
29707  new_path=`$CYGPATH -u "$path"`
29708
29709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29712  # "foo.exe" is OK but "foo" is an error.
29713  #
29714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29715  # It is also a way to make sure we got the proper file name for the real test later on.
29716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29717  if test "x$test_shortpath" = x; then
29718    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29719$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29720    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29721  fi
29722
29723  # Call helper function which possibly converts this using DOS-style short mode.
29724  # If so, the updated path is stored in $new_path.
29725
29726  input_path="$new_path"
29727  # Check if we need to convert this using DOS-style short mode. If the path
29728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29729  # take no chances and rewrite it.
29730  # Note: m4 eats our [], so we need to use [ and ] instead.
29731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29732  if test "x$has_forbidden_chars" != x; then
29733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29737      # Going to short mode and back again did indeed matter. Since short mode is
29738      # case insensitive, let's make it lowercase to improve readability.
29739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29740      # Now convert it back to Unix-stile (cygpath)
29741      input_path=`$CYGPATH -u "$shortmode_path"`
29742      new_path="$input_path"
29743    fi
29744  fi
29745
29746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29747  if test "x$test_cygdrive_prefix" = x; then
29748    # As a simple fix, exclude /usr/bin since it's not a real path.
29749    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29751      # a path prefixed by /cygdrive for fixpath to work.
29752      new_path="$CYGWIN_ROOT_PATH$input_path"
29753    fi
29754  fi
29755
29756
29757  if test "x$path" != "x$new_path"; then
29758    with_freetype="$new_path"
29759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29760$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29761  fi
29762
29763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29764
29765  path="$with_freetype"
29766  has_colon=`$ECHO $path | $GREP ^.:`
29767  new_path="$path"
29768  if test "x$has_colon" = x; then
29769    # Not in mixed or Windows style, start by that.
29770    new_path=`cmd //c echo $path`
29771  fi
29772
29773
29774  input_path="$new_path"
29775  # Check if we need to convert this using DOS-style short mode. If the path
29776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29777  # take no chances and rewrite it.
29778  # Note: m4 eats our [], so we need to use [ and ] instead.
29779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29780  if test "x$has_forbidden_chars" != x; then
29781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29783  fi
29784
29785
29786  windows_path="$new_path"
29787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29788    unix_path=`$CYGPATH -u "$windows_path"`
29789    new_path="$unix_path"
29790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29792    new_path="$unix_path"
29793  fi
29794
29795  if test "x$path" != "x$new_path"; then
29796    with_freetype="$new_path"
29797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29798$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29799  fi
29800
29801  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29802  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29803
29804  else
29805    # We're on a posix platform. Hooray! :)
29806    path="$with_freetype"
29807
29808    if test ! -f "$path" && test ! -d "$path"; then
29809      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29810    fi
29811
29812    has_space=`$ECHO "$path" | $GREP " "`
29813    if test "x$has_space" != x; then
29814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29815$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29816      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29817    fi
29818  fi
29819
29820	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29821            FREETYPE2_LIB_PATH="$with_freetype/lib"
29822            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29823                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29824                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29825            fi
29826            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29827                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29828            fi
29829	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29830            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29831                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29832            fi
29833 	    FREETYPE2_FOUND=yes
29834   	    if test "x$FREETYPE2_FOUND" = xyes; then
29835	        # Verify that the directories exist
29836                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29837		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29838		fi
29839	        # List the contents of the lib.
29840		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29841                if test "x$FREETYPELIB" = x; then
29842		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29843		fi
29844	        # Check one h-file
29845                if ! test -s "$with_freetype/include/ft2build.h"; then
29846		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29847		fi
29848            fi
29849        fi
29850	if test "x$FREETYPE2_FOUND" = xno; then
29851
29852
29853    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29854        # Source the builddeps file again, to make sure it uses the latest variables!
29855        . $builddepsfile
29856        # Look for a target and build machine specific resource!
29857        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29858        if test "x$resource" = x; then
29859            # Ok, lets instead look for a target specific resource
29860            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29861        fi
29862        if test "x$resource" = x; then
29863            # Ok, lets instead look for a build specific resource
29864            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29865        fi
29866        if test "x$resource" = x; then
29867            # Ok, lets instead look for a generic resource
29868            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29869            resource=${builddep_freetype2}
29870        fi
29871        if test "x$resource" != x; then
29872            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29873$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29874	    # If the resource in the builddeps.conf file is an existing directory,
29875	    # for example /java/linux/cups
29876	    if test -d ${resource}; then
29877	       depdir=${resource}
29878	    else
29879
29880# freetype2 is for example mymodule
29881# $resource is for example libs/general/libmymod_1_2_3.zip
29882# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29883# $with_builddeps_dir is for example /localhome/builddeps
29884# depdir is the name of the variable into which we store the depdir, eg MYMOD
29885# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29886# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29887    filename=`basename $resource`
29888    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29889    filebase=${filename%%.*}
29890    extension=${filename#*.}
29891    installdir=$with_builddeps_dir/$filebase
29892    if test ! -f $installdir/$filename.unpacked; then
29893        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29894$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29895        if test ! -d $installdir; then
29896            mkdir -p $installdir
29897        fi
29898        if test ! -d $installdir; then
29899            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29900        fi
29901        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29902        touch $tmpfile
29903        if test ! -f $tmpfile; then
29904            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29905        fi
29906
29907    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29908    # $tmpfile is the local file name for the downloaded file.
29909    VALID_TOOL=no
29910    if test "x$BDEPS_FTP" = xwget; then
29911       VALID_TOOL=yes
29912       wget -O $tmpfile $with_builddeps_server/$resource
29913    fi
29914    if test "x$BDEPS_FTP" = xlftp; then
29915       VALID_TOOL=yes
29916       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29917    fi
29918    if test "x$BDEPS_FTP" = xftp; then
29919        VALID_TOOL=yes
29920        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29921        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29922        FTPUSERPWD=${FTPSERVER%%@*}
29923        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29924            FTPUSER=${userpwd%%:*}
29925            FTPPWD=${userpwd#*@}
29926            FTPSERVER=${FTPSERVER#*@}
29927        else
29928            FTPUSER=ftp
29929            FTPPWD=ftp
29930        fi
29931        # the "pass" command does not work on some
29932        # ftp clients (read ftp.exe) but if it works,
29933        # passive mode is better!
29934        (\
29935            echo "user $FTPUSER $FTPPWD"        ;\
29936            echo "pass"                         ;\
29937            echo "bin"                          ;\
29938            echo "get $FTPPATH $tmpfile"              ;\
29939        ) | ftp -in $FTPSERVER
29940    fi
29941    if test "x$VALID_TOOL" != xyes; then
29942       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29943    fi
29944
29945        mv $tmpfile $installdir/$filename
29946        if test ! -s $installdir/$filename; then
29947            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29948        fi
29949        case "$extension" in
29950            zip)  echo "Unzipping $installdir/$filename..."
29951               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29952            ;;
29953            tar.gz) echo "Untaring $installdir/$filename..."
29954               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29955            ;;
29956            tgz) echo "Untaring $installdir/$filename..."
29957               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29958            ;;
29959            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29960            ;;
29961        esac
29962    fi
29963    if test -f $installdir/$filename.unpacked; then
29964        depdir=$installdir
29965    fi
29966
29967	    fi
29968            # Source the builddeps file again, because in the previous command, the depdir
29969            # was updated to point at the current build dependency install directory.
29970            . $builddepsfile
29971            # Now extract variables from the builddeps.conf files.
29972            theroot=${builddep_freetype2_ROOT}
29973            thecflags=${builddep_freetype2_CFLAGS}
29974            thelibs=${builddep_freetype2_LIBS}
29975            if test "x$depdir" = x; then
29976                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29977            fi
29978            FREETYPE2=$depdir
29979            if test "x$theroot" != x; then
29980               FREETYPE2="$theroot"
29981            fi
29982            if test "x$thecflags" != x; then
29983               FREETYPE2_CFLAGS="$thecflags"
29984            fi
29985            if test "x$thelibs" != x; then
29986               FREETYPE2_LIBS="$thelibs"
29987            fi
29988            FREETYPE2_FOUND=yes
29989            else FREETYPE2_FOUND=no
29990
29991        fi
29992        else FREETYPE2_FOUND=no
29993
29994    fi
29995
29996            USING_SYSTEM_FT_LIB=true
29997	fi
29998	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29999            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
30000
30001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30002
30003  # Input might be given as Windows format, start by converting to
30004  # unix format.
30005  path="$FREETYPELOCATION"
30006  new_path=`$CYGPATH -u "$path"`
30007
30008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30011  # "foo.exe" is OK but "foo" is an error.
30012  #
30013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30014  # It is also a way to make sure we got the proper file name for the real test later on.
30015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30016  if test "x$test_shortpath" = x; then
30017    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30018$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30019    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30020  fi
30021
30022  # Call helper function which possibly converts this using DOS-style short mode.
30023  # If so, the updated path is stored in $new_path.
30024
30025  input_path="$new_path"
30026  # Check if we need to convert this using DOS-style short mode. If the path
30027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30028  # take no chances and rewrite it.
30029  # Note: m4 eats our [], so we need to use [ and ] instead.
30030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30031  if test "x$has_forbidden_chars" != x; then
30032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30036      # Going to short mode and back again did indeed matter. Since short mode is
30037      # case insensitive, let's make it lowercase to improve readability.
30038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30039      # Now convert it back to Unix-stile (cygpath)
30040      input_path=`$CYGPATH -u "$shortmode_path"`
30041      new_path="$input_path"
30042    fi
30043  fi
30044
30045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30046  if test "x$test_cygdrive_prefix" = x; then
30047    # As a simple fix, exclude /usr/bin since it's not a real path.
30048    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30050      # a path prefixed by /cygdrive for fixpath to work.
30051      new_path="$CYGWIN_ROOT_PATH$input_path"
30052    fi
30053  fi
30054
30055
30056  if test "x$path" != "x$new_path"; then
30057    FREETYPELOCATION="$new_path"
30058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30059$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30060  fi
30061
30062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30063
30064  path="$FREETYPELOCATION"
30065  has_colon=`$ECHO $path | $GREP ^.:`
30066  new_path="$path"
30067  if test "x$has_colon" = x; then
30068    # Not in mixed or Windows style, start by that.
30069    new_path=`cmd //c echo $path`
30070  fi
30071
30072
30073  input_path="$new_path"
30074  # Check if we need to convert this using DOS-style short mode. If the path
30075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30076  # take no chances and rewrite it.
30077  # Note: m4 eats our [], so we need to use [ and ] instead.
30078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30079  if test "x$has_forbidden_chars" != x; then
30080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30082  fi
30083
30084
30085  windows_path="$new_path"
30086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30087    unix_path=`$CYGPATH -u "$windows_path"`
30088    new_path="$unix_path"
30089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30091    new_path="$unix_path"
30092  fi
30093
30094  if test "x$path" != "x$new_path"; then
30095    FREETYPELOCATION="$new_path"
30096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30097$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30098  fi
30099
30100  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30101  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30102
30103  else
30104    # We're on a posix platform. Hooray! :)
30105    path="$FREETYPELOCATION"
30106
30107    if test ! -f "$path" && test ! -d "$path"; then
30108      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30109    fi
30110
30111    has_space=`$ECHO "$path" | $GREP " "`
30112    if test "x$has_space" != x; then
30113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30114$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30115      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30116    fi
30117  fi
30118
30119	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30120$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30121	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30122	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30123	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30124 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30125                if ! test -s "$FREETYPE2_LIBS"; then
30126		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30127		fi
30128                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30129		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30130		fi
30131                USING_SYSTEM_FT_LIB=true
30132                FREETYPE2_FOUND=yes
30133	    fi
30134	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30135$as_echo "$FREETYPE2_FOUND" >&6; }
30136        fi
30137	if test "x$FREETYPE2_FOUND" = xno; then
30138
30139pkg_failed=no
30140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30141$as_echo_n "checking for FREETYPE2... " >&6; }
30142
30143if test -n "$FREETYPE2_CFLAGS"; then
30144    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30145 elif test -n "$PKG_CONFIG"; then
30146    if test -n "$PKG_CONFIG" && \
30147    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30148  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30149  ac_status=$?
30150  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30151  test $ac_status = 0; }; then
30152  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30153else
30154  pkg_failed=yes
30155fi
30156 else
30157    pkg_failed=untried
30158fi
30159if test -n "$FREETYPE2_LIBS"; then
30160    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30161 elif test -n "$PKG_CONFIG"; then
30162    if test -n "$PKG_CONFIG" && \
30163    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30164  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30165  ac_status=$?
30166  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30167  test $ac_status = 0; }; then
30168  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30169else
30170  pkg_failed=yes
30171fi
30172 else
30173    pkg_failed=untried
30174fi
30175
30176
30177
30178if test $pkg_failed = yes; then
30179
30180if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30181        _pkg_short_errors_supported=yes
30182else
30183        _pkg_short_errors_supported=no
30184fi
30185        if test $_pkg_short_errors_supported = yes; then
30186	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30187        else
30188	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30189        fi
30190	# Put the nasty error message in config.log where it belongs
30191	echo "$FREETYPE2_PKG_ERRORS" >&5
30192
30193	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30194$as_echo "no" >&6; }
30195                FREETYPE2_FOUND=no
30196elif test $pkg_failed = untried; then
30197	FREETYPE2_FOUND=no
30198else
30199	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30200	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30202$as_echo "yes" >&6; }
30203	FREETYPE2_FOUND=yes
30204fi
30205            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30206            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30207            USING_SYSTEM_FT_LIB=true
30208            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30209            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30210              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30211            fi
30212	fi
30213	if test "x$FREETYPE2_FOUND" = xno; then
30214	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30215$as_echo_n "checking for freetype in some standard locations... " >&6; }
30216
30217	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30218	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30219	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30220	    fi
30221	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30222	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30223	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30224	    fi
30225
30226	    PREV_CXXCFLAGS="$CXXFLAGS"
30227	    PREV_LDFLAGS="$LDFLAGS"
30228	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30229	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30230	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30231/* end confdefs.h.  */
30232#include<ft2build.h>
30233	                    #include FT_FREETYPE_H
30234	                   int main() { return 0; }
30235
30236_ACEOF
30237if ac_fn_cxx_try_link "$LINENO"; then :
30238
30239	                      # Yes, the default cflags and libs did the trick.
30240	                      FREETYPE2_FOUND=yes
30241	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30242	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30243
30244else
30245
30246	                      FREETYPE2_FOUND=no
30247
30248fi
30249rm -f core conftest.err conftest.$ac_objext \
30250    conftest$ac_exeext conftest.$ac_ext
30251            CXXCFLAGS="$PREV_CXXFLAGS"
30252	    LDFLAGS="$PREV_LDFLAGS"
30253	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30254$as_echo "$FREETYPE2_FOUND" >&6; }
30255            USING_SYSTEM_FT_LIB=true
30256	fi
30257	if test "x$FREETYPE2_FOUND" = xno; then
30258
30259    # Print a helpful message on how to acquire the necessary build dependency.
30260    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30261    MISSING_DEPENDENCY=freetype2
30262    PKGHANDLER_COMMAND=
30263
30264    case $PKGHANDLER in
30265	apt-get)
30266                apt_help     $MISSING_DEPENDENCY ;;
30267    yum)
30268                yum_help     $MISSING_DEPENDENCY ;;
30269	port)
30270                port_help    $MISSING_DEPENDENCY ;;
30271	pkgutil)
30272                pkgutil_help $MISSING_DEPENDENCY ;;
30273	pkgadd)
30274                pkgadd_help  $MISSING_DEPENDENCY ;;
30275    * )
30276      break ;;
30277    esac
30278
30279    if test "x$PKGHANDLER_COMMAND" != x; then
30280        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30281    fi
30282
30283		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30284	fi
30285
30286        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30287            # AC_CHECK_LIB does not support use of cl.exe
30288            PREV_LDFLAGS="$LDFLAGS"
30289            LDFLAGS="$FREETYPE2_LIBS"
30290            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30291$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30292if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
30293  $as_echo_n "(cached) " >&6
30294else
30295  ac_check_lib_save_LIBS=$LIBS
30296LIBS="-lfreetype  $LIBS"
30297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30298/* end confdefs.h.  */
30299
30300/* Override any GCC internal prototype to avoid an error.
30301   Use char because int might match the return type of a GCC
30302   builtin and then its argument prototype would still apply.  */
30303#ifdef __cplusplus
30304extern "C"
30305#endif
30306char FT_Init_FreeType ();
30307int
30308main ()
30309{
30310return FT_Init_FreeType ();
30311  ;
30312  return 0;
30313}
30314_ACEOF
30315if ac_fn_cxx_try_link "$LINENO"; then :
30316  ac_cv_lib_freetype_FT_Init_FreeType=yes
30317else
30318  ac_cv_lib_freetype_FT_Init_FreeType=no
30319fi
30320rm -f core conftest.err conftest.$ac_objext \
30321    conftest$ac_exeext conftest.$ac_ext
30322LIBS=$ac_check_lib_save_LIBS
30323fi
30324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30325$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30326if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
30327  FREETYPE2_FOUND=true
30328else
30329  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30330fi
30331
30332            LDFLAGS="$PREV_LDFLAGS"
30333        fi
30334fi
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344###############################################################################
30345#
30346# Check for alsa headers and libraries. Used on Linux/GNU systems.
30347#
30348
30349# Check whether --with-alsa was given.
30350if test "${with_alsa+set}" = set; then :
30351  withval=$with_alsa;
30352fi
30353
30354
30355# Check whether --with-alsa-include was given.
30356if test "${with_alsa_include+set}" = set; then :
30357  withval=$with_alsa_include;
30358fi
30359
30360
30361# Check whether --with-alsa-lib was given.
30362if test "${with_alsa_lib+set}" = set; then :
30363  withval=$with_alsa_lib;
30364fi
30365
30366
30367if test "x$ALSA_NOT_NEEDED" = xyes; then
30368	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30369		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30370$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30371	fi
30372	ALSA_CFLAGS=
30373	ALSA_LIBS=
30374else
30375	ALSA_FOUND=no
30376
30377	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30378	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30379	fi
30380
30381	if test "x${with_alsa}" != x; then
30382	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30383	    ALSA_CFLAGS="-I${with_alsa}/include"
30384	    ALSA_FOUND=yes
30385	fi
30386	if test "x${with_alsa_include}" != x; then
30387	    ALSA_CFLAGS="-I${with_alsa_include}"
30388	    ALSA_FOUND=yes
30389	fi
30390	if test "x${with_alsa_lib}" != x; then
30391	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30392	    ALSA_FOUND=yes
30393	fi
30394	if test "x$ALSA_FOUND" = xno; then
30395
30396
30397    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30398        # Source the builddeps file again, to make sure it uses the latest variables!
30399        . $builddepsfile
30400        # Look for a target and build machine specific resource!
30401        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30402        if test "x$resource" = x; then
30403            # Ok, lets instead look for a target specific resource
30404            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30405        fi
30406        if test "x$resource" = x; then
30407            # Ok, lets instead look for a build specific resource
30408            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30409        fi
30410        if test "x$resource" = x; then
30411            # Ok, lets instead look for a generic resource
30412            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30413            resource=${builddep_alsa}
30414        fi
30415        if test "x$resource" != x; then
30416            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30417$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30418	    # If the resource in the builddeps.conf file is an existing directory,
30419	    # for example /java/linux/cups
30420	    if test -d ${resource}; then
30421	       depdir=${resource}
30422	    else
30423
30424# alsa is for example mymodule
30425# $resource is for example libs/general/libmymod_1_2_3.zip
30426# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30427# $with_builddeps_dir is for example /localhome/builddeps
30428# depdir is the name of the variable into which we store the depdir, eg MYMOD
30429# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30430# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30431    filename=`basename $resource`
30432    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30433    filebase=${filename%%.*}
30434    extension=${filename#*.}
30435    installdir=$with_builddeps_dir/$filebase
30436    if test ! -f $installdir/$filename.unpacked; then
30437        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30438$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30439        if test ! -d $installdir; then
30440            mkdir -p $installdir
30441        fi
30442        if test ! -d $installdir; then
30443            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30444        fi
30445        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30446        touch $tmpfile
30447        if test ! -f $tmpfile; then
30448            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30449        fi
30450
30451    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30452    # $tmpfile is the local file name for the downloaded file.
30453    VALID_TOOL=no
30454    if test "x$BDEPS_FTP" = xwget; then
30455       VALID_TOOL=yes
30456       wget -O $tmpfile $with_builddeps_server/$resource
30457    fi
30458    if test "x$BDEPS_FTP" = xlftp; then
30459       VALID_TOOL=yes
30460       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30461    fi
30462    if test "x$BDEPS_FTP" = xftp; then
30463        VALID_TOOL=yes
30464        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30465        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30466        FTPUSERPWD=${FTPSERVER%%@*}
30467        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30468            FTPUSER=${userpwd%%:*}
30469            FTPPWD=${userpwd#*@}
30470            FTPSERVER=${FTPSERVER#*@}
30471        else
30472            FTPUSER=ftp
30473            FTPPWD=ftp
30474        fi
30475        # the "pass" command does not work on some
30476        # ftp clients (read ftp.exe) but if it works,
30477        # passive mode is better!
30478        (\
30479            echo "user $FTPUSER $FTPPWD"        ;\
30480            echo "pass"                         ;\
30481            echo "bin"                          ;\
30482            echo "get $FTPPATH $tmpfile"              ;\
30483        ) | ftp -in $FTPSERVER
30484    fi
30485    if test "x$VALID_TOOL" != xyes; then
30486       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30487    fi
30488
30489        mv $tmpfile $installdir/$filename
30490        if test ! -s $installdir/$filename; then
30491            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30492        fi
30493        case "$extension" in
30494            zip)  echo "Unzipping $installdir/$filename..."
30495               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30496            ;;
30497            tar.gz) echo "Untaring $installdir/$filename..."
30498               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30499            ;;
30500            tgz) echo "Untaring $installdir/$filename..."
30501               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30502            ;;
30503            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30504            ;;
30505        esac
30506    fi
30507    if test -f $installdir/$filename.unpacked; then
30508        depdir=$installdir
30509    fi
30510
30511	    fi
30512            # Source the builddeps file again, because in the previous command, the depdir
30513            # was updated to point at the current build dependency install directory.
30514            . $builddepsfile
30515            # Now extract variables from the builddeps.conf files.
30516            theroot=${builddep_alsa_ROOT}
30517            thecflags=${builddep_alsa_CFLAGS}
30518            thelibs=${builddep_alsa_LIBS}
30519            if test "x$depdir" = x; then
30520                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30521            fi
30522            ALSA=$depdir
30523            if test "x$theroot" != x; then
30524               ALSA="$theroot"
30525            fi
30526            if test "x$thecflags" != x; then
30527               ALSA_CFLAGS="$thecflags"
30528            fi
30529            if test "x$thelibs" != x; then
30530               ALSA_LIBS="$thelibs"
30531            fi
30532            ALSA_FOUND=yes
30533            else ALSA_FOUND=no
30534
30535        fi
30536        else ALSA_FOUND=no
30537
30538    fi
30539
30540	fi
30541	if test "x$ALSA_FOUND" = xno; then
30542
30543pkg_failed=no
30544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30545$as_echo_n "checking for ALSA... " >&6; }
30546
30547if test -n "$ALSA_CFLAGS"; then
30548    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30549 elif test -n "$PKG_CONFIG"; then
30550    if test -n "$PKG_CONFIG" && \
30551    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30552  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30553  ac_status=$?
30554  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30555  test $ac_status = 0; }; then
30556  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30557else
30558  pkg_failed=yes
30559fi
30560 else
30561    pkg_failed=untried
30562fi
30563if test -n "$ALSA_LIBS"; then
30564    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30565 elif test -n "$PKG_CONFIG"; then
30566    if test -n "$PKG_CONFIG" && \
30567    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30568  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30569  ac_status=$?
30570  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30571  test $ac_status = 0; }; then
30572  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30573else
30574  pkg_failed=yes
30575fi
30576 else
30577    pkg_failed=untried
30578fi
30579
30580
30581
30582if test $pkg_failed = yes; then
30583
30584if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30585        _pkg_short_errors_supported=yes
30586else
30587        _pkg_short_errors_supported=no
30588fi
30589        if test $_pkg_short_errors_supported = yes; then
30590	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30591        else
30592	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30593        fi
30594	# Put the nasty error message in config.log where it belongs
30595	echo "$ALSA_PKG_ERRORS" >&5
30596
30597	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30598$as_echo "no" >&6; }
30599                ALSA_FOUND=no
30600elif test $pkg_failed = untried; then
30601	ALSA_FOUND=no
30602else
30603	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30604	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30606$as_echo "yes" >&6; }
30607	ALSA_FOUND=yes
30608fi
30609	fi
30610	if test "x$ALSA_FOUND" = xno; then
30611	    for ac_header in alsa/asoundlib.h
30612do :
30613  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30614if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
30615  cat >>confdefs.h <<_ACEOF
30616#define HAVE_ALSA_ASOUNDLIB_H 1
30617_ACEOF
30618 ALSA_FOUND=yes
30619	                      ALSA_CFLAGS=-Iignoreme
30620	                      ALSA_LIBS=-lasound
30621	                      DEFAULT_ALSA=yes
30622else
30623  ALSA_FOUND=no
30624fi
30625
30626done
30627
30628	fi
30629	if test "x$ALSA_FOUND" = xno; then
30630
30631    # Print a helpful message on how to acquire the necessary build dependency.
30632    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30633    MISSING_DEPENDENCY=alsa
30634    PKGHANDLER_COMMAND=
30635
30636    case $PKGHANDLER in
30637	apt-get)
30638                apt_help     $MISSING_DEPENDENCY ;;
30639    yum)
30640                yum_help     $MISSING_DEPENDENCY ;;
30641	port)
30642                port_help    $MISSING_DEPENDENCY ;;
30643	pkgutil)
30644                pkgutil_help $MISSING_DEPENDENCY ;;
30645	pkgadd)
30646                pkgadd_help  $MISSING_DEPENDENCY ;;
30647    * )
30648      break ;;
30649    esac
30650
30651    if test "x$PKGHANDLER_COMMAND" != x; then
30652        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30653    fi
30654
30655	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30656	fi
30657fi
30658
30659
30660
30661
30662
30663
30664
30665###############################################################################
30666#
30667# Check for the jpeg library
30668#
30669
30670USE_EXTERNAL_LIBJPEG=true
30671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30672$as_echo_n "checking for main in -ljpeg... " >&6; }
30673if ${ac_cv_lib_jpeg_main+:} false; then :
30674  $as_echo_n "(cached) " >&6
30675else
30676  ac_check_lib_save_LIBS=$LIBS
30677LIBS="-ljpeg  $LIBS"
30678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30679/* end confdefs.h.  */
30680
30681
30682int
30683main ()
30684{
30685return main ();
30686  ;
30687  return 0;
30688}
30689_ACEOF
30690if ac_fn_cxx_try_link "$LINENO"; then :
30691  ac_cv_lib_jpeg_main=yes
30692else
30693  ac_cv_lib_jpeg_main=no
30694fi
30695rm -f core conftest.err conftest.$ac_objext \
30696    conftest$ac_exeext conftest.$ac_ext
30697LIBS=$ac_check_lib_save_LIBS
30698fi
30699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30700$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30701if test "x$ac_cv_lib_jpeg_main" = xyes; then :
30702  cat >>confdefs.h <<_ACEOF
30703#define HAVE_LIBJPEG 1
30704_ACEOF
30705
30706  LIBS="-ljpeg $LIBS"
30707
30708else
30709   USE_EXTERNAL_LIBJPEG=false
30710               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30711$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30712
30713fi
30714
30715
30716
30717###############################################################################
30718#
30719# Check for the gif library
30720#
30721
30722USE_EXTERNAL_LIBJPEG=true
30723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30724$as_echo_n "checking for main in -lgif... " >&6; }
30725if ${ac_cv_lib_gif_main+:} false; then :
30726  $as_echo_n "(cached) " >&6
30727else
30728  ac_check_lib_save_LIBS=$LIBS
30729LIBS="-lgif  $LIBS"
30730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30731/* end confdefs.h.  */
30732
30733
30734int
30735main ()
30736{
30737return main ();
30738  ;
30739  return 0;
30740}
30741_ACEOF
30742if ac_fn_cxx_try_link "$LINENO"; then :
30743  ac_cv_lib_gif_main=yes
30744else
30745  ac_cv_lib_gif_main=no
30746fi
30747rm -f core conftest.err conftest.$ac_objext \
30748    conftest$ac_exeext conftest.$ac_ext
30749LIBS=$ac_check_lib_save_LIBS
30750fi
30751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30752$as_echo "$ac_cv_lib_gif_main" >&6; }
30753if test "x$ac_cv_lib_gif_main" = xyes; then :
30754  cat >>confdefs.h <<_ACEOF
30755#define HAVE_LIBGIF 1
30756_ACEOF
30757
30758  LIBS="-lgif $LIBS"
30759
30760else
30761   USE_EXTERNAL_LIBGIF=false
30762               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30763$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30764
30765fi
30766
30767
30768
30769###############################################################################
30770#
30771# Check for the zlib library
30772#
30773
30774
30775# Check whether --with-zlib was given.
30776if test "${with_zlib+set}" = set; then :
30777  withval=$with_zlib;
30778fi
30779
30780
30781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30782$as_echo_n "checking for compress in -lz... " >&6; }
30783if ${ac_cv_lib_z_compress+:} false; then :
30784  $as_echo_n "(cached) " >&6
30785else
30786  ac_check_lib_save_LIBS=$LIBS
30787LIBS="-lz  $LIBS"
30788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30789/* end confdefs.h.  */
30790
30791/* Override any GCC internal prototype to avoid an error.
30792   Use char because int might match the return type of a GCC
30793   builtin and then its argument prototype would still apply.  */
30794#ifdef __cplusplus
30795extern "C"
30796#endif
30797char compress ();
30798int
30799main ()
30800{
30801return compress ();
30802  ;
30803  return 0;
30804}
30805_ACEOF
30806if ac_fn_cxx_try_link "$LINENO"; then :
30807  ac_cv_lib_z_compress=yes
30808else
30809  ac_cv_lib_z_compress=no
30810fi
30811rm -f core conftest.err conftest.$ac_objext \
30812    conftest$ac_exeext conftest.$ac_ext
30813LIBS=$ac_check_lib_save_LIBS
30814fi
30815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30816$as_echo "$ac_cv_lib_z_compress" >&6; }
30817if test "x$ac_cv_lib_z_compress" = xyes; then :
30818   ZLIB_FOUND=yes
30819else
30820   ZLIB_FOUND=no
30821fi
30822
30823
30824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30825$as_echo_n "checking for which zlib to use... " >&6; }
30826
30827DEFAULT_ZLIB=bundled
30828if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30829#
30830# On macosx default is system...on others default is
30831#
30832    DEFAULT_ZLIB=system
30833fi
30834
30835if test "x${ZLIB_FOUND}" != "xyes"; then
30836#
30837# If we don't find any system...set default to bundled
30838#
30839    DEFAULT_ZLIB=bundled
30840fi
30841
30842#
30843# If user didn't specify, use DEFAULT_ZLIB
30844#
30845if test "x${with_zlib}" = "x"; then
30846    with_zlib=${DEFAULT_ZLIB}
30847fi
30848
30849if test "x${with_zlib}" = "xbundled"; then
30850    USE_EXTERNAL_LIBZ=false
30851    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30852$as_echo "bundled" >&6; }
30853elif test "x${with_zlib}" = "xsystem"; then
30854    if test "x${ZLIB_FOUND}" = "xyes"; then
30855        USE_EXTERNAL_LIBZ=true
30856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30857$as_echo "system" >&6; }
30858    else
30859        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30860$as_echo "system not found" >&6; }
30861        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30862    fi
30863else
30864    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30865fi
30866
30867
30868
30869###############################################################################
30870LIBZIP_CAN_USE_MMAP=true
30871
30872
30873
30874###############################################################################
30875#
30876# Check if altzone exists in time.h
30877#
30878
30879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30880/* end confdefs.h.  */
30881#include <time.h>
30882int
30883main ()
30884{
30885return (int)altzone;
30886  ;
30887  return 0;
30888}
30889_ACEOF
30890if ac_fn_cxx_try_link "$LINENO"; then :
30891  has_altzone=yes
30892else
30893  has_altzone=no
30894fi
30895rm -f core conftest.err conftest.$ac_objext \
30896    conftest$ac_exeext conftest.$ac_ext
30897if test "x$has_altzone" = xyes; then
30898
30899$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30900
30901fi
30902
30903###############################################################################
30904#
30905# Check the maths library
30906#
30907
30908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30909$as_echo_n "checking for cos in -lm... " >&6; }
30910if ${ac_cv_lib_m_cos+:} false; then :
30911  $as_echo_n "(cached) " >&6
30912else
30913  ac_check_lib_save_LIBS=$LIBS
30914LIBS="-lm  $LIBS"
30915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30916/* end confdefs.h.  */
30917
30918/* Override any GCC internal prototype to avoid an error.
30919   Use char because int might match the return type of a GCC
30920   builtin and then its argument prototype would still apply.  */
30921#ifdef __cplusplus
30922extern "C"
30923#endif
30924char cos ();
30925int
30926main ()
30927{
30928return cos ();
30929  ;
30930  return 0;
30931}
30932_ACEOF
30933if ac_fn_cxx_try_link "$LINENO"; then :
30934  ac_cv_lib_m_cos=yes
30935else
30936  ac_cv_lib_m_cos=no
30937fi
30938rm -f core conftest.err conftest.$ac_objext \
30939    conftest$ac_exeext conftest.$ac_ext
30940LIBS=$ac_check_lib_save_LIBS
30941fi
30942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30943$as_echo "$ac_cv_lib_m_cos" >&6; }
30944if test "x$ac_cv_lib_m_cos" = xyes; then :
30945  cat >>confdefs.h <<_ACEOF
30946#define HAVE_LIBM 1
30947_ACEOF
30948
30949  LIBS="-lm $LIBS"
30950
30951else
30952
30953                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30954$as_echo "$as_me: Maths library was not found" >&6;}
30955
30956fi
30957
30958
30959
30960###############################################################################
30961#
30962# Check for libdl.so
30963
30964save_LIBS="$LIBS"
30965LIBS=""
30966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30967$as_echo_n "checking for dlopen in -ldl... " >&6; }
30968if ${ac_cv_lib_dl_dlopen+:} false; then :
30969  $as_echo_n "(cached) " >&6
30970else
30971  ac_check_lib_save_LIBS=$LIBS
30972LIBS="-ldl  $LIBS"
30973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30974/* end confdefs.h.  */
30975
30976/* Override any GCC internal prototype to avoid an error.
30977   Use char because int might match the return type of a GCC
30978   builtin and then its argument prototype would still apply.  */
30979#ifdef __cplusplus
30980extern "C"
30981#endif
30982char dlopen ();
30983int
30984main ()
30985{
30986return dlopen ();
30987  ;
30988  return 0;
30989}
30990_ACEOF
30991if ac_fn_cxx_try_link "$LINENO"; then :
30992  ac_cv_lib_dl_dlopen=yes
30993else
30994  ac_cv_lib_dl_dlopen=no
30995fi
30996rm -f core conftest.err conftest.$ac_objext \
30997    conftest$ac_exeext conftest.$ac_ext
30998LIBS=$ac_check_lib_save_LIBS
30999fi
31000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
31001$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
31002if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
31003  cat >>confdefs.h <<_ACEOF
31004#define HAVE_LIBDL 1
31005_ACEOF
31006
31007  LIBS="-ldl $LIBS"
31008
31009fi
31010
31011LIBDL="$LIBS"
31012
31013LIBS="$save_LIBS"
31014
31015
31016
31017###############################################################################
31018#
31019# statically link libstdc++ before C++ ABI is stablized on Linux unless
31020# dynamic build is configured on command line.
31021#
31022
31023# Check whether --with-stdc++lib was given.
31024if test "${with_stdc__lib+set}" = set; then :
31025  withval=$with_stdc__lib;
31026    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31027        && test "x$with_stdc__lib" != xdefault; then
31028      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31029    fi
31030
31031else
31032  with_stdc__lib=default
31033
31034fi
31035
31036
31037if test "x$OPENJDK_TARGET_OS" = xlinux; then
31038    # Test if -lstdc++ works.
31039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31040$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31041    ac_ext=cpp
31042ac_cpp='$CXXCPP $CPPFLAGS'
31043ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31044ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31045ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31046
31047    OLD_CXXFLAGS="$CXXFLAGS"
31048    CXXFLAGS="$CXXFLAGS -lstdc++"
31049    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31050/* end confdefs.h.  */
31051
31052int
31053main ()
31054{
31055return 0;
31056  ;
31057  return 0;
31058}
31059_ACEOF
31060if ac_fn_cxx_try_link "$LINENO"; then :
31061  has_dynamic_libstdcxx=yes
31062else
31063  has_dynamic_libstdcxx=no
31064fi
31065rm -f core conftest.err conftest.$ac_objext \
31066    conftest$ac_exeext conftest.$ac_ext
31067    CXXFLAGS="$OLD_CXXFLAGS"
31068    ac_ext=cpp
31069ac_cpp='$CXXCPP $CPPFLAGS'
31070ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31071ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31072ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31073
31074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31075$as_echo "$has_dynamic_libstdcxx" >&6; }
31076
31077    # Test if stdc++ can be linked statically.
31078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31079$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31080    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31081    ac_ext=cpp
31082ac_cpp='$CXXCPP $CPPFLAGS'
31083ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31084ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31085ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31086
31087    OLD_LIBS="$LIBS"
31088    OLD_CXX="$CXX"
31089    LIBS="$STATIC_STDCXX_FLAGS"
31090    CXX="$CC"
31091    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31092/* end confdefs.h.  */
31093
31094int
31095main ()
31096{
31097return 0;
31098  ;
31099  return 0;
31100}
31101_ACEOF
31102if ac_fn_cxx_try_link "$LINENO"; then :
31103  has_static_libstdcxx=yes
31104else
31105  has_static_libstdcxx=no
31106fi
31107rm -f core conftest.err conftest.$ac_objext \
31108    conftest$ac_exeext conftest.$ac_ext
31109    LIBS="$OLD_LIBS"
31110    CXX="$OLD_CXX"
31111    ac_ext=cpp
31112ac_cpp='$CXXCPP $CPPFLAGS'
31113ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31114ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31115ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31116
31117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31118$as_echo "$has_static_libstdcxx" >&6; }
31119
31120    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31121        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31122    fi
31123
31124    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31125        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31126    fi
31127
31128    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31129        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31130    fi
31131
31132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31133$as_echo_n "checking how to link with libstdc++... " >&6; }
31134    # If dynamic was requested, it's available since it would fail above otherwise.
31135    # If dynamic wasn't requested, go with static unless it isn't available.
31136    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31137        LIBCXX="$LIBCXX -lstdc++"
31138        LDCXX="$CXX"
31139        STATIC_CXX_SETTING="STATIC_CXX=false"
31140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31141$as_echo "dynamic" >&6; }
31142    else
31143        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31144        LDCXX="$CC"
31145        STATIC_CXX_SETTING="STATIC_CXX=true"
31146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31147$as_echo "static" >&6; }
31148    fi
31149fi
31150
31151
31152# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31153if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31154    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31155fi
31156
31157# TODO better (platform agnostic) test
31158if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31159    LIBCXX="-lstdc++"
31160fi
31161
31162
31163
31164
31165
31166# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31167
31168# When using cygwin or msys, we need a wrapper binary that renames
31169# /cygdrive/c/ arguments into c:/ arguments and peeks into
31170# @files and rewrites these too! This wrapper binary is
31171# called fixpath.
31172FIXPATH=
31173if test "x$OPENJDK_BUILD_OS" = xwindows; then
31174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31175$as_echo_n "checking if fixpath can be created... " >&6; }
31176    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31177    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31178    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31179      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31180      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31181      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31182      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31183    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31184      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31185      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31186
31187      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31188      # @ was chosen as separator to minimize risk of other tools messing around with it
31189      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31190      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31191
31192      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31193    fi
31194    rm -f $OUTPUT_ROOT/fixpath*
31195    cd $OUTPUT_ROOT
31196    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31197    cd $CURDIR
31198
31199    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31201$as_echo "no" >&6; }
31202        cat $OUTPUT_ROOT/fixpath1.log
31203        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31204    fi
31205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31206$as_echo "yes" >&6; }
31207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31208$as_echo_n "checking if fixpath.exe works... " >&6; }
31209    cd $OUTPUT_ROOT
31210    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31211    cd $CURDIR
31212    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31214$as_echo "no" >&6; }
31215        cat $OUTPUT_ROOT/fixpath2.log
31216        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31217    fi
31218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31219$as_echo "yes" >&6; }
31220    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31221fi
31222
31223
31224
31225
31226###############################################################################
31227#
31228# We need to do some final tweaking, when everything else is done.
31229#
31230###############################################################################
31231
31232
31233HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31234
31235
31236# The name of the Service Agent jar.
31237SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31238if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31239  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31240fi
31241
31242
31243
31244
31245###############################################################################
31246#
31247# Configure parts of the build that only affect the build performance,
31248# not the result.
31249#
31250###############################################################################
31251
31252
31253# How many cores do we have on this build system?
31254
31255# Check whether --with-num-cores was given.
31256if test "${with_num_cores+set}" = set; then :
31257  withval=$with_num_cores;
31258fi
31259
31260if test "x$with_num_cores" = x; then
31261    # The number of cores were not specified, try to probe them.
31262
31263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31264$as_echo_n "checking for number of cores... " >&6; }
31265    NUM_CORES=1
31266    FOUND_CORES=no
31267
31268    if test -f /proc/cpuinfo; then
31269        # Looks like a Linux (or cygwin) system
31270        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31271        FOUND_CORES=yes
31272    elif test -x /usr/sbin/psrinfo; then
31273        # Looks like a Solaris system
31274        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31275        FOUND_CORES=yes
31276    elif test -x /usr/sbin/system_profiler; then
31277        # Looks like a MacOSX system
31278        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31279        FOUND_CORES=yes
31280    elif test -n "$NUMBER_OF_PROCESSORS"; then
31281        # On windows, look in the env
31282        NUM_CORES=$NUMBER_OF_PROCESSORS
31283        FOUND_CORES=yes
31284    fi
31285
31286    # For c/c++ code we run twice as many concurrent build
31287    # jobs than we have cores, otherwise we will stall on io.
31288    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31289
31290    if test "x$FOUND_CORES" = xyes; then
31291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31292$as_echo "$NUM_CORES" >&6; }
31293    else
31294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31295$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31296        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31297$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31298    fi
31299
31300
31301else
31302    NUM_CORES=$with_num_cores
31303    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31304fi
31305
31306
31307
31308
31309# How much memory do we have on this build system?
31310
31311# Check whether --with-memory-size was given.
31312if test "${with_memory_size+set}" = set; then :
31313  withval=$with_memory_size;
31314fi
31315
31316if test "x$with_memory_size" = x; then
31317    # The memory size was not specified, try to probe it.
31318
31319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31320$as_echo_n "checking for memory size... " >&6; }
31321    # Default to 1024 MB
31322    MEMORY_SIZE=1024
31323    FOUND_MEM=no
31324
31325    if test -f /proc/meminfo; then
31326        # Looks like a Linux (or cygwin) system
31327        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31328        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31329        FOUND_MEM=yes
31330    elif test -x /usr/sbin/prtconf; then
31331        # Looks like a Solaris system
31332        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31333        FOUND_MEM=yes
31334    elif test -x /usr/sbin/system_profiler; then
31335        # Looks like a MacOSX system
31336        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31337        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31338        FOUND_MEM=yes
31339    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31340        # Windows, but without cygwin
31341        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31342        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31343        FOUND_MEM=yes
31344    fi
31345
31346    if test "x$FOUND_MEM" = xyes; then
31347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31348$as_echo "$MEMORY_SIZE MB" >&6; }
31349    else
31350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31351$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31352        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31353$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31354    fi
31355
31356else
31357    MEMORY_SIZE=$with_memory_size
31358fi
31359
31360
31361
31362# Setup smart javac (after cores and memory have been setup)
31363
31364
31365# Check whether --with-sjavac-server-java was given.
31366if test "${with_sjavac_server_java+set}" = set; then :
31367  withval=$with_sjavac_server_java;
31368fi
31369
31370
31371if test "x$with_sjavac_server_java" != x; then
31372    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31373    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31374    if test "x$FOUND_VERSION" = x; then
31375        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31376    fi
31377else
31378    SJAVAC_SERVER_JAVA=""
31379    # Hotspot specific options.
31380
31381    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31382    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31383    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31384    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31385    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31386        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31387    fi
31388
31389    # JRockit specific options.
31390
31391    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31392    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31393    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31394    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31395    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31396        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31397    fi
31398
31399    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31400fi
31401
31402
31403
31404# Check whether --with-sjavac-server-cores was given.
31405if test "${with_sjavac_server_cores+set}" = set; then :
31406  withval=$with_sjavac_server_cores;
31407fi
31408
31409if test "x$with_sjavac_server_cores" != x; then
31410    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31411else
31412    if test "$NUM_CORES" -gt 16; then
31413        # We set this arbitrary limit because we want to limit the heap
31414        # size of the javac server.
31415        # In the future we will make the javac compilers in the server
31416        # share more and more state, thus enabling us to use more and
31417        # more concurrent threads in the server.
31418        SJAVAC_SERVER_CORES="16"
31419    else
31420        SJAVAC_SERVER_CORES="$NUM_CORES"
31421    fi
31422
31423    if test "$MEMORY_SIZE" -gt "17000"; then
31424        MAX_HEAP_MEM=10000
31425
31426    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31427    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31428    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31429    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31430    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31431        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31432    fi
31433
31434
31435    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31436    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31437    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31438    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31439    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31440        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31441    fi
31442
31443    elif test "$MEMORY_SIZE" -gt "10000"; then
31444        MAX_HEAP_MEM=6000
31445
31446    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31447    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31448    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31449    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31450    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31451        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31452    fi
31453
31454
31455    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31456    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31457    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31458    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31459    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31460        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31461    fi
31462
31463    elif test "$MEMORY_SIZE" -gt "5000"; then
31464        MAX_HEAP_MEM=3000
31465
31466    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31467    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31468    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31469    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31470    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31471        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31472    fi
31473
31474
31475    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31476    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31477    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31478    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31479    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31480        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31481    fi
31482
31483    elif test "$MEMORY_SIZE" -gt "3800"; then
31484        MAX_HEAP_MEM=2500
31485
31486    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31487    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31488    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31489    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31490    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31491        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31492    fi
31493
31494    elif test "$MEMORY_SIZE" -gt "1900"; then
31495        MAX_HEAP_MEM=1200
31496
31497    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31498    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31499    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31500    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31501    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31502        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31503    fi
31504
31505    elif test "$MEMORY_SIZE" -gt "1000"; then
31506        MAX_HEAP_MEM=900
31507
31508    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31509    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31510    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31511    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31512    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31513        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31514    fi
31515
31516    else
31517        MAX_HEAP_MEM=512
31518
31519    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31520    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31521    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31522    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31523    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31524        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31525    fi
31526
31527    fi
31528
31529
31530    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31531    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31532    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31533    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31534    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31535        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31536    fi
31537
31538
31539    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31540    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31541    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31542    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31543    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31544        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31545    fi
31546
31547
31548    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31549    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31550    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31551    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31552    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31553        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31554    fi
31555
31556
31557    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31558    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31560$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31561        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31563$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31564    fi
31565fi
31566
31567
31568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31569$as_echo_n "checking whether to use sjavac... " >&6; }
31570# Check whether --enable-sjavac was given.
31571if test "${enable_sjavac+set}" = set; then :
31572  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31573else
31574  ENABLE_SJAVAC='no'
31575fi
31576
31577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31578$as_echo "$ENABLE_SJAVAC" >&6; }
31579
31580
31581if test "x$ENABLE_SJAVAC" = xyes; then
31582    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31583else
31584    SJAVAC_SERVER_DIR=
31585fi
31586
31587
31588
31589
31590# Can the C/C++ compiler use precompiled headers?
31591
31592
31593###############################################################################
31594#
31595# Can the C/C++ compiler use precompiled headers?
31596#
31597# Check whether --enable-precompiled-headers was given.
31598if test "${enable_precompiled_headers+set}" = set; then :
31599  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31600else
31601  ENABLE_PRECOMPH=yes
31602fi
31603
31604
31605USE_PRECOMPILED_HEADER=1
31606if test "x$ENABLE_PRECOMPH" = xno; then
31607    USE_PRECOMPILED_HEADER=0
31608fi
31609
31610if test "x$ENABLE_PRECOMPH" = xyes; then
31611    # Check that the compiler actually supports precomp headers.
31612    if test "x$GCC" = xyes; then
31613         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31614$as_echo_n "checking that precompiled headers work... " >&6; }
31615         echo "int alfa();" > conftest.h
31616         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31617         if test ! -f conftest.hpp.gch; then
31618             USE_PRECOMPILED_HEADER=0
31619             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31620$as_echo "no" >&6; }
31621         else
31622             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31623$as_echo "yes" >&6; }
31624         fi
31625         rm -f conftest.h conftest.hpp.gch
31626    fi
31627fi
31628
31629
31630
31631
31632# Setup use of ccache, if available
31633
31634    # Check whether --enable-ccache was given.
31635if test "${enable_ccache+set}" = set; then :
31636  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31637else
31638  ENABLE_CCACHE=yes
31639fi
31640
31641    if test "x$ENABLE_CCACHE" = xyes; then
31642        # Extract the first word of "ccache", so it can be a program name with args.
31643set dummy ccache; ac_word=$2
31644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31645$as_echo_n "checking for $ac_word... " >&6; }
31646if ${ac_cv_path_CCACHE+:} false; then :
31647  $as_echo_n "(cached) " >&6
31648else
31649  case $CCACHE in
31650  [\\/]* | ?:[\\/]*)
31651  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31652  ;;
31653  *)
31654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31655for as_dir in $PATH
31656do
31657  IFS=$as_save_IFS
31658  test -z "$as_dir" && as_dir=.
31659    for ac_exec_ext in '' $ac_executable_extensions; do
31660  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31661    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31663    break 2
31664  fi
31665done
31666  done
31667IFS=$as_save_IFS
31668
31669  ;;
31670esac
31671fi
31672CCACHE=$ac_cv_path_CCACHE
31673if test -n "$CCACHE"; then
31674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31675$as_echo "$CCACHE" >&6; }
31676else
31677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31678$as_echo "no" >&6; }
31679fi
31680
31681
31682    else
31683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31684$as_echo_n "checking for ccache... " >&6; }
31685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31686$as_echo "explicitly disabled" >&6; }
31687        CCACHE=
31688    fi
31689
31690
31691
31692# Check whether --with-ccache-dir was given.
31693if test "${with_ccache_dir+set}" = set; then :
31694  withval=$with_ccache_dir;
31695fi
31696
31697
31698    if test "x$with_ccache_dir" != x; then
31699        # When using a non home ccache directory, assume the use is to share ccache files
31700        # with other users. Thus change the umask.
31701        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31702    fi
31703    CCACHE_FOUND=""
31704    if test "x$CCACHE" != x; then
31705
31706    if test "x$CCACHE" != x; then
31707        CCACHE_FOUND="true"
31708        # Only use ccache if it is 3.1.4 or later, which supports
31709        # precompiled headers.
31710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31711$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31712        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31713        if test "x$HAS_GOOD_CCACHE" = x; then
31714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31715$as_echo "no, disabling ccache" >&6; }
31716            CCACHE=
31717        else
31718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31719$as_echo "yes" >&6; }
31720            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31721$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31722            PUSHED_FLAGS="$CXXFLAGS"
31723            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31724            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31725/* end confdefs.h.  */
31726
31727int
31728main ()
31729{
31730
31731  ;
31732  return 0;
31733}
31734_ACEOF
31735if ac_fn_cxx_try_compile "$LINENO"; then :
31736  CC_KNOWS_CCACHE_TRICK=yes
31737else
31738  CC_KNOWS_CCACHE_TRICK=no
31739fi
31740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31741            CXXFLAGS="$PUSHED_FLAGS"
31742            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31743                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31744$as_echo "yes" >&6; }
31745            else
31746                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31747$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31748                CCACHE=
31749            fi
31750        fi
31751    fi
31752
31753    if test "x$CCACHE" != x; then
31754        CCACHE_SLOPPINESS=time_macros
31755        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31756        CCACHE_FLAGS=-fpch-preprocess
31757
31758        if test "x$SET_CCACHE_DIR" != x; then
31759            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31760	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31761        fi
31762    fi
31763
31764    fi
31765
31766
31767###############################################################################
31768#
31769# And now the finish...
31770#
31771###############################################################################
31772
31773# Check for some common pitfalls
31774
31775  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31776    file_to_test="$SRC_ROOT/LICENSE"
31777    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31778      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
31779    fi
31780  fi
31781
31782
31783
31784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31785$as_echo_n "checking if build directory is on local disk... " >&6; }
31786
31787	# df -l lists only local disks; if the given directory is not found then
31788	# a non-zero exit code is given
31789  if test "x$DF" = x; then
31790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31791      # msys does not have df; use Windows "net use" instead.
31792      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31793      if test "x$IS_NETWORK_DISK" = x; then
31794        OUTPUT_DIR_IS_LOCAL="yes"
31795      else
31796        OUTPUT_DIR_IS_LOCAL="no"
31797      fi
31798    else
31799      # No df here, say it's local
31800      OUTPUT_DIR_IS_LOCAL="yes"
31801    fi
31802  else
31803    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31804      OUTPUT_DIR_IS_LOCAL="yes"
31805    else
31806      OUTPUT_DIR_IS_LOCAL="no"
31807    fi
31808  fi
31809
31810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31811$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31812
31813
31814
31815# Check if the user has any old-style ALT_ variables set.
31816FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31817
31818# Before generating output files, test if they exist. If they do, this is a reconfigure.
31819# Since we can't properly handle the dependencies for this, warn the user about the situation
31820if test -e $OUTPUT_ROOT/spec.gmk; then
31821  IS_RECONFIGURE=yes
31822else
31823  IS_RECONFIGURE=no
31824fi
31825
31826if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31827  HIDE_PERFORMANCE_HINTS=yes
31828else
31829  HIDE_PERFORMANCE_HINTS=no
31830  # Hide it the next time around...
31831  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31832fi
31833
31834
31835
31836# At the end, call the custom hook. (Dummy macro if no custom sources available)
31837
31838
31839# We're messing a bit with internal autoconf variables to put the config.status
31840# in the output directory instead of the current directory.
31841CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31842# Create the actual output files. Now the main work of configure is done.
31843cat >confcache <<\_ACEOF
31844# This file is a shell script that caches the results of configure
31845# tests run on this system so they can be shared between configure
31846# scripts and configure runs, see configure's option --config-cache.
31847# It is not useful on other systems.  If it contains results you don't
31848# want to keep, you may remove or edit it.
31849#
31850# config.status only pays attention to the cache file if you give it
31851# the --recheck option to rerun configure.
31852#
31853# `ac_cv_env_foo' variables (set or unset) will be overridden when
31854# loading this file, other *unset* `ac_cv_foo' will be assigned the
31855# following values.
31856
31857_ACEOF
31858
31859# The following way of writing the cache mishandles newlines in values,
31860# but we know of no workaround that is simple, portable, and efficient.
31861# So, we kill variables containing newlines.
31862# Ultrix sh set writes to stderr and can't be redirected directly,
31863# and sets the high bit in the cache file unless we assign to the vars.
31864(
31865  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31866    eval ac_val=\$$ac_var
31867    case $ac_val in #(
31868    *${as_nl}*)
31869      case $ac_var in #(
31870      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31871$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31872      esac
31873      case $ac_var in #(
31874      _ | IFS | as_nl) ;; #(
31875      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31876      *) { eval $ac_var=; unset $ac_var;} ;;
31877      esac ;;
31878    esac
31879  done
31880
31881  (set) 2>&1 |
31882    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31883    *${as_nl}ac_space=\ *)
31884      # `set' does not quote correctly, so add quotes: double-quote
31885      # substitution turns \\\\ into \\, and sed turns \\ into \.
31886      sed -n \
31887	"s/'/'\\\\''/g;
31888	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31889      ;; #(
31890    *)
31891      # `set' quotes correctly as required by POSIX, so do not add quotes.
31892      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31893      ;;
31894    esac |
31895    sort
31896) |
31897  sed '
31898     /^ac_cv_env_/b end
31899     t clear
31900     :clear
31901     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31902     t end
31903     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31904     :end' >>confcache
31905if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31906  if test -w "$cache_file"; then
31907    if test "x$cache_file" != "x/dev/null"; then
31908      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31909$as_echo "$as_me: updating cache $cache_file" >&6;}
31910      if test ! -f "$cache_file" || test -h "$cache_file"; then
31911	cat confcache >"$cache_file"
31912      else
31913        case $cache_file in #(
31914        */* | ?:*)
31915	  mv -f confcache "$cache_file"$$ &&
31916	  mv -f "$cache_file"$$ "$cache_file" ;; #(
31917        *)
31918	  mv -f confcache "$cache_file" ;;
31919	esac
31920      fi
31921    fi
31922  else
31923    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31924$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31925  fi
31926fi
31927rm -f confcache
31928
31929test "x$prefix" = xNONE && prefix=$ac_default_prefix
31930# Let make expand exec_prefix.
31931test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31932
31933DEFS=-DHAVE_CONFIG_H
31934
31935ac_libobjs=
31936ac_ltlibobjs=
31937U=
31938for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31939  # 1. Remove the extension, and $U if already installed.
31940  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31941  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31942  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31943  #    will be set to the directory where LIBOBJS objects are built.
31944  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31945  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31946done
31947LIBOBJS=$ac_libobjs
31948
31949LTLIBOBJS=$ac_ltlibobjs
31950
31951
31952
31953: "${CONFIG_STATUS=./config.status}"
31954ac_write_fail=0
31955ac_clean_files_save=$ac_clean_files
31956ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31957{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31958$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31959as_write_fail=0
31960cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31961#! $SHELL
31962# Generated by $as_me.
31963# Run this file to recreate the current configuration.
31964# Compiler output produced by configure, useful for debugging
31965# configure, is in config.log if it exists.
31966
31967debug=false
31968ac_cs_recheck=false
31969ac_cs_silent=false
31970
31971SHELL=\${CONFIG_SHELL-$SHELL}
31972export SHELL
31973_ASEOF
31974cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31975## -------------------- ##
31976## M4sh Initialization. ##
31977## -------------------- ##
31978
31979# Be more Bourne compatible
31980DUALCASE=1; export DUALCASE # for MKS sh
31981if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31982  emulate sh
31983  NULLCMD=:
31984  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31985  # is contrary to our usage.  Disable this feature.
31986  alias -g '${1+"$@"}'='"$@"'
31987  setopt NO_GLOB_SUBST
31988else
31989  case `(set -o) 2>/dev/null` in #(
31990  *posix*) :
31991    set -o posix ;; #(
31992  *) :
31993     ;;
31994esac
31995fi
31996
31997
31998as_nl='
31999'
32000export as_nl
32001# Printing a long string crashes Solaris 7 /usr/bin/printf.
32002as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32003as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32004as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32005# Prefer a ksh shell builtin over an external printf program on Solaris,
32006# but without wasting forks for bash or zsh.
32007if test -z "$BASH_VERSION$ZSH_VERSION" \
32008    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32009  as_echo='print -r --'
32010  as_echo_n='print -rn --'
32011elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32012  as_echo='printf %s\n'
32013  as_echo_n='printf %s'
32014else
32015  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32016    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32017    as_echo_n='/usr/ucb/echo -n'
32018  else
32019    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32020    as_echo_n_body='eval
32021      arg=$1;
32022      case $arg in #(
32023      *"$as_nl"*)
32024	expr "X$arg" : "X\\(.*\\)$as_nl";
32025	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32026      esac;
32027      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32028    '
32029    export as_echo_n_body
32030    as_echo_n='sh -c $as_echo_n_body as_echo'
32031  fi
32032  export as_echo_body
32033  as_echo='sh -c $as_echo_body as_echo'
32034fi
32035
32036# The user is always right.
32037if test "${PATH_SEPARATOR+set}" != set; then
32038  PATH_SEPARATOR=:
32039  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32040    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32041      PATH_SEPARATOR=';'
32042  }
32043fi
32044
32045
32046# IFS
32047# We need space, tab and new line, in precisely that order.  Quoting is
32048# there to prevent editors from complaining about space-tab.
32049# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32050# splitting by setting IFS to empty value.)
32051IFS=" ""	$as_nl"
32052
32053# Find who we are.  Look in the path if we contain no directory separator.
32054as_myself=
32055case $0 in #((
32056  *[\\/]* ) as_myself=$0 ;;
32057  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32058for as_dir in $PATH
32059do
32060  IFS=$as_save_IFS
32061  test -z "$as_dir" && as_dir=.
32062    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32063  done
32064IFS=$as_save_IFS
32065
32066     ;;
32067esac
32068# We did not find ourselves, most probably we were run as `sh COMMAND'
32069# in which case we are not to be found in the path.
32070if test "x$as_myself" = x; then
32071  as_myself=$0
32072fi
32073if test ! -f "$as_myself"; then
32074  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32075  exit 1
32076fi
32077
32078# Unset variables that we do not need and which cause bugs (e.g. in
32079# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32080# suppresses any "Segmentation fault" message there.  '((' could
32081# trigger a bug in pdksh 5.2.14.
32082for as_var in BASH_ENV ENV MAIL MAILPATH
32083do eval test x\${$as_var+set} = xset \
32084  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32085done
32086PS1='$ '
32087PS2='> '
32088PS4='+ '
32089
32090# NLS nuisances.
32091LC_ALL=C
32092export LC_ALL
32093LANGUAGE=C
32094export LANGUAGE
32095
32096# CDPATH.
32097(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32098
32099
32100# as_fn_error STATUS ERROR [LINENO LOG_FD]
32101# ----------------------------------------
32102# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32103# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32104# script with STATUS, using 1 if that was 0.
32105as_fn_error ()
32106{
32107  as_status=$1; test $as_status -eq 0 && as_status=1
32108  if test "$4"; then
32109    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32110    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32111  fi
32112  $as_echo "$as_me: error: $2" >&2
32113  as_fn_exit $as_status
32114} # as_fn_error
32115
32116
32117# as_fn_set_status STATUS
32118# -----------------------
32119# Set $? to STATUS, without forking.
32120as_fn_set_status ()
32121{
32122  return $1
32123} # as_fn_set_status
32124
32125# as_fn_exit STATUS
32126# -----------------
32127# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32128as_fn_exit ()
32129{
32130  set +e
32131  as_fn_set_status $1
32132  exit $1
32133} # as_fn_exit
32134
32135# as_fn_unset VAR
32136# ---------------
32137# Portably unset VAR.
32138as_fn_unset ()
32139{
32140  { eval $1=; unset $1;}
32141}
32142as_unset=as_fn_unset
32143# as_fn_append VAR VALUE
32144# ----------------------
32145# Append the text in VALUE to the end of the definition contained in VAR. Take
32146# advantage of any shell optimizations that allow amortized linear growth over
32147# repeated appends, instead of the typical quadratic growth present in naive
32148# implementations.
32149if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32150  eval 'as_fn_append ()
32151  {
32152    eval $1+=\$2
32153  }'
32154else
32155  as_fn_append ()
32156  {
32157    eval $1=\$$1\$2
32158  }
32159fi # as_fn_append
32160
32161# as_fn_arith ARG...
32162# ------------------
32163# Perform arithmetic evaluation on the ARGs, and store the result in the
32164# global $as_val. Take advantage of shells that can avoid forks. The arguments
32165# must be portable across $(()) and expr.
32166if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32167  eval 'as_fn_arith ()
32168  {
32169    as_val=$(( $* ))
32170  }'
32171else
32172  as_fn_arith ()
32173  {
32174    as_val=`expr "$@" || test $? -eq 1`
32175  }
32176fi # as_fn_arith
32177
32178
32179if expr a : '\(a\)' >/dev/null 2>&1 &&
32180   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32181  as_expr=expr
32182else
32183  as_expr=false
32184fi
32185
32186if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32187  as_basename=basename
32188else
32189  as_basename=false
32190fi
32191
32192if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32193  as_dirname=dirname
32194else
32195  as_dirname=false
32196fi
32197
32198as_me=`$as_basename -- "$0" ||
32199$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32200	 X"$0" : 'X\(//\)$' \| \
32201	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32202$as_echo X/"$0" |
32203    sed '/^.*\/\([^/][^/]*\)\/*$/{
32204	    s//\1/
32205	    q
32206	  }
32207	  /^X\/\(\/\/\)$/{
32208	    s//\1/
32209	    q
32210	  }
32211	  /^X\/\(\/\).*/{
32212	    s//\1/
32213	    q
32214	  }
32215	  s/.*/./; q'`
32216
32217# Avoid depending upon Character Ranges.
32218as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32219as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32220as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32221as_cr_digits='0123456789'
32222as_cr_alnum=$as_cr_Letters$as_cr_digits
32223
32224ECHO_C= ECHO_N= ECHO_T=
32225case `echo -n x` in #(((((
32226-n*)
32227  case `echo 'xy\c'` in
32228  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32229  xy)  ECHO_C='\c';;
32230  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32231       ECHO_T='	';;
32232  esac;;
32233*)
32234  ECHO_N='-n';;
32235esac
32236
32237rm -f conf$$ conf$$.exe conf$$.file
32238if test -d conf$$.dir; then
32239  rm -f conf$$.dir/conf$$.file
32240else
32241  rm -f conf$$.dir
32242  mkdir conf$$.dir 2>/dev/null
32243fi
32244if (echo >conf$$.file) 2>/dev/null; then
32245  if ln -s conf$$.file conf$$ 2>/dev/null; then
32246    as_ln_s='ln -s'
32247    # ... but there are two gotchas:
32248    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32249    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32250    # In both cases, we have to default to `cp -p'.
32251    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32252      as_ln_s='cp -p'
32253  elif ln conf$$.file conf$$ 2>/dev/null; then
32254    as_ln_s=ln
32255  else
32256    as_ln_s='cp -p'
32257  fi
32258else
32259  as_ln_s='cp -p'
32260fi
32261rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32262rmdir conf$$.dir 2>/dev/null
32263
32264
32265# as_fn_mkdir_p
32266# -------------
32267# Create "$as_dir" as a directory, including parents if necessary.
32268as_fn_mkdir_p ()
32269{
32270
32271  case $as_dir in #(
32272  -*) as_dir=./$as_dir;;
32273  esac
32274  test -d "$as_dir" || eval $as_mkdir_p || {
32275    as_dirs=
32276    while :; do
32277      case $as_dir in #(
32278      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32279      *) as_qdir=$as_dir;;
32280      esac
32281      as_dirs="'$as_qdir' $as_dirs"
32282      as_dir=`$as_dirname -- "$as_dir" ||
32283$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32284	 X"$as_dir" : 'X\(//\)[^/]' \| \
32285	 X"$as_dir" : 'X\(//\)$' \| \
32286	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32287$as_echo X"$as_dir" |
32288    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32289	    s//\1/
32290	    q
32291	  }
32292	  /^X\(\/\/\)[^/].*/{
32293	    s//\1/
32294	    q
32295	  }
32296	  /^X\(\/\/\)$/{
32297	    s//\1/
32298	    q
32299	  }
32300	  /^X\(\/\).*/{
32301	    s//\1/
32302	    q
32303	  }
32304	  s/.*/./; q'`
32305      test -d "$as_dir" && break
32306    done
32307    test -z "$as_dirs" || eval "mkdir $as_dirs"
32308  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32309
32310
32311} # as_fn_mkdir_p
32312if mkdir -p . 2>/dev/null; then
32313  as_mkdir_p='mkdir -p "$as_dir"'
32314else
32315  test -d ./-p && rmdir ./-p
32316  as_mkdir_p=false
32317fi
32318
32319if test -x / >/dev/null 2>&1; then
32320  as_test_x='test -x'
32321else
32322  if ls -dL / >/dev/null 2>&1; then
32323    as_ls_L_option=L
32324  else
32325    as_ls_L_option=
32326  fi
32327  as_test_x='
32328    eval sh -c '\''
32329      if test -d "$1"; then
32330	test -d "$1/.";
32331      else
32332	case $1 in #(
32333	-*)set "./$1";;
32334	esac;
32335	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32336	???[sx]*):;;*)false;;esac;fi
32337    '\'' sh
32338  '
32339fi
32340as_executable_p=$as_test_x
32341
32342# Sed expression to map a string onto a valid CPP name.
32343as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32344
32345# Sed expression to map a string onto a valid variable name.
32346as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32347
32348
32349exec 6>&1
32350## ----------------------------------- ##
32351## Main body of $CONFIG_STATUS script. ##
32352## ----------------------------------- ##
32353_ASEOF
32354test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32355
32356cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32357# Save the log message, to keep $0 and so on meaningful, and to
32358# report actual input values of CONFIG_FILES etc. instead of their
32359# values after options handling.
32360ac_log="
32361This file was extended by OpenJDK $as_me jdk8, which was
32362generated by GNU Autoconf 2.68.  Invocation command line was
32363
32364  CONFIG_FILES    = $CONFIG_FILES
32365  CONFIG_HEADERS  = $CONFIG_HEADERS
32366  CONFIG_LINKS    = $CONFIG_LINKS
32367  CONFIG_COMMANDS = $CONFIG_COMMANDS
32368  $ $0 $@
32369
32370on `(hostname || uname -n) 2>/dev/null | sed 1q`
32371"
32372
32373_ACEOF
32374
32375case $ac_config_files in *"
32376"*) set x $ac_config_files; shift; ac_config_files=$*;;
32377esac
32378
32379case $ac_config_headers in *"
32380"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32381esac
32382
32383
32384cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32385# Files that config.status was made for.
32386config_files="$ac_config_files"
32387config_headers="$ac_config_headers"
32388
32389_ACEOF
32390
32391cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32392ac_cs_usage="\
32393\`$as_me' instantiates files and other configuration actions
32394from templates according to the current configuration.  Unless the files
32395and actions are specified as TAGs, all are instantiated by default.
32396
32397Usage: $0 [OPTION]... [TAG]...
32398
32399  -h, --help       print this help, then exit
32400  -V, --version    print version number and configuration settings, then exit
32401      --config     print configuration, then exit
32402  -q, --quiet, --silent
32403                   do not print progress messages
32404  -d, --debug      don't remove temporary files
32405      --recheck    update $as_me by reconfiguring in the same conditions
32406      --file=FILE[:TEMPLATE]
32407                   instantiate the configuration file FILE
32408      --header=FILE[:TEMPLATE]
32409                   instantiate the configuration header FILE
32410
32411Configuration files:
32412$config_files
32413
32414Configuration headers:
32415$config_headers
32416
32417Report bugs to <build-dev@openjdk.java.net>.
32418OpenJDK home page: <http://openjdk.java.net>."
32419
32420_ACEOF
32421cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32422ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32423ac_cs_version="\\
32424OpenJDK config.status jdk8
32425configured by $0, generated by GNU Autoconf 2.68,
32426  with options \\"\$ac_cs_config\\"
32427
32428Copyright (C) 2010 Free Software Foundation, Inc.
32429This config.status script is free software; the Free Software Foundation
32430gives unlimited permission to copy, distribute and modify it."
32431
32432ac_pwd='$ac_pwd'
32433srcdir='$srcdir'
32434AWK='$AWK'
32435test -n "\$AWK" || AWK=awk
32436_ACEOF
32437
32438cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32439# The default lists apply if the user does not specify any file.
32440ac_need_defaults=:
32441while test $# != 0
32442do
32443  case $1 in
32444  --*=?*)
32445    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32446    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32447    ac_shift=:
32448    ;;
32449  --*=)
32450    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32451    ac_optarg=
32452    ac_shift=:
32453    ;;
32454  *)
32455    ac_option=$1
32456    ac_optarg=$2
32457    ac_shift=shift
32458    ;;
32459  esac
32460
32461  case $ac_option in
32462  # Handling of the options.
32463  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32464    ac_cs_recheck=: ;;
32465  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32466    $as_echo "$ac_cs_version"; exit ;;
32467  --config | --confi | --conf | --con | --co | --c )
32468    $as_echo "$ac_cs_config"; exit ;;
32469  --debug | --debu | --deb | --de | --d | -d )
32470    debug=: ;;
32471  --file | --fil | --fi | --f )
32472    $ac_shift
32473    case $ac_optarg in
32474    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32475    '') as_fn_error $? "missing file argument" ;;
32476    esac
32477    as_fn_append CONFIG_FILES " '$ac_optarg'"
32478    ac_need_defaults=false;;
32479  --header | --heade | --head | --hea )
32480    $ac_shift
32481    case $ac_optarg in
32482    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32483    esac
32484    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32485    ac_need_defaults=false;;
32486  --he | --h)
32487    # Conflict between --help and --header
32488    as_fn_error $? "ambiguous option: \`$1'
32489Try \`$0 --help' for more information.";;
32490  --help | --hel | -h )
32491    $as_echo "$ac_cs_usage"; exit ;;
32492  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32493  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32494    ac_cs_silent=: ;;
32495
32496  # This is an error.
32497  -*) as_fn_error $? "unrecognized option: \`$1'
32498Try \`$0 --help' for more information." ;;
32499
32500  *) as_fn_append ac_config_targets " $1"
32501     ac_need_defaults=false ;;
32502
32503  esac
32504  shift
32505done
32506
32507ac_configure_extra_args=
32508
32509if $ac_cs_silent; then
32510  exec 6>/dev/null
32511  ac_configure_extra_args="$ac_configure_extra_args --silent"
32512fi
32513
32514_ACEOF
32515cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32516if \$ac_cs_recheck; then
32517  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32518  shift
32519  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32520  CONFIG_SHELL='$SHELL'
32521  export CONFIG_SHELL
32522  exec "\$@"
32523fi
32524
32525_ACEOF
32526cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32527exec 5>>config.log
32528{
32529  echo
32530  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32531## Running $as_me. ##
32532_ASBOX
32533  $as_echo "$ac_log"
32534} >&5
32535
32536_ACEOF
32537cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32538_ACEOF
32539
32540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32541
32542# Handling of arguments.
32543for ac_config_target in $ac_config_targets
32544do
32545  case $ac_config_target in
32546    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32547    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32548    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32549    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32550    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32551    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32552    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32553
32554  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
32555  esac
32556done
32557
32558
32559# If the user did not use the arguments to specify the items to instantiate,
32560# then the envvar interface is used.  Set only those that are not.
32561# We use the long form for the default assignment because of an extremely
32562# bizarre bug on SunOS 4.1.3.
32563if $ac_need_defaults; then
32564  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32565  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32566fi
32567
32568# Have a temporary directory for convenience.  Make it in the build tree
32569# simply because there is no reason against having it here, and in addition,
32570# creating and moving files from /tmp can sometimes cause problems.
32571# Hook for its removal unless debugging.
32572# Note that there is a small window in which the directory will not be cleaned:
32573# after its creation but before its name has been assigned to `$tmp'.
32574$debug ||
32575{
32576  tmp= ac_tmp=
32577  trap 'exit_status=$?
32578  : "${ac_tmp:=$tmp}"
32579  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
32580' 0
32581  trap 'as_fn_exit 1' 1 2 13 15
32582}
32583# Create a (secure) tmp directory for tmp files.
32584
32585{
32586  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32587  test -d "$tmp"
32588}  ||
32589{
32590  tmp=./conf$$-$RANDOM
32591  (umask 077 && mkdir "$tmp")
32592} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32593ac_tmp=$tmp
32594
32595# Set up the scripts for CONFIG_FILES section.
32596# No need to generate them if there are no CONFIG_FILES.
32597# This happens for instance with `./config.status config.h'.
32598if test -n "$CONFIG_FILES"; then
32599
32600
32601ac_cr=`echo X | tr X '\015'`
32602# On cygwin, bash can eat \r inside `` if the user requested igncr.
32603# But we know of no other shell where ac_cr would be empty at this
32604# point, so we can use a bashism as a fallback.
32605if test "x$ac_cr" = x; then
32606  eval ac_cr=\$\'\\r\'
32607fi
32608ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32609if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32610  ac_cs_awk_cr='\\r'
32611else
32612  ac_cs_awk_cr=$ac_cr
32613fi
32614
32615echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
32616_ACEOF
32617
32618
32619{
32620  echo "cat >conf$$subs.awk <<_ACEOF" &&
32621  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32622  echo "_ACEOF"
32623} >conf$$subs.sh ||
32624  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32625ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32626ac_delim='%!_!# '
32627for ac_last_try in false false false false false :; do
32628  . ./conf$$subs.sh ||
32629    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32630
32631  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32632  if test $ac_delim_n = $ac_delim_num; then
32633    break
32634  elif $ac_last_try; then
32635    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32636  else
32637    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32638  fi
32639done
32640rm -f conf$$subs.sh
32641
32642cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32643cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
32644_ACEOF
32645sed -n '
32646h
32647s/^/S["/; s/!.*/"]=/
32648p
32649g
32650s/^[^!]*!//
32651:repl
32652t repl
32653s/'"$ac_delim"'$//
32654t delim
32655:nl
32656h
32657s/\(.\{148\}\)..*/\1/
32658t more1
32659s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32660p
32661n
32662b repl
32663:more1
32664s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32665p
32666g
32667s/.\{148\}//
32668t nl
32669:delim
32670h
32671s/\(.\{148\}\)..*/\1/
32672t more2
32673s/["\\]/\\&/g; s/^/"/; s/$/"/
32674p
32675b
32676:more2
32677s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32678p
32679g
32680s/.\{148\}//
32681t delim
32682' <conf$$subs.awk | sed '
32683/^[^""]/{
32684  N
32685  s/\n//
32686}
32687' >>$CONFIG_STATUS || ac_write_fail=1
32688rm -f conf$$subs.awk
32689cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32690_ACAWK
32691cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
32692  for (key in S) S_is_set[key] = 1
32693  FS = ""
32694
32695}
32696{
32697  line = $ 0
32698  nfields = split(line, field, "@")
32699  substed = 0
32700  len = length(field[1])
32701  for (i = 2; i < nfields; i++) {
32702    key = field[i]
32703    keylen = length(key)
32704    if (S_is_set[key]) {
32705      value = S[key]
32706      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32707      len += length(value) + length(field[++i])
32708      substed = 1
32709    } else
32710      len += 1 + keylen
32711  }
32712
32713  print line
32714}
32715
32716_ACAWK
32717_ACEOF
32718cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32719if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32720  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32721else
32722  cat
32723fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
32724  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32725_ACEOF
32726
32727# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32728# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32729# trailing colons and then remove the whole line if VPATH becomes empty
32730# (actually we leave an empty line to preserve line numbers).
32731if test "x$srcdir" = x.; then
32732  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32733h
32734s///
32735s/^/:/
32736s/[	 ]*$/:/
32737s/:\$(srcdir):/:/g
32738s/:\${srcdir}:/:/g
32739s/:@srcdir@:/:/g
32740s/^:*//
32741s/:*$//
32742x
32743s/\(=[	 ]*\).*/\1/
32744G
32745s/\n//
32746s/^[^=]*=[	 ]*$//
32747}'
32748fi
32749
32750cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32751fi # test -n "$CONFIG_FILES"
32752
32753# Set up the scripts for CONFIG_HEADERS section.
32754# No need to generate them if there are no CONFIG_HEADERS.
32755# This happens for instance with `./config.status Makefile'.
32756if test -n "$CONFIG_HEADERS"; then
32757cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
32758BEGIN {
32759_ACEOF
32760
32761# Transform confdefs.h into an awk script `defines.awk', embedded as
32762# here-document in config.status, that substitutes the proper values into
32763# config.h.in to produce config.h.
32764
32765# Create a delimiter string that does not exist in confdefs.h, to ease
32766# handling of long lines.
32767ac_delim='%!_!# '
32768for ac_last_try in false false :; do
32769  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
32770  if test -z "$ac_tt"; then
32771    break
32772  elif $ac_last_try; then
32773    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32774  else
32775    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32776  fi
32777done
32778
32779# For the awk script, D is an array of macro values keyed by name,
32780# likewise P contains macro parameters if any.  Preserve backslash
32781# newline sequences.
32782
32783ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32784sed -n '
32785s/.\{148\}/&'"$ac_delim"'/g
32786t rset
32787:rset
32788s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32789t def
32790d
32791:def
32792s/\\$//
32793t bsnl
32794s/["\\]/\\&/g
32795s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32796D["\1"]=" \3"/p
32797s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32798d
32799:bsnl
32800s/["\\]/\\&/g
32801s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32802D["\1"]=" \3\\\\\\n"\\/p
32803t cont
32804s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32805t cont
32806d
32807:cont
32808n
32809s/.\{148\}/&'"$ac_delim"'/g
32810t clear
32811:clear
32812s/\\$//
32813t bsnlc
32814s/["\\]/\\&/g; s/^/"/; s/$/"/p
32815d
32816:bsnlc
32817s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32818b cont
32819' <confdefs.h | sed '
32820s/'"$ac_delim"'/"\\\
32821"/g' >>$CONFIG_STATUS || ac_write_fail=1
32822
32823cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32824  for (key in D) D_is_set[key] = 1
32825  FS = ""
32826}
32827/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32828  line = \$ 0
32829  split(line, arg, " ")
32830  if (arg[1] == "#") {
32831    defundef = arg[2]
32832    mac1 = arg[3]
32833  } else {
32834    defundef = substr(arg[1], 2)
32835    mac1 = arg[2]
32836  }
32837  split(mac1, mac2, "(") #)
32838  macro = mac2[1]
32839  prefix = substr(line, 1, index(line, defundef) - 1)
32840  if (D_is_set[macro]) {
32841    # Preserve the white space surrounding the "#".
32842    print prefix "define", macro P[macro] D[macro]
32843    next
32844  } else {
32845    # Replace #undef with comments.  This is necessary, for example,
32846    # in the case of _POSIX_SOURCE, which is predefined and required
32847    # on some systems where configure will not decide to define it.
32848    if (defundef == "undef") {
32849      print "/*", prefix defundef, macro, "*/"
32850      next
32851    }
32852  }
32853}
32854{ print }
32855_ACAWK
32856_ACEOF
32857cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32858  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32859fi # test -n "$CONFIG_HEADERS"
32860
32861
32862eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32863shift
32864for ac_tag
32865do
32866  case $ac_tag in
32867  :[FHLC]) ac_mode=$ac_tag; continue;;
32868  esac
32869  case $ac_mode$ac_tag in
32870  :[FHL]*:*);;
32871  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32872  :[FH]-) ac_tag=-:-;;
32873  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32874  esac
32875  ac_save_IFS=$IFS
32876  IFS=:
32877  set x $ac_tag
32878  IFS=$ac_save_IFS
32879  shift
32880  ac_file=$1
32881  shift
32882
32883  case $ac_mode in
32884  :L) ac_source=$1;;
32885  :[FH])
32886    ac_file_inputs=
32887    for ac_f
32888    do
32889      case $ac_f in
32890      -) ac_f="$ac_tmp/stdin";;
32891      *) # Look for the file first in the build tree, then in the source tree
32892	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32893	 # because $ac_f cannot contain `:'.
32894	 test -f "$ac_f" ||
32895	   case $ac_f in
32896	   [\\/$]*) false;;
32897	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32898	   esac ||
32899	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32900      esac
32901      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32902      as_fn_append ac_file_inputs " '$ac_f'"
32903    done
32904
32905    # Let's still pretend it is `configure' which instantiates (i.e., don't
32906    # use $as_me), people would be surprised to read:
32907    #    /* config.h.  Generated by config.status.  */
32908    configure_input='Generated from '`
32909	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32910	`' by configure.'
32911    if test x"$ac_file" != x-; then
32912      configure_input="$ac_file.  $configure_input"
32913      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32914$as_echo "$as_me: creating $ac_file" >&6;}
32915    fi
32916    # Neutralize special characters interpreted by sed in replacement strings.
32917    case $configure_input in #(
32918    *\&* | *\|* | *\\* )
32919       ac_sed_conf_input=`$as_echo "$configure_input" |
32920       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32921    *) ac_sed_conf_input=$configure_input;;
32922    esac
32923
32924    case $ac_tag in
32925    *:-:* | *:-) cat >"$ac_tmp/stdin" \
32926      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32927    esac
32928    ;;
32929  esac
32930
32931  ac_dir=`$as_dirname -- "$ac_file" ||
32932$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32933	 X"$ac_file" : 'X\(//\)[^/]' \| \
32934	 X"$ac_file" : 'X\(//\)$' \| \
32935	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32936$as_echo X"$ac_file" |
32937    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32938	    s//\1/
32939	    q
32940	  }
32941	  /^X\(\/\/\)[^/].*/{
32942	    s//\1/
32943	    q
32944	  }
32945	  /^X\(\/\/\)$/{
32946	    s//\1/
32947	    q
32948	  }
32949	  /^X\(\/\).*/{
32950	    s//\1/
32951	    q
32952	  }
32953	  s/.*/./; q'`
32954  as_dir="$ac_dir"; as_fn_mkdir_p
32955  ac_builddir=.
32956
32957case "$ac_dir" in
32958.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32959*)
32960  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32961  # A ".." for each directory in $ac_dir_suffix.
32962  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32963  case $ac_top_builddir_sub in
32964  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32965  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32966  esac ;;
32967esac
32968ac_abs_top_builddir=$ac_pwd
32969ac_abs_builddir=$ac_pwd$ac_dir_suffix
32970# for backward compatibility:
32971ac_top_builddir=$ac_top_build_prefix
32972
32973case $srcdir in
32974  .)  # We are building in place.
32975    ac_srcdir=.
32976    ac_top_srcdir=$ac_top_builddir_sub
32977    ac_abs_top_srcdir=$ac_pwd ;;
32978  [\\/]* | ?:[\\/]* )  # Absolute name.
32979    ac_srcdir=$srcdir$ac_dir_suffix;
32980    ac_top_srcdir=$srcdir
32981    ac_abs_top_srcdir=$srcdir ;;
32982  *) # Relative name.
32983    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32984    ac_top_srcdir=$ac_top_build_prefix$srcdir
32985    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32986esac
32987ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32988
32989
32990  case $ac_mode in
32991  :F)
32992  #
32993  # CONFIG_FILE
32994  #
32995
32996_ACEOF
32997
32998cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32999# If the template does not know about datarootdir, expand it.
33000# FIXME: This hack should be removed a few years after 2.60.
33001ac_datarootdir_hack=; ac_datarootdir_seen=
33002ac_sed_dataroot='
33003/datarootdir/ {
33004  p
33005  q
33006}
33007/@datadir@/p
33008/@docdir@/p
33009/@infodir@/p
33010/@localedir@/p
33011/@mandir@/p'
33012case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33013*datarootdir*) ac_datarootdir_seen=yes;;
33014*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33015  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33016$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33017_ACEOF
33018cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33019  ac_datarootdir_hack='
33020  s&@datadir@&$datadir&g
33021  s&@docdir@&$docdir&g
33022  s&@infodir@&$infodir&g
33023  s&@localedir@&$localedir&g
33024  s&@mandir@&$mandir&g
33025  s&\\\${datarootdir}&$datarootdir&g' ;;
33026esac
33027_ACEOF
33028
33029# Neutralize VPATH when `$srcdir' = `.'.
33030# Shell code in configure.ac might set extrasub.
33031# FIXME: do we really want to maintain this feature?
33032cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33033ac_sed_extra="$ac_vpsub
33034$extrasub
33035_ACEOF
33036cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33037:t
33038/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33039s|@configure_input@|$ac_sed_conf_input|;t t
33040s&@top_builddir@&$ac_top_builddir_sub&;t t
33041s&@top_build_prefix@&$ac_top_build_prefix&;t t
33042s&@srcdir@&$ac_srcdir&;t t
33043s&@abs_srcdir@&$ac_abs_srcdir&;t t
33044s&@top_srcdir@&$ac_top_srcdir&;t t
33045s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33046s&@builddir@&$ac_builddir&;t t
33047s&@abs_builddir@&$ac_abs_builddir&;t t
33048s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33049$ac_datarootdir_hack
33050"
33051eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
33052  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33053
33054test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33055  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
33056  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
33057      "$ac_tmp/out"`; test -z "$ac_out"; } &&
33058  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33059which seems to be undefined.  Please make sure it is defined" >&5
33060$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33061which seems to be undefined.  Please make sure it is defined" >&2;}
33062
33063  rm -f "$ac_tmp/stdin"
33064  case $ac_file in
33065  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33066  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33067  esac \
33068  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33069 ;;
33070  :H)
33071  #
33072  # CONFIG_HEADER
33073  #
33074  if test x"$ac_file" != x-; then
33075    {
33076      $as_echo "/* $configure_input  */" \
33077      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33078    } >"$ac_tmp/config.h" \
33079      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33080    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33081      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33082$as_echo "$as_me: $ac_file is unchanged" >&6;}
33083    else
33084      rm -f "$ac_file"
33085      mv "$ac_tmp/config.h" "$ac_file" \
33086	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33087    fi
33088  else
33089    $as_echo "/* $configure_input  */" \
33090      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33091      || as_fn_error $? "could not create -" "$LINENO" 5
33092  fi
33093 ;;
33094
33095
33096  esac
33097
33098done # for ac_tag
33099
33100
33101as_fn_exit 0
33102_ACEOF
33103ac_clean_files=$ac_clean_files_save
33104
33105test $ac_write_fail = 0 ||
33106  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33107
33108
33109# configure is writing to config.log, and then calls config.status.
33110# config.status does its own redirection, appending to config.log.
33111# Unfortunately, on DOS this fails, as config.log is still kept open
33112# by configure, so config.status won't be able to write to it; its
33113# output is simply discarded.  So we exec the FD to /dev/null,
33114# effectively closing config.log, so it can be properly (re)opened and
33115# appended to by config.status.  When coming back to configure, we
33116# need to make the FD available again.
33117if test "$no_create" != yes; then
33118  ac_cs_success=:
33119  ac_config_status_args=
33120  test "$silent" = yes &&
33121    ac_config_status_args="$ac_config_status_args --quiet"
33122  exec 5>/dev/null
33123  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33124  exec 5>>config.log
33125  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33126  # would make configure fail if this is the last instruction.
33127  $ac_cs_success || as_fn_exit 1
33128fi
33129if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33130  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33131$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33132fi
33133
33134
33135# Make the compare script executable
33136$CHMOD +x $OUTPUT_ROOT/compare.sh
33137
33138# Finally output some useful information to the user
33139
33140# Finally output some useful information to the user
33141
33142if test "x$CCACHE_FOUND" != x; then
33143	if  test "x$HAS_GOOD_CCACHE" = x; then
33144		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33145		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33146	else
33147		CCACHE_STATUS="installed and in use"
33148	fi
33149else
33150	if test "x$GCC" = xyes; then
33151		CCACHE_STATUS="not installed (consider installing)"
33152		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33153	else
33154		CCACHE_STATUS="not available for your system"
33155	fi
33156fi
33157
33158printf "\n"
33159printf "====================================================\n"
33160printf "A new configuration has been successfully created in\n"
33161printf "$OUTPUT_ROOT\n"
33162if test "x$CONFIGURE_COMMAND_LINE" != x; then
33163	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33164else
33165	printf "using default settings.\n"
33166fi
33167
33168printf "\n"
33169printf "Configuration summary:\n"
33170printf "* Debug level:    $DEBUG_LEVEL\n"
33171printf "* JDK variant:    $JDK_VARIANT\n"
33172printf "* JVM variants:   $with_jvm_variants\n"
33173printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33174
33175printf "\n"
33176printf "Tools summary:\n"
33177if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33178  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33179fi
33180printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33181printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33182printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33183
33184printf "\n"
33185printf "Build performance summary:\n"
33186printf "* Cores to use:   $NUM_CORES\n"
33187printf "* Memory limit:   $MEMORY_SIZE MB\n"
33188printf "* ccache status:  $CCACHE_STATUS\n"
33189printf "\n"
33190
33191if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33192	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33193	printf "$CCACHE_HELP_MSG\n"
33194
33195    # Print a helpful message on how to acquire the necessary build dependency.
33196    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33197    MISSING_DEPENDENCY=ccache
33198    PKGHANDLER_COMMAND=
33199
33200    case $PKGHANDLER in
33201	apt-get)
33202                apt_help     $MISSING_DEPENDENCY ;;
33203    yum)
33204                yum_help     $MISSING_DEPENDENCY ;;
33205	port)
33206                port_help    $MISSING_DEPENDENCY ;;
33207	pkgutil)
33208                pkgutil_help $MISSING_DEPENDENCY ;;
33209	pkgadd)
33210                pkgadd_help  $MISSING_DEPENDENCY ;;
33211    * )
33212      break ;;
33213    esac
33214
33215    if test "x$PKGHANDLER_COMMAND" != x; then
33216        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33217    fi
33218
33219	printf "$HELP_MSG\n"
33220	printf "\n"
33221fi
33222
33223if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33224	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33225	printf "will result in longer build times.\n"
33226	printf "\n"
33227fi
33228
33229if test "x$FOUND_ALT_VARIABLES" != "x"; then
33230	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33231	printf "These are not respected, and will be ignored. It is recommended\n"
33232	printf "that you clean your environment. The following variables are set:\n"
33233	printf "$FOUND_ALT_VARIABLES\n"
33234	printf "\n"
33235fi
33236
33237if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33238	printf "WARNING: Your build output directory is not on a local disk.\n"
33239	printf "This will severely degrade build performance!\n"
33240	printf "It is recommended that you create an output directory on a local disk,\n"
33241	printf "and run the configure script again from that directory.\n"
33242	printf "\n"
33243fi
33244
33245if test "x$IS_RECONFIGURE" = "xyes"; then
33246	printf "WARNING: The result of this configuration has overridden an older\n"
33247	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33248	printf "proper build. Failure to do so might result in strange build problems.\n"
33249	printf "\n"
33250fi
33251
33252