generated-configure.sh revision 652:22b9a31a92eb
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.68 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94as_myself=
95case $0 in #((
96  *[\\/]* ) as_myself=$0 ;;
97  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98for as_dir in $PATH
99do
100  IFS=$as_save_IFS
101  test -z "$as_dir" && as_dir=.
102    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103  done
104IFS=$as_save_IFS
105
106     ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111  as_myself=$0
112fi
113if test ! -f "$as_myself"; then
114  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115  exit 1
116fi
117
118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there.  '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
135
136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141  emulate sh
142  NULLCMD=:
143  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144  # is contrary to our usage.  Disable this feature.
145  alias -g '\${1+\"\$@\"}'='\"\$@\"'
146  setopt NO_GLOB_SUBST
147else
148  case \`(set -o) 2>/dev/null\` in #(
149  *posix*) :
150    set -o posix ;; #(
151  *) :
152     ;;
153esac
154fi
155"
156  as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170  exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178  if (eval "$as_required") 2>/dev/null; then :
179  as_have_required=yes
180else
181  as_have_required=no
182fi
183  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190  IFS=$as_save_IFS
191  test -z "$as_dir" && as_dir=.
192  as_found=:
193  case $as_dir in #(
194	 /*)
195	   for as_base in sh bash ksh sh5; do
196	     # Try only shells that exist, to save several forks.
197	     as_shell=$as_dir/$as_base
198	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200  CONFIG_SHELL=$as_shell as_have_required=yes
201		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202  break 2
203fi
204fi
205	   done;;
206       esac
207  as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211  CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216      if test "x$CONFIG_SHELL" != x; then :
217  # We cannot yet assume a decent shell, so we have to provide a
218	# neutralization value for shells without unset; and this also
219	# works around shells that cannot unset nonexistent variables.
220	# Preserve -v and -x to the replacement shell.
221	BASH_ENV=/dev/null
222	ENV=/dev/null
223	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224	export CONFIG_SHELL
225	case $- in # ((((
226	  *v*x* | *x*v* ) as_opts=-vx ;;
227	  *v* ) as_opts=-v ;;
228	  *x* ) as_opts=-x ;;
229	  * ) as_opts= ;;
230	esac
231	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
232fi
233
234    if test x$as_have_required = xno; then :
235  $as_echo "$0: This script requires a shell more modern than all"
236  $as_echo "$0: the shells that I found on your system."
237  if test x${ZSH_VERSION+set} = xset ; then
238    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240  else
241    $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: build-dev@openjdk.java.net about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246  fi
247  exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265  { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274  return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282  set +e
283  as_fn_set_status $1
284  exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293  case $as_dir in #(
294  -*) as_dir=./$as_dir;;
295  esac
296  test -d "$as_dir" || eval $as_mkdir_p || {
297    as_dirs=
298    while :; do
299      case $as_dir in #(
300      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301      *) as_qdir=$as_dir;;
302      esac
303      as_dirs="'$as_qdir' $as_dirs"
304      as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306	 X"$as_dir" : 'X\(//\)[^/]' \| \
307	 X"$as_dir" : 'X\(//\)$' \| \
308	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\/\)[^/].*/{
315	    s//\1/
316	    q
317	  }
318	  /^X\(\/\/\)$/{
319	    s//\1/
320	    q
321	  }
322	  /^X\(\/\).*/{
323	    s//\1/
324	    q
325	  }
326	  s/.*/./; q'`
327      test -d "$as_dir" && break
328    done
329    test -z "$as_dirs" || eval "mkdir $as_dirs"
330  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341  eval 'as_fn_append ()
342  {
343    eval $1+=\$2
344  }'
345else
346  as_fn_append ()
347  {
348    eval $1=\$$1\$2
349  }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358  eval 'as_fn_arith ()
359  {
360    as_val=$(( $* ))
361  }'
362else
363  as_fn_arith ()
364  {
365    as_val=`expr "$@" || test $? -eq 1`
366  }
367fi # as_fn_arith
368
369
370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
374# script with STATUS, using 1 if that was 0.
375as_fn_error ()
376{
377  as_status=$1; test $as_status -eq 0 && as_status=1
378  if test "$4"; then
379    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
381  fi
382  $as_echo "$as_me: error: $2" >&2
383  as_fn_exit $as_status
384} # as_fn_error
385
386if expr a : '\(a\)' >/dev/null 2>&1 &&
387   test "X`expr 00001 : '.*\(...\)'`" = X001; then
388  as_expr=expr
389else
390  as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394  as_basename=basename
395else
396  as_basename=false
397fi
398
399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400  as_dirname=dirname
401else
402  as_dirname=false
403fi
404
405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407	 X"$0" : 'X\(//\)$' \| \
408	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
409$as_echo X/"$0" |
410    sed '/^.*\/\([^/][^/]*\)\/*$/{
411	    s//\1/
412	    q
413	  }
414	  /^X\/\(\/\/\)$/{
415	    s//\1/
416	    q
417	  }
418	  /^X\/\(\/\).*/{
419	    s//\1/
420	    q
421	  }
422	  s/.*/./; q'`
423
424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
430
431
432  as_lineno_1=$LINENO as_lineno_1a=$LINENO
433  as_lineno_2=$LINENO as_lineno_2a=$LINENO
434  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
437  sed -n '
438    p
439    /[$]LINENO/=
440  ' <$as_myself |
441    sed '
442      s/[$]LINENO.*/&-/
443      t lineno
444      b
445      :lineno
446      N
447      :loop
448      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
449      t loop
450      s/-\n.*//
451    ' >$as_me.lineno &&
452  chmod +x "$as_me.lineno" ||
453    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
454
455  # Don't try to exec as it changes $[0], causing all sort of problems
456  # (the dirname of $[0] is not the place where we might find the
457  # original and so on.  Autoconf is especially sensitive to this).
458  . "./$as_me.lineno"
459  # Exit status is that of the last command.
460  exit
461}
462
463ECHO_C= ECHO_N= ECHO_T=
464case `echo -n x` in #(((((
465-n*)
466  case `echo 'xy\c'` in
467  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
468  xy)  ECHO_C='\c';;
469  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
470       ECHO_T='	';;
471  esac;;
472*)
473  ECHO_N='-n';;
474esac
475
476rm -f conf$$ conf$$.exe conf$$.file
477if test -d conf$$.dir; then
478  rm -f conf$$.dir/conf$$.file
479else
480  rm -f conf$$.dir
481  mkdir conf$$.dir 2>/dev/null
482fi
483if (echo >conf$$.file) 2>/dev/null; then
484  if ln -s conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s='ln -s'
486    # ... but there are two gotchas:
487    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489    # In both cases, we have to default to `cp -p'.
490    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491      as_ln_s='cp -p'
492  elif ln conf$$.file conf$$ 2>/dev/null; then
493    as_ln_s=ln
494  else
495    as_ln_s='cp -p'
496  fi
497else
498  as_ln_s='cp -p'
499fi
500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
502
503if mkdir -p . 2>/dev/null; then
504  as_mkdir_p='mkdir -p "$as_dir"'
505else
506  test -d ./-p && rmdir ./-p
507  as_mkdir_p=false
508fi
509
510if test -x / >/dev/null 2>&1; then
511  as_test_x='test -x'
512else
513  if ls -dL / >/dev/null 2>&1; then
514    as_ls_L_option=L
515  else
516    as_ls_L_option=
517  fi
518  as_test_x='
519    eval sh -c '\''
520      if test -d "$1"; then
521	test -d "$1/.";
522      else
523	case $1 in #(
524	-*)set "./$1";;
525	esac;
526	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527	???[sx]*):;;*)false;;esac;fi
528    '\'' sh
529  '
530fi
531as_executable_p=$as_test_x
532
533# Sed expression to map a string onto a valid CPP name.
534as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
535
536# Sed expression to map a string onto a valid variable name.
537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
538
539
540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
542
543# Name of the host.
544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
548#
549# Initializations.
550#
551ac_default_prefix=/usr/local
552ac_clean_files=
553ac_config_libobj_dir=.
554LIBOBJS=
555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
559
560# Identity of this package.
561PACKAGE_NAME='OpenJDK'
562PACKAGE_TARNAME='openjdk'
563PACKAGE_VERSION='jdk8'
564PACKAGE_STRING='OpenJDK jdk8'
565PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
566PACKAGE_URL='http://openjdk.java.net'
567
568# Factoring default headers for most tests.
569ac_includes_default="\
570#include <stdio.h>
571#ifdef HAVE_SYS_TYPES_H
572# include <sys/types.h>
573#endif
574#ifdef HAVE_SYS_STAT_H
575# include <sys/stat.h>
576#endif
577#ifdef STDC_HEADERS
578# include <stdlib.h>
579# include <stddef.h>
580#else
581# ifdef HAVE_STDLIB_H
582#  include <stdlib.h>
583# endif
584#endif
585#ifdef HAVE_STRING_H
586# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
587#  include <memory.h>
588# endif
589# include <string.h>
590#endif
591#ifdef HAVE_STRINGS_H
592# include <strings.h>
593#endif
594#ifdef HAVE_INTTYPES_H
595# include <inttypes.h>
596#endif
597#ifdef HAVE_STDINT_H
598# include <stdint.h>
599#endif
600#ifdef HAVE_UNISTD_H
601# include <unistd.h>
602#endif"
603
604ac_subst_vars='LTLIBOBJS
605LIBOBJS
606CCACHE
607USE_PRECOMPILED_HEADER
608SJAVAC_SERVER_DIR
609ENABLE_SJAVAC
610SJAVAC_SERVER_CORES
611SJAVAC_SERVER_JAVA
612JOBS
613MEMORY_SIZE
614NUM_CORES
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_VERSION_MIN
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
736DXSDK_INCLUDE_PATH
737DXSDK_LIB_PATH
738VS_PATH
739VS_LIB
740VS_INCLUDE
741CYGWIN_LINK
742AR_OUT_OPTION
743LD_OUT_OPTION
744EXE_OUT_OPTION
745CC_OUT_OPTION
746BUILD_HOTSPOT
747HOTSPOT_DIST
748BUILD_OUTPUT
749OVERRIDE_SRC_ROOT
750ADD_SRC_ROOT
751JDK_TOPDIR
752NASHORN_TOPDIR
753HOTSPOT_TOPDIR
754JAXWS_TOPDIR
755JAXP_TOPDIR
756CORBA_TOPDIR
757LANGTOOLS_TOPDIR
758BOOT_JDK_JVMARGS
759JAVAC_FLAGS
760BOOT_JDK_SOURCETARGET
761BOOT_JDK
762BOOT_TOOLSJAR
763BOOT_RTJAR
764JAVA_CHECK
765JAVAC_CHECK
766COOKED_BUILD_NUMBER
767JDK_VERSION
768COPYRIGHT_YEAR
769MACOSX_BUNDLE_ID_BASE
770MACOSX_BUNDLE_NAME_BASE
771COMPANY_NAME
772JDK_RC_PLATFORM_NAME
773PRODUCT_SUFFIX
774PRODUCT_NAME
775LAUNCHER_NAME
776MILESTONE
777JDK_BUILD_NUMBER
778JDK_UPDATE_VERSION
779JDK_MICRO_VERSION
780JDK_MINOR_VERSION
781JDK_MAJOR_VERSION
782USER_RELEASE_SUFFIX
783COMPRESS_JARS
784UNLIMITED_CRYPTO
785CACERTS_FILE
786TEST_IN_BUILD
787BUILD_HEADLESS
788SUPPORT_HEADFUL
789SUPPORT_HEADLESS
790BDEPS_FTP
791BDEPS_UNZIP
792OS_VERSION_MICRO
793OS_VERSION_MINOR
794OS_VERSION_MAJOR
795PKG_CONFIG
796TIME
797STAT
798HG
799READELF
800OTOOL
801LDD
802ZIP
803UNZIP
804FIND_DELETE
805MAKE
806CHECK_TOOLSDIR_MAKE
807CHECK_TOOLSDIR_GMAKE
808CHECK_MAKE
809CHECK_GMAKE
810PKGHANDLER
811OUTPUT_ROOT
812CONF_NAME
813SPEC
814BUILD_VARIANT_RELEASE
815DEBUG_CLASSFILES
816FASTDEBUG
817VARIANT
818DEBUG_LEVEL
819MACOSX_UNIVERSAL
820JVM_VARIANT_ZEROSHARK
821JVM_VARIANT_ZERO
822JVM_VARIANT_KERNEL
823JVM_VARIANT_MINIMAL1
824JVM_VARIANT_CLIENT
825JVM_VARIANT_SERVER
826JVM_VARIANTS
827JDK_VARIANT
828SET_OPENJDK
829BUILD_LOG_WRAPPER
830BUILD_LOG_PREVIOUS
831BUILD_LOG
832SYS_ROOT
833PATH_SEP
834SRC_ROOT
835DEFINE_CROSS_COMPILE_ARCH
836LP64
837OPENJDK_TARGET_OS_API_DIR
838OPENJDK_TARGET_CPU_JLI_CFLAGS
839OPENJDK_TARGET_CPU_OSARCH
840OPENJDK_TARGET_CPU_ISADIR
841OPENJDK_TARGET_CPU_LIBDIR
842OPENJDK_TARGET_CPU_LEGACY_LIB
843OPENJDK_TARGET_CPU_LEGACY
844REQUIRED_OS_VERSION
845REQUIRED_OS_NAME
846COMPILE_TYPE
847OPENJDK_TARGET_CPU_ENDIAN
848OPENJDK_TARGET_CPU_BITS
849OPENJDK_TARGET_CPU_ARCH
850OPENJDK_TARGET_CPU
851OPENJDK_TARGET_OS_API
852OPENJDK_TARGET_OS
853OPENJDK_BUILD_CPU_ENDIAN
854OPENJDK_BUILD_CPU_BITS
855OPENJDK_BUILD_CPU_ARCH
856OPENJDK_BUILD_CPU
857OPENJDK_BUILD_OS_API
858OPENJDK_BUILD_OS
859OPENJDK_BUILD_AUTOCONF_NAME
860OPENJDK_TARGET_AUTOCONF_NAME
861target_os
862target_vendor
863target_cpu
864target
865host_os
866host_vendor
867host_cpu
868host
869build_os
870build_vendor
871build_cpu
872build
873SETFILE
874DF
875READLINK
876CYGPATH
877NAWK
878SED
879FGREP
880EGREP
881GREP
882AWK
883XARGS
884WHICH
885WC
886UNIQ
887UNAME
888TR
889TOUCH
890TEE
891TAR
892TAIL
893SORT
894SH
895RM
896THEPWDCMD
897PRINTF
898MV
899MKTEMP
900MKDIR
901LS
902LN
903HEAD
904FIND
905FILE
906EXPR
907ECHO
908DIRNAME
909DIFF
910DATE
911CUT
912CPIO
913CP
914COMM
915CMP
916CHMOD
917CAT
918BASH
919BASENAME
920DATE_WHEN_CONFIGURED
921CONFIGURE_COMMAND_LINE
922CUSTOM_MAKE_DIR
923target_alias
924host_alias
925build_alias
926LIBS
927ECHO_T
928ECHO_N
929ECHO_C
930DEFS
931mandir
932localedir
933libdir
934psdir
935pdfdir
936dvidir
937htmldir
938infodir
939docdir
940oldincludedir
941includedir
942localstatedir
943sharedstatedir
944sysconfdir
945datadir
946datarootdir
947libexecdir
948sbindir
949bindir
950program_transform_name
951prefix
952exec_prefix
953PACKAGE_URL
954PACKAGE_BUGREPORT
955PACKAGE_STRING
956PACKAGE_VERSION
957PACKAGE_TARNAME
958PACKAGE_NAME
959PATH_SEPARATOR
960SHELL'
961ac_subst_files=''
962ac_user_opts='
963enable_option_checking
964with_custom_make_dir
965with_target_bits
966with_sys_root
967with_tools_dir
968with_devkit
969enable_openjdk_only
970with_jdk_variant
971with_jvm_variants
972enable_debug
973with_debug_level
974with_conf_name
975with_builddeps_conf
976with_builddeps_server
977with_builddeps_dir
978with_builddeps_group
979enable_headful
980enable_hotspot_test_in_build
981with_cacerts_file
982enable_unlimited_crypto
983with_milestone
984with_build_number
985with_user_release_suffix
986with_boot_jdk
987with_boot_jdk_jvmargs
988with_add_source_root
989with_override_source_root
990with_adds_and_overrides
991with_override_langtools
992with_override_corba
993with_override_jaxp
994with_override_jaxws
995with_override_hotspot
996with_override_jdk
997with_import_hotspot
998with_msvcr_dll
999with_dxsdk
1000with_dxsdk_lib
1001with_dxsdk_include
1002with_extra_cflags
1003with_extra_cxxflags
1004with_extra_ldflags
1005enable_debug_symbols
1006enable_zip_debug_info
1007enable_macosx_runtime_support
1008with_x
1009with_cups
1010with_cups_include
1011with_freetype
1012with_alsa
1013with_alsa_include
1014with_alsa_lib
1015with_zlib
1016with_stdc__lib
1017with_num_cores
1018with_memory_size
1019with_jobs
1020with_sjavac_server_java
1021with_sjavac_server_cores
1022enable_sjavac
1023enable_precompiled_headers
1024enable_ccache
1025with_ccache_dir
1026'
1027      ac_precious_vars='build_alias
1028host_alias
1029target_alias
1030PKG_CONFIG
1031CC
1032CFLAGS
1033LDFLAGS
1034LIBS
1035CPPFLAGS
1036CXX
1037CXXFLAGS
1038CCC
1039OBJC
1040OBJCFLAGS
1041CPP
1042CXXCPP
1043XMKMF
1044FREETYPE2_CFLAGS
1045FREETYPE2_LIBS
1046ALSA_CFLAGS
1047ALSA_LIBS'
1048
1049
1050# Initialize some variables set by options.
1051ac_init_help=
1052ac_init_version=false
1053ac_unrecognized_opts=
1054ac_unrecognized_sep=
1055# The variables have the same names as the options, with
1056# dashes changed to underlines.
1057cache_file=/dev/null
1058exec_prefix=NONE
1059no_create=
1060no_recursion=
1061prefix=NONE
1062program_prefix=NONE
1063program_suffix=NONE
1064program_transform_name=s,x,x,
1065silent=
1066site=
1067srcdir=
1068verbose=
1069x_includes=NONE
1070x_libraries=NONE
1071
1072# Installation directory options.
1073# These are left unexpanded so users can "make install exec_prefix=/foo"
1074# and all the variables that are supposed to be based on exec_prefix
1075# by default will actually change.
1076# Use braces instead of parens because sh, perl, etc. also accept them.
1077# (The list follows the same order as the GNU Coding Standards.)
1078bindir='${exec_prefix}/bin'
1079sbindir='${exec_prefix}/sbin'
1080libexecdir='${exec_prefix}/libexec'
1081datarootdir='${prefix}/share'
1082datadir='${datarootdir}'
1083sysconfdir='${prefix}/etc'
1084sharedstatedir='${prefix}/com'
1085localstatedir='${prefix}/var'
1086includedir='${prefix}/include'
1087oldincludedir='/usr/include'
1088docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1089infodir='${datarootdir}/info'
1090htmldir='${docdir}'
1091dvidir='${docdir}'
1092pdfdir='${docdir}'
1093psdir='${docdir}'
1094libdir='${exec_prefix}/lib'
1095localedir='${datarootdir}/locale'
1096mandir='${datarootdir}/man'
1097
1098ac_prev=
1099ac_dashdash=
1100for ac_option
1101do
1102  # If the previous option needs an argument, assign it.
1103  if test -n "$ac_prev"; then
1104    eval $ac_prev=\$ac_option
1105    ac_prev=
1106    continue
1107  fi
1108
1109  case $ac_option in
1110  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1111  *=)   ac_optarg= ;;
1112  *)    ac_optarg=yes ;;
1113  esac
1114
1115  # Accept the important Cygnus configure options, so we can diagnose typos.
1116
1117  case $ac_dashdash$ac_option in
1118  --)
1119    ac_dashdash=yes ;;
1120
1121  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1122    ac_prev=bindir ;;
1123  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1124    bindir=$ac_optarg ;;
1125
1126  -build | --build | --buil | --bui | --bu)
1127    ac_prev=build_alias ;;
1128  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1129    build_alias=$ac_optarg ;;
1130
1131  -cache-file | --cache-file | --cache-fil | --cache-fi \
1132  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1133    ac_prev=cache_file ;;
1134  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1135  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1136    cache_file=$ac_optarg ;;
1137
1138  --config-cache | -C)
1139    cache_file=config.cache ;;
1140
1141  -datadir | --datadir | --datadi | --datad)
1142    ac_prev=datadir ;;
1143  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1144    datadir=$ac_optarg ;;
1145
1146  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1147  | --dataroo | --dataro | --datar)
1148    ac_prev=datarootdir ;;
1149  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1150  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1151    datarootdir=$ac_optarg ;;
1152
1153  -disable-* | --disable-*)
1154    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1155    # Reject names that are not valid shell variable names.
1156    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1157      as_fn_error $? "invalid feature name: $ac_useropt"
1158    ac_useropt_orig=$ac_useropt
1159    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1160    case $ac_user_opts in
1161      *"
1162"enable_$ac_useropt"
1163"*) ;;
1164      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1165	 ac_unrecognized_sep=', ';;
1166    esac
1167    eval enable_$ac_useropt=no ;;
1168
1169  -docdir | --docdir | --docdi | --doc | --do)
1170    ac_prev=docdir ;;
1171  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1172    docdir=$ac_optarg ;;
1173
1174  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1175    ac_prev=dvidir ;;
1176  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1177    dvidir=$ac_optarg ;;
1178
1179  -enable-* | --enable-*)
1180    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1181    # Reject names that are not valid shell variable names.
1182    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1183      as_fn_error $? "invalid feature name: $ac_useropt"
1184    ac_useropt_orig=$ac_useropt
1185    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1186    case $ac_user_opts in
1187      *"
1188"enable_$ac_useropt"
1189"*) ;;
1190      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1191	 ac_unrecognized_sep=', ';;
1192    esac
1193    eval enable_$ac_useropt=\$ac_optarg ;;
1194
1195  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1196  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1197  | --exec | --exe | --ex)
1198    ac_prev=exec_prefix ;;
1199  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1200  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1201  | --exec=* | --exe=* | --ex=*)
1202    exec_prefix=$ac_optarg ;;
1203
1204  -gas | --gas | --ga | --g)
1205    # Obsolete; use --with-gas.
1206    with_gas=yes ;;
1207
1208  -help | --help | --hel | --he | -h)
1209    ac_init_help=long ;;
1210  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1211    ac_init_help=recursive ;;
1212  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1213    ac_init_help=short ;;
1214
1215  -host | --host | --hos | --ho)
1216    ac_prev=host_alias ;;
1217  -host=* | --host=* | --hos=* | --ho=*)
1218    host_alias=$ac_optarg ;;
1219
1220  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1221    ac_prev=htmldir ;;
1222  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1223  | --ht=*)
1224    htmldir=$ac_optarg ;;
1225
1226  -includedir | --includedir | --includedi | --included | --include \
1227  | --includ | --inclu | --incl | --inc)
1228    ac_prev=includedir ;;
1229  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1230  | --includ=* | --inclu=* | --incl=* | --inc=*)
1231    includedir=$ac_optarg ;;
1232
1233  -infodir | --infodir | --infodi | --infod | --info | --inf)
1234    ac_prev=infodir ;;
1235  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1236    infodir=$ac_optarg ;;
1237
1238  -libdir | --libdir | --libdi | --libd)
1239    ac_prev=libdir ;;
1240  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1241    libdir=$ac_optarg ;;
1242
1243  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1244  | --libexe | --libex | --libe)
1245    ac_prev=libexecdir ;;
1246  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1247  | --libexe=* | --libex=* | --libe=*)
1248    libexecdir=$ac_optarg ;;
1249
1250  -localedir | --localedir | --localedi | --localed | --locale)
1251    ac_prev=localedir ;;
1252  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1253    localedir=$ac_optarg ;;
1254
1255  -localstatedir | --localstatedir | --localstatedi | --localstated \
1256  | --localstate | --localstat | --localsta | --localst | --locals)
1257    ac_prev=localstatedir ;;
1258  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1259  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1260    localstatedir=$ac_optarg ;;
1261
1262  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1263    ac_prev=mandir ;;
1264  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1265    mandir=$ac_optarg ;;
1266
1267  -nfp | --nfp | --nf)
1268    # Obsolete; use --without-fp.
1269    with_fp=no ;;
1270
1271  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1272  | --no-cr | --no-c | -n)
1273    no_create=yes ;;
1274
1275  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1276  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1277    no_recursion=yes ;;
1278
1279  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1280  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1281  | --oldin | --oldi | --old | --ol | --o)
1282    ac_prev=oldincludedir ;;
1283  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1284  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1285  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1286    oldincludedir=$ac_optarg ;;
1287
1288  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1289    ac_prev=prefix ;;
1290  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1291    prefix=$ac_optarg ;;
1292
1293  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1294  | --program-pre | --program-pr | --program-p)
1295    ac_prev=program_prefix ;;
1296  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1297  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1298    program_prefix=$ac_optarg ;;
1299
1300  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1301  | --program-suf | --program-su | --program-s)
1302    ac_prev=program_suffix ;;
1303  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1304  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1305    program_suffix=$ac_optarg ;;
1306
1307  -program-transform-name | --program-transform-name \
1308  | --program-transform-nam | --program-transform-na \
1309  | --program-transform-n | --program-transform- \
1310  | --program-transform | --program-transfor \
1311  | --program-transfo | --program-transf \
1312  | --program-trans | --program-tran \
1313  | --progr-tra | --program-tr | --program-t)
1314    ac_prev=program_transform_name ;;
1315  -program-transform-name=* | --program-transform-name=* \
1316  | --program-transform-nam=* | --program-transform-na=* \
1317  | --program-transform-n=* | --program-transform-=* \
1318  | --program-transform=* | --program-transfor=* \
1319  | --program-transfo=* | --program-transf=* \
1320  | --program-trans=* | --program-tran=* \
1321  | --progr-tra=* | --program-tr=* | --program-t=*)
1322    program_transform_name=$ac_optarg ;;
1323
1324  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1325    ac_prev=pdfdir ;;
1326  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1327    pdfdir=$ac_optarg ;;
1328
1329  -psdir | --psdir | --psdi | --psd | --ps)
1330    ac_prev=psdir ;;
1331  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1332    psdir=$ac_optarg ;;
1333
1334  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1335  | -silent | --silent | --silen | --sile | --sil)
1336    silent=yes ;;
1337
1338  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1339    ac_prev=sbindir ;;
1340  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1341  | --sbi=* | --sb=*)
1342    sbindir=$ac_optarg ;;
1343
1344  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1345  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1346  | --sharedst | --shareds | --shared | --share | --shar \
1347  | --sha | --sh)
1348    ac_prev=sharedstatedir ;;
1349  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1350  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1351  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1352  | --sha=* | --sh=*)
1353    sharedstatedir=$ac_optarg ;;
1354
1355  -site | --site | --sit)
1356    ac_prev=site ;;
1357  -site=* | --site=* | --sit=*)
1358    site=$ac_optarg ;;
1359
1360  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1361    ac_prev=srcdir ;;
1362  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1363    srcdir=$ac_optarg ;;
1364
1365  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1366  | --syscon | --sysco | --sysc | --sys | --sy)
1367    ac_prev=sysconfdir ;;
1368  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1369  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1370    sysconfdir=$ac_optarg ;;
1371
1372  -target | --target | --targe | --targ | --tar | --ta | --t)
1373    ac_prev=target_alias ;;
1374  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1375    target_alias=$ac_optarg ;;
1376
1377  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1378    verbose=yes ;;
1379
1380  -version | --version | --versio | --versi | --vers | -V)
1381    ac_init_version=: ;;
1382
1383  -with-* | --with-*)
1384    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1385    # Reject names that are not valid shell variable names.
1386    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1387      as_fn_error $? "invalid package name: $ac_useropt"
1388    ac_useropt_orig=$ac_useropt
1389    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1390    case $ac_user_opts in
1391      *"
1392"with_$ac_useropt"
1393"*) ;;
1394      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1395	 ac_unrecognized_sep=', ';;
1396    esac
1397    eval with_$ac_useropt=\$ac_optarg ;;
1398
1399  -without-* | --without-*)
1400    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1401    # Reject names that are not valid shell variable names.
1402    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1403      as_fn_error $? "invalid package name: $ac_useropt"
1404    ac_useropt_orig=$ac_useropt
1405    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1406    case $ac_user_opts in
1407      *"
1408"with_$ac_useropt"
1409"*) ;;
1410      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1411	 ac_unrecognized_sep=', ';;
1412    esac
1413    eval with_$ac_useropt=no ;;
1414
1415  --x)
1416    # Obsolete; use --with-x.
1417    with_x=yes ;;
1418
1419  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1420  | --x-incl | --x-inc | --x-in | --x-i)
1421    ac_prev=x_includes ;;
1422  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1423  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1424    x_includes=$ac_optarg ;;
1425
1426  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1427  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1428    ac_prev=x_libraries ;;
1429  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1430  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1431    x_libraries=$ac_optarg ;;
1432
1433  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1434Try \`$0 --help' for more information"
1435    ;;
1436
1437  *=*)
1438    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1439    # Reject names that are not valid shell variable names.
1440    case $ac_envvar in #(
1441      '' | [0-9]* | *[!_$as_cr_alnum]* )
1442      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1443    esac
1444    eval $ac_envvar=\$ac_optarg
1445    export $ac_envvar ;;
1446
1447  *)
1448    # FIXME: should be removed in autoconf 3.0.
1449    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1450    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1451      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1452    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1453    ;;
1454
1455  esac
1456done
1457
1458if test -n "$ac_prev"; then
1459  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1460  as_fn_error $? "missing argument to $ac_option"
1461fi
1462
1463if test -n "$ac_unrecognized_opts"; then
1464  case $enable_option_checking in
1465    no) ;;
1466    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1467    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1468  esac
1469fi
1470
1471# Check all directory arguments for consistency.
1472for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1473		datadir sysconfdir sharedstatedir localstatedir includedir \
1474		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1475		libdir localedir mandir
1476do
1477  eval ac_val=\$$ac_var
1478  # Remove trailing slashes.
1479  case $ac_val in
1480    */ )
1481      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1482      eval $ac_var=\$ac_val;;
1483  esac
1484  # Be sure to have absolute directory names.
1485  case $ac_val in
1486    [\\/$]* | ?:[\\/]* )  continue;;
1487    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1488  esac
1489  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1490done
1491
1492# There might be people who depend on the old broken behavior: `$host'
1493# used to hold the argument of --host etc.
1494# FIXME: To remove some day.
1495build=$build_alias
1496host=$host_alias
1497target=$target_alias
1498
1499# FIXME: To remove some day.
1500if test "x$host_alias" != x; then
1501  if test "x$build_alias" = x; then
1502    cross_compiling=maybe
1503    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1504    If a cross compiler is detected then cross compile mode will be used" >&2
1505  elif test "x$build_alias" != "x$host_alias"; then
1506    cross_compiling=yes
1507  fi
1508fi
1509
1510ac_tool_prefix=
1511test -n "$host_alias" && ac_tool_prefix=$host_alias-
1512
1513test "$silent" = yes && exec 6>/dev/null
1514
1515
1516ac_pwd=`pwd` && test -n "$ac_pwd" &&
1517ac_ls_di=`ls -di .` &&
1518ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1519  as_fn_error $? "working directory cannot be determined"
1520test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1521  as_fn_error $? "pwd does not report name of working directory"
1522
1523
1524# Find the source files, if location was not specified.
1525if test -z "$srcdir"; then
1526  ac_srcdir_defaulted=yes
1527  # Try the directory containing this script, then the parent directory.
1528  ac_confdir=`$as_dirname -- "$as_myself" ||
1529$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1530	 X"$as_myself" : 'X\(//\)[^/]' \| \
1531	 X"$as_myself" : 'X\(//\)$' \| \
1532	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1533$as_echo X"$as_myself" |
1534    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1535	    s//\1/
1536	    q
1537	  }
1538	  /^X\(\/\/\)[^/].*/{
1539	    s//\1/
1540	    q
1541	  }
1542	  /^X\(\/\/\)$/{
1543	    s//\1/
1544	    q
1545	  }
1546	  /^X\(\/\).*/{
1547	    s//\1/
1548	    q
1549	  }
1550	  s/.*/./; q'`
1551  srcdir=$ac_confdir
1552  if test ! -r "$srcdir/$ac_unique_file"; then
1553    srcdir=..
1554  fi
1555else
1556  ac_srcdir_defaulted=no
1557fi
1558if test ! -r "$srcdir/$ac_unique_file"; then
1559  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1560  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1561fi
1562ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1563ac_abs_confdir=`(
1564	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1565	pwd)`
1566# When building in place, set srcdir=.
1567if test "$ac_abs_confdir" = "$ac_pwd"; then
1568  srcdir=.
1569fi
1570# Remove unnecessary trailing slashes from srcdir.
1571# Double slashes in file names in object file debugging info
1572# mess up M-x gdb in Emacs.
1573case $srcdir in
1574*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1575esac
1576for ac_var in $ac_precious_vars; do
1577  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1578  eval ac_env_${ac_var}_value=\$${ac_var}
1579  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1580  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1581done
1582
1583#
1584# Report the --help message.
1585#
1586if test "$ac_init_help" = "long"; then
1587  # Omit some internal or obsolete options to make the list less imposing.
1588  # This message is too long to be a string in the A/UX 3.1 sh.
1589  cat <<_ACEOF
1590\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1591
1592Usage: $0 [OPTION]... [VAR=VALUE]...
1593
1594To assign environment variables (e.g., CC, CFLAGS...), specify them as
1595VAR=VALUE.  See below for descriptions of some of the useful variables.
1596
1597Defaults for the options are specified in brackets.
1598
1599Configuration:
1600  -h, --help              display this help and exit
1601      --help=short        display options specific to this package
1602      --help=recursive    display the short help of all the included packages
1603  -V, --version           display version information and exit
1604  -q, --quiet, --silent   do not print \`checking ...' messages
1605      --cache-file=FILE   cache test results in FILE [disabled]
1606  -C, --config-cache      alias for \`--cache-file=config.cache'
1607  -n, --no-create         do not create output files
1608      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1609
1610Installation directories:
1611  --prefix=PREFIX         install architecture-independent files in PREFIX
1612                          [$ac_default_prefix]
1613  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1614                          [PREFIX]
1615
1616By default, \`make install' will install all the files in
1617\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1618an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1619for instance \`--prefix=\$HOME'.
1620
1621For better control, use the options below.
1622
1623Fine tuning of the installation directories:
1624  --bindir=DIR            user executables [EPREFIX/bin]
1625  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1626  --libexecdir=DIR        program executables [EPREFIX/libexec]
1627  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1628  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1629  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1630  --libdir=DIR            object code libraries [EPREFIX/lib]
1631  --includedir=DIR        C header files [PREFIX/include]
1632  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1633  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1634  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1635  --infodir=DIR           info documentation [DATAROOTDIR/info]
1636  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1637  --mandir=DIR            man documentation [DATAROOTDIR/man]
1638  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1639  --htmldir=DIR           html documentation [DOCDIR]
1640  --dvidir=DIR            dvi documentation [DOCDIR]
1641  --pdfdir=DIR            pdf documentation [DOCDIR]
1642  --psdir=DIR             ps documentation [DOCDIR]
1643_ACEOF
1644
1645  cat <<\_ACEOF
1646
1647X features:
1648  --x-includes=DIR    X include files are in DIR
1649  --x-libraries=DIR   X library files are in DIR
1650
1651System types:
1652  --build=BUILD     configure for building on BUILD [guessed]
1653  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1654  --target=TARGET   configure for building compilers for TARGET [HOST]
1655_ACEOF
1656fi
1657
1658if test -n "$ac_init_help"; then
1659  case $ac_init_help in
1660     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1661   esac
1662  cat <<\_ACEOF
1663
1664Optional Features:
1665  --disable-option-checking  ignore unrecognized --enable/--with options
1666  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1667  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1668  --enable-openjdk-only   suppress building custom source even if present
1669                          [disabled]
1670  --enable-debug          set the debug level to fastdebug (shorthand for
1671                          --with-debug-level=fastdebug) [disabled]
1672  --disable-headful       disable building headful support (graphical UI
1673                          support) [enabled]
1674  --enable-hotspot-test-in-build
1675                          run the Queens test after Hotspot build [disabled]
1676  --enable-unlimited-crypto
1677                          Enable unlimited crypto policy [disabled]
1678  --disable-debug-symbols disable generation of debug symbols [enabled]
1679  --disable-zip-debug-info
1680                          disable zipping of debug-info files [enabled]
1681  --disable-macosx-runtime-support
1682                          disable the use of MacOSX Java runtime support
1683                          framework [enabled]
1684  --enable-sjavac         use sjavac to do fast incremental compiles
1685                          [disabled]
1686  --disable-precompiled-headers
1687                          disable using precompiled headers when compiling C++
1688                          [enabled]
1689  --disable-ccache        disable using ccache to speed up recompilations
1690                          [enabled]
1691
1692Optional Packages:
1693  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1694  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1695  --with-custom-make-dir  use this directory for custom build/make files
1696  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1697                          support it), e.g. --with-target-bits=32 [guessed]
1698  --with-sys-root         pass this sys-root to the compilers and tools (for
1699                          cross-compiling)
1700  --with-tools-dir        search this directory for compilers and tools (for
1701                          cross-compiling)
1702  --with-devkit           use this directory as base for tools-dir and
1703                          sys-root (for cross-compiling)
1704  --with-jdk-variant      JDK variant to build (normal) [normal]
1705  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1706                          client, minimal1, kernel, zero, zeroshark) [server]
1707  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1708                          [release]
1709  --with-conf-name        use this as the name of the configuration [generated
1710                          from important configuration options]
1711  --with-builddeps-conf   use this configuration file for the builddeps
1712  --with-builddeps-server download and use build dependencies from this server
1713                          url
1714  --with-builddeps-dir    store downloaded build dependencies here
1715                          [/localhome/builddeps]
1716  --with-builddeps-group  chgrp the downloaded build dependencies to this
1717                          group
1718  --with-cacerts-file     specify alternative cacerts file
1719  --with-milestone        Set milestone value for build [internal]
1720  --with-build-number     Set build number value for build [b00]
1721  --with-user-release-suffix
1722                          Add a custom string to the version string if build
1723                          number isn't set.[username_builddateb00]
1724  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1725  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1726                          invocations of the Boot JDK, overriding the default
1727                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1728                          -enableassertions"
1729  --with-add-source-root  for each and every source directory, look in this
1730                          additional source root for the same directory; if it
1731                          exists and have files in it, include it in the build
1732  --with-override-source-root
1733                          for each and every source directory, look in this
1734                          override source root for the same directory; if it
1735                          exists, use that directory instead and ignore the
1736                          directory in the original source root
1737  --with-adds-and-overrides
1738                          use the subdirs 'adds' and 'overrides' in the
1739                          specified directory as add-source-root and
1740                          override-source-root
1741  --with-override-langtools
1742                          use this langtools dir for the build
1743  --with-override-corba   use this corba dir for the build
1744  --with-override-jaxp    use this jaxp dir for the build
1745  --with-override-jaxws   use this jaxws dir for the build
1746  --with-override-hotspot use this hotspot dir for the build
1747  --with-override-jdk     use this jdk dir for the build
1748  --with-import-hotspot   import hotspot binaries from this jdk image or
1749                          hotspot build dist dir instead of building from
1750                          source
1751  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1752                          only) [probed]
1753  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1754  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1755                          [probed]
1756  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1757                          [probed]
1758  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1759  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1760  --with-extra-ldflags    extra flags to be used when linking jdk
1761  --with-x                use the X Window System
1762  --with-cups             specify prefix directory for the cups package
1763                          (expecting the headers under PATH/include)
1764  --with-cups-include     specify directory for the cups include files
1765  --with-freetype         specify prefix directory for the freetype2 package
1766                          (expecting the libraries under PATH/lib and the
1767                          headers under PATH/include)
1768  --with-alsa             specify prefix directory for the alsa package
1769                          (expecting the libraries under PATH/lib and the
1770                          headers under PATH/include)
1771  --with-alsa-include     specify directory for the alsa include files
1772  --with-alsa-lib         specify directory for the alsa library
1773  --with-zlib             use zlib from build system or OpenJDK source
1774                          (system, bundled) [bundled]
1775  --with-stdc++lib=<static>,<dynamic>,<default>
1776                          force linking of the C++ runtime on Linux to either
1777                          static or dynamic, default is static with dynamic as
1778                          fallback
1779  --with-num-cores        number of cores in the build system, e.g.
1780                          --with-num-cores=8 [probed]
1781  --with-memory-size      memory (in MB) available in the build system, e.g.
1782                          --with-memory-size=1024 [probed]
1783  --with-jobs             number of parallel jobs to let make run [calculated
1784                          based on cores and memory]
1785  --with-sjavac-server-java
1786                          use this java binary for running the sjavac
1787                          background server [Boot JDK java]
1788  --with-sjavac-server-cores
1789                          use at most this number of concurrent threads on the
1790                          sjavac server [probed]
1791  --with-ccache-dir       where to store ccache files [~/.ccache]
1792
1793Some influential environment variables:
1794  PKG_CONFIG  path to pkg-config utility
1795  CC          C compiler command
1796  CFLAGS      C compiler flags
1797  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1798              nonstandard directory <lib dir>
1799  LIBS        libraries to pass to the linker, e.g. -l<library>
1800  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1801              you have headers in a nonstandard directory <include dir>
1802  CXX         C++ compiler command
1803  CXXFLAGS    C++ compiler flags
1804  OBJC        Objective C compiler command
1805  OBJCFLAGS   Objective C compiler flags
1806  CPP         C preprocessor
1807  CXXCPP      C++ preprocessor
1808  XMKMF       Path to xmkmf, Makefile generator for X Window System
1809  FREETYPE2_CFLAGS
1810              C compiler flags for FREETYPE2, overriding pkg-config
1811  FREETYPE2_LIBS
1812              linker flags for FREETYPE2, overriding pkg-config
1813  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1814  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1815
1816Use these variables to override the choices made by `configure' or to help
1817it to find libraries and programs with nonstandard names/locations.
1818
1819Report bugs to <build-dev@openjdk.java.net>.
1820OpenJDK home page: <http://openjdk.java.net>.
1821_ACEOF
1822ac_status=$?
1823fi
1824
1825if test "$ac_init_help" = "recursive"; then
1826  # If there are subdirs, report their specific --help.
1827  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1828    test -d "$ac_dir" ||
1829      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1830      continue
1831    ac_builddir=.
1832
1833case "$ac_dir" in
1834.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1835*)
1836  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1837  # A ".." for each directory in $ac_dir_suffix.
1838  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1839  case $ac_top_builddir_sub in
1840  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1841  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1842  esac ;;
1843esac
1844ac_abs_top_builddir=$ac_pwd
1845ac_abs_builddir=$ac_pwd$ac_dir_suffix
1846# for backward compatibility:
1847ac_top_builddir=$ac_top_build_prefix
1848
1849case $srcdir in
1850  .)  # We are building in place.
1851    ac_srcdir=.
1852    ac_top_srcdir=$ac_top_builddir_sub
1853    ac_abs_top_srcdir=$ac_pwd ;;
1854  [\\/]* | ?:[\\/]* )  # Absolute name.
1855    ac_srcdir=$srcdir$ac_dir_suffix;
1856    ac_top_srcdir=$srcdir
1857    ac_abs_top_srcdir=$srcdir ;;
1858  *) # Relative name.
1859    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1860    ac_top_srcdir=$ac_top_build_prefix$srcdir
1861    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1862esac
1863ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1864
1865    cd "$ac_dir" || { ac_status=$?; continue; }
1866    # Check for guested configure.
1867    if test -f "$ac_srcdir/configure.gnu"; then
1868      echo &&
1869      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1870    elif test -f "$ac_srcdir/configure"; then
1871      echo &&
1872      $SHELL "$ac_srcdir/configure" --help=recursive
1873    else
1874      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1875    fi || ac_status=$?
1876    cd "$ac_pwd" || { ac_status=$?; break; }
1877  done
1878fi
1879
1880test -n "$ac_init_help" && exit $ac_status
1881if $ac_init_version; then
1882  cat <<\_ACEOF
1883OpenJDK configure jdk8
1884generated by GNU Autoconf 2.68
1885
1886Copyright (C) 2010 Free Software Foundation, Inc.
1887This configure script is free software; the Free Software Foundation
1888gives unlimited permission to copy, distribute and modify it.
1889_ACEOF
1890  exit
1891fi
1892
1893## ------------------------ ##
1894## Autoconf initialization. ##
1895## ------------------------ ##
1896
1897# ac_fn_c_try_compile LINENO
1898# --------------------------
1899# Try to compile conftest.$ac_ext, and return whether this succeeded.
1900ac_fn_c_try_compile ()
1901{
1902  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1903  rm -f conftest.$ac_objext
1904  if { { ac_try="$ac_compile"
1905case "(($ac_try" in
1906  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1907  *) ac_try_echo=$ac_try;;
1908esac
1909eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1910$as_echo "$ac_try_echo"; } >&5
1911  (eval "$ac_compile") 2>conftest.err
1912  ac_status=$?
1913  if test -s conftest.err; then
1914    grep -v '^ *+' conftest.err >conftest.er1
1915    cat conftest.er1 >&5
1916    mv -f conftest.er1 conftest.err
1917  fi
1918  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1919  test $ac_status = 0; } && {
1920	 test -z "$ac_c_werror_flag" ||
1921	 test ! -s conftest.err
1922       } && test -s conftest.$ac_objext; then :
1923  ac_retval=0
1924else
1925  $as_echo "$as_me: failed program was:" >&5
1926sed 's/^/| /' conftest.$ac_ext >&5
1927
1928	ac_retval=1
1929fi
1930  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1931  as_fn_set_status $ac_retval
1932
1933} # ac_fn_c_try_compile
1934
1935# ac_fn_cxx_try_compile LINENO
1936# ----------------------------
1937# Try to compile conftest.$ac_ext, and return whether this succeeded.
1938ac_fn_cxx_try_compile ()
1939{
1940  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941  rm -f conftest.$ac_objext
1942  if { { ac_try="$ac_compile"
1943case "(($ac_try" in
1944  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1945  *) ac_try_echo=$ac_try;;
1946esac
1947eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1948$as_echo "$ac_try_echo"; } >&5
1949  (eval "$ac_compile") 2>conftest.err
1950  ac_status=$?
1951  if test -s conftest.err; then
1952    grep -v '^ *+' conftest.err >conftest.er1
1953    cat conftest.er1 >&5
1954    mv -f conftest.er1 conftest.err
1955  fi
1956  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1957  test $ac_status = 0; } && {
1958	 test -z "$ac_cxx_werror_flag" ||
1959	 test ! -s conftest.err
1960       } && test -s conftest.$ac_objext; then :
1961  ac_retval=0
1962else
1963  $as_echo "$as_me: failed program was:" >&5
1964sed 's/^/| /' conftest.$ac_ext >&5
1965
1966	ac_retval=1
1967fi
1968  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1969  as_fn_set_status $ac_retval
1970
1971} # ac_fn_cxx_try_compile
1972
1973# ac_fn_objc_try_compile LINENO
1974# -----------------------------
1975# Try to compile conftest.$ac_ext, and return whether this succeeded.
1976ac_fn_objc_try_compile ()
1977{
1978  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1979  rm -f conftest.$ac_objext
1980  if { { ac_try="$ac_compile"
1981case "(($ac_try" in
1982  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1983  *) ac_try_echo=$ac_try;;
1984esac
1985eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1986$as_echo "$ac_try_echo"; } >&5
1987  (eval "$ac_compile") 2>conftest.err
1988  ac_status=$?
1989  if test -s conftest.err; then
1990    grep -v '^ *+' conftest.err >conftest.er1
1991    cat conftest.er1 >&5
1992    mv -f conftest.er1 conftest.err
1993  fi
1994  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1995  test $ac_status = 0; } && {
1996	 test -z "$ac_objc_werror_flag" ||
1997	 test ! -s conftest.err
1998       } && test -s conftest.$ac_objext; then :
1999  ac_retval=0
2000else
2001  $as_echo "$as_me: failed program was:" >&5
2002sed 's/^/| /' conftest.$ac_ext >&5
2003
2004	ac_retval=1
2005fi
2006  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2007  as_fn_set_status $ac_retval
2008
2009} # ac_fn_objc_try_compile
2010
2011# ac_fn_c_try_cpp LINENO
2012# ----------------------
2013# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2014ac_fn_c_try_cpp ()
2015{
2016  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2017  if { { ac_try="$ac_cpp conftest.$ac_ext"
2018case "(($ac_try" in
2019  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2020  *) ac_try_echo=$ac_try;;
2021esac
2022eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2023$as_echo "$ac_try_echo"; } >&5
2024  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2025  ac_status=$?
2026  if test -s conftest.err; then
2027    grep -v '^ *+' conftest.err >conftest.er1
2028    cat conftest.er1 >&5
2029    mv -f conftest.er1 conftest.err
2030  fi
2031  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2032  test $ac_status = 0; } > conftest.i && {
2033	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2034	 test ! -s conftest.err
2035       }; then :
2036  ac_retval=0
2037else
2038  $as_echo "$as_me: failed program was:" >&5
2039sed 's/^/| /' conftest.$ac_ext >&5
2040
2041    ac_retval=1
2042fi
2043  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2044  as_fn_set_status $ac_retval
2045
2046} # ac_fn_c_try_cpp
2047
2048# ac_fn_cxx_try_cpp LINENO
2049# ------------------------
2050# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2051ac_fn_cxx_try_cpp ()
2052{
2053  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2054  if { { ac_try="$ac_cpp conftest.$ac_ext"
2055case "(($ac_try" in
2056  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2057  *) ac_try_echo=$ac_try;;
2058esac
2059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2060$as_echo "$ac_try_echo"; } >&5
2061  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2062  ac_status=$?
2063  if test -s conftest.err; then
2064    grep -v '^ *+' conftest.err >conftest.er1
2065    cat conftest.er1 >&5
2066    mv -f conftest.er1 conftest.err
2067  fi
2068  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2069  test $ac_status = 0; } > conftest.i && {
2070	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2071	 test ! -s conftest.err
2072       }; then :
2073  ac_retval=0
2074else
2075  $as_echo "$as_me: failed program was:" >&5
2076sed 's/^/| /' conftest.$ac_ext >&5
2077
2078    ac_retval=1
2079fi
2080  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2081  as_fn_set_status $ac_retval
2082
2083} # ac_fn_cxx_try_cpp
2084
2085# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2086# ---------------------------------------------------------
2087# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2088# the include files in INCLUDES and setting the cache variable VAR
2089# accordingly.
2090ac_fn_cxx_check_header_mongrel ()
2091{
2092  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2093  if eval \${$3+:} false; then :
2094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2095$as_echo_n "checking for $2... " >&6; }
2096if eval \${$3+:} false; then :
2097  $as_echo_n "(cached) " >&6
2098fi
2099eval ac_res=\$$3
2100	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2101$as_echo "$ac_res" >&6; }
2102else
2103  # Is the header compilable?
2104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2105$as_echo_n "checking $2 usability... " >&6; }
2106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h.  */
2108$4
2109#include <$2>
2110_ACEOF
2111if ac_fn_cxx_try_compile "$LINENO"; then :
2112  ac_header_compiler=yes
2113else
2114  ac_header_compiler=no
2115fi
2116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2118$as_echo "$ac_header_compiler" >&6; }
2119
2120# Is the header present?
2121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2122$as_echo_n "checking $2 presence... " >&6; }
2123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124/* end confdefs.h.  */
2125#include <$2>
2126_ACEOF
2127if ac_fn_cxx_try_cpp "$LINENO"; then :
2128  ac_header_preproc=yes
2129else
2130  ac_header_preproc=no
2131fi
2132rm -f conftest.err conftest.i conftest.$ac_ext
2133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2134$as_echo "$ac_header_preproc" >&6; }
2135
2136# So?  What about this header?
2137case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2138  yes:no: )
2139    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2140$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2141    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2142$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2143    ;;
2144  no:yes:* )
2145    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2146$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2147    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2148$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2149    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2150$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2151    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2152$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2153    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2154$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2155( $as_echo "## ----------------------------------------- ##
2156## Report this to build-dev@openjdk.java.net ##
2157## ----------------------------------------- ##"
2158     ) | sed "s/^/$as_me: WARNING:     /" >&2
2159    ;;
2160esac
2161  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2162$as_echo_n "checking for $2... " >&6; }
2163if eval \${$3+:} false; then :
2164  $as_echo_n "(cached) " >&6
2165else
2166  eval "$3=\$ac_header_compiler"
2167fi
2168eval ac_res=\$$3
2169	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2170$as_echo "$ac_res" >&6; }
2171fi
2172  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2173
2174} # ac_fn_cxx_check_header_mongrel
2175
2176# ac_fn_cxx_try_run LINENO
2177# ------------------------
2178# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2179# that executables *can* be run.
2180ac_fn_cxx_try_run ()
2181{
2182  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2183  if { { ac_try="$ac_link"
2184case "(($ac_try" in
2185  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2186  *) ac_try_echo=$ac_try;;
2187esac
2188eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2189$as_echo "$ac_try_echo"; } >&5
2190  (eval "$ac_link") 2>&5
2191  ac_status=$?
2192  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2193  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2194  { { case "(($ac_try" in
2195  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2196  *) ac_try_echo=$ac_try;;
2197esac
2198eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2199$as_echo "$ac_try_echo"; } >&5
2200  (eval "$ac_try") 2>&5
2201  ac_status=$?
2202  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2203  test $ac_status = 0; }; }; then :
2204  ac_retval=0
2205else
2206  $as_echo "$as_me: program exited with status $ac_status" >&5
2207       $as_echo "$as_me: failed program was:" >&5
2208sed 's/^/| /' conftest.$ac_ext >&5
2209
2210       ac_retval=$ac_status
2211fi
2212  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2213  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2214  as_fn_set_status $ac_retval
2215
2216} # ac_fn_cxx_try_run
2217
2218# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2219# ---------------------------------------------------------
2220# Tests whether HEADER exists and can be compiled using the include files in
2221# INCLUDES, setting the cache variable VAR accordingly.
2222ac_fn_cxx_check_header_compile ()
2223{
2224  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2225  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2226$as_echo_n "checking for $2... " >&6; }
2227if eval \${$3+:} false; then :
2228  $as_echo_n "(cached) " >&6
2229else
2230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2231/* end confdefs.h.  */
2232$4
2233#include <$2>
2234_ACEOF
2235if ac_fn_cxx_try_compile "$LINENO"; then :
2236  eval "$3=yes"
2237else
2238  eval "$3=no"
2239fi
2240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2241fi
2242eval ac_res=\$$3
2243	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2244$as_echo "$ac_res" >&6; }
2245  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2246
2247} # ac_fn_cxx_check_header_compile
2248
2249# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2250# ----------------------------------------------
2251# Tries to find the compile-time value of EXPR in a program that includes
2252# INCLUDES, setting VAR accordingly. Returns whether the value could be
2253# computed
2254ac_fn_cxx_compute_int ()
2255{
2256  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2257  if test "$cross_compiling" = yes; then
2258    # Depending upon the size, compute the lo and hi bounds.
2259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h.  */
2261$4
2262int
2263main ()
2264{
2265static int test_array [1 - 2 * !(($2) >= 0)];
2266test_array [0] = 0
2267
2268  ;
2269  return 0;
2270}
2271_ACEOF
2272if ac_fn_cxx_try_compile "$LINENO"; then :
2273  ac_lo=0 ac_mid=0
2274  while :; do
2275    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h.  */
2277$4
2278int
2279main ()
2280{
2281static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2282test_array [0] = 0
2283
2284  ;
2285  return 0;
2286}
2287_ACEOF
2288if ac_fn_cxx_try_compile "$LINENO"; then :
2289  ac_hi=$ac_mid; break
2290else
2291  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2292			if test $ac_lo -le $ac_mid; then
2293			  ac_lo= ac_hi=
2294			  break
2295			fi
2296			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2297fi
2298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2299  done
2300else
2301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h.  */
2303$4
2304int
2305main ()
2306{
2307static int test_array [1 - 2 * !(($2) < 0)];
2308test_array [0] = 0
2309
2310  ;
2311  return 0;
2312}
2313_ACEOF
2314if ac_fn_cxx_try_compile "$LINENO"; then :
2315  ac_hi=-1 ac_mid=-1
2316  while :; do
2317    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318/* end confdefs.h.  */
2319$4
2320int
2321main ()
2322{
2323static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2324test_array [0] = 0
2325
2326  ;
2327  return 0;
2328}
2329_ACEOF
2330if ac_fn_cxx_try_compile "$LINENO"; then :
2331  ac_lo=$ac_mid; break
2332else
2333  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2334			if test $ac_mid -le $ac_hi; then
2335			  ac_lo= ac_hi=
2336			  break
2337			fi
2338			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341  done
2342else
2343  ac_lo= ac_hi=
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348# Binary search between lo and hi bounds.
2349while test "x$ac_lo" != "x$ac_hi"; do
2350  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2352/* end confdefs.h.  */
2353$4
2354int
2355main ()
2356{
2357static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2358test_array [0] = 0
2359
2360  ;
2361  return 0;
2362}
2363_ACEOF
2364if ac_fn_cxx_try_compile "$LINENO"; then :
2365  ac_hi=$ac_mid
2366else
2367  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2368fi
2369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2370done
2371case $ac_lo in #((
2372?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2373'') ac_retval=1 ;;
2374esac
2375  else
2376    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2377/* end confdefs.h.  */
2378$4
2379static long int longval () { return $2; }
2380static unsigned long int ulongval () { return $2; }
2381#include <stdio.h>
2382#include <stdlib.h>
2383int
2384main ()
2385{
2386
2387  FILE *f = fopen ("conftest.val", "w");
2388  if (! f)
2389    return 1;
2390  if (($2) < 0)
2391    {
2392      long int i = longval ();
2393      if (i != ($2))
2394	return 1;
2395      fprintf (f, "%ld", i);
2396    }
2397  else
2398    {
2399      unsigned long int i = ulongval ();
2400      if (i != ($2))
2401	return 1;
2402      fprintf (f, "%lu", i);
2403    }
2404  /* Do not output a trailing newline, as this causes \r\n confusion
2405     on some platforms.  */
2406  return ferror (f) || fclose (f) != 0;
2407
2408  ;
2409  return 0;
2410}
2411_ACEOF
2412if ac_fn_cxx_try_run "$LINENO"; then :
2413  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2414else
2415  ac_retval=1
2416fi
2417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2418  conftest.$ac_objext conftest.beam conftest.$ac_ext
2419rm -f conftest.val
2420
2421  fi
2422  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2423  as_fn_set_status $ac_retval
2424
2425} # ac_fn_cxx_compute_int
2426
2427# ac_fn_cxx_try_link LINENO
2428# -------------------------
2429# Try to link conftest.$ac_ext, and return whether this succeeded.
2430ac_fn_cxx_try_link ()
2431{
2432  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2433  rm -f conftest.$ac_objext conftest$ac_exeext
2434  if { { ac_try="$ac_link"
2435case "(($ac_try" in
2436  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2437  *) ac_try_echo=$ac_try;;
2438esac
2439eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2440$as_echo "$ac_try_echo"; } >&5
2441  (eval "$ac_link") 2>conftest.err
2442  ac_status=$?
2443  if test -s conftest.err; then
2444    grep -v '^ *+' conftest.err >conftest.er1
2445    cat conftest.er1 >&5
2446    mv -f conftest.er1 conftest.err
2447  fi
2448  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2449  test $ac_status = 0; } && {
2450	 test -z "$ac_cxx_werror_flag" ||
2451	 test ! -s conftest.err
2452       } && test -s conftest$ac_exeext && {
2453	 test "$cross_compiling" = yes ||
2454	 $as_test_x conftest$ac_exeext
2455       }; then :
2456  ac_retval=0
2457else
2458  $as_echo "$as_me: failed program was:" >&5
2459sed 's/^/| /' conftest.$ac_ext >&5
2460
2461	ac_retval=1
2462fi
2463  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2464  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2465  # interfere with the next link command; also delete a directory that is
2466  # left behind by Apple's compiler.  We do this before executing the actions.
2467  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2468  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2469  as_fn_set_status $ac_retval
2470
2471} # ac_fn_cxx_try_link
2472
2473# ac_fn_cxx_check_func LINENO FUNC VAR
2474# ------------------------------------
2475# Tests whether FUNC exists, setting the cache variable VAR accordingly
2476ac_fn_cxx_check_func ()
2477{
2478  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2480$as_echo_n "checking for $2... " >&6; }
2481if eval \${$3+:} false; then :
2482  $as_echo_n "(cached) " >&6
2483else
2484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2485/* end confdefs.h.  */
2486/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2487   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2488#define $2 innocuous_$2
2489
2490/* System header to define __stub macros and hopefully few prototypes,
2491    which can conflict with char $2 (); below.
2492    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2493    <limits.h> exists even on freestanding compilers.  */
2494
2495#ifdef __STDC__
2496# include <limits.h>
2497#else
2498# include <assert.h>
2499#endif
2500
2501#undef $2
2502
2503/* Override any GCC internal prototype to avoid an error.
2504   Use char because int might match the return type of a GCC
2505   builtin and then its argument prototype would still apply.  */
2506#ifdef __cplusplus
2507extern "C"
2508#endif
2509char $2 ();
2510/* The GNU C library defines this for functions which it implements
2511    to always fail with ENOSYS.  Some functions are actually named
2512    something starting with __ and the normal name is an alias.  */
2513#if defined __stub_$2 || defined __stub___$2
2514choke me
2515#endif
2516
2517int
2518main ()
2519{
2520return $2 ();
2521  ;
2522  return 0;
2523}
2524_ACEOF
2525if ac_fn_cxx_try_link "$LINENO"; then :
2526  eval "$3=yes"
2527else
2528  eval "$3=no"
2529fi
2530rm -f core conftest.err conftest.$ac_objext \
2531    conftest$ac_exeext conftest.$ac_ext
2532fi
2533eval ac_res=\$$3
2534	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2535$as_echo "$ac_res" >&6; }
2536  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2537
2538} # ac_fn_cxx_check_func
2539
2540# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2541# -------------------------------------------------------
2542# Tests whether HEADER exists and can be compiled using the include files in
2543# INCLUDES, setting the cache variable VAR accordingly.
2544ac_fn_c_check_header_compile ()
2545{
2546  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2548$as_echo_n "checking for $2... " >&6; }
2549if eval \${$3+:} false; then :
2550  $as_echo_n "(cached) " >&6
2551else
2552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2553/* end confdefs.h.  */
2554$4
2555#include <$2>
2556_ACEOF
2557if ac_fn_c_try_compile "$LINENO"; then :
2558  eval "$3=yes"
2559else
2560  eval "$3=no"
2561fi
2562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2563fi
2564eval ac_res=\$$3
2565	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2566$as_echo "$ac_res" >&6; }
2567  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2568
2569} # ac_fn_c_check_header_compile
2570cat >config.log <<_ACEOF
2571This file contains any messages produced by compilers while
2572running configure, to aid debugging if configure makes a mistake.
2573
2574It was created by OpenJDK $as_me jdk8, which was
2575generated by GNU Autoconf 2.68.  Invocation command line was
2576
2577  $ $0 $@
2578
2579_ACEOF
2580exec 5>>config.log
2581{
2582cat <<_ASUNAME
2583## --------- ##
2584## Platform. ##
2585## --------- ##
2586
2587hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2588uname -m = `(uname -m) 2>/dev/null || echo unknown`
2589uname -r = `(uname -r) 2>/dev/null || echo unknown`
2590uname -s = `(uname -s) 2>/dev/null || echo unknown`
2591uname -v = `(uname -v) 2>/dev/null || echo unknown`
2592
2593/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2594/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2595
2596/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2597/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2598/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2599/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2600/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2601/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2602/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2603
2604_ASUNAME
2605
2606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2607for as_dir in $PATH
2608do
2609  IFS=$as_save_IFS
2610  test -z "$as_dir" && as_dir=.
2611    $as_echo "PATH: $as_dir"
2612  done
2613IFS=$as_save_IFS
2614
2615} >&5
2616
2617cat >&5 <<_ACEOF
2618
2619
2620## ----------- ##
2621## Core tests. ##
2622## ----------- ##
2623
2624_ACEOF
2625
2626
2627# Keep a trace of the command line.
2628# Strip out --no-create and --no-recursion so they do not pile up.
2629# Strip out --silent because we don't want to record it for future runs.
2630# Also quote any args containing shell meta-characters.
2631# Make two passes to allow for proper duplicate-argument suppression.
2632ac_configure_args=
2633ac_configure_args0=
2634ac_configure_args1=
2635ac_must_keep_next=false
2636for ac_pass in 1 2
2637do
2638  for ac_arg
2639  do
2640    case $ac_arg in
2641    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2642    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2643    | -silent | --silent | --silen | --sile | --sil)
2644      continue ;;
2645    *\'*)
2646      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2647    esac
2648    case $ac_pass in
2649    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2650    2)
2651      as_fn_append ac_configure_args1 " '$ac_arg'"
2652      if test $ac_must_keep_next = true; then
2653	ac_must_keep_next=false # Got value, back to normal.
2654      else
2655	case $ac_arg in
2656	  *=* | --config-cache | -C | -disable-* | --disable-* \
2657	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2658	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2659	  | -with-* | --with-* | -without-* | --without-* | --x)
2660	    case "$ac_configure_args0 " in
2661	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2662	    esac
2663	    ;;
2664	  -* ) ac_must_keep_next=true ;;
2665	esac
2666      fi
2667      as_fn_append ac_configure_args " '$ac_arg'"
2668      ;;
2669    esac
2670  done
2671done
2672{ ac_configure_args0=; unset ac_configure_args0;}
2673{ ac_configure_args1=; unset ac_configure_args1;}
2674
2675# When interrupted or exit'd, cleanup temporary files, and complete
2676# config.log.  We remove comments because anyway the quotes in there
2677# would cause problems or look ugly.
2678# WARNING: Use '\'' to represent an apostrophe within the trap.
2679# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2680trap 'exit_status=$?
2681  # Save into config.log some information that might help in debugging.
2682  {
2683    echo
2684
2685    $as_echo "## ---------------- ##
2686## Cache variables. ##
2687## ---------------- ##"
2688    echo
2689    # The following way of writing the cache mishandles newlines in values,
2690(
2691  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2692    eval ac_val=\$$ac_var
2693    case $ac_val in #(
2694    *${as_nl}*)
2695      case $ac_var in #(
2696      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2697$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2698      esac
2699      case $ac_var in #(
2700      _ | IFS | as_nl) ;; #(
2701      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2702      *) { eval $ac_var=; unset $ac_var;} ;;
2703      esac ;;
2704    esac
2705  done
2706  (set) 2>&1 |
2707    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2708    *${as_nl}ac_space=\ *)
2709      sed -n \
2710	"s/'\''/'\''\\\\'\'''\''/g;
2711	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2712      ;; #(
2713    *)
2714      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2715      ;;
2716    esac |
2717    sort
2718)
2719    echo
2720
2721    $as_echo "## ----------------- ##
2722## Output variables. ##
2723## ----------------- ##"
2724    echo
2725    for ac_var in $ac_subst_vars
2726    do
2727      eval ac_val=\$$ac_var
2728      case $ac_val in
2729      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2730      esac
2731      $as_echo "$ac_var='\''$ac_val'\''"
2732    done | sort
2733    echo
2734
2735    if test -n "$ac_subst_files"; then
2736      $as_echo "## ------------------- ##
2737## File substitutions. ##
2738## ------------------- ##"
2739      echo
2740      for ac_var in $ac_subst_files
2741      do
2742	eval ac_val=\$$ac_var
2743	case $ac_val in
2744	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2745	esac
2746	$as_echo "$ac_var='\''$ac_val'\''"
2747      done | sort
2748      echo
2749    fi
2750
2751    if test -s confdefs.h; then
2752      $as_echo "## ----------- ##
2753## confdefs.h. ##
2754## ----------- ##"
2755      echo
2756      cat confdefs.h
2757      echo
2758    fi
2759    test "$ac_signal" != 0 &&
2760      $as_echo "$as_me: caught signal $ac_signal"
2761    $as_echo "$as_me: exit $exit_status"
2762  } >&5
2763  rm -f core *.core core.conftest.* &&
2764    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2765    exit $exit_status
2766' 0
2767for ac_signal in 1 2 13 15; do
2768  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2769done
2770ac_signal=0
2771
2772# confdefs.h avoids OS command line length limits that DEFS can exceed.
2773rm -f -r conftest* confdefs.h
2774
2775$as_echo "/* confdefs.h */" > confdefs.h
2776
2777# Predefined preprocessor variables.
2778
2779cat >>confdefs.h <<_ACEOF
2780#define PACKAGE_NAME "$PACKAGE_NAME"
2781_ACEOF
2782
2783cat >>confdefs.h <<_ACEOF
2784#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2785_ACEOF
2786
2787cat >>confdefs.h <<_ACEOF
2788#define PACKAGE_VERSION "$PACKAGE_VERSION"
2789_ACEOF
2790
2791cat >>confdefs.h <<_ACEOF
2792#define PACKAGE_STRING "$PACKAGE_STRING"
2793_ACEOF
2794
2795cat >>confdefs.h <<_ACEOF
2796#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2797_ACEOF
2798
2799cat >>confdefs.h <<_ACEOF
2800#define PACKAGE_URL "$PACKAGE_URL"
2801_ACEOF
2802
2803
2804# Let the site file select an alternate cache file if it wants to.
2805# Prefer an explicitly selected file to automatically selected ones.
2806ac_site_file1=NONE
2807ac_site_file2=NONE
2808if test -n "$CONFIG_SITE"; then
2809  # We do not want a PATH search for config.site.
2810  case $CONFIG_SITE in #((
2811    -*)  ac_site_file1=./$CONFIG_SITE;;
2812    */*) ac_site_file1=$CONFIG_SITE;;
2813    *)   ac_site_file1=./$CONFIG_SITE;;
2814  esac
2815elif test "x$prefix" != xNONE; then
2816  ac_site_file1=$prefix/share/config.site
2817  ac_site_file2=$prefix/etc/config.site
2818else
2819  ac_site_file1=$ac_default_prefix/share/config.site
2820  ac_site_file2=$ac_default_prefix/etc/config.site
2821fi
2822for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2823do
2824  test "x$ac_site_file" = xNONE && continue
2825  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2826    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2827$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2828    sed 's/^/| /' "$ac_site_file" >&5
2829    . "$ac_site_file" \
2830      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2832as_fn_error $? "failed to load site script $ac_site_file
2833See \`config.log' for more details" "$LINENO" 5; }
2834  fi
2835done
2836
2837if test -r "$cache_file"; then
2838  # Some versions of bash will fail to source /dev/null (special files
2839  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2840  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2841    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2842$as_echo "$as_me: loading cache $cache_file" >&6;}
2843    case $cache_file in
2844      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2845      *)                      . "./$cache_file";;
2846    esac
2847  fi
2848else
2849  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2850$as_echo "$as_me: creating cache $cache_file" >&6;}
2851  >$cache_file
2852fi
2853
2854# Check that the precious variables saved in the cache have kept the same
2855# value.
2856ac_cache_corrupted=false
2857for ac_var in $ac_precious_vars; do
2858  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2859  eval ac_new_set=\$ac_env_${ac_var}_set
2860  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2861  eval ac_new_val=\$ac_env_${ac_var}_value
2862  case $ac_old_set,$ac_new_set in
2863    set,)
2864      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2865$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2866      ac_cache_corrupted=: ;;
2867    ,set)
2868      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2869$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2870      ac_cache_corrupted=: ;;
2871    ,);;
2872    *)
2873      if test "x$ac_old_val" != "x$ac_new_val"; then
2874	# differences in whitespace do not lead to failure.
2875	ac_old_val_w=`echo x $ac_old_val`
2876	ac_new_val_w=`echo x $ac_new_val`
2877	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2878	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2879$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2880	  ac_cache_corrupted=:
2881	else
2882	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2883$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2884	  eval $ac_var=\$ac_old_val
2885	fi
2886	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2887$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2888	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2889$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2890      fi;;
2891  esac
2892  # Pass precious variables to config.status.
2893  if test "$ac_new_set" = set; then
2894    case $ac_new_val in
2895    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2896    *) ac_arg=$ac_var=$ac_new_val ;;
2897    esac
2898    case " $ac_configure_args " in
2899      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2900      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2901    esac
2902  fi
2903done
2904if $ac_cache_corrupted; then
2905  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2907  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2908$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2909  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2910fi
2911## -------------------- ##
2912## Main body of script. ##
2913## -------------------- ##
2914
2915ac_ext=c
2916ac_cpp='$CPP $CPPFLAGS'
2917ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2918ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2919ac_compiler_gnu=$ac_cv_c_compiler_gnu
2920
2921
2922
2923ac_aux_dir=
2924for ac_dir in build-aux "$srcdir"/build-aux; do
2925  if test -f "$ac_dir/install-sh"; then
2926    ac_aux_dir=$ac_dir
2927    ac_install_sh="$ac_aux_dir/install-sh -c"
2928    break
2929  elif test -f "$ac_dir/install.sh"; then
2930    ac_aux_dir=$ac_dir
2931    ac_install_sh="$ac_aux_dir/install.sh -c"
2932    break
2933  elif test -f "$ac_dir/shtool"; then
2934    ac_aux_dir=$ac_dir
2935    ac_install_sh="$ac_aux_dir/shtool install -c"
2936    break
2937  fi
2938done
2939if test -z "$ac_aux_dir"; then
2940  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2941fi
2942
2943# These three variables are undocumented and unsupported,
2944# and are intended to be withdrawn in a future Autoconf release.
2945# They can cause serious problems if a builder's source tree is in a directory
2946# whose full name contains unusual characters.
2947ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2948ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2949ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2950
2951
2952# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2953
2954#
2955# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2956# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2957#
2958# This code is free software; you can redistribute it and/or modify it
2959# under the terms of the GNU General Public License version 2 only, as
2960# published by the Free Software Foundation.  Oracle designates this
2961# particular file as subject to the "Classpath" exception as provided
2962# by Oracle in the LICENSE file that accompanied this code.
2963#
2964# This code is distributed in the hope that it will be useful, but WITHOUT
2965# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2966# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2967# version 2 for more details (a copy is included in the LICENSE file that
2968# accompanied this code).
2969#
2970# You should have received a copy of the GNU General Public License version
2971# 2 along with this work; if not, write to the Free Software Foundation,
2972# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2973#
2974# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2975# or visit www.oracle.com if you need additional information or have any
2976# questions.
2977#
2978
2979#
2980# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2981#
2982# This program is free software; you can redistribute it and/or modify
2983# it under the terms of the GNU General Public License as published by
2984# the Free Software Foundation; either version 2 of the License, or
2985# (at your option) any later version.
2986#
2987# This program is distributed in the hope that it will be useful, but
2988# WITHOUT ANY WARRANTY; without even the implied warranty of
2989# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2990# General Public License for more details.
2991#
2992# You should have received a copy of the GNU General Public License
2993# along with this program; if not, write to the Free Software
2994# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2995#
2996# As a special exception to the GNU General Public License, if you
2997# distribute this file as part of a program that contains a
2998# configuration script generated by Autoconf, you may include it under
2999# the same distribution terms that you use for the rest of that program.
3000
3001# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3002# ----------------------------------
3003# PKG_PROG_PKG_CONFIG
3004
3005# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3006#
3007# Check to see whether a particular set of modules exists.  Similar
3008# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3009#
3010#
3011# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3012# this or PKG_CHECK_MODULES is called, or make sure to call
3013# PKG_CHECK_EXISTS manually
3014# --------------------------------------------------------------
3015
3016
3017
3018# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3019# ---------------------------------------------
3020# _PKG_CONFIG
3021
3022# _PKG_SHORT_ERRORS_SUPPORTED
3023# -----------------------------
3024# _PKG_SHORT_ERRORS_SUPPORTED
3025
3026
3027# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3028# [ACTION-IF-NOT-FOUND])
3029#
3030#
3031# Note that if there is a possibility the first call to
3032# PKG_CHECK_MODULES might not happen, you should be sure to include an
3033# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3034#
3035#
3036# --------------------------------------------------------------
3037# PKG_CHECK_MODULES
3038
3039
3040# Include these first...
3041#
3042# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3043# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3044#
3045# This code is free software; you can redistribute it and/or modify it
3046# under the terms of the GNU General Public License version 2 only, as
3047# published by the Free Software Foundation.  Oracle designates this
3048# particular file as subject to the "Classpath" exception as provided
3049# by Oracle in the LICENSE file that accompanied this code.
3050#
3051# This code is distributed in the hope that it will be useful, but WITHOUT
3052# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3053# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3054# version 2 for more details (a copy is included in the LICENSE file that
3055# accompanied this code).
3056#
3057# You should have received a copy of the GNU General Public License version
3058# 2 along with this work; if not, write to the Free Software Foundation,
3059# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3060#
3061# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3062# or visit www.oracle.com if you need additional information or have any
3063# questions.
3064#
3065
3066
3067
3068# This will make sure the given variable points to a full and proper
3069# path. This means:
3070# 1) There will be no spaces in the path. On posix platforms,
3071#    spaces in the path will result in an error. On Windows,
3072#    the path will be rewritten using short-style to be space-free.
3073# 2) The path will be absolute, and it will be in unix-style (on
3074#     cygwin).
3075# $1: The name of the variable to fix
3076
3077
3078# This will make sure the given variable points to a executable
3079# with a full and proper path. This means:
3080# 1) There will be no spaces in the path. On posix platforms,
3081#    spaces in the path will result in an error. On Windows,
3082#    the path will be rewritten using short-style to be space-free.
3083# 2) The path will be absolute, and it will be in unix-style (on
3084#     cygwin).
3085# Any arguments given to the executable is preserved.
3086# If the input variable does not have a directory specification, then
3087# it need to be in the PATH.
3088# $1: The name of the variable to fix
3089
3090
3091
3092
3093
3094
3095# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3096# $1: variable to check
3097# $2: executable name to print in warning (optional)
3098
3099
3100# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3101# Arguments as AC_PATH_PROG:
3102# $1: variable to set
3103# $2: executable name to look for
3104
3105
3106# Setup the most fundamental tools that relies on not much else to set up,
3107# but is used by much of the early bootstrap code.
3108
3109
3110# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3111
3112
3113
3114
3115
3116
3117
3118#%%% Simple tools %%%
3119
3120# Check if we have found a usable version of make
3121# $1: the path to a potential make binary (or empty)
3122# $2: the description on how we found this
3123
3124
3125# Goes looking for a usable version of GNU make.
3126
3127
3128
3129
3130
3131
3132# Check if build directory is on local disk. If not possible to determine,
3133# we prefer to claim it's local.
3134# Argument 1: directory to test
3135# Argument 2: what to do if it is on local disk
3136# Argument 3: what to do otherwise (remote disk or failure)
3137
3138
3139# Check that source files have basic read permissions set. This might
3140# not be the case in cygwin in certain conditions.
3141
3142
3143
3144
3145#
3146# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3147# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3148#
3149# This code is free software; you can redistribute it and/or modify it
3150# under the terms of the GNU General Public License version 2 only, as
3151# published by the Free Software Foundation.  Oracle designates this
3152# particular file as subject to the "Classpath" exception as provided
3153# by Oracle in the LICENSE file that accompanied this code.
3154#
3155# This code is distributed in the hope that it will be useful, but WITHOUT
3156# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3157# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3158# version 2 for more details (a copy is included in the LICENSE file that
3159# accompanied this code).
3160#
3161# You should have received a copy of the GNU General Public License version
3162# 2 along with this work; if not, write to the Free Software Foundation,
3163# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3164#
3165# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3166# or visit www.oracle.com if you need additional information or have any
3167# questions.
3168#
3169
3170
3171
3172
3173
3174# Helper function which possibly converts a path using DOS-style short mode.
3175# If so, the updated path is stored in $new_path.
3176# $1: The path to check
3177
3178
3179# Helper function which possibly converts a path using DOS-style short mode.
3180# If so, the updated path is stored in $new_path.
3181# $1: The path to check
3182
3183
3184# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3185# and could probably be heavily simplified. However, all changes in this
3186# area tend to need lot of testing in different scenarios, and in lack of
3187# proper unit testing, cleaning this up has not been deemed worth the effort
3188# at the moment.
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3199
3200
3201
3202
3203#
3204# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3205# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3206#
3207# This code is free software; you can redistribute it and/or modify it
3208# under the terms of the GNU General Public License version 2 only, as
3209# published by the Free Software Foundation.  Oracle designates this
3210# particular file as subject to the "Classpath" exception as provided
3211# by Oracle in the LICENSE file that accompanied this code.
3212#
3213# This code is distributed in the hope that it will be useful, but WITHOUT
3214# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3215# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3216# version 2 for more details (a copy is included in the LICENSE file that
3217# accompanied this code).
3218#
3219# You should have received a copy of the GNU General Public License version
3220# 2 along with this work; if not, write to the Free Software Foundation,
3221# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3222#
3223# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3224# or visit www.oracle.com if you need additional information or have any
3225# questions.
3226#
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238# ... then the rest
3239#
3240# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3241# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3242#
3243# This code is free software; you can redistribute it and/or modify it
3244# under the terms of the GNU General Public License version 2 only, as
3245# published by the Free Software Foundation.  Oracle designates this
3246# particular file as subject to the "Classpath" exception as provided
3247# by Oracle in the LICENSE file that accompanied this code.
3248#
3249# This code is distributed in the hope that it will be useful, but WITHOUT
3250# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3251# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3252# version 2 for more details (a copy is included in the LICENSE file that
3253# accompanied this code).
3254#
3255# You should have received a copy of the GNU General Public License version
3256# 2 along with this work; if not, write to the Free Software Foundation,
3257# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3258#
3259# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3260# or visit www.oracle.com if you need additional information or have any
3261# questions.
3262#
3263
3264# Execute the check given as argument, and verify the result
3265# If the Boot JDK was previously found, do nothing
3266# $1 A command line (typically autoconf macro) to execute
3267
3268
3269# Test: Is bootjdk explicitely set by command line arguments?
3270
3271
3272# Test: Is bootjdk available from builddeps?
3273
3274
3275# Test: Is $JAVA_HOME set?
3276
3277
3278# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3279
3280
3281# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3282
3283
3284# Look for a jdk in the given path. If there are multiple, try to select the newest.
3285# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3286# $1 = Path to directory containing jdk installations.
3287# $2 = String to append to the found JDK directory to get the proper JDK home
3288
3289
3290# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3291# environmental variable as base for where to look.
3292# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3293
3294
3295# Test: Is there a JDK installed in default, well-known locations?
3296
3297
3298# Check that a command-line tool in the Boot JDK is correct
3299# $1 = name of variable to assign
3300# $2 = name of binary
3301
3302
3303###############################################################################
3304#
3305# We need a Boot JDK to bootstrap the build.
3306#
3307
3308
3309
3310
3311
3312#
3313# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3314# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3315#
3316# This code is free software; you can redistribute it and/or modify it
3317# under the terms of the GNU General Public License version 2 only, as
3318# published by the Free Software Foundation.  Oracle designates this
3319# particular file as subject to the "Classpath" exception as provided
3320# by Oracle in the LICENSE file that accompanied this code.
3321#
3322# This code is distributed in the hope that it will be useful, but WITHOUT
3323# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3324# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3325# version 2 for more details (a copy is included in the LICENSE file that
3326# accompanied this code).
3327#
3328# You should have received a copy of the GNU General Public License version
3329# 2 along with this work; if not, write to the Free Software Foundation,
3330# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3331#
3332# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3333# or visit www.oracle.com if you need additional information or have any
3334# questions.
3335#
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356#
3357# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3358# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3359#
3360# This code is free software; you can redistribute it and/or modify it
3361# under the terms of the GNU General Public License version 2 only, as
3362# published by the Free Software Foundation.  Oracle designates this
3363# particular file as subject to the "Classpath" exception as provided
3364# by Oracle in the LICENSE file that accompanied this code.
3365#
3366# This code is distributed in the hope that it will be useful, but WITHOUT
3367# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3368# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3369# version 2 for more details (a copy is included in the LICENSE file that
3370# accompanied this code).
3371#
3372# You should have received a copy of the GNU General Public License version
3373# 2 along with this work; if not, write to the Free Software Foundation,
3374# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3375#
3376# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3377# or visit www.oracle.com if you need additional information or have any
3378# questions.
3379#
3380
3381
3382
3383
3384
3385cygwin_help() {
3386    case $1 in
3387    unzip)
3388        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3389    zip)
3390        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3391    make)
3392        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3393    * )
3394       break ;;
3395    esac
3396}
3397
3398apt_help() {
3399    case $1 in
3400    devkit)
3401        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3402    openjdk)
3403        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3404    alsa)
3405        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3406    cups)
3407        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3408    freetype2)
3409        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3410    pulse)
3411        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3412    x11)
3413        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3414    ccache)
3415        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3416    * )
3417       break ;;
3418    esac
3419}
3420
3421yum_help() {
3422    case $1 in
3423    devkit)
3424        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3425    openjdk)
3426        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3427    alsa)
3428        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3429    cups)
3430        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3431    freetype2)
3432        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3433    pulse)
3434        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3435    x11)
3436        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3437    ccache)
3438        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3439    * )
3440       break ;;
3441    esac
3442}
3443
3444port_help() {
3445    PKGHANDLER_COMMAND=""
3446}
3447
3448pkgutil_help() {
3449    PKGHANDLER_COMMAND=""
3450}
3451
3452pkgadd_help() {
3453    PKGHANDLER_COMMAND=""
3454}
3455
3456
3457
3458#
3459# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3460# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3461#
3462# This code is free software; you can redistribute it and/or modify it
3463# under the terms of the GNU General Public License version 2 only, as
3464# published by the Free Software Foundation.  Oracle designates this
3465# particular file as subject to the "Classpath" exception as provided
3466# by Oracle in the LICENSE file that accompanied this code.
3467#
3468# This code is distributed in the hope that it will be useful, but WITHOUT
3469# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3470# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3471# version 2 for more details (a copy is included in the LICENSE file that
3472# accompanied this code).
3473#
3474# You should have received a copy of the GNU General Public License version
3475# 2 along with this work; if not, write to the Free Software Foundation,
3476# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3477#
3478# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3479# or visit www.oracle.com if you need additional information or have any
3480# questions.
3481#
3482
3483
3484
3485
3486
3487
3488
3489
3490###############################################################################
3491#
3492# Should we build only OpenJDK even if closed sources are present?
3493#
3494
3495
3496
3497
3498###############################################################################
3499#
3500# Setup version numbers
3501#
3502
3503
3504
3505
3506
3507
3508# Support for customization of the build process. Some build files
3509# will include counterparts from this location, if they exist. This allows
3510# for a degree of customization of the build targets and the rules/recipes
3511# to create them
3512
3513# Check whether --with-custom-make-dir was given.
3514if test "${with_custom_make_dir+set}" = set; then :
3515  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3516fi
3517
3518
3519
3520#
3521# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3522# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3523#
3524# This code is free software; you can redistribute it and/or modify it
3525# under the terms of the GNU General Public License version 2 only, as
3526# published by the Free Software Foundation.  Oracle designates this
3527# particular file as subject to the "Classpath" exception as provided
3528# by Oracle in the LICENSE file that accompanied this code.
3529#
3530# This code is distributed in the hope that it will be useful, but WITHOUT
3531# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3532# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3533# version 2 for more details (a copy is included in the LICENSE file that
3534# accompanied this code).
3535#
3536# You should have received a copy of the GNU General Public License version
3537# 2 along with this work; if not, write to the Free Software Foundation,
3538# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3539#
3540# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3541# or visit www.oracle.com if you need additional information or have any
3542# questions.
3543#
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559#
3560# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3561# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3562#
3563# This code is free software; you can redistribute it and/or modify it
3564# under the terms of the GNU General Public License version 2 only, as
3565# published by the Free Software Foundation.  Oracle designates this
3566# particular file as subject to the "Classpath" exception as provided
3567# by Oracle in the LICENSE file that accompanied this code.
3568#
3569# This code is distributed in the hope that it will be useful, but WITHOUT
3570# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3571# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3572# version 2 for more details (a copy is included in the LICENSE file that
3573# accompanied this code).
3574#
3575# You should have received a copy of the GNU General Public License version
3576# 2 along with this work; if not, write to the Free Software Foundation,
3577# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3578#
3579# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3580# or visit www.oracle.com if you need additional information or have any
3581# questions.
3582#
3583
3584# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3585# Converts autoconf style CPU name to OpenJDK style, into
3586# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3587
3588
3589# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3590# Converts autoconf style OS name to OpenJDK style, into
3591# VAR_OS and VAR_OS_API.
3592
3593
3594# Expects $host_os $host_cpu $build_os and $build_cpu
3595# and $with_target_bits to have been setup!
3596#
3597# Translate the standard triplet(quadruplet) definition
3598# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3599# OPENJDK_BUILD_OS, etc.
3600
3601
3602# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3603# accordingly. Must be done after setting up build and target system, but before
3604# doing anything else with these values.
3605
3606
3607    # Setup the legacy variables, for controlling the old makefiles.
3608    #
3609
3610
3611
3612
3613#%%% Build and target systems %%%
3614
3615
3616
3617
3618# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3619# Add -mX to various FLAGS variables.
3620
3621
3622
3623
3624
3625
3626#
3627# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3628# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3629#
3630# This code is free software; you can redistribute it and/or modify it
3631# under the terms of the GNU General Public License version 2 only, as
3632# published by the Free Software Foundation.  Oracle designates this
3633# particular file as subject to the "Classpath" exception as provided
3634# by Oracle in the LICENSE file that accompanied this code.
3635#
3636# This code is distributed in the hope that it will be useful, but WITHOUT
3637# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3638# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3639# version 2 for more details (a copy is included in the LICENSE file that
3640# accompanied this code).
3641#
3642# You should have received a copy of the GNU General Public License version
3643# 2 along with this work; if not, write to the Free Software Foundation,
3644# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3645#
3646# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3647# or visit www.oracle.com if you need additional information or have any
3648# questions.
3649#
3650
3651
3652
3653
3654
3655
3656
3657
3658#
3659# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3660# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3661#
3662# This code is free software; you can redistribute it and/or modify it
3663# under the terms of the GNU General Public License version 2 only, as
3664# published by the Free Software Foundation.  Oracle designates this
3665# particular file as subject to the "Classpath" exception as provided
3666# by Oracle in the LICENSE file that accompanied this code.
3667#
3668# This code is distributed in the hope that it will be useful, but WITHOUT
3669# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3670# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3671# version 2 for more details (a copy is included in the LICENSE file that
3672# accompanied this code).
3673#
3674# You should have received a copy of the GNU General Public License version
3675# 2 along with this work; if not, write to the Free Software Foundation,
3676# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3677#
3678# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3679# or visit www.oracle.com if you need additional information or have any
3680# questions.
3681#
3682
3683# $1 = compiler to test (CC or CXX)
3684# $2 = human readable name of compiler (C or C++)
3685
3686
3687
3688
3689
3690# $1 = compiler to test (CC or CXX)
3691# $2 = human readable name of compiler (C or C++)
3692# $3 = list of compiler names to search for
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705#
3706# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3707# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3708#
3709# This code is free software; you can redistribute it and/or modify it
3710# under the terms of the GNU General Public License version 2 only, as
3711# published by the Free Software Foundation.  Oracle designates this
3712# particular file as subject to the "Classpath" exception as provided
3713# by Oracle in the LICENSE file that accompanied this code.
3714#
3715# This code is distributed in the hope that it will be useful, but WITHOUT
3716# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3717# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3718# version 2 for more details (a copy is included in the LICENSE file that
3719# accompanied this code).
3720#
3721# You should have received a copy of the GNU General Public License version
3722# 2 along with this work; if not, write to the Free Software Foundation,
3723# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3724#
3725# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3726# or visit www.oracle.com if you need additional information or have any
3727# questions.
3728#
3729
3730
3731
3732
3733
3734
3735
3736# Check if the VS env variables were setup prior to running configure.
3737# If not, then find vcvarsall.bat and run it automatically, and integrate
3738# the set env variables into the spec file.
3739
3740
3741
3742# Setup the DXSDK paths
3743
3744
3745
3746
3747
3748
3749# This line needs to be here, verbatim, after all includes and the dummy hook
3750# definitions. It is replaced with custom functionality when building
3751# custom sources.
3752#CUSTOM_AUTOCONF_INCLUDE
3753
3754# Do not change or remove the following line, it is needed for consistency checks:
3755DATE_WHEN_GENERATED=1363150186
3756
3757###############################################################################
3758#
3759# Initialization / Boot-strapping
3760#
3761# The bootstrapping process needs to solve the "chicken or the egg" problem,
3762# thus it jumps back and forth, each time gaining something needed later on.
3763#
3764###############################################################################
3765
3766# Basic initialization that must happen first of all
3767
3768# Save the original command line. This is passed to us by the wrapper configure script.
3769
3770DATE_WHEN_CONFIGURED=`LANG=C date`
3771
3772{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3773$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3774{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3775$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3776
3777
3778
3779# Start with tools that do not need have cross compilation support
3780# and can be expected to be found in the default PATH. These tools are
3781# used by configure. Nor are these tools expected to be found in the
3782# devkit from the builddeps server either, since they are
3783# needed to download the devkit.
3784
3785# First are all the simple required tools.
3786
3787    for ac_prog in basename
3788do
3789  # Extract the first word of "$ac_prog", so it can be a program name with args.
3790set dummy $ac_prog; ac_word=$2
3791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3792$as_echo_n "checking for $ac_word... " >&6; }
3793if ${ac_cv_path_BASENAME+:} false; then :
3794  $as_echo_n "(cached) " >&6
3795else
3796  case $BASENAME in
3797  [\\/]* | ?:[\\/]*)
3798  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3799  ;;
3800  *)
3801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3802for as_dir in $PATH
3803do
3804  IFS=$as_save_IFS
3805  test -z "$as_dir" && as_dir=.
3806    for ac_exec_ext in '' $ac_executable_extensions; do
3807  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3808    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3810    break 2
3811  fi
3812done
3813  done
3814IFS=$as_save_IFS
3815
3816  ;;
3817esac
3818fi
3819BASENAME=$ac_cv_path_BASENAME
3820if test -n "$BASENAME"; then
3821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3822$as_echo "$BASENAME" >&6; }
3823else
3824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3825$as_echo "no" >&6; }
3826fi
3827
3828
3829  test -n "$BASENAME" && break
3830done
3831
3832
3833    if test "x$BASENAME" = x; then
3834        if test "xbasename" = x; then
3835          PROG_NAME=basename
3836        else
3837          PROG_NAME=basename
3838        fi
3839        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3840$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3841        as_fn_error $? "Cannot continue" "$LINENO" 5
3842    fi
3843
3844
3845
3846    for ac_prog in bash
3847do
3848  # Extract the first word of "$ac_prog", so it can be a program name with args.
3849set dummy $ac_prog; ac_word=$2
3850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3851$as_echo_n "checking for $ac_word... " >&6; }
3852if ${ac_cv_path_BASH+:} false; then :
3853  $as_echo_n "(cached) " >&6
3854else
3855  case $BASH in
3856  [\\/]* | ?:[\\/]*)
3857  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3858  ;;
3859  *)
3860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3861for as_dir in $PATH
3862do
3863  IFS=$as_save_IFS
3864  test -z "$as_dir" && as_dir=.
3865    for ac_exec_ext in '' $ac_executable_extensions; do
3866  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3867    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3869    break 2
3870  fi
3871done
3872  done
3873IFS=$as_save_IFS
3874
3875  ;;
3876esac
3877fi
3878BASH=$ac_cv_path_BASH
3879if test -n "$BASH"; then
3880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3881$as_echo "$BASH" >&6; }
3882else
3883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3884$as_echo "no" >&6; }
3885fi
3886
3887
3888  test -n "$BASH" && break
3889done
3890
3891
3892    if test "x$BASH" = x; then
3893        if test "xbash" = x; then
3894          PROG_NAME=bash
3895        else
3896          PROG_NAME=bash
3897        fi
3898        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3899$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3900        as_fn_error $? "Cannot continue" "$LINENO" 5
3901    fi
3902
3903
3904
3905    for ac_prog in cat
3906do
3907  # Extract the first word of "$ac_prog", so it can be a program name with args.
3908set dummy $ac_prog; ac_word=$2
3909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3910$as_echo_n "checking for $ac_word... " >&6; }
3911if ${ac_cv_path_CAT+:} false; then :
3912  $as_echo_n "(cached) " >&6
3913else
3914  case $CAT in
3915  [\\/]* | ?:[\\/]*)
3916  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3917  ;;
3918  *)
3919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3920for as_dir in $PATH
3921do
3922  IFS=$as_save_IFS
3923  test -z "$as_dir" && as_dir=.
3924    for ac_exec_ext in '' $ac_executable_extensions; do
3925  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3926    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3928    break 2
3929  fi
3930done
3931  done
3932IFS=$as_save_IFS
3933
3934  ;;
3935esac
3936fi
3937CAT=$ac_cv_path_CAT
3938if test -n "$CAT"; then
3939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3940$as_echo "$CAT" >&6; }
3941else
3942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3943$as_echo "no" >&6; }
3944fi
3945
3946
3947  test -n "$CAT" && break
3948done
3949
3950
3951    if test "x$CAT" = x; then
3952        if test "xcat" = x; then
3953          PROG_NAME=cat
3954        else
3955          PROG_NAME=cat
3956        fi
3957        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3958$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3959        as_fn_error $? "Cannot continue" "$LINENO" 5
3960    fi
3961
3962
3963
3964    for ac_prog in chmod
3965do
3966  # Extract the first word of "$ac_prog", so it can be a program name with args.
3967set dummy $ac_prog; ac_word=$2
3968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3969$as_echo_n "checking for $ac_word... " >&6; }
3970if ${ac_cv_path_CHMOD+:} false; then :
3971  $as_echo_n "(cached) " >&6
3972else
3973  case $CHMOD in
3974  [\\/]* | ?:[\\/]*)
3975  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3976  ;;
3977  *)
3978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3979for as_dir in $PATH
3980do
3981  IFS=$as_save_IFS
3982  test -z "$as_dir" && as_dir=.
3983    for ac_exec_ext in '' $ac_executable_extensions; do
3984  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3985    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3987    break 2
3988  fi
3989done
3990  done
3991IFS=$as_save_IFS
3992
3993  ;;
3994esac
3995fi
3996CHMOD=$ac_cv_path_CHMOD
3997if test -n "$CHMOD"; then
3998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3999$as_echo "$CHMOD" >&6; }
4000else
4001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4002$as_echo "no" >&6; }
4003fi
4004
4005
4006  test -n "$CHMOD" && break
4007done
4008
4009
4010    if test "x$CHMOD" = x; then
4011        if test "xchmod" = x; then
4012          PROG_NAME=chmod
4013        else
4014          PROG_NAME=chmod
4015        fi
4016        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4017$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4018        as_fn_error $? "Cannot continue" "$LINENO" 5
4019    fi
4020
4021
4022
4023    for ac_prog in cmp
4024do
4025  # Extract the first word of "$ac_prog", so it can be a program name with args.
4026set dummy $ac_prog; ac_word=$2
4027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4028$as_echo_n "checking for $ac_word... " >&6; }
4029if ${ac_cv_path_CMP+:} false; then :
4030  $as_echo_n "(cached) " >&6
4031else
4032  case $CMP in
4033  [\\/]* | ?:[\\/]*)
4034  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4035  ;;
4036  *)
4037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4038for as_dir in $PATH
4039do
4040  IFS=$as_save_IFS
4041  test -z "$as_dir" && as_dir=.
4042    for ac_exec_ext in '' $ac_executable_extensions; do
4043  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4044    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4046    break 2
4047  fi
4048done
4049  done
4050IFS=$as_save_IFS
4051
4052  ;;
4053esac
4054fi
4055CMP=$ac_cv_path_CMP
4056if test -n "$CMP"; then
4057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4058$as_echo "$CMP" >&6; }
4059else
4060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4061$as_echo "no" >&6; }
4062fi
4063
4064
4065  test -n "$CMP" && break
4066done
4067
4068
4069    if test "x$CMP" = x; then
4070        if test "xcmp" = x; then
4071          PROG_NAME=cmp
4072        else
4073          PROG_NAME=cmp
4074        fi
4075        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4076$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4077        as_fn_error $? "Cannot continue" "$LINENO" 5
4078    fi
4079
4080
4081
4082    for ac_prog in comm
4083do
4084  # Extract the first word of "$ac_prog", so it can be a program name with args.
4085set dummy $ac_prog; ac_word=$2
4086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4087$as_echo_n "checking for $ac_word... " >&6; }
4088if ${ac_cv_path_COMM+:} false; then :
4089  $as_echo_n "(cached) " >&6
4090else
4091  case $COMM in
4092  [\\/]* | ?:[\\/]*)
4093  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4094  ;;
4095  *)
4096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4097for as_dir in $PATH
4098do
4099  IFS=$as_save_IFS
4100  test -z "$as_dir" && as_dir=.
4101    for ac_exec_ext in '' $ac_executable_extensions; do
4102  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4103    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4105    break 2
4106  fi
4107done
4108  done
4109IFS=$as_save_IFS
4110
4111  ;;
4112esac
4113fi
4114COMM=$ac_cv_path_COMM
4115if test -n "$COMM"; then
4116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4117$as_echo "$COMM" >&6; }
4118else
4119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4120$as_echo "no" >&6; }
4121fi
4122
4123
4124  test -n "$COMM" && break
4125done
4126
4127
4128    if test "x$COMM" = x; then
4129        if test "xcomm" = x; then
4130          PROG_NAME=comm
4131        else
4132          PROG_NAME=comm
4133        fi
4134        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4135$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4136        as_fn_error $? "Cannot continue" "$LINENO" 5
4137    fi
4138
4139
4140
4141    for ac_prog in cp
4142do
4143  # Extract the first word of "$ac_prog", so it can be a program name with args.
4144set dummy $ac_prog; ac_word=$2
4145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4146$as_echo_n "checking for $ac_word... " >&6; }
4147if ${ac_cv_path_CP+:} false; then :
4148  $as_echo_n "(cached) " >&6
4149else
4150  case $CP in
4151  [\\/]* | ?:[\\/]*)
4152  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4153  ;;
4154  *)
4155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4156for as_dir in $PATH
4157do
4158  IFS=$as_save_IFS
4159  test -z "$as_dir" && as_dir=.
4160    for ac_exec_ext in '' $ac_executable_extensions; do
4161  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4162    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4164    break 2
4165  fi
4166done
4167  done
4168IFS=$as_save_IFS
4169
4170  ;;
4171esac
4172fi
4173CP=$ac_cv_path_CP
4174if test -n "$CP"; then
4175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4176$as_echo "$CP" >&6; }
4177else
4178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4179$as_echo "no" >&6; }
4180fi
4181
4182
4183  test -n "$CP" && break
4184done
4185
4186
4187    if test "x$CP" = x; then
4188        if test "xcp" = x; then
4189          PROG_NAME=cp
4190        else
4191          PROG_NAME=cp
4192        fi
4193        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4194$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4195        as_fn_error $? "Cannot continue" "$LINENO" 5
4196    fi
4197
4198
4199
4200    for ac_prog in cpio
4201do
4202  # Extract the first word of "$ac_prog", so it can be a program name with args.
4203set dummy $ac_prog; ac_word=$2
4204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4205$as_echo_n "checking for $ac_word... " >&6; }
4206if ${ac_cv_path_CPIO+:} false; then :
4207  $as_echo_n "(cached) " >&6
4208else
4209  case $CPIO in
4210  [\\/]* | ?:[\\/]*)
4211  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4212  ;;
4213  *)
4214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4215for as_dir in $PATH
4216do
4217  IFS=$as_save_IFS
4218  test -z "$as_dir" && as_dir=.
4219    for ac_exec_ext in '' $ac_executable_extensions; do
4220  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4221    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4223    break 2
4224  fi
4225done
4226  done
4227IFS=$as_save_IFS
4228
4229  ;;
4230esac
4231fi
4232CPIO=$ac_cv_path_CPIO
4233if test -n "$CPIO"; then
4234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4235$as_echo "$CPIO" >&6; }
4236else
4237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4238$as_echo "no" >&6; }
4239fi
4240
4241
4242  test -n "$CPIO" && break
4243done
4244
4245
4246    if test "x$CPIO" = x; then
4247        if test "xcpio" = x; then
4248          PROG_NAME=cpio
4249        else
4250          PROG_NAME=cpio
4251        fi
4252        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4253$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4254        as_fn_error $? "Cannot continue" "$LINENO" 5
4255    fi
4256
4257
4258
4259    for ac_prog in cut
4260do
4261  # Extract the first word of "$ac_prog", so it can be a program name with args.
4262set dummy $ac_prog; ac_word=$2
4263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4264$as_echo_n "checking for $ac_word... " >&6; }
4265if ${ac_cv_path_CUT+:} false; then :
4266  $as_echo_n "(cached) " >&6
4267else
4268  case $CUT in
4269  [\\/]* | ?:[\\/]*)
4270  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4271  ;;
4272  *)
4273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4274for as_dir in $PATH
4275do
4276  IFS=$as_save_IFS
4277  test -z "$as_dir" && as_dir=.
4278    for ac_exec_ext in '' $ac_executable_extensions; do
4279  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4280    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4282    break 2
4283  fi
4284done
4285  done
4286IFS=$as_save_IFS
4287
4288  ;;
4289esac
4290fi
4291CUT=$ac_cv_path_CUT
4292if test -n "$CUT"; then
4293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4294$as_echo "$CUT" >&6; }
4295else
4296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4297$as_echo "no" >&6; }
4298fi
4299
4300
4301  test -n "$CUT" && break
4302done
4303
4304
4305    if test "x$CUT" = x; then
4306        if test "xcut" = x; then
4307          PROG_NAME=cut
4308        else
4309          PROG_NAME=cut
4310        fi
4311        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4312$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4313        as_fn_error $? "Cannot continue" "$LINENO" 5
4314    fi
4315
4316
4317
4318    for ac_prog in date
4319do
4320  # Extract the first word of "$ac_prog", so it can be a program name with args.
4321set dummy $ac_prog; ac_word=$2
4322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4323$as_echo_n "checking for $ac_word... " >&6; }
4324if ${ac_cv_path_DATE+:} false; then :
4325  $as_echo_n "(cached) " >&6
4326else
4327  case $DATE in
4328  [\\/]* | ?:[\\/]*)
4329  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4330  ;;
4331  *)
4332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4333for as_dir in $PATH
4334do
4335  IFS=$as_save_IFS
4336  test -z "$as_dir" && as_dir=.
4337    for ac_exec_ext in '' $ac_executable_extensions; do
4338  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4339    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4341    break 2
4342  fi
4343done
4344  done
4345IFS=$as_save_IFS
4346
4347  ;;
4348esac
4349fi
4350DATE=$ac_cv_path_DATE
4351if test -n "$DATE"; then
4352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4353$as_echo "$DATE" >&6; }
4354else
4355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4356$as_echo "no" >&6; }
4357fi
4358
4359
4360  test -n "$DATE" && break
4361done
4362
4363
4364    if test "x$DATE" = x; then
4365        if test "xdate" = x; then
4366          PROG_NAME=date
4367        else
4368          PROG_NAME=date
4369        fi
4370        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4371$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4372        as_fn_error $? "Cannot continue" "$LINENO" 5
4373    fi
4374
4375
4376
4377    for ac_prog in gdiff diff
4378do
4379  # Extract the first word of "$ac_prog", so it can be a program name with args.
4380set dummy $ac_prog; ac_word=$2
4381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4382$as_echo_n "checking for $ac_word... " >&6; }
4383if ${ac_cv_path_DIFF+:} false; then :
4384  $as_echo_n "(cached) " >&6
4385else
4386  case $DIFF in
4387  [\\/]* | ?:[\\/]*)
4388  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4389  ;;
4390  *)
4391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4392for as_dir in $PATH
4393do
4394  IFS=$as_save_IFS
4395  test -z "$as_dir" && as_dir=.
4396    for ac_exec_ext in '' $ac_executable_extensions; do
4397  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4398    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4400    break 2
4401  fi
4402done
4403  done
4404IFS=$as_save_IFS
4405
4406  ;;
4407esac
4408fi
4409DIFF=$ac_cv_path_DIFF
4410if test -n "$DIFF"; then
4411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4412$as_echo "$DIFF" >&6; }
4413else
4414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4415$as_echo "no" >&6; }
4416fi
4417
4418
4419  test -n "$DIFF" && break
4420done
4421
4422
4423    if test "x$DIFF" = x; then
4424        if test "xgdiff diff" = x; then
4425          PROG_NAME=diff
4426        else
4427          PROG_NAME=gdiff diff
4428        fi
4429        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4430$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4431        as_fn_error $? "Cannot continue" "$LINENO" 5
4432    fi
4433
4434
4435
4436    for ac_prog in dirname
4437do
4438  # Extract the first word of "$ac_prog", so it can be a program name with args.
4439set dummy $ac_prog; ac_word=$2
4440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4441$as_echo_n "checking for $ac_word... " >&6; }
4442if ${ac_cv_path_DIRNAME+:} false; then :
4443  $as_echo_n "(cached) " >&6
4444else
4445  case $DIRNAME in
4446  [\\/]* | ?:[\\/]*)
4447  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4448  ;;
4449  *)
4450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4451for as_dir in $PATH
4452do
4453  IFS=$as_save_IFS
4454  test -z "$as_dir" && as_dir=.
4455    for ac_exec_ext in '' $ac_executable_extensions; do
4456  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4457    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4459    break 2
4460  fi
4461done
4462  done
4463IFS=$as_save_IFS
4464
4465  ;;
4466esac
4467fi
4468DIRNAME=$ac_cv_path_DIRNAME
4469if test -n "$DIRNAME"; then
4470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4471$as_echo "$DIRNAME" >&6; }
4472else
4473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4474$as_echo "no" >&6; }
4475fi
4476
4477
4478  test -n "$DIRNAME" && break
4479done
4480
4481
4482    if test "x$DIRNAME" = x; then
4483        if test "xdirname" = x; then
4484          PROG_NAME=dirname
4485        else
4486          PROG_NAME=dirname
4487        fi
4488        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4489$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4490        as_fn_error $? "Cannot continue" "$LINENO" 5
4491    fi
4492
4493
4494
4495    for ac_prog in echo
4496do
4497  # Extract the first word of "$ac_prog", so it can be a program name with args.
4498set dummy $ac_prog; ac_word=$2
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4500$as_echo_n "checking for $ac_word... " >&6; }
4501if ${ac_cv_path_ECHO+:} false; then :
4502  $as_echo_n "(cached) " >&6
4503else
4504  case $ECHO in
4505  [\\/]* | ?:[\\/]*)
4506  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4507  ;;
4508  *)
4509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4510for as_dir in $PATH
4511do
4512  IFS=$as_save_IFS
4513  test -z "$as_dir" && as_dir=.
4514    for ac_exec_ext in '' $ac_executable_extensions; do
4515  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4516    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4518    break 2
4519  fi
4520done
4521  done
4522IFS=$as_save_IFS
4523
4524  ;;
4525esac
4526fi
4527ECHO=$ac_cv_path_ECHO
4528if test -n "$ECHO"; then
4529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4530$as_echo "$ECHO" >&6; }
4531else
4532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533$as_echo "no" >&6; }
4534fi
4535
4536
4537  test -n "$ECHO" && break
4538done
4539
4540
4541    if test "x$ECHO" = x; then
4542        if test "xecho" = x; then
4543          PROG_NAME=echo
4544        else
4545          PROG_NAME=echo
4546        fi
4547        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4548$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4549        as_fn_error $? "Cannot continue" "$LINENO" 5
4550    fi
4551
4552
4553
4554    for ac_prog in expr
4555do
4556  # Extract the first word of "$ac_prog", so it can be a program name with args.
4557set dummy $ac_prog; ac_word=$2
4558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4559$as_echo_n "checking for $ac_word... " >&6; }
4560if ${ac_cv_path_EXPR+:} false; then :
4561  $as_echo_n "(cached) " >&6
4562else
4563  case $EXPR in
4564  [\\/]* | ?:[\\/]*)
4565  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4566  ;;
4567  *)
4568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4569for as_dir in $PATH
4570do
4571  IFS=$as_save_IFS
4572  test -z "$as_dir" && as_dir=.
4573    for ac_exec_ext in '' $ac_executable_extensions; do
4574  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4575    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4577    break 2
4578  fi
4579done
4580  done
4581IFS=$as_save_IFS
4582
4583  ;;
4584esac
4585fi
4586EXPR=$ac_cv_path_EXPR
4587if test -n "$EXPR"; then
4588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4589$as_echo "$EXPR" >&6; }
4590else
4591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4592$as_echo "no" >&6; }
4593fi
4594
4595
4596  test -n "$EXPR" && break
4597done
4598
4599
4600    if test "x$EXPR" = x; then
4601        if test "xexpr" = x; then
4602          PROG_NAME=expr
4603        else
4604          PROG_NAME=expr
4605        fi
4606        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4607$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4608        as_fn_error $? "Cannot continue" "$LINENO" 5
4609    fi
4610
4611
4612
4613    for ac_prog in file
4614do
4615  # Extract the first word of "$ac_prog", so it can be a program name with args.
4616set dummy $ac_prog; ac_word=$2
4617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4618$as_echo_n "checking for $ac_word... " >&6; }
4619if ${ac_cv_path_FILE+:} false; then :
4620  $as_echo_n "(cached) " >&6
4621else
4622  case $FILE in
4623  [\\/]* | ?:[\\/]*)
4624  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4625  ;;
4626  *)
4627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4628for as_dir in $PATH
4629do
4630  IFS=$as_save_IFS
4631  test -z "$as_dir" && as_dir=.
4632    for ac_exec_ext in '' $ac_executable_extensions; do
4633  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4634    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4636    break 2
4637  fi
4638done
4639  done
4640IFS=$as_save_IFS
4641
4642  ;;
4643esac
4644fi
4645FILE=$ac_cv_path_FILE
4646if test -n "$FILE"; then
4647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4648$as_echo "$FILE" >&6; }
4649else
4650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4651$as_echo "no" >&6; }
4652fi
4653
4654
4655  test -n "$FILE" && break
4656done
4657
4658
4659    if test "x$FILE" = x; then
4660        if test "xfile" = x; then
4661          PROG_NAME=file
4662        else
4663          PROG_NAME=file
4664        fi
4665        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4666$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4667        as_fn_error $? "Cannot continue" "$LINENO" 5
4668    fi
4669
4670
4671
4672    for ac_prog in find
4673do
4674  # Extract the first word of "$ac_prog", so it can be a program name with args.
4675set dummy $ac_prog; ac_word=$2
4676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4677$as_echo_n "checking for $ac_word... " >&6; }
4678if ${ac_cv_path_FIND+:} false; then :
4679  $as_echo_n "(cached) " >&6
4680else
4681  case $FIND in
4682  [\\/]* | ?:[\\/]*)
4683  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4684  ;;
4685  *)
4686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4687for as_dir in $PATH
4688do
4689  IFS=$as_save_IFS
4690  test -z "$as_dir" && as_dir=.
4691    for ac_exec_ext in '' $ac_executable_extensions; do
4692  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4693    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4695    break 2
4696  fi
4697done
4698  done
4699IFS=$as_save_IFS
4700
4701  ;;
4702esac
4703fi
4704FIND=$ac_cv_path_FIND
4705if test -n "$FIND"; then
4706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4707$as_echo "$FIND" >&6; }
4708else
4709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4710$as_echo "no" >&6; }
4711fi
4712
4713
4714  test -n "$FIND" && break
4715done
4716
4717
4718    if test "x$FIND" = x; then
4719        if test "xfind" = x; then
4720          PROG_NAME=find
4721        else
4722          PROG_NAME=find
4723        fi
4724        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4725$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4726        as_fn_error $? "Cannot continue" "$LINENO" 5
4727    fi
4728
4729
4730
4731    for ac_prog in head
4732do
4733  # Extract the first word of "$ac_prog", so it can be a program name with args.
4734set dummy $ac_prog; ac_word=$2
4735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4736$as_echo_n "checking for $ac_word... " >&6; }
4737if ${ac_cv_path_HEAD+:} false; then :
4738  $as_echo_n "(cached) " >&6
4739else
4740  case $HEAD in
4741  [\\/]* | ?:[\\/]*)
4742  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4743  ;;
4744  *)
4745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4746for as_dir in $PATH
4747do
4748  IFS=$as_save_IFS
4749  test -z "$as_dir" && as_dir=.
4750    for ac_exec_ext in '' $ac_executable_extensions; do
4751  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4752    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4754    break 2
4755  fi
4756done
4757  done
4758IFS=$as_save_IFS
4759
4760  ;;
4761esac
4762fi
4763HEAD=$ac_cv_path_HEAD
4764if test -n "$HEAD"; then
4765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4766$as_echo "$HEAD" >&6; }
4767else
4768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4769$as_echo "no" >&6; }
4770fi
4771
4772
4773  test -n "$HEAD" && break
4774done
4775
4776
4777    if test "x$HEAD" = x; then
4778        if test "xhead" = x; then
4779          PROG_NAME=head
4780        else
4781          PROG_NAME=head
4782        fi
4783        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4784$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4785        as_fn_error $? "Cannot continue" "$LINENO" 5
4786    fi
4787
4788
4789
4790    for ac_prog in ln
4791do
4792  # Extract the first word of "$ac_prog", so it can be a program name with args.
4793set dummy $ac_prog; ac_word=$2
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4795$as_echo_n "checking for $ac_word... " >&6; }
4796if ${ac_cv_path_LN+:} false; then :
4797  $as_echo_n "(cached) " >&6
4798else
4799  case $LN in
4800  [\\/]* | ?:[\\/]*)
4801  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4802  ;;
4803  *)
4804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4805for as_dir in $PATH
4806do
4807  IFS=$as_save_IFS
4808  test -z "$as_dir" && as_dir=.
4809    for ac_exec_ext in '' $ac_executable_extensions; do
4810  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4811    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4813    break 2
4814  fi
4815done
4816  done
4817IFS=$as_save_IFS
4818
4819  ;;
4820esac
4821fi
4822LN=$ac_cv_path_LN
4823if test -n "$LN"; then
4824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4825$as_echo "$LN" >&6; }
4826else
4827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4828$as_echo "no" >&6; }
4829fi
4830
4831
4832  test -n "$LN" && break
4833done
4834
4835
4836    if test "x$LN" = x; then
4837        if test "xln" = x; then
4838          PROG_NAME=ln
4839        else
4840          PROG_NAME=ln
4841        fi
4842        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4843$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4844        as_fn_error $? "Cannot continue" "$LINENO" 5
4845    fi
4846
4847
4848
4849    for ac_prog in ls
4850do
4851  # Extract the first word of "$ac_prog", so it can be a program name with args.
4852set dummy $ac_prog; ac_word=$2
4853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4854$as_echo_n "checking for $ac_word... " >&6; }
4855if ${ac_cv_path_LS+:} false; then :
4856  $as_echo_n "(cached) " >&6
4857else
4858  case $LS in
4859  [\\/]* | ?:[\\/]*)
4860  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4861  ;;
4862  *)
4863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4864for as_dir in $PATH
4865do
4866  IFS=$as_save_IFS
4867  test -z "$as_dir" && as_dir=.
4868    for ac_exec_ext in '' $ac_executable_extensions; do
4869  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4870    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4872    break 2
4873  fi
4874done
4875  done
4876IFS=$as_save_IFS
4877
4878  ;;
4879esac
4880fi
4881LS=$ac_cv_path_LS
4882if test -n "$LS"; then
4883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4884$as_echo "$LS" >&6; }
4885else
4886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4887$as_echo "no" >&6; }
4888fi
4889
4890
4891  test -n "$LS" && break
4892done
4893
4894
4895    if test "x$LS" = x; then
4896        if test "xls" = x; then
4897          PROG_NAME=ls
4898        else
4899          PROG_NAME=ls
4900        fi
4901        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4902$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4903        as_fn_error $? "Cannot continue" "$LINENO" 5
4904    fi
4905
4906
4907
4908    for ac_prog in mkdir
4909do
4910  # Extract the first word of "$ac_prog", so it can be a program name with args.
4911set dummy $ac_prog; ac_word=$2
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4913$as_echo_n "checking for $ac_word... " >&6; }
4914if ${ac_cv_path_MKDIR+:} false; then :
4915  $as_echo_n "(cached) " >&6
4916else
4917  case $MKDIR in
4918  [\\/]* | ?:[\\/]*)
4919  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4920  ;;
4921  *)
4922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in $PATH
4924do
4925  IFS=$as_save_IFS
4926  test -z "$as_dir" && as_dir=.
4927    for ac_exec_ext in '' $ac_executable_extensions; do
4928  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4929    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4931    break 2
4932  fi
4933done
4934  done
4935IFS=$as_save_IFS
4936
4937  ;;
4938esac
4939fi
4940MKDIR=$ac_cv_path_MKDIR
4941if test -n "$MKDIR"; then
4942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4943$as_echo "$MKDIR" >&6; }
4944else
4945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4946$as_echo "no" >&6; }
4947fi
4948
4949
4950  test -n "$MKDIR" && break
4951done
4952
4953
4954    if test "x$MKDIR" = x; then
4955        if test "xmkdir" = x; then
4956          PROG_NAME=mkdir
4957        else
4958          PROG_NAME=mkdir
4959        fi
4960        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4961$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4962        as_fn_error $? "Cannot continue" "$LINENO" 5
4963    fi
4964
4965
4966
4967    for ac_prog in mktemp
4968do
4969  # Extract the first word of "$ac_prog", so it can be a program name with args.
4970set dummy $ac_prog; ac_word=$2
4971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4972$as_echo_n "checking for $ac_word... " >&6; }
4973if ${ac_cv_path_MKTEMP+:} false; then :
4974  $as_echo_n "(cached) " >&6
4975else
4976  case $MKTEMP in
4977  [\\/]* | ?:[\\/]*)
4978  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4979  ;;
4980  *)
4981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982for as_dir in $PATH
4983do
4984  IFS=$as_save_IFS
4985  test -z "$as_dir" && as_dir=.
4986    for ac_exec_ext in '' $ac_executable_extensions; do
4987  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4988    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4990    break 2
4991  fi
4992done
4993  done
4994IFS=$as_save_IFS
4995
4996  ;;
4997esac
4998fi
4999MKTEMP=$ac_cv_path_MKTEMP
5000if test -n "$MKTEMP"; then
5001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5002$as_echo "$MKTEMP" >&6; }
5003else
5004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005$as_echo "no" >&6; }
5006fi
5007
5008
5009  test -n "$MKTEMP" && break
5010done
5011
5012
5013    if test "x$MKTEMP" = x; then
5014        if test "xmktemp" = x; then
5015          PROG_NAME=mktemp
5016        else
5017          PROG_NAME=mktemp
5018        fi
5019        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5020$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5021        as_fn_error $? "Cannot continue" "$LINENO" 5
5022    fi
5023
5024
5025
5026    for ac_prog in mv
5027do
5028  # Extract the first word of "$ac_prog", so it can be a program name with args.
5029set dummy $ac_prog; ac_word=$2
5030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5031$as_echo_n "checking for $ac_word... " >&6; }
5032if ${ac_cv_path_MV+:} false; then :
5033  $as_echo_n "(cached) " >&6
5034else
5035  case $MV in
5036  [\\/]* | ?:[\\/]*)
5037  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5038  ;;
5039  *)
5040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041for as_dir in $PATH
5042do
5043  IFS=$as_save_IFS
5044  test -z "$as_dir" && as_dir=.
5045    for ac_exec_ext in '' $ac_executable_extensions; do
5046  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5047    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5049    break 2
5050  fi
5051done
5052  done
5053IFS=$as_save_IFS
5054
5055  ;;
5056esac
5057fi
5058MV=$ac_cv_path_MV
5059if test -n "$MV"; then
5060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5061$as_echo "$MV" >&6; }
5062else
5063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064$as_echo "no" >&6; }
5065fi
5066
5067
5068  test -n "$MV" && break
5069done
5070
5071
5072    if test "x$MV" = x; then
5073        if test "xmv" = x; then
5074          PROG_NAME=mv
5075        else
5076          PROG_NAME=mv
5077        fi
5078        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5079$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5080        as_fn_error $? "Cannot continue" "$LINENO" 5
5081    fi
5082
5083
5084
5085    for ac_prog in printf
5086do
5087  # Extract the first word of "$ac_prog", so it can be a program name with args.
5088set dummy $ac_prog; ac_word=$2
5089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5090$as_echo_n "checking for $ac_word... " >&6; }
5091if ${ac_cv_path_PRINTF+:} false; then :
5092  $as_echo_n "(cached) " >&6
5093else
5094  case $PRINTF in
5095  [\\/]* | ?:[\\/]*)
5096  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5097  ;;
5098  *)
5099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5100for as_dir in $PATH
5101do
5102  IFS=$as_save_IFS
5103  test -z "$as_dir" && as_dir=.
5104    for ac_exec_ext in '' $ac_executable_extensions; do
5105  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5106    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5108    break 2
5109  fi
5110done
5111  done
5112IFS=$as_save_IFS
5113
5114  ;;
5115esac
5116fi
5117PRINTF=$ac_cv_path_PRINTF
5118if test -n "$PRINTF"; then
5119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5120$as_echo "$PRINTF" >&6; }
5121else
5122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5123$as_echo "no" >&6; }
5124fi
5125
5126
5127  test -n "$PRINTF" && break
5128done
5129
5130
5131    if test "x$PRINTF" = x; then
5132        if test "xprintf" = x; then
5133          PROG_NAME=printf
5134        else
5135          PROG_NAME=printf
5136        fi
5137        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5138$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5139        as_fn_error $? "Cannot continue" "$LINENO" 5
5140    fi
5141
5142
5143
5144    for ac_prog in pwd
5145do
5146  # Extract the first word of "$ac_prog", so it can be a program name with args.
5147set dummy $ac_prog; ac_word=$2
5148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5149$as_echo_n "checking for $ac_word... " >&6; }
5150if ${ac_cv_path_THEPWDCMD+:} false; then :
5151  $as_echo_n "(cached) " >&6
5152else
5153  case $THEPWDCMD in
5154  [\\/]* | ?:[\\/]*)
5155  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5156  ;;
5157  *)
5158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5159for as_dir in $PATH
5160do
5161  IFS=$as_save_IFS
5162  test -z "$as_dir" && as_dir=.
5163    for ac_exec_ext in '' $ac_executable_extensions; do
5164  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5165    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5167    break 2
5168  fi
5169done
5170  done
5171IFS=$as_save_IFS
5172
5173  ;;
5174esac
5175fi
5176THEPWDCMD=$ac_cv_path_THEPWDCMD
5177if test -n "$THEPWDCMD"; then
5178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5179$as_echo "$THEPWDCMD" >&6; }
5180else
5181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5182$as_echo "no" >&6; }
5183fi
5184
5185
5186  test -n "$THEPWDCMD" && break
5187done
5188
5189
5190    if test "x$THEPWDCMD" = x; then
5191        if test "xpwd" = x; then
5192          PROG_NAME=thepwdcmd
5193        else
5194          PROG_NAME=pwd
5195        fi
5196        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5197$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5198        as_fn_error $? "Cannot continue" "$LINENO" 5
5199    fi
5200
5201
5202
5203    for ac_prog in rm
5204do
5205  # Extract the first word of "$ac_prog", so it can be a program name with args.
5206set dummy $ac_prog; ac_word=$2
5207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5208$as_echo_n "checking for $ac_word... " >&6; }
5209if ${ac_cv_path_RM+:} false; then :
5210  $as_echo_n "(cached) " >&6
5211else
5212  case $RM in
5213  [\\/]* | ?:[\\/]*)
5214  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5215  ;;
5216  *)
5217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5218for as_dir in $PATH
5219do
5220  IFS=$as_save_IFS
5221  test -z "$as_dir" && as_dir=.
5222    for ac_exec_ext in '' $ac_executable_extensions; do
5223  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5224    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5226    break 2
5227  fi
5228done
5229  done
5230IFS=$as_save_IFS
5231
5232  ;;
5233esac
5234fi
5235RM=$ac_cv_path_RM
5236if test -n "$RM"; then
5237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5238$as_echo "$RM" >&6; }
5239else
5240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241$as_echo "no" >&6; }
5242fi
5243
5244
5245  test -n "$RM" && break
5246done
5247
5248
5249    if test "x$RM" = x; then
5250        if test "xrm" = x; then
5251          PROG_NAME=rm
5252        else
5253          PROG_NAME=rm
5254        fi
5255        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5256$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5257        as_fn_error $? "Cannot continue" "$LINENO" 5
5258    fi
5259
5260
5261
5262    for ac_prog in sh
5263do
5264  # Extract the first word of "$ac_prog", so it can be a program name with args.
5265set dummy $ac_prog; ac_word=$2
5266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5267$as_echo_n "checking for $ac_word... " >&6; }
5268if ${ac_cv_path_SH+:} false; then :
5269  $as_echo_n "(cached) " >&6
5270else
5271  case $SH in
5272  [\\/]* | ?:[\\/]*)
5273  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5274  ;;
5275  *)
5276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5277for as_dir in $PATH
5278do
5279  IFS=$as_save_IFS
5280  test -z "$as_dir" && as_dir=.
5281    for ac_exec_ext in '' $ac_executable_extensions; do
5282  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5283    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5285    break 2
5286  fi
5287done
5288  done
5289IFS=$as_save_IFS
5290
5291  ;;
5292esac
5293fi
5294SH=$ac_cv_path_SH
5295if test -n "$SH"; then
5296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5297$as_echo "$SH" >&6; }
5298else
5299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5300$as_echo "no" >&6; }
5301fi
5302
5303
5304  test -n "$SH" && break
5305done
5306
5307
5308    if test "x$SH" = x; then
5309        if test "xsh" = x; then
5310          PROG_NAME=sh
5311        else
5312          PROG_NAME=sh
5313        fi
5314        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5315$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5316        as_fn_error $? "Cannot continue" "$LINENO" 5
5317    fi
5318
5319
5320
5321    for ac_prog in sort
5322do
5323  # Extract the first word of "$ac_prog", so it can be a program name with args.
5324set dummy $ac_prog; ac_word=$2
5325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5326$as_echo_n "checking for $ac_word... " >&6; }
5327if ${ac_cv_path_SORT+:} false; then :
5328  $as_echo_n "(cached) " >&6
5329else
5330  case $SORT in
5331  [\\/]* | ?:[\\/]*)
5332  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5333  ;;
5334  *)
5335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5336for as_dir in $PATH
5337do
5338  IFS=$as_save_IFS
5339  test -z "$as_dir" && as_dir=.
5340    for ac_exec_ext in '' $ac_executable_extensions; do
5341  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5342    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5344    break 2
5345  fi
5346done
5347  done
5348IFS=$as_save_IFS
5349
5350  ;;
5351esac
5352fi
5353SORT=$ac_cv_path_SORT
5354if test -n "$SORT"; then
5355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5356$as_echo "$SORT" >&6; }
5357else
5358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5359$as_echo "no" >&6; }
5360fi
5361
5362
5363  test -n "$SORT" && break
5364done
5365
5366
5367    if test "x$SORT" = x; then
5368        if test "xsort" = x; then
5369          PROG_NAME=sort
5370        else
5371          PROG_NAME=sort
5372        fi
5373        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5374$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5375        as_fn_error $? "Cannot continue" "$LINENO" 5
5376    fi
5377
5378
5379
5380    for ac_prog in tail
5381do
5382  # Extract the first word of "$ac_prog", so it can be a program name with args.
5383set dummy $ac_prog; ac_word=$2
5384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5385$as_echo_n "checking for $ac_word... " >&6; }
5386if ${ac_cv_path_TAIL+:} false; then :
5387  $as_echo_n "(cached) " >&6
5388else
5389  case $TAIL in
5390  [\\/]* | ?:[\\/]*)
5391  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5392  ;;
5393  *)
5394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5395for as_dir in $PATH
5396do
5397  IFS=$as_save_IFS
5398  test -z "$as_dir" && as_dir=.
5399    for ac_exec_ext in '' $ac_executable_extensions; do
5400  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5401    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5403    break 2
5404  fi
5405done
5406  done
5407IFS=$as_save_IFS
5408
5409  ;;
5410esac
5411fi
5412TAIL=$ac_cv_path_TAIL
5413if test -n "$TAIL"; then
5414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5415$as_echo "$TAIL" >&6; }
5416else
5417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5418$as_echo "no" >&6; }
5419fi
5420
5421
5422  test -n "$TAIL" && break
5423done
5424
5425
5426    if test "x$TAIL" = x; then
5427        if test "xtail" = x; then
5428          PROG_NAME=tail
5429        else
5430          PROG_NAME=tail
5431        fi
5432        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5433$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5434        as_fn_error $? "Cannot continue" "$LINENO" 5
5435    fi
5436
5437
5438
5439    for ac_prog in tar
5440do
5441  # Extract the first word of "$ac_prog", so it can be a program name with args.
5442set dummy $ac_prog; ac_word=$2
5443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5444$as_echo_n "checking for $ac_word... " >&6; }
5445if ${ac_cv_path_TAR+:} false; then :
5446  $as_echo_n "(cached) " >&6
5447else
5448  case $TAR in
5449  [\\/]* | ?:[\\/]*)
5450  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5451  ;;
5452  *)
5453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5454for as_dir in $PATH
5455do
5456  IFS=$as_save_IFS
5457  test -z "$as_dir" && as_dir=.
5458    for ac_exec_ext in '' $ac_executable_extensions; do
5459  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5460    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5462    break 2
5463  fi
5464done
5465  done
5466IFS=$as_save_IFS
5467
5468  ;;
5469esac
5470fi
5471TAR=$ac_cv_path_TAR
5472if test -n "$TAR"; then
5473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5474$as_echo "$TAR" >&6; }
5475else
5476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5477$as_echo "no" >&6; }
5478fi
5479
5480
5481  test -n "$TAR" && break
5482done
5483
5484
5485    if test "x$TAR" = x; then
5486        if test "xtar" = x; then
5487          PROG_NAME=tar
5488        else
5489          PROG_NAME=tar
5490        fi
5491        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5492$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5493        as_fn_error $? "Cannot continue" "$LINENO" 5
5494    fi
5495
5496
5497
5498    for ac_prog in tee
5499do
5500  # Extract the first word of "$ac_prog", so it can be a program name with args.
5501set dummy $ac_prog; ac_word=$2
5502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5503$as_echo_n "checking for $ac_word... " >&6; }
5504if ${ac_cv_path_TEE+:} false; then :
5505  $as_echo_n "(cached) " >&6
5506else
5507  case $TEE in
5508  [\\/]* | ?:[\\/]*)
5509  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5510  ;;
5511  *)
5512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5513for as_dir in $PATH
5514do
5515  IFS=$as_save_IFS
5516  test -z "$as_dir" && as_dir=.
5517    for ac_exec_ext in '' $ac_executable_extensions; do
5518  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5519    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5521    break 2
5522  fi
5523done
5524  done
5525IFS=$as_save_IFS
5526
5527  ;;
5528esac
5529fi
5530TEE=$ac_cv_path_TEE
5531if test -n "$TEE"; then
5532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5533$as_echo "$TEE" >&6; }
5534else
5535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536$as_echo "no" >&6; }
5537fi
5538
5539
5540  test -n "$TEE" && break
5541done
5542
5543
5544    if test "x$TEE" = x; then
5545        if test "xtee" = x; then
5546          PROG_NAME=tee
5547        else
5548          PROG_NAME=tee
5549        fi
5550        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5551$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5552        as_fn_error $? "Cannot continue" "$LINENO" 5
5553    fi
5554
5555
5556
5557    for ac_prog in touch
5558do
5559  # Extract the first word of "$ac_prog", so it can be a program name with args.
5560set dummy $ac_prog; ac_word=$2
5561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5562$as_echo_n "checking for $ac_word... " >&6; }
5563if ${ac_cv_path_TOUCH+:} false; then :
5564  $as_echo_n "(cached) " >&6
5565else
5566  case $TOUCH in
5567  [\\/]* | ?:[\\/]*)
5568  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5569  ;;
5570  *)
5571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5572for as_dir in $PATH
5573do
5574  IFS=$as_save_IFS
5575  test -z "$as_dir" && as_dir=.
5576    for ac_exec_ext in '' $ac_executable_extensions; do
5577  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5578    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5580    break 2
5581  fi
5582done
5583  done
5584IFS=$as_save_IFS
5585
5586  ;;
5587esac
5588fi
5589TOUCH=$ac_cv_path_TOUCH
5590if test -n "$TOUCH"; then
5591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5592$as_echo "$TOUCH" >&6; }
5593else
5594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5595$as_echo "no" >&6; }
5596fi
5597
5598
5599  test -n "$TOUCH" && break
5600done
5601
5602
5603    if test "x$TOUCH" = x; then
5604        if test "xtouch" = x; then
5605          PROG_NAME=touch
5606        else
5607          PROG_NAME=touch
5608        fi
5609        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5610$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5611        as_fn_error $? "Cannot continue" "$LINENO" 5
5612    fi
5613
5614
5615
5616    for ac_prog in tr
5617do
5618  # Extract the first word of "$ac_prog", so it can be a program name with args.
5619set dummy $ac_prog; ac_word=$2
5620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5621$as_echo_n "checking for $ac_word... " >&6; }
5622if ${ac_cv_path_TR+:} false; then :
5623  $as_echo_n "(cached) " >&6
5624else
5625  case $TR in
5626  [\\/]* | ?:[\\/]*)
5627  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5628  ;;
5629  *)
5630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5631for as_dir in $PATH
5632do
5633  IFS=$as_save_IFS
5634  test -z "$as_dir" && as_dir=.
5635    for ac_exec_ext in '' $ac_executable_extensions; do
5636  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5637    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5639    break 2
5640  fi
5641done
5642  done
5643IFS=$as_save_IFS
5644
5645  ;;
5646esac
5647fi
5648TR=$ac_cv_path_TR
5649if test -n "$TR"; then
5650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5651$as_echo "$TR" >&6; }
5652else
5653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5654$as_echo "no" >&6; }
5655fi
5656
5657
5658  test -n "$TR" && break
5659done
5660
5661
5662    if test "x$TR" = x; then
5663        if test "xtr" = x; then
5664          PROG_NAME=tr
5665        else
5666          PROG_NAME=tr
5667        fi
5668        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5669$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5670        as_fn_error $? "Cannot continue" "$LINENO" 5
5671    fi
5672
5673
5674
5675    for ac_prog in uname
5676do
5677  # Extract the first word of "$ac_prog", so it can be a program name with args.
5678set dummy $ac_prog; ac_word=$2
5679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5680$as_echo_n "checking for $ac_word... " >&6; }
5681if ${ac_cv_path_UNAME+:} false; then :
5682  $as_echo_n "(cached) " >&6
5683else
5684  case $UNAME in
5685  [\\/]* | ?:[\\/]*)
5686  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5687  ;;
5688  *)
5689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5690for as_dir in $PATH
5691do
5692  IFS=$as_save_IFS
5693  test -z "$as_dir" && as_dir=.
5694    for ac_exec_ext in '' $ac_executable_extensions; do
5695  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5696    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5698    break 2
5699  fi
5700done
5701  done
5702IFS=$as_save_IFS
5703
5704  ;;
5705esac
5706fi
5707UNAME=$ac_cv_path_UNAME
5708if test -n "$UNAME"; then
5709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5710$as_echo "$UNAME" >&6; }
5711else
5712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5713$as_echo "no" >&6; }
5714fi
5715
5716
5717  test -n "$UNAME" && break
5718done
5719
5720
5721    if test "x$UNAME" = x; then
5722        if test "xuname" = x; then
5723          PROG_NAME=uname
5724        else
5725          PROG_NAME=uname
5726        fi
5727        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5728$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5729        as_fn_error $? "Cannot continue" "$LINENO" 5
5730    fi
5731
5732
5733
5734    for ac_prog in uniq
5735do
5736  # Extract the first word of "$ac_prog", so it can be a program name with args.
5737set dummy $ac_prog; ac_word=$2
5738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5739$as_echo_n "checking for $ac_word... " >&6; }
5740if ${ac_cv_path_UNIQ+:} false; then :
5741  $as_echo_n "(cached) " >&6
5742else
5743  case $UNIQ in
5744  [\\/]* | ?:[\\/]*)
5745  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5746  ;;
5747  *)
5748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5749for as_dir in $PATH
5750do
5751  IFS=$as_save_IFS
5752  test -z "$as_dir" && as_dir=.
5753    for ac_exec_ext in '' $ac_executable_extensions; do
5754  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5755    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5757    break 2
5758  fi
5759done
5760  done
5761IFS=$as_save_IFS
5762
5763  ;;
5764esac
5765fi
5766UNIQ=$ac_cv_path_UNIQ
5767if test -n "$UNIQ"; then
5768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5769$as_echo "$UNIQ" >&6; }
5770else
5771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5772$as_echo "no" >&6; }
5773fi
5774
5775
5776  test -n "$UNIQ" && break
5777done
5778
5779
5780    if test "x$UNIQ" = x; then
5781        if test "xuniq" = x; then
5782          PROG_NAME=uniq
5783        else
5784          PROG_NAME=uniq
5785        fi
5786        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5787$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5788        as_fn_error $? "Cannot continue" "$LINENO" 5
5789    fi
5790
5791
5792
5793    for ac_prog in wc
5794do
5795  # Extract the first word of "$ac_prog", so it can be a program name with args.
5796set dummy $ac_prog; ac_word=$2
5797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5798$as_echo_n "checking for $ac_word... " >&6; }
5799if ${ac_cv_path_WC+:} false; then :
5800  $as_echo_n "(cached) " >&6
5801else
5802  case $WC in
5803  [\\/]* | ?:[\\/]*)
5804  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5805  ;;
5806  *)
5807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5808for as_dir in $PATH
5809do
5810  IFS=$as_save_IFS
5811  test -z "$as_dir" && as_dir=.
5812    for ac_exec_ext in '' $ac_executable_extensions; do
5813  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5814    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5816    break 2
5817  fi
5818done
5819  done
5820IFS=$as_save_IFS
5821
5822  ;;
5823esac
5824fi
5825WC=$ac_cv_path_WC
5826if test -n "$WC"; then
5827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5828$as_echo "$WC" >&6; }
5829else
5830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5831$as_echo "no" >&6; }
5832fi
5833
5834
5835  test -n "$WC" && break
5836done
5837
5838
5839    if test "x$WC" = x; then
5840        if test "xwc" = x; then
5841          PROG_NAME=wc
5842        else
5843          PROG_NAME=wc
5844        fi
5845        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5846$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5847        as_fn_error $? "Cannot continue" "$LINENO" 5
5848    fi
5849
5850
5851
5852    for ac_prog in which
5853do
5854  # Extract the first word of "$ac_prog", so it can be a program name with args.
5855set dummy $ac_prog; ac_word=$2
5856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5857$as_echo_n "checking for $ac_word... " >&6; }
5858if ${ac_cv_path_WHICH+:} false; then :
5859  $as_echo_n "(cached) " >&6
5860else
5861  case $WHICH in
5862  [\\/]* | ?:[\\/]*)
5863  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5864  ;;
5865  *)
5866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5867for as_dir in $PATH
5868do
5869  IFS=$as_save_IFS
5870  test -z "$as_dir" && as_dir=.
5871    for ac_exec_ext in '' $ac_executable_extensions; do
5872  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5873    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5875    break 2
5876  fi
5877done
5878  done
5879IFS=$as_save_IFS
5880
5881  ;;
5882esac
5883fi
5884WHICH=$ac_cv_path_WHICH
5885if test -n "$WHICH"; then
5886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5887$as_echo "$WHICH" >&6; }
5888else
5889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5890$as_echo "no" >&6; }
5891fi
5892
5893
5894  test -n "$WHICH" && break
5895done
5896
5897
5898    if test "x$WHICH" = x; then
5899        if test "xwhich" = x; then
5900          PROG_NAME=which
5901        else
5902          PROG_NAME=which
5903        fi
5904        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5905$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5906        as_fn_error $? "Cannot continue" "$LINENO" 5
5907    fi
5908
5909
5910
5911    for ac_prog in xargs
5912do
5913  # Extract the first word of "$ac_prog", so it can be a program name with args.
5914set dummy $ac_prog; ac_word=$2
5915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5916$as_echo_n "checking for $ac_word... " >&6; }
5917if ${ac_cv_path_XARGS+:} false; then :
5918  $as_echo_n "(cached) " >&6
5919else
5920  case $XARGS in
5921  [\\/]* | ?:[\\/]*)
5922  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5923  ;;
5924  *)
5925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5926for as_dir in $PATH
5927do
5928  IFS=$as_save_IFS
5929  test -z "$as_dir" && as_dir=.
5930    for ac_exec_ext in '' $ac_executable_extensions; do
5931  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5932    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5934    break 2
5935  fi
5936done
5937  done
5938IFS=$as_save_IFS
5939
5940  ;;
5941esac
5942fi
5943XARGS=$ac_cv_path_XARGS
5944if test -n "$XARGS"; then
5945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5946$as_echo "$XARGS" >&6; }
5947else
5948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5949$as_echo "no" >&6; }
5950fi
5951
5952
5953  test -n "$XARGS" && break
5954done
5955
5956
5957    if test "x$XARGS" = x; then
5958        if test "xxargs" = x; then
5959          PROG_NAME=xargs
5960        else
5961          PROG_NAME=xargs
5962        fi
5963        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5964$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5965        as_fn_error $? "Cannot continue" "$LINENO" 5
5966    fi
5967
5968
5969
5970# Then required tools that require some special treatment.
5971for ac_prog in gawk mawk nawk awk
5972do
5973  # Extract the first word of "$ac_prog", so it can be a program name with args.
5974set dummy $ac_prog; ac_word=$2
5975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5976$as_echo_n "checking for $ac_word... " >&6; }
5977if ${ac_cv_prog_AWK+:} false; then :
5978  $as_echo_n "(cached) " >&6
5979else
5980  if test -n "$AWK"; then
5981  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5982else
5983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984for as_dir in $PATH
5985do
5986  IFS=$as_save_IFS
5987  test -z "$as_dir" && as_dir=.
5988    for ac_exec_ext in '' $ac_executable_extensions; do
5989  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5990    ac_cv_prog_AWK="$ac_prog"
5991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5992    break 2
5993  fi
5994done
5995  done
5996IFS=$as_save_IFS
5997
5998fi
5999fi
6000AWK=$ac_cv_prog_AWK
6001if test -n "$AWK"; then
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6003$as_echo "$AWK" >&6; }
6004else
6005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006$as_echo "no" >&6; }
6007fi
6008
6009
6010  test -n "$AWK" && break
6011done
6012
6013
6014    if test "x$AWK" = x; then
6015        if test "x" = x; then
6016          PROG_NAME=awk
6017        else
6018          PROG_NAME=
6019        fi
6020        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6021$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6022        as_fn_error $? "Cannot continue" "$LINENO" 5
6023    fi
6024
6025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6026$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6027if ${ac_cv_path_GREP+:} false; then :
6028  $as_echo_n "(cached) " >&6
6029else
6030  if test -z "$GREP"; then
6031  ac_path_GREP_found=false
6032  # Loop through the user's path and test for each of PROGNAME-LIST
6033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6034for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6035do
6036  IFS=$as_save_IFS
6037  test -z "$as_dir" && as_dir=.
6038    for ac_prog in grep ggrep; do
6039    for ac_exec_ext in '' $ac_executable_extensions; do
6040      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6041      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6042# Check for GNU ac_path_GREP and select it if it is found.
6043  # Check for GNU $ac_path_GREP
6044case `"$ac_path_GREP" --version 2>&1` in
6045*GNU*)
6046  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6047*)
6048  ac_count=0
6049  $as_echo_n 0123456789 >"conftest.in"
6050  while :
6051  do
6052    cat "conftest.in" "conftest.in" >"conftest.tmp"
6053    mv "conftest.tmp" "conftest.in"
6054    cp "conftest.in" "conftest.nl"
6055    $as_echo 'GREP' >> "conftest.nl"
6056    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6057    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6058    as_fn_arith $ac_count + 1 && ac_count=$as_val
6059    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6060      # Best one so far, save it but keep looking for a better one
6061      ac_cv_path_GREP="$ac_path_GREP"
6062      ac_path_GREP_max=$ac_count
6063    fi
6064    # 10*(2^10) chars as input seems more than enough
6065    test $ac_count -gt 10 && break
6066  done
6067  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6068esac
6069
6070      $ac_path_GREP_found && break 3
6071    done
6072  done
6073  done
6074IFS=$as_save_IFS
6075  if test -z "$ac_cv_path_GREP"; then
6076    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6077  fi
6078else
6079  ac_cv_path_GREP=$GREP
6080fi
6081
6082fi
6083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6084$as_echo "$ac_cv_path_GREP" >&6; }
6085 GREP="$ac_cv_path_GREP"
6086
6087
6088
6089    if test "x$GREP" = x; then
6090        if test "x" = x; then
6091          PROG_NAME=grep
6092        else
6093          PROG_NAME=
6094        fi
6095        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6096$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6097        as_fn_error $? "Cannot continue" "$LINENO" 5
6098    fi
6099
6100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6101$as_echo_n "checking for egrep... " >&6; }
6102if ${ac_cv_path_EGREP+:} false; then :
6103  $as_echo_n "(cached) " >&6
6104else
6105  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6106   then ac_cv_path_EGREP="$GREP -E"
6107   else
6108     if test -z "$EGREP"; then
6109  ac_path_EGREP_found=false
6110  # Loop through the user's path and test for each of PROGNAME-LIST
6111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6113do
6114  IFS=$as_save_IFS
6115  test -z "$as_dir" && as_dir=.
6116    for ac_prog in egrep; do
6117    for ac_exec_ext in '' $ac_executable_extensions; do
6118      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6119      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6120# Check for GNU ac_path_EGREP and select it if it is found.
6121  # Check for GNU $ac_path_EGREP
6122case `"$ac_path_EGREP" --version 2>&1` in
6123*GNU*)
6124  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6125*)
6126  ac_count=0
6127  $as_echo_n 0123456789 >"conftest.in"
6128  while :
6129  do
6130    cat "conftest.in" "conftest.in" >"conftest.tmp"
6131    mv "conftest.tmp" "conftest.in"
6132    cp "conftest.in" "conftest.nl"
6133    $as_echo 'EGREP' >> "conftest.nl"
6134    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6135    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6136    as_fn_arith $ac_count + 1 && ac_count=$as_val
6137    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6138      # Best one so far, save it but keep looking for a better one
6139      ac_cv_path_EGREP="$ac_path_EGREP"
6140      ac_path_EGREP_max=$ac_count
6141    fi
6142    # 10*(2^10) chars as input seems more than enough
6143    test $ac_count -gt 10 && break
6144  done
6145  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6146esac
6147
6148      $ac_path_EGREP_found && break 3
6149    done
6150  done
6151  done
6152IFS=$as_save_IFS
6153  if test -z "$ac_cv_path_EGREP"; then
6154    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6155  fi
6156else
6157  ac_cv_path_EGREP=$EGREP
6158fi
6159
6160   fi
6161fi
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6163$as_echo "$ac_cv_path_EGREP" >&6; }
6164 EGREP="$ac_cv_path_EGREP"
6165
6166
6167
6168    if test "x$EGREP" = x; then
6169        if test "x" = x; then
6170          PROG_NAME=egrep
6171        else
6172          PROG_NAME=
6173        fi
6174        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6175$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6176        as_fn_error $? "Cannot continue" "$LINENO" 5
6177    fi
6178
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6180$as_echo_n "checking for fgrep... " >&6; }
6181if ${ac_cv_path_FGREP+:} false; then :
6182  $as_echo_n "(cached) " >&6
6183else
6184  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6185   then ac_cv_path_FGREP="$GREP -F"
6186   else
6187     if test -z "$FGREP"; then
6188  ac_path_FGREP_found=false
6189  # Loop through the user's path and test for each of PROGNAME-LIST
6190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6191for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6192do
6193  IFS=$as_save_IFS
6194  test -z "$as_dir" && as_dir=.
6195    for ac_prog in fgrep; do
6196    for ac_exec_ext in '' $ac_executable_extensions; do
6197      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6198      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6199# Check for GNU ac_path_FGREP and select it if it is found.
6200  # Check for GNU $ac_path_FGREP
6201case `"$ac_path_FGREP" --version 2>&1` in
6202*GNU*)
6203  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6204*)
6205  ac_count=0
6206  $as_echo_n 0123456789 >"conftest.in"
6207  while :
6208  do
6209    cat "conftest.in" "conftest.in" >"conftest.tmp"
6210    mv "conftest.tmp" "conftest.in"
6211    cp "conftest.in" "conftest.nl"
6212    $as_echo 'FGREP' >> "conftest.nl"
6213    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6214    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6215    as_fn_arith $ac_count + 1 && ac_count=$as_val
6216    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6217      # Best one so far, save it but keep looking for a better one
6218      ac_cv_path_FGREP="$ac_path_FGREP"
6219      ac_path_FGREP_max=$ac_count
6220    fi
6221    # 10*(2^10) chars as input seems more than enough
6222    test $ac_count -gt 10 && break
6223  done
6224  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6225esac
6226
6227      $ac_path_FGREP_found && break 3
6228    done
6229  done
6230  done
6231IFS=$as_save_IFS
6232  if test -z "$ac_cv_path_FGREP"; then
6233    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6234  fi
6235else
6236  ac_cv_path_FGREP=$FGREP
6237fi
6238
6239   fi
6240fi
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6242$as_echo "$ac_cv_path_FGREP" >&6; }
6243 FGREP="$ac_cv_path_FGREP"
6244
6245
6246
6247    if test "x$FGREP" = x; then
6248        if test "x" = x; then
6249          PROG_NAME=fgrep
6250        else
6251          PROG_NAME=
6252        fi
6253        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6254$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6255        as_fn_error $? "Cannot continue" "$LINENO" 5
6256    fi
6257
6258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6259$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6260if ${ac_cv_path_SED+:} false; then :
6261  $as_echo_n "(cached) " >&6
6262else
6263            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6264     for ac_i in 1 2 3 4 5 6 7; do
6265       ac_script="$ac_script$as_nl$ac_script"
6266     done
6267     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6268     { ac_script=; unset ac_script;}
6269     if test -z "$SED"; then
6270  ac_path_SED_found=false
6271  # Loop through the user's path and test for each of PROGNAME-LIST
6272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6273for as_dir in $PATH
6274do
6275  IFS=$as_save_IFS
6276  test -z "$as_dir" && as_dir=.
6277    for ac_prog in sed gsed; do
6278    for ac_exec_ext in '' $ac_executable_extensions; do
6279      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6280      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6281# Check for GNU ac_path_SED and select it if it is found.
6282  # Check for GNU $ac_path_SED
6283case `"$ac_path_SED" --version 2>&1` in
6284*GNU*)
6285  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6286*)
6287  ac_count=0
6288  $as_echo_n 0123456789 >"conftest.in"
6289  while :
6290  do
6291    cat "conftest.in" "conftest.in" >"conftest.tmp"
6292    mv "conftest.tmp" "conftest.in"
6293    cp "conftest.in" "conftest.nl"
6294    $as_echo '' >> "conftest.nl"
6295    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6296    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6297    as_fn_arith $ac_count + 1 && ac_count=$as_val
6298    if test $ac_count -gt ${ac_path_SED_max-0}; then
6299      # Best one so far, save it but keep looking for a better one
6300      ac_cv_path_SED="$ac_path_SED"
6301      ac_path_SED_max=$ac_count
6302    fi
6303    # 10*(2^10) chars as input seems more than enough
6304    test $ac_count -gt 10 && break
6305  done
6306  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6307esac
6308
6309      $ac_path_SED_found && break 3
6310    done
6311  done
6312  done
6313IFS=$as_save_IFS
6314  if test -z "$ac_cv_path_SED"; then
6315    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6316  fi
6317else
6318  ac_cv_path_SED=$SED
6319fi
6320
6321fi
6322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6323$as_echo "$ac_cv_path_SED" >&6; }
6324 SED="$ac_cv_path_SED"
6325  rm -f conftest.sed
6326
6327
6328    if test "x$SED" = x; then
6329        if test "x" = x; then
6330          PROG_NAME=sed
6331        else
6332          PROG_NAME=
6333        fi
6334        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6335$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6336        as_fn_error $? "Cannot continue" "$LINENO" 5
6337    fi
6338
6339
6340for ac_prog in nawk gawk awk
6341do
6342  # Extract the first word of "$ac_prog", so it can be a program name with args.
6343set dummy $ac_prog; ac_word=$2
6344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6345$as_echo_n "checking for $ac_word... " >&6; }
6346if ${ac_cv_path_NAWK+:} false; then :
6347  $as_echo_n "(cached) " >&6
6348else
6349  case $NAWK in
6350  [\\/]* | ?:[\\/]*)
6351  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6352  ;;
6353  *)
6354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6355for as_dir in $PATH
6356do
6357  IFS=$as_save_IFS
6358  test -z "$as_dir" && as_dir=.
6359    for ac_exec_ext in '' $ac_executable_extensions; do
6360  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6361    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6363    break 2
6364  fi
6365done
6366  done
6367IFS=$as_save_IFS
6368
6369  ;;
6370esac
6371fi
6372NAWK=$ac_cv_path_NAWK
6373if test -n "$NAWK"; then
6374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6375$as_echo "$NAWK" >&6; }
6376else
6377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378$as_echo "no" >&6; }
6379fi
6380
6381
6382  test -n "$NAWK" && break
6383done
6384
6385
6386    if test "x$NAWK" = x; then
6387        if test "x" = x; then
6388          PROG_NAME=nawk
6389        else
6390          PROG_NAME=
6391        fi
6392        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6393$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6394        as_fn_error $? "Cannot continue" "$LINENO" 5
6395    fi
6396
6397
6398# Always force rm.
6399RM="$RM -f"
6400
6401# These are not required on all platforms
6402# Extract the first word of "cygpath", so it can be a program name with args.
6403set dummy cygpath; ac_word=$2
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6405$as_echo_n "checking for $ac_word... " >&6; }
6406if ${ac_cv_path_CYGPATH+:} false; then :
6407  $as_echo_n "(cached) " >&6
6408else
6409  case $CYGPATH in
6410  [\\/]* | ?:[\\/]*)
6411  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6412  ;;
6413  *)
6414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6415for as_dir in $PATH
6416do
6417  IFS=$as_save_IFS
6418  test -z "$as_dir" && as_dir=.
6419    for ac_exec_ext in '' $ac_executable_extensions; do
6420  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6421    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6423    break 2
6424  fi
6425done
6426  done
6427IFS=$as_save_IFS
6428
6429  ;;
6430esac
6431fi
6432CYGPATH=$ac_cv_path_CYGPATH
6433if test -n "$CYGPATH"; then
6434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6435$as_echo "$CYGPATH" >&6; }
6436else
6437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6438$as_echo "no" >&6; }
6439fi
6440
6441
6442# Extract the first word of "readlink", so it can be a program name with args.
6443set dummy readlink; ac_word=$2
6444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6445$as_echo_n "checking for $ac_word... " >&6; }
6446if ${ac_cv_path_READLINK+:} false; then :
6447  $as_echo_n "(cached) " >&6
6448else
6449  case $READLINK in
6450  [\\/]* | ?:[\\/]*)
6451  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6452  ;;
6453  *)
6454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6455for as_dir in $PATH
6456do
6457  IFS=$as_save_IFS
6458  test -z "$as_dir" && as_dir=.
6459    for ac_exec_ext in '' $ac_executable_extensions; do
6460  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6461    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6463    break 2
6464  fi
6465done
6466  done
6467IFS=$as_save_IFS
6468
6469  ;;
6470esac
6471fi
6472READLINK=$ac_cv_path_READLINK
6473if test -n "$READLINK"; then
6474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6475$as_echo "$READLINK" >&6; }
6476else
6477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6478$as_echo "no" >&6; }
6479fi
6480
6481
6482# Extract the first word of "df", so it can be a program name with args.
6483set dummy df; ac_word=$2
6484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6485$as_echo_n "checking for $ac_word... " >&6; }
6486if ${ac_cv_path_DF+:} false; then :
6487  $as_echo_n "(cached) " >&6
6488else
6489  case $DF in
6490  [\\/]* | ?:[\\/]*)
6491  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6492  ;;
6493  *)
6494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6495for as_dir in $PATH
6496do
6497  IFS=$as_save_IFS
6498  test -z "$as_dir" && as_dir=.
6499    for ac_exec_ext in '' $ac_executable_extensions; do
6500  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6501    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6503    break 2
6504  fi
6505done
6506  done
6507IFS=$as_save_IFS
6508
6509  ;;
6510esac
6511fi
6512DF=$ac_cv_path_DF
6513if test -n "$DF"; then
6514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6515$as_echo "$DF" >&6; }
6516else
6517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6518$as_echo "no" >&6; }
6519fi
6520
6521
6522# Extract the first word of "SetFile", so it can be a program name with args.
6523set dummy SetFile; ac_word=$2
6524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6525$as_echo_n "checking for $ac_word... " >&6; }
6526if ${ac_cv_path_SETFILE+:} false; then :
6527  $as_echo_n "(cached) " >&6
6528else
6529  case $SETFILE in
6530  [\\/]* | ?:[\\/]*)
6531  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6532  ;;
6533  *)
6534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6535for as_dir in $PATH
6536do
6537  IFS=$as_save_IFS
6538  test -z "$as_dir" && as_dir=.
6539    for ac_exec_ext in '' $ac_executable_extensions; do
6540  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6541    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6543    break 2
6544  fi
6545done
6546  done
6547IFS=$as_save_IFS
6548
6549  ;;
6550esac
6551fi
6552SETFILE=$ac_cv_path_SETFILE
6553if test -n "$SETFILE"; then
6554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6555$as_echo "$SETFILE" >&6; }
6556else
6557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6558$as_echo "no" >&6; }
6559fi
6560
6561
6562
6563
6564# Now we can determine OpenJDK build and target platforms. This is required to
6565# have early on.
6566# Make sure we can run config.sub.
6567$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6568  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6569
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6571$as_echo_n "checking build system type... " >&6; }
6572if ${ac_cv_build+:} false; then :
6573  $as_echo_n "(cached) " >&6
6574else
6575  ac_build_alias=$build_alias
6576test "x$ac_build_alias" = x &&
6577  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6578test "x$ac_build_alias" = x &&
6579  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6580ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6581  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6582
6583fi
6584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6585$as_echo "$ac_cv_build" >&6; }
6586case $ac_cv_build in
6587*-*-*) ;;
6588*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6589esac
6590build=$ac_cv_build
6591ac_save_IFS=$IFS; IFS='-'
6592set x $ac_cv_build
6593shift
6594build_cpu=$1
6595build_vendor=$2
6596shift; shift
6597# Remember, the first character of IFS is used to create $*,
6598# except with old shells:
6599build_os=$*
6600IFS=$ac_save_IFS
6601case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6602
6603
6604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6605$as_echo_n "checking host system type... " >&6; }
6606if ${ac_cv_host+:} false; then :
6607  $as_echo_n "(cached) " >&6
6608else
6609  if test "x$host_alias" = x; then
6610  ac_cv_host=$ac_cv_build
6611else
6612  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6613    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6614fi
6615
6616fi
6617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6618$as_echo "$ac_cv_host" >&6; }
6619case $ac_cv_host in
6620*-*-*) ;;
6621*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6622esac
6623host=$ac_cv_host
6624ac_save_IFS=$IFS; IFS='-'
6625set x $ac_cv_host
6626shift
6627host_cpu=$1
6628host_vendor=$2
6629shift; shift
6630# Remember, the first character of IFS is used to create $*,
6631# except with old shells:
6632host_os=$*
6633IFS=$ac_save_IFS
6634case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6635
6636
6637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6638$as_echo_n "checking target system type... " >&6; }
6639if ${ac_cv_target+:} false; then :
6640  $as_echo_n "(cached) " >&6
6641else
6642  if test "x$target_alias" = x; then
6643  ac_cv_target=$ac_cv_host
6644else
6645  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6646    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6647fi
6648
6649fi
6650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6651$as_echo "$ac_cv_target" >&6; }
6652case $ac_cv_target in
6653*-*-*) ;;
6654*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6655esac
6656target=$ac_cv_target
6657ac_save_IFS=$IFS; IFS='-'
6658set x $ac_cv_target
6659shift
6660target_cpu=$1
6661target_vendor=$2
6662shift; shift
6663# Remember, the first character of IFS is used to create $*,
6664# except with old shells:
6665target_os=$*
6666IFS=$ac_save_IFS
6667case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6668
6669
6670# The aliases save the names the user supplied, while $host etc.
6671# will get canonicalized.
6672test -n "$target_alias" &&
6673  test "$program_prefix$program_suffix$program_transform_name" = \
6674    NONENONEs,x,x, &&
6675  program_prefix=${target_alias}-
6676
6677# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6678# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6679# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6680# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6681# to use the configure naming style.
6682
6683
6684
6685
6686
6687    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6688    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6689    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6690    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6691    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6692    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6693
6694
6695
6696    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6697
6698  case "$build_os" in
6699    *linux*)
6700      VAR_OS=linux
6701      VAR_OS_API=posix
6702      VAR_OS_ENV=linux
6703      ;;
6704    *solaris*)
6705      VAR_OS=solaris
6706      VAR_OS_API=posix
6707      VAR_OS_ENV=solaris
6708      ;;
6709    *darwin*)
6710      VAR_OS=macosx
6711      VAR_OS_API=posix
6712      VAR_OS_ENV=macosx
6713      ;;
6714    *bsd*)
6715      VAR_OS=bsd
6716      VAR_OS_API=posix
6717      VAR_OS_ENV=bsd
6718      ;;
6719    *cygwin*)
6720      VAR_OS=windows
6721      VAR_OS_API=winapi
6722      VAR_OS_ENV=windows.cygwin
6723      ;;
6724    *mingw*)
6725      VAR_OS=windows
6726      VAR_OS_API=winapi
6727      VAR_OS_ENV=windows.msys
6728      ;;
6729    *)
6730      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6731      ;;
6732  esac
6733
6734
6735  # First argument is the cpu name from the trip/quad
6736  case "$build_cpu" in
6737    x86_64)
6738      VAR_CPU=x86_64
6739      VAR_CPU_ARCH=x86
6740      VAR_CPU_BITS=64
6741      VAR_CPU_ENDIAN=little
6742      ;;
6743    i?86)
6744      VAR_CPU=x86
6745      VAR_CPU_ARCH=x86
6746      VAR_CPU_BITS=32
6747      VAR_CPU_ENDIAN=little
6748      ;;
6749    arm*)
6750      VAR_CPU=arm
6751      VAR_CPU_ARCH=arm
6752      VAR_CPU_BITS=32
6753      VAR_CPU_ENDIAN=little
6754      ;;
6755    powerpc)
6756      VAR_CPU=ppc
6757      VAR_CPU_ARCH=ppc
6758      VAR_CPU_BITS=32
6759      VAR_CPU_ENDIAN=big
6760       ;;
6761    powerpc64)
6762      VAR_CPU=ppc64
6763      VAR_CPU_ARCH=ppc
6764      VAR_CPU_BITS=64
6765      VAR_CPU_ENDIAN=big
6766       ;;
6767    sparc)
6768      VAR_CPU=sparc
6769      VAR_CPU_ARCH=sparc
6770      VAR_CPU_BITS=32
6771      VAR_CPU_ENDIAN=big
6772       ;;
6773    sparcv9)
6774      VAR_CPU=sparcv9
6775      VAR_CPU_ARCH=sparc
6776      VAR_CPU_BITS=64
6777      VAR_CPU_ENDIAN=big
6778       ;;
6779    *)
6780      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6781      ;;
6782  esac
6783
6784    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6785    OPENJDK_BUILD_OS="$VAR_OS"
6786    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6787    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6788    OPENJDK_BUILD_CPU="$VAR_CPU"
6789    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6790    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6791    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6792
6793
6794
6795
6796
6797
6798
6799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6800$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6802$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6803
6804    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6805
6806  case "$host_os" in
6807    *linux*)
6808      VAR_OS=linux
6809      VAR_OS_API=posix
6810      VAR_OS_ENV=linux
6811      ;;
6812    *solaris*)
6813      VAR_OS=solaris
6814      VAR_OS_API=posix
6815      VAR_OS_ENV=solaris
6816      ;;
6817    *darwin*)
6818      VAR_OS=macosx
6819      VAR_OS_API=posix
6820      VAR_OS_ENV=macosx
6821      ;;
6822    *bsd*)
6823      VAR_OS=bsd
6824      VAR_OS_API=posix
6825      VAR_OS_ENV=bsd
6826      ;;
6827    *cygwin*)
6828      VAR_OS=windows
6829      VAR_OS_API=winapi
6830      VAR_OS_ENV=windows.cygwin
6831      ;;
6832    *mingw*)
6833      VAR_OS=windows
6834      VAR_OS_API=winapi
6835      VAR_OS_ENV=windows.msys
6836      ;;
6837    *)
6838      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6839      ;;
6840  esac
6841
6842
6843  # First argument is the cpu name from the trip/quad
6844  case "$host_cpu" in
6845    x86_64)
6846      VAR_CPU=x86_64
6847      VAR_CPU_ARCH=x86
6848      VAR_CPU_BITS=64
6849      VAR_CPU_ENDIAN=little
6850      ;;
6851    i?86)
6852      VAR_CPU=x86
6853      VAR_CPU_ARCH=x86
6854      VAR_CPU_BITS=32
6855      VAR_CPU_ENDIAN=little
6856      ;;
6857    arm*)
6858      VAR_CPU=arm
6859      VAR_CPU_ARCH=arm
6860      VAR_CPU_BITS=32
6861      VAR_CPU_ENDIAN=little
6862      ;;
6863    powerpc)
6864      VAR_CPU=ppc
6865      VAR_CPU_ARCH=ppc
6866      VAR_CPU_BITS=32
6867      VAR_CPU_ENDIAN=big
6868       ;;
6869    powerpc64)
6870      VAR_CPU=ppc64
6871      VAR_CPU_ARCH=ppc
6872      VAR_CPU_BITS=64
6873      VAR_CPU_ENDIAN=big
6874       ;;
6875    sparc)
6876      VAR_CPU=sparc
6877      VAR_CPU_ARCH=sparc
6878      VAR_CPU_BITS=32
6879      VAR_CPU_ENDIAN=big
6880       ;;
6881    sparcv9)
6882      VAR_CPU=sparcv9
6883      VAR_CPU_ARCH=sparc
6884      VAR_CPU_BITS=64
6885      VAR_CPU_ENDIAN=big
6886       ;;
6887    *)
6888      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6889      ;;
6890  esac
6891
6892    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6893    OPENJDK_TARGET_OS="$VAR_OS"
6894    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6895    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6896    OPENJDK_TARGET_CPU="$VAR_CPU"
6897    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6898    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6899    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6900
6901
6902
6903
6904
6905
6906
6907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6908$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6910$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6911
6912
6913
6914# Check whether --with-target-bits was given.
6915if test "${with_target_bits+set}" = set; then :
6916  withval=$with_target_bits;
6917fi
6918
6919
6920  # We have three types of compiles:
6921  # native  == normal compilation, target system == build system
6922  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6923  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6924  #
6925  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6926    # We're doing a proper cross-compilation
6927    COMPILE_TYPE="cross"
6928  else
6929    COMPILE_TYPE="native"
6930  fi
6931
6932  if test "x$with_target_bits" != x; then
6933    if test "x$COMPILE_TYPE" = "xcross"; then
6934      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6935    fi
6936
6937    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6938      # A reduced build is requested
6939      COMPILE_TYPE="reduced"
6940      OPENJDK_TARGET_CPU_BITS=32
6941      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6942        OPENJDK_TARGET_CPU=x86
6943      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6944        OPENJDK_TARGET_CPU=sparc
6945      else
6946        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6947      fi
6948    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6949      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
6950    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6951      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6952$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6953    else
6954      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6955    fi
6956  fi
6957
6958
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6960$as_echo_n "checking compilation type... " >&6; }
6961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6962$as_echo "$COMPILE_TYPE" >&6; }
6963
6964
6965    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6966       REQUIRED_OS_NAME=SunOS
6967       REQUIRED_OS_VERSION=5.10
6968    fi
6969    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6970       REQUIRED_OS_NAME=Linux
6971       REQUIRED_OS_VERSION=2.6
6972    fi
6973    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6974        REQUIRED_OS_NAME=Windows
6975        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6976            REQUIRED_OS_VERSION=5.2
6977        else
6978            REQUIRED_OS_VERSION=5.1
6979        fi
6980    fi
6981    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6982        REQUIRED_OS_NAME=Darwin
6983        REQUIRED_OS_VERSION=11.2
6984    fi
6985
6986
6987
6988
6989
6990    # Also store the legacy naming of the cpu.
6991    # Ie i586 and amd64 instead of x86 and x86_64
6992    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6993    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6994      OPENJDK_TARGET_CPU_LEGACY="i586"
6995    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6996      # On all platforms except MacOSX replace x86_64 with amd64.
6997      OPENJDK_TARGET_CPU_LEGACY="amd64"
6998    fi
6999
7000
7001    # And the second legacy naming of the cpu.
7002    # Ie i386 and amd64 instead of x86 and x86_64.
7003    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7004    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7005      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7006    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7007      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7008    fi
7009
7010
7011    # This is the name of the cpu (but using i386 and amd64 instead of
7012    # x86 and x86_64, respectively), preceeded by a /, to be used when
7013    # locating libraries. On macosx, it's empty, though.
7014    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7015    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7016        OPENJDK_TARGET_CPU_LIBDIR=""
7017    fi
7018
7019
7020    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7021    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7022    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7023    OPENJDK_TARGET_CPU_ISADIR=""
7024    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7025      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7026          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7027      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7028          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7029      fi
7030    fi
7031
7032
7033    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7034    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7035    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7036      # On linux only, we replace x86 with i386.
7037      OPENJDK_TARGET_CPU_OSARCH="i386"
7038    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7039      # On all platforms except macosx, we replace x86_64 with amd64.
7040      OPENJDK_TARGET_CPU_OSARCH="amd64"
7041    fi
7042
7043
7044    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7045    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7046      OPENJDK_TARGET_CPU_JLI="i386"
7047    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7048      # On all platforms except macosx, we replace x86_64 with amd64.
7049      OPENJDK_TARGET_CPU_JLI="amd64"
7050    fi
7051    # Now setup the -D flags for building libjli.
7052    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7053    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7054      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7055        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7056      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7057        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7058      fi
7059    fi
7060
7061
7062    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7063    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7064        OPENJDK_TARGET_OS_API_DIR="solaris"
7065    fi
7066    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7067        OPENJDK_TARGET_OS_API_DIR="windows"
7068    fi
7069
7070
7071    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7072        A_LP64="LP64:="
7073        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7074        # unpack200.exe
7075        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7076            ADD_LP64="-D_LP64=1"
7077        fi
7078    fi
7079    LP64=$A_LP64
7080
7081
7082    if test "x$COMPILE_TYPE" = "xcross"; then
7083      # FIXME: ... or should this include reduced builds..?
7084      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7085    else
7086      DEFINE_CROSS_COMPILE_ARCH=""
7087    fi
7088
7089
7090
7091
7092# Continue setting up basic stuff. Most remaining code require fundamental tools.
7093
7094# Locate the directory of this script.
7095SCRIPT="$0"
7096
7097    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7098        # Follow a chain of symbolic links. Use readlink
7099        # where it exists, else fall back to horribly
7100        # complicated shell code.
7101        if test "x$READLINK_TESTED" != yes; then
7102            # On MacOSX there is a readlink tool with a different
7103            # purpose than the GNU readlink tool. Check the found readlink.
7104            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7105            if test "x$ISGNU" = x; then
7106                 # A readlink that we do not know how to use.
7107                 # Are there other non-GNU readlinks out there?
7108                 READLINK_TESTED=yes
7109                 READLINK=
7110            fi
7111        fi
7112
7113        if test "x$READLINK" != x; then
7114            SCRIPT=`$READLINK -f $SCRIPT`
7115        else
7116            # Save the current directory for restoring afterwards
7117            STARTDIR=$PWD
7118            COUNTER=0
7119            sym_link_dir=`$DIRNAME $SCRIPT`
7120            sym_link_file=`$BASENAME $SCRIPT`
7121            # Use the system pwd and not the shell builtin to resolve directory symlinks
7122            cd $sym_link_dir
7123            cd `$THEPWDCMD`
7124            sym_link_dir=`$THEPWDCMD`
7125            # Resolve file symlinks
7126            while test $COUNTER -lt 20; do
7127                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7128                if test "x$ISLINK" == x; then
7129                    # This is not a symbolic link! We are done!
7130                    break
7131                fi
7132                # Again resolve directory symlinks since the target of the just found
7133                # link could be in a different directory
7134                cd `$DIRNAME $ISLINK`
7135                sym_link_dir=`$THEPWDCMD`
7136                sym_link_file=`$BASENAME $ISLINK`
7137                let COUNTER=COUNTER+1
7138            done
7139            cd $STARTDIR
7140            SCRIPT=$sym_link_dir/$sym_link_file
7141        fi
7142    fi
7143
7144AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7145
7146# Where is the source? It is located two levels above the configure script.
7147CURDIR="$PWD"
7148cd "$AUTOCONF_DIR/../.."
7149SRC_ROOT="`$THEPWDCMD`"
7150
7151if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7152  PATH_SEP=";"
7153
7154  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7155  if test $SRC_ROOT_LENGTH -gt 100; then
7156      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7157  fi
7158
7159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7161$as_echo_n "checking cygwin release... " >&6; }
7162    CYGWIN_VERSION=`$UNAME -r`
7163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7164$as_echo "$CYGWIN_VERSION" >&6; }
7165    WINDOWS_ENV_VENDOR='cygwin'
7166    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7167
7168    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7169    if test "x$CYGWIN_VERSION_OK" = x; then
7170      { $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
7171$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;}
7172      as_fn_error $? "Cannot continue" "$LINENO" 5
7173    fi
7174    if test "x$CYGPATH" = x; then
7175        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7176    fi
7177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7178$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7179    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7180    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7181    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7182    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7184$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7185    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7186    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7187    if test "x$test_cygdrive_prefix" = x; then
7188        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7189    fi
7190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7192$as_echo_n "checking msys release... " >&6; }
7193    MSYS_VERSION=`$UNAME -r`
7194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7195$as_echo "$MSYS_VERSION" >&6; }
7196
7197    WINDOWS_ENV_VENDOR='msys'
7198    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7199
7200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7201$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7202    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7203    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7204
7205  windows_path="$MSYS_ROOT_PATH"
7206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7207    unix_path=`$CYGPATH -u "$windows_path"`
7208    MSYS_ROOT_PATH="$unix_path"
7209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7211    MSYS_ROOT_PATH="$unix_path"
7212  fi
7213
7214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7215$as_echo "$MSYS_ROOT_PATH" >&6; }
7216    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7217  else
7218    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7219  fi
7220
7221  # Test if windows or unix (cygwin/msys) find is first in path.
7222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7223$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7224  FIND_BINARY_OUTPUT=`find --version 2>&1`
7225  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7227$as_echo "unix style" >&6; }
7228  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7230$as_echo "Windows" >&6; }
7231    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7232$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7233    { $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
7234$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7235    as_fn_error $? "Cannot continue" "$LINENO" 5
7236  else
7237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7238$as_echo "unknown" >&6; }
7239    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7240$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7241  fi
7242
7243else
7244  PATH_SEP=":"
7245fi
7246
7247
7248
7249cd "$CURDIR"
7250
7251
7252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7253
7254  # Input might be given as Windows format, start by converting to
7255  # unix format.
7256  path="$SRC_ROOT"
7257  new_path=`$CYGPATH -u "$path"`
7258
7259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7262  # "foo.exe" is OK but "foo" is an error.
7263  #
7264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7265  # It is also a way to make sure we got the proper file name for the real test later on.
7266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7267  if test "x$test_shortpath" = x; then
7268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7269$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7270    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7271  fi
7272
7273  # Call helper function which possibly converts this using DOS-style short mode.
7274  # If so, the updated path is stored in $new_path.
7275
7276  input_path="$new_path"
7277  # Check if we need to convert this using DOS-style short mode. If the path
7278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7279  # take no chances and rewrite it.
7280  # Note: m4 eats our [], so we need to use [ and ] instead.
7281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7282  if test "x$has_forbidden_chars" != x; then
7283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7287      # Going to short mode and back again did indeed matter. Since short mode is
7288      # case insensitive, let's make it lowercase to improve readability.
7289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7290      # Now convert it back to Unix-stile (cygpath)
7291      input_path=`$CYGPATH -u "$shortmode_path"`
7292      new_path="$input_path"
7293    fi
7294  fi
7295
7296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7297  if test "x$test_cygdrive_prefix" = x; then
7298    # As a simple fix, exclude /usr/bin since it's not a real path.
7299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7301      # a path prefixed by /cygdrive for fixpath to work.
7302      new_path="$CYGWIN_ROOT_PATH$input_path"
7303    fi
7304  fi
7305
7306
7307  if test "x$path" != "x$new_path"; then
7308    SRC_ROOT="$new_path"
7309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7310$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7311  fi
7312
7313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7314
7315  path="$SRC_ROOT"
7316  has_colon=`$ECHO $path | $GREP ^.:`
7317  new_path="$path"
7318  if test "x$has_colon" = x; then
7319    # Not in mixed or Windows style, start by that.
7320    new_path=`cmd //c echo $path`
7321  fi
7322
7323
7324  input_path="$new_path"
7325  # Check if we need to convert this using DOS-style short mode. If the path
7326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7327  # take no chances and rewrite it.
7328  # Note: m4 eats our [], so we need to use [ and ] instead.
7329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7330  if test "x$has_forbidden_chars" != x; then
7331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7333  fi
7334
7335
7336  windows_path="$new_path"
7337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7338    unix_path=`$CYGPATH -u "$windows_path"`
7339    new_path="$unix_path"
7340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7342    new_path="$unix_path"
7343  fi
7344
7345  if test "x$path" != "x$new_path"; then
7346    SRC_ROOT="$new_path"
7347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7348$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7349  fi
7350
7351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7353
7354  else
7355    # We're on a posix platform. Hooray! :)
7356    path="$SRC_ROOT"
7357
7358    if test ! -f "$path" && test ! -d "$path"; then
7359      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7360    fi
7361
7362    has_space=`$ECHO "$path" | $GREP " "`
7363    if test "x$has_space" != x; then
7364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7365$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7366      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7367    fi
7368  fi
7369
7370
7371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7372
7373  # Input might be given as Windows format, start by converting to
7374  # unix format.
7375  path="$CURDIR"
7376  new_path=`$CYGPATH -u "$path"`
7377
7378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7381  # "foo.exe" is OK but "foo" is an error.
7382  #
7383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7384  # It is also a way to make sure we got the proper file name for the real test later on.
7385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7386  if test "x$test_shortpath" = x; then
7387    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7388$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7389    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7390  fi
7391
7392  # Call helper function which possibly converts this using DOS-style short mode.
7393  # If so, the updated path is stored in $new_path.
7394
7395  input_path="$new_path"
7396  # Check if we need to convert this using DOS-style short mode. If the path
7397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7398  # take no chances and rewrite it.
7399  # Note: m4 eats our [], so we need to use [ and ] instead.
7400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7401  if test "x$has_forbidden_chars" != x; then
7402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7406      # Going to short mode and back again did indeed matter. Since short mode is
7407      # case insensitive, let's make it lowercase to improve readability.
7408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7409      # Now convert it back to Unix-stile (cygpath)
7410      input_path=`$CYGPATH -u "$shortmode_path"`
7411      new_path="$input_path"
7412    fi
7413  fi
7414
7415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7416  if test "x$test_cygdrive_prefix" = x; then
7417    # As a simple fix, exclude /usr/bin since it's not a real path.
7418    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7420      # a path prefixed by /cygdrive for fixpath to work.
7421      new_path="$CYGWIN_ROOT_PATH$input_path"
7422    fi
7423  fi
7424
7425
7426  if test "x$path" != "x$new_path"; then
7427    CURDIR="$new_path"
7428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7429$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7430  fi
7431
7432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7433
7434  path="$CURDIR"
7435  has_colon=`$ECHO $path | $GREP ^.:`
7436  new_path="$path"
7437  if test "x$has_colon" = x; then
7438    # Not in mixed or Windows style, start by that.
7439    new_path=`cmd //c echo $path`
7440  fi
7441
7442
7443  input_path="$new_path"
7444  # Check if we need to convert this using DOS-style short mode. If the path
7445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7446  # take no chances and rewrite it.
7447  # Note: m4 eats our [], so we need to use [ and ] instead.
7448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7449  if test "x$has_forbidden_chars" != x; then
7450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7452  fi
7453
7454
7455  windows_path="$new_path"
7456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7457    unix_path=`$CYGPATH -u "$windows_path"`
7458    new_path="$unix_path"
7459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7461    new_path="$unix_path"
7462  fi
7463
7464  if test "x$path" != "x$new_path"; then
7465    CURDIR="$new_path"
7466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7467$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7468  fi
7469
7470  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7471  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7472
7473  else
7474    # We're on a posix platform. Hooray! :)
7475    path="$CURDIR"
7476
7477    if test ! -f "$path" && test ! -d "$path"; then
7478      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7479    fi
7480
7481    has_space=`$ECHO "$path" | $GREP " "`
7482    if test "x$has_space" != x; then
7483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7484$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7485      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7486    fi
7487  fi
7488
7489
7490if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7491    # Add extra search paths on solaris for utilities like ar and as etc...
7492    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7493fi
7494
7495# You can force the sys-root if the sys-root encoded into the cross compiler tools
7496# is not correct.
7497
7498# Check whether --with-sys-root was given.
7499if test "${with_sys_root+set}" = set; then :
7500  withval=$with_sys_root;
7501fi
7502
7503
7504if test "x$with_sys_root" != x; then
7505  SYS_ROOT=$with_sys_root
7506else
7507  SYS_ROOT=/
7508fi
7509
7510
7511
7512# Check whether --with-tools-dir was given.
7513if test "${with_tools_dir+set}" = set; then :
7514  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7515fi
7516
7517
7518
7519# Check whether --with-devkit was given.
7520if test "${with_devkit+set}" = set; then :
7521  withval=$with_devkit;
7522    if test "x$with_sys_root" != x; then
7523      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7524    fi
7525    if test "x$with_tools_dir" != x; then
7526      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7527    fi
7528    TOOLS_DIR=$with_devkit/bin
7529    SYS_ROOT=$with_devkit/$host_alias/libc
7530
7531fi
7532
7533
7534
7535
7536# Setup default logging of stdout and stderr to build.log in the output root.
7537BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7538BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7539BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7540
7541
7542
7543
7544
7545# Check if it's a pure open build or if custom sources are to be used.
7546
7547  # Check whether --enable-openjdk-only was given.
7548if test "${enable_openjdk_only+set}" = set; then :
7549  enableval=$enable_openjdk_only;
7550else
7551  enable_openjdk_only="no"
7552fi
7553
7554
7555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7556$as_echo_n "checking for presence of closed sources... " >&6; }
7557  if test -d "$SRC_ROOT/jdk/src/closed"; then
7558    CLOSED_SOURCE_PRESENT=yes
7559  else
7560    CLOSED_SOURCE_PRESENT=no
7561  fi
7562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7563$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7564
7565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7566$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7567  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7569$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7570
7571  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7572    OPENJDK=true
7573    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7574      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7575$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7576    fi
7577  else
7578    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7579      OPENJDK=true
7580    else
7581      OPENJDK=false
7582    fi
7583  fi
7584
7585  if test "x$OPENJDK" = "xtrue"; then
7586    SET_OPENJDK="OPENJDK=true"
7587  fi
7588
7589
7590
7591
7592# These are needed to be able to create a configuration name (and thus the output directory)
7593
7594###############################################################################
7595#
7596# Check which variant of the JDK that we want to build.
7597# Currently we have:
7598#    normal:   standard edition
7599# but the custom make system may add other variants
7600#
7601# Effectively the JDK variant gives a name to a specific set of
7602# modules to compile into the JDK. In the future, these modules
7603# might even be Jigsaw modules.
7604#
7605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7606$as_echo_n "checking which variant of the JDK to build... " >&6; }
7607
7608# Check whether --with-jdk-variant was given.
7609if test "${with_jdk_variant+set}" = set; then :
7610  withval=$with_jdk_variant;
7611fi
7612
7613
7614if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7615    JDK_VARIANT="normal"
7616else
7617    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7618fi
7619
7620
7621
7622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7623$as_echo "$JDK_VARIANT" >&6; }
7624
7625
7626
7627###############################################################################
7628#
7629# Check which variants of the JVM that we want to build.
7630# Currently we have:
7631#    server: normal interpreter and a tiered C1/C2 compiler
7632#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7633#    minimal1: reduced form of client with optional VM services and features stripped out
7634#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7635#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7636#    zero: no machine code interpreter, no compiler
7637#    zeroshark: zero interpreter and shark/llvm compiler backend
7638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7639$as_echo_n "checking which variants of the JVM to build... " >&6; }
7640
7641# Check whether --with-jvm-variants was given.
7642if test "${with_jvm_variants+set}" = set; then :
7643  withval=$with_jvm_variants;
7644fi
7645
7646
7647if test "x$with_jvm_variants" = x; then
7648     with_jvm_variants="server"
7649fi
7650
7651JVM_VARIANTS=",$with_jvm_variants,"
7652TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7653
7654if test "x$TEST_VARIANTS" != "x,"; then
7655   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7656fi
7657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7658$as_echo "$with_jvm_variants" >&6; }
7659
7660JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7661JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7662JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7663JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7664JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7665JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7666
7667if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7668    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7669        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7670    fi
7671fi
7672if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7673    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7674        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7675    fi
7676fi
7677if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7678    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7679        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7680    fi
7681fi
7682
7683# Replace the commas with AND for use in the build directory name.
7684ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7685COUNT_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/'`
7686if test "x$COUNT_VARIANTS" != "x,1"; then
7687    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7688else
7689    BUILDING_MULTIPLE_JVM_VARIANTS=no
7690fi
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7701   MACOSX_UNIVERSAL="true"
7702fi
7703
7704
7705
7706
7707
7708###############################################################################
7709#
7710# Set the debug level
7711#    release: no debug information, all optimizations, no asserts.
7712#    fastdebug: debug information (-g), all optimizations, all asserts
7713#    slowdebug: debug information (-g), no optimizations, all asserts
7714#
7715DEBUG_LEVEL="release"
7716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7717$as_echo_n "checking which debug level to use... " >&6; }
7718# Check whether --enable-debug was given.
7719if test "${enable_debug+set}" = set; then :
7720  enableval=$enable_debug;
7721        ENABLE_DEBUG="${enableval}"
7722        DEBUG_LEVEL="fastdebug"
7723
7724else
7725  ENABLE_DEBUG="no"
7726fi
7727
7728
7729
7730# Check whether --with-debug-level was given.
7731if test "${with_debug_level+set}" = set; then :
7732  withval=$with_debug_level;
7733        DEBUG_LEVEL="${withval}"
7734        if test "x$ENABLE_DEBUG" = xyes; then
7735			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7736        fi
7737
7738fi
7739
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7741$as_echo "$DEBUG_LEVEL" >&6; }
7742
7743if test "x$DEBUG_LEVEL" != xrelease && \
7744   test "x$DEBUG_LEVEL" != xfastdebug && \
7745   test "x$DEBUG_LEVEL" != xslowdebug; then
7746   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7747fi
7748
7749
7750###############################################################################
7751#
7752# Setup legacy vars/targets and new vars to deal with different debug levels.
7753#
7754
7755case $DEBUG_LEVEL in
7756      release )
7757          VARIANT="OPT"
7758          FASTDEBUG="false"
7759          DEBUG_CLASSFILES="false"
7760          BUILD_VARIANT_RELEASE=""
7761          HOTSPOT_DEBUG_LEVEL="product"
7762          HOTSPOT_EXPORT="product"
7763           ;;
7764      fastdebug )
7765          VARIANT="DBG"
7766          FASTDEBUG="true"
7767          DEBUG_CLASSFILES="true"
7768          BUILD_VARIANT_RELEASE="-fastdebug"
7769          HOTSPOT_DEBUG_LEVEL="fastdebug"
7770          HOTSPOT_EXPORT="fastdebug"
7771           ;;
7772      slowdebug )
7773          VARIANT="DBG"
7774          FASTDEBUG="false"
7775          DEBUG_CLASSFILES="true"
7776          BUILD_VARIANT_RELEASE="-debug"
7777          HOTSPOT_DEBUG_LEVEL="jvmg"
7778          HOTSPOT_EXPORT="debug"
7779           ;;
7780esac
7781
7782#####
7783# Generate the legacy makefile targets for hotspot.
7784# The hotspot api for selecting the build artifacts, really, needs to be improved.
7785# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7786# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7787# But until then ...
7788HOTSPOT_TARGET=""
7789
7790if test "x$JVM_VARIANT_SERVER" = xtrue; then
7791    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7792fi
7793
7794if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7795    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7796fi
7797
7798if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7799    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7800fi
7801
7802if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7803    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7804fi
7805
7806if test "x$JVM_VARIANT_ZERO" = xtrue; then
7807    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7808fi
7809
7810if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7811    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7812fi
7813
7814HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7815
7816# On Macosx universal binaries are produced, but they only contain
7817# 64 bit intel. This invalidates control of which jvms are built
7818# from configure, but only server is valid anyway. Fix this
7819# when hotspot makefiles are rewritten.
7820if test "x$MACOSX_UNIVERSAL" = xtrue; then
7821    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7822fi
7823
7824#####
7825
7826
7827
7828
7829
7830
7831
7832
7833# With basic setup done, call the custom early hook.
7834
7835
7836# To properly create a configuration name, we need to have the OpenJDK target
7837# and options (variants and debug level) parsed.
7838
7839
7840
7841# Check whether --with-conf-name was given.
7842if test "${with_conf_name+set}" = set; then :
7843  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7844fi
7845
7846
7847# Test from where we are running configure, in or outside of src root.
7848# To enable comparison of directories, CURDIR needs to be symlink free
7849# just like SRC_ROOT already is
7850NOSYM_CURDIR="$CURDIR"
7851
7852    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7853        # Follow a chain of symbolic links. Use readlink
7854        # where it exists, else fall back to horribly
7855        # complicated shell code.
7856        if test "x$READLINK_TESTED" != yes; then
7857            # On MacOSX there is a readlink tool with a different
7858            # purpose than the GNU readlink tool. Check the found readlink.
7859            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7860            if test "x$ISGNU" = x; then
7861                 # A readlink that we do not know how to use.
7862                 # Are there other non-GNU readlinks out there?
7863                 READLINK_TESTED=yes
7864                 READLINK=
7865            fi
7866        fi
7867
7868        if test "x$READLINK" != x; then
7869            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7870        else
7871            # Save the current directory for restoring afterwards
7872            STARTDIR=$PWD
7873            COUNTER=0
7874            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7875            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7876            # Use the system pwd and not the shell builtin to resolve directory symlinks
7877            cd $sym_link_dir
7878            cd `$THEPWDCMD`
7879            sym_link_dir=`$THEPWDCMD`
7880            # Resolve file symlinks
7881            while test $COUNTER -lt 20; do
7882                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7883                if test "x$ISLINK" == x; then
7884                    # This is not a symbolic link! We are done!
7885                    break
7886                fi
7887                # Again resolve directory symlinks since the target of the just found
7888                # link could be in a different directory
7889                cd `$DIRNAME $ISLINK`
7890                sym_link_dir=`$THEPWDCMD`
7891                sym_link_file=`$BASENAME $ISLINK`
7892                let COUNTER=COUNTER+1
7893            done
7894            cd $STARTDIR
7895            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7896        fi
7897    fi
7898
7899if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7900        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7901        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7902    # We are running configure from the src root.
7903    # Create a default ./build/target-variant-debuglevel output root.
7904    if test "x${CONF_NAME}" = x; then
7905        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7906    fi
7907    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7908    $MKDIR -p "$OUTPUT_ROOT"
7909    if test ! -d "$OUTPUT_ROOT"; then
7910        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7911    fi
7912else
7913    # We are running configure from outside of the src dir.
7914    # Then use the current directory as output dir!
7915    # If configuration is situated in normal build directory, just use the build
7916    # directory name as configuration name, otherwise use the complete path.
7917    if test "x${CONF_NAME}" = x; then
7918        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7919    fi
7920    OUTPUT_ROOT="$CURDIR"
7921
7922    # WARNING: This might be a bad thing to do. You need to be sure you want to
7923    # have a configuration in this directory. Do some sanity checks!
7924
7925    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7926      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7927      # other files
7928      files_present=`$LS $OUTPUT_ROOT`
7929      # Configure has already touched config.log and confdefs.h in the current dir when this check
7930      # is performed.
7931      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7932                                             | $TR -d '\n'`
7933      if test "x$filtered_files" != x; then
7934        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7935$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7936        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7937$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7938        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7939$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7940        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7941$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7942        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7943$as_echo "$as_me: seriously mess up just about everything." >&6;}
7944        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7945$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7946        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7947$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7948        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7949      fi
7950    fi
7951fi
7952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7953$as_echo_n "checking what configuration name to use... " >&6; }
7954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7955$as_echo "$CONF_NAME" >&6; }
7956
7957
7958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7959
7960  # Input might be given as Windows format, start by converting to
7961  # unix format.
7962  path="$OUTPUT_ROOT"
7963  new_path=`$CYGPATH -u "$path"`
7964
7965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7968  # "foo.exe" is OK but "foo" is an error.
7969  #
7970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7971  # It is also a way to make sure we got the proper file name for the real test later on.
7972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7973  if test "x$test_shortpath" = x; then
7974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7975$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7976    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7977  fi
7978
7979  # Call helper function which possibly converts this using DOS-style short mode.
7980  # If so, the updated path is stored in $new_path.
7981
7982  input_path="$new_path"
7983  # Check if we need to convert this using DOS-style short mode. If the path
7984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7985  # take no chances and rewrite it.
7986  # Note: m4 eats our [], so we need to use [ and ] instead.
7987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7988  if test "x$has_forbidden_chars" != x; then
7989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7993      # Going to short mode and back again did indeed matter. Since short mode is
7994      # case insensitive, let's make it lowercase to improve readability.
7995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7996      # Now convert it back to Unix-stile (cygpath)
7997      input_path=`$CYGPATH -u "$shortmode_path"`
7998      new_path="$input_path"
7999    fi
8000  fi
8001
8002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8003  if test "x$test_cygdrive_prefix" = x; then
8004    # As a simple fix, exclude /usr/bin since it's not a real path.
8005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8007      # a path prefixed by /cygdrive for fixpath to work.
8008      new_path="$CYGWIN_ROOT_PATH$input_path"
8009    fi
8010  fi
8011
8012
8013  if test "x$path" != "x$new_path"; then
8014    OUTPUT_ROOT="$new_path"
8015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8016$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8017  fi
8018
8019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8020
8021  path="$OUTPUT_ROOT"
8022  has_colon=`$ECHO $path | $GREP ^.:`
8023  new_path="$path"
8024  if test "x$has_colon" = x; then
8025    # Not in mixed or Windows style, start by that.
8026    new_path=`cmd //c echo $path`
8027  fi
8028
8029
8030  input_path="$new_path"
8031  # Check if we need to convert this using DOS-style short mode. If the path
8032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8033  # take no chances and rewrite it.
8034  # Note: m4 eats our [], so we need to use [ and ] instead.
8035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8036  if test "x$has_forbidden_chars" != x; then
8037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8039  fi
8040
8041
8042  windows_path="$new_path"
8043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8044    unix_path=`$CYGPATH -u "$windows_path"`
8045    new_path="$unix_path"
8046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8048    new_path="$unix_path"
8049  fi
8050
8051  if test "x$path" != "x$new_path"; then
8052    OUTPUT_ROOT="$new_path"
8053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8054$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8055  fi
8056
8057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8059
8060  else
8061    # We're on a posix platform. Hooray! :)
8062    path="$OUTPUT_ROOT"
8063
8064    if test ! -f "$path" && test ! -d "$path"; then
8065      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8066    fi
8067
8068    has_space=`$ECHO "$path" | $GREP " "`
8069    if test "x$has_space" != x; then
8070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8071$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8072      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8073    fi
8074  fi
8075
8076
8077SPEC=$OUTPUT_ROOT/spec.gmk
8078
8079CONF_NAME=$CONF_NAME
8080
8081OUTPUT_ROOT=$OUTPUT_ROOT
8082
8083
8084# Most of the probed defines are put into config.h
8085ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8086
8087# The spec.gmk file contains all variables for the make system.
8088ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8089
8090# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8091ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8092
8093# The bootcycle-spec.gmk file contains support for boot cycle builds.
8094ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8095
8096# The compare.sh is used to compare the build output to other builds.
8097ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8098
8099# Spec.sh is currently used by compare-objects.sh
8100ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8101
8102# The generated Makefile knows where the spec.gmk is and where the source is.
8103# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8104# which will look for generated configurations
8105ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8106
8107
8108# Save the arguments given to us
8109echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8110
8111
8112# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8113
8114    for ac_prog in apt-get yum port pkgutil pkgadd
8115do
8116  # Extract the first word of "$ac_prog", so it can be a program name with args.
8117set dummy $ac_prog; ac_word=$2
8118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8119$as_echo_n "checking for $ac_word... " >&6; }
8120if ${ac_cv_prog_PKGHANDLER+:} false; then :
8121  $as_echo_n "(cached) " >&6
8122else
8123  if test -n "$PKGHANDLER"; then
8124  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8125else
8126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8127for as_dir in $PATH
8128do
8129  IFS=$as_save_IFS
8130  test -z "$as_dir" && as_dir=.
8131    for ac_exec_ext in '' $ac_executable_extensions; do
8132  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8133    ac_cv_prog_PKGHANDLER="$ac_prog"
8134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8135    break 2
8136  fi
8137done
8138  done
8139IFS=$as_save_IFS
8140
8141fi
8142fi
8143PKGHANDLER=$ac_cv_prog_PKGHANDLER
8144if test -n "$PKGHANDLER"; then
8145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8146$as_echo "$PKGHANDLER" >&6; }
8147else
8148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8149$as_echo "no" >&6; }
8150fi
8151
8152
8153  test -n "$PKGHANDLER" && break
8154done
8155
8156
8157
8158# Setup tools that requires more complex handling, or that is not needed by the configure script.
8159
8160
8161  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8162  if test "x$MAKE" != x; then
8163    # User has supplied a make, test it.
8164    if test ! -f "$MAKE"; then
8165      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8166    fi
8167
8168  MAKE_CANDIDATE=""$MAKE""
8169  DESCRIPTION="user supplied MAKE=$MAKE"
8170  if test "x$MAKE_CANDIDATE" != x; then
8171    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8172$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8173    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8174    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8175    if test "x$IS_GNU_MAKE" = x; then
8176      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8177$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8178    else
8179      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8180      if test "x$IS_MODERN_MAKE" = x; then
8181        { $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
8182$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;}
8183      else
8184        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8185          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8186            MAKE_EXPECTED_ENV='cygwin'
8187          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8188            MAKE_EXPECTED_ENV='msys'
8189          else
8190            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8191          fi
8192          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8193          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8194        else
8195          # Not relevant for non-Windows
8196          IS_MAKE_CORRECT_ENV=true
8197        fi
8198        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8199          { $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
8200$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;}
8201        else
8202          FOUND_MAKE=$MAKE_CANDIDATE
8203
8204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8205
8206  # First separate the path from the arguments. This will split at the first
8207  # space.
8208  complete="$FOUND_MAKE"
8209  path="${complete%% *}"
8210  tmp="$complete EOL"
8211  arguments="${tmp#* }"
8212
8213  # Input might be given as Windows format, start by converting to
8214  # unix format.
8215  new_path=`$CYGPATH -u "$path"`
8216
8217  # Now try to locate executable using which
8218  new_path=`$WHICH "$new_path" 2> /dev/null`
8219  # bat and cmd files are not always considered executable in cygwin causing which
8220  # to not find them
8221  if test "x$new_path" = x \
8222           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8223           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8224    new_path=`$CYGPATH -u "$path"`
8225  fi
8226  if test "x$new_path" = x; then
8227    # Oops. Which didn't find the executable.
8228    # The splitting of arguments from the executable at a space might have been incorrect,
8229    # since paths with space are more likely in Windows. Give it another try with the whole
8230    # argument.
8231    path="$complete"
8232    arguments="EOL"
8233    new_path=`$CYGPATH -u "$path"`
8234    new_path=`$WHICH "$new_path" 2> /dev/null`
8235    # bat and cmd files are not always considered executable in cygwin causing which
8236    # to not find them
8237    if test "x$new_path" = x \
8238             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8239             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8240      new_path=`$CYGPATH -u "$path"`
8241    fi
8242    if test "x$new_path" = x; then
8243      # It's still not found. Now this is an unrecoverable error.
8244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8245$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8246      has_space=`$ECHO "$complete" | $GREP " "`
8247      if test "x$has_space" != x; then
8248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8250      fi
8251      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8252    fi
8253  fi
8254
8255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8258  # "foo.exe" is OK but "foo" is an error.
8259  #
8260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8261  # It is also a way to make sure we got the proper file name for the real test later on.
8262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8263  if test "x$test_shortpath" = x; then
8264    # Short path failed, file does not exist as specified.
8265    # Try adding .exe or .cmd
8266    if test -f "${new_path}.exe"; then
8267       input_to_shortpath="${new_path}.exe"
8268    elif test -f "${new_path}.cmd"; then
8269       input_to_shortpath="${new_path}.cmd"
8270    else
8271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8272$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8273      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8274$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8275      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8276    fi
8277  else
8278    input_to_shortpath="$new_path"
8279  fi
8280
8281  # Call helper function which possibly converts this using DOS-style short mode.
8282  # If so, the updated path is stored in $new_path.
8283  new_path="$input_to_shortpath"
8284
8285  input_path="$input_to_shortpath"
8286  # Check if we need to convert this using DOS-style short mode. If the path
8287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8288  # take no chances and rewrite it.
8289  # Note: m4 eats our [], so we need to use [ and ] instead.
8290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8291  if test "x$has_forbidden_chars" != x; then
8292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8296      # Going to short mode and back again did indeed matter. Since short mode is
8297      # case insensitive, let's make it lowercase to improve readability.
8298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8299      # Now convert it back to Unix-stile (cygpath)
8300      input_path=`$CYGPATH -u "$shortmode_path"`
8301      new_path="$input_path"
8302    fi
8303  fi
8304
8305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8306  if test "x$test_cygdrive_prefix" = x; then
8307    # As a simple fix, exclude /usr/bin since it's not a real path.
8308    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8310      # a path prefixed by /cygdrive for fixpath to work.
8311      new_path="$CYGWIN_ROOT_PATH$input_path"
8312    fi
8313  fi
8314
8315  # remove trailing .exe if any
8316  new_path="${new_path/%.exe/}"
8317
8318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8319
8320  # First separate the path from the arguments. This will split at the first
8321  # space.
8322  complete="$FOUND_MAKE"
8323  path="${complete%% *}"
8324  tmp="$complete EOL"
8325  arguments="${tmp#* }"
8326
8327  # Input might be given as Windows format, start by converting to
8328  # unix format.
8329  new_path="$path"
8330
8331  windows_path="$new_path"
8332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8333    unix_path=`$CYGPATH -u "$windows_path"`
8334    new_path="$unix_path"
8335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8337    new_path="$unix_path"
8338  fi
8339
8340
8341  # Now try to locate executable using which
8342  new_path=`$WHICH "$new_path" 2> /dev/null`
8343
8344  if test "x$new_path" = x; then
8345    # Oops. Which didn't find the executable.
8346    # The splitting of arguments from the executable at a space might have been incorrect,
8347    # since paths with space are more likely in Windows. Give it another try with the whole
8348    # argument.
8349    path="$complete"
8350    arguments="EOL"
8351    new_path="$path"
8352
8353  windows_path="$new_path"
8354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8355    unix_path=`$CYGPATH -u "$windows_path"`
8356    new_path="$unix_path"
8357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8359    new_path="$unix_path"
8360  fi
8361
8362
8363    new_path=`$WHICH "$new_path" 2> /dev/null`
8364
8365    if test "x$new_path" = x; then
8366      # It's still not found. Now this is an unrecoverable error.
8367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8368$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8369      has_space=`$ECHO "$complete" | $GREP " "`
8370      if test "x$has_space" != x; then
8371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8373      fi
8374      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8375    fi
8376  fi
8377
8378  # Now new_path has a complete unix path to the binary
8379  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8380    # Keep paths in /bin as-is, but remove trailing .exe if any
8381    new_path="${new_path/%.exe/}"
8382    # Do not save /bin paths to all_fixpath_prefixes!
8383  else
8384    # Not in mixed or Windows style, start by that.
8385    new_path=`cmd //c echo $new_path`
8386
8387  input_path="$new_path"
8388  # Check if we need to convert this using DOS-style short mode. If the path
8389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8390  # take no chances and rewrite it.
8391  # Note: m4 eats our [], so we need to use [ and ] instead.
8392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8393  if test "x$has_forbidden_chars" != x; then
8394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8396  fi
8397
8398    # Output is in $new_path
8399
8400  windows_path="$new_path"
8401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8402    unix_path=`$CYGPATH -u "$windows_path"`
8403    new_path="$unix_path"
8404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8406    new_path="$unix_path"
8407  fi
8408
8409    # remove trailing .exe if any
8410    new_path="${new_path/%.exe/}"
8411
8412    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8413    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8414  fi
8415
8416  else
8417    # We're on a posix platform. Hooray! :)
8418    # First separate the path from the arguments. This will split at the first
8419    # space.
8420    complete="$FOUND_MAKE"
8421    path="${complete%% *}"
8422    tmp="$complete EOL"
8423    arguments="${tmp#* }"
8424
8425    # Cannot rely on the command "which" here since it doesn't always work.
8426    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8427    if test -z "$is_absolute_path"; then
8428      # Path to executable is not absolute. Find it.
8429      IFS_save="$IFS"
8430      IFS=:
8431      for p in $PATH; do
8432        if test -f "$p/$path" && test -x "$p/$path"; then
8433          new_path="$p/$path"
8434          break
8435        fi
8436      done
8437      IFS="$IFS_save"
8438    else
8439      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8440$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8441      new_path="$path"
8442    fi
8443
8444    if test "x$new_path" = x; then
8445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8446$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8447        has_space=`$ECHO "$complete" | $GREP " "`
8448        if test "x$has_space" != x; then
8449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8451        fi
8452        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8453      fi
8454  fi
8455
8456      # Now join together the path and the arguments once again
8457      if test "x$arguments" != xEOL; then
8458        new_complete="$new_path ${arguments% *}"
8459      else
8460        new_complete="$new_path"
8461      fi
8462
8463  if test "x$complete" != "x$new_complete"; then
8464      FOUND_MAKE="$new_complete"
8465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8466$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8467    fi
8468
8469        fi
8470      fi
8471    fi
8472  fi
8473
8474    if test "x$FOUND_MAKE" = x; then
8475      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8476    fi
8477  else
8478    # Try our hardest to locate a correct version of GNU make
8479    for ac_prog in gmake
8480do
8481  # Extract the first word of "$ac_prog", so it can be a program name with args.
8482set dummy $ac_prog; ac_word=$2
8483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8484$as_echo_n "checking for $ac_word... " >&6; }
8485if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8486  $as_echo_n "(cached) " >&6
8487else
8488  case $CHECK_GMAKE in
8489  [\\/]* | ?:[\\/]*)
8490  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8491  ;;
8492  *)
8493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8494for as_dir in $PATH
8495do
8496  IFS=$as_save_IFS
8497  test -z "$as_dir" && as_dir=.
8498    for ac_exec_ext in '' $ac_executable_extensions; do
8499  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8500    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8502    break 2
8503  fi
8504done
8505  done
8506IFS=$as_save_IFS
8507
8508  ;;
8509esac
8510fi
8511CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8512if test -n "$CHECK_GMAKE"; then
8513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8514$as_echo "$CHECK_GMAKE" >&6; }
8515else
8516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8517$as_echo "no" >&6; }
8518fi
8519
8520
8521  test -n "$CHECK_GMAKE" && break
8522done
8523
8524
8525  MAKE_CANDIDATE=""$CHECK_GMAKE""
8526  DESCRIPTION="gmake in PATH"
8527  if test "x$MAKE_CANDIDATE" != x; then
8528    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8529$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8530    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8531    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8532    if test "x$IS_GNU_MAKE" = x; then
8533      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8534$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8535    else
8536      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8537      if test "x$IS_MODERN_MAKE" = x; then
8538        { $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
8539$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;}
8540      else
8541        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8542          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8543            MAKE_EXPECTED_ENV='cygwin'
8544          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8545            MAKE_EXPECTED_ENV='msys'
8546          else
8547            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8548          fi
8549          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8550          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8551        else
8552          # Not relevant for non-Windows
8553          IS_MAKE_CORRECT_ENV=true
8554        fi
8555        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8556          { $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
8557$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;}
8558        else
8559          FOUND_MAKE=$MAKE_CANDIDATE
8560
8561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8562
8563  # First separate the path from the arguments. This will split at the first
8564  # space.
8565  complete="$FOUND_MAKE"
8566  path="${complete%% *}"
8567  tmp="$complete EOL"
8568  arguments="${tmp#* }"
8569
8570  # Input might be given as Windows format, start by converting to
8571  # unix format.
8572  new_path=`$CYGPATH -u "$path"`
8573
8574  # Now try to locate executable using which
8575  new_path=`$WHICH "$new_path" 2> /dev/null`
8576  # bat and cmd files are not always considered executable in cygwin causing which
8577  # to not find them
8578  if test "x$new_path" = x \
8579           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8580           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8581    new_path=`$CYGPATH -u "$path"`
8582  fi
8583  if test "x$new_path" = x; then
8584    # Oops. Which didn't find the executable.
8585    # The splitting of arguments from the executable at a space might have been incorrect,
8586    # since paths with space are more likely in Windows. Give it another try with the whole
8587    # argument.
8588    path="$complete"
8589    arguments="EOL"
8590    new_path=`$CYGPATH -u "$path"`
8591    new_path=`$WHICH "$new_path" 2> /dev/null`
8592    # bat and cmd files are not always considered executable in cygwin causing which
8593    # to not find them
8594    if test "x$new_path" = x \
8595             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8596             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8597      new_path=`$CYGPATH -u "$path"`
8598    fi
8599    if test "x$new_path" = x; then
8600      # It's still not found. Now this is an unrecoverable error.
8601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8602$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8603      has_space=`$ECHO "$complete" | $GREP " "`
8604      if test "x$has_space" != x; then
8605        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8606$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8607      fi
8608      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8609    fi
8610  fi
8611
8612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8615  # "foo.exe" is OK but "foo" is an error.
8616  #
8617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8618  # It is also a way to make sure we got the proper file name for the real test later on.
8619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8620  if test "x$test_shortpath" = x; then
8621    # Short path failed, file does not exist as specified.
8622    # Try adding .exe or .cmd
8623    if test -f "${new_path}.exe"; then
8624       input_to_shortpath="${new_path}.exe"
8625    elif test -f "${new_path}.cmd"; then
8626       input_to_shortpath="${new_path}.cmd"
8627    else
8628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8629$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8630      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8631$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8632      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8633    fi
8634  else
8635    input_to_shortpath="$new_path"
8636  fi
8637
8638  # Call helper function which possibly converts this using DOS-style short mode.
8639  # If so, the updated path is stored in $new_path.
8640  new_path="$input_to_shortpath"
8641
8642  input_path="$input_to_shortpath"
8643  # Check if we need to convert this using DOS-style short mode. If the path
8644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8645  # take no chances and rewrite it.
8646  # Note: m4 eats our [], so we need to use [ and ] instead.
8647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8648  if test "x$has_forbidden_chars" != x; then
8649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8653      # Going to short mode and back again did indeed matter. Since short mode is
8654      # case insensitive, let's make it lowercase to improve readability.
8655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8656      # Now convert it back to Unix-stile (cygpath)
8657      input_path=`$CYGPATH -u "$shortmode_path"`
8658      new_path="$input_path"
8659    fi
8660  fi
8661
8662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8663  if test "x$test_cygdrive_prefix" = x; then
8664    # As a simple fix, exclude /usr/bin since it's not a real path.
8665    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8667      # a path prefixed by /cygdrive for fixpath to work.
8668      new_path="$CYGWIN_ROOT_PATH$input_path"
8669    fi
8670  fi
8671
8672  # remove trailing .exe if any
8673  new_path="${new_path/%.exe/}"
8674
8675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8676
8677  # First separate the path from the arguments. This will split at the first
8678  # space.
8679  complete="$FOUND_MAKE"
8680  path="${complete%% *}"
8681  tmp="$complete EOL"
8682  arguments="${tmp#* }"
8683
8684  # Input might be given as Windows format, start by converting to
8685  # unix format.
8686  new_path="$path"
8687
8688  windows_path="$new_path"
8689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8690    unix_path=`$CYGPATH -u "$windows_path"`
8691    new_path="$unix_path"
8692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8694    new_path="$unix_path"
8695  fi
8696
8697
8698  # Now try to locate executable using which
8699  new_path=`$WHICH "$new_path" 2> /dev/null`
8700
8701  if test "x$new_path" = x; then
8702    # Oops. Which didn't find the executable.
8703    # The splitting of arguments from the executable at a space might have been incorrect,
8704    # since paths with space are more likely in Windows. Give it another try with the whole
8705    # argument.
8706    path="$complete"
8707    arguments="EOL"
8708    new_path="$path"
8709
8710  windows_path="$new_path"
8711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8712    unix_path=`$CYGPATH -u "$windows_path"`
8713    new_path="$unix_path"
8714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8716    new_path="$unix_path"
8717  fi
8718
8719
8720    new_path=`$WHICH "$new_path" 2> /dev/null`
8721
8722    if test "x$new_path" = x; then
8723      # It's still not found. Now this is an unrecoverable error.
8724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8725$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8726      has_space=`$ECHO "$complete" | $GREP " "`
8727      if test "x$has_space" != x; then
8728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8730      fi
8731      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8732    fi
8733  fi
8734
8735  # Now new_path has a complete unix path to the binary
8736  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8737    # Keep paths in /bin as-is, but remove trailing .exe if any
8738    new_path="${new_path/%.exe/}"
8739    # Do not save /bin paths to all_fixpath_prefixes!
8740  else
8741    # Not in mixed or Windows style, start by that.
8742    new_path=`cmd //c echo $new_path`
8743
8744  input_path="$new_path"
8745  # Check if we need to convert this using DOS-style short mode. If the path
8746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8747  # take no chances and rewrite it.
8748  # Note: m4 eats our [], so we need to use [ and ] instead.
8749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8750  if test "x$has_forbidden_chars" != x; then
8751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8753  fi
8754
8755    # Output is in $new_path
8756
8757  windows_path="$new_path"
8758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8759    unix_path=`$CYGPATH -u "$windows_path"`
8760    new_path="$unix_path"
8761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8763    new_path="$unix_path"
8764  fi
8765
8766    # remove trailing .exe if any
8767    new_path="${new_path/%.exe/}"
8768
8769    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8770    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8771  fi
8772
8773  else
8774    # We're on a posix platform. Hooray! :)
8775    # First separate the path from the arguments. This will split at the first
8776    # space.
8777    complete="$FOUND_MAKE"
8778    path="${complete%% *}"
8779    tmp="$complete EOL"
8780    arguments="${tmp#* }"
8781
8782    # Cannot rely on the command "which" here since it doesn't always work.
8783    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8784    if test -z "$is_absolute_path"; then
8785      # Path to executable is not absolute. Find it.
8786      IFS_save="$IFS"
8787      IFS=:
8788      for p in $PATH; do
8789        if test -f "$p/$path" && test -x "$p/$path"; then
8790          new_path="$p/$path"
8791          break
8792        fi
8793      done
8794      IFS="$IFS_save"
8795    else
8796      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8797$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8798      new_path="$path"
8799    fi
8800
8801    if test "x$new_path" = x; then
8802        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8803$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8804        has_space=`$ECHO "$complete" | $GREP " "`
8805        if test "x$has_space" != x; then
8806          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8807$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8808        fi
8809        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8810      fi
8811  fi
8812
8813      # Now join together the path and the arguments once again
8814      if test "x$arguments" != xEOL; then
8815        new_complete="$new_path ${arguments% *}"
8816      else
8817        new_complete="$new_path"
8818      fi
8819
8820  if test "x$complete" != "x$new_complete"; then
8821      FOUND_MAKE="$new_complete"
8822      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8823$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8824    fi
8825
8826        fi
8827      fi
8828    fi
8829  fi
8830
8831
8832    if test "x$FOUND_MAKE" = x; then
8833      for ac_prog in make
8834do
8835  # Extract the first word of "$ac_prog", so it can be a program name with args.
8836set dummy $ac_prog; ac_word=$2
8837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8838$as_echo_n "checking for $ac_word... " >&6; }
8839if ${ac_cv_path_CHECK_MAKE+:} false; then :
8840  $as_echo_n "(cached) " >&6
8841else
8842  case $CHECK_MAKE in
8843  [\\/]* | ?:[\\/]*)
8844  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8845  ;;
8846  *)
8847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8848for as_dir in $PATH
8849do
8850  IFS=$as_save_IFS
8851  test -z "$as_dir" && as_dir=.
8852    for ac_exec_ext in '' $ac_executable_extensions; do
8853  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8854    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8856    break 2
8857  fi
8858done
8859  done
8860IFS=$as_save_IFS
8861
8862  ;;
8863esac
8864fi
8865CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8866if test -n "$CHECK_MAKE"; then
8867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8868$as_echo "$CHECK_MAKE" >&6; }
8869else
8870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8871$as_echo "no" >&6; }
8872fi
8873
8874
8875  test -n "$CHECK_MAKE" && break
8876done
8877
8878
8879  MAKE_CANDIDATE=""$CHECK_MAKE""
8880  DESCRIPTION="make in PATH"
8881  if test "x$MAKE_CANDIDATE" != x; then
8882    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8883$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8884    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8885    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8886    if test "x$IS_GNU_MAKE" = x; then
8887      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8888$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8889    else
8890      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8891      if test "x$IS_MODERN_MAKE" = x; then
8892        { $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
8893$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;}
8894      else
8895        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8896          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8897            MAKE_EXPECTED_ENV='cygwin'
8898          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8899            MAKE_EXPECTED_ENV='msys'
8900          else
8901            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8902          fi
8903          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8904          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8905        else
8906          # Not relevant for non-Windows
8907          IS_MAKE_CORRECT_ENV=true
8908        fi
8909        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8910          { $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
8911$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;}
8912        else
8913          FOUND_MAKE=$MAKE_CANDIDATE
8914
8915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8916
8917  # First separate the path from the arguments. This will split at the first
8918  # space.
8919  complete="$FOUND_MAKE"
8920  path="${complete%% *}"
8921  tmp="$complete EOL"
8922  arguments="${tmp#* }"
8923
8924  # Input might be given as Windows format, start by converting to
8925  # unix format.
8926  new_path=`$CYGPATH -u "$path"`
8927
8928  # Now try to locate executable using which
8929  new_path=`$WHICH "$new_path" 2> /dev/null`
8930  # bat and cmd files are not always considered executable in cygwin causing which
8931  # to not find them
8932  if test "x$new_path" = x \
8933           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8934           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8935    new_path=`$CYGPATH -u "$path"`
8936  fi
8937  if test "x$new_path" = x; then
8938    # Oops. Which didn't find the executable.
8939    # The splitting of arguments from the executable at a space might have been incorrect,
8940    # since paths with space are more likely in Windows. Give it another try with the whole
8941    # argument.
8942    path="$complete"
8943    arguments="EOL"
8944    new_path=`$CYGPATH -u "$path"`
8945    new_path=`$WHICH "$new_path" 2> /dev/null`
8946    # bat and cmd files are not always considered executable in cygwin causing which
8947    # to not find them
8948    if test "x$new_path" = x \
8949             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8950             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8951      new_path=`$CYGPATH -u "$path"`
8952    fi
8953    if test "x$new_path" = x; then
8954      # It's still not found. Now this is an unrecoverable error.
8955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8956$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8957      has_space=`$ECHO "$complete" | $GREP " "`
8958      if test "x$has_space" != x; then
8959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8961      fi
8962      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8963    fi
8964  fi
8965
8966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8969  # "foo.exe" is OK but "foo" is an error.
8970  #
8971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8972  # It is also a way to make sure we got the proper file name for the real test later on.
8973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8974  if test "x$test_shortpath" = x; then
8975    # Short path failed, file does not exist as specified.
8976    # Try adding .exe or .cmd
8977    if test -f "${new_path}.exe"; then
8978       input_to_shortpath="${new_path}.exe"
8979    elif test -f "${new_path}.cmd"; then
8980       input_to_shortpath="${new_path}.cmd"
8981    else
8982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8983$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8984      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8985$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8986      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8987    fi
8988  else
8989    input_to_shortpath="$new_path"
8990  fi
8991
8992  # Call helper function which possibly converts this using DOS-style short mode.
8993  # If so, the updated path is stored in $new_path.
8994  new_path="$input_to_shortpath"
8995
8996  input_path="$input_to_shortpath"
8997  # Check if we need to convert this using DOS-style short mode. If the path
8998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8999  # take no chances and rewrite it.
9000  # Note: m4 eats our [], so we need to use [ and ] instead.
9001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9002  if test "x$has_forbidden_chars" != x; then
9003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9007      # Going to short mode and back again did indeed matter. Since short mode is
9008      # case insensitive, let's make it lowercase to improve readability.
9009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9010      # Now convert it back to Unix-stile (cygpath)
9011      input_path=`$CYGPATH -u "$shortmode_path"`
9012      new_path="$input_path"
9013    fi
9014  fi
9015
9016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9017  if test "x$test_cygdrive_prefix" = x; then
9018    # As a simple fix, exclude /usr/bin since it's not a real path.
9019    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9021      # a path prefixed by /cygdrive for fixpath to work.
9022      new_path="$CYGWIN_ROOT_PATH$input_path"
9023    fi
9024  fi
9025
9026  # remove trailing .exe if any
9027  new_path="${new_path/%.exe/}"
9028
9029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9030
9031  # First separate the path from the arguments. This will split at the first
9032  # space.
9033  complete="$FOUND_MAKE"
9034  path="${complete%% *}"
9035  tmp="$complete EOL"
9036  arguments="${tmp#* }"
9037
9038  # Input might be given as Windows format, start by converting to
9039  # unix format.
9040  new_path="$path"
9041
9042  windows_path="$new_path"
9043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9044    unix_path=`$CYGPATH -u "$windows_path"`
9045    new_path="$unix_path"
9046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9048    new_path="$unix_path"
9049  fi
9050
9051
9052  # Now try to locate executable using which
9053  new_path=`$WHICH "$new_path" 2> /dev/null`
9054
9055  if test "x$new_path" = x; then
9056    # Oops. Which didn't find the executable.
9057    # The splitting of arguments from the executable at a space might have been incorrect,
9058    # since paths with space are more likely in Windows. Give it another try with the whole
9059    # argument.
9060    path="$complete"
9061    arguments="EOL"
9062    new_path="$path"
9063
9064  windows_path="$new_path"
9065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9066    unix_path=`$CYGPATH -u "$windows_path"`
9067    new_path="$unix_path"
9068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9070    new_path="$unix_path"
9071  fi
9072
9073
9074    new_path=`$WHICH "$new_path" 2> /dev/null`
9075
9076    if test "x$new_path" = x; then
9077      # It's still not found. Now this is an unrecoverable error.
9078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9079$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9080      has_space=`$ECHO "$complete" | $GREP " "`
9081      if test "x$has_space" != x; then
9082        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9083$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9084      fi
9085      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9086    fi
9087  fi
9088
9089  # Now new_path has a complete unix path to the binary
9090  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9091    # Keep paths in /bin as-is, but remove trailing .exe if any
9092    new_path="${new_path/%.exe/}"
9093    # Do not save /bin paths to all_fixpath_prefixes!
9094  else
9095    # Not in mixed or Windows style, start by that.
9096    new_path=`cmd //c echo $new_path`
9097
9098  input_path="$new_path"
9099  # Check if we need to convert this using DOS-style short mode. If the path
9100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9101  # take no chances and rewrite it.
9102  # Note: m4 eats our [], so we need to use [ and ] instead.
9103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9104  if test "x$has_forbidden_chars" != x; then
9105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9107  fi
9108
9109    # Output is in $new_path
9110
9111  windows_path="$new_path"
9112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9113    unix_path=`$CYGPATH -u "$windows_path"`
9114    new_path="$unix_path"
9115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9117    new_path="$unix_path"
9118  fi
9119
9120    # remove trailing .exe if any
9121    new_path="${new_path/%.exe/}"
9122
9123    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9124    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9125  fi
9126
9127  else
9128    # We're on a posix platform. Hooray! :)
9129    # First separate the path from the arguments. This will split at the first
9130    # space.
9131    complete="$FOUND_MAKE"
9132    path="${complete%% *}"
9133    tmp="$complete EOL"
9134    arguments="${tmp#* }"
9135
9136    # Cannot rely on the command "which" here since it doesn't always work.
9137    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9138    if test -z "$is_absolute_path"; then
9139      # Path to executable is not absolute. Find it.
9140      IFS_save="$IFS"
9141      IFS=:
9142      for p in $PATH; do
9143        if test -f "$p/$path" && test -x "$p/$path"; then
9144          new_path="$p/$path"
9145          break
9146        fi
9147      done
9148      IFS="$IFS_save"
9149    else
9150      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9151$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9152      new_path="$path"
9153    fi
9154
9155    if test "x$new_path" = x; then
9156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9157$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9158        has_space=`$ECHO "$complete" | $GREP " "`
9159        if test "x$has_space" != x; then
9160          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9161$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9162        fi
9163        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9164      fi
9165  fi
9166
9167      # Now join together the path and the arguments once again
9168      if test "x$arguments" != xEOL; then
9169        new_complete="$new_path ${arguments% *}"
9170      else
9171        new_complete="$new_path"
9172      fi
9173
9174  if test "x$complete" != "x$new_complete"; then
9175      FOUND_MAKE="$new_complete"
9176      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9177$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9178    fi
9179
9180        fi
9181      fi
9182    fi
9183  fi
9184
9185    fi
9186
9187    if test "x$FOUND_MAKE" = x; then
9188      if test "x$TOOLS_DIR" != x; then
9189        # We have a tools-dir, check that as well before giving up.
9190        OLD_PATH=$PATH
9191        PATH=$TOOLS_DIR:$PATH
9192        for ac_prog in gmake
9193do
9194  # Extract the first word of "$ac_prog", so it can be a program name with args.
9195set dummy $ac_prog; ac_word=$2
9196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9197$as_echo_n "checking for $ac_word... " >&6; }
9198if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9199  $as_echo_n "(cached) " >&6
9200else
9201  case $CHECK_TOOLSDIR_GMAKE in
9202  [\\/]* | ?:[\\/]*)
9203  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9204  ;;
9205  *)
9206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9207for as_dir in $PATH
9208do
9209  IFS=$as_save_IFS
9210  test -z "$as_dir" && as_dir=.
9211    for ac_exec_ext in '' $ac_executable_extensions; do
9212  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9213    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9215    break 2
9216  fi
9217done
9218  done
9219IFS=$as_save_IFS
9220
9221  ;;
9222esac
9223fi
9224CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9225if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9227$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9228else
9229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9230$as_echo "no" >&6; }
9231fi
9232
9233
9234  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9235done
9236
9237
9238  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9239  DESCRIPTION="gmake in tools-dir"
9240  if test "x$MAKE_CANDIDATE" != x; then
9241    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9242$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9243    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9244    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9245    if test "x$IS_GNU_MAKE" = x; then
9246      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9247$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9248    else
9249      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9250      if test "x$IS_MODERN_MAKE" = x; then
9251        { $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
9252$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;}
9253      else
9254        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9255          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9256            MAKE_EXPECTED_ENV='cygwin'
9257          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9258            MAKE_EXPECTED_ENV='msys'
9259          else
9260            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9261          fi
9262          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9263          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9264        else
9265          # Not relevant for non-Windows
9266          IS_MAKE_CORRECT_ENV=true
9267        fi
9268        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9269          { $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
9270$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;}
9271        else
9272          FOUND_MAKE=$MAKE_CANDIDATE
9273
9274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9275
9276  # First separate the path from the arguments. This will split at the first
9277  # space.
9278  complete="$FOUND_MAKE"
9279  path="${complete%% *}"
9280  tmp="$complete EOL"
9281  arguments="${tmp#* }"
9282
9283  # Input might be given as Windows format, start by converting to
9284  # unix format.
9285  new_path=`$CYGPATH -u "$path"`
9286
9287  # Now try to locate executable using which
9288  new_path=`$WHICH "$new_path" 2> /dev/null`
9289  # bat and cmd files are not always considered executable in cygwin causing which
9290  # to not find them
9291  if test "x$new_path" = x \
9292           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9293           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9294    new_path=`$CYGPATH -u "$path"`
9295  fi
9296  if test "x$new_path" = x; then
9297    # Oops. Which didn't find the executable.
9298    # The splitting of arguments from the executable at a space might have been incorrect,
9299    # since paths with space are more likely in Windows. Give it another try with the whole
9300    # argument.
9301    path="$complete"
9302    arguments="EOL"
9303    new_path=`$CYGPATH -u "$path"`
9304    new_path=`$WHICH "$new_path" 2> /dev/null`
9305    # bat and cmd files are not always considered executable in cygwin causing which
9306    # to not find them
9307    if test "x$new_path" = x \
9308             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9309             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9310      new_path=`$CYGPATH -u "$path"`
9311    fi
9312    if test "x$new_path" = x; then
9313      # It's still not found. Now this is an unrecoverable error.
9314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9315$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9316      has_space=`$ECHO "$complete" | $GREP " "`
9317      if test "x$has_space" != x; then
9318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9320      fi
9321      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9322    fi
9323  fi
9324
9325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9328  # "foo.exe" is OK but "foo" is an error.
9329  #
9330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9331  # It is also a way to make sure we got the proper file name for the real test later on.
9332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9333  if test "x$test_shortpath" = x; then
9334    # Short path failed, file does not exist as specified.
9335    # Try adding .exe or .cmd
9336    if test -f "${new_path}.exe"; then
9337       input_to_shortpath="${new_path}.exe"
9338    elif test -f "${new_path}.cmd"; then
9339       input_to_shortpath="${new_path}.cmd"
9340    else
9341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9342$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9343      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9344$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9345      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9346    fi
9347  else
9348    input_to_shortpath="$new_path"
9349  fi
9350
9351  # Call helper function which possibly converts this using DOS-style short mode.
9352  # If so, the updated path is stored in $new_path.
9353  new_path="$input_to_shortpath"
9354
9355  input_path="$input_to_shortpath"
9356  # Check if we need to convert this using DOS-style short mode. If the path
9357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9358  # take no chances and rewrite it.
9359  # Note: m4 eats our [], so we need to use [ and ] instead.
9360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9361  if test "x$has_forbidden_chars" != x; then
9362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9366      # Going to short mode and back again did indeed matter. Since short mode is
9367      # case insensitive, let's make it lowercase to improve readability.
9368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9369      # Now convert it back to Unix-stile (cygpath)
9370      input_path=`$CYGPATH -u "$shortmode_path"`
9371      new_path="$input_path"
9372    fi
9373  fi
9374
9375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9376  if test "x$test_cygdrive_prefix" = x; then
9377    # As a simple fix, exclude /usr/bin since it's not a real path.
9378    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9380      # a path prefixed by /cygdrive for fixpath to work.
9381      new_path="$CYGWIN_ROOT_PATH$input_path"
9382    fi
9383  fi
9384
9385  # remove trailing .exe if any
9386  new_path="${new_path/%.exe/}"
9387
9388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9389
9390  # First separate the path from the arguments. This will split at the first
9391  # space.
9392  complete="$FOUND_MAKE"
9393  path="${complete%% *}"
9394  tmp="$complete EOL"
9395  arguments="${tmp#* }"
9396
9397  # Input might be given as Windows format, start by converting to
9398  # unix format.
9399  new_path="$path"
9400
9401  windows_path="$new_path"
9402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9403    unix_path=`$CYGPATH -u "$windows_path"`
9404    new_path="$unix_path"
9405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9407    new_path="$unix_path"
9408  fi
9409
9410
9411  # Now try to locate executable using which
9412  new_path=`$WHICH "$new_path" 2> /dev/null`
9413
9414  if test "x$new_path" = x; then
9415    # Oops. Which didn't find the executable.
9416    # The splitting of arguments from the executable at a space might have been incorrect,
9417    # since paths with space are more likely in Windows. Give it another try with the whole
9418    # argument.
9419    path="$complete"
9420    arguments="EOL"
9421    new_path="$path"
9422
9423  windows_path="$new_path"
9424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9425    unix_path=`$CYGPATH -u "$windows_path"`
9426    new_path="$unix_path"
9427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9429    new_path="$unix_path"
9430  fi
9431
9432
9433    new_path=`$WHICH "$new_path" 2> /dev/null`
9434
9435    if test "x$new_path" = x; then
9436      # It's still not found. Now this is an unrecoverable error.
9437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9438$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9439      has_space=`$ECHO "$complete" | $GREP " "`
9440      if test "x$has_space" != x; then
9441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9443      fi
9444      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9445    fi
9446  fi
9447
9448  # Now new_path has a complete unix path to the binary
9449  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9450    # Keep paths in /bin as-is, but remove trailing .exe if any
9451    new_path="${new_path/%.exe/}"
9452    # Do not save /bin paths to all_fixpath_prefixes!
9453  else
9454    # Not in mixed or Windows style, start by that.
9455    new_path=`cmd //c echo $new_path`
9456
9457  input_path="$new_path"
9458  # Check if we need to convert this using DOS-style short mode. If the path
9459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9460  # take no chances and rewrite it.
9461  # Note: m4 eats our [], so we need to use [ and ] instead.
9462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9463  if test "x$has_forbidden_chars" != x; then
9464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9466  fi
9467
9468    # Output is in $new_path
9469
9470  windows_path="$new_path"
9471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9472    unix_path=`$CYGPATH -u "$windows_path"`
9473    new_path="$unix_path"
9474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9476    new_path="$unix_path"
9477  fi
9478
9479    # remove trailing .exe if any
9480    new_path="${new_path/%.exe/}"
9481
9482    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9483    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9484  fi
9485
9486  else
9487    # We're on a posix platform. Hooray! :)
9488    # First separate the path from the arguments. This will split at the first
9489    # space.
9490    complete="$FOUND_MAKE"
9491    path="${complete%% *}"
9492    tmp="$complete EOL"
9493    arguments="${tmp#* }"
9494
9495    # Cannot rely on the command "which" here since it doesn't always work.
9496    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9497    if test -z "$is_absolute_path"; then
9498      # Path to executable is not absolute. Find it.
9499      IFS_save="$IFS"
9500      IFS=:
9501      for p in $PATH; do
9502        if test -f "$p/$path" && test -x "$p/$path"; then
9503          new_path="$p/$path"
9504          break
9505        fi
9506      done
9507      IFS="$IFS_save"
9508    else
9509      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9510$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9511      new_path="$path"
9512    fi
9513
9514    if test "x$new_path" = x; then
9515        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9516$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9517        has_space=`$ECHO "$complete" | $GREP " "`
9518        if test "x$has_space" != x; then
9519          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9520$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9521        fi
9522        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9523      fi
9524  fi
9525
9526      # Now join together the path and the arguments once again
9527      if test "x$arguments" != xEOL; then
9528        new_complete="$new_path ${arguments% *}"
9529      else
9530        new_complete="$new_path"
9531      fi
9532
9533  if test "x$complete" != "x$new_complete"; then
9534      FOUND_MAKE="$new_complete"
9535      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9536$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9537    fi
9538
9539        fi
9540      fi
9541    fi
9542  fi
9543
9544        if test "x$FOUND_MAKE" = x; then
9545          for ac_prog in make
9546do
9547  # Extract the first word of "$ac_prog", so it can be a program name with args.
9548set dummy $ac_prog; ac_word=$2
9549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9550$as_echo_n "checking for $ac_word... " >&6; }
9551if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9552  $as_echo_n "(cached) " >&6
9553else
9554  case $CHECK_TOOLSDIR_MAKE in
9555  [\\/]* | ?:[\\/]*)
9556  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9557  ;;
9558  *)
9559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9560for as_dir in $PATH
9561do
9562  IFS=$as_save_IFS
9563  test -z "$as_dir" && as_dir=.
9564    for ac_exec_ext in '' $ac_executable_extensions; do
9565  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9566    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9568    break 2
9569  fi
9570done
9571  done
9572IFS=$as_save_IFS
9573
9574  ;;
9575esac
9576fi
9577CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9578if test -n "$CHECK_TOOLSDIR_MAKE"; then
9579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9580$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9581else
9582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9583$as_echo "no" >&6; }
9584fi
9585
9586
9587  test -n "$CHECK_TOOLSDIR_MAKE" && break
9588done
9589
9590
9591  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9592  DESCRIPTION="make in tools-dir"
9593  if test "x$MAKE_CANDIDATE" != x; then
9594    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9595$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9596    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9597    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9598    if test "x$IS_GNU_MAKE" = x; then
9599      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9600$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9601    else
9602      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9603      if test "x$IS_MODERN_MAKE" = x; then
9604        { $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
9605$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;}
9606      else
9607        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9608          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9609            MAKE_EXPECTED_ENV='cygwin'
9610          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9611            MAKE_EXPECTED_ENV='msys'
9612          else
9613            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9614          fi
9615          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9616          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9617        else
9618          # Not relevant for non-Windows
9619          IS_MAKE_CORRECT_ENV=true
9620        fi
9621        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9622          { $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
9623$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;}
9624        else
9625          FOUND_MAKE=$MAKE_CANDIDATE
9626
9627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9628
9629  # First separate the path from the arguments. This will split at the first
9630  # space.
9631  complete="$FOUND_MAKE"
9632  path="${complete%% *}"
9633  tmp="$complete EOL"
9634  arguments="${tmp#* }"
9635
9636  # Input might be given as Windows format, start by converting to
9637  # unix format.
9638  new_path=`$CYGPATH -u "$path"`
9639
9640  # Now try to locate executable using which
9641  new_path=`$WHICH "$new_path" 2> /dev/null`
9642  # bat and cmd files are not always considered executable in cygwin causing which
9643  # to not find them
9644  if test "x$new_path" = x \
9645           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9646           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9647    new_path=`$CYGPATH -u "$path"`
9648  fi
9649  if test "x$new_path" = x; then
9650    # Oops. Which didn't find the executable.
9651    # The splitting of arguments from the executable at a space might have been incorrect,
9652    # since paths with space are more likely in Windows. Give it another try with the whole
9653    # argument.
9654    path="$complete"
9655    arguments="EOL"
9656    new_path=`$CYGPATH -u "$path"`
9657    new_path=`$WHICH "$new_path" 2> /dev/null`
9658    # bat and cmd files are not always considered executable in cygwin causing which
9659    # to not find them
9660    if test "x$new_path" = x \
9661             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9662             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9663      new_path=`$CYGPATH -u "$path"`
9664    fi
9665    if test "x$new_path" = x; then
9666      # It's still not found. Now this is an unrecoverable error.
9667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9668$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9669      has_space=`$ECHO "$complete" | $GREP " "`
9670      if test "x$has_space" != x; then
9671        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9672$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9673      fi
9674      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9675    fi
9676  fi
9677
9678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9681  # "foo.exe" is OK but "foo" is an error.
9682  #
9683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9684  # It is also a way to make sure we got the proper file name for the real test later on.
9685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9686  if test "x$test_shortpath" = x; then
9687    # Short path failed, file does not exist as specified.
9688    # Try adding .exe or .cmd
9689    if test -f "${new_path}.exe"; then
9690       input_to_shortpath="${new_path}.exe"
9691    elif test -f "${new_path}.cmd"; then
9692       input_to_shortpath="${new_path}.cmd"
9693    else
9694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9695$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9696      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9697$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9698      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9699    fi
9700  else
9701    input_to_shortpath="$new_path"
9702  fi
9703
9704  # Call helper function which possibly converts this using DOS-style short mode.
9705  # If so, the updated path is stored in $new_path.
9706  new_path="$input_to_shortpath"
9707
9708  input_path="$input_to_shortpath"
9709  # Check if we need to convert this using DOS-style short mode. If the path
9710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9711  # take no chances and rewrite it.
9712  # Note: m4 eats our [], so we need to use [ and ] instead.
9713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9714  if test "x$has_forbidden_chars" != x; then
9715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9716    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9717    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9718    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9719      # Going to short mode and back again did indeed matter. Since short mode is
9720      # case insensitive, let's make it lowercase to improve readability.
9721      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9722      # Now convert it back to Unix-stile (cygpath)
9723      input_path=`$CYGPATH -u "$shortmode_path"`
9724      new_path="$input_path"
9725    fi
9726  fi
9727
9728  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9729  if test "x$test_cygdrive_prefix" = x; then
9730    # As a simple fix, exclude /usr/bin since it's not a real path.
9731    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9732      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9733      # a path prefixed by /cygdrive for fixpath to work.
9734      new_path="$CYGWIN_ROOT_PATH$input_path"
9735    fi
9736  fi
9737
9738  # remove trailing .exe if any
9739  new_path="${new_path/%.exe/}"
9740
9741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9742
9743  # First separate the path from the arguments. This will split at the first
9744  # space.
9745  complete="$FOUND_MAKE"
9746  path="${complete%% *}"
9747  tmp="$complete EOL"
9748  arguments="${tmp#* }"
9749
9750  # Input might be given as Windows format, start by converting to
9751  # unix format.
9752  new_path="$path"
9753
9754  windows_path="$new_path"
9755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9756    unix_path=`$CYGPATH -u "$windows_path"`
9757    new_path="$unix_path"
9758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9760    new_path="$unix_path"
9761  fi
9762
9763
9764  # Now try to locate executable using which
9765  new_path=`$WHICH "$new_path" 2> /dev/null`
9766
9767  if test "x$new_path" = x; then
9768    # Oops. Which didn't find the executable.
9769    # The splitting of arguments from the executable at a space might have been incorrect,
9770    # since paths with space are more likely in Windows. Give it another try with the whole
9771    # argument.
9772    path="$complete"
9773    arguments="EOL"
9774    new_path="$path"
9775
9776  windows_path="$new_path"
9777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9778    unix_path=`$CYGPATH -u "$windows_path"`
9779    new_path="$unix_path"
9780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9782    new_path="$unix_path"
9783  fi
9784
9785
9786    new_path=`$WHICH "$new_path" 2> /dev/null`
9787
9788    if test "x$new_path" = x; then
9789      # It's still not found. Now this is an unrecoverable error.
9790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9791$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9792      has_space=`$ECHO "$complete" | $GREP " "`
9793      if test "x$has_space" != x; then
9794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9796      fi
9797      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9798    fi
9799  fi
9800
9801  # Now new_path has a complete unix path to the binary
9802  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9803    # Keep paths in /bin as-is, but remove trailing .exe if any
9804    new_path="${new_path/%.exe/}"
9805    # Do not save /bin paths to all_fixpath_prefixes!
9806  else
9807    # Not in mixed or Windows style, start by that.
9808    new_path=`cmd //c echo $new_path`
9809
9810  input_path="$new_path"
9811  # Check if we need to convert this using DOS-style short mode. If the path
9812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9813  # take no chances and rewrite it.
9814  # Note: m4 eats our [], so we need to use [ and ] instead.
9815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9816  if test "x$has_forbidden_chars" != x; then
9817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9819  fi
9820
9821    # Output is in $new_path
9822
9823  windows_path="$new_path"
9824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9825    unix_path=`$CYGPATH -u "$windows_path"`
9826    new_path="$unix_path"
9827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9829    new_path="$unix_path"
9830  fi
9831
9832    # remove trailing .exe if any
9833    new_path="${new_path/%.exe/}"
9834
9835    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9836    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9837  fi
9838
9839  else
9840    # We're on a posix platform. Hooray! :)
9841    # First separate the path from the arguments. This will split at the first
9842    # space.
9843    complete="$FOUND_MAKE"
9844    path="${complete%% *}"
9845    tmp="$complete EOL"
9846    arguments="${tmp#* }"
9847
9848    # Cannot rely on the command "which" here since it doesn't always work.
9849    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9850    if test -z "$is_absolute_path"; then
9851      # Path to executable is not absolute. Find it.
9852      IFS_save="$IFS"
9853      IFS=:
9854      for p in $PATH; do
9855        if test -f "$p/$path" && test -x "$p/$path"; then
9856          new_path="$p/$path"
9857          break
9858        fi
9859      done
9860      IFS="$IFS_save"
9861    else
9862      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9863$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9864      new_path="$path"
9865    fi
9866
9867    if test "x$new_path" = x; then
9868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9869$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9870        has_space=`$ECHO "$complete" | $GREP " "`
9871        if test "x$has_space" != x; then
9872          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9873$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9874        fi
9875        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9876      fi
9877  fi
9878
9879      # Now join together the path and the arguments once again
9880      if test "x$arguments" != xEOL; then
9881        new_complete="$new_path ${arguments% *}"
9882      else
9883        new_complete="$new_path"
9884      fi
9885
9886  if test "x$complete" != "x$new_complete"; then
9887      FOUND_MAKE="$new_complete"
9888      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9889$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9890    fi
9891
9892        fi
9893      fi
9894    fi
9895  fi
9896
9897        fi
9898        PATH=$OLD_PATH
9899      fi
9900    fi
9901
9902    if test "x$FOUND_MAKE" = x; then
9903      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
9904    fi
9905  fi
9906
9907  MAKE=$FOUND_MAKE
9908
9909  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9910$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9911
9912
9913
9914    # Test if find supports -delete
9915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9916$as_echo_n "checking if find supports -delete... " >&6; }
9917    FIND_DELETE="-delete"
9918
9919    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9920
9921    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9922
9923    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9924    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9925        # No, it does not.
9926        rm $DELETEDIR/TestIfFindSupportsDelete
9927        FIND_DELETE="-exec rm \{\} \+"
9928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9929$as_echo "no" >&6; }
9930    else
9931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9932$as_echo "yes" >&6; }
9933    fi
9934    rmdir $DELETEDIR
9935
9936
9937
9938# These tools might not be installed by default,
9939# need hint on how to install them.
9940
9941    for ac_prog in unzip
9942do
9943  # Extract the first word of "$ac_prog", so it can be a program name with args.
9944set dummy $ac_prog; ac_word=$2
9945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9946$as_echo_n "checking for $ac_word... " >&6; }
9947if ${ac_cv_path_UNZIP+:} false; then :
9948  $as_echo_n "(cached) " >&6
9949else
9950  case $UNZIP in
9951  [\\/]* | ?:[\\/]*)
9952  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9953  ;;
9954  *)
9955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9956for as_dir in $PATH
9957do
9958  IFS=$as_save_IFS
9959  test -z "$as_dir" && as_dir=.
9960    for ac_exec_ext in '' $ac_executable_extensions; do
9961  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9962    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9964    break 2
9965  fi
9966done
9967  done
9968IFS=$as_save_IFS
9969
9970  ;;
9971esac
9972fi
9973UNZIP=$ac_cv_path_UNZIP
9974if test -n "$UNZIP"; then
9975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9976$as_echo "$UNZIP" >&6; }
9977else
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979$as_echo "no" >&6; }
9980fi
9981
9982
9983  test -n "$UNZIP" && break
9984done
9985
9986
9987    if test "x$UNZIP" = x; then
9988        if test "xunzip" = x; then
9989          PROG_NAME=unzip
9990        else
9991          PROG_NAME=unzip
9992        fi
9993        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9994$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9995        as_fn_error $? "Cannot continue" "$LINENO" 5
9996    fi
9997
9998
9999
10000    for ac_prog in zip
10001do
10002  # Extract the first word of "$ac_prog", so it can be a program name with args.
10003set dummy $ac_prog; ac_word=$2
10004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10005$as_echo_n "checking for $ac_word... " >&6; }
10006if ${ac_cv_path_ZIP+:} false; then :
10007  $as_echo_n "(cached) " >&6
10008else
10009  case $ZIP in
10010  [\\/]* | ?:[\\/]*)
10011  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10012  ;;
10013  *)
10014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10015for as_dir in $PATH
10016do
10017  IFS=$as_save_IFS
10018  test -z "$as_dir" && as_dir=.
10019    for ac_exec_ext in '' $ac_executable_extensions; do
10020  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10021    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10023    break 2
10024  fi
10025done
10026  done
10027IFS=$as_save_IFS
10028
10029  ;;
10030esac
10031fi
10032ZIP=$ac_cv_path_ZIP
10033if test -n "$ZIP"; then
10034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10035$as_echo "$ZIP" >&6; }
10036else
10037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10038$as_echo "no" >&6; }
10039fi
10040
10041
10042  test -n "$ZIP" && break
10043done
10044
10045
10046    if test "x$ZIP" = x; then
10047        if test "xzip" = x; then
10048          PROG_NAME=zip
10049        else
10050          PROG_NAME=zip
10051        fi
10052        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10053$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10054        as_fn_error $? "Cannot continue" "$LINENO" 5
10055    fi
10056
10057
10058
10059# Non-required basic tools
10060
10061# Extract the first word of "ldd", so it can be a program name with args.
10062set dummy ldd; ac_word=$2
10063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10064$as_echo_n "checking for $ac_word... " >&6; }
10065if ${ac_cv_path_LDD+:} false; then :
10066  $as_echo_n "(cached) " >&6
10067else
10068  case $LDD in
10069  [\\/]* | ?:[\\/]*)
10070  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10071  ;;
10072  *)
10073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10074for as_dir in $PATH
10075do
10076  IFS=$as_save_IFS
10077  test -z "$as_dir" && as_dir=.
10078    for ac_exec_ext in '' $ac_executable_extensions; do
10079  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10080    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10082    break 2
10083  fi
10084done
10085  done
10086IFS=$as_save_IFS
10087
10088  ;;
10089esac
10090fi
10091LDD=$ac_cv_path_LDD
10092if test -n "$LDD"; then
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10094$as_echo "$LDD" >&6; }
10095else
10096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10097$as_echo "no" >&6; }
10098fi
10099
10100
10101if test "x$LDD" = "x"; then
10102    # List shared lib dependencies is used for
10103    # debug output and checking for forbidden dependencies.
10104    # We can build without it.
10105    LDD="true"
10106fi
10107# Extract the first word of "otool", so it can be a program name with args.
10108set dummy otool; ac_word=$2
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10110$as_echo_n "checking for $ac_word... " >&6; }
10111if ${ac_cv_path_OTOOL+:} false; then :
10112  $as_echo_n "(cached) " >&6
10113else
10114  case $OTOOL in
10115  [\\/]* | ?:[\\/]*)
10116  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10117  ;;
10118  *)
10119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10120for as_dir in $PATH
10121do
10122  IFS=$as_save_IFS
10123  test -z "$as_dir" && as_dir=.
10124    for ac_exec_ext in '' $ac_executable_extensions; do
10125  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10126    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10128    break 2
10129  fi
10130done
10131  done
10132IFS=$as_save_IFS
10133
10134  ;;
10135esac
10136fi
10137OTOOL=$ac_cv_path_OTOOL
10138if test -n "$OTOOL"; then
10139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10140$as_echo "$OTOOL" >&6; }
10141else
10142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10143$as_echo "no" >&6; }
10144fi
10145
10146
10147if test "x$OTOOL" = "x"; then
10148   OTOOL="true"
10149fi
10150for ac_prog in readelf greadelf
10151do
10152  # Extract the first word of "$ac_prog", so it can be a program name with args.
10153set dummy $ac_prog; ac_word=$2
10154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10155$as_echo_n "checking for $ac_word... " >&6; }
10156if ${ac_cv_path_READELF+:} false; then :
10157  $as_echo_n "(cached) " >&6
10158else
10159  case $READELF in
10160  [\\/]* | ?:[\\/]*)
10161  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10162  ;;
10163  *)
10164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10165for as_dir in $PATH
10166do
10167  IFS=$as_save_IFS
10168  test -z "$as_dir" && as_dir=.
10169    for ac_exec_ext in '' $ac_executable_extensions; do
10170  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10171    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10173    break 2
10174  fi
10175done
10176  done
10177IFS=$as_save_IFS
10178
10179  ;;
10180esac
10181fi
10182READELF=$ac_cv_path_READELF
10183if test -n "$READELF"; then
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10185$as_echo "$READELF" >&6; }
10186else
10187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10188$as_echo "no" >&6; }
10189fi
10190
10191
10192  test -n "$READELF" && break
10193done
10194
10195# Extract the first word of "hg", so it can be a program name with args.
10196set dummy hg; ac_word=$2
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10198$as_echo_n "checking for $ac_word... " >&6; }
10199if ${ac_cv_path_HG+:} false; then :
10200  $as_echo_n "(cached) " >&6
10201else
10202  case $HG in
10203  [\\/]* | ?:[\\/]*)
10204  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10205  ;;
10206  *)
10207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10208for as_dir in $PATH
10209do
10210  IFS=$as_save_IFS
10211  test -z "$as_dir" && as_dir=.
10212    for ac_exec_ext in '' $ac_executable_extensions; do
10213  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10214    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10216    break 2
10217  fi
10218done
10219  done
10220IFS=$as_save_IFS
10221
10222  ;;
10223esac
10224fi
10225HG=$ac_cv_path_HG
10226if test -n "$HG"; then
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10228$as_echo "$HG" >&6; }
10229else
10230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231$as_echo "no" >&6; }
10232fi
10233
10234
10235# Extract the first word of "stat", so it can be a program name with args.
10236set dummy stat; ac_word=$2
10237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10238$as_echo_n "checking for $ac_word... " >&6; }
10239if ${ac_cv_path_STAT+:} false; then :
10240  $as_echo_n "(cached) " >&6
10241else
10242  case $STAT in
10243  [\\/]* | ?:[\\/]*)
10244  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10245  ;;
10246  *)
10247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10248for as_dir in $PATH
10249do
10250  IFS=$as_save_IFS
10251  test -z "$as_dir" && as_dir=.
10252    for ac_exec_ext in '' $ac_executable_extensions; do
10253  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10254    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10256    break 2
10257  fi
10258done
10259  done
10260IFS=$as_save_IFS
10261
10262  ;;
10263esac
10264fi
10265STAT=$ac_cv_path_STAT
10266if test -n "$STAT"; then
10267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10268$as_echo "$STAT" >&6; }
10269else
10270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10271$as_echo "no" >&6; }
10272fi
10273
10274
10275# Extract the first word of "time", so it can be a program name with args.
10276set dummy time; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if ${ac_cv_path_TIME+:} false; then :
10280  $as_echo_n "(cached) " >&6
10281else
10282  case $TIME in
10283  [\\/]* | ?:[\\/]*)
10284  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10285  ;;
10286  *)
10287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290  IFS=$as_save_IFS
10291  test -z "$as_dir" && as_dir=.
10292    for ac_exec_ext in '' $ac_executable_extensions; do
10293  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10294    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296    break 2
10297  fi
10298done
10299  done
10300IFS=$as_save_IFS
10301
10302  ;;
10303esac
10304fi
10305TIME=$ac_cv_path_TIME
10306if test -n "$TIME"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10308$as_echo "$TIME" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315
10316if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10317
10318    for ac_prog in comm
10319do
10320  # Extract the first word of "$ac_prog", so it can be a program name with args.
10321set dummy $ac_prog; ac_word=$2
10322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10323$as_echo_n "checking for $ac_word... " >&6; }
10324if ${ac_cv_path_COMM+:} false; then :
10325  $as_echo_n "(cached) " >&6
10326else
10327  case $COMM in
10328  [\\/]* | ?:[\\/]*)
10329  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10330  ;;
10331  *)
10332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10333for as_dir in $PATH
10334do
10335  IFS=$as_save_IFS
10336  test -z "$as_dir" && as_dir=.
10337    for ac_exec_ext in '' $ac_executable_extensions; do
10338  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10339    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10341    break 2
10342  fi
10343done
10344  done
10345IFS=$as_save_IFS
10346
10347  ;;
10348esac
10349fi
10350COMM=$ac_cv_path_COMM
10351if test -n "$COMM"; then
10352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10353$as_echo "$COMM" >&6; }
10354else
10355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10356$as_echo "no" >&6; }
10357fi
10358
10359
10360  test -n "$COMM" && break
10361done
10362
10363
10364    if test "x$COMM" = x; then
10365        if test "xcomm" = x; then
10366          PROG_NAME=comm
10367        else
10368          PROG_NAME=comm
10369        fi
10370        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10371$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10372        as_fn_error $? "Cannot continue" "$LINENO" 5
10373    fi
10374
10375
10376fi
10377
10378
10379# Check if pkg-config is available.
10380
10381
10382if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10383	if test -n "$ac_tool_prefix"; then
10384  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10385set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10387$as_echo_n "checking for $ac_word... " >&6; }
10388if ${ac_cv_path_PKG_CONFIG+:} false; then :
10389  $as_echo_n "(cached) " >&6
10390else
10391  case $PKG_CONFIG in
10392  [\\/]* | ?:[\\/]*)
10393  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10394  ;;
10395  *)
10396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10397for as_dir in $PATH
10398do
10399  IFS=$as_save_IFS
10400  test -z "$as_dir" && as_dir=.
10401    for ac_exec_ext in '' $ac_executable_extensions; do
10402  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10403    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10405    break 2
10406  fi
10407done
10408  done
10409IFS=$as_save_IFS
10410
10411  ;;
10412esac
10413fi
10414PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10415if test -n "$PKG_CONFIG"; then
10416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10417$as_echo "$PKG_CONFIG" >&6; }
10418else
10419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10420$as_echo "no" >&6; }
10421fi
10422
10423
10424fi
10425if test -z "$ac_cv_path_PKG_CONFIG"; then
10426  ac_pt_PKG_CONFIG=$PKG_CONFIG
10427  # Extract the first word of "pkg-config", so it can be a program name with args.
10428set dummy pkg-config; ac_word=$2
10429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10430$as_echo_n "checking for $ac_word... " >&6; }
10431if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10432  $as_echo_n "(cached) " >&6
10433else
10434  case $ac_pt_PKG_CONFIG in
10435  [\\/]* | ?:[\\/]*)
10436  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10437  ;;
10438  *)
10439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10440for as_dir in $PATH
10441do
10442  IFS=$as_save_IFS
10443  test -z "$as_dir" && as_dir=.
10444    for ac_exec_ext in '' $ac_executable_extensions; do
10445  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10446    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10448    break 2
10449  fi
10450done
10451  done
10452IFS=$as_save_IFS
10453
10454  ;;
10455esac
10456fi
10457ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10458if test -n "$ac_pt_PKG_CONFIG"; then
10459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10460$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10461else
10462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10463$as_echo "no" >&6; }
10464fi
10465
10466  if test "x$ac_pt_PKG_CONFIG" = x; then
10467    PKG_CONFIG=""
10468  else
10469    case $cross_compiling:$ac_tool_warned in
10470yes:)
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10472$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10473ac_tool_warned=yes ;;
10474esac
10475    PKG_CONFIG=$ac_pt_PKG_CONFIG
10476  fi
10477else
10478  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10479fi
10480
10481fi
10482if test -n "$PKG_CONFIG"; then
10483	_pkg_min_version=0.9.0
10484	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10485$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10486	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10487		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10488$as_echo "yes" >&6; }
10489	else
10490		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10491$as_echo "no" >&6; }
10492		PKG_CONFIG=""
10493	fi
10494
10495fi
10496
10497# After basic tools have been setup, we can check build os specific details.
10498
10499###############################################################################
10500
10501# Note that this is the build platform OS version!
10502
10503OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10504OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10505OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10506OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10507
10508
10509
10510
10511
10512# Setup builddeps, for automatic downloading of tools we need.
10513# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10514# boot-jdk setup, but we need to have basic tools setup first.
10515
10516
10517# Check whether --with-builddeps-conf was given.
10518if test "${with_builddeps_conf+set}" = set; then :
10519  withval=$with_builddeps_conf;
10520fi
10521
10522
10523
10524# Check whether --with-builddeps-server was given.
10525if test "${with_builddeps_server+set}" = set; then :
10526  withval=$with_builddeps_server;
10527fi
10528
10529
10530
10531# Check whether --with-builddeps-dir was given.
10532if test "${with_builddeps_dir+set}" = set; then :
10533  withval=$with_builddeps_dir;
10534else
10535  with_builddeps_dir=/localhome/builddeps
10536fi
10537
10538
10539
10540# Check whether --with-builddeps-group was given.
10541if test "${with_builddeps_group+set}" = set; then :
10542  withval=$with_builddeps_group;
10543fi
10544
10545
10546
10547
10548    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10549        if test "x$with_builddeps_conf" != x; then
10550            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10551$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10552            builddepsfile=$with_builddeps_conf
10553            if test -s $builddepsfile; then
10554                . $builddepsfile
10555                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10556$as_echo "loaded!" >&6; }
10557            else
10558               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10559           fi
10560        else
10561            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10562$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10563            builddepsfile=`mktemp`
10564            touch $builddepsfile
10565            # Put all found confs into a single file.
10566            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10567            # Source the file to acquire the variables
10568            if test -s $builddepsfile; then
10569                . $builddepsfile
10570                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10571$as_echo "found at least one!" >&6; }
10572            else
10573               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10574           fi
10575        fi
10576        # Create build and target names that use _ instead of "-" and ".".
10577        # This is necessary to use them in variable names.
10578        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10579        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10580        # Extract rewrite information for build and target
10581        eval rewritten_build=\${REWRITE_${build_var}}
10582        if test "x$rewritten_build" = x; then
10583            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10584            echo Build stays the same $rewritten_build
10585        else
10586            echo Rewriting build for builddeps into $rewritten_build
10587        fi
10588        eval rewritten_target=\${REWRITE_${target_var}}
10589        if test "x$rewritten_target" = x; then
10590            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10591            echo Target stays the same $rewritten_target
10592        else
10593            echo Rewriting target for builddeps into $rewritten_target
10594        fi
10595        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10596        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10597    fi
10598    for ac_prog in 7z unzip
10599do
10600  # Extract the first word of "$ac_prog", so it can be a program name with args.
10601set dummy $ac_prog; ac_word=$2
10602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10603$as_echo_n "checking for $ac_word... " >&6; }
10604if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10605  $as_echo_n "(cached) " >&6
10606else
10607  if test -n "$BDEPS_UNZIP"; then
10608  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10609else
10610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10611for as_dir in $PATH
10612do
10613  IFS=$as_save_IFS
10614  test -z "$as_dir" && as_dir=.
10615    for ac_exec_ext in '' $ac_executable_extensions; do
10616  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10617    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10619    break 2
10620  fi
10621done
10622  done
10623IFS=$as_save_IFS
10624
10625fi
10626fi
10627BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10628if test -n "$BDEPS_UNZIP"; then
10629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10630$as_echo "$BDEPS_UNZIP" >&6; }
10631else
10632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10633$as_echo "no" >&6; }
10634fi
10635
10636
10637  test -n "$BDEPS_UNZIP" && break
10638done
10639
10640    if test "x$BDEPS_UNZIP" = x7z; then
10641        BDEPS_UNZIP="7z x"
10642    fi
10643
10644    for ac_prog in wget lftp ftp
10645do
10646  # Extract the first word of "$ac_prog", so it can be a program name with args.
10647set dummy $ac_prog; ac_word=$2
10648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10649$as_echo_n "checking for $ac_word... " >&6; }
10650if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10651  $as_echo_n "(cached) " >&6
10652else
10653  if test -n "$BDEPS_FTP"; then
10654  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10655else
10656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10657for as_dir in $PATH
10658do
10659  IFS=$as_save_IFS
10660  test -z "$as_dir" && as_dir=.
10661    for ac_exec_ext in '' $ac_executable_extensions; do
10662  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10663    ac_cv_prog_BDEPS_FTP="$ac_prog"
10664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10665    break 2
10666  fi
10667done
10668  done
10669IFS=$as_save_IFS
10670
10671fi
10672fi
10673BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10674if test -n "$BDEPS_FTP"; then
10675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10676$as_echo "$BDEPS_FTP" >&6; }
10677else
10678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10679$as_echo "no" >&6; }
10680fi
10681
10682
10683  test -n "$BDEPS_FTP" && break
10684done
10685
10686
10687
10688###############################################################################
10689#
10690# Determine OpenJDK variants, options and version numbers.
10691#
10692###############################################################################
10693
10694# We need build & target for this.
10695
10696
10697###############################################################################
10698#
10699# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10700# We always build headless support.
10701#
10702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10703$as_echo_n "checking headful support... " >&6; }
10704# Check whether --enable-headful was given.
10705if test "${enable_headful+set}" = set; then :
10706  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10707else
10708  SUPPORT_HEADFUL=yes
10709fi
10710
10711
10712SUPPORT_HEADLESS=yes
10713BUILD_HEADLESS="BUILD_HEADLESS:=true"
10714
10715if test "x$SUPPORT_HEADFUL" = xyes; then
10716    # We are building both headful and headless.
10717    headful_msg="inlude support for both headful and headless"
10718fi
10719
10720if test "x$SUPPORT_HEADFUL" = xno; then
10721    # Thus we are building headless only.
10722    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10723    headful_msg="headless only"
10724fi
10725
10726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10727$as_echo "$headful_msg" >&6; }
10728
10729
10730
10731
10732
10733# Control wether Hotspot runs Queens test after build.
10734# Check whether --enable-hotspot-test-in-build was given.
10735if test "${enable_hotspot_test_in_build+set}" = set; then :
10736  enableval=$enable_hotspot_test_in_build;
10737else
10738  enable_hotspot_test_in_build=no
10739fi
10740
10741if test "x$enable_hotspot_test_in_build" = "xyes"; then
10742    TEST_IN_BUILD=true
10743else
10744    TEST_IN_BUILD=false
10745fi
10746
10747
10748###############################################################################
10749#
10750# Choose cacerts source file
10751#
10752
10753# Check whether --with-cacerts-file was given.
10754if test "${with_cacerts_file+set}" = set; then :
10755  withval=$with_cacerts_file;
10756fi
10757
10758if test "x$with_cacerts_file" != x; then
10759    CACERTS_FILE=$with_cacerts_file
10760else
10761    if test "x$OPENJDK" = "xtrue"; then
10762        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10763    else
10764        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10765    fi
10766fi
10767
10768
10769###############################################################################
10770#
10771# Enable or disable unlimited crypto
10772#
10773# Check whether --enable-unlimited-crypto was given.
10774if test "${enable_unlimited_crypto+set}" = set; then :
10775  enableval=$enable_unlimited_crypto;
10776else
10777  enable_unlimited_crypto=no
10778fi
10779
10780if test "x$enable_unlimited_crypto" = "xyes"; then
10781    UNLIMITED_CRYPTO=true
10782else
10783    UNLIMITED_CRYPTO=false
10784fi
10785
10786
10787###############################################################################
10788#
10789# Compress jars
10790#
10791COMPRESS_JARS=false
10792
10793
10794
10795
10796# Source the version numbers
10797. $AUTOCONF_DIR/version-numbers
10798
10799# Get the settings from parameters
10800
10801# Check whether --with-milestone was given.
10802if test "${with_milestone+set}" = set; then :
10803  withval=$with_milestone;
10804fi
10805
10806if test "x$with_milestone" = xyes; then
10807  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10808elif test "x$with_milestone" != x; then
10809    MILESTONE="$with_milestone"
10810fi
10811if test "x$MILESTONE" = x; then
10812  MILESTONE=internal
10813fi
10814
10815
10816# Check whether --with-build-number was given.
10817if test "${with_build_number+set}" = set; then :
10818  withval=$with_build_number;
10819fi
10820
10821if test "x$with_build_number" = xyes; then
10822  as_fn_error $? "Build number must have a value" "$LINENO" 5
10823elif test "x$with_build_number" != x; then
10824  JDK_BUILD_NUMBER="$with_build_number"
10825fi
10826if test "x$JDK_BUILD_NUMBER" = x; then
10827  JDK_BUILD_NUMBER=b00
10828fi
10829
10830
10831# Check whether --with-user-release-suffix was given.
10832if test "${with_user_release_suffix+set}" = set; then :
10833  withval=$with_user_release_suffix;
10834fi
10835
10836if test "x$with_user_release_suffix" = xyes; then
10837  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10838elif test "x$with_user_release_suffix" != x; then
10839  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10840else
10841  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10842  # Avoid [:alnum:] since it depends on the locale.
10843  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10844  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10845fi
10846
10847
10848# Now set the JDK version, milestone, build number etc.
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863COPYRIGHT_YEAR=`date +'%Y'`
10864
10865
10866if test "x$JDK_UPDATE_VERSION" != x; then
10867  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10868else
10869  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10870fi
10871
10872
10873COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10874
10875
10876
10877###############################################################################
10878#
10879# Setup BootJDK, used to bootstrap the build.
10880#
10881###############################################################################
10882
10883
10884BOOT_JDK_FOUND=no
10885
10886# Check whether --with-boot-jdk was given.
10887if test "${with_boot_jdk+set}" = set; then :
10888  withval=$with_boot_jdk;
10889fi
10890
10891
10892# We look for the Boot JDK through various means, going from more certain to
10893# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10894# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10895# must check if this is indeed valid; otherwise we'll continue looking.
10896
10897# Test: Is bootjdk explicitely set by command line arguments?
10898
10899  if test "x$BOOT_JDK_FOUND" = xno; then
10900    # Now execute the test
10901
10902if test "x$with_boot_jdk" != x; then
10903    BOOT_JDK=$with_boot_jdk
10904    BOOT_JDK_FOUND=maybe
10905    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10906$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10907fi
10908
10909
10910    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10911    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10912      # Do we have a bin/java?
10913      if test ! -x "$BOOT_JDK/bin/java"; then
10914        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10916        BOOT_JDK_FOUND=no
10917      else
10918        # Do we have a bin/javac?
10919        if test ! -x "$BOOT_JDK/bin/javac"; then
10920          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10922          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10923$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10924          BOOT_JDK_FOUND=no
10925        else
10926          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10927          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10928            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10930            BOOT_JDK_FOUND=no
10931          else
10932            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10933            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10934
10935            # Extra M4 quote needed to protect [] in grep expression.
10936            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10937            if test "x$FOUND_VERSION_78" = x; then
10938              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10940              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10941$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10942              BOOT_JDK_FOUND=no
10943            else
10944              # We're done! :-)
10945              BOOT_JDK_FOUND=yes
10946
10947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10948
10949  # Input might be given as Windows format, start by converting to
10950  # unix format.
10951  path="$BOOT_JDK"
10952  new_path=`$CYGPATH -u "$path"`
10953
10954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10957  # "foo.exe" is OK but "foo" is an error.
10958  #
10959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10960  # It is also a way to make sure we got the proper file name for the real test later on.
10961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10962  if test "x$test_shortpath" = x; then
10963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10964$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10965    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10966  fi
10967
10968  # Call helper function which possibly converts this using DOS-style short mode.
10969  # If so, the updated path is stored in $new_path.
10970
10971  input_path="$new_path"
10972  # Check if we need to convert this using DOS-style short mode. If the path
10973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10974  # take no chances and rewrite it.
10975  # Note: m4 eats our [], so we need to use [ and ] instead.
10976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10977  if test "x$has_forbidden_chars" != x; then
10978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10982      # Going to short mode and back again did indeed matter. Since short mode is
10983      # case insensitive, let's make it lowercase to improve readability.
10984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10985      # Now convert it back to Unix-stile (cygpath)
10986      input_path=`$CYGPATH -u "$shortmode_path"`
10987      new_path="$input_path"
10988    fi
10989  fi
10990
10991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10992  if test "x$test_cygdrive_prefix" = x; then
10993    # As a simple fix, exclude /usr/bin since it's not a real path.
10994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10996      # a path prefixed by /cygdrive for fixpath to work.
10997      new_path="$CYGWIN_ROOT_PATH$input_path"
10998    fi
10999  fi
11000
11001
11002  if test "x$path" != "x$new_path"; then
11003    BOOT_JDK="$new_path"
11004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11005$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11006  fi
11007
11008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11009
11010  path="$BOOT_JDK"
11011  has_colon=`$ECHO $path | $GREP ^.:`
11012  new_path="$path"
11013  if test "x$has_colon" = x; then
11014    # Not in mixed or Windows style, start by that.
11015    new_path=`cmd //c echo $path`
11016  fi
11017
11018
11019  input_path="$new_path"
11020  # Check if we need to convert this using DOS-style short mode. If the path
11021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11022  # take no chances and rewrite it.
11023  # Note: m4 eats our [], so we need to use [ and ] instead.
11024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11025  if test "x$has_forbidden_chars" != x; then
11026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11028  fi
11029
11030
11031  windows_path="$new_path"
11032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11033    unix_path=`$CYGPATH -u "$windows_path"`
11034    new_path="$unix_path"
11035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11037    new_path="$unix_path"
11038  fi
11039
11040  if test "x$path" != "x$new_path"; then
11041    BOOT_JDK="$new_path"
11042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11043$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11044  fi
11045
11046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11048
11049  else
11050    # We're on a posix platform. Hooray! :)
11051    path="$BOOT_JDK"
11052
11053    if test ! -f "$path" && test ! -d "$path"; then
11054      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11055    fi
11056
11057    has_space=`$ECHO "$path" | $GREP " "`
11058    if test "x$has_space" != x; then
11059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11061      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11062    fi
11063  fi
11064
11065              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11066$as_echo_n "checking for Boot JDK... " >&6; }
11067              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11068$as_echo "$BOOT_JDK" >&6; }
11069              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11070$as_echo_n "checking Boot JDK version... " >&6; }
11071              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11072              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11073$as_echo "$BOOT_JDK_VERSION" >&6; }
11074            fi # end check jdk version
11075          fi # end check rt.jar
11076        fi # end check javac
11077      fi # end check java
11078    fi # end check boot jdk found
11079  fi
11080
11081if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11082  # Having specified an argument which is incorrect will produce an instant failure;
11083  # we should not go on looking
11084  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11085fi
11086
11087# Test: Is bootjdk available from builddeps?
11088
11089  if test "x$BOOT_JDK_FOUND" = xno; then
11090    # Now execute the test
11091
11092
11093
11094    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11095        # Source the builddeps file again, to make sure it uses the latest variables!
11096        . $builddepsfile
11097        # Look for a target and build machine specific resource!
11098        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11099        if test "x$resource" = x; then
11100            # Ok, lets instead look for a target specific resource
11101            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11102        fi
11103        if test "x$resource" = x; then
11104            # Ok, lets instead look for a build specific resource
11105            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11106        fi
11107        if test "x$resource" = x; then
11108            # Ok, lets instead look for a generic resource
11109            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11110            resource=${builddep_bootjdk}
11111        fi
11112        if test "x$resource" != x; then
11113            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11114$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11115	    # If the resource in the builddeps.conf file is an existing directory,
11116	    # for example /java/linux/cups
11117	    if test -d ${resource}; then
11118	       depdir=${resource}
11119	    else
11120
11121# bootjdk is for example mymodule
11122# $resource is for example libs/general/libmymod_1_2_3.zip
11123# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11124# $with_builddeps_dir is for example /localhome/builddeps
11125# depdir is the name of the variable into which we store the depdir, eg MYMOD
11126# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11127# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11128    filename=`basename $resource`
11129    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11130    filebase=${filename%%.*}
11131    extension=${filename#*.}
11132    installdir=$with_builddeps_dir/$filebase
11133    if test ! -f $installdir/$filename.unpacked; then
11134        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11135$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11136        if test ! -d $installdir; then
11137            mkdir -p $installdir
11138        fi
11139        if test ! -d $installdir; then
11140            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11141        fi
11142        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11143        touch $tmpfile
11144        if test ! -f $tmpfile; then
11145            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11146        fi
11147
11148    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11149    # $tmpfile is the local file name for the downloaded file.
11150    VALID_TOOL=no
11151    if test "x$BDEPS_FTP" = xwget; then
11152       VALID_TOOL=yes
11153       wget -O $tmpfile $with_builddeps_server/$resource
11154    fi
11155    if test "x$BDEPS_FTP" = xlftp; then
11156       VALID_TOOL=yes
11157       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11158    fi
11159    if test "x$BDEPS_FTP" = xftp; then
11160        VALID_TOOL=yes
11161        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11162        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11163        FTPUSERPWD=${FTPSERVER%%@*}
11164        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11165            FTPUSER=${userpwd%%:*}
11166            FTPPWD=${userpwd#*@}
11167            FTPSERVER=${FTPSERVER#*@}
11168        else
11169            FTPUSER=ftp
11170            FTPPWD=ftp
11171        fi
11172        # the "pass" command does not work on some
11173        # ftp clients (read ftp.exe) but if it works,
11174        # passive mode is better!
11175        (\
11176            echo "user $FTPUSER $FTPPWD"        ;\
11177            echo "pass"                         ;\
11178            echo "bin"                          ;\
11179            echo "get $FTPPATH $tmpfile"              ;\
11180        ) | ftp -in $FTPSERVER
11181    fi
11182    if test "x$VALID_TOOL" != xyes; then
11183       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11184    fi
11185
11186        mv $tmpfile $installdir/$filename
11187        if test ! -s $installdir/$filename; then
11188            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11189        fi
11190        case "$extension" in
11191            zip)  echo "Unzipping $installdir/$filename..."
11192               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11193            ;;
11194            tar.gz) echo "Untaring $installdir/$filename..."
11195               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11196            ;;
11197            tgz) echo "Untaring $installdir/$filename..."
11198               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11199            ;;
11200            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11201            ;;
11202        esac
11203    fi
11204    if test -f $installdir/$filename.unpacked; then
11205        depdir=$installdir
11206    fi
11207
11208	    fi
11209            # Source the builddeps file again, because in the previous command, the depdir
11210            # was updated to point at the current build dependency install directory.
11211            . $builddepsfile
11212            # Now extract variables from the builddeps.conf files.
11213            theroot=${builddep_bootjdk_ROOT}
11214            thecflags=${builddep_bootjdk_CFLAGS}
11215            thelibs=${builddep_bootjdk_LIBS}
11216            if test "x$depdir" = x; then
11217                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11218            fi
11219            BOOT_JDK=$depdir
11220            if test "x$theroot" != x; then
11221               BOOT_JDK="$theroot"
11222            fi
11223            if test "x$thecflags" != x; then
11224               BOOT_JDK_CFLAGS="$thecflags"
11225            fi
11226            if test "x$thelibs" != x; then
11227               BOOT_JDK_LIBS="$thelibs"
11228            fi
11229            BOOT_JDK_FOUND=maybe
11230            else BOOT_JDK_FOUND=no
11231
11232        fi
11233        else BOOT_JDK_FOUND=no
11234
11235    fi
11236
11237
11238
11239    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11240    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11241      # Do we have a bin/java?
11242      if test ! -x "$BOOT_JDK/bin/java"; then
11243        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11245        BOOT_JDK_FOUND=no
11246      else
11247        # Do we have a bin/javac?
11248        if test ! -x "$BOOT_JDK/bin/javac"; then
11249          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11251          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11252$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11253          BOOT_JDK_FOUND=no
11254        else
11255          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11256          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11257            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11259            BOOT_JDK_FOUND=no
11260          else
11261            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11262            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11263
11264            # Extra M4 quote needed to protect [] in grep expression.
11265            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11266            if test "x$FOUND_VERSION_78" = x; then
11267              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11269              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11270$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11271              BOOT_JDK_FOUND=no
11272            else
11273              # We're done! :-)
11274              BOOT_JDK_FOUND=yes
11275
11276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11277
11278  # Input might be given as Windows format, start by converting to
11279  # unix format.
11280  path="$BOOT_JDK"
11281  new_path=`$CYGPATH -u "$path"`
11282
11283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11286  # "foo.exe" is OK but "foo" is an error.
11287  #
11288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11289  # It is also a way to make sure we got the proper file name for the real test later on.
11290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11291  if test "x$test_shortpath" = x; then
11292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11294    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11295  fi
11296
11297  # Call helper function which possibly converts this using DOS-style short mode.
11298  # If so, the updated path is stored in $new_path.
11299
11300  input_path="$new_path"
11301  # Check if we need to convert this using DOS-style short mode. If the path
11302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11303  # take no chances and rewrite it.
11304  # Note: m4 eats our [], so we need to use [ and ] instead.
11305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11306  if test "x$has_forbidden_chars" != x; then
11307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11311      # Going to short mode and back again did indeed matter. Since short mode is
11312      # case insensitive, let's make it lowercase to improve readability.
11313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11314      # Now convert it back to Unix-stile (cygpath)
11315      input_path=`$CYGPATH -u "$shortmode_path"`
11316      new_path="$input_path"
11317    fi
11318  fi
11319
11320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11321  if test "x$test_cygdrive_prefix" = x; then
11322    # As a simple fix, exclude /usr/bin since it's not a real path.
11323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11325      # a path prefixed by /cygdrive for fixpath to work.
11326      new_path="$CYGWIN_ROOT_PATH$input_path"
11327    fi
11328  fi
11329
11330
11331  if test "x$path" != "x$new_path"; then
11332    BOOT_JDK="$new_path"
11333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11334$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11335  fi
11336
11337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11338
11339  path="$BOOT_JDK"
11340  has_colon=`$ECHO $path | $GREP ^.:`
11341  new_path="$path"
11342  if test "x$has_colon" = x; then
11343    # Not in mixed or Windows style, start by that.
11344    new_path=`cmd //c echo $path`
11345  fi
11346
11347
11348  input_path="$new_path"
11349  # Check if we need to convert this using DOS-style short mode. If the path
11350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11351  # take no chances and rewrite it.
11352  # Note: m4 eats our [], so we need to use [ and ] instead.
11353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11354  if test "x$has_forbidden_chars" != x; then
11355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11357  fi
11358
11359
11360  windows_path="$new_path"
11361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11362    unix_path=`$CYGPATH -u "$windows_path"`
11363    new_path="$unix_path"
11364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11366    new_path="$unix_path"
11367  fi
11368
11369  if test "x$path" != "x$new_path"; then
11370    BOOT_JDK="$new_path"
11371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11372$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11373  fi
11374
11375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11377
11378  else
11379    # We're on a posix platform. Hooray! :)
11380    path="$BOOT_JDK"
11381
11382    if test ! -f "$path" && test ! -d "$path"; then
11383      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11384    fi
11385
11386    has_space=`$ECHO "$path" | $GREP " "`
11387    if test "x$has_space" != x; then
11388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11389$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11390      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11391    fi
11392  fi
11393
11394              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11395$as_echo_n "checking for Boot JDK... " >&6; }
11396              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11397$as_echo "$BOOT_JDK" >&6; }
11398              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11399$as_echo_n "checking Boot JDK version... " >&6; }
11400              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11401              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11402$as_echo "$BOOT_JDK_VERSION" >&6; }
11403            fi # end check jdk version
11404          fi # end check rt.jar
11405        fi # end check javac
11406      fi # end check java
11407    fi # end check boot jdk found
11408  fi
11409
11410
11411# Test: Is $JAVA_HOME set?
11412
11413  if test "x$BOOT_JDK_FOUND" = xno; then
11414    # Now execute the test
11415
11416    if test "x$JAVA_HOME" != x; then
11417        JAVA_HOME_PROCESSED="$JAVA_HOME"
11418
11419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11420
11421  # Input might be given as Windows format, start by converting to
11422  # unix format.
11423  path="$JAVA_HOME_PROCESSED"
11424  new_path=`$CYGPATH -u "$path"`
11425
11426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11429  # "foo.exe" is OK but "foo" is an error.
11430  #
11431  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11432  # It is also a way to make sure we got the proper file name for the real test later on.
11433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11434  if test "x$test_shortpath" = x; then
11435    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11436$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11437    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11438  fi
11439
11440  # Call helper function which possibly converts this using DOS-style short mode.
11441  # If so, the updated path is stored in $new_path.
11442
11443  input_path="$new_path"
11444  # Check if we need to convert this using DOS-style short mode. If the path
11445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11446  # take no chances and rewrite it.
11447  # Note: m4 eats our [], so we need to use [ and ] instead.
11448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11449  if test "x$has_forbidden_chars" != x; then
11450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11454      # Going to short mode and back again did indeed matter. Since short mode is
11455      # case insensitive, let's make it lowercase to improve readability.
11456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11457      # Now convert it back to Unix-stile (cygpath)
11458      input_path=`$CYGPATH -u "$shortmode_path"`
11459      new_path="$input_path"
11460    fi
11461  fi
11462
11463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11464  if test "x$test_cygdrive_prefix" = x; then
11465    # As a simple fix, exclude /usr/bin since it's not a real path.
11466    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11468      # a path prefixed by /cygdrive for fixpath to work.
11469      new_path="$CYGWIN_ROOT_PATH$input_path"
11470    fi
11471  fi
11472
11473
11474  if test "x$path" != "x$new_path"; then
11475    JAVA_HOME_PROCESSED="$new_path"
11476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11477$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11478  fi
11479
11480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11481
11482  path="$JAVA_HOME_PROCESSED"
11483  has_colon=`$ECHO $path | $GREP ^.:`
11484  new_path="$path"
11485  if test "x$has_colon" = x; then
11486    # Not in mixed or Windows style, start by that.
11487    new_path=`cmd //c echo $path`
11488  fi
11489
11490
11491  input_path="$new_path"
11492  # Check if we need to convert this using DOS-style short mode. If the path
11493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11494  # take no chances and rewrite it.
11495  # Note: m4 eats our [], so we need to use [ and ] instead.
11496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11497  if test "x$has_forbidden_chars" != x; then
11498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11500  fi
11501
11502
11503  windows_path="$new_path"
11504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11505    unix_path=`$CYGPATH -u "$windows_path"`
11506    new_path="$unix_path"
11507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11509    new_path="$unix_path"
11510  fi
11511
11512  if test "x$path" != "x$new_path"; then
11513    JAVA_HOME_PROCESSED="$new_path"
11514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11515$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11516  fi
11517
11518  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11519  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11520
11521  else
11522    # We're on a posix platform. Hooray! :)
11523    path="$JAVA_HOME_PROCESSED"
11524
11525    if test ! -f "$path" && test ! -d "$path"; then
11526      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11527    fi
11528
11529    has_space=`$ECHO "$path" | $GREP " "`
11530    if test "x$has_space" != x; then
11531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11532$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11533      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11534    fi
11535  fi
11536
11537        if test ! -d "$JAVA_HOME_PROCESSED"; then
11538            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11539$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11540        else
11541          # Aha, the user has set a JAVA_HOME
11542          # let us use that as the Boot JDK.
11543          BOOT_JDK="$JAVA_HOME_PROCESSED"
11544          BOOT_JDK_FOUND=maybe
11545          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11546$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11547        fi
11548    fi
11549
11550
11551    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11552    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11553      # Do we have a bin/java?
11554      if test ! -x "$BOOT_JDK/bin/java"; then
11555        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11557        BOOT_JDK_FOUND=no
11558      else
11559        # Do we have a bin/javac?
11560        if test ! -x "$BOOT_JDK/bin/javac"; then
11561          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11563          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11564$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11565          BOOT_JDK_FOUND=no
11566        else
11567          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11568          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11569            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11571            BOOT_JDK_FOUND=no
11572          else
11573            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11574            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11575
11576            # Extra M4 quote needed to protect [] in grep expression.
11577            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11578            if test "x$FOUND_VERSION_78" = x; then
11579              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11581              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11582$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11583              BOOT_JDK_FOUND=no
11584            else
11585              # We're done! :-)
11586              BOOT_JDK_FOUND=yes
11587
11588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11589
11590  # Input might be given as Windows format, start by converting to
11591  # unix format.
11592  path="$BOOT_JDK"
11593  new_path=`$CYGPATH -u "$path"`
11594
11595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11598  # "foo.exe" is OK but "foo" is an error.
11599  #
11600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11601  # It is also a way to make sure we got the proper file name for the real test later on.
11602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11603  if test "x$test_shortpath" = x; then
11604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11605$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11606    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11607  fi
11608
11609  # Call helper function which possibly converts this using DOS-style short mode.
11610  # If so, the updated path is stored in $new_path.
11611
11612  input_path="$new_path"
11613  # Check if we need to convert this using DOS-style short mode. If the path
11614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11615  # take no chances and rewrite it.
11616  # Note: m4 eats our [], so we need to use [ and ] instead.
11617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11618  if test "x$has_forbidden_chars" != x; then
11619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11623      # Going to short mode and back again did indeed matter. Since short mode is
11624      # case insensitive, let's make it lowercase to improve readability.
11625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11626      # Now convert it back to Unix-stile (cygpath)
11627      input_path=`$CYGPATH -u "$shortmode_path"`
11628      new_path="$input_path"
11629    fi
11630  fi
11631
11632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11633  if test "x$test_cygdrive_prefix" = x; then
11634    # As a simple fix, exclude /usr/bin since it's not a real path.
11635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11637      # a path prefixed by /cygdrive for fixpath to work.
11638      new_path="$CYGWIN_ROOT_PATH$input_path"
11639    fi
11640  fi
11641
11642
11643  if test "x$path" != "x$new_path"; then
11644    BOOT_JDK="$new_path"
11645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11646$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11647  fi
11648
11649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11650
11651  path="$BOOT_JDK"
11652  has_colon=`$ECHO $path | $GREP ^.:`
11653  new_path="$path"
11654  if test "x$has_colon" = x; then
11655    # Not in mixed or Windows style, start by that.
11656    new_path=`cmd //c echo $path`
11657  fi
11658
11659
11660  input_path="$new_path"
11661  # Check if we need to convert this using DOS-style short mode. If the path
11662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11663  # take no chances and rewrite it.
11664  # Note: m4 eats our [], so we need to use [ and ] instead.
11665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11666  if test "x$has_forbidden_chars" != x; then
11667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11669  fi
11670
11671
11672  windows_path="$new_path"
11673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11674    unix_path=`$CYGPATH -u "$windows_path"`
11675    new_path="$unix_path"
11676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11678    new_path="$unix_path"
11679  fi
11680
11681  if test "x$path" != "x$new_path"; then
11682    BOOT_JDK="$new_path"
11683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11684$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11685  fi
11686
11687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11689
11690  else
11691    # We're on a posix platform. Hooray! :)
11692    path="$BOOT_JDK"
11693
11694    if test ! -f "$path" && test ! -d "$path"; then
11695      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11696    fi
11697
11698    has_space=`$ECHO "$path" | $GREP " "`
11699    if test "x$has_space" != x; then
11700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11701$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11702      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11703    fi
11704  fi
11705
11706              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11707$as_echo_n "checking for Boot JDK... " >&6; }
11708              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11709$as_echo "$BOOT_JDK" >&6; }
11710              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11711$as_echo_n "checking Boot JDK version... " >&6; }
11712              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11713              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11714$as_echo "$BOOT_JDK_VERSION" >&6; }
11715            fi # end check jdk version
11716          fi # end check rt.jar
11717        fi # end check javac
11718      fi # end check java
11719    fi # end check boot jdk found
11720  fi
11721
11722
11723# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11724
11725  if test "x$BOOT_JDK_FOUND" = xno; then
11726    # Now execute the test
11727
11728    if test -x /usr/libexec/java_home; then
11729        BOOT_JDK=`/usr/libexec/java_home`
11730        BOOT_JDK_FOUND=maybe
11731        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11732$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11733    fi
11734
11735
11736    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11737    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11738      # Do we have a bin/java?
11739      if test ! -x "$BOOT_JDK/bin/java"; then
11740        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11742        BOOT_JDK_FOUND=no
11743      else
11744        # Do we have a bin/javac?
11745        if test ! -x "$BOOT_JDK/bin/javac"; then
11746          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11748          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11749$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11750          BOOT_JDK_FOUND=no
11751        else
11752          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11753          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11754            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11755$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11756            BOOT_JDK_FOUND=no
11757          else
11758            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11759            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11760
11761            # Extra M4 quote needed to protect [] in grep expression.
11762            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11763            if test "x$FOUND_VERSION_78" = x; then
11764              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11766              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11767$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11768              BOOT_JDK_FOUND=no
11769            else
11770              # We're done! :-)
11771              BOOT_JDK_FOUND=yes
11772
11773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11774
11775  # Input might be given as Windows format, start by converting to
11776  # unix format.
11777  path="$BOOT_JDK"
11778  new_path=`$CYGPATH -u "$path"`
11779
11780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11783  # "foo.exe" is OK but "foo" is an error.
11784  #
11785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11786  # It is also a way to make sure we got the proper file name for the real test later on.
11787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11788  if test "x$test_shortpath" = x; then
11789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11791    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11792  fi
11793
11794  # Call helper function which possibly converts this using DOS-style short mode.
11795  # If so, the updated path is stored in $new_path.
11796
11797  input_path="$new_path"
11798  # Check if we need to convert this using DOS-style short mode. If the path
11799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11800  # take no chances and rewrite it.
11801  # Note: m4 eats our [], so we need to use [ and ] instead.
11802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11803  if test "x$has_forbidden_chars" != x; then
11804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11808      # Going to short mode and back again did indeed matter. Since short mode is
11809      # case insensitive, let's make it lowercase to improve readability.
11810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11811      # Now convert it back to Unix-stile (cygpath)
11812      input_path=`$CYGPATH -u "$shortmode_path"`
11813      new_path="$input_path"
11814    fi
11815  fi
11816
11817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11818  if test "x$test_cygdrive_prefix" = x; then
11819    # As a simple fix, exclude /usr/bin since it's not a real path.
11820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11822      # a path prefixed by /cygdrive for fixpath to work.
11823      new_path="$CYGWIN_ROOT_PATH$input_path"
11824    fi
11825  fi
11826
11827
11828  if test "x$path" != "x$new_path"; then
11829    BOOT_JDK="$new_path"
11830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11831$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11832  fi
11833
11834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11835
11836  path="$BOOT_JDK"
11837  has_colon=`$ECHO $path | $GREP ^.:`
11838  new_path="$path"
11839  if test "x$has_colon" = x; then
11840    # Not in mixed or Windows style, start by that.
11841    new_path=`cmd //c echo $path`
11842  fi
11843
11844
11845  input_path="$new_path"
11846  # Check if we need to convert this using DOS-style short mode. If the path
11847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11848  # take no chances and rewrite it.
11849  # Note: m4 eats our [], so we need to use [ and ] instead.
11850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11851  if test "x$has_forbidden_chars" != x; then
11852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11854  fi
11855
11856
11857  windows_path="$new_path"
11858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11859    unix_path=`$CYGPATH -u "$windows_path"`
11860    new_path="$unix_path"
11861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11863    new_path="$unix_path"
11864  fi
11865
11866  if test "x$path" != "x$new_path"; then
11867    BOOT_JDK="$new_path"
11868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11870  fi
11871
11872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11874
11875  else
11876    # We're on a posix platform. Hooray! :)
11877    path="$BOOT_JDK"
11878
11879    if test ! -f "$path" && test ! -d "$path"; then
11880      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11881    fi
11882
11883    has_space=`$ECHO "$path" | $GREP " "`
11884    if test "x$has_space" != x; then
11885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11886$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11887      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11888    fi
11889  fi
11890
11891              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11892$as_echo_n "checking for Boot JDK... " >&6; }
11893              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11894$as_echo "$BOOT_JDK" >&6; }
11895              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11896$as_echo_n "checking Boot JDK version... " >&6; }
11897              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11898              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11899$as_echo "$BOOT_JDK_VERSION" >&6; }
11900            fi # end check jdk version
11901          fi # end check rt.jar
11902        fi # end check javac
11903      fi # end check java
11904    fi # end check boot jdk found
11905  fi
11906
11907
11908# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11909
11910  if test "x$BOOT_JDK_FOUND" = xno; then
11911    # Now execute the test
11912
11913    # Extract the first word of "javac", so it can be a program name with args.
11914set dummy javac; ac_word=$2
11915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11916$as_echo_n "checking for $ac_word... " >&6; }
11917if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11918  $as_echo_n "(cached) " >&6
11919else
11920  case $JAVAC_CHECK in
11921  [\\/]* | ?:[\\/]*)
11922  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11923  ;;
11924  *)
11925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11926for as_dir in $PATH
11927do
11928  IFS=$as_save_IFS
11929  test -z "$as_dir" && as_dir=.
11930    for ac_exec_ext in '' $ac_executable_extensions; do
11931  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11932    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11934    break 2
11935  fi
11936done
11937  done
11938IFS=$as_save_IFS
11939
11940  ;;
11941esac
11942fi
11943JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11944if test -n "$JAVAC_CHECK"; then
11945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11946$as_echo "$JAVAC_CHECK" >&6; }
11947else
11948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11949$as_echo "no" >&6; }
11950fi
11951
11952
11953    # Extract the first word of "java", so it can be a program name with args.
11954set dummy java; ac_word=$2
11955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11956$as_echo_n "checking for $ac_word... " >&6; }
11957if ${ac_cv_path_JAVA_CHECK+:} false; then :
11958  $as_echo_n "(cached) " >&6
11959else
11960  case $JAVA_CHECK in
11961  [\\/]* | ?:[\\/]*)
11962  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11963  ;;
11964  *)
11965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11966for as_dir in $PATH
11967do
11968  IFS=$as_save_IFS
11969  test -z "$as_dir" && as_dir=.
11970    for ac_exec_ext in '' $ac_executable_extensions; do
11971  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11972    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11974    break 2
11975  fi
11976done
11977  done
11978IFS=$as_save_IFS
11979
11980  ;;
11981esac
11982fi
11983JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11984if test -n "$JAVA_CHECK"; then
11985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11986$as_echo "$JAVA_CHECK" >&6; }
11987else
11988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11989$as_echo "no" >&6; }
11990fi
11991
11992
11993    BINARY="$JAVAC_CHECK"
11994    if test "x$JAVAC_CHECK" = x; then
11995        BINARY="$JAVA_CHECK"
11996    fi
11997    if test "x$BINARY" != x; then
11998        # So there is a java(c) binary, it might be part of a JDK.
11999        # Lets find the JDK/JRE directory by following symbolic links.
12000        # Linux/GNU systems often have links from /usr/bin/java to
12001        # /etc/alternatives/java to the real JDK binary.
12002
12003    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12004        # Follow a chain of symbolic links. Use readlink
12005        # where it exists, else fall back to horribly
12006        # complicated shell code.
12007        if test "x$READLINK_TESTED" != yes; then
12008            # On MacOSX there is a readlink tool with a different
12009            # purpose than the GNU readlink tool. Check the found readlink.
12010            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12011            if test "x$ISGNU" = x; then
12012                 # A readlink that we do not know how to use.
12013                 # Are there other non-GNU readlinks out there?
12014                 READLINK_TESTED=yes
12015                 READLINK=
12016            fi
12017        fi
12018
12019        if test "x$READLINK" != x; then
12020            BINARY=`$READLINK -f $BINARY`
12021        else
12022            # Save the current directory for restoring afterwards
12023            STARTDIR=$PWD
12024            COUNTER=0
12025            sym_link_dir=`$DIRNAME $BINARY`
12026            sym_link_file=`$BASENAME $BINARY`
12027            # Use the system pwd and not the shell builtin to resolve directory symlinks
12028            cd $sym_link_dir
12029            cd `$THEPWDCMD`
12030            sym_link_dir=`$THEPWDCMD`
12031            # Resolve file symlinks
12032            while test $COUNTER -lt 20; do
12033                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12034                if test "x$ISLINK" == x; then
12035                    # This is not a symbolic link! We are done!
12036                    break
12037                fi
12038                # Again resolve directory symlinks since the target of the just found
12039                # link could be in a different directory
12040                cd `$DIRNAME $ISLINK`
12041                sym_link_dir=`$THEPWDCMD`
12042                sym_link_file=`$BASENAME $ISLINK`
12043                let COUNTER=COUNTER+1
12044            done
12045            cd $STARTDIR
12046            BINARY=$sym_link_dir/$sym_link_file
12047        fi
12048    fi
12049
12050        BOOT_JDK=`dirname "$BINARY"`
12051        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12052        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12053            # Looks like we found ourselves an JDK
12054            BOOT_JDK_FOUND=maybe
12055            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12056$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12057        fi
12058    fi
12059
12060
12061    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12062    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12063      # Do we have a bin/java?
12064      if test ! -x "$BOOT_JDK/bin/java"; then
12065        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12067        BOOT_JDK_FOUND=no
12068      else
12069        # Do we have a bin/javac?
12070        if test ! -x "$BOOT_JDK/bin/javac"; then
12071          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12073          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12074$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12075          BOOT_JDK_FOUND=no
12076        else
12077          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12078          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12079            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12081            BOOT_JDK_FOUND=no
12082          else
12083            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12084            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12085
12086            # Extra M4 quote needed to protect [] in grep expression.
12087            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12088            if test "x$FOUND_VERSION_78" = x; then
12089              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12091              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12092$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12093              BOOT_JDK_FOUND=no
12094            else
12095              # We're done! :-)
12096              BOOT_JDK_FOUND=yes
12097
12098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12099
12100  # Input might be given as Windows format, start by converting to
12101  # unix format.
12102  path="$BOOT_JDK"
12103  new_path=`$CYGPATH -u "$path"`
12104
12105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12108  # "foo.exe" is OK but "foo" is an error.
12109  #
12110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12111  # It is also a way to make sure we got the proper file name for the real test later on.
12112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12113  if test "x$test_shortpath" = x; then
12114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12115$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12116    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12117  fi
12118
12119  # Call helper function which possibly converts this using DOS-style short mode.
12120  # If so, the updated path is stored in $new_path.
12121
12122  input_path="$new_path"
12123  # Check if we need to convert this using DOS-style short mode. If the path
12124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12125  # take no chances and rewrite it.
12126  # Note: m4 eats our [], so we need to use [ and ] instead.
12127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12128  if test "x$has_forbidden_chars" != x; then
12129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12133      # Going to short mode and back again did indeed matter. Since short mode is
12134      # case insensitive, let's make it lowercase to improve readability.
12135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12136      # Now convert it back to Unix-stile (cygpath)
12137      input_path=`$CYGPATH -u "$shortmode_path"`
12138      new_path="$input_path"
12139    fi
12140  fi
12141
12142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12143  if test "x$test_cygdrive_prefix" = x; then
12144    # As a simple fix, exclude /usr/bin since it's not a real path.
12145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12147      # a path prefixed by /cygdrive for fixpath to work.
12148      new_path="$CYGWIN_ROOT_PATH$input_path"
12149    fi
12150  fi
12151
12152
12153  if test "x$path" != "x$new_path"; then
12154    BOOT_JDK="$new_path"
12155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12156$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12157  fi
12158
12159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12160
12161  path="$BOOT_JDK"
12162  has_colon=`$ECHO $path | $GREP ^.:`
12163  new_path="$path"
12164  if test "x$has_colon" = x; then
12165    # Not in mixed or Windows style, start by that.
12166    new_path=`cmd //c echo $path`
12167  fi
12168
12169
12170  input_path="$new_path"
12171  # Check if we need to convert this using DOS-style short mode. If the path
12172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12173  # take no chances and rewrite it.
12174  # Note: m4 eats our [], so we need to use [ and ] instead.
12175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12176  if test "x$has_forbidden_chars" != x; then
12177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12179  fi
12180
12181
12182  windows_path="$new_path"
12183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12184    unix_path=`$CYGPATH -u "$windows_path"`
12185    new_path="$unix_path"
12186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12188    new_path="$unix_path"
12189  fi
12190
12191  if test "x$path" != "x$new_path"; then
12192    BOOT_JDK="$new_path"
12193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12194$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12195  fi
12196
12197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12199
12200  else
12201    # We're on a posix platform. Hooray! :)
12202    path="$BOOT_JDK"
12203
12204    if test ! -f "$path" && test ! -d "$path"; then
12205      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12206    fi
12207
12208    has_space=`$ECHO "$path" | $GREP " "`
12209    if test "x$has_space" != x; then
12210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12212      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12213    fi
12214  fi
12215
12216              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12217$as_echo_n "checking for Boot JDK... " >&6; }
12218              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12219$as_echo "$BOOT_JDK" >&6; }
12220              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12221$as_echo_n "checking Boot JDK version... " >&6; }
12222              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12223              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12224$as_echo "$BOOT_JDK_VERSION" >&6; }
12225            fi # end check jdk version
12226          fi # end check rt.jar
12227        fi # end check javac
12228      fi # end check java
12229    fi # end check boot jdk found
12230  fi
12231
12232
12233# Test: Is there a JDK installed in default, well-known locations?
12234
12235  if test "x$BOOT_JDK_FOUND" = xno; then
12236    # Now execute the test
12237
12238  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12239
12240  if test "x$BOOT_JDK_FOUND" = xno; then
12241    # Now execute the test
12242
12243  if test "x$ProgramW6432" != x; then
12244    VIRTUAL_DIR="$ProgramW6432/Java"
12245
12246  windows_path="$VIRTUAL_DIR"
12247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12248    unix_path=`$CYGPATH -u "$windows_path"`
12249    VIRTUAL_DIR="$unix_path"
12250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12252    VIRTUAL_DIR="$unix_path"
12253  fi
12254
12255
12256  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12257  BOOT_JDK_SUFFIX=""
12258  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12259  if test "x$ALL_JDKS_FOUND" != x; then
12260    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12261
12262  if test "x$BOOT_JDK_FOUND" = xno; then
12263    # Now execute the test
12264
12265        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12266        if test -d "$BOOT_JDK"; then
12267          BOOT_JDK_FOUND=maybe
12268          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12269$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12270        fi
12271
12272
12273    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12274    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12275      # Do we have a bin/java?
12276      if test ! -x "$BOOT_JDK/bin/java"; then
12277        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12279        BOOT_JDK_FOUND=no
12280      else
12281        # Do we have a bin/javac?
12282        if test ! -x "$BOOT_JDK/bin/javac"; then
12283          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12285          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12286$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12287          BOOT_JDK_FOUND=no
12288        else
12289          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12290          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12291            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12293            BOOT_JDK_FOUND=no
12294          else
12295            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12296            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12297
12298            # Extra M4 quote needed to protect [] in grep expression.
12299            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12300            if test "x$FOUND_VERSION_78" = x; then
12301              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12302$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12303              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12304$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12305              BOOT_JDK_FOUND=no
12306            else
12307              # We're done! :-)
12308              BOOT_JDK_FOUND=yes
12309
12310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12311
12312  # Input might be given as Windows format, start by converting to
12313  # unix format.
12314  path="$BOOT_JDK"
12315  new_path=`$CYGPATH -u "$path"`
12316
12317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12320  # "foo.exe" is OK but "foo" is an error.
12321  #
12322  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12323  # It is also a way to make sure we got the proper file name for the real test later on.
12324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12325  if test "x$test_shortpath" = x; then
12326    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12328    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12329  fi
12330
12331  # Call helper function which possibly converts this using DOS-style short mode.
12332  # If so, the updated path is stored in $new_path.
12333
12334  input_path="$new_path"
12335  # Check if we need to convert this using DOS-style short mode. If the path
12336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12337  # take no chances and rewrite it.
12338  # Note: m4 eats our [], so we need to use [ and ] instead.
12339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12340  if test "x$has_forbidden_chars" != x; then
12341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12345      # Going to short mode and back again did indeed matter. Since short mode is
12346      # case insensitive, let's make it lowercase to improve readability.
12347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12348      # Now convert it back to Unix-stile (cygpath)
12349      input_path=`$CYGPATH -u "$shortmode_path"`
12350      new_path="$input_path"
12351    fi
12352  fi
12353
12354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12355  if test "x$test_cygdrive_prefix" = x; then
12356    # As a simple fix, exclude /usr/bin since it's not a real path.
12357    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12359      # a path prefixed by /cygdrive for fixpath to work.
12360      new_path="$CYGWIN_ROOT_PATH$input_path"
12361    fi
12362  fi
12363
12364
12365  if test "x$path" != "x$new_path"; then
12366    BOOT_JDK="$new_path"
12367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12368$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12369  fi
12370
12371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12372
12373  path="$BOOT_JDK"
12374  has_colon=`$ECHO $path | $GREP ^.:`
12375  new_path="$path"
12376  if test "x$has_colon" = x; then
12377    # Not in mixed or Windows style, start by that.
12378    new_path=`cmd //c echo $path`
12379  fi
12380
12381
12382  input_path="$new_path"
12383  # Check if we need to convert this using DOS-style short mode. If the path
12384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12385  # take no chances and rewrite it.
12386  # Note: m4 eats our [], so we need to use [ and ] instead.
12387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12388  if test "x$has_forbidden_chars" != x; then
12389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12391  fi
12392
12393
12394  windows_path="$new_path"
12395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12396    unix_path=`$CYGPATH -u "$windows_path"`
12397    new_path="$unix_path"
12398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12400    new_path="$unix_path"
12401  fi
12402
12403  if test "x$path" != "x$new_path"; then
12404    BOOT_JDK="$new_path"
12405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12407  fi
12408
12409  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12410  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12411
12412  else
12413    # We're on a posix platform. Hooray! :)
12414    path="$BOOT_JDK"
12415
12416    if test ! -f "$path" && test ! -d "$path"; then
12417      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12418    fi
12419
12420    has_space=`$ECHO "$path" | $GREP " "`
12421    if test "x$has_space" != x; then
12422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12423$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12424      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12425    fi
12426  fi
12427
12428              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12429$as_echo_n "checking for Boot JDK... " >&6; }
12430              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12431$as_echo "$BOOT_JDK" >&6; }
12432              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12433$as_echo_n "checking Boot JDK version... " >&6; }
12434              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12435              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12436$as_echo "$BOOT_JDK_VERSION" >&6; }
12437            fi # end check jdk version
12438          fi # end check rt.jar
12439        fi # end check javac
12440      fi # end check java
12441    fi # end check boot jdk found
12442  fi
12443
12444    done
12445  fi
12446
12447  fi
12448
12449
12450    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12451    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12452      # Do we have a bin/java?
12453      if test ! -x "$BOOT_JDK/bin/java"; then
12454        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12456        BOOT_JDK_FOUND=no
12457      else
12458        # Do we have a bin/javac?
12459        if test ! -x "$BOOT_JDK/bin/javac"; then
12460          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12462          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12463$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12464          BOOT_JDK_FOUND=no
12465        else
12466          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12467          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12468            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12469$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12470            BOOT_JDK_FOUND=no
12471          else
12472            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12473            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12474
12475            # Extra M4 quote needed to protect [] in grep expression.
12476            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12477            if test "x$FOUND_VERSION_78" = x; then
12478              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12480              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12481$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12482              BOOT_JDK_FOUND=no
12483            else
12484              # We're done! :-)
12485              BOOT_JDK_FOUND=yes
12486
12487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12488
12489  # Input might be given as Windows format, start by converting to
12490  # unix format.
12491  path="$BOOT_JDK"
12492  new_path=`$CYGPATH -u "$path"`
12493
12494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12497  # "foo.exe" is OK but "foo" is an error.
12498  #
12499  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12500  # It is also a way to make sure we got the proper file name for the real test later on.
12501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12502  if test "x$test_shortpath" = x; then
12503    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12504$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12505    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12506  fi
12507
12508  # Call helper function which possibly converts this using DOS-style short mode.
12509  # If so, the updated path is stored in $new_path.
12510
12511  input_path="$new_path"
12512  # Check if we need to convert this using DOS-style short mode. If the path
12513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12514  # take no chances and rewrite it.
12515  # Note: m4 eats our [], so we need to use [ and ] instead.
12516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12517  if test "x$has_forbidden_chars" != x; then
12518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12522      # Going to short mode and back again did indeed matter. Since short mode is
12523      # case insensitive, let's make it lowercase to improve readability.
12524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12525      # Now convert it back to Unix-stile (cygpath)
12526      input_path=`$CYGPATH -u "$shortmode_path"`
12527      new_path="$input_path"
12528    fi
12529  fi
12530
12531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12532  if test "x$test_cygdrive_prefix" = x; then
12533    # As a simple fix, exclude /usr/bin since it's not a real path.
12534    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12536      # a path prefixed by /cygdrive for fixpath to work.
12537      new_path="$CYGWIN_ROOT_PATH$input_path"
12538    fi
12539  fi
12540
12541
12542  if test "x$path" != "x$new_path"; then
12543    BOOT_JDK="$new_path"
12544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12545$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12546  fi
12547
12548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12549
12550  path="$BOOT_JDK"
12551  has_colon=`$ECHO $path | $GREP ^.:`
12552  new_path="$path"
12553  if test "x$has_colon" = x; then
12554    # Not in mixed or Windows style, start by that.
12555    new_path=`cmd //c echo $path`
12556  fi
12557
12558
12559  input_path="$new_path"
12560  # Check if we need to convert this using DOS-style short mode. If the path
12561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12562  # take no chances and rewrite it.
12563  # Note: m4 eats our [], so we need to use [ and ] instead.
12564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12565  if test "x$has_forbidden_chars" != x; then
12566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12568  fi
12569
12570
12571  windows_path="$new_path"
12572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12573    unix_path=`$CYGPATH -u "$windows_path"`
12574    new_path="$unix_path"
12575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12577    new_path="$unix_path"
12578  fi
12579
12580  if test "x$path" != "x$new_path"; then
12581    BOOT_JDK="$new_path"
12582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12583$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12584  fi
12585
12586  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12587  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12588
12589  else
12590    # We're on a posix platform. Hooray! :)
12591    path="$BOOT_JDK"
12592
12593    if test ! -f "$path" && test ! -d "$path"; then
12594      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12595    fi
12596
12597    has_space=`$ECHO "$path" | $GREP " "`
12598    if test "x$has_space" != x; then
12599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12600$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12601      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12602    fi
12603  fi
12604
12605              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12606$as_echo_n "checking for Boot JDK... " >&6; }
12607              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12608$as_echo "$BOOT_JDK" >&6; }
12609              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12610$as_echo_n "checking Boot JDK version... " >&6; }
12611              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12612              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12613$as_echo "$BOOT_JDK_VERSION" >&6; }
12614            fi # end check jdk version
12615          fi # end check rt.jar
12616        fi # end check javac
12617      fi # end check java
12618    fi # end check boot jdk found
12619  fi
12620
12621
12622  if test "x$BOOT_JDK_FOUND" = xno; then
12623    # Now execute the test
12624
12625  if test "x$PROGRAMW6432" != x; then
12626    VIRTUAL_DIR="$PROGRAMW6432/Java"
12627
12628  windows_path="$VIRTUAL_DIR"
12629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12630    unix_path=`$CYGPATH -u "$windows_path"`
12631    VIRTUAL_DIR="$unix_path"
12632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12634    VIRTUAL_DIR="$unix_path"
12635  fi
12636
12637
12638  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12639  BOOT_JDK_SUFFIX=""
12640  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12641  if test "x$ALL_JDKS_FOUND" != x; then
12642    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12643
12644  if test "x$BOOT_JDK_FOUND" = xno; then
12645    # Now execute the test
12646
12647        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12648        if test -d "$BOOT_JDK"; then
12649          BOOT_JDK_FOUND=maybe
12650          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12651$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12652        fi
12653
12654
12655    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12656    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12657      # Do we have a bin/java?
12658      if test ! -x "$BOOT_JDK/bin/java"; then
12659        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12660$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12661        BOOT_JDK_FOUND=no
12662      else
12663        # Do we have a bin/javac?
12664        if test ! -x "$BOOT_JDK/bin/javac"; then
12665          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12666$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12667          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12668$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12669          BOOT_JDK_FOUND=no
12670        else
12671          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12672          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12673            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12675            BOOT_JDK_FOUND=no
12676          else
12677            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12678            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12679
12680            # Extra M4 quote needed to protect [] in grep expression.
12681            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12682            if test "x$FOUND_VERSION_78" = x; then
12683              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12685              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12686$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12687              BOOT_JDK_FOUND=no
12688            else
12689              # We're done! :-)
12690              BOOT_JDK_FOUND=yes
12691
12692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12693
12694  # Input might be given as Windows format, start by converting to
12695  # unix format.
12696  path="$BOOT_JDK"
12697  new_path=`$CYGPATH -u "$path"`
12698
12699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12702  # "foo.exe" is OK but "foo" is an error.
12703  #
12704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12705  # It is also a way to make sure we got the proper file name for the real test later on.
12706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12707  if test "x$test_shortpath" = x; then
12708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12709$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12710    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12711  fi
12712
12713  # Call helper function which possibly converts this using DOS-style short mode.
12714  # If so, the updated path is stored in $new_path.
12715
12716  input_path="$new_path"
12717  # Check if we need to convert this using DOS-style short mode. If the path
12718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12719  # take no chances and rewrite it.
12720  # Note: m4 eats our [], so we need to use [ and ] instead.
12721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12722  if test "x$has_forbidden_chars" != x; then
12723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12727      # Going to short mode and back again did indeed matter. Since short mode is
12728      # case insensitive, let's make it lowercase to improve readability.
12729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12730      # Now convert it back to Unix-stile (cygpath)
12731      input_path=`$CYGPATH -u "$shortmode_path"`
12732      new_path="$input_path"
12733    fi
12734  fi
12735
12736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12737  if test "x$test_cygdrive_prefix" = x; then
12738    # As a simple fix, exclude /usr/bin since it's not a real path.
12739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12741      # a path prefixed by /cygdrive for fixpath to work.
12742      new_path="$CYGWIN_ROOT_PATH$input_path"
12743    fi
12744  fi
12745
12746
12747  if test "x$path" != "x$new_path"; then
12748    BOOT_JDK="$new_path"
12749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12750$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12751  fi
12752
12753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12754
12755  path="$BOOT_JDK"
12756  has_colon=`$ECHO $path | $GREP ^.:`
12757  new_path="$path"
12758  if test "x$has_colon" = x; then
12759    # Not in mixed or Windows style, start by that.
12760    new_path=`cmd //c echo $path`
12761  fi
12762
12763
12764  input_path="$new_path"
12765  # Check if we need to convert this using DOS-style short mode. If the path
12766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12767  # take no chances and rewrite it.
12768  # Note: m4 eats our [], so we need to use [ and ] instead.
12769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12770  if test "x$has_forbidden_chars" != x; then
12771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12773  fi
12774
12775
12776  windows_path="$new_path"
12777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12778    unix_path=`$CYGPATH -u "$windows_path"`
12779    new_path="$unix_path"
12780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12782    new_path="$unix_path"
12783  fi
12784
12785  if test "x$path" != "x$new_path"; then
12786    BOOT_JDK="$new_path"
12787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12788$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12789  fi
12790
12791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12793
12794  else
12795    # We're on a posix platform. Hooray! :)
12796    path="$BOOT_JDK"
12797
12798    if test ! -f "$path" && test ! -d "$path"; then
12799      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12800    fi
12801
12802    has_space=`$ECHO "$path" | $GREP " "`
12803    if test "x$has_space" != x; then
12804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12806      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12807    fi
12808  fi
12809
12810              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12811$as_echo_n "checking for Boot JDK... " >&6; }
12812              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12813$as_echo "$BOOT_JDK" >&6; }
12814              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12815$as_echo_n "checking Boot JDK version... " >&6; }
12816              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12817              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12818$as_echo "$BOOT_JDK_VERSION" >&6; }
12819            fi # end check jdk version
12820          fi # end check rt.jar
12821        fi # end check javac
12822      fi # end check java
12823    fi # end check boot jdk found
12824  fi
12825
12826    done
12827  fi
12828
12829  fi
12830
12831
12832    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12833    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12834      # Do we have a bin/java?
12835      if test ! -x "$BOOT_JDK/bin/java"; then
12836        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12838        BOOT_JDK_FOUND=no
12839      else
12840        # Do we have a bin/javac?
12841        if test ! -x "$BOOT_JDK/bin/javac"; then
12842          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12844          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12845$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12846          BOOT_JDK_FOUND=no
12847        else
12848          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12849          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12850            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12852            BOOT_JDK_FOUND=no
12853          else
12854            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12855            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12856
12857            # Extra M4 quote needed to protect [] in grep expression.
12858            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12859            if test "x$FOUND_VERSION_78" = x; then
12860              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12862              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12863$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12864              BOOT_JDK_FOUND=no
12865            else
12866              # We're done! :-)
12867              BOOT_JDK_FOUND=yes
12868
12869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12870
12871  # Input might be given as Windows format, start by converting to
12872  # unix format.
12873  path="$BOOT_JDK"
12874  new_path=`$CYGPATH -u "$path"`
12875
12876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12879  # "foo.exe" is OK but "foo" is an error.
12880  #
12881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12882  # It is also a way to make sure we got the proper file name for the real test later on.
12883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12884  if test "x$test_shortpath" = x; then
12885    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12886$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12887    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12888  fi
12889
12890  # Call helper function which possibly converts this using DOS-style short mode.
12891  # If so, the updated path is stored in $new_path.
12892
12893  input_path="$new_path"
12894  # Check if we need to convert this using DOS-style short mode. If the path
12895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12896  # take no chances and rewrite it.
12897  # Note: m4 eats our [], so we need to use [ and ] instead.
12898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12899  if test "x$has_forbidden_chars" != x; then
12900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12904      # Going to short mode and back again did indeed matter. Since short mode is
12905      # case insensitive, let's make it lowercase to improve readability.
12906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12907      # Now convert it back to Unix-stile (cygpath)
12908      input_path=`$CYGPATH -u "$shortmode_path"`
12909      new_path="$input_path"
12910    fi
12911  fi
12912
12913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12914  if test "x$test_cygdrive_prefix" = x; then
12915    # As a simple fix, exclude /usr/bin since it's not a real path.
12916    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12918      # a path prefixed by /cygdrive for fixpath to work.
12919      new_path="$CYGWIN_ROOT_PATH$input_path"
12920    fi
12921  fi
12922
12923
12924  if test "x$path" != "x$new_path"; then
12925    BOOT_JDK="$new_path"
12926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12928  fi
12929
12930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12931
12932  path="$BOOT_JDK"
12933  has_colon=`$ECHO $path | $GREP ^.:`
12934  new_path="$path"
12935  if test "x$has_colon" = x; then
12936    # Not in mixed or Windows style, start by that.
12937    new_path=`cmd //c echo $path`
12938  fi
12939
12940
12941  input_path="$new_path"
12942  # Check if we need to convert this using DOS-style short mode. If the path
12943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12944  # take no chances and rewrite it.
12945  # Note: m4 eats our [], so we need to use [ and ] instead.
12946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12947  if test "x$has_forbidden_chars" != x; then
12948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12950  fi
12951
12952
12953  windows_path="$new_path"
12954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12955    unix_path=`$CYGPATH -u "$windows_path"`
12956    new_path="$unix_path"
12957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12959    new_path="$unix_path"
12960  fi
12961
12962  if test "x$path" != "x$new_path"; then
12963    BOOT_JDK="$new_path"
12964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12966  fi
12967
12968  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12969  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12970
12971  else
12972    # We're on a posix platform. Hooray! :)
12973    path="$BOOT_JDK"
12974
12975    if test ! -f "$path" && test ! -d "$path"; then
12976      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12977    fi
12978
12979    has_space=`$ECHO "$path" | $GREP " "`
12980    if test "x$has_space" != x; then
12981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12983      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12984    fi
12985  fi
12986
12987              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12988$as_echo_n "checking for Boot JDK... " >&6; }
12989              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12990$as_echo "$BOOT_JDK" >&6; }
12991              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12992$as_echo_n "checking Boot JDK version... " >&6; }
12993              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12994              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12995$as_echo "$BOOT_JDK_VERSION" >&6; }
12996            fi # end check jdk version
12997          fi # end check rt.jar
12998        fi # end check javac
12999      fi # end check java
13000    fi # end check boot jdk found
13001  fi
13002
13003
13004  if test "x$BOOT_JDK_FOUND" = xno; then
13005    # Now execute the test
13006
13007  if test "x$PROGRAMFILES" != x; then
13008    VIRTUAL_DIR="$PROGRAMFILES/Java"
13009
13010  windows_path="$VIRTUAL_DIR"
13011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13012    unix_path=`$CYGPATH -u "$windows_path"`
13013    VIRTUAL_DIR="$unix_path"
13014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13016    VIRTUAL_DIR="$unix_path"
13017  fi
13018
13019
13020  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13021  BOOT_JDK_SUFFIX=""
13022  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13023  if test "x$ALL_JDKS_FOUND" != x; then
13024    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13025
13026  if test "x$BOOT_JDK_FOUND" = xno; then
13027    # Now execute the test
13028
13029        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13030        if test -d "$BOOT_JDK"; then
13031          BOOT_JDK_FOUND=maybe
13032          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13033$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13034        fi
13035
13036
13037    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13038    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13039      # Do we have a bin/java?
13040      if test ! -x "$BOOT_JDK/bin/java"; then
13041        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13043        BOOT_JDK_FOUND=no
13044      else
13045        # Do we have a bin/javac?
13046        if test ! -x "$BOOT_JDK/bin/javac"; then
13047          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13049          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13050$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13051          BOOT_JDK_FOUND=no
13052        else
13053          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13054          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13055            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13057            BOOT_JDK_FOUND=no
13058          else
13059            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13060            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13061
13062            # Extra M4 quote needed to protect [] in grep expression.
13063            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13064            if test "x$FOUND_VERSION_78" = x; then
13065              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13067              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13068$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13069              BOOT_JDK_FOUND=no
13070            else
13071              # We're done! :-)
13072              BOOT_JDK_FOUND=yes
13073
13074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13075
13076  # Input might be given as Windows format, start by converting to
13077  # unix format.
13078  path="$BOOT_JDK"
13079  new_path=`$CYGPATH -u "$path"`
13080
13081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13084  # "foo.exe" is OK but "foo" is an error.
13085  #
13086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13087  # It is also a way to make sure we got the proper file name for the real test later on.
13088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13089  if test "x$test_shortpath" = x; then
13090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13092    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13093  fi
13094
13095  # Call helper function which possibly converts this using DOS-style short mode.
13096  # If so, the updated path is stored in $new_path.
13097
13098  input_path="$new_path"
13099  # Check if we need to convert this using DOS-style short mode. If the path
13100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13101  # take no chances and rewrite it.
13102  # Note: m4 eats our [], so we need to use [ and ] instead.
13103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13104  if test "x$has_forbidden_chars" != x; then
13105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13109      # Going to short mode and back again did indeed matter. Since short mode is
13110      # case insensitive, let's make it lowercase to improve readability.
13111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13112      # Now convert it back to Unix-stile (cygpath)
13113      input_path=`$CYGPATH -u "$shortmode_path"`
13114      new_path="$input_path"
13115    fi
13116  fi
13117
13118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13119  if test "x$test_cygdrive_prefix" = x; then
13120    # As a simple fix, exclude /usr/bin since it's not a real path.
13121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13123      # a path prefixed by /cygdrive for fixpath to work.
13124      new_path="$CYGWIN_ROOT_PATH$input_path"
13125    fi
13126  fi
13127
13128
13129  if test "x$path" != "x$new_path"; then
13130    BOOT_JDK="$new_path"
13131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13132$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13133  fi
13134
13135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13136
13137  path="$BOOT_JDK"
13138  has_colon=`$ECHO $path | $GREP ^.:`
13139  new_path="$path"
13140  if test "x$has_colon" = x; then
13141    # Not in mixed or Windows style, start by that.
13142    new_path=`cmd //c echo $path`
13143  fi
13144
13145
13146  input_path="$new_path"
13147  # Check if we need to convert this using DOS-style short mode. If the path
13148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13149  # take no chances and rewrite it.
13150  # Note: m4 eats our [], so we need to use [ and ] instead.
13151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13152  if test "x$has_forbidden_chars" != x; then
13153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13155  fi
13156
13157
13158  windows_path="$new_path"
13159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13160    unix_path=`$CYGPATH -u "$windows_path"`
13161    new_path="$unix_path"
13162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13164    new_path="$unix_path"
13165  fi
13166
13167  if test "x$path" != "x$new_path"; then
13168    BOOT_JDK="$new_path"
13169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13170$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13171  fi
13172
13173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13175
13176  else
13177    # We're on a posix platform. Hooray! :)
13178    path="$BOOT_JDK"
13179
13180    if test ! -f "$path" && test ! -d "$path"; then
13181      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13182    fi
13183
13184    has_space=`$ECHO "$path" | $GREP " "`
13185    if test "x$has_space" != x; then
13186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13188      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13189    fi
13190  fi
13191
13192              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13193$as_echo_n "checking for Boot JDK... " >&6; }
13194              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13195$as_echo "$BOOT_JDK" >&6; }
13196              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13197$as_echo_n "checking Boot JDK version... " >&6; }
13198              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13199              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13200$as_echo "$BOOT_JDK_VERSION" >&6; }
13201            fi # end check jdk version
13202          fi # end check rt.jar
13203        fi # end check javac
13204      fi # end check java
13205    fi # end check boot jdk found
13206  fi
13207
13208    done
13209  fi
13210
13211  fi
13212
13213
13214    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13215    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13216      # Do we have a bin/java?
13217      if test ! -x "$BOOT_JDK/bin/java"; then
13218        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13220        BOOT_JDK_FOUND=no
13221      else
13222        # Do we have a bin/javac?
13223        if test ! -x "$BOOT_JDK/bin/javac"; then
13224          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13225$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13226          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13227$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13228          BOOT_JDK_FOUND=no
13229        else
13230          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13231          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13232            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13233$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13234            BOOT_JDK_FOUND=no
13235          else
13236            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13237            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13238
13239            # Extra M4 quote needed to protect [] in grep expression.
13240            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13241            if test "x$FOUND_VERSION_78" = x; then
13242              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13244              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13245$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13246              BOOT_JDK_FOUND=no
13247            else
13248              # We're done! :-)
13249              BOOT_JDK_FOUND=yes
13250
13251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13252
13253  # Input might be given as Windows format, start by converting to
13254  # unix format.
13255  path="$BOOT_JDK"
13256  new_path=`$CYGPATH -u "$path"`
13257
13258  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13259  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13260  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13261  # "foo.exe" is OK but "foo" is an error.
13262  #
13263  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13264  # It is also a way to make sure we got the proper file name for the real test later on.
13265  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13266  if test "x$test_shortpath" = x; then
13267    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13268$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13269    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13270  fi
13271
13272  # Call helper function which possibly converts this using DOS-style short mode.
13273  # If so, the updated path is stored in $new_path.
13274
13275  input_path="$new_path"
13276  # Check if we need to convert this using DOS-style short mode. If the path
13277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13278  # take no chances and rewrite it.
13279  # Note: m4 eats our [], so we need to use [ and ] instead.
13280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13281  if test "x$has_forbidden_chars" != x; then
13282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13286      # Going to short mode and back again did indeed matter. Since short mode is
13287      # case insensitive, let's make it lowercase to improve readability.
13288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13289      # Now convert it back to Unix-stile (cygpath)
13290      input_path=`$CYGPATH -u "$shortmode_path"`
13291      new_path="$input_path"
13292    fi
13293  fi
13294
13295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13296  if test "x$test_cygdrive_prefix" = x; then
13297    # As a simple fix, exclude /usr/bin since it's not a real path.
13298    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13300      # a path prefixed by /cygdrive for fixpath to work.
13301      new_path="$CYGWIN_ROOT_PATH$input_path"
13302    fi
13303  fi
13304
13305
13306  if test "x$path" != "x$new_path"; then
13307    BOOT_JDK="$new_path"
13308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13309$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13310  fi
13311
13312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13313
13314  path="$BOOT_JDK"
13315  has_colon=`$ECHO $path | $GREP ^.:`
13316  new_path="$path"
13317  if test "x$has_colon" = x; then
13318    # Not in mixed or Windows style, start by that.
13319    new_path=`cmd //c echo $path`
13320  fi
13321
13322
13323  input_path="$new_path"
13324  # Check if we need to convert this using DOS-style short mode. If the path
13325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13326  # take no chances and rewrite it.
13327  # Note: m4 eats our [], so we need to use [ and ] instead.
13328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13329  if test "x$has_forbidden_chars" != x; then
13330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13332  fi
13333
13334
13335  windows_path="$new_path"
13336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13337    unix_path=`$CYGPATH -u "$windows_path"`
13338    new_path="$unix_path"
13339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13341    new_path="$unix_path"
13342  fi
13343
13344  if test "x$path" != "x$new_path"; then
13345    BOOT_JDK="$new_path"
13346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13347$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13348  fi
13349
13350  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13351  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13352
13353  else
13354    # We're on a posix platform. Hooray! :)
13355    path="$BOOT_JDK"
13356
13357    if test ! -f "$path" && test ! -d "$path"; then
13358      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13359    fi
13360
13361    has_space=`$ECHO "$path" | $GREP " "`
13362    if test "x$has_space" != x; then
13363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13365      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13366    fi
13367  fi
13368
13369              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13370$as_echo_n "checking for Boot JDK... " >&6; }
13371              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13372$as_echo "$BOOT_JDK" >&6; }
13373              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13374$as_echo_n "checking Boot JDK version... " >&6; }
13375              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13376              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13377$as_echo "$BOOT_JDK_VERSION" >&6; }
13378            fi # end check jdk version
13379          fi # end check rt.jar
13380        fi # end check javac
13381      fi # end check java
13382    fi # end check boot jdk found
13383  fi
13384
13385
13386  if test "x$BOOT_JDK_FOUND" = xno; then
13387    # Now execute the test
13388
13389  if test "x$ProgramFiles" != x; then
13390    VIRTUAL_DIR="$ProgramFiles/Java"
13391
13392  windows_path="$VIRTUAL_DIR"
13393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13394    unix_path=`$CYGPATH -u "$windows_path"`
13395    VIRTUAL_DIR="$unix_path"
13396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13398    VIRTUAL_DIR="$unix_path"
13399  fi
13400
13401
13402  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13403  BOOT_JDK_SUFFIX=""
13404  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13405  if test "x$ALL_JDKS_FOUND" != x; then
13406    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13407
13408  if test "x$BOOT_JDK_FOUND" = xno; then
13409    # Now execute the test
13410
13411        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13412        if test -d "$BOOT_JDK"; then
13413          BOOT_JDK_FOUND=maybe
13414          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13415$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13416        fi
13417
13418
13419    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13420    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13421      # Do we have a bin/java?
13422      if test ! -x "$BOOT_JDK/bin/java"; then
13423        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13425        BOOT_JDK_FOUND=no
13426      else
13427        # Do we have a bin/javac?
13428        if test ! -x "$BOOT_JDK/bin/javac"; then
13429          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13430$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13431          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13432$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13433          BOOT_JDK_FOUND=no
13434        else
13435          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13436          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13437            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13438$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13439            BOOT_JDK_FOUND=no
13440          else
13441            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13442            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13443
13444            # Extra M4 quote needed to protect [] in grep expression.
13445            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13446            if test "x$FOUND_VERSION_78" = x; then
13447              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13449              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13450$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13451              BOOT_JDK_FOUND=no
13452            else
13453              # We're done! :-)
13454              BOOT_JDK_FOUND=yes
13455
13456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13457
13458  # Input might be given as Windows format, start by converting to
13459  # unix format.
13460  path="$BOOT_JDK"
13461  new_path=`$CYGPATH -u "$path"`
13462
13463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13466  # "foo.exe" is OK but "foo" is an error.
13467  #
13468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13469  # It is also a way to make sure we got the proper file name for the real test later on.
13470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13471  if test "x$test_shortpath" = x; then
13472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13473$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13474    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13475  fi
13476
13477  # Call helper function which possibly converts this using DOS-style short mode.
13478  # If so, the updated path is stored in $new_path.
13479
13480  input_path="$new_path"
13481  # Check if we need to convert this using DOS-style short mode. If the path
13482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13483  # take no chances and rewrite it.
13484  # Note: m4 eats our [], so we need to use [ and ] instead.
13485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13486  if test "x$has_forbidden_chars" != x; then
13487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13491      # Going to short mode and back again did indeed matter. Since short mode is
13492      # case insensitive, let's make it lowercase to improve readability.
13493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13494      # Now convert it back to Unix-stile (cygpath)
13495      input_path=`$CYGPATH -u "$shortmode_path"`
13496      new_path="$input_path"
13497    fi
13498  fi
13499
13500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13501  if test "x$test_cygdrive_prefix" = x; then
13502    # As a simple fix, exclude /usr/bin since it's not a real path.
13503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13505      # a path prefixed by /cygdrive for fixpath to work.
13506      new_path="$CYGWIN_ROOT_PATH$input_path"
13507    fi
13508  fi
13509
13510
13511  if test "x$path" != "x$new_path"; then
13512    BOOT_JDK="$new_path"
13513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13514$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13515  fi
13516
13517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13518
13519  path="$BOOT_JDK"
13520  has_colon=`$ECHO $path | $GREP ^.:`
13521  new_path="$path"
13522  if test "x$has_colon" = x; then
13523    # Not in mixed or Windows style, start by that.
13524    new_path=`cmd //c echo $path`
13525  fi
13526
13527
13528  input_path="$new_path"
13529  # Check if we need to convert this using DOS-style short mode. If the path
13530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13531  # take no chances and rewrite it.
13532  # Note: m4 eats our [], so we need to use [ and ] instead.
13533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13534  if test "x$has_forbidden_chars" != x; then
13535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13537  fi
13538
13539
13540  windows_path="$new_path"
13541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13542    unix_path=`$CYGPATH -u "$windows_path"`
13543    new_path="$unix_path"
13544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13546    new_path="$unix_path"
13547  fi
13548
13549  if test "x$path" != "x$new_path"; then
13550    BOOT_JDK="$new_path"
13551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13552$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13553  fi
13554
13555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13557
13558  else
13559    # We're on a posix platform. Hooray! :)
13560    path="$BOOT_JDK"
13561
13562    if test ! -f "$path" && test ! -d "$path"; then
13563      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13564    fi
13565
13566    has_space=`$ECHO "$path" | $GREP " "`
13567    if test "x$has_space" != x; then
13568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13569$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13570      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13571    fi
13572  fi
13573
13574              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13575$as_echo_n "checking for Boot JDK... " >&6; }
13576              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13577$as_echo "$BOOT_JDK" >&6; }
13578              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13579$as_echo_n "checking Boot JDK version... " >&6; }
13580              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13581              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13582$as_echo "$BOOT_JDK_VERSION" >&6; }
13583            fi # end check jdk version
13584          fi # end check rt.jar
13585        fi # end check javac
13586      fi # end check java
13587    fi # end check boot jdk found
13588  fi
13589
13590    done
13591  fi
13592
13593  fi
13594
13595
13596    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13597    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13598      # Do we have a bin/java?
13599      if test ! -x "$BOOT_JDK/bin/java"; then
13600        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13602        BOOT_JDK_FOUND=no
13603      else
13604        # Do we have a bin/javac?
13605        if test ! -x "$BOOT_JDK/bin/javac"; then
13606          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13608          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13609$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13610          BOOT_JDK_FOUND=no
13611        else
13612          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13613          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13614            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13616            BOOT_JDK_FOUND=no
13617          else
13618            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13619            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13620
13621            # Extra M4 quote needed to protect [] in grep expression.
13622            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13623            if test "x$FOUND_VERSION_78" = x; then
13624              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13626              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13627$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13628              BOOT_JDK_FOUND=no
13629            else
13630              # We're done! :-)
13631              BOOT_JDK_FOUND=yes
13632
13633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13634
13635  # Input might be given as Windows format, start by converting to
13636  # unix format.
13637  path="$BOOT_JDK"
13638  new_path=`$CYGPATH -u "$path"`
13639
13640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13643  # "foo.exe" is OK but "foo" is an error.
13644  #
13645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13646  # It is also a way to make sure we got the proper file name for the real test later on.
13647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13648  if test "x$test_shortpath" = x; then
13649    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13651    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13652  fi
13653
13654  # Call helper function which possibly converts this using DOS-style short mode.
13655  # If so, the updated path is stored in $new_path.
13656
13657  input_path="$new_path"
13658  # Check if we need to convert this using DOS-style short mode. If the path
13659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13660  # take no chances and rewrite it.
13661  # Note: m4 eats our [], so we need to use [ and ] instead.
13662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13663  if test "x$has_forbidden_chars" != x; then
13664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13668      # Going to short mode and back again did indeed matter. Since short mode is
13669      # case insensitive, let's make it lowercase to improve readability.
13670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13671      # Now convert it back to Unix-stile (cygpath)
13672      input_path=`$CYGPATH -u "$shortmode_path"`
13673      new_path="$input_path"
13674    fi
13675  fi
13676
13677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13678  if test "x$test_cygdrive_prefix" = x; then
13679    # As a simple fix, exclude /usr/bin since it's not a real path.
13680    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13682      # a path prefixed by /cygdrive for fixpath to work.
13683      new_path="$CYGWIN_ROOT_PATH$input_path"
13684    fi
13685  fi
13686
13687
13688  if test "x$path" != "x$new_path"; then
13689    BOOT_JDK="$new_path"
13690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13691$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13692  fi
13693
13694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13695
13696  path="$BOOT_JDK"
13697  has_colon=`$ECHO $path | $GREP ^.:`
13698  new_path="$path"
13699  if test "x$has_colon" = x; then
13700    # Not in mixed or Windows style, start by that.
13701    new_path=`cmd //c echo $path`
13702  fi
13703
13704
13705  input_path="$new_path"
13706  # Check if we need to convert this using DOS-style short mode. If the path
13707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13708  # take no chances and rewrite it.
13709  # Note: m4 eats our [], so we need to use [ and ] instead.
13710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13711  if test "x$has_forbidden_chars" != x; then
13712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13714  fi
13715
13716
13717  windows_path="$new_path"
13718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13719    unix_path=`$CYGPATH -u "$windows_path"`
13720    new_path="$unix_path"
13721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13723    new_path="$unix_path"
13724  fi
13725
13726  if test "x$path" != "x$new_path"; then
13727    BOOT_JDK="$new_path"
13728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13730  fi
13731
13732  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13733  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13734
13735  else
13736    # We're on a posix platform. Hooray! :)
13737    path="$BOOT_JDK"
13738
13739    if test ! -f "$path" && test ! -d "$path"; then
13740      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13741    fi
13742
13743    has_space=`$ECHO "$path" | $GREP " "`
13744    if test "x$has_space" != x; then
13745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13746$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13747      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13748    fi
13749  fi
13750
13751              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13752$as_echo_n "checking for Boot JDK... " >&6; }
13753              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13754$as_echo "$BOOT_JDK" >&6; }
13755              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13756$as_echo_n "checking Boot JDK version... " >&6; }
13757              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13758              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13759$as_echo "$BOOT_JDK_VERSION" >&6; }
13760            fi # end check jdk version
13761          fi # end check rt.jar
13762        fi # end check javac
13763      fi # end check java
13764    fi # end check boot jdk found
13765  fi
13766
13767
13768  if test "x$BOOT_JDK_FOUND" = xno; then
13769    # Now execute the test
13770
13771  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13772  BOOT_JDK_SUFFIX=""
13773  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13774  if test "x$ALL_JDKS_FOUND" != x; then
13775    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13776
13777  if test "x$BOOT_JDK_FOUND" = xno; then
13778    # Now execute the test
13779
13780        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13781        if test -d "$BOOT_JDK"; then
13782          BOOT_JDK_FOUND=maybe
13783          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13784$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13785        fi
13786
13787
13788    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13789    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13790      # Do we have a bin/java?
13791      if test ! -x "$BOOT_JDK/bin/java"; then
13792        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13794        BOOT_JDK_FOUND=no
13795      else
13796        # Do we have a bin/javac?
13797        if test ! -x "$BOOT_JDK/bin/javac"; then
13798          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13800          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13801$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13802          BOOT_JDK_FOUND=no
13803        else
13804          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13805          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13806            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13808            BOOT_JDK_FOUND=no
13809          else
13810            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13811            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13812
13813            # Extra M4 quote needed to protect [] in grep expression.
13814            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13815            if test "x$FOUND_VERSION_78" = x; then
13816              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13818              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13819$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13820              BOOT_JDK_FOUND=no
13821            else
13822              # We're done! :-)
13823              BOOT_JDK_FOUND=yes
13824
13825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13826
13827  # Input might be given as Windows format, start by converting to
13828  # unix format.
13829  path="$BOOT_JDK"
13830  new_path=`$CYGPATH -u "$path"`
13831
13832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13835  # "foo.exe" is OK but "foo" is an error.
13836  #
13837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13838  # It is also a way to make sure we got the proper file name for the real test later on.
13839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13840  if test "x$test_shortpath" = x; then
13841    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13842$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13843    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13844  fi
13845
13846  # Call helper function which possibly converts this using DOS-style short mode.
13847  # If so, the updated path is stored in $new_path.
13848
13849  input_path="$new_path"
13850  # Check if we need to convert this using DOS-style short mode. If the path
13851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13852  # take no chances and rewrite it.
13853  # Note: m4 eats our [], so we need to use [ and ] instead.
13854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13855  if test "x$has_forbidden_chars" != x; then
13856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13860      # Going to short mode and back again did indeed matter. Since short mode is
13861      # case insensitive, let's make it lowercase to improve readability.
13862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13863      # Now convert it back to Unix-stile (cygpath)
13864      input_path=`$CYGPATH -u "$shortmode_path"`
13865      new_path="$input_path"
13866    fi
13867  fi
13868
13869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13870  if test "x$test_cygdrive_prefix" = x; then
13871    # As a simple fix, exclude /usr/bin since it's not a real path.
13872    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13874      # a path prefixed by /cygdrive for fixpath to work.
13875      new_path="$CYGWIN_ROOT_PATH$input_path"
13876    fi
13877  fi
13878
13879
13880  if test "x$path" != "x$new_path"; then
13881    BOOT_JDK="$new_path"
13882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13883$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13884  fi
13885
13886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13887
13888  path="$BOOT_JDK"
13889  has_colon=`$ECHO $path | $GREP ^.:`
13890  new_path="$path"
13891  if test "x$has_colon" = x; then
13892    # Not in mixed or Windows style, start by that.
13893    new_path=`cmd //c echo $path`
13894  fi
13895
13896
13897  input_path="$new_path"
13898  # Check if we need to convert this using DOS-style short mode. If the path
13899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13900  # take no chances and rewrite it.
13901  # Note: m4 eats our [], so we need to use [ and ] instead.
13902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13903  if test "x$has_forbidden_chars" != x; then
13904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13906  fi
13907
13908
13909  windows_path="$new_path"
13910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13911    unix_path=`$CYGPATH -u "$windows_path"`
13912    new_path="$unix_path"
13913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13915    new_path="$unix_path"
13916  fi
13917
13918  if test "x$path" != "x$new_path"; then
13919    BOOT_JDK="$new_path"
13920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13921$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13922  fi
13923
13924  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13925  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13926
13927  else
13928    # We're on a posix platform. Hooray! :)
13929    path="$BOOT_JDK"
13930
13931    if test ! -f "$path" && test ! -d "$path"; then
13932      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13933    fi
13934
13935    has_space=`$ECHO "$path" | $GREP " "`
13936    if test "x$has_space" != x; then
13937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13938$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13939      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13940    fi
13941  fi
13942
13943              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13944$as_echo_n "checking for Boot JDK... " >&6; }
13945              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13946$as_echo "$BOOT_JDK" >&6; }
13947              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13948$as_echo_n "checking Boot JDK version... " >&6; }
13949              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13950              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13951$as_echo "$BOOT_JDK_VERSION" >&6; }
13952            fi # end check jdk version
13953          fi # end check rt.jar
13954        fi # end check javac
13955      fi # end check java
13956    fi # end check boot jdk found
13957  fi
13958
13959    done
13960  fi
13961
13962
13963    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13964    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13965      # Do we have a bin/java?
13966      if test ! -x "$BOOT_JDK/bin/java"; then
13967        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13969        BOOT_JDK_FOUND=no
13970      else
13971        # Do we have a bin/javac?
13972        if test ! -x "$BOOT_JDK/bin/javac"; then
13973          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13975          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13976$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13977          BOOT_JDK_FOUND=no
13978        else
13979          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13980          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13981            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13983            BOOT_JDK_FOUND=no
13984          else
13985            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13986            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13987
13988            # Extra M4 quote needed to protect [] in grep expression.
13989            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13990            if test "x$FOUND_VERSION_78" = x; then
13991              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13993              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13994$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13995              BOOT_JDK_FOUND=no
13996            else
13997              # We're done! :-)
13998              BOOT_JDK_FOUND=yes
13999
14000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14001
14002  # Input might be given as Windows format, start by converting to
14003  # unix format.
14004  path="$BOOT_JDK"
14005  new_path=`$CYGPATH -u "$path"`
14006
14007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14010  # "foo.exe" is OK but "foo" is an error.
14011  #
14012  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14013  # It is also a way to make sure we got the proper file name for the real test later on.
14014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14015  if test "x$test_shortpath" = x; then
14016    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14017$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14018    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14019  fi
14020
14021  # Call helper function which possibly converts this using DOS-style short mode.
14022  # If so, the updated path is stored in $new_path.
14023
14024  input_path="$new_path"
14025  # Check if we need to convert this using DOS-style short mode. If the path
14026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14027  # take no chances and rewrite it.
14028  # Note: m4 eats our [], so we need to use [ and ] instead.
14029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14030  if test "x$has_forbidden_chars" != x; then
14031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14035      # Going to short mode and back again did indeed matter. Since short mode is
14036      # case insensitive, let's make it lowercase to improve readability.
14037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14038      # Now convert it back to Unix-stile (cygpath)
14039      input_path=`$CYGPATH -u "$shortmode_path"`
14040      new_path="$input_path"
14041    fi
14042  fi
14043
14044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14045  if test "x$test_cygdrive_prefix" = x; then
14046    # As a simple fix, exclude /usr/bin since it's not a real path.
14047    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14049      # a path prefixed by /cygdrive for fixpath to work.
14050      new_path="$CYGWIN_ROOT_PATH$input_path"
14051    fi
14052  fi
14053
14054
14055  if test "x$path" != "x$new_path"; then
14056    BOOT_JDK="$new_path"
14057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14058$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14059  fi
14060
14061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14062
14063  path="$BOOT_JDK"
14064  has_colon=`$ECHO $path | $GREP ^.:`
14065  new_path="$path"
14066  if test "x$has_colon" = x; then
14067    # Not in mixed or Windows style, start by that.
14068    new_path=`cmd //c echo $path`
14069  fi
14070
14071
14072  input_path="$new_path"
14073  # Check if we need to convert this using DOS-style short mode. If the path
14074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14075  # take no chances and rewrite it.
14076  # Note: m4 eats our [], so we need to use [ and ] instead.
14077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14078  if test "x$has_forbidden_chars" != x; then
14079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14081  fi
14082
14083
14084  windows_path="$new_path"
14085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14086    unix_path=`$CYGPATH -u "$windows_path"`
14087    new_path="$unix_path"
14088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14090    new_path="$unix_path"
14091  fi
14092
14093  if test "x$path" != "x$new_path"; then
14094    BOOT_JDK="$new_path"
14095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14096$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14097  fi
14098
14099  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14100  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14101
14102  else
14103    # We're on a posix platform. Hooray! :)
14104    path="$BOOT_JDK"
14105
14106    if test ! -f "$path" && test ! -d "$path"; then
14107      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14108    fi
14109
14110    has_space=`$ECHO "$path" | $GREP " "`
14111    if test "x$has_space" != x; then
14112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14113$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14114      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14115    fi
14116  fi
14117
14118              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14119$as_echo_n "checking for Boot JDK... " >&6; }
14120              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14121$as_echo "$BOOT_JDK" >&6; }
14122              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14123$as_echo_n "checking Boot JDK version... " >&6; }
14124              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14125              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14126$as_echo "$BOOT_JDK_VERSION" >&6; }
14127            fi # end check jdk version
14128          fi # end check rt.jar
14129        fi # end check javac
14130      fi # end check java
14131    fi # end check boot jdk found
14132  fi
14133
14134  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14135
14136  if test "x$BOOT_JDK_FOUND" = xno; then
14137    # Now execute the test
14138
14139  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14140  BOOT_JDK_SUFFIX="/Contents/Home"
14141  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14142  if test "x$ALL_JDKS_FOUND" != x; then
14143    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14144
14145  if test "x$BOOT_JDK_FOUND" = xno; then
14146    # Now execute the test
14147
14148        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14149        if test -d "$BOOT_JDK"; then
14150          BOOT_JDK_FOUND=maybe
14151          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14152$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14153        fi
14154
14155
14156    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14157    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14158      # Do we have a bin/java?
14159      if test ! -x "$BOOT_JDK/bin/java"; then
14160        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14162        BOOT_JDK_FOUND=no
14163      else
14164        # Do we have a bin/javac?
14165        if test ! -x "$BOOT_JDK/bin/javac"; then
14166          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14168          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14169$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14170          BOOT_JDK_FOUND=no
14171        else
14172          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14173          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14174            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14176            BOOT_JDK_FOUND=no
14177          else
14178            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14179            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14180
14181            # Extra M4 quote needed to protect [] in grep expression.
14182            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14183            if test "x$FOUND_VERSION_78" = x; then
14184              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14186              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14187$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14188              BOOT_JDK_FOUND=no
14189            else
14190              # We're done! :-)
14191              BOOT_JDK_FOUND=yes
14192
14193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14194
14195  # Input might be given as Windows format, start by converting to
14196  # unix format.
14197  path="$BOOT_JDK"
14198  new_path=`$CYGPATH -u "$path"`
14199
14200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14203  # "foo.exe" is OK but "foo" is an error.
14204  #
14205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14206  # It is also a way to make sure we got the proper file name for the real test later on.
14207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14208  if test "x$test_shortpath" = x; then
14209    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14211    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14212  fi
14213
14214  # Call helper function which possibly converts this using DOS-style short mode.
14215  # If so, the updated path is stored in $new_path.
14216
14217  input_path="$new_path"
14218  # Check if we need to convert this using DOS-style short mode. If the path
14219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14220  # take no chances and rewrite it.
14221  # Note: m4 eats our [], so we need to use [ and ] instead.
14222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14223  if test "x$has_forbidden_chars" != x; then
14224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14228      # Going to short mode and back again did indeed matter. Since short mode is
14229      # case insensitive, let's make it lowercase to improve readability.
14230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14231      # Now convert it back to Unix-stile (cygpath)
14232      input_path=`$CYGPATH -u "$shortmode_path"`
14233      new_path="$input_path"
14234    fi
14235  fi
14236
14237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14238  if test "x$test_cygdrive_prefix" = x; then
14239    # As a simple fix, exclude /usr/bin since it's not a real path.
14240    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14242      # a path prefixed by /cygdrive for fixpath to work.
14243      new_path="$CYGWIN_ROOT_PATH$input_path"
14244    fi
14245  fi
14246
14247
14248  if test "x$path" != "x$new_path"; then
14249    BOOT_JDK="$new_path"
14250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14252  fi
14253
14254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14255
14256  path="$BOOT_JDK"
14257  has_colon=`$ECHO $path | $GREP ^.:`
14258  new_path="$path"
14259  if test "x$has_colon" = x; then
14260    # Not in mixed or Windows style, start by that.
14261    new_path=`cmd //c echo $path`
14262  fi
14263
14264
14265  input_path="$new_path"
14266  # Check if we need to convert this using DOS-style short mode. If the path
14267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14268  # take no chances and rewrite it.
14269  # Note: m4 eats our [], so we need to use [ and ] instead.
14270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14271  if test "x$has_forbidden_chars" != x; then
14272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14274  fi
14275
14276
14277  windows_path="$new_path"
14278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14279    unix_path=`$CYGPATH -u "$windows_path"`
14280    new_path="$unix_path"
14281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14283    new_path="$unix_path"
14284  fi
14285
14286  if test "x$path" != "x$new_path"; then
14287    BOOT_JDK="$new_path"
14288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14289$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14290  fi
14291
14292  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14293  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14294
14295  else
14296    # We're on a posix platform. Hooray! :)
14297    path="$BOOT_JDK"
14298
14299    if test ! -f "$path" && test ! -d "$path"; then
14300      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14301    fi
14302
14303    has_space=`$ECHO "$path" | $GREP " "`
14304    if test "x$has_space" != x; then
14305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14307      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14308    fi
14309  fi
14310
14311              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14312$as_echo_n "checking for Boot JDK... " >&6; }
14313              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14314$as_echo "$BOOT_JDK" >&6; }
14315              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14316$as_echo_n "checking Boot JDK version... " >&6; }
14317              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14318              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14319$as_echo "$BOOT_JDK_VERSION" >&6; }
14320            fi # end check jdk version
14321          fi # end check rt.jar
14322        fi # end check javac
14323      fi # end check java
14324    fi # end check boot jdk found
14325  fi
14326
14327    done
14328  fi
14329
14330
14331    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14332    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14333      # Do we have a bin/java?
14334      if test ! -x "$BOOT_JDK/bin/java"; then
14335        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14337        BOOT_JDK_FOUND=no
14338      else
14339        # Do we have a bin/javac?
14340        if test ! -x "$BOOT_JDK/bin/javac"; then
14341          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14343          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14344$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14345          BOOT_JDK_FOUND=no
14346        else
14347          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14348          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14349            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14351            BOOT_JDK_FOUND=no
14352          else
14353            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14354            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14355
14356            # Extra M4 quote needed to protect [] in grep expression.
14357            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14358            if test "x$FOUND_VERSION_78" = x; then
14359              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14361              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14362$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14363              BOOT_JDK_FOUND=no
14364            else
14365              # We're done! :-)
14366              BOOT_JDK_FOUND=yes
14367
14368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14369
14370  # Input might be given as Windows format, start by converting to
14371  # unix format.
14372  path="$BOOT_JDK"
14373  new_path=`$CYGPATH -u "$path"`
14374
14375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14378  # "foo.exe" is OK but "foo" is an error.
14379  #
14380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14381  # It is also a way to make sure we got the proper file name for the real test later on.
14382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14383  if test "x$test_shortpath" = x; then
14384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14385$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14386    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14387  fi
14388
14389  # Call helper function which possibly converts this using DOS-style short mode.
14390  # If so, the updated path is stored in $new_path.
14391
14392  input_path="$new_path"
14393  # Check if we need to convert this using DOS-style short mode. If the path
14394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14395  # take no chances and rewrite it.
14396  # Note: m4 eats our [], so we need to use [ and ] instead.
14397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14398  if test "x$has_forbidden_chars" != x; then
14399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14403      # Going to short mode and back again did indeed matter. Since short mode is
14404      # case insensitive, let's make it lowercase to improve readability.
14405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14406      # Now convert it back to Unix-stile (cygpath)
14407      input_path=`$CYGPATH -u "$shortmode_path"`
14408      new_path="$input_path"
14409    fi
14410  fi
14411
14412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14413  if test "x$test_cygdrive_prefix" = x; then
14414    # As a simple fix, exclude /usr/bin since it's not a real path.
14415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14417      # a path prefixed by /cygdrive for fixpath to work.
14418      new_path="$CYGWIN_ROOT_PATH$input_path"
14419    fi
14420  fi
14421
14422
14423  if test "x$path" != "x$new_path"; then
14424    BOOT_JDK="$new_path"
14425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14427  fi
14428
14429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14430
14431  path="$BOOT_JDK"
14432  has_colon=`$ECHO $path | $GREP ^.:`
14433  new_path="$path"
14434  if test "x$has_colon" = x; then
14435    # Not in mixed or Windows style, start by that.
14436    new_path=`cmd //c echo $path`
14437  fi
14438
14439
14440  input_path="$new_path"
14441  # Check if we need to convert this using DOS-style short mode. If the path
14442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14443  # take no chances and rewrite it.
14444  # Note: m4 eats our [], so we need to use [ and ] instead.
14445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14446  if test "x$has_forbidden_chars" != x; then
14447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14449  fi
14450
14451
14452  windows_path="$new_path"
14453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14454    unix_path=`$CYGPATH -u "$windows_path"`
14455    new_path="$unix_path"
14456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14458    new_path="$unix_path"
14459  fi
14460
14461  if test "x$path" != "x$new_path"; then
14462    BOOT_JDK="$new_path"
14463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14465  fi
14466
14467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14469
14470  else
14471    # We're on a posix platform. Hooray! :)
14472    path="$BOOT_JDK"
14473
14474    if test ! -f "$path" && test ! -d "$path"; then
14475      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14476    fi
14477
14478    has_space=`$ECHO "$path" | $GREP " "`
14479    if test "x$has_space" != x; then
14480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14481$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14482      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14483    fi
14484  fi
14485
14486              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14487$as_echo_n "checking for Boot JDK... " >&6; }
14488              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14489$as_echo "$BOOT_JDK" >&6; }
14490              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14491$as_echo_n "checking Boot JDK version... " >&6; }
14492              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14493              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14494$as_echo "$BOOT_JDK_VERSION" >&6; }
14495            fi # end check jdk version
14496          fi # end check rt.jar
14497        fi # end check javac
14498      fi # end check java
14499    fi # end check boot jdk found
14500  fi
14501
14502
14503  if test "x$BOOT_JDK_FOUND" = xno; then
14504    # Now execute the test
14505
14506  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14507  BOOT_JDK_SUFFIX="/Contents/Home"
14508  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14509  if test "x$ALL_JDKS_FOUND" != x; then
14510    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14511
14512  if test "x$BOOT_JDK_FOUND" = xno; then
14513    # Now execute the test
14514
14515        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14516        if test -d "$BOOT_JDK"; then
14517          BOOT_JDK_FOUND=maybe
14518          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14519$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14520        fi
14521
14522
14523    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14524    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14525      # Do we have a bin/java?
14526      if test ! -x "$BOOT_JDK/bin/java"; then
14527        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14529        BOOT_JDK_FOUND=no
14530      else
14531        # Do we have a bin/javac?
14532        if test ! -x "$BOOT_JDK/bin/javac"; then
14533          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14535          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14536$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14537          BOOT_JDK_FOUND=no
14538        else
14539          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14540          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14541            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14543            BOOT_JDK_FOUND=no
14544          else
14545            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14546            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14547
14548            # Extra M4 quote needed to protect [] in grep expression.
14549            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14550            if test "x$FOUND_VERSION_78" = x; then
14551              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14553              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14554$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14555              BOOT_JDK_FOUND=no
14556            else
14557              # We're done! :-)
14558              BOOT_JDK_FOUND=yes
14559
14560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14561
14562  # Input might be given as Windows format, start by converting to
14563  # unix format.
14564  path="$BOOT_JDK"
14565  new_path=`$CYGPATH -u "$path"`
14566
14567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14570  # "foo.exe" is OK but "foo" is an error.
14571  #
14572  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14573  # It is also a way to make sure we got the proper file name for the real test later on.
14574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14575  if test "x$test_shortpath" = x; then
14576    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14578    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14579  fi
14580
14581  # Call helper function which possibly converts this using DOS-style short mode.
14582  # If so, the updated path is stored in $new_path.
14583
14584  input_path="$new_path"
14585  # Check if we need to convert this using DOS-style short mode. If the path
14586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14587  # take no chances and rewrite it.
14588  # Note: m4 eats our [], so we need to use [ and ] instead.
14589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14590  if test "x$has_forbidden_chars" != x; then
14591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14595      # Going to short mode and back again did indeed matter. Since short mode is
14596      # case insensitive, let's make it lowercase to improve readability.
14597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14598      # Now convert it back to Unix-stile (cygpath)
14599      input_path=`$CYGPATH -u "$shortmode_path"`
14600      new_path="$input_path"
14601    fi
14602  fi
14603
14604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14605  if test "x$test_cygdrive_prefix" = x; then
14606    # As a simple fix, exclude /usr/bin since it's not a real path.
14607    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14609      # a path prefixed by /cygdrive for fixpath to work.
14610      new_path="$CYGWIN_ROOT_PATH$input_path"
14611    fi
14612  fi
14613
14614
14615  if test "x$path" != "x$new_path"; then
14616    BOOT_JDK="$new_path"
14617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14618$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14619  fi
14620
14621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14622
14623  path="$BOOT_JDK"
14624  has_colon=`$ECHO $path | $GREP ^.:`
14625  new_path="$path"
14626  if test "x$has_colon" = x; then
14627    # Not in mixed or Windows style, start by that.
14628    new_path=`cmd //c echo $path`
14629  fi
14630
14631
14632  input_path="$new_path"
14633  # Check if we need to convert this using DOS-style short mode. If the path
14634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14635  # take no chances and rewrite it.
14636  # Note: m4 eats our [], so we need to use [ and ] instead.
14637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14638  if test "x$has_forbidden_chars" != x; then
14639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14641  fi
14642
14643
14644  windows_path="$new_path"
14645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14646    unix_path=`$CYGPATH -u "$windows_path"`
14647    new_path="$unix_path"
14648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14650    new_path="$unix_path"
14651  fi
14652
14653  if test "x$path" != "x$new_path"; then
14654    BOOT_JDK="$new_path"
14655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14656$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14657  fi
14658
14659  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14660  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14661
14662  else
14663    # We're on a posix platform. Hooray! :)
14664    path="$BOOT_JDK"
14665
14666    if test ! -f "$path" && test ! -d "$path"; then
14667      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14668    fi
14669
14670    has_space=`$ECHO "$path" | $GREP " "`
14671    if test "x$has_space" != x; then
14672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14674      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14675    fi
14676  fi
14677
14678              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14679$as_echo_n "checking for Boot JDK... " >&6; }
14680              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14681$as_echo "$BOOT_JDK" >&6; }
14682              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14683$as_echo_n "checking Boot JDK version... " >&6; }
14684              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14685              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14686$as_echo "$BOOT_JDK_VERSION" >&6; }
14687            fi # end check jdk version
14688          fi # end check rt.jar
14689        fi # end check javac
14690      fi # end check java
14691    fi # end check boot jdk found
14692  fi
14693
14694    done
14695  fi
14696
14697
14698    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14699    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14700      # Do we have a bin/java?
14701      if test ! -x "$BOOT_JDK/bin/java"; then
14702        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14704        BOOT_JDK_FOUND=no
14705      else
14706        # Do we have a bin/javac?
14707        if test ! -x "$BOOT_JDK/bin/javac"; then
14708          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14710          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14711$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14712          BOOT_JDK_FOUND=no
14713        else
14714          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14715          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14716            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14718            BOOT_JDK_FOUND=no
14719          else
14720            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14721            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14722
14723            # Extra M4 quote needed to protect [] in grep expression.
14724            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14725            if test "x$FOUND_VERSION_78" = x; then
14726              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14728              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14729$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14730              BOOT_JDK_FOUND=no
14731            else
14732              # We're done! :-)
14733              BOOT_JDK_FOUND=yes
14734
14735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14736
14737  # Input might be given as Windows format, start by converting to
14738  # unix format.
14739  path="$BOOT_JDK"
14740  new_path=`$CYGPATH -u "$path"`
14741
14742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14745  # "foo.exe" is OK but "foo" is an error.
14746  #
14747  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14748  # It is also a way to make sure we got the proper file name for the real test later on.
14749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14750  if test "x$test_shortpath" = x; then
14751    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14752$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14753    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14754  fi
14755
14756  # Call helper function which possibly converts this using DOS-style short mode.
14757  # If so, the updated path is stored in $new_path.
14758
14759  input_path="$new_path"
14760  # Check if we need to convert this using DOS-style short mode. If the path
14761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14762  # take no chances and rewrite it.
14763  # Note: m4 eats our [], so we need to use [ and ] instead.
14764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14765  if test "x$has_forbidden_chars" != x; then
14766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14770      # Going to short mode and back again did indeed matter. Since short mode is
14771      # case insensitive, let's make it lowercase to improve readability.
14772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14773      # Now convert it back to Unix-stile (cygpath)
14774      input_path=`$CYGPATH -u "$shortmode_path"`
14775      new_path="$input_path"
14776    fi
14777  fi
14778
14779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14780  if test "x$test_cygdrive_prefix" = x; then
14781    # As a simple fix, exclude /usr/bin since it's not a real path.
14782    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14784      # a path prefixed by /cygdrive for fixpath to work.
14785      new_path="$CYGWIN_ROOT_PATH$input_path"
14786    fi
14787  fi
14788
14789
14790  if test "x$path" != "x$new_path"; then
14791    BOOT_JDK="$new_path"
14792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14793$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14794  fi
14795
14796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14797
14798  path="$BOOT_JDK"
14799  has_colon=`$ECHO $path | $GREP ^.:`
14800  new_path="$path"
14801  if test "x$has_colon" = x; then
14802    # Not in mixed or Windows style, start by that.
14803    new_path=`cmd //c echo $path`
14804  fi
14805
14806
14807  input_path="$new_path"
14808  # Check if we need to convert this using DOS-style short mode. If the path
14809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14810  # take no chances and rewrite it.
14811  # Note: m4 eats our [], so we need to use [ and ] instead.
14812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14813  if test "x$has_forbidden_chars" != x; then
14814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14815    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14816  fi
14817
14818
14819  windows_path="$new_path"
14820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14821    unix_path=`$CYGPATH -u "$windows_path"`
14822    new_path="$unix_path"
14823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14825    new_path="$unix_path"
14826  fi
14827
14828  if test "x$path" != "x$new_path"; then
14829    BOOT_JDK="$new_path"
14830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14831$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14832  fi
14833
14834  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14835  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14836
14837  else
14838    # We're on a posix platform. Hooray! :)
14839    path="$BOOT_JDK"
14840
14841    if test ! -f "$path" && test ! -d "$path"; then
14842      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14843    fi
14844
14845    has_space=`$ECHO "$path" | $GREP " "`
14846    if test "x$has_space" != x; then
14847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14849      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14850    fi
14851  fi
14852
14853              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14854$as_echo_n "checking for Boot JDK... " >&6; }
14855              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14856$as_echo "$BOOT_JDK" >&6; }
14857              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14858$as_echo_n "checking Boot JDK version... " >&6; }
14859              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14860              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14861$as_echo "$BOOT_JDK_VERSION" >&6; }
14862            fi # end check jdk version
14863          fi # end check rt.jar
14864        fi # end check javac
14865      fi # end check java
14866    fi # end check boot jdk found
14867  fi
14868
14869  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14870
14871  if test "x$BOOT_JDK_FOUND" = xno; then
14872    # Now execute the test
14873
14874  BOOT_JDK_PREFIX="/usr/lib/jvm"
14875  BOOT_JDK_SUFFIX=""
14876  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14877  if test "x$ALL_JDKS_FOUND" != x; then
14878    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14879
14880  if test "x$BOOT_JDK_FOUND" = xno; then
14881    # Now execute the test
14882
14883        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14884        if test -d "$BOOT_JDK"; then
14885          BOOT_JDK_FOUND=maybe
14886          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14887$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14888        fi
14889
14890
14891    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14892    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14893      # Do we have a bin/java?
14894      if test ! -x "$BOOT_JDK/bin/java"; then
14895        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14896$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14897        BOOT_JDK_FOUND=no
14898      else
14899        # Do we have a bin/javac?
14900        if test ! -x "$BOOT_JDK/bin/javac"; then
14901          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14903          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14904$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14905          BOOT_JDK_FOUND=no
14906        else
14907          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14908          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14909            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14911            BOOT_JDK_FOUND=no
14912          else
14913            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14914            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14915
14916            # Extra M4 quote needed to protect [] in grep expression.
14917            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14918            if test "x$FOUND_VERSION_78" = x; then
14919              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14921              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14922$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14923              BOOT_JDK_FOUND=no
14924            else
14925              # We're done! :-)
14926              BOOT_JDK_FOUND=yes
14927
14928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14929
14930  # Input might be given as Windows format, start by converting to
14931  # unix format.
14932  path="$BOOT_JDK"
14933  new_path=`$CYGPATH -u "$path"`
14934
14935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14938  # "foo.exe" is OK but "foo" is an error.
14939  #
14940  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14941  # It is also a way to make sure we got the proper file name for the real test later on.
14942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14943  if test "x$test_shortpath" = x; then
14944    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14946    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14947  fi
14948
14949  # Call helper function which possibly converts this using DOS-style short mode.
14950  # If so, the updated path is stored in $new_path.
14951
14952  input_path="$new_path"
14953  # Check if we need to convert this using DOS-style short mode. If the path
14954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14955  # take no chances and rewrite it.
14956  # Note: m4 eats our [], so we need to use [ and ] instead.
14957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14958  if test "x$has_forbidden_chars" != x; then
14959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14963      # Going to short mode and back again did indeed matter. Since short mode is
14964      # case insensitive, let's make it lowercase to improve readability.
14965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14966      # Now convert it back to Unix-stile (cygpath)
14967      input_path=`$CYGPATH -u "$shortmode_path"`
14968      new_path="$input_path"
14969    fi
14970  fi
14971
14972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14973  if test "x$test_cygdrive_prefix" = x; then
14974    # As a simple fix, exclude /usr/bin since it's not a real path.
14975    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14977      # a path prefixed by /cygdrive for fixpath to work.
14978      new_path="$CYGWIN_ROOT_PATH$input_path"
14979    fi
14980  fi
14981
14982
14983  if test "x$path" != "x$new_path"; then
14984    BOOT_JDK="$new_path"
14985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14986$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14987  fi
14988
14989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14990
14991  path="$BOOT_JDK"
14992  has_colon=`$ECHO $path | $GREP ^.:`
14993  new_path="$path"
14994  if test "x$has_colon" = x; then
14995    # Not in mixed or Windows style, start by that.
14996    new_path=`cmd //c echo $path`
14997  fi
14998
14999
15000  input_path="$new_path"
15001  # Check if we need to convert this using DOS-style short mode. If the path
15002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15003  # take no chances and rewrite it.
15004  # Note: m4 eats our [], so we need to use [ and ] instead.
15005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15006  if test "x$has_forbidden_chars" != x; then
15007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15009  fi
15010
15011
15012  windows_path="$new_path"
15013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15014    unix_path=`$CYGPATH -u "$windows_path"`
15015    new_path="$unix_path"
15016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15018    new_path="$unix_path"
15019  fi
15020
15021  if test "x$path" != "x$new_path"; then
15022    BOOT_JDK="$new_path"
15023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15025  fi
15026
15027  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15028  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15029
15030  else
15031    # We're on a posix platform. Hooray! :)
15032    path="$BOOT_JDK"
15033
15034    if test ! -f "$path" && test ! -d "$path"; then
15035      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15036    fi
15037
15038    has_space=`$ECHO "$path" | $GREP " "`
15039    if test "x$has_space" != x; then
15040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15041$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15042      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15043    fi
15044  fi
15045
15046              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15047$as_echo_n "checking for Boot JDK... " >&6; }
15048              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15049$as_echo "$BOOT_JDK" >&6; }
15050              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15051$as_echo_n "checking Boot JDK version... " >&6; }
15052              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15053              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15054$as_echo "$BOOT_JDK_VERSION" >&6; }
15055            fi # end check jdk version
15056          fi # end check rt.jar
15057        fi # end check javac
15058      fi # end check java
15059    fi # end check boot jdk found
15060  fi
15061
15062    done
15063  fi
15064
15065
15066    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15067    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15068      # Do we have a bin/java?
15069      if test ! -x "$BOOT_JDK/bin/java"; then
15070        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15072        BOOT_JDK_FOUND=no
15073      else
15074        # Do we have a bin/javac?
15075        if test ! -x "$BOOT_JDK/bin/javac"; then
15076          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15078          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15079$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15080          BOOT_JDK_FOUND=no
15081        else
15082          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15083          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15084            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15086            BOOT_JDK_FOUND=no
15087          else
15088            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15089            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15090
15091            # Extra M4 quote needed to protect [] in grep expression.
15092            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15093            if test "x$FOUND_VERSION_78" = x; then
15094              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15096              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15097$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15098              BOOT_JDK_FOUND=no
15099            else
15100              # We're done! :-)
15101              BOOT_JDK_FOUND=yes
15102
15103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15104
15105  # Input might be given as Windows format, start by converting to
15106  # unix format.
15107  path="$BOOT_JDK"
15108  new_path=`$CYGPATH -u "$path"`
15109
15110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15113  # "foo.exe" is OK but "foo" is an error.
15114  #
15115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15116  # It is also a way to make sure we got the proper file name for the real test later on.
15117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15118  if test "x$test_shortpath" = x; then
15119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15121    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15122  fi
15123
15124  # Call helper function which possibly converts this using DOS-style short mode.
15125  # If so, the updated path is stored in $new_path.
15126
15127  input_path="$new_path"
15128  # Check if we need to convert this using DOS-style short mode. If the path
15129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15130  # take no chances and rewrite it.
15131  # Note: m4 eats our [], so we need to use [ and ] instead.
15132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15133  if test "x$has_forbidden_chars" != x; then
15134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15138      # Going to short mode and back again did indeed matter. Since short mode is
15139      # case insensitive, let's make it lowercase to improve readability.
15140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15141      # Now convert it back to Unix-stile (cygpath)
15142      input_path=`$CYGPATH -u "$shortmode_path"`
15143      new_path="$input_path"
15144    fi
15145  fi
15146
15147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15148  if test "x$test_cygdrive_prefix" = x; then
15149    # As a simple fix, exclude /usr/bin since it's not a real path.
15150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15152      # a path prefixed by /cygdrive for fixpath to work.
15153      new_path="$CYGWIN_ROOT_PATH$input_path"
15154    fi
15155  fi
15156
15157
15158  if test "x$path" != "x$new_path"; then
15159    BOOT_JDK="$new_path"
15160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15162  fi
15163
15164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15165
15166  path="$BOOT_JDK"
15167  has_colon=`$ECHO $path | $GREP ^.:`
15168  new_path="$path"
15169  if test "x$has_colon" = x; then
15170    # Not in mixed or Windows style, start by that.
15171    new_path=`cmd //c echo $path`
15172  fi
15173
15174
15175  input_path="$new_path"
15176  # Check if we need to convert this using DOS-style short mode. If the path
15177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15178  # take no chances and rewrite it.
15179  # Note: m4 eats our [], so we need to use [ and ] instead.
15180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15181  if test "x$has_forbidden_chars" != x; then
15182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15184  fi
15185
15186
15187  windows_path="$new_path"
15188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15189    unix_path=`$CYGPATH -u "$windows_path"`
15190    new_path="$unix_path"
15191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15193    new_path="$unix_path"
15194  fi
15195
15196  if test "x$path" != "x$new_path"; then
15197    BOOT_JDK="$new_path"
15198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15200  fi
15201
15202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15204
15205  else
15206    # We're on a posix platform. Hooray! :)
15207    path="$BOOT_JDK"
15208
15209    if test ! -f "$path" && test ! -d "$path"; then
15210      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15211    fi
15212
15213    has_space=`$ECHO "$path" | $GREP " "`
15214    if test "x$has_space" != x; then
15215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15217      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15218    fi
15219  fi
15220
15221              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15222$as_echo_n "checking for Boot JDK... " >&6; }
15223              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15224$as_echo "$BOOT_JDK" >&6; }
15225              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15226$as_echo_n "checking Boot JDK version... " >&6; }
15227              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15228              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15229$as_echo "$BOOT_JDK_VERSION" >&6; }
15230            fi # end check jdk version
15231          fi # end check rt.jar
15232        fi # end check javac
15233      fi # end check java
15234    fi # end check boot jdk found
15235  fi
15236
15237  fi
15238
15239
15240    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15241    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15242      # Do we have a bin/java?
15243      if test ! -x "$BOOT_JDK/bin/java"; then
15244        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15246        BOOT_JDK_FOUND=no
15247      else
15248        # Do we have a bin/javac?
15249        if test ! -x "$BOOT_JDK/bin/javac"; then
15250          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15252          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15253$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15254          BOOT_JDK_FOUND=no
15255        else
15256          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15257          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15258            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15260            BOOT_JDK_FOUND=no
15261          else
15262            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15263            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15264
15265            # Extra M4 quote needed to protect [] in grep expression.
15266            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15267            if test "x$FOUND_VERSION_78" = x; then
15268              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15270              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15271$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15272              BOOT_JDK_FOUND=no
15273            else
15274              # We're done! :-)
15275              BOOT_JDK_FOUND=yes
15276
15277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15278
15279  # Input might be given as Windows format, start by converting to
15280  # unix format.
15281  path="$BOOT_JDK"
15282  new_path=`$CYGPATH -u "$path"`
15283
15284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15287  # "foo.exe" is OK but "foo" is an error.
15288  #
15289  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15290  # It is also a way to make sure we got the proper file name for the real test later on.
15291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15292  if test "x$test_shortpath" = x; then
15293    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15294$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15295    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15296  fi
15297
15298  # Call helper function which possibly converts this using DOS-style short mode.
15299  # If so, the updated path is stored in $new_path.
15300
15301  input_path="$new_path"
15302  # Check if we need to convert this using DOS-style short mode. If the path
15303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15304  # take no chances and rewrite it.
15305  # Note: m4 eats our [], so we need to use [ and ] instead.
15306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15307  if test "x$has_forbidden_chars" != x; then
15308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15312      # Going to short mode and back again did indeed matter. Since short mode is
15313      # case insensitive, let's make it lowercase to improve readability.
15314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15315      # Now convert it back to Unix-stile (cygpath)
15316      input_path=`$CYGPATH -u "$shortmode_path"`
15317      new_path="$input_path"
15318    fi
15319  fi
15320
15321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15322  if test "x$test_cygdrive_prefix" = x; then
15323    # As a simple fix, exclude /usr/bin since it's not a real path.
15324    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15326      # a path prefixed by /cygdrive for fixpath to work.
15327      new_path="$CYGWIN_ROOT_PATH$input_path"
15328    fi
15329  fi
15330
15331
15332  if test "x$path" != "x$new_path"; then
15333    BOOT_JDK="$new_path"
15334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15335$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15336  fi
15337
15338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15339
15340  path="$BOOT_JDK"
15341  has_colon=`$ECHO $path | $GREP ^.:`
15342  new_path="$path"
15343  if test "x$has_colon" = x; then
15344    # Not in mixed or Windows style, start by that.
15345    new_path=`cmd //c echo $path`
15346  fi
15347
15348
15349  input_path="$new_path"
15350  # Check if we need to convert this using DOS-style short mode. If the path
15351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15352  # take no chances and rewrite it.
15353  # Note: m4 eats our [], so we need to use [ and ] instead.
15354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15355  if test "x$has_forbidden_chars" != x; then
15356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15357    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15358  fi
15359
15360
15361  windows_path="$new_path"
15362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15363    unix_path=`$CYGPATH -u "$windows_path"`
15364    new_path="$unix_path"
15365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15367    new_path="$unix_path"
15368  fi
15369
15370  if test "x$path" != "x$new_path"; then
15371    BOOT_JDK="$new_path"
15372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15373$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15374  fi
15375
15376  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15377  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15378
15379  else
15380    # We're on a posix platform. Hooray! :)
15381    path="$BOOT_JDK"
15382
15383    if test ! -f "$path" && test ! -d "$path"; then
15384      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15385    fi
15386
15387    has_space=`$ECHO "$path" | $GREP " "`
15388    if test "x$has_space" != x; then
15389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15390$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15391      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15392    fi
15393  fi
15394
15395              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15396$as_echo_n "checking for Boot JDK... " >&6; }
15397              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15398$as_echo "$BOOT_JDK" >&6; }
15399              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15400$as_echo_n "checking Boot JDK version... " >&6; }
15401              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15402              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15403$as_echo "$BOOT_JDK_VERSION" >&6; }
15404            fi # end check jdk version
15405          fi # end check rt.jar
15406        fi # end check javac
15407      fi # end check java
15408    fi # end check boot jdk found
15409  fi
15410
15411
15412# If we haven't found anything yet, we've truly lost. Give up.
15413if test "x$BOOT_JDK_FOUND" = xno; then
15414
15415    # Print a helpful message on how to acquire the necessary build dependency.
15416    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15417    MISSING_DEPENDENCY=openjdk
15418    PKGHANDLER_COMMAND=
15419
15420    case $PKGHANDLER in
15421	apt-get)
15422                apt_help     $MISSING_DEPENDENCY ;;
15423    yum)
15424                yum_help     $MISSING_DEPENDENCY ;;
15425	port)
15426                port_help    $MISSING_DEPENDENCY ;;
15427	pkgutil)
15428                pkgutil_help $MISSING_DEPENDENCY ;;
15429	pkgadd)
15430                pkgadd_help  $MISSING_DEPENDENCY ;;
15431    * )
15432      break ;;
15433    esac
15434
15435    if test "x$PKGHANDLER_COMMAND" != x; then
15436        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15437    fi
15438
15439  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15440$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15441  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15442$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15443  as_fn_error $? "Cannot continue" "$LINENO" 5
15444fi
15445
15446# Setup proper paths for what we found
15447BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15448if test ! -f "$BOOT_RTJAR"; then
15449    # On MacOSX it is called classes.jar
15450    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15451    if test -f "$BOOT_RTJAR"; then
15452      # Remove the ..
15453      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15454    fi
15455fi
15456BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15457BOOT_JDK="$BOOT_JDK"
15458
15459
15460
15461
15462# Setup tools from the Boot JDK.
15463
15464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15465$as_echo_n "checking for java in Boot JDK... " >&6; }
15466  JAVA=$BOOT_JDK/bin/java
15467  if test ! -x $JAVA; then
15468      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15469$as_echo "not found" >&6; }
15470      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15471$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15472      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15473  fi
15474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15475$as_echo "ok" >&6; }
15476
15477
15478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15479$as_echo_n "checking for javac in Boot JDK... " >&6; }
15480  JAVAC=$BOOT_JDK/bin/javac
15481  if test ! -x $JAVAC; then
15482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15483$as_echo "not found" >&6; }
15484      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15485$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15486      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15487  fi
15488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15489$as_echo "ok" >&6; }
15490
15491
15492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15493$as_echo_n "checking for javah in Boot JDK... " >&6; }
15494  JAVAH=$BOOT_JDK/bin/javah
15495  if test ! -x $JAVAH; then
15496      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15497$as_echo "not found" >&6; }
15498      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15499$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15500      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15501  fi
15502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15503$as_echo "ok" >&6; }
15504
15505
15506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15507$as_echo_n "checking for javap in Boot JDK... " >&6; }
15508  JAVAP=$BOOT_JDK/bin/javap
15509  if test ! -x $JAVAP; then
15510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15511$as_echo "not found" >&6; }
15512      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15513$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15514      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15515  fi
15516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15517$as_echo "ok" >&6; }
15518
15519
15520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15521$as_echo_n "checking for jar in Boot JDK... " >&6; }
15522  JAR=$BOOT_JDK/bin/jar
15523  if test ! -x $JAR; then
15524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15525$as_echo "not found" >&6; }
15526      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15527$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15528      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15529  fi
15530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15531$as_echo "ok" >&6; }
15532
15533
15534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15535$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15536  RMIC=$BOOT_JDK/bin/rmic
15537  if test ! -x $RMIC; then
15538      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15539$as_echo "not found" >&6; }
15540      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15541$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15542      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15543  fi
15544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15545$as_echo "ok" >&6; }
15546
15547
15548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15549$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15550  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15551  if test ! -x $NATIVE2ASCII; then
15552      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15553$as_echo "not found" >&6; }
15554      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15555$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15556      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15557  fi
15558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15559$as_echo "ok" >&6; }
15560
15561
15562# Finally, set some other options...
15563
15564# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15565BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15566
15567
15568
15569
15570##############################################################################
15571#
15572# Specify options for anything that is run with the Boot JDK.
15573#
15574
15575# Check whether --with-boot-jdk-jvmargs was given.
15576if test "${with_boot_jdk_jvmargs+set}" = set; then :
15577  withval=$with_boot_jdk_jvmargs;
15578fi
15579
15580
15581if test "x$with_boot_jdk_jvmargs" = x; then
15582    # Not all JVM:s accept the same arguments on the command line.
15583    # OpenJDK specific increase in thread stack for JDK build,
15584    # well more specifically, when running javac.
15585    if test "x$BUILD_NUM_BITS" = x32; then
15586       STACK_SIZE=768
15587    else
15588       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15589       # since 64-bit pointers are pushed on the stach. Apparently, we need
15590       # to increase the stack space when javacing the JDK....
15591       STACK_SIZE=1536
15592    fi
15593
15594    # Minimum amount of heap memory.
15595
15596    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15597    # If so, then append -Xms64M to boot_jdk_jvmargs
15598    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15599    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15600    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15601        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15602    fi
15603
15604    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15605        # Why does macosx need more heap? Its the huge JDK batch.
15606
15607    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15608    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15609    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15610    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15611    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15612        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15613    fi
15614
15615    else
15616
15617    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15618    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15619    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15620    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15621    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15622        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15623    fi
15624
15625    fi
15626    # When is adding -client something that speeds up the JVM?
15627    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15628
15629    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15630    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15631    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15632    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15633    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15634        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15635    fi
15636
15637
15638    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15639    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15640    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15641    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -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:MaxPermSize=160m"
15644    fi
15645
15646
15647    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15648    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15649    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15650    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15651    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15652        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15653    fi
15654
15655    # Disable special log output when a debug build is used as Boot JDK...
15656
15657    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15658    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15659    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15660    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15661    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15662        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15663    fi
15664
15665fi
15666
15667BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15668
15669
15670
15671###############################################################################
15672#
15673# Configure the sources to use. We can add or override individual directories.
15674#
15675###############################################################################
15676
15677
15678
15679# Where are the sources. Any of these can be overridden
15680# using --with-override-corba and the likes.
15681LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15682CORBA_TOPDIR="$SRC_ROOT/corba"
15683JAXP_TOPDIR="$SRC_ROOT/jaxp"
15684JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15685HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15686NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15687JDK_TOPDIR="$SRC_ROOT/jdk"
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698###############################################################################
15699#
15700# Pickup additional source for a component from outside of the source root
15701# or override source for a component.
15702#
15703
15704# Check whether --with-add-source-root was given.
15705if test "${with_add_source_root+set}" = set; then :
15706  withval=$with_add_source_root;
15707fi
15708
15709
15710
15711# Check whether --with-override-source-root was given.
15712if test "${with_override_source_root+set}" = set; then :
15713  withval=$with_override_source_root;
15714fi
15715
15716
15717
15718# Check whether --with-adds-and-overrides was given.
15719if test "${with_adds_and_overrides+set}" = set; then :
15720  withval=$with_adds_and_overrides;
15721fi
15722
15723
15724if test "x$with_adds_and_overrides" != x; then
15725    with_add_source_root="$with_adds_and_overrides/adds"
15726    with_override_source_root="$with_adds_and_overrides/overrides"
15727fi
15728
15729if test "x$with_add_source_root" != x; then
15730    if ! test -d $with_add_source_root; then
15731       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15732    fi
15733    CURDIR="$PWD"
15734    cd "$with_add_source_root"
15735    ADD_SRC_ROOT="`pwd`"
15736    cd "$CURDIR"
15737    # Verify that the addon source root does not have any root makefiles.
15738    # If it does, then it is usually an error, prevent this.
15739    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15740       test -f $with_add_source_root/langtools/make/Makefile; then
15741        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
15742    fi
15743    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15744       test -f $with_add_source_root/corba/make/Makefile; then
15745        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
15746    fi
15747    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15748       test -f $with_add_source_root/jaxp/make/Makefile; then
15749        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
15750    fi
15751    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15752       test -f $with_add_source_root/jaxws/make/Makefile; then
15753        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
15754    fi
15755    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15756       test -f $with_add_source_root/hotspot/make/Makefile; then
15757        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
15758    fi
15759    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15760       test -f $with_add_source_root/jdk/make/Makefile; then
15761        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
15762    fi
15763fi
15764
15765
15766if test "x$with_override_source_root" != x; then
15767    if ! test -d $with_override_source_root; then
15768       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15769    fi
15770    CURDIR="$PWD"
15771    cd "$with_override_source_root"
15772    OVERRIDE_SRC_ROOT="`pwd`"
15773    cd "$CURDIR"
15774    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15775       test -f $with_override_source_root/langtools/make/Makefile; then
15776        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
15777    fi
15778    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15779       test -f $with_override_source_root/corba/make/Makefile; then
15780        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
15781    fi
15782    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15783       test -f $with_override_source_root/jaxp/make/Makefile; then
15784        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
15785    fi
15786    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15787       test -f $with_override_source_root/jaxws/make/Makefile; then
15788        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
15789    fi
15790    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15791       test -f $with_override_source_root/hotspot/make/Makefile; then
15792        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
15793    fi
15794    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15795       test -f $with_override_source_root/jdk/make/Makefile; then
15796        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
15797    fi
15798fi
15799
15800
15801###############################################################################
15802#
15803# Override a repo completely, this is used for example when you have 3 small
15804# development sandboxes of the langtools sources and want to avoid having 3 full
15805# OpenJDK sources checked out on disk.
15806#
15807# Assuming that the 3 langtools sandboxes are located here:
15808# /home/fredrik/sandbox1/langtools
15809# /home/fredrik/sandbox2/langtools
15810# /home/fredrik/sandbox3/langtools
15811#
15812# From the source root you create build subdirs manually:
15813#     mkdir -p build1 build2 build3
15814# in each build directory run:
15815#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15816#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15817#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15818#
15819
15820
15821# Check whether --with-override-langtools was given.
15822if test "${with_override_langtools+set}" = set; then :
15823  withval=$with_override_langtools;
15824fi
15825
15826
15827
15828# Check whether --with-override-corba was given.
15829if test "${with_override_corba+set}" = set; then :
15830  withval=$with_override_corba;
15831fi
15832
15833
15834
15835# Check whether --with-override-jaxp was given.
15836if test "${with_override_jaxp+set}" = set; then :
15837  withval=$with_override_jaxp;
15838fi
15839
15840
15841
15842# Check whether --with-override-jaxws was given.
15843if test "${with_override_jaxws+set}" = set; then :
15844  withval=$with_override_jaxws;
15845fi
15846
15847
15848
15849# Check whether --with-override-hotspot was given.
15850if test "${with_override_hotspot+set}" = set; then :
15851  withval=$with_override_hotspot;
15852fi
15853
15854
15855
15856# Check whether --with-override-jdk was given.
15857if test "${with_override_jdk+set}" = set; then :
15858  withval=$with_override_jdk;
15859fi
15860
15861
15862if test "x$with_override_langtools" != x; then
15863    CURDIR="$PWD"
15864    cd "$with_override_langtools"
15865    LANGTOOLS_TOPDIR="`pwd`"
15866    cd "$CURDIR"
15867    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15868        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15869    fi
15870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15871$as_echo_n "checking if langtools should be overridden... " >&6; }
15872    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15873$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15874fi
15875if test "x$with_override_corba" != x; then
15876    CURDIR="$PWD"
15877    cd "$with_override_corba"
15878    CORBA_TOPDIR="`pwd`"
15879    cd "$CURDIR"
15880    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15881        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15882    fi
15883    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15884$as_echo_n "checking if corba should be overridden... " >&6; }
15885    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15886$as_echo "yes with $CORBA_TOPDIR" >&6; }
15887fi
15888if test "x$with_override_jaxp" != x; then
15889    CURDIR="$PWD"
15890    cd "$with_override_jaxp"
15891    JAXP_TOPDIR="`pwd`"
15892    cd "$CURDIR"
15893    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15894        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15895    fi
15896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15897$as_echo_n "checking if jaxp should be overridden... " >&6; }
15898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15899$as_echo "yes with $JAXP_TOPDIR" >&6; }
15900fi
15901if test "x$with_override_jaxws" != x; then
15902    CURDIR="$PWD"
15903    cd "$with_override_jaxws"
15904    JAXWS_TOPDIR="`pwd`"
15905    cd "$CURDIR"
15906    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15907        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15908    fi
15909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15910$as_echo_n "checking if jaxws should be overridden... " >&6; }
15911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15912$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15913fi
15914if test "x$with_override_hotspot" != x; then
15915    CURDIR="$PWD"
15916    cd "$with_override_hotspot"
15917    HOTSPOT_TOPDIR="`pwd`"
15918    cd "$CURDIR"
15919    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15920       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15921        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15922    fi
15923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15924$as_echo_n "checking if hotspot should be overridden... " >&6; }
15925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15926$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15927fi
15928if test "x$with_override_nashorn" != x; then
15929    CURDIR="$PWD"
15930    cd "$with_override_nashorn"
15931    NASHORN_TOPDIR="`pwd`"
15932    cd "$CURDIR"
15933    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
15934        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
15935    fi
15936    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
15937$as_echo_n "checking if nashorn should be overridden... " >&6; }
15938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
15939$as_echo "yes with $NASHORN_TOPDIR" >&6; }
15940fi
15941if test "x$with_override_jdk" != x; then
15942    CURDIR="$PWD"
15943    cd "$with_override_jdk"
15944    JDK_TOPDIR="`pwd`"
15945    cd "$CURDIR"
15946    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15947        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15948    fi
15949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15950$as_echo_n "checking if JDK should be overridden... " >&6; }
15951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15952$as_echo "yes with $JDK_TOPDIR" >&6; }
15953fi
15954
15955
15956
15957BUILD_OUTPUT="$OUTPUT_ROOT"
15958
15959
15960HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15961BUILD_HOTSPOT=true
15962
15963
15964
15965# Check whether --with-import-hotspot was given.
15966if test "${with_import_hotspot+set}" = set; then :
15967  withval=$with_import_hotspot;
15968fi
15969
15970if test "x$with_import_hotspot" != x; then
15971    CURDIR="$PWD"
15972    cd "$with_import_hotspot"
15973    HOTSPOT_DIST="`pwd`"
15974    cd "$CURDIR"
15975    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15976        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15977    fi
15978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15979$as_echo_n "checking if hotspot should be imported... " >&6; }
15980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15981$as_echo "yes from $HOTSPOT_DIST" >&6; }
15982    BUILD_HOTSPOT=false
15983fi
15984
15985JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15986
15987
15988###############################################################################
15989#
15990# Setup the toolchain (compilers etc), i.e. the tools that need to be
15991# cross-compilation aware.
15992#
15993###############################################################################
15994
15995
15996###############################################################################
15997#
15998# Configure the development tool paths and potential sysroot.
15999#
16000ac_ext=cpp
16001ac_cpp='$CXXCPP $CPPFLAGS'
16002ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16003ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16004ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16005
16006
16007# The option used to specify the target .o,.a or .so file.
16008# When compiling, how to specify the to be created object file.
16009CC_OUT_OPTION='-o$(SPACE)'
16010# When linking, how to specify the to be created executable.
16011EXE_OUT_OPTION='-o$(SPACE)'
16012# When linking, how to specify the to be created dynamically linkable library.
16013LD_OUT_OPTION='-o$(SPACE)'
16014# When archiving, how to specify the to be create static archive for object files.
16015AR_OUT_OPTION='rcs$(SPACE)'
16016
16017
16018
16019
16020
16021# Locate the actual tools
16022
16023if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16024
16025  # Store path to cygwin link.exe to help excluding it when searching for
16026  # VS linker. This must be done before changing the PATH when looking for VS.
16027  # Extract the first word of "link", so it can be a program name with args.
16028set dummy link; ac_word=$2
16029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16030$as_echo_n "checking for $ac_word... " >&6; }
16031if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16032  $as_echo_n "(cached) " >&6
16033else
16034  case $CYGWIN_LINK in
16035  [\\/]* | ?:[\\/]*)
16036  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16037  ;;
16038  *)
16039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16040for as_dir in $PATH
16041do
16042  IFS=$as_save_IFS
16043  test -z "$as_dir" && as_dir=.
16044    for ac_exec_ext in '' $ac_executable_extensions; do
16045  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16046    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16048    break 2
16049  fi
16050done
16051  done
16052IFS=$as_save_IFS
16053
16054  ;;
16055esac
16056fi
16057CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16058if test -n "$CYGWIN_LINK"; then
16059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16060$as_echo "$CYGWIN_LINK" >&6; }
16061else
16062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16063$as_echo "no" >&6; }
16064fi
16065
16066
16067  if test "x$CYGWIN_LINK" != x; then
16068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16069$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16070    "$CYGWIN_LINK" --version > /dev/null
16071    if test $? -eq 0 ; then
16072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16073$as_echo "yes" >&6; }
16074    else
16075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16076$as_echo "no" >&6; }
16077      # This might be the VS linker. Don't exclude it later on.
16078      CYGWIN_LINK=""
16079    fi
16080  fi
16081
16082  # First-hand choice is to locate and run the vsvars bat file.
16083
16084  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16085    VCVARSFILE="vc/bin/vcvars32.bat"
16086  else
16087    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16088  fi
16089
16090  VS_ENV_CMD=""
16091  VS_ENV_ARGS=""
16092  if test "x$with_toolsdir" != x; then
16093
16094  if test "x$VS_ENV_CMD" = x; then
16095    VS100BASE="$with_toolsdir/../.."
16096    METHOD="--with-tools-dir"
16097
16098  windows_path="$VS100BASE"
16099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16100    unix_path=`$CYGPATH -u "$windows_path"`
16101    VS100BASE="$unix_path"
16102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16104    VS100BASE="$unix_path"
16105  fi
16106
16107    if test -d "$VS100BASE"; then
16108      if test -f "$VS100BASE/$VCVARSFILE"; then
16109        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16110$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16111        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16112      else
16113        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16114$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16115        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16116$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16117      fi
16118    fi
16119  fi
16120
16121  fi
16122
16123  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16124    # Having specified an argument which is incorrect will produce an instant failure;
16125    # we should not go on looking
16126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16127$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16128    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16129$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16130    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16131  fi
16132
16133  if test "x$ProgramW6432" != x; then
16134
16135  if test "x$VS_ENV_CMD" = x; then
16136    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16137    METHOD="well-known name"
16138
16139  windows_path="$WIN_SDK_BASE"
16140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16141    unix_path=`$CYGPATH -u "$windows_path"`
16142    WIN_SDK_BASE="$unix_path"
16143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16145    WIN_SDK_BASE="$unix_path"
16146  fi
16147
16148    if test -d "$WIN_SDK_BASE"; then
16149      # There have been cases of partial or broken SDK installations. A missing
16150      # lib dir is not going to work.
16151      if test ! -d "$WIN_SDK_BASE/../lib"; then
16152        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16153$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16154        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16155$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16156      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16157        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16158$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16159        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16160        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16161          VS_ENV_ARGS="/x86"
16162        else
16163          VS_ENV_ARGS="/x64"
16164        fi
16165      else
16166        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16167$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16168        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16169$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16170      fi
16171    fi
16172  fi
16173
16174  fi
16175  if test "x$PROGRAMW6432" != x; then
16176
16177  if test "x$VS_ENV_CMD" = x; then
16178    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16179    METHOD="well-known name"
16180
16181  windows_path="$WIN_SDK_BASE"
16182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16183    unix_path=`$CYGPATH -u "$windows_path"`
16184    WIN_SDK_BASE="$unix_path"
16185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16187    WIN_SDK_BASE="$unix_path"
16188  fi
16189
16190    if test -d "$WIN_SDK_BASE"; then
16191      # There have been cases of partial or broken SDK installations. A missing
16192      # lib dir is not going to work.
16193      if test ! -d "$WIN_SDK_BASE/../lib"; then
16194        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16195$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16196        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16197$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16198      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16199        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16200$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16201        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16202        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16203          VS_ENV_ARGS="/x86"
16204        else
16205          VS_ENV_ARGS="/x64"
16206        fi
16207      else
16208        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16209$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16210        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16211$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16212      fi
16213    fi
16214  fi
16215
16216  fi
16217  if test "x$PROGRAMFILES" != x; then
16218
16219  if test "x$VS_ENV_CMD" = x; then
16220    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16221    METHOD="well-known name"
16222
16223  windows_path="$WIN_SDK_BASE"
16224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16225    unix_path=`$CYGPATH -u "$windows_path"`
16226    WIN_SDK_BASE="$unix_path"
16227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16229    WIN_SDK_BASE="$unix_path"
16230  fi
16231
16232    if test -d "$WIN_SDK_BASE"; then
16233      # There have been cases of partial or broken SDK installations. A missing
16234      # lib dir is not going to work.
16235      if test ! -d "$WIN_SDK_BASE/../lib"; then
16236        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16237$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16238        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16239$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16240      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16241        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16242$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16243        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16244        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16245          VS_ENV_ARGS="/x86"
16246        else
16247          VS_ENV_ARGS="/x64"
16248        fi
16249      else
16250        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16251$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16252        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16253$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16254      fi
16255    fi
16256  fi
16257
16258  fi
16259
16260  if test "x$VS_ENV_CMD" = x; then
16261    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16262    METHOD="well-known name"
16263
16264  windows_path="$WIN_SDK_BASE"
16265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16266    unix_path=`$CYGPATH -u "$windows_path"`
16267    WIN_SDK_BASE="$unix_path"
16268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16270    WIN_SDK_BASE="$unix_path"
16271  fi
16272
16273    if test -d "$WIN_SDK_BASE"; then
16274      # There have been cases of partial or broken SDK installations. A missing
16275      # lib dir is not going to work.
16276      if test ! -d "$WIN_SDK_BASE/../lib"; then
16277        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16278$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16279        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16280$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16281      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16282        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16283$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16284        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16285        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16286          VS_ENV_ARGS="/x86"
16287        else
16288          VS_ENV_ARGS="/x64"
16289        fi
16290      else
16291        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16292$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16293        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16294$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16295      fi
16296    fi
16297  fi
16298
16299
16300  if test "x$VS_ENV_CMD" = x; then
16301    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16302    METHOD="well-known name"
16303
16304  windows_path="$WIN_SDK_BASE"
16305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16306    unix_path=`$CYGPATH -u "$windows_path"`
16307    WIN_SDK_BASE="$unix_path"
16308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16310    WIN_SDK_BASE="$unix_path"
16311  fi
16312
16313    if test -d "$WIN_SDK_BASE"; then
16314      # There have been cases of partial or broken SDK installations. A missing
16315      # lib dir is not going to work.
16316      if test ! -d "$WIN_SDK_BASE/../lib"; then
16317        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16318$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16319        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16320$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16321      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16322        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16323$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16324        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16325        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16326          VS_ENV_ARGS="/x86"
16327        else
16328          VS_ENV_ARGS="/x64"
16329        fi
16330      else
16331        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16332$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16333        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16334$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16335      fi
16336    fi
16337  fi
16338
16339
16340  if test "x$VS100COMNTOOLS" != x; then
16341
16342  if test "x$VS_ENV_CMD" = x; then
16343    VS100BASE="$VS100COMNTOOLS/../.."
16344    METHOD="VS100COMNTOOLS variable"
16345
16346  windows_path="$VS100BASE"
16347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16348    unix_path=`$CYGPATH -u "$windows_path"`
16349    VS100BASE="$unix_path"
16350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16352    VS100BASE="$unix_path"
16353  fi
16354
16355    if test -d "$VS100BASE"; then
16356      if test -f "$VS100BASE/$VCVARSFILE"; then
16357        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16358$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16359        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16360      else
16361        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16362$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16363        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16364$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16365      fi
16366    fi
16367  fi
16368
16369  fi
16370  if test "x$PROGRAMFILES" != x; then
16371
16372  if test "x$VS_ENV_CMD" = x; then
16373    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16374    METHOD="well-known name"
16375
16376  windows_path="$VS100BASE"
16377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16378    unix_path=`$CYGPATH -u "$windows_path"`
16379    VS100BASE="$unix_path"
16380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16382    VS100BASE="$unix_path"
16383  fi
16384
16385    if test -d "$VS100BASE"; then
16386      if test -f "$VS100BASE/$VCVARSFILE"; then
16387        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16388$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16389        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16390      else
16391        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16392$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16393        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16394$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16395      fi
16396    fi
16397  fi
16398
16399  fi
16400
16401  if test "x$VS_ENV_CMD" = x; then
16402    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16403    METHOD="well-known name"
16404
16405  windows_path="$VS100BASE"
16406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16407    unix_path=`$CYGPATH -u "$windows_path"`
16408    VS100BASE="$unix_path"
16409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16411    VS100BASE="$unix_path"
16412  fi
16413
16414    if test -d "$VS100BASE"; then
16415      if test -f "$VS100BASE/$VCVARSFILE"; then
16416        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16417$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16418        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16419      else
16420        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16421$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16422        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16423$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16424      fi
16425    fi
16426  fi
16427
16428
16429  if test "x$VS_ENV_CMD" = x; then
16430    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16431    METHOD="well-known name"
16432
16433  windows_path="$VS100BASE"
16434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16435    unix_path=`$CYGPATH -u "$windows_path"`
16436    VS100BASE="$unix_path"
16437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16439    VS100BASE="$unix_path"
16440  fi
16441
16442    if test -d "$VS100BASE"; then
16443      if test -f "$VS100BASE/$VCVARSFILE"; then
16444        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16445$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16446        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16447      else
16448        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16449$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16450        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16451$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16452      fi
16453    fi
16454  fi
16455
16456
16457  if test "x$VS_ENV_CMD" != x; then
16458    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16459
16460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16461
16462  # First separate the path from the arguments. This will split at the first
16463  # space.
16464  complete="$VS_ENV_CMD"
16465  path="${complete%% *}"
16466  tmp="$complete EOL"
16467  arguments="${tmp#* }"
16468
16469  # Input might be given as Windows format, start by converting to
16470  # unix format.
16471  new_path=`$CYGPATH -u "$path"`
16472
16473  # Now try to locate executable using which
16474  new_path=`$WHICH "$new_path" 2> /dev/null`
16475  # bat and cmd files are not always considered executable in cygwin causing which
16476  # to not find them
16477  if test "x$new_path" = x \
16478           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16479           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16480    new_path=`$CYGPATH -u "$path"`
16481  fi
16482  if test "x$new_path" = x; then
16483    # Oops. Which didn't find the executable.
16484    # The splitting of arguments from the executable at a space might have been incorrect,
16485    # since paths with space are more likely in Windows. Give it another try with the whole
16486    # argument.
16487    path="$complete"
16488    arguments="EOL"
16489    new_path=`$CYGPATH -u "$path"`
16490    new_path=`$WHICH "$new_path" 2> /dev/null`
16491    # bat and cmd files are not always considered executable in cygwin causing which
16492    # to not find them
16493    if test "x$new_path" = x \
16494             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16495             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16496      new_path=`$CYGPATH -u "$path"`
16497    fi
16498    if test "x$new_path" = x; then
16499      # It's still not found. Now this is an unrecoverable error.
16500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16501$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16502      has_space=`$ECHO "$complete" | $GREP " "`
16503      if test "x$has_space" != x; then
16504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16506      fi
16507      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16508    fi
16509  fi
16510
16511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16514  # "foo.exe" is OK but "foo" is an error.
16515  #
16516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16517  # It is also a way to make sure we got the proper file name for the real test later on.
16518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16519  if test "x$test_shortpath" = x; then
16520    # Short path failed, file does not exist as specified.
16521    # Try adding .exe or .cmd
16522    if test -f "${new_path}.exe"; then
16523       input_to_shortpath="${new_path}.exe"
16524    elif test -f "${new_path}.cmd"; then
16525       input_to_shortpath="${new_path}.cmd"
16526    else
16527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16528$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16529      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16530$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16531      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16532    fi
16533  else
16534    input_to_shortpath="$new_path"
16535  fi
16536
16537  # Call helper function which possibly converts this using DOS-style short mode.
16538  # If so, the updated path is stored in $new_path.
16539  new_path="$input_to_shortpath"
16540
16541  input_path="$input_to_shortpath"
16542  # Check if we need to convert this using DOS-style short mode. If the path
16543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16544  # take no chances and rewrite it.
16545  # Note: m4 eats our [], so we need to use [ and ] instead.
16546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16547  if test "x$has_forbidden_chars" != x; then
16548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16552      # Going to short mode and back again did indeed matter. Since short mode is
16553      # case insensitive, let's make it lowercase to improve readability.
16554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16555      # Now convert it back to Unix-stile (cygpath)
16556      input_path=`$CYGPATH -u "$shortmode_path"`
16557      new_path="$input_path"
16558    fi
16559  fi
16560
16561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16562  if test "x$test_cygdrive_prefix" = x; then
16563    # As a simple fix, exclude /usr/bin since it's not a real path.
16564    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16566      # a path prefixed by /cygdrive for fixpath to work.
16567      new_path="$CYGWIN_ROOT_PATH$input_path"
16568    fi
16569  fi
16570
16571  # remove trailing .exe if any
16572  new_path="${new_path/%.exe/}"
16573
16574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16575
16576  # First separate the path from the arguments. This will split at the first
16577  # space.
16578  complete="$VS_ENV_CMD"
16579  path="${complete%% *}"
16580  tmp="$complete EOL"
16581  arguments="${tmp#* }"
16582
16583  # Input might be given as Windows format, start by converting to
16584  # unix format.
16585  new_path="$path"
16586
16587  windows_path="$new_path"
16588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16589    unix_path=`$CYGPATH -u "$windows_path"`
16590    new_path="$unix_path"
16591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16593    new_path="$unix_path"
16594  fi
16595
16596
16597  # Now try to locate executable using which
16598  new_path=`$WHICH "$new_path" 2> /dev/null`
16599
16600  if test "x$new_path" = x; then
16601    # Oops. Which didn't find the executable.
16602    # The splitting of arguments from the executable at a space might have been incorrect,
16603    # since paths with space are more likely in Windows. Give it another try with the whole
16604    # argument.
16605    path="$complete"
16606    arguments="EOL"
16607    new_path="$path"
16608
16609  windows_path="$new_path"
16610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16611    unix_path=`$CYGPATH -u "$windows_path"`
16612    new_path="$unix_path"
16613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16615    new_path="$unix_path"
16616  fi
16617
16618
16619    new_path=`$WHICH "$new_path" 2> /dev/null`
16620
16621    if test "x$new_path" = x; then
16622      # It's still not found. Now this is an unrecoverable error.
16623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16624$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16625      has_space=`$ECHO "$complete" | $GREP " "`
16626      if test "x$has_space" != x; then
16627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16629      fi
16630      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16631    fi
16632  fi
16633
16634  # Now new_path has a complete unix path to the binary
16635  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16636    # Keep paths in /bin as-is, but remove trailing .exe if any
16637    new_path="${new_path/%.exe/}"
16638    # Do not save /bin paths to all_fixpath_prefixes!
16639  else
16640    # Not in mixed or Windows style, start by that.
16641    new_path=`cmd //c echo $new_path`
16642
16643  input_path="$new_path"
16644  # Check if we need to convert this using DOS-style short mode. If the path
16645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16646  # take no chances and rewrite it.
16647  # Note: m4 eats our [], so we need to use [ and ] instead.
16648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16649  if test "x$has_forbidden_chars" != x; then
16650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16652  fi
16653
16654    # Output is in $new_path
16655
16656  windows_path="$new_path"
16657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16658    unix_path=`$CYGPATH -u "$windows_path"`
16659    new_path="$unix_path"
16660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16662    new_path="$unix_path"
16663  fi
16664
16665    # remove trailing .exe if any
16666    new_path="${new_path/%.exe/}"
16667
16668    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16669    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16670  fi
16671
16672  else
16673    # We're on a posix platform. Hooray! :)
16674    # First separate the path from the arguments. This will split at the first
16675    # space.
16676    complete="$VS_ENV_CMD"
16677    path="${complete%% *}"
16678    tmp="$complete EOL"
16679    arguments="${tmp#* }"
16680
16681    # Cannot rely on the command "which" here since it doesn't always work.
16682    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16683    if test -z "$is_absolute_path"; then
16684      # Path to executable is not absolute. Find it.
16685      IFS_save="$IFS"
16686      IFS=:
16687      for p in $PATH; do
16688        if test -f "$p/$path" && test -x "$p/$path"; then
16689          new_path="$p/$path"
16690          break
16691        fi
16692      done
16693      IFS="$IFS_save"
16694    else
16695      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16696$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16697      new_path="$path"
16698    fi
16699
16700    if test "x$new_path" = x; then
16701        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16702$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16703        has_space=`$ECHO "$complete" | $GREP " "`
16704        if test "x$has_space" != x; then
16705          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16706$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16707        fi
16708        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16709      fi
16710  fi
16711
16712      # Now join together the path and the arguments once again
16713      if test "x$arguments" != xEOL; then
16714        new_complete="$new_path ${arguments% *}"
16715      else
16716        new_complete="$new_path"
16717      fi
16718
16719  if test "x$complete" != "x$new_complete"; then
16720      VS_ENV_CMD="$new_complete"
16721      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16722$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16723    fi
16724
16725
16726    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16727    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16728$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16729    cd $OUTPUT_ROOT
16730    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16731    # to autoconf standards.
16732
16733    #----
16734
16735    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16736    # but calculate the difference in Cygwin environment before/after running it and then
16737    # apply the diff.
16738
16739    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16740      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16741      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16742      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16743    else
16744      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16745      _dosbash=`cmd //c echo \`which bash\``
16746    fi
16747
16748    # generate the set of exported vars before/after the vs10 setup
16749    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16750    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16751    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16752    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16753
16754    # Now execute the newly created bat file.
16755    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16756    cmd /c localdevenvtmp.bat | cat
16757
16758    # apply the diff (less some non-vs10 vars named by "!")
16759    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16760    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16761    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16762
16763    # cleanup
16764    $RM localdevenvtmp*
16765    #----
16766    cd $CURDIR
16767    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16769$as_echo "no" >&6; }
16770      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16771$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16772      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16773$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16774      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16775$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16776      as_fn_error $? "Cannot continue" "$LINENO" 5
16777    fi
16778
16779    # Now set all paths and other env variables. This will allow the rest of
16780    # the configure script to find and run the compiler in the proper way.
16781    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16782$as_echo "$as_me: Setting extracted environment variables" >&6;}
16783    . $OUTPUT_ROOT/localdevenv.sh
16784  else
16785    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16786    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16787$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16788  fi
16789
16790  # At this point, we should have corrent variables in the environment, or we can't continue.
16791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16792$as_echo_n "checking for Visual Studio variables... " >&6; }
16793
16794  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16795    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16797$as_echo "present but broken" >&6; }
16798      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16799    else
16800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16801$as_echo "ok" >&6; }
16802      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16803      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16804      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16805      VS_PATH="$PATH"
16806
16807
16808
16809    fi
16810  else
16811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16812$as_echo "not found" >&6; }
16813
16814    if test "x$VS_ENV_CMD" = x; then
16815      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16816$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16817      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16818$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16819    else
16820      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16821$as_echo "$as_me: Running the extraction script failed." >&6;}
16822    fi
16823    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16824$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16825    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16826$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16827    as_fn_error $? "Cannot continue" "$LINENO" 5
16828  fi
16829
16830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16831$as_echo_n "checking for msvcr100.dll... " >&6; }
16832
16833# Check whether --with-msvcr-dll was given.
16834if test "${with_msvcr_dll+set}" = set; then :
16835  withval=$with_msvcr_dll;
16836fi
16837
16838  if test "x$with_msvcr_dll" != x; then
16839    MSVCR_DLL="$with_msvcr_dll"
16840  else
16841    if test "x$VCINSTALLDIR" != x; then
16842      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16843        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16844      else
16845        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16846        if test "x$MSVCR_DLL" = x; then
16847          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16848        fi
16849      fi
16850      if test "x$MSVCR_DLL" != x; then
16851        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16852$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16853      else
16854        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16855$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16856      fi
16857    fi
16858    if test "x$MSVCR_DLL" = x; then
16859      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16860        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16861$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16862        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16863      fi
16864    fi
16865  fi
16866  if test "x$MSVCR_DLL" = x; then
16867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16868$as_echo "no" >&6; }
16869    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16870  fi
16871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16872$as_echo "$MSVCR_DLL" >&6; }
16873
16874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16875
16876  # Input might be given as Windows format, start by converting to
16877  # unix format.
16878  path="$MSVCR_DLL"
16879  new_path=`$CYGPATH -u "$path"`
16880
16881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16884  # "foo.exe" is OK but "foo" is an error.
16885  #
16886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16887  # It is also a way to make sure we got the proper file name for the real test later on.
16888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16889  if test "x$test_shortpath" = x; then
16890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16891$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16892    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16893  fi
16894
16895  # Call helper function which possibly converts this using DOS-style short mode.
16896  # If so, the updated path is stored in $new_path.
16897
16898  input_path="$new_path"
16899  # Check if we need to convert this using DOS-style short mode. If the path
16900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16901  # take no chances and rewrite it.
16902  # Note: m4 eats our [], so we need to use [ and ] instead.
16903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16904  if test "x$has_forbidden_chars" != x; then
16905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16909      # Going to short mode and back again did indeed matter. Since short mode is
16910      # case insensitive, let's make it lowercase to improve readability.
16911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16912      # Now convert it back to Unix-stile (cygpath)
16913      input_path=`$CYGPATH -u "$shortmode_path"`
16914      new_path="$input_path"
16915    fi
16916  fi
16917
16918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16919  if test "x$test_cygdrive_prefix" = x; then
16920    # As a simple fix, exclude /usr/bin since it's not a real path.
16921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16923      # a path prefixed by /cygdrive for fixpath to work.
16924      new_path="$CYGWIN_ROOT_PATH$input_path"
16925    fi
16926  fi
16927
16928
16929  if test "x$path" != "x$new_path"; then
16930    MSVCR_DLL="$new_path"
16931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16932$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16933  fi
16934
16935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16936
16937  path="$MSVCR_DLL"
16938  has_colon=`$ECHO $path | $GREP ^.:`
16939  new_path="$path"
16940  if test "x$has_colon" = x; then
16941    # Not in mixed or Windows style, start by that.
16942    new_path=`cmd //c echo $path`
16943  fi
16944
16945
16946  input_path="$new_path"
16947  # Check if we need to convert this using DOS-style short mode. If the path
16948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16949  # take no chances and rewrite it.
16950  # Note: m4 eats our [], so we need to use [ and ] instead.
16951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16952  if test "x$has_forbidden_chars" != x; then
16953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16955  fi
16956
16957
16958  windows_path="$new_path"
16959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16960    unix_path=`$CYGPATH -u "$windows_path"`
16961    new_path="$unix_path"
16962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16964    new_path="$unix_path"
16965  fi
16966
16967  if test "x$path" != "x$new_path"; then
16968    MSVCR_DLL="$new_path"
16969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16970$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16971  fi
16972
16973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16975
16976  else
16977    # We're on a posix platform. Hooray! :)
16978    path="$MSVCR_DLL"
16979
16980    if test ! -f "$path" && test ! -d "$path"; then
16981      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16982    fi
16983
16984    has_space=`$ECHO "$path" | $GREP " "`
16985    if test "x$has_space" != x; then
16986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16987$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16988      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16989    fi
16990  fi
16991
16992
16993
16994
16995# Check whether --with-dxsdk was given.
16996if test "${with_dxsdk+set}" = set; then :
16997  withval=$with_dxsdk;
16998fi
16999
17000
17001# Check whether --with-dxsdk-lib was given.
17002if test "${with_dxsdk_lib+set}" = set; then :
17003  withval=$with_dxsdk_lib;
17004fi
17005
17006
17007# Check whether --with-dxsdk-include was given.
17008if test "${with_dxsdk_include+set}" = set; then :
17009  withval=$with_dxsdk_include;
17010fi
17011
17012
17013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17014$as_echo_n "checking for DirectX SDK... " >&6; }
17015
17016  if test "x$with_dxsdk" != x; then
17017    dxsdk_path="$with_dxsdk"
17018  elif test "x$DXSDK_DIR" != x; then
17019    dxsdk_path="$DXSDK_DIR"
17020  elif test -d "C:/DXSDK"; then
17021    dxsdk_path="C:/DXSDK"
17022  else
17023    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17024  fi
17025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17026$as_echo "$dxsdk_path" >&6; }
17027
17028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17029
17030  # Input might be given as Windows format, start by converting to
17031  # unix format.
17032  path="$dxsdk_path"
17033  new_path=`$CYGPATH -u "$path"`
17034
17035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17038  # "foo.exe" is OK but "foo" is an error.
17039  #
17040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17041  # It is also a way to make sure we got the proper file name for the real test later on.
17042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17043  if test "x$test_shortpath" = x; then
17044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17045$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17046    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17047  fi
17048
17049  # Call helper function which possibly converts this using DOS-style short mode.
17050  # If so, the updated path is stored in $new_path.
17051
17052  input_path="$new_path"
17053  # Check if we need to convert this using DOS-style short mode. If the path
17054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17055  # take no chances and rewrite it.
17056  # Note: m4 eats our [], so we need to use [ and ] instead.
17057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17058  if test "x$has_forbidden_chars" != x; then
17059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17063      # Going to short mode and back again did indeed matter. Since short mode is
17064      # case insensitive, let's make it lowercase to improve readability.
17065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17066      # Now convert it back to Unix-stile (cygpath)
17067      input_path=`$CYGPATH -u "$shortmode_path"`
17068      new_path="$input_path"
17069    fi
17070  fi
17071
17072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17073  if test "x$test_cygdrive_prefix" = x; then
17074    # As a simple fix, exclude /usr/bin since it's not a real path.
17075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17077      # a path prefixed by /cygdrive for fixpath to work.
17078      new_path="$CYGWIN_ROOT_PATH$input_path"
17079    fi
17080  fi
17081
17082
17083  if test "x$path" != "x$new_path"; then
17084    dxsdk_path="$new_path"
17085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17086$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17087  fi
17088
17089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17090
17091  path="$dxsdk_path"
17092  has_colon=`$ECHO $path | $GREP ^.:`
17093  new_path="$path"
17094  if test "x$has_colon" = x; then
17095    # Not in mixed or Windows style, start by that.
17096    new_path=`cmd //c echo $path`
17097  fi
17098
17099
17100  input_path="$new_path"
17101  # Check if we need to convert this using DOS-style short mode. If the path
17102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17103  # take no chances and rewrite it.
17104  # Note: m4 eats our [], so we need to use [ and ] instead.
17105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17106  if test "x$has_forbidden_chars" != x; then
17107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17109  fi
17110
17111
17112  windows_path="$new_path"
17113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17114    unix_path=`$CYGPATH -u "$windows_path"`
17115    new_path="$unix_path"
17116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17118    new_path="$unix_path"
17119  fi
17120
17121  if test "x$path" != "x$new_path"; then
17122    dxsdk_path="$new_path"
17123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17124$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17125  fi
17126
17127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17129
17130  else
17131    # We're on a posix platform. Hooray! :)
17132    path="$dxsdk_path"
17133
17134    if test ! -f "$path" && test ! -d "$path"; then
17135      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17136    fi
17137
17138    has_space=`$ECHO "$path" | $GREP " "`
17139    if test "x$has_space" != x; then
17140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17141$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17142      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17143    fi
17144  fi
17145
17146
17147  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17148$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17149  if test "x$with_dxsdk_lib" != x; then
17150    DXSDK_LIB_PATH="$with_dxsdk_lib"
17151  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17152    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17153  else
17154    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17155  fi
17156  # dsound.lib is linked to in jsoundds
17157  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17158    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17159  fi
17160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17161$as_echo "$DXSDK_LIB_PATH" >&6; }
17162
17163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17164
17165  # Input might be given as Windows format, start by converting to
17166  # unix format.
17167  path="$DXSDK_LIB_PATH"
17168  new_path=`$CYGPATH -u "$path"`
17169
17170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17173  # "foo.exe" is OK but "foo" is an error.
17174  #
17175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17176  # It is also a way to make sure we got the proper file name for the real test later on.
17177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17178  if test "x$test_shortpath" = x; then
17179    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17180$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17181    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17182  fi
17183
17184  # Call helper function which possibly converts this using DOS-style short mode.
17185  # If so, the updated path is stored in $new_path.
17186
17187  input_path="$new_path"
17188  # Check if we need to convert this using DOS-style short mode. If the path
17189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17190  # take no chances and rewrite it.
17191  # Note: m4 eats our [], so we need to use [ and ] instead.
17192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17193  if test "x$has_forbidden_chars" != x; then
17194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17198      # Going to short mode and back again did indeed matter. Since short mode is
17199      # case insensitive, let's make it lowercase to improve readability.
17200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17201      # Now convert it back to Unix-stile (cygpath)
17202      input_path=`$CYGPATH -u "$shortmode_path"`
17203      new_path="$input_path"
17204    fi
17205  fi
17206
17207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17208  if test "x$test_cygdrive_prefix" = x; then
17209    # As a simple fix, exclude /usr/bin since it's not a real path.
17210    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17212      # a path prefixed by /cygdrive for fixpath to work.
17213      new_path="$CYGWIN_ROOT_PATH$input_path"
17214    fi
17215  fi
17216
17217
17218  if test "x$path" != "x$new_path"; then
17219    DXSDK_LIB_PATH="$new_path"
17220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17221$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17222  fi
17223
17224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17225
17226  path="$DXSDK_LIB_PATH"
17227  has_colon=`$ECHO $path | $GREP ^.:`
17228  new_path="$path"
17229  if test "x$has_colon" = x; then
17230    # Not in mixed or Windows style, start by that.
17231    new_path=`cmd //c echo $path`
17232  fi
17233
17234
17235  input_path="$new_path"
17236  # Check if we need to convert this using DOS-style short mode. If the path
17237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17238  # take no chances and rewrite it.
17239  # Note: m4 eats our [], so we need to use [ and ] instead.
17240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17241  if test "x$has_forbidden_chars" != x; then
17242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17244  fi
17245
17246
17247  windows_path="$new_path"
17248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17249    unix_path=`$CYGPATH -u "$windows_path"`
17250    new_path="$unix_path"
17251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17253    new_path="$unix_path"
17254  fi
17255
17256  if test "x$path" != "x$new_path"; then
17257    DXSDK_LIB_PATH="$new_path"
17258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17259$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17260  fi
17261
17262  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17263  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17264
17265  else
17266    # We're on a posix platform. Hooray! :)
17267    path="$DXSDK_LIB_PATH"
17268
17269    if test ! -f "$path" && test ! -d "$path"; then
17270      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17271    fi
17272
17273    has_space=`$ECHO "$path" | $GREP " "`
17274    if test "x$has_space" != x; then
17275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17276$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17277      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17278    fi
17279  fi
17280
17281
17282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17283$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17284  if test "x$with_dxsdk_include" != x; then
17285    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17286  else
17287    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17288  fi
17289  # dsound.h is included in jsoundds
17290  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17291    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17292  fi
17293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17294$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17295
17296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17297
17298  # Input might be given as Windows format, start by converting to
17299  # unix format.
17300  path="$DXSDK_INCLUDE_PATH"
17301  new_path=`$CYGPATH -u "$path"`
17302
17303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17306  # "foo.exe" is OK but "foo" is an error.
17307  #
17308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17309  # It is also a way to make sure we got the proper file name for the real test later on.
17310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17311  if test "x$test_shortpath" = x; then
17312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17313$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17314    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17315  fi
17316
17317  # Call helper function which possibly converts this using DOS-style short mode.
17318  # If so, the updated path is stored in $new_path.
17319
17320  input_path="$new_path"
17321  # Check if we need to convert this using DOS-style short mode. If the path
17322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17323  # take no chances and rewrite it.
17324  # Note: m4 eats our [], so we need to use [ and ] instead.
17325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17326  if test "x$has_forbidden_chars" != x; then
17327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17331      # Going to short mode and back again did indeed matter. Since short mode is
17332      # case insensitive, let's make it lowercase to improve readability.
17333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17334      # Now convert it back to Unix-stile (cygpath)
17335      input_path=`$CYGPATH -u "$shortmode_path"`
17336      new_path="$input_path"
17337    fi
17338  fi
17339
17340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17341  if test "x$test_cygdrive_prefix" = x; then
17342    # As a simple fix, exclude /usr/bin since it's not a real path.
17343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17345      # a path prefixed by /cygdrive for fixpath to work.
17346      new_path="$CYGWIN_ROOT_PATH$input_path"
17347    fi
17348  fi
17349
17350
17351  if test "x$path" != "x$new_path"; then
17352    DXSDK_INCLUDE_PATH="$new_path"
17353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17354$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17355  fi
17356
17357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17358
17359  path="$DXSDK_INCLUDE_PATH"
17360  has_colon=`$ECHO $path | $GREP ^.:`
17361  new_path="$path"
17362  if test "x$has_colon" = x; then
17363    # Not in mixed or Windows style, start by that.
17364    new_path=`cmd //c echo $path`
17365  fi
17366
17367
17368  input_path="$new_path"
17369  # Check if we need to convert this using DOS-style short mode. If the path
17370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17371  # take no chances and rewrite it.
17372  # Note: m4 eats our [], so we need to use [ and ] instead.
17373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17374  if test "x$has_forbidden_chars" != x; then
17375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17377  fi
17378
17379
17380  windows_path="$new_path"
17381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17382    unix_path=`$CYGPATH -u "$windows_path"`
17383    new_path="$unix_path"
17384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17386    new_path="$unix_path"
17387  fi
17388
17389  if test "x$path" != "x$new_path"; then
17390    DXSDK_INCLUDE_PATH="$new_path"
17391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17392$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17393  fi
17394
17395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17397
17398  else
17399    # We're on a posix platform. Hooray! :)
17400    path="$DXSDK_INCLUDE_PATH"
17401
17402    if test ! -f "$path" && test ! -d "$path"; then
17403      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17404    fi
17405
17406    has_space=`$ECHO "$path" | $GREP " "`
17407    if test "x$has_space" != x; then
17408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17409$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17410      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17411    fi
17412  fi
17413
17414
17415
17416
17417  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17418
17419fi
17420
17421
17422
17423# If --build AND --host is set, then the configure script will find any
17424# cross compilation tools in the PATH. Cross compilation tools
17425# follows the cross compilation standard where they are prefixed with ${host}.
17426# For example the binary i686-sun-solaris2.10-gcc
17427# will cross compile for i686-sun-solaris2.10
17428# If neither of build and host is not set, then build=host and the
17429# default compiler found in the path will be used.
17430# Setting only --host, does not seem to be really supported.
17431# Please set both --build and --host if you want to cross compile.
17432
17433if test "x$COMPILE_TYPE" = "xcross"; then
17434    # Now we to find a C/C++ compiler that can build executables for the build
17435    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17436    # once. Also, we need to do this before adding a tools dir to the path,
17437    # otherwise we might pick up cross-compilers which don't use standard naming.
17438    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17439    # to wait until they are properly discovered.
17440    for ac_prog in cl cc gcc
17441do
17442  # Extract the first word of "$ac_prog", so it can be a program name with args.
17443set dummy $ac_prog; ac_word=$2
17444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17445$as_echo_n "checking for $ac_word... " >&6; }
17446if ${ac_cv_path_BUILD_CC+:} false; then :
17447  $as_echo_n "(cached) " >&6
17448else
17449  case $BUILD_CC in
17450  [\\/]* | ?:[\\/]*)
17451  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17452  ;;
17453  *)
17454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17455for as_dir in $PATH
17456do
17457  IFS=$as_save_IFS
17458  test -z "$as_dir" && as_dir=.
17459    for ac_exec_ext in '' $ac_executable_extensions; do
17460  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17461    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17463    break 2
17464  fi
17465done
17466  done
17467IFS=$as_save_IFS
17468
17469  ;;
17470esac
17471fi
17472BUILD_CC=$ac_cv_path_BUILD_CC
17473if test -n "$BUILD_CC"; then
17474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17475$as_echo "$BUILD_CC" >&6; }
17476else
17477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17478$as_echo "no" >&6; }
17479fi
17480
17481
17482  test -n "$BUILD_CC" && break
17483done
17484
17485
17486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17487
17488  # First separate the path from the arguments. This will split at the first
17489  # space.
17490  complete="$BUILD_CC"
17491  path="${complete%% *}"
17492  tmp="$complete EOL"
17493  arguments="${tmp#* }"
17494
17495  # Input might be given as Windows format, start by converting to
17496  # unix format.
17497  new_path=`$CYGPATH -u "$path"`
17498
17499  # Now try to locate executable using which
17500  new_path=`$WHICH "$new_path" 2> /dev/null`
17501  # bat and cmd files are not always considered executable in cygwin causing which
17502  # to not find them
17503  if test "x$new_path" = x \
17504           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17505           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17506    new_path=`$CYGPATH -u "$path"`
17507  fi
17508  if test "x$new_path" = x; then
17509    # Oops. Which didn't find the executable.
17510    # The splitting of arguments from the executable at a space might have been incorrect,
17511    # since paths with space are more likely in Windows. Give it another try with the whole
17512    # argument.
17513    path="$complete"
17514    arguments="EOL"
17515    new_path=`$CYGPATH -u "$path"`
17516    new_path=`$WHICH "$new_path" 2> /dev/null`
17517    # bat and cmd files are not always considered executable in cygwin causing which
17518    # to not find them
17519    if test "x$new_path" = x \
17520             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17521             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17522      new_path=`$CYGPATH -u "$path"`
17523    fi
17524    if test "x$new_path" = x; then
17525      # It's still not found. Now this is an unrecoverable error.
17526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17527$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17528      has_space=`$ECHO "$complete" | $GREP " "`
17529      if test "x$has_space" != x; then
17530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17532      fi
17533      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17534    fi
17535  fi
17536
17537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17540  # "foo.exe" is OK but "foo" is an error.
17541  #
17542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17543  # It is also a way to make sure we got the proper file name for the real test later on.
17544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17545  if test "x$test_shortpath" = x; then
17546    # Short path failed, file does not exist as specified.
17547    # Try adding .exe or .cmd
17548    if test -f "${new_path}.exe"; then
17549       input_to_shortpath="${new_path}.exe"
17550    elif test -f "${new_path}.cmd"; then
17551       input_to_shortpath="${new_path}.cmd"
17552    else
17553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17554$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17555      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17556$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17557      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17558    fi
17559  else
17560    input_to_shortpath="$new_path"
17561  fi
17562
17563  # Call helper function which possibly converts this using DOS-style short mode.
17564  # If so, the updated path is stored in $new_path.
17565  new_path="$input_to_shortpath"
17566
17567  input_path="$input_to_shortpath"
17568  # Check if we need to convert this using DOS-style short mode. If the path
17569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17570  # take no chances and rewrite it.
17571  # Note: m4 eats our [], so we need to use [ and ] instead.
17572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17573  if test "x$has_forbidden_chars" != x; then
17574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17578      # Going to short mode and back again did indeed matter. Since short mode is
17579      # case insensitive, let's make it lowercase to improve readability.
17580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17581      # Now convert it back to Unix-stile (cygpath)
17582      input_path=`$CYGPATH -u "$shortmode_path"`
17583      new_path="$input_path"
17584    fi
17585  fi
17586
17587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17588  if test "x$test_cygdrive_prefix" = x; then
17589    # As a simple fix, exclude /usr/bin since it's not a real path.
17590    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17592      # a path prefixed by /cygdrive for fixpath to work.
17593      new_path="$CYGWIN_ROOT_PATH$input_path"
17594    fi
17595  fi
17596
17597  # remove trailing .exe if any
17598  new_path="${new_path/%.exe/}"
17599
17600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17601
17602  # First separate the path from the arguments. This will split at the first
17603  # space.
17604  complete="$BUILD_CC"
17605  path="${complete%% *}"
17606  tmp="$complete EOL"
17607  arguments="${tmp#* }"
17608
17609  # Input might be given as Windows format, start by converting to
17610  # unix format.
17611  new_path="$path"
17612
17613  windows_path="$new_path"
17614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17615    unix_path=`$CYGPATH -u "$windows_path"`
17616    new_path="$unix_path"
17617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17619    new_path="$unix_path"
17620  fi
17621
17622
17623  # Now try to locate executable using which
17624  new_path=`$WHICH "$new_path" 2> /dev/null`
17625
17626  if test "x$new_path" = x; then
17627    # Oops. Which didn't find the executable.
17628    # The splitting of arguments from the executable at a space might have been incorrect,
17629    # since paths with space are more likely in Windows. Give it another try with the whole
17630    # argument.
17631    path="$complete"
17632    arguments="EOL"
17633    new_path="$path"
17634
17635  windows_path="$new_path"
17636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17637    unix_path=`$CYGPATH -u "$windows_path"`
17638    new_path="$unix_path"
17639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17641    new_path="$unix_path"
17642  fi
17643
17644
17645    new_path=`$WHICH "$new_path" 2> /dev/null`
17646
17647    if test "x$new_path" = x; then
17648      # It's still not found. Now this is an unrecoverable error.
17649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17650$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17651      has_space=`$ECHO "$complete" | $GREP " "`
17652      if test "x$has_space" != x; then
17653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17655      fi
17656      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17657    fi
17658  fi
17659
17660  # Now new_path has a complete unix path to the binary
17661  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17662    # Keep paths in /bin as-is, but remove trailing .exe if any
17663    new_path="${new_path/%.exe/}"
17664    # Do not save /bin paths to all_fixpath_prefixes!
17665  else
17666    # Not in mixed or Windows style, start by that.
17667    new_path=`cmd //c echo $new_path`
17668
17669  input_path="$new_path"
17670  # Check if we need to convert this using DOS-style short mode. If the path
17671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17672  # take no chances and rewrite it.
17673  # Note: m4 eats our [], so we need to use [ and ] instead.
17674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17675  if test "x$has_forbidden_chars" != x; then
17676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17678  fi
17679
17680    # Output is in $new_path
17681
17682  windows_path="$new_path"
17683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17684    unix_path=`$CYGPATH -u "$windows_path"`
17685    new_path="$unix_path"
17686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17688    new_path="$unix_path"
17689  fi
17690
17691    # remove trailing .exe if any
17692    new_path="${new_path/%.exe/}"
17693
17694    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17695    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17696  fi
17697
17698  else
17699    # We're on a posix platform. Hooray! :)
17700    # First separate the path from the arguments. This will split at the first
17701    # space.
17702    complete="$BUILD_CC"
17703    path="${complete%% *}"
17704    tmp="$complete EOL"
17705    arguments="${tmp#* }"
17706
17707    # Cannot rely on the command "which" here since it doesn't always work.
17708    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17709    if test -z "$is_absolute_path"; then
17710      # Path to executable is not absolute. Find it.
17711      IFS_save="$IFS"
17712      IFS=:
17713      for p in $PATH; do
17714        if test -f "$p/$path" && test -x "$p/$path"; then
17715          new_path="$p/$path"
17716          break
17717        fi
17718      done
17719      IFS="$IFS_save"
17720    else
17721      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17722$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17723      new_path="$path"
17724    fi
17725
17726    if test "x$new_path" = x; then
17727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17728$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17729        has_space=`$ECHO "$complete" | $GREP " "`
17730        if test "x$has_space" != x; then
17731          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17732$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17733        fi
17734        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17735      fi
17736  fi
17737
17738      # Now join together the path and the arguments once again
17739      if test "x$arguments" != xEOL; then
17740        new_complete="$new_path ${arguments% *}"
17741      else
17742        new_complete="$new_path"
17743      fi
17744
17745  if test "x$complete" != "x$new_complete"; then
17746      BUILD_CC="$new_complete"
17747      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17748$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17749    fi
17750
17751    for ac_prog in cl CC g++
17752do
17753  # Extract the first word of "$ac_prog", so it can be a program name with args.
17754set dummy $ac_prog; ac_word=$2
17755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17756$as_echo_n "checking for $ac_word... " >&6; }
17757if ${ac_cv_path_BUILD_CXX+:} false; then :
17758  $as_echo_n "(cached) " >&6
17759else
17760  case $BUILD_CXX in
17761  [\\/]* | ?:[\\/]*)
17762  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17763  ;;
17764  *)
17765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17766for as_dir in $PATH
17767do
17768  IFS=$as_save_IFS
17769  test -z "$as_dir" && as_dir=.
17770    for ac_exec_ext in '' $ac_executable_extensions; do
17771  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17772    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17774    break 2
17775  fi
17776done
17777  done
17778IFS=$as_save_IFS
17779
17780  ;;
17781esac
17782fi
17783BUILD_CXX=$ac_cv_path_BUILD_CXX
17784if test -n "$BUILD_CXX"; then
17785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17786$as_echo "$BUILD_CXX" >&6; }
17787else
17788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17789$as_echo "no" >&6; }
17790fi
17791
17792
17793  test -n "$BUILD_CXX" && break
17794done
17795
17796
17797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17798
17799  # First separate the path from the arguments. This will split at the first
17800  # space.
17801  complete="$BUILD_CXX"
17802  path="${complete%% *}"
17803  tmp="$complete EOL"
17804  arguments="${tmp#* }"
17805
17806  # Input might be given as Windows format, start by converting to
17807  # unix format.
17808  new_path=`$CYGPATH -u "$path"`
17809
17810  # Now try to locate executable using which
17811  new_path=`$WHICH "$new_path" 2> /dev/null`
17812  # bat and cmd files are not always considered executable in cygwin causing which
17813  # to not find them
17814  if test "x$new_path" = x \
17815           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17816           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17817    new_path=`$CYGPATH -u "$path"`
17818  fi
17819  if test "x$new_path" = x; then
17820    # Oops. Which didn't find the executable.
17821    # The splitting of arguments from the executable at a space might have been incorrect,
17822    # since paths with space are more likely in Windows. Give it another try with the whole
17823    # argument.
17824    path="$complete"
17825    arguments="EOL"
17826    new_path=`$CYGPATH -u "$path"`
17827    new_path=`$WHICH "$new_path" 2> /dev/null`
17828    # bat and cmd files are not always considered executable in cygwin causing which
17829    # to not find them
17830    if test "x$new_path" = x \
17831             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17832             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17833      new_path=`$CYGPATH -u "$path"`
17834    fi
17835    if test "x$new_path" = x; then
17836      # It's still not found. Now this is an unrecoverable error.
17837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17838$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17839      has_space=`$ECHO "$complete" | $GREP " "`
17840      if test "x$has_space" != x; then
17841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17843      fi
17844      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17845    fi
17846  fi
17847
17848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17851  # "foo.exe" is OK but "foo" is an error.
17852  #
17853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17854  # It is also a way to make sure we got the proper file name for the real test later on.
17855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17856  if test "x$test_shortpath" = x; then
17857    # Short path failed, file does not exist as specified.
17858    # Try adding .exe or .cmd
17859    if test -f "${new_path}.exe"; then
17860       input_to_shortpath="${new_path}.exe"
17861    elif test -f "${new_path}.cmd"; then
17862       input_to_shortpath="${new_path}.cmd"
17863    else
17864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17865$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17866      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17867$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17868      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17869    fi
17870  else
17871    input_to_shortpath="$new_path"
17872  fi
17873
17874  # Call helper function which possibly converts this using DOS-style short mode.
17875  # If so, the updated path is stored in $new_path.
17876  new_path="$input_to_shortpath"
17877
17878  input_path="$input_to_shortpath"
17879  # Check if we need to convert this using DOS-style short mode. If the path
17880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17881  # take no chances and rewrite it.
17882  # Note: m4 eats our [], so we need to use [ and ] instead.
17883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17884  if test "x$has_forbidden_chars" != x; then
17885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17889      # Going to short mode and back again did indeed matter. Since short mode is
17890      # case insensitive, let's make it lowercase to improve readability.
17891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17892      # Now convert it back to Unix-stile (cygpath)
17893      input_path=`$CYGPATH -u "$shortmode_path"`
17894      new_path="$input_path"
17895    fi
17896  fi
17897
17898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17899  if test "x$test_cygdrive_prefix" = x; then
17900    # As a simple fix, exclude /usr/bin since it's not a real path.
17901    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17903      # a path prefixed by /cygdrive for fixpath to work.
17904      new_path="$CYGWIN_ROOT_PATH$input_path"
17905    fi
17906  fi
17907
17908  # remove trailing .exe if any
17909  new_path="${new_path/%.exe/}"
17910
17911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17912
17913  # First separate the path from the arguments. This will split at the first
17914  # space.
17915  complete="$BUILD_CXX"
17916  path="${complete%% *}"
17917  tmp="$complete EOL"
17918  arguments="${tmp#* }"
17919
17920  # Input might be given as Windows format, start by converting to
17921  # unix format.
17922  new_path="$path"
17923
17924  windows_path="$new_path"
17925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17926    unix_path=`$CYGPATH -u "$windows_path"`
17927    new_path="$unix_path"
17928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17930    new_path="$unix_path"
17931  fi
17932
17933
17934  # Now try to locate executable using which
17935  new_path=`$WHICH "$new_path" 2> /dev/null`
17936
17937  if test "x$new_path" = x; then
17938    # Oops. Which didn't find the executable.
17939    # The splitting of arguments from the executable at a space might have been incorrect,
17940    # since paths with space are more likely in Windows. Give it another try with the whole
17941    # argument.
17942    path="$complete"
17943    arguments="EOL"
17944    new_path="$path"
17945
17946  windows_path="$new_path"
17947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17948    unix_path=`$CYGPATH -u "$windows_path"`
17949    new_path="$unix_path"
17950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17952    new_path="$unix_path"
17953  fi
17954
17955
17956    new_path=`$WHICH "$new_path" 2> /dev/null`
17957
17958    if test "x$new_path" = x; then
17959      # It's still not found. Now this is an unrecoverable error.
17960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17961$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17962      has_space=`$ECHO "$complete" | $GREP " "`
17963      if test "x$has_space" != x; then
17964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17966      fi
17967      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17968    fi
17969  fi
17970
17971  # Now new_path has a complete unix path to the binary
17972  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17973    # Keep paths in /bin as-is, but remove trailing .exe if any
17974    new_path="${new_path/%.exe/}"
17975    # Do not save /bin paths to all_fixpath_prefixes!
17976  else
17977    # Not in mixed or Windows style, start by that.
17978    new_path=`cmd //c echo $new_path`
17979
17980  input_path="$new_path"
17981  # Check if we need to convert this using DOS-style short mode. If the path
17982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17983  # take no chances and rewrite it.
17984  # Note: m4 eats our [], so we need to use [ and ] instead.
17985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17986  if test "x$has_forbidden_chars" != x; then
17987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17989  fi
17990
17991    # Output is in $new_path
17992
17993  windows_path="$new_path"
17994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17995    unix_path=`$CYGPATH -u "$windows_path"`
17996    new_path="$unix_path"
17997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17999    new_path="$unix_path"
18000  fi
18001
18002    # remove trailing .exe if any
18003    new_path="${new_path/%.exe/}"
18004
18005    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18006    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18007  fi
18008
18009  else
18010    # We're on a posix platform. Hooray! :)
18011    # First separate the path from the arguments. This will split at the first
18012    # space.
18013    complete="$BUILD_CXX"
18014    path="${complete%% *}"
18015    tmp="$complete EOL"
18016    arguments="${tmp#* }"
18017
18018    # Cannot rely on the command "which" here since it doesn't always work.
18019    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18020    if test -z "$is_absolute_path"; then
18021      # Path to executable is not absolute. Find it.
18022      IFS_save="$IFS"
18023      IFS=:
18024      for p in $PATH; do
18025        if test -f "$p/$path" && test -x "$p/$path"; then
18026          new_path="$p/$path"
18027          break
18028        fi
18029      done
18030      IFS="$IFS_save"
18031    else
18032      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18033$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18034      new_path="$path"
18035    fi
18036
18037    if test "x$new_path" = x; then
18038        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18039$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18040        has_space=`$ECHO "$complete" | $GREP " "`
18041        if test "x$has_space" != x; then
18042          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18043$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18044        fi
18045        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18046      fi
18047  fi
18048
18049      # Now join together the path and the arguments once again
18050      if test "x$arguments" != xEOL; then
18051        new_complete="$new_path ${arguments% *}"
18052      else
18053        new_complete="$new_path"
18054      fi
18055
18056  if test "x$complete" != "x$new_complete"; then
18057      BUILD_CXX="$new_complete"
18058      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18059$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18060    fi
18061
18062    # Extract the first word of "ld", so it can be a program name with args.
18063set dummy ld; ac_word=$2
18064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18065$as_echo_n "checking for $ac_word... " >&6; }
18066if ${ac_cv_path_BUILD_LD+:} false; then :
18067  $as_echo_n "(cached) " >&6
18068else
18069  case $BUILD_LD in
18070  [\\/]* | ?:[\\/]*)
18071  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18072  ;;
18073  *)
18074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18075for as_dir in $PATH
18076do
18077  IFS=$as_save_IFS
18078  test -z "$as_dir" && as_dir=.
18079    for ac_exec_ext in '' $ac_executable_extensions; do
18080  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18081    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18083    break 2
18084  fi
18085done
18086  done
18087IFS=$as_save_IFS
18088
18089  ;;
18090esac
18091fi
18092BUILD_LD=$ac_cv_path_BUILD_LD
18093if test -n "$BUILD_LD"; then
18094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18095$as_echo "$BUILD_LD" >&6; }
18096else
18097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18098$as_echo "no" >&6; }
18099fi
18100
18101
18102
18103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18104
18105  # First separate the path from the arguments. This will split at the first
18106  # space.
18107  complete="$BUILD_LD"
18108  path="${complete%% *}"
18109  tmp="$complete EOL"
18110  arguments="${tmp#* }"
18111
18112  # Input might be given as Windows format, start by converting to
18113  # unix format.
18114  new_path=`$CYGPATH -u "$path"`
18115
18116  # Now try to locate executable using which
18117  new_path=`$WHICH "$new_path" 2> /dev/null`
18118  # bat and cmd files are not always considered executable in cygwin causing which
18119  # to not find them
18120  if test "x$new_path" = x \
18121           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18122           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18123    new_path=`$CYGPATH -u "$path"`
18124  fi
18125  if test "x$new_path" = x; then
18126    # Oops. Which didn't find the executable.
18127    # The splitting of arguments from the executable at a space might have been incorrect,
18128    # since paths with space are more likely in Windows. Give it another try with the whole
18129    # argument.
18130    path="$complete"
18131    arguments="EOL"
18132    new_path=`$CYGPATH -u "$path"`
18133    new_path=`$WHICH "$new_path" 2> /dev/null`
18134    # bat and cmd files are not always considered executable in cygwin causing which
18135    # to not find them
18136    if test "x$new_path" = x \
18137             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18138             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18139      new_path=`$CYGPATH -u "$path"`
18140    fi
18141    if test "x$new_path" = x; then
18142      # It's still not found. Now this is an unrecoverable error.
18143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18144$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18145      has_space=`$ECHO "$complete" | $GREP " "`
18146      if test "x$has_space" != x; then
18147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18149      fi
18150      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18151    fi
18152  fi
18153
18154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18157  # "foo.exe" is OK but "foo" is an error.
18158  #
18159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18160  # It is also a way to make sure we got the proper file name for the real test later on.
18161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18162  if test "x$test_shortpath" = x; then
18163    # Short path failed, file does not exist as specified.
18164    # Try adding .exe or .cmd
18165    if test -f "${new_path}.exe"; then
18166       input_to_shortpath="${new_path}.exe"
18167    elif test -f "${new_path}.cmd"; then
18168       input_to_shortpath="${new_path}.cmd"
18169    else
18170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18171$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18172      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18173$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18174      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18175    fi
18176  else
18177    input_to_shortpath="$new_path"
18178  fi
18179
18180  # Call helper function which possibly converts this using DOS-style short mode.
18181  # If so, the updated path is stored in $new_path.
18182  new_path="$input_to_shortpath"
18183
18184  input_path="$input_to_shortpath"
18185  # Check if we need to convert this using DOS-style short mode. If the path
18186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18187  # take no chances and rewrite it.
18188  # Note: m4 eats our [], so we need to use [ and ] instead.
18189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18190  if test "x$has_forbidden_chars" != x; then
18191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18195      # Going to short mode and back again did indeed matter. Since short mode is
18196      # case insensitive, let's make it lowercase to improve readability.
18197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18198      # Now convert it back to Unix-stile (cygpath)
18199      input_path=`$CYGPATH -u "$shortmode_path"`
18200      new_path="$input_path"
18201    fi
18202  fi
18203
18204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18205  if test "x$test_cygdrive_prefix" = x; then
18206    # As a simple fix, exclude /usr/bin since it's not a real path.
18207    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18209      # a path prefixed by /cygdrive for fixpath to work.
18210      new_path="$CYGWIN_ROOT_PATH$input_path"
18211    fi
18212  fi
18213
18214  # remove trailing .exe if any
18215  new_path="${new_path/%.exe/}"
18216
18217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18218
18219  # First separate the path from the arguments. This will split at the first
18220  # space.
18221  complete="$BUILD_LD"
18222  path="${complete%% *}"
18223  tmp="$complete EOL"
18224  arguments="${tmp#* }"
18225
18226  # Input might be given as Windows format, start by converting to
18227  # unix format.
18228  new_path="$path"
18229
18230  windows_path="$new_path"
18231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18232    unix_path=`$CYGPATH -u "$windows_path"`
18233    new_path="$unix_path"
18234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18236    new_path="$unix_path"
18237  fi
18238
18239
18240  # Now try to locate executable using which
18241  new_path=`$WHICH "$new_path" 2> /dev/null`
18242
18243  if test "x$new_path" = x; then
18244    # Oops. Which didn't find the executable.
18245    # The splitting of arguments from the executable at a space might have been incorrect,
18246    # since paths with space are more likely in Windows. Give it another try with the whole
18247    # argument.
18248    path="$complete"
18249    arguments="EOL"
18250    new_path="$path"
18251
18252  windows_path="$new_path"
18253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18254    unix_path=`$CYGPATH -u "$windows_path"`
18255    new_path="$unix_path"
18256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18258    new_path="$unix_path"
18259  fi
18260
18261
18262    new_path=`$WHICH "$new_path" 2> /dev/null`
18263
18264    if test "x$new_path" = x; then
18265      # It's still not found. Now this is an unrecoverable error.
18266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18267$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18268      has_space=`$ECHO "$complete" | $GREP " "`
18269      if test "x$has_space" != x; then
18270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18272      fi
18273      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18274    fi
18275  fi
18276
18277  # Now new_path has a complete unix path to the binary
18278  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18279    # Keep paths in /bin as-is, but remove trailing .exe if any
18280    new_path="${new_path/%.exe/}"
18281    # Do not save /bin paths to all_fixpath_prefixes!
18282  else
18283    # Not in mixed or Windows style, start by that.
18284    new_path=`cmd //c echo $new_path`
18285
18286  input_path="$new_path"
18287  # Check if we need to convert this using DOS-style short mode. If the path
18288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18289  # take no chances and rewrite it.
18290  # Note: m4 eats our [], so we need to use [ and ] instead.
18291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18292  if test "x$has_forbidden_chars" != x; then
18293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18295  fi
18296
18297    # Output is in $new_path
18298
18299  windows_path="$new_path"
18300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18301    unix_path=`$CYGPATH -u "$windows_path"`
18302    new_path="$unix_path"
18303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18305    new_path="$unix_path"
18306  fi
18307
18308    # remove trailing .exe if any
18309    new_path="${new_path/%.exe/}"
18310
18311    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18312    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18313  fi
18314
18315  else
18316    # We're on a posix platform. Hooray! :)
18317    # First separate the path from the arguments. This will split at the first
18318    # space.
18319    complete="$BUILD_LD"
18320    path="${complete%% *}"
18321    tmp="$complete EOL"
18322    arguments="${tmp#* }"
18323
18324    # Cannot rely on the command "which" here since it doesn't always work.
18325    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18326    if test -z "$is_absolute_path"; then
18327      # Path to executable is not absolute. Find it.
18328      IFS_save="$IFS"
18329      IFS=:
18330      for p in $PATH; do
18331        if test -f "$p/$path" && test -x "$p/$path"; then
18332          new_path="$p/$path"
18333          break
18334        fi
18335      done
18336      IFS="$IFS_save"
18337    else
18338      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18339$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18340      new_path="$path"
18341    fi
18342
18343    if test "x$new_path" = x; then
18344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18345$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18346        has_space=`$ECHO "$complete" | $GREP " "`
18347        if test "x$has_space" != x; then
18348          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18349$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18350        fi
18351        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18352      fi
18353  fi
18354
18355      # Now join together the path and the arguments once again
18356      if test "x$arguments" != xEOL; then
18357        new_complete="$new_path ${arguments% *}"
18358      else
18359        new_complete="$new_path"
18360      fi
18361
18362  if test "x$complete" != "x$new_complete"; then
18363      BUILD_LD="$new_complete"
18364      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18365$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18366    fi
18367
18368fi
18369
18370
18371
18372
18373# If a devkit is found on the builddeps server, then prepend its path to the
18374# PATH variable. If there are cross compilers available in the devkit, these
18375# will be found by AC_PROG_CC et al.
18376DEVKIT=
18377
18378
18379    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18380        # Source the builddeps file again, to make sure it uses the latest variables!
18381        . $builddepsfile
18382        # Look for a target and build machine specific resource!
18383        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18384        if test "x$resource" = x; then
18385            # Ok, lets instead look for a target specific resource
18386            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18387        fi
18388        if test "x$resource" = x; then
18389            # Ok, lets instead look for a build specific resource
18390            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18391        fi
18392        if test "x$resource" = x; then
18393            # Ok, lets instead look for a generic resource
18394            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18395            resource=${builddep_devkit}
18396        fi
18397        if test "x$resource" != x; then
18398            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18399$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18400	    # If the resource in the builddeps.conf file is an existing directory,
18401	    # for example /java/linux/cups
18402	    if test -d ${resource}; then
18403	       depdir=${resource}
18404	    else
18405
18406# devkit is for example mymodule
18407# $resource is for example libs/general/libmymod_1_2_3.zip
18408# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18409# $with_builddeps_dir is for example /localhome/builddeps
18410# depdir is the name of the variable into which we store the depdir, eg MYMOD
18411# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18412# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18413    filename=`basename $resource`
18414    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18415    filebase=${filename%%.*}
18416    extension=${filename#*.}
18417    installdir=$with_builddeps_dir/$filebase
18418    if test ! -f $installdir/$filename.unpacked; then
18419        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18420$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18421        if test ! -d $installdir; then
18422            mkdir -p $installdir
18423        fi
18424        if test ! -d $installdir; then
18425            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18426        fi
18427        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18428        touch $tmpfile
18429        if test ! -f $tmpfile; then
18430            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18431        fi
18432
18433    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18434    # $tmpfile is the local file name for the downloaded file.
18435    VALID_TOOL=no
18436    if test "x$BDEPS_FTP" = xwget; then
18437       VALID_TOOL=yes
18438       wget -O $tmpfile $with_builddeps_server/$resource
18439    fi
18440    if test "x$BDEPS_FTP" = xlftp; then
18441       VALID_TOOL=yes
18442       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18443    fi
18444    if test "x$BDEPS_FTP" = xftp; then
18445        VALID_TOOL=yes
18446        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18447        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18448        FTPUSERPWD=${FTPSERVER%%@*}
18449        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18450            FTPUSER=${userpwd%%:*}
18451            FTPPWD=${userpwd#*@}
18452            FTPSERVER=${FTPSERVER#*@}
18453        else
18454            FTPUSER=ftp
18455            FTPPWD=ftp
18456        fi
18457        # the "pass" command does not work on some
18458        # ftp clients (read ftp.exe) but if it works,
18459        # passive mode is better!
18460        (\
18461            echo "user $FTPUSER $FTPPWD"        ;\
18462            echo "pass"                         ;\
18463            echo "bin"                          ;\
18464            echo "get $FTPPATH $tmpfile"              ;\
18465        ) | ftp -in $FTPSERVER
18466    fi
18467    if test "x$VALID_TOOL" != xyes; then
18468       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18469    fi
18470
18471        mv $tmpfile $installdir/$filename
18472        if test ! -s $installdir/$filename; then
18473            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18474        fi
18475        case "$extension" in
18476            zip)  echo "Unzipping $installdir/$filename..."
18477               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18478            ;;
18479            tar.gz) echo "Untaring $installdir/$filename..."
18480               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18481            ;;
18482            tgz) echo "Untaring $installdir/$filename..."
18483               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18484            ;;
18485            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18486            ;;
18487        esac
18488    fi
18489    if test -f $installdir/$filename.unpacked; then
18490        depdir=$installdir
18491    fi
18492
18493	    fi
18494            # Source the builddeps file again, because in the previous command, the depdir
18495            # was updated to point at the current build dependency install directory.
18496            . $builddepsfile
18497            # Now extract variables from the builddeps.conf files.
18498            theroot=${builddep_devkit_ROOT}
18499            thecflags=${builddep_devkit_CFLAGS}
18500            thelibs=${builddep_devkit_LIBS}
18501            if test "x$depdir" = x; then
18502                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18503            fi
18504            DEVKIT=$depdir
18505            if test "x$theroot" != x; then
18506               DEVKIT="$theroot"
18507            fi
18508            if test "x$thecflags" != x; then
18509               DEVKIT_CFLAGS="$thecflags"
18510            fi
18511            if test "x$thelibs" != x; then
18512               DEVKIT_LIBS="$thelibs"
18513            fi
18514            # Found devkit
18515                     PATH="$DEVKIT/bin:$PATH"
18516                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18517                     if test "x$x_includes" = "xNONE"; then
18518                         x_includes="$SYS_ROOT/usr/include/X11"
18519                     fi
18520                     if test "x$x_libraries" = "xNONE"; then
18521                         x_libraries="$SYS_ROOT/usr/lib"
18522                     fi
18523
18524
18525        fi
18526
18527    fi
18528
18529
18530if test "x$SYS_ROOT" != "x/" ; then
18531    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18532    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18533    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18534    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18535    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18536    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18537fi
18538
18539# Store the CFLAGS etal passed to the configure script.
18540ORG_CFLAGS="$CFLAGS"
18541ORG_CXXFLAGS="$CXXFLAGS"
18542ORG_OBJCFLAGS="$OBJCFLAGS"
18543
18544# autoconf magic only relies on PATH, so update it if tools dir is specified
18545OLD_PATH="$PATH"
18546if test "x$TOOLS_DIR" != x; then
18547  PATH=$TOOLS_DIR:$PATH
18548fi
18549
18550
18551### Locate C compiler (CC)
18552
18553# On windows, only cl.exe is supported.
18554# On Solaris, cc is preferred to gcc.
18555# Elsewhere, gcc is preferred to cc.
18556
18557if test "x$CC" != x; then
18558  COMPILER_CHECK_LIST="$CC"
18559elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18560  COMPILER_CHECK_LIST="cl"
18561elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18562  COMPILER_CHECK_LIST="cc gcc"
18563else
18564  COMPILER_CHECK_LIST="gcc cc"
18565fi
18566
18567
18568  COMPILER_NAME=C
18569
18570  CC=
18571  # If TOOLS_DIR is set, check for all compiler names in there first
18572  # before checking the rest of the PATH.
18573  if test -n "$TOOLS_DIR"; then
18574    PATH_save="$PATH"
18575    PATH="$TOOLS_DIR"
18576    for ac_prog in $COMPILER_CHECK_LIST
18577do
18578  # Extract the first word of "$ac_prog", so it can be a program name with args.
18579set dummy $ac_prog; ac_word=$2
18580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18581$as_echo_n "checking for $ac_word... " >&6; }
18582if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18583  $as_echo_n "(cached) " >&6
18584else
18585  case $TOOLS_DIR_CC in
18586  [\\/]* | ?:[\\/]*)
18587  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18588  ;;
18589  *)
18590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18591for as_dir in $PATH
18592do
18593  IFS=$as_save_IFS
18594  test -z "$as_dir" && as_dir=.
18595    for ac_exec_ext in '' $ac_executable_extensions; do
18596  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18597    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18599    break 2
18600  fi
18601done
18602  done
18603IFS=$as_save_IFS
18604
18605  ;;
18606esac
18607fi
18608TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18609if test -n "$TOOLS_DIR_CC"; then
18610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18611$as_echo "$TOOLS_DIR_CC" >&6; }
18612else
18613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18614$as_echo "no" >&6; }
18615fi
18616
18617
18618  test -n "$TOOLS_DIR_CC" && break
18619done
18620
18621    CC=$TOOLS_DIR_CC
18622    PATH="$PATH_save"
18623  fi
18624
18625  # AC_PATH_PROGS can't be run multiple times with the same variable,
18626  # so create a new name for this run.
18627  if test "x$CC" = x; then
18628    for ac_prog in $COMPILER_CHECK_LIST
18629do
18630  # Extract the first word of "$ac_prog", so it can be a program name with args.
18631set dummy $ac_prog; ac_word=$2
18632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18633$as_echo_n "checking for $ac_word... " >&6; }
18634if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18635  $as_echo_n "(cached) " >&6
18636else
18637  case $POTENTIAL_CC in
18638  [\\/]* | ?:[\\/]*)
18639  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18640  ;;
18641  *)
18642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18643for as_dir in $PATH
18644do
18645  IFS=$as_save_IFS
18646  test -z "$as_dir" && as_dir=.
18647    for ac_exec_ext in '' $ac_executable_extensions; do
18648  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18649    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18651    break 2
18652  fi
18653done
18654  done
18655IFS=$as_save_IFS
18656
18657  ;;
18658esac
18659fi
18660POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18661if test -n "$POTENTIAL_CC"; then
18662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18663$as_echo "$POTENTIAL_CC" >&6; }
18664else
18665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18666$as_echo "no" >&6; }
18667fi
18668
18669
18670  test -n "$POTENTIAL_CC" && break
18671done
18672
18673    CC=$POTENTIAL_CC
18674  fi
18675
18676  if test "x$CC" = x; then
18677
18678    # Print a helpful message on how to acquire the necessary build dependency.
18679    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18680    MISSING_DEPENDENCY=devkit
18681    PKGHANDLER_COMMAND=
18682
18683    case $PKGHANDLER in
18684	apt-get)
18685                apt_help     $MISSING_DEPENDENCY ;;
18686    yum)
18687                yum_help     $MISSING_DEPENDENCY ;;
18688	port)
18689                port_help    $MISSING_DEPENDENCY ;;
18690	pkgutil)
18691                pkgutil_help $MISSING_DEPENDENCY ;;
18692	pkgadd)
18693                pkgadd_help  $MISSING_DEPENDENCY ;;
18694    * )
18695      break ;;
18696    esac
18697
18698    if test "x$PKGHANDLER_COMMAND" != x; then
18699        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18700    fi
18701
18702      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18703  fi
18704
18705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18706
18707  # First separate the path from the arguments. This will split at the first
18708  # space.
18709  complete="$CC"
18710  path="${complete%% *}"
18711  tmp="$complete EOL"
18712  arguments="${tmp#* }"
18713
18714  # Input might be given as Windows format, start by converting to
18715  # unix format.
18716  new_path=`$CYGPATH -u "$path"`
18717
18718  # Now try to locate executable using which
18719  new_path=`$WHICH "$new_path" 2> /dev/null`
18720  # bat and cmd files are not always considered executable in cygwin causing which
18721  # to not find them
18722  if test "x$new_path" = x \
18723           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18724           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18725    new_path=`$CYGPATH -u "$path"`
18726  fi
18727  if test "x$new_path" = x; then
18728    # Oops. Which didn't find the executable.
18729    # The splitting of arguments from the executable at a space might have been incorrect,
18730    # since paths with space are more likely in Windows. Give it another try with the whole
18731    # argument.
18732    path="$complete"
18733    arguments="EOL"
18734    new_path=`$CYGPATH -u "$path"`
18735    new_path=`$WHICH "$new_path" 2> /dev/null`
18736    # bat and cmd files are not always considered executable in cygwin causing which
18737    # to not find them
18738    if test "x$new_path" = x \
18739             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18740             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18741      new_path=`$CYGPATH -u "$path"`
18742    fi
18743    if test "x$new_path" = x; then
18744      # It's still not found. Now this is an unrecoverable error.
18745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18746$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18747      has_space=`$ECHO "$complete" | $GREP " "`
18748      if test "x$has_space" != x; then
18749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18751      fi
18752      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18753    fi
18754  fi
18755
18756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18759  # "foo.exe" is OK but "foo" is an error.
18760  #
18761  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18762  # It is also a way to make sure we got the proper file name for the real test later on.
18763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18764  if test "x$test_shortpath" = x; then
18765    # Short path failed, file does not exist as specified.
18766    # Try adding .exe or .cmd
18767    if test -f "${new_path}.exe"; then
18768       input_to_shortpath="${new_path}.exe"
18769    elif test -f "${new_path}.cmd"; then
18770       input_to_shortpath="${new_path}.cmd"
18771    else
18772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18773$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18774      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18775$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18776      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18777    fi
18778  else
18779    input_to_shortpath="$new_path"
18780  fi
18781
18782  # Call helper function which possibly converts this using DOS-style short mode.
18783  # If so, the updated path is stored in $new_path.
18784  new_path="$input_to_shortpath"
18785
18786  input_path="$input_to_shortpath"
18787  # Check if we need to convert this using DOS-style short mode. If the path
18788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18789  # take no chances and rewrite it.
18790  # Note: m4 eats our [], so we need to use [ and ] instead.
18791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18792  if test "x$has_forbidden_chars" != x; then
18793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18797      # Going to short mode and back again did indeed matter. Since short mode is
18798      # case insensitive, let's make it lowercase to improve readability.
18799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18800      # Now convert it back to Unix-stile (cygpath)
18801      input_path=`$CYGPATH -u "$shortmode_path"`
18802      new_path="$input_path"
18803    fi
18804  fi
18805
18806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18807  if test "x$test_cygdrive_prefix" = x; then
18808    # As a simple fix, exclude /usr/bin since it's not a real path.
18809    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18811      # a path prefixed by /cygdrive for fixpath to work.
18812      new_path="$CYGWIN_ROOT_PATH$input_path"
18813    fi
18814  fi
18815
18816  # remove trailing .exe if any
18817  new_path="${new_path/%.exe/}"
18818
18819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18820
18821  # First separate the path from the arguments. This will split at the first
18822  # space.
18823  complete="$CC"
18824  path="${complete%% *}"
18825  tmp="$complete EOL"
18826  arguments="${tmp#* }"
18827
18828  # Input might be given as Windows format, start by converting to
18829  # unix format.
18830  new_path="$path"
18831
18832  windows_path="$new_path"
18833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18834    unix_path=`$CYGPATH -u "$windows_path"`
18835    new_path="$unix_path"
18836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18838    new_path="$unix_path"
18839  fi
18840
18841
18842  # Now try to locate executable using which
18843  new_path=`$WHICH "$new_path" 2> /dev/null`
18844
18845  if test "x$new_path" = x; then
18846    # Oops. Which didn't find the executable.
18847    # The splitting of arguments from the executable at a space might have been incorrect,
18848    # since paths with space are more likely in Windows. Give it another try with the whole
18849    # argument.
18850    path="$complete"
18851    arguments="EOL"
18852    new_path="$path"
18853
18854  windows_path="$new_path"
18855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18856    unix_path=`$CYGPATH -u "$windows_path"`
18857    new_path="$unix_path"
18858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18860    new_path="$unix_path"
18861  fi
18862
18863
18864    new_path=`$WHICH "$new_path" 2> /dev/null`
18865
18866    if test "x$new_path" = x; then
18867      # It's still not found. Now this is an unrecoverable error.
18868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18869$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18870      has_space=`$ECHO "$complete" | $GREP " "`
18871      if test "x$has_space" != x; then
18872        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18873$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18874      fi
18875      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18876    fi
18877  fi
18878
18879  # Now new_path has a complete unix path to the binary
18880  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18881    # Keep paths in /bin as-is, but remove trailing .exe if any
18882    new_path="${new_path/%.exe/}"
18883    # Do not save /bin paths to all_fixpath_prefixes!
18884  else
18885    # Not in mixed or Windows style, start by that.
18886    new_path=`cmd //c echo $new_path`
18887
18888  input_path="$new_path"
18889  # Check if we need to convert this using DOS-style short mode. If the path
18890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18891  # take no chances and rewrite it.
18892  # Note: m4 eats our [], so we need to use [ and ] instead.
18893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18894  if test "x$has_forbidden_chars" != x; then
18895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18897  fi
18898
18899    # Output is in $new_path
18900
18901  windows_path="$new_path"
18902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18903    unix_path=`$CYGPATH -u "$windows_path"`
18904    new_path="$unix_path"
18905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18907    new_path="$unix_path"
18908  fi
18909
18910    # remove trailing .exe if any
18911    new_path="${new_path/%.exe/}"
18912
18913    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18914    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18915  fi
18916
18917  else
18918    # We're on a posix platform. Hooray! :)
18919    # First separate the path from the arguments. This will split at the first
18920    # space.
18921    complete="$CC"
18922    path="${complete%% *}"
18923    tmp="$complete EOL"
18924    arguments="${tmp#* }"
18925
18926    # Cannot rely on the command "which" here since it doesn't always work.
18927    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18928    if test -z "$is_absolute_path"; then
18929      # Path to executable is not absolute. Find it.
18930      IFS_save="$IFS"
18931      IFS=:
18932      for p in $PATH; do
18933        if test -f "$p/$path" && test -x "$p/$path"; then
18934          new_path="$p/$path"
18935          break
18936        fi
18937      done
18938      IFS="$IFS_save"
18939    else
18940      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18941$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18942      new_path="$path"
18943    fi
18944
18945    if test "x$new_path" = x; then
18946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18947$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18948        has_space=`$ECHO "$complete" | $GREP " "`
18949        if test "x$has_space" != x; then
18950          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18951$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18952        fi
18953        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18954      fi
18955  fi
18956
18957      # Now join together the path and the arguments once again
18958      if test "x$arguments" != xEOL; then
18959        new_complete="$new_path ${arguments% *}"
18960      else
18961        new_complete="$new_path"
18962      fi
18963
18964  if test "x$complete" != "x$new_complete"; then
18965      CC="$new_complete"
18966      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18967$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18968    fi
18969
18970  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18971$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18972  TEST_COMPILER="$CC"
18973
18974    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18975        # Follow a chain of symbolic links. Use readlink
18976        # where it exists, else fall back to horribly
18977        # complicated shell code.
18978        if test "x$READLINK_TESTED" != yes; then
18979            # On MacOSX there is a readlink tool with a different
18980            # purpose than the GNU readlink tool. Check the found readlink.
18981            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18982            if test "x$ISGNU" = x; then
18983                 # A readlink that we do not know how to use.
18984                 # Are there other non-GNU readlinks out there?
18985                 READLINK_TESTED=yes
18986                 READLINK=
18987            fi
18988        fi
18989
18990        if test "x$READLINK" != x; then
18991            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18992        else
18993            # Save the current directory for restoring afterwards
18994            STARTDIR=$PWD
18995            COUNTER=0
18996            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18997            sym_link_file=`$BASENAME $TEST_COMPILER`
18998            # Use the system pwd and not the shell builtin to resolve directory symlinks
18999            cd $sym_link_dir
19000            cd `$THEPWDCMD`
19001            sym_link_dir=`$THEPWDCMD`
19002            # Resolve file symlinks
19003            while test $COUNTER -lt 20; do
19004                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19005                if test "x$ISLINK" == x; then
19006                    # This is not a symbolic link! We are done!
19007                    break
19008                fi
19009                # Again resolve directory symlinks since the target of the just found
19010                # link could be in a different directory
19011                cd `$DIRNAME $ISLINK`
19012                sym_link_dir=`$THEPWDCMD`
19013                sym_link_file=`$BASENAME $ISLINK`
19014                let COUNTER=COUNTER+1
19015            done
19016            cd $STARTDIR
19017            TEST_COMPILER=$sym_link_dir/$sym_link_file
19018        fi
19019    fi
19020
19021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19022$as_echo "$TEST_COMPILER" >&6; }
19023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19024$as_echo_n "checking if CC is disguised ccache... " >&6; }
19025
19026  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19027  if test "x$COMPILER_BASENAME" = "xccache"; then
19028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19029$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19030    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19031    # We want to control ccache invocation ourselves, so ignore this cc and try
19032    # searching again.
19033
19034    # Remove the path to the fake ccache cc from the PATH
19035    RETRY_COMPILER_SAVED_PATH="$PATH"
19036    COMPILER_DIRNAME=`$DIRNAME $CC`
19037    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19038
19039    # Try again looking for our compiler
19040    if test -n "$ac_tool_prefix"; then
19041  for ac_prog in $COMPILER_CHECK_LIST
19042  do
19043    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19044set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19046$as_echo_n "checking for $ac_word... " >&6; }
19047if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19048  $as_echo_n "(cached) " >&6
19049else
19050  if test -n "$PROPER_COMPILER_CC"; then
19051  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19052else
19053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19054for as_dir in $PATH
19055do
19056  IFS=$as_save_IFS
19057  test -z "$as_dir" && as_dir=.
19058    for ac_exec_ext in '' $ac_executable_extensions; do
19059  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19060    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19062    break 2
19063  fi
19064done
19065  done
19066IFS=$as_save_IFS
19067
19068fi
19069fi
19070PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19071if test -n "$PROPER_COMPILER_CC"; then
19072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19073$as_echo "$PROPER_COMPILER_CC" >&6; }
19074else
19075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19076$as_echo "no" >&6; }
19077fi
19078
19079
19080    test -n "$PROPER_COMPILER_CC" && break
19081  done
19082fi
19083if test -z "$PROPER_COMPILER_CC"; then
19084  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19085  for ac_prog in $COMPILER_CHECK_LIST
19086do
19087  # Extract the first word of "$ac_prog", so it can be a program name with args.
19088set dummy $ac_prog; ac_word=$2
19089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19090$as_echo_n "checking for $ac_word... " >&6; }
19091if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19092  $as_echo_n "(cached) " >&6
19093else
19094  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19095  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19096else
19097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19098for as_dir in $PATH
19099do
19100  IFS=$as_save_IFS
19101  test -z "$as_dir" && as_dir=.
19102    for ac_exec_ext in '' $ac_executable_extensions; do
19103  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19104    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19106    break 2
19107  fi
19108done
19109  done
19110IFS=$as_save_IFS
19111
19112fi
19113fi
19114ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19115if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19117$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19118else
19119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19120$as_echo "no" >&6; }
19121fi
19122
19123
19124  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19125done
19126
19127  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19128    PROPER_COMPILER_CC=""
19129  else
19130    case $cross_compiling:$ac_tool_warned in
19131yes:)
19132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19134ac_tool_warned=yes ;;
19135esac
19136    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19137  fi
19138fi
19139
19140
19141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19142
19143  # First separate the path from the arguments. This will split at the first
19144  # space.
19145  complete="$PROPER_COMPILER_CC"
19146  path="${complete%% *}"
19147  tmp="$complete EOL"
19148  arguments="${tmp#* }"
19149
19150  # Input might be given as Windows format, start by converting to
19151  # unix format.
19152  new_path=`$CYGPATH -u "$path"`
19153
19154  # Now try to locate executable using which
19155  new_path=`$WHICH "$new_path" 2> /dev/null`
19156  # bat and cmd files are not always considered executable in cygwin causing which
19157  # to not find them
19158  if test "x$new_path" = x \
19159           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19160           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19161    new_path=`$CYGPATH -u "$path"`
19162  fi
19163  if test "x$new_path" = x; then
19164    # Oops. Which didn't find the executable.
19165    # The splitting of arguments from the executable at a space might have been incorrect,
19166    # since paths with space are more likely in Windows. Give it another try with the whole
19167    # argument.
19168    path="$complete"
19169    arguments="EOL"
19170    new_path=`$CYGPATH -u "$path"`
19171    new_path=`$WHICH "$new_path" 2> /dev/null`
19172    # bat and cmd files are not always considered executable in cygwin causing which
19173    # to not find them
19174    if test "x$new_path" = x \
19175             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19176             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19177      new_path=`$CYGPATH -u "$path"`
19178    fi
19179    if test "x$new_path" = x; then
19180      # It's still not found. Now this is an unrecoverable error.
19181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19182$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19183      has_space=`$ECHO "$complete" | $GREP " "`
19184      if test "x$has_space" != x; then
19185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19187      fi
19188      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19189    fi
19190  fi
19191
19192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19195  # "foo.exe" is OK but "foo" is an error.
19196  #
19197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19198  # It is also a way to make sure we got the proper file name for the real test later on.
19199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19200  if test "x$test_shortpath" = x; then
19201    # Short path failed, file does not exist as specified.
19202    # Try adding .exe or .cmd
19203    if test -f "${new_path}.exe"; then
19204       input_to_shortpath="${new_path}.exe"
19205    elif test -f "${new_path}.cmd"; then
19206       input_to_shortpath="${new_path}.cmd"
19207    else
19208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19209$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19210      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19211$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19212      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19213    fi
19214  else
19215    input_to_shortpath="$new_path"
19216  fi
19217
19218  # Call helper function which possibly converts this using DOS-style short mode.
19219  # If so, the updated path is stored in $new_path.
19220  new_path="$input_to_shortpath"
19221
19222  input_path="$input_to_shortpath"
19223  # Check if we need to convert this using DOS-style short mode. If the path
19224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19225  # take no chances and rewrite it.
19226  # Note: m4 eats our [], so we need to use [ and ] instead.
19227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19228  if test "x$has_forbidden_chars" != x; then
19229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19233      # Going to short mode and back again did indeed matter. Since short mode is
19234      # case insensitive, let's make it lowercase to improve readability.
19235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19236      # Now convert it back to Unix-stile (cygpath)
19237      input_path=`$CYGPATH -u "$shortmode_path"`
19238      new_path="$input_path"
19239    fi
19240  fi
19241
19242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19243  if test "x$test_cygdrive_prefix" = x; then
19244    # As a simple fix, exclude /usr/bin since it's not a real path.
19245    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19247      # a path prefixed by /cygdrive for fixpath to work.
19248      new_path="$CYGWIN_ROOT_PATH$input_path"
19249    fi
19250  fi
19251
19252  # remove trailing .exe if any
19253  new_path="${new_path/%.exe/}"
19254
19255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19256
19257  # First separate the path from the arguments. This will split at the first
19258  # space.
19259  complete="$PROPER_COMPILER_CC"
19260  path="${complete%% *}"
19261  tmp="$complete EOL"
19262  arguments="${tmp#* }"
19263
19264  # Input might be given as Windows format, start by converting to
19265  # unix format.
19266  new_path="$path"
19267
19268  windows_path="$new_path"
19269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19270    unix_path=`$CYGPATH -u "$windows_path"`
19271    new_path="$unix_path"
19272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19274    new_path="$unix_path"
19275  fi
19276
19277
19278  # Now try to locate executable using which
19279  new_path=`$WHICH "$new_path" 2> /dev/null`
19280
19281  if test "x$new_path" = x; then
19282    # Oops. Which didn't find the executable.
19283    # The splitting of arguments from the executable at a space might have been incorrect,
19284    # since paths with space are more likely in Windows. Give it another try with the whole
19285    # argument.
19286    path="$complete"
19287    arguments="EOL"
19288    new_path="$path"
19289
19290  windows_path="$new_path"
19291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19292    unix_path=`$CYGPATH -u "$windows_path"`
19293    new_path="$unix_path"
19294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19296    new_path="$unix_path"
19297  fi
19298
19299
19300    new_path=`$WHICH "$new_path" 2> /dev/null`
19301
19302    if test "x$new_path" = x; then
19303      # It's still not found. Now this is an unrecoverable error.
19304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19305$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19306      has_space=`$ECHO "$complete" | $GREP " "`
19307      if test "x$has_space" != x; then
19308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19310      fi
19311      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19312    fi
19313  fi
19314
19315  # Now new_path has a complete unix path to the binary
19316  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19317    # Keep paths in /bin as-is, but remove trailing .exe if any
19318    new_path="${new_path/%.exe/}"
19319    # Do not save /bin paths to all_fixpath_prefixes!
19320  else
19321    # Not in mixed or Windows style, start by that.
19322    new_path=`cmd //c echo $new_path`
19323
19324  input_path="$new_path"
19325  # Check if we need to convert this using DOS-style short mode. If the path
19326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19327  # take no chances and rewrite it.
19328  # Note: m4 eats our [], so we need to use [ and ] instead.
19329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19330  if test "x$has_forbidden_chars" != x; then
19331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19333  fi
19334
19335    # Output is in $new_path
19336
19337  windows_path="$new_path"
19338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19339    unix_path=`$CYGPATH -u "$windows_path"`
19340    new_path="$unix_path"
19341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19343    new_path="$unix_path"
19344  fi
19345
19346    # remove trailing .exe if any
19347    new_path="${new_path/%.exe/}"
19348
19349    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19350    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19351  fi
19352
19353  else
19354    # We're on a posix platform. Hooray! :)
19355    # First separate the path from the arguments. This will split at the first
19356    # space.
19357    complete="$PROPER_COMPILER_CC"
19358    path="${complete%% *}"
19359    tmp="$complete EOL"
19360    arguments="${tmp#* }"
19361
19362    # Cannot rely on the command "which" here since it doesn't always work.
19363    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19364    if test -z "$is_absolute_path"; then
19365      # Path to executable is not absolute. Find it.
19366      IFS_save="$IFS"
19367      IFS=:
19368      for p in $PATH; do
19369        if test -f "$p/$path" && test -x "$p/$path"; then
19370          new_path="$p/$path"
19371          break
19372        fi
19373      done
19374      IFS="$IFS_save"
19375    else
19376      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19377$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19378      new_path="$path"
19379    fi
19380
19381    if test "x$new_path" = x; then
19382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19383$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19384        has_space=`$ECHO "$complete" | $GREP " "`
19385        if test "x$has_space" != x; then
19386          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19387$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19388        fi
19389        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19390      fi
19391  fi
19392
19393      # Now join together the path and the arguments once again
19394      if test "x$arguments" != xEOL; then
19395        new_complete="$new_path ${arguments% *}"
19396      else
19397        new_complete="$new_path"
19398      fi
19399
19400  if test "x$complete" != "x$new_complete"; then
19401      PROPER_COMPILER_CC="$new_complete"
19402      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19403$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19404    fi
19405
19406    PATH="$RETRY_COMPILER_SAVED_PATH"
19407
19408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19409$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19410
19411    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19412        # Follow a chain of symbolic links. Use readlink
19413        # where it exists, else fall back to horribly
19414        # complicated shell code.
19415        if test "x$READLINK_TESTED" != yes; then
19416            # On MacOSX there is a readlink tool with a different
19417            # purpose than the GNU readlink tool. Check the found readlink.
19418            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19419            if test "x$ISGNU" = x; then
19420                 # A readlink that we do not know how to use.
19421                 # Are there other non-GNU readlinks out there?
19422                 READLINK_TESTED=yes
19423                 READLINK=
19424            fi
19425        fi
19426
19427        if test "x$READLINK" != x; then
19428            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19429        else
19430            # Save the current directory for restoring afterwards
19431            STARTDIR=$PWD
19432            COUNTER=0
19433            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19434            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19435            # Use the system pwd and not the shell builtin to resolve directory symlinks
19436            cd $sym_link_dir
19437            cd `$THEPWDCMD`
19438            sym_link_dir=`$THEPWDCMD`
19439            # Resolve file symlinks
19440            while test $COUNTER -lt 20; do
19441                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19442                if test "x$ISLINK" == x; then
19443                    # This is not a symbolic link! We are done!
19444                    break
19445                fi
19446                # Again resolve directory symlinks since the target of the just found
19447                # link could be in a different directory
19448                cd `$DIRNAME $ISLINK`
19449                sym_link_dir=`$THEPWDCMD`
19450                sym_link_file=`$BASENAME $ISLINK`
19451                let COUNTER=COUNTER+1
19452            done
19453            cd $STARTDIR
19454            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19455        fi
19456    fi
19457
19458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19459$as_echo "$PROPER_COMPILER_CC" >&6; }
19460    CC="$PROPER_COMPILER_CC"
19461  else
19462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19463$as_echo "no, keeping CC" >&6; }
19464    CC="$TEST_COMPILER"
19465  fi
19466
19467  COMPILER=$CC
19468  COMPILER_NAME=$COMPILER_NAME
19469
19470  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19471    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19472    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19473    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19474    if test $? -ne 0; then
19475      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19476
19477      { $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
19478$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19479      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19480$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19481      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19482    else
19483      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19484      COMPILER_VENDOR="Sun Studio"
19485    fi
19486  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19487    # First line typically looks something like:
19488    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19489    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19490    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19491    COMPILER_VENDOR="Microsoft CL.EXE"
19492    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19493    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19494      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19495        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19496      fi
19497    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19498      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19499        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19500      fi
19501    fi
19502  else
19503    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19504    # Check that this is likely to be GCC.
19505    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19506    if test $? -ne 0; then
19507      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19508$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19509      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19510$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19511      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19512    fi
19513
19514    # First line typically looks something like:
19515    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19516    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19517    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19518  fi
19519  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19520  CC_VERSION="$COMPILER_VERSION"
19521  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19522  CC_VENDOR="$COMPILER_VENDOR"
19523
19524  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19525$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19526
19527
19528# Now that we have resolved CC ourself, let autoconf have its go at it
19529ac_ext=c
19530ac_cpp='$CPP $CPPFLAGS'
19531ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19532ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19533ac_compiler_gnu=$ac_cv_c_compiler_gnu
19534if test -n "$ac_tool_prefix"; then
19535  for ac_prog in $CC
19536  do
19537    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19538set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19540$as_echo_n "checking for $ac_word... " >&6; }
19541if ${ac_cv_prog_CC+:} false; then :
19542  $as_echo_n "(cached) " >&6
19543else
19544  if test -n "$CC"; then
19545  ac_cv_prog_CC="$CC" # Let the user override the test.
19546else
19547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19548for as_dir in $PATH
19549do
19550  IFS=$as_save_IFS
19551  test -z "$as_dir" && as_dir=.
19552    for ac_exec_ext in '' $ac_executable_extensions; do
19553  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19554    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19556    break 2
19557  fi
19558done
19559  done
19560IFS=$as_save_IFS
19561
19562fi
19563fi
19564CC=$ac_cv_prog_CC
19565if test -n "$CC"; then
19566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19567$as_echo "$CC" >&6; }
19568else
19569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19570$as_echo "no" >&6; }
19571fi
19572
19573
19574    test -n "$CC" && break
19575  done
19576fi
19577if test -z "$CC"; then
19578  ac_ct_CC=$CC
19579  for ac_prog in $CC
19580do
19581  # Extract the first word of "$ac_prog", so it can be a program name with args.
19582set dummy $ac_prog; ac_word=$2
19583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19584$as_echo_n "checking for $ac_word... " >&6; }
19585if ${ac_cv_prog_ac_ct_CC+:} false; then :
19586  $as_echo_n "(cached) " >&6
19587else
19588  if test -n "$ac_ct_CC"; then
19589  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19590else
19591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19592for as_dir in $PATH
19593do
19594  IFS=$as_save_IFS
19595  test -z "$as_dir" && as_dir=.
19596    for ac_exec_ext in '' $ac_executable_extensions; do
19597  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19598    ac_cv_prog_ac_ct_CC="$ac_prog"
19599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19600    break 2
19601  fi
19602done
19603  done
19604IFS=$as_save_IFS
19605
19606fi
19607fi
19608ac_ct_CC=$ac_cv_prog_ac_ct_CC
19609if test -n "$ac_ct_CC"; then
19610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19611$as_echo "$ac_ct_CC" >&6; }
19612else
19613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19614$as_echo "no" >&6; }
19615fi
19616
19617
19618  test -n "$ac_ct_CC" && break
19619done
19620
19621  if test "x$ac_ct_CC" = x; then
19622    CC=""
19623  else
19624    case $cross_compiling:$ac_tool_warned in
19625yes:)
19626{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19627$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19628ac_tool_warned=yes ;;
19629esac
19630    CC=$ac_ct_CC
19631  fi
19632fi
19633
19634
19635test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19637as_fn_error $? "no acceptable C compiler found in \$PATH
19638See \`config.log' for more details" "$LINENO" 5; }
19639
19640# Provide some information about the compiler.
19641$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19642set X $ac_compile
19643ac_compiler=$2
19644for ac_option in --version -v -V -qversion; do
19645  { { ac_try="$ac_compiler $ac_option >&5"
19646case "(($ac_try" in
19647  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19648  *) ac_try_echo=$ac_try;;
19649esac
19650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19651$as_echo "$ac_try_echo"; } >&5
19652  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19653  ac_status=$?
19654  if test -s conftest.err; then
19655    sed '10a\
19656... rest of stderr output deleted ...
19657         10q' conftest.err >conftest.er1
19658    cat conftest.er1 >&5
19659  fi
19660  rm -f conftest.er1 conftest.err
19661  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19662  test $ac_status = 0; }
19663done
19664
19665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19666/* end confdefs.h.  */
19667
19668int
19669main ()
19670{
19671
19672  ;
19673  return 0;
19674}
19675_ACEOF
19676ac_clean_files_save=$ac_clean_files
19677ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19678# Try to create an executable without -o first, disregard a.out.
19679# It will help us diagnose broken compilers, and finding out an intuition
19680# of exeext.
19681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19682$as_echo_n "checking whether the C compiler works... " >&6; }
19683ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19684
19685# The possible output files:
19686ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19687
19688ac_rmfiles=
19689for ac_file in $ac_files
19690do
19691  case $ac_file in
19692    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19693    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19694  esac
19695done
19696rm -f $ac_rmfiles
19697
19698if { { ac_try="$ac_link_default"
19699case "(($ac_try" in
19700  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19701  *) ac_try_echo=$ac_try;;
19702esac
19703eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19704$as_echo "$ac_try_echo"; } >&5
19705  (eval "$ac_link_default") 2>&5
19706  ac_status=$?
19707  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19708  test $ac_status = 0; }; then :
19709  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19710# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19711# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19712# so that the user can short-circuit this test for compilers unknown to
19713# Autoconf.
19714for ac_file in $ac_files ''
19715do
19716  test -f "$ac_file" || continue
19717  case $ac_file in
19718    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19719	;;
19720    [ab].out )
19721	# We found the default executable, but exeext='' is most
19722	# certainly right.
19723	break;;
19724    *.* )
19725	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19726	then :; else
19727	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19728	fi
19729	# We set ac_cv_exeext here because the later test for it is not
19730	# safe: cross compilers may not add the suffix if given an `-o'
19731	# argument, so we may need to know it at that point already.
19732	# Even if this section looks crufty: it has the advantage of
19733	# actually working.
19734	break;;
19735    * )
19736	break;;
19737  esac
19738done
19739test "$ac_cv_exeext" = no && ac_cv_exeext=
19740
19741else
19742  ac_file=''
19743fi
19744if test -z "$ac_file"; then :
19745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19746$as_echo "no" >&6; }
19747$as_echo "$as_me: failed program was:" >&5
19748sed 's/^/| /' conftest.$ac_ext >&5
19749
19750{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19751$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19752as_fn_error 77 "C compiler cannot create executables
19753See \`config.log' for more details" "$LINENO" 5; }
19754else
19755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19756$as_echo "yes" >&6; }
19757fi
19758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19759$as_echo_n "checking for C compiler default output file name... " >&6; }
19760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19761$as_echo "$ac_file" >&6; }
19762ac_exeext=$ac_cv_exeext
19763
19764rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19765ac_clean_files=$ac_clean_files_save
19766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19767$as_echo_n "checking for suffix of executables... " >&6; }
19768if { { ac_try="$ac_link"
19769case "(($ac_try" in
19770  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19771  *) ac_try_echo=$ac_try;;
19772esac
19773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19774$as_echo "$ac_try_echo"; } >&5
19775  (eval "$ac_link") 2>&5
19776  ac_status=$?
19777  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19778  test $ac_status = 0; }; then :
19779  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19780# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19781# work properly (i.e., refer to `conftest.exe'), while it won't with
19782# `rm'.
19783for ac_file in conftest.exe conftest conftest.*; do
19784  test -f "$ac_file" || continue
19785  case $ac_file in
19786    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19787    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19788	  break;;
19789    * ) break;;
19790  esac
19791done
19792else
19793  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19794$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19795as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19796See \`config.log' for more details" "$LINENO" 5; }
19797fi
19798rm -f conftest conftest$ac_cv_exeext
19799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19800$as_echo "$ac_cv_exeext" >&6; }
19801
19802rm -f conftest.$ac_ext
19803EXEEXT=$ac_cv_exeext
19804ac_exeext=$EXEEXT
19805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19806/* end confdefs.h.  */
19807#include <stdio.h>
19808int
19809main ()
19810{
19811FILE *f = fopen ("conftest.out", "w");
19812 return ferror (f) || fclose (f) != 0;
19813
19814  ;
19815  return 0;
19816}
19817_ACEOF
19818ac_clean_files="$ac_clean_files conftest.out"
19819# Check that the compiler produces executables we can run.  If not, either
19820# the compiler is broken, or we cross compile.
19821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19822$as_echo_n "checking whether we are cross compiling... " >&6; }
19823if test "$cross_compiling" != yes; then
19824  { { ac_try="$ac_link"
19825case "(($ac_try" in
19826  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19827  *) ac_try_echo=$ac_try;;
19828esac
19829eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19830$as_echo "$ac_try_echo"; } >&5
19831  (eval "$ac_link") 2>&5
19832  ac_status=$?
19833  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19834  test $ac_status = 0; }
19835  if { ac_try='./conftest$ac_cv_exeext'
19836  { { case "(($ac_try" in
19837  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19838  *) ac_try_echo=$ac_try;;
19839esac
19840eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19841$as_echo "$ac_try_echo"; } >&5
19842  (eval "$ac_try") 2>&5
19843  ac_status=$?
19844  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19845  test $ac_status = 0; }; }; then
19846    cross_compiling=no
19847  else
19848    if test "$cross_compiling" = maybe; then
19849	cross_compiling=yes
19850    else
19851	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19852$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19853as_fn_error $? "cannot run C compiled programs.
19854If you meant to cross compile, use \`--host'.
19855See \`config.log' for more details" "$LINENO" 5; }
19856    fi
19857  fi
19858fi
19859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19860$as_echo "$cross_compiling" >&6; }
19861
19862rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19863ac_clean_files=$ac_clean_files_save
19864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19865$as_echo_n "checking for suffix of object files... " >&6; }
19866if ${ac_cv_objext+:} false; then :
19867  $as_echo_n "(cached) " >&6
19868else
19869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19870/* end confdefs.h.  */
19871
19872int
19873main ()
19874{
19875
19876  ;
19877  return 0;
19878}
19879_ACEOF
19880rm -f conftest.o conftest.obj
19881if { { ac_try="$ac_compile"
19882case "(($ac_try" in
19883  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19884  *) ac_try_echo=$ac_try;;
19885esac
19886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19887$as_echo "$ac_try_echo"; } >&5
19888  (eval "$ac_compile") 2>&5
19889  ac_status=$?
19890  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19891  test $ac_status = 0; }; then :
19892  for ac_file in conftest.o conftest.obj conftest.*; do
19893  test -f "$ac_file" || continue;
19894  case $ac_file in
19895    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19896    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19897       break;;
19898  esac
19899done
19900else
19901  $as_echo "$as_me: failed program was:" >&5
19902sed 's/^/| /' conftest.$ac_ext >&5
19903
19904{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19906as_fn_error $? "cannot compute suffix of object files: cannot compile
19907See \`config.log' for more details" "$LINENO" 5; }
19908fi
19909rm -f conftest.$ac_cv_objext conftest.$ac_ext
19910fi
19911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19912$as_echo "$ac_cv_objext" >&6; }
19913OBJEXT=$ac_cv_objext
19914ac_objext=$OBJEXT
19915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19916$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19917if ${ac_cv_c_compiler_gnu+:} false; then :
19918  $as_echo_n "(cached) " >&6
19919else
19920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19921/* end confdefs.h.  */
19922
19923int
19924main ()
19925{
19926#ifndef __GNUC__
19927       choke me
19928#endif
19929
19930  ;
19931  return 0;
19932}
19933_ACEOF
19934if ac_fn_c_try_compile "$LINENO"; then :
19935  ac_compiler_gnu=yes
19936else
19937  ac_compiler_gnu=no
19938fi
19939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19940ac_cv_c_compiler_gnu=$ac_compiler_gnu
19941
19942fi
19943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19944$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19945if test $ac_compiler_gnu = yes; then
19946  GCC=yes
19947else
19948  GCC=
19949fi
19950ac_test_CFLAGS=${CFLAGS+set}
19951ac_save_CFLAGS=$CFLAGS
19952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19953$as_echo_n "checking whether $CC accepts -g... " >&6; }
19954if ${ac_cv_prog_cc_g+:} false; then :
19955  $as_echo_n "(cached) " >&6
19956else
19957  ac_save_c_werror_flag=$ac_c_werror_flag
19958   ac_c_werror_flag=yes
19959   ac_cv_prog_cc_g=no
19960   CFLAGS="-g"
19961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19962/* end confdefs.h.  */
19963
19964int
19965main ()
19966{
19967
19968  ;
19969  return 0;
19970}
19971_ACEOF
19972if ac_fn_c_try_compile "$LINENO"; then :
19973  ac_cv_prog_cc_g=yes
19974else
19975  CFLAGS=""
19976      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19977/* end confdefs.h.  */
19978
19979int
19980main ()
19981{
19982
19983  ;
19984  return 0;
19985}
19986_ACEOF
19987if ac_fn_c_try_compile "$LINENO"; then :
19988
19989else
19990  ac_c_werror_flag=$ac_save_c_werror_flag
19991	 CFLAGS="-g"
19992	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19993/* end confdefs.h.  */
19994
19995int
19996main ()
19997{
19998
19999  ;
20000  return 0;
20001}
20002_ACEOF
20003if ac_fn_c_try_compile "$LINENO"; then :
20004  ac_cv_prog_cc_g=yes
20005fi
20006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20007fi
20008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20009fi
20010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20011   ac_c_werror_flag=$ac_save_c_werror_flag
20012fi
20013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20014$as_echo "$ac_cv_prog_cc_g" >&6; }
20015if test "$ac_test_CFLAGS" = set; then
20016  CFLAGS=$ac_save_CFLAGS
20017elif test $ac_cv_prog_cc_g = yes; then
20018  if test "$GCC" = yes; then
20019    CFLAGS="-g -O2"
20020  else
20021    CFLAGS="-g"
20022  fi
20023else
20024  if test "$GCC" = yes; then
20025    CFLAGS="-O2"
20026  else
20027    CFLAGS=
20028  fi
20029fi
20030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20031$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20032if ${ac_cv_prog_cc_c89+:} false; then :
20033  $as_echo_n "(cached) " >&6
20034else
20035  ac_cv_prog_cc_c89=no
20036ac_save_CC=$CC
20037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20038/* end confdefs.h.  */
20039#include <stdarg.h>
20040#include <stdio.h>
20041#include <sys/types.h>
20042#include <sys/stat.h>
20043/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20044struct buf { int x; };
20045FILE * (*rcsopen) (struct buf *, struct stat *, int);
20046static char *e (p, i)
20047     char **p;
20048     int i;
20049{
20050  return p[i];
20051}
20052static char *f (char * (*g) (char **, int), char **p, ...)
20053{
20054  char *s;
20055  va_list v;
20056  va_start (v,p);
20057  s = g (p, va_arg (v,int));
20058  va_end (v);
20059  return s;
20060}
20061
20062/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20063   function prototypes and stuff, but not '\xHH' hex character constants.
20064   These don't provoke an error unfortunately, instead are silently treated
20065   as 'x'.  The following induces an error, until -std is added to get
20066   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20067   array size at least.  It's necessary to write '\x00'==0 to get something
20068   that's true only with -std.  */
20069int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20070
20071/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20072   inside strings and character constants.  */
20073#define FOO(x) 'x'
20074int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20075
20076int test (int i, double x);
20077struct s1 {int (*f) (int a);};
20078struct s2 {int (*f) (double a);};
20079int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20080int argc;
20081char **argv;
20082int
20083main ()
20084{
20085return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20086  ;
20087  return 0;
20088}
20089_ACEOF
20090for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20091	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20092do
20093  CC="$ac_save_CC $ac_arg"
20094  if ac_fn_c_try_compile "$LINENO"; then :
20095  ac_cv_prog_cc_c89=$ac_arg
20096fi
20097rm -f core conftest.err conftest.$ac_objext
20098  test "x$ac_cv_prog_cc_c89" != "xno" && break
20099done
20100rm -f conftest.$ac_ext
20101CC=$ac_save_CC
20102
20103fi
20104# AC_CACHE_VAL
20105case "x$ac_cv_prog_cc_c89" in
20106  x)
20107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20108$as_echo "none needed" >&6; } ;;
20109  xno)
20110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20111$as_echo "unsupported" >&6; } ;;
20112  *)
20113    CC="$CC $ac_cv_prog_cc_c89"
20114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20115$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20116esac
20117if test "x$ac_cv_prog_cc_c89" != xno; then :
20118
20119fi
20120
20121ac_ext=cpp
20122ac_cpp='$CXXCPP $CPPFLAGS'
20123ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20124ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20125ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20126
20127
20128### Locate C++ compiler (CXX)
20129
20130if test "x$CXX" != x; then
20131  COMPILER_CHECK_LIST="$CXX"
20132elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20133  COMPILER_CHECK_LIST="cl"
20134elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20135  COMPILER_CHECK_LIST="CC g++"
20136else
20137  COMPILER_CHECK_LIST="g++ CC"
20138fi
20139
20140
20141  COMPILER_NAME=C++
20142
20143  CXX=
20144  # If TOOLS_DIR is set, check for all compiler names in there first
20145  # before checking the rest of the PATH.
20146  if test -n "$TOOLS_DIR"; then
20147    PATH_save="$PATH"
20148    PATH="$TOOLS_DIR"
20149    for ac_prog in $COMPILER_CHECK_LIST
20150do
20151  # Extract the first word of "$ac_prog", so it can be a program name with args.
20152set dummy $ac_prog; ac_word=$2
20153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20154$as_echo_n "checking for $ac_word... " >&6; }
20155if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20156  $as_echo_n "(cached) " >&6
20157else
20158  case $TOOLS_DIR_CXX in
20159  [\\/]* | ?:[\\/]*)
20160  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20161  ;;
20162  *)
20163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20164for as_dir in $PATH
20165do
20166  IFS=$as_save_IFS
20167  test -z "$as_dir" && as_dir=.
20168    for ac_exec_ext in '' $ac_executable_extensions; do
20169  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20170    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20172    break 2
20173  fi
20174done
20175  done
20176IFS=$as_save_IFS
20177
20178  ;;
20179esac
20180fi
20181TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20182if test -n "$TOOLS_DIR_CXX"; then
20183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20184$as_echo "$TOOLS_DIR_CXX" >&6; }
20185else
20186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20187$as_echo "no" >&6; }
20188fi
20189
20190
20191  test -n "$TOOLS_DIR_CXX" && break
20192done
20193
20194    CXX=$TOOLS_DIR_CXX
20195    PATH="$PATH_save"
20196  fi
20197
20198  # AC_PATH_PROGS can't be run multiple times with the same variable,
20199  # so create a new name for this run.
20200  if test "x$CXX" = x; then
20201    for ac_prog in $COMPILER_CHECK_LIST
20202do
20203  # Extract the first word of "$ac_prog", so it can be a program name with args.
20204set dummy $ac_prog; ac_word=$2
20205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20206$as_echo_n "checking for $ac_word... " >&6; }
20207if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20208  $as_echo_n "(cached) " >&6
20209else
20210  case $POTENTIAL_CXX in
20211  [\\/]* | ?:[\\/]*)
20212  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20213  ;;
20214  *)
20215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20216for as_dir in $PATH
20217do
20218  IFS=$as_save_IFS
20219  test -z "$as_dir" && as_dir=.
20220    for ac_exec_ext in '' $ac_executable_extensions; do
20221  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20222    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20224    break 2
20225  fi
20226done
20227  done
20228IFS=$as_save_IFS
20229
20230  ;;
20231esac
20232fi
20233POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20234if test -n "$POTENTIAL_CXX"; then
20235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20236$as_echo "$POTENTIAL_CXX" >&6; }
20237else
20238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20239$as_echo "no" >&6; }
20240fi
20241
20242
20243  test -n "$POTENTIAL_CXX" && break
20244done
20245
20246    CXX=$POTENTIAL_CXX
20247  fi
20248
20249  if test "x$CXX" = x; then
20250
20251    # Print a helpful message on how to acquire the necessary build dependency.
20252    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20253    MISSING_DEPENDENCY=devkit
20254    PKGHANDLER_COMMAND=
20255
20256    case $PKGHANDLER in
20257	apt-get)
20258                apt_help     $MISSING_DEPENDENCY ;;
20259    yum)
20260                yum_help     $MISSING_DEPENDENCY ;;
20261	port)
20262                port_help    $MISSING_DEPENDENCY ;;
20263	pkgutil)
20264                pkgutil_help $MISSING_DEPENDENCY ;;
20265	pkgadd)
20266                pkgadd_help  $MISSING_DEPENDENCY ;;
20267    * )
20268      break ;;
20269    esac
20270
20271    if test "x$PKGHANDLER_COMMAND" != x; then
20272        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20273    fi
20274
20275      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20276  fi
20277
20278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20279
20280  # First separate the path from the arguments. This will split at the first
20281  # space.
20282  complete="$CXX"
20283  path="${complete%% *}"
20284  tmp="$complete EOL"
20285  arguments="${tmp#* }"
20286
20287  # Input might be given as Windows format, start by converting to
20288  # unix format.
20289  new_path=`$CYGPATH -u "$path"`
20290
20291  # Now try to locate executable using which
20292  new_path=`$WHICH "$new_path" 2> /dev/null`
20293  # bat and cmd files are not always considered executable in cygwin causing which
20294  # to not find them
20295  if test "x$new_path" = x \
20296           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20297           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20298    new_path=`$CYGPATH -u "$path"`
20299  fi
20300  if test "x$new_path" = x; then
20301    # Oops. Which didn't find the executable.
20302    # The splitting of arguments from the executable at a space might have been incorrect,
20303    # since paths with space are more likely in Windows. Give it another try with the whole
20304    # argument.
20305    path="$complete"
20306    arguments="EOL"
20307    new_path=`$CYGPATH -u "$path"`
20308    new_path=`$WHICH "$new_path" 2> /dev/null`
20309    # bat and cmd files are not always considered executable in cygwin causing which
20310    # to not find them
20311    if test "x$new_path" = x \
20312             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20313             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20314      new_path=`$CYGPATH -u "$path"`
20315    fi
20316    if test "x$new_path" = x; then
20317      # It's still not found. Now this is an unrecoverable error.
20318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20319$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20320      has_space=`$ECHO "$complete" | $GREP " "`
20321      if test "x$has_space" != x; then
20322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20324      fi
20325      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20326    fi
20327  fi
20328
20329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20332  # "foo.exe" is OK but "foo" is an error.
20333  #
20334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20335  # It is also a way to make sure we got the proper file name for the real test later on.
20336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20337  if test "x$test_shortpath" = x; then
20338    # Short path failed, file does not exist as specified.
20339    # Try adding .exe or .cmd
20340    if test -f "${new_path}.exe"; then
20341       input_to_shortpath="${new_path}.exe"
20342    elif test -f "${new_path}.cmd"; then
20343       input_to_shortpath="${new_path}.cmd"
20344    else
20345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20346$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20347      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20348$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20349      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20350    fi
20351  else
20352    input_to_shortpath="$new_path"
20353  fi
20354
20355  # Call helper function which possibly converts this using DOS-style short mode.
20356  # If so, the updated path is stored in $new_path.
20357  new_path="$input_to_shortpath"
20358
20359  input_path="$input_to_shortpath"
20360  # Check if we need to convert this using DOS-style short mode. If the path
20361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20362  # take no chances and rewrite it.
20363  # Note: m4 eats our [], so we need to use [ and ] instead.
20364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20365  if test "x$has_forbidden_chars" != x; then
20366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20370      # Going to short mode and back again did indeed matter. Since short mode is
20371      # case insensitive, let's make it lowercase to improve readability.
20372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20373      # Now convert it back to Unix-stile (cygpath)
20374      input_path=`$CYGPATH -u "$shortmode_path"`
20375      new_path="$input_path"
20376    fi
20377  fi
20378
20379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20380  if test "x$test_cygdrive_prefix" = x; then
20381    # As a simple fix, exclude /usr/bin since it's not a real path.
20382    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20384      # a path prefixed by /cygdrive for fixpath to work.
20385      new_path="$CYGWIN_ROOT_PATH$input_path"
20386    fi
20387  fi
20388
20389  # remove trailing .exe if any
20390  new_path="${new_path/%.exe/}"
20391
20392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20393
20394  # First separate the path from the arguments. This will split at the first
20395  # space.
20396  complete="$CXX"
20397  path="${complete%% *}"
20398  tmp="$complete EOL"
20399  arguments="${tmp#* }"
20400
20401  # Input might be given as Windows format, start by converting to
20402  # unix format.
20403  new_path="$path"
20404
20405  windows_path="$new_path"
20406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20407    unix_path=`$CYGPATH -u "$windows_path"`
20408    new_path="$unix_path"
20409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20411    new_path="$unix_path"
20412  fi
20413
20414
20415  # Now try to locate executable using which
20416  new_path=`$WHICH "$new_path" 2> /dev/null`
20417
20418  if test "x$new_path" = x; then
20419    # Oops. Which didn't find the executable.
20420    # The splitting of arguments from the executable at a space might have been incorrect,
20421    # since paths with space are more likely in Windows. Give it another try with the whole
20422    # argument.
20423    path="$complete"
20424    arguments="EOL"
20425    new_path="$path"
20426
20427  windows_path="$new_path"
20428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20429    unix_path=`$CYGPATH -u "$windows_path"`
20430    new_path="$unix_path"
20431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20433    new_path="$unix_path"
20434  fi
20435
20436
20437    new_path=`$WHICH "$new_path" 2> /dev/null`
20438
20439    if test "x$new_path" = x; then
20440      # It's still not found. Now this is an unrecoverable error.
20441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20442$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20443      has_space=`$ECHO "$complete" | $GREP " "`
20444      if test "x$has_space" != x; then
20445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20447      fi
20448      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20449    fi
20450  fi
20451
20452  # Now new_path has a complete unix path to the binary
20453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20454    # Keep paths in /bin as-is, but remove trailing .exe if any
20455    new_path="${new_path/%.exe/}"
20456    # Do not save /bin paths to all_fixpath_prefixes!
20457  else
20458    # Not in mixed or Windows style, start by that.
20459    new_path=`cmd //c echo $new_path`
20460
20461  input_path="$new_path"
20462  # Check if we need to convert this using DOS-style short mode. If the path
20463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20464  # take no chances and rewrite it.
20465  # Note: m4 eats our [], so we need to use [ and ] instead.
20466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20467  if test "x$has_forbidden_chars" != x; then
20468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20470  fi
20471
20472    # Output is in $new_path
20473
20474  windows_path="$new_path"
20475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20476    unix_path=`$CYGPATH -u "$windows_path"`
20477    new_path="$unix_path"
20478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20480    new_path="$unix_path"
20481  fi
20482
20483    # remove trailing .exe if any
20484    new_path="${new_path/%.exe/}"
20485
20486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20488  fi
20489
20490  else
20491    # We're on a posix platform. Hooray! :)
20492    # First separate the path from the arguments. This will split at the first
20493    # space.
20494    complete="$CXX"
20495    path="${complete%% *}"
20496    tmp="$complete EOL"
20497    arguments="${tmp#* }"
20498
20499    # Cannot rely on the command "which" here since it doesn't always work.
20500    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20501    if test -z "$is_absolute_path"; then
20502      # Path to executable is not absolute. Find it.
20503      IFS_save="$IFS"
20504      IFS=:
20505      for p in $PATH; do
20506        if test -f "$p/$path" && test -x "$p/$path"; then
20507          new_path="$p/$path"
20508          break
20509        fi
20510      done
20511      IFS="$IFS_save"
20512    else
20513      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20514$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20515      new_path="$path"
20516    fi
20517
20518    if test "x$new_path" = x; then
20519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20520$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20521        has_space=`$ECHO "$complete" | $GREP " "`
20522        if test "x$has_space" != x; then
20523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20525        fi
20526        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20527      fi
20528  fi
20529
20530      # Now join together the path and the arguments once again
20531      if test "x$arguments" != xEOL; then
20532        new_complete="$new_path ${arguments% *}"
20533      else
20534        new_complete="$new_path"
20535      fi
20536
20537  if test "x$complete" != "x$new_complete"; then
20538      CXX="$new_complete"
20539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20540$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20541    fi
20542
20543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20544$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20545  TEST_COMPILER="$CXX"
20546
20547    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20548        # Follow a chain of symbolic links. Use readlink
20549        # where it exists, else fall back to horribly
20550        # complicated shell code.
20551        if test "x$READLINK_TESTED" != yes; then
20552            # On MacOSX there is a readlink tool with a different
20553            # purpose than the GNU readlink tool. Check the found readlink.
20554            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20555            if test "x$ISGNU" = x; then
20556                 # A readlink that we do not know how to use.
20557                 # Are there other non-GNU readlinks out there?
20558                 READLINK_TESTED=yes
20559                 READLINK=
20560            fi
20561        fi
20562
20563        if test "x$READLINK" != x; then
20564            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20565        else
20566            # Save the current directory for restoring afterwards
20567            STARTDIR=$PWD
20568            COUNTER=0
20569            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20570            sym_link_file=`$BASENAME $TEST_COMPILER`
20571            # Use the system pwd and not the shell builtin to resolve directory symlinks
20572            cd $sym_link_dir
20573            cd `$THEPWDCMD`
20574            sym_link_dir=`$THEPWDCMD`
20575            # Resolve file symlinks
20576            while test $COUNTER -lt 20; do
20577                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20578                if test "x$ISLINK" == x; then
20579                    # This is not a symbolic link! We are done!
20580                    break
20581                fi
20582                # Again resolve directory symlinks since the target of the just found
20583                # link could be in a different directory
20584                cd `$DIRNAME $ISLINK`
20585                sym_link_dir=`$THEPWDCMD`
20586                sym_link_file=`$BASENAME $ISLINK`
20587                let COUNTER=COUNTER+1
20588            done
20589            cd $STARTDIR
20590            TEST_COMPILER=$sym_link_dir/$sym_link_file
20591        fi
20592    fi
20593
20594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20595$as_echo "$TEST_COMPILER" >&6; }
20596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20597$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20598
20599  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20600  if test "x$COMPILER_BASENAME" = "xccache"; then
20601    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20602$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20603    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20604    # We want to control ccache invocation ourselves, so ignore this cc and try
20605    # searching again.
20606
20607    # Remove the path to the fake ccache cc from the PATH
20608    RETRY_COMPILER_SAVED_PATH="$PATH"
20609    COMPILER_DIRNAME=`$DIRNAME $CXX`
20610    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20611
20612    # Try again looking for our compiler
20613    if test -n "$ac_tool_prefix"; then
20614  for ac_prog in $COMPILER_CHECK_LIST
20615  do
20616    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20617set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20619$as_echo_n "checking for $ac_word... " >&6; }
20620if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20621  $as_echo_n "(cached) " >&6
20622else
20623  if test -n "$PROPER_COMPILER_CXX"; then
20624  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20625else
20626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20627for as_dir in $PATH
20628do
20629  IFS=$as_save_IFS
20630  test -z "$as_dir" && as_dir=.
20631    for ac_exec_ext in '' $ac_executable_extensions; do
20632  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20633    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20635    break 2
20636  fi
20637done
20638  done
20639IFS=$as_save_IFS
20640
20641fi
20642fi
20643PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20644if test -n "$PROPER_COMPILER_CXX"; then
20645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20646$as_echo "$PROPER_COMPILER_CXX" >&6; }
20647else
20648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20649$as_echo "no" >&6; }
20650fi
20651
20652
20653    test -n "$PROPER_COMPILER_CXX" && break
20654  done
20655fi
20656if test -z "$PROPER_COMPILER_CXX"; then
20657  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20658  for ac_prog in $COMPILER_CHECK_LIST
20659do
20660  # Extract the first word of "$ac_prog", so it can be a program name with args.
20661set dummy $ac_prog; ac_word=$2
20662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20663$as_echo_n "checking for $ac_word... " >&6; }
20664if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20665  $as_echo_n "(cached) " >&6
20666else
20667  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20668  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20669else
20670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20671for as_dir in $PATH
20672do
20673  IFS=$as_save_IFS
20674  test -z "$as_dir" && as_dir=.
20675    for ac_exec_ext in '' $ac_executable_extensions; do
20676  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20677    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20679    break 2
20680  fi
20681done
20682  done
20683IFS=$as_save_IFS
20684
20685fi
20686fi
20687ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20688if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20690$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20691else
20692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20693$as_echo "no" >&6; }
20694fi
20695
20696
20697  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20698done
20699
20700  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20701    PROPER_COMPILER_CXX=""
20702  else
20703    case $cross_compiling:$ac_tool_warned in
20704yes:)
20705{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20706$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20707ac_tool_warned=yes ;;
20708esac
20709    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20710  fi
20711fi
20712
20713
20714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20715
20716  # First separate the path from the arguments. This will split at the first
20717  # space.
20718  complete="$PROPER_COMPILER_CXX"
20719  path="${complete%% *}"
20720  tmp="$complete EOL"
20721  arguments="${tmp#* }"
20722
20723  # Input might be given as Windows format, start by converting to
20724  # unix format.
20725  new_path=`$CYGPATH -u "$path"`
20726
20727  # Now try to locate executable using which
20728  new_path=`$WHICH "$new_path" 2> /dev/null`
20729  # bat and cmd files are not always considered executable in cygwin causing which
20730  # to not find them
20731  if test "x$new_path" = x \
20732           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20733           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20734    new_path=`$CYGPATH -u "$path"`
20735  fi
20736  if test "x$new_path" = x; then
20737    # Oops. Which didn't find the executable.
20738    # The splitting of arguments from the executable at a space might have been incorrect,
20739    # since paths with space are more likely in Windows. Give it another try with the whole
20740    # argument.
20741    path="$complete"
20742    arguments="EOL"
20743    new_path=`$CYGPATH -u "$path"`
20744    new_path=`$WHICH "$new_path" 2> /dev/null`
20745    # bat and cmd files are not always considered executable in cygwin causing which
20746    # to not find them
20747    if test "x$new_path" = x \
20748             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20749             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20750      new_path=`$CYGPATH -u "$path"`
20751    fi
20752    if test "x$new_path" = x; then
20753      # It's still not found. Now this is an unrecoverable error.
20754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20755$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20756      has_space=`$ECHO "$complete" | $GREP " "`
20757      if test "x$has_space" != x; then
20758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20760      fi
20761      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20762    fi
20763  fi
20764
20765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20768  # "foo.exe" is OK but "foo" is an error.
20769  #
20770  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20771  # It is also a way to make sure we got the proper file name for the real test later on.
20772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20773  if test "x$test_shortpath" = x; then
20774    # Short path failed, file does not exist as specified.
20775    # Try adding .exe or .cmd
20776    if test -f "${new_path}.exe"; then
20777       input_to_shortpath="${new_path}.exe"
20778    elif test -f "${new_path}.cmd"; then
20779       input_to_shortpath="${new_path}.cmd"
20780    else
20781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20782$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20783      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20784$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20785      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20786    fi
20787  else
20788    input_to_shortpath="$new_path"
20789  fi
20790
20791  # Call helper function which possibly converts this using DOS-style short mode.
20792  # If so, the updated path is stored in $new_path.
20793  new_path="$input_to_shortpath"
20794
20795  input_path="$input_to_shortpath"
20796  # Check if we need to convert this using DOS-style short mode. If the path
20797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20798  # take no chances and rewrite it.
20799  # Note: m4 eats our [], so we need to use [ and ] instead.
20800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20801  if test "x$has_forbidden_chars" != x; then
20802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20806      # Going to short mode and back again did indeed matter. Since short mode is
20807      # case insensitive, let's make it lowercase to improve readability.
20808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20809      # Now convert it back to Unix-stile (cygpath)
20810      input_path=`$CYGPATH -u "$shortmode_path"`
20811      new_path="$input_path"
20812    fi
20813  fi
20814
20815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20816  if test "x$test_cygdrive_prefix" = x; then
20817    # As a simple fix, exclude /usr/bin since it's not a real path.
20818    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20820      # a path prefixed by /cygdrive for fixpath to work.
20821      new_path="$CYGWIN_ROOT_PATH$input_path"
20822    fi
20823  fi
20824
20825  # remove trailing .exe if any
20826  new_path="${new_path/%.exe/}"
20827
20828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20829
20830  # First separate the path from the arguments. This will split at the first
20831  # space.
20832  complete="$PROPER_COMPILER_CXX"
20833  path="${complete%% *}"
20834  tmp="$complete EOL"
20835  arguments="${tmp#* }"
20836
20837  # Input might be given as Windows format, start by converting to
20838  # unix format.
20839  new_path="$path"
20840
20841  windows_path="$new_path"
20842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20843    unix_path=`$CYGPATH -u "$windows_path"`
20844    new_path="$unix_path"
20845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20847    new_path="$unix_path"
20848  fi
20849
20850
20851  # Now try to locate executable using which
20852  new_path=`$WHICH "$new_path" 2> /dev/null`
20853
20854  if test "x$new_path" = x; then
20855    # Oops. Which didn't find the executable.
20856    # The splitting of arguments from the executable at a space might have been incorrect,
20857    # since paths with space are more likely in Windows. Give it another try with the whole
20858    # argument.
20859    path="$complete"
20860    arguments="EOL"
20861    new_path="$path"
20862
20863  windows_path="$new_path"
20864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20865    unix_path=`$CYGPATH -u "$windows_path"`
20866    new_path="$unix_path"
20867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20869    new_path="$unix_path"
20870  fi
20871
20872
20873    new_path=`$WHICH "$new_path" 2> /dev/null`
20874
20875    if test "x$new_path" = x; then
20876      # It's still not found. Now this is an unrecoverable error.
20877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20878$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20879      has_space=`$ECHO "$complete" | $GREP " "`
20880      if test "x$has_space" != x; then
20881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20883      fi
20884      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20885    fi
20886  fi
20887
20888  # Now new_path has a complete unix path to the binary
20889  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20890    # Keep paths in /bin as-is, but remove trailing .exe if any
20891    new_path="${new_path/%.exe/}"
20892    # Do not save /bin paths to all_fixpath_prefixes!
20893  else
20894    # Not in mixed or Windows style, start by that.
20895    new_path=`cmd //c echo $new_path`
20896
20897  input_path="$new_path"
20898  # Check if we need to convert this using DOS-style short mode. If the path
20899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20900  # take no chances and rewrite it.
20901  # Note: m4 eats our [], so we need to use [ and ] instead.
20902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20903  if test "x$has_forbidden_chars" != x; then
20904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20906  fi
20907
20908    # Output is in $new_path
20909
20910  windows_path="$new_path"
20911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20912    unix_path=`$CYGPATH -u "$windows_path"`
20913    new_path="$unix_path"
20914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20916    new_path="$unix_path"
20917  fi
20918
20919    # remove trailing .exe if any
20920    new_path="${new_path/%.exe/}"
20921
20922    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20923    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20924  fi
20925
20926  else
20927    # We're on a posix platform. Hooray! :)
20928    # First separate the path from the arguments. This will split at the first
20929    # space.
20930    complete="$PROPER_COMPILER_CXX"
20931    path="${complete%% *}"
20932    tmp="$complete EOL"
20933    arguments="${tmp#* }"
20934
20935    # Cannot rely on the command "which" here since it doesn't always work.
20936    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20937    if test -z "$is_absolute_path"; then
20938      # Path to executable is not absolute. Find it.
20939      IFS_save="$IFS"
20940      IFS=:
20941      for p in $PATH; do
20942        if test -f "$p/$path" && test -x "$p/$path"; then
20943          new_path="$p/$path"
20944          break
20945        fi
20946      done
20947      IFS="$IFS_save"
20948    else
20949      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20950$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20951      new_path="$path"
20952    fi
20953
20954    if test "x$new_path" = x; then
20955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20956$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20957        has_space=`$ECHO "$complete" | $GREP " "`
20958        if test "x$has_space" != x; then
20959          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20960$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20961        fi
20962        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20963      fi
20964  fi
20965
20966      # Now join together the path and the arguments once again
20967      if test "x$arguments" != xEOL; then
20968        new_complete="$new_path ${arguments% *}"
20969      else
20970        new_complete="$new_path"
20971      fi
20972
20973  if test "x$complete" != "x$new_complete"; then
20974      PROPER_COMPILER_CXX="$new_complete"
20975      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20976$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20977    fi
20978
20979    PATH="$RETRY_COMPILER_SAVED_PATH"
20980
20981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20982$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20983
20984    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20985        # Follow a chain of symbolic links. Use readlink
20986        # where it exists, else fall back to horribly
20987        # complicated shell code.
20988        if test "x$READLINK_TESTED" != yes; then
20989            # On MacOSX there is a readlink tool with a different
20990            # purpose than the GNU readlink tool. Check the found readlink.
20991            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20992            if test "x$ISGNU" = x; then
20993                 # A readlink that we do not know how to use.
20994                 # Are there other non-GNU readlinks out there?
20995                 READLINK_TESTED=yes
20996                 READLINK=
20997            fi
20998        fi
20999
21000        if test "x$READLINK" != x; then
21001            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21002        else
21003            # Save the current directory for restoring afterwards
21004            STARTDIR=$PWD
21005            COUNTER=0
21006            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21007            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21008            # Use the system pwd and not the shell builtin to resolve directory symlinks
21009            cd $sym_link_dir
21010            cd `$THEPWDCMD`
21011            sym_link_dir=`$THEPWDCMD`
21012            # Resolve file symlinks
21013            while test $COUNTER -lt 20; do
21014                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21015                if test "x$ISLINK" == x; then
21016                    # This is not a symbolic link! We are done!
21017                    break
21018                fi
21019                # Again resolve directory symlinks since the target of the just found
21020                # link could be in a different directory
21021                cd `$DIRNAME $ISLINK`
21022                sym_link_dir=`$THEPWDCMD`
21023                sym_link_file=`$BASENAME $ISLINK`
21024                let COUNTER=COUNTER+1
21025            done
21026            cd $STARTDIR
21027            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21028        fi
21029    fi
21030
21031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21032$as_echo "$PROPER_COMPILER_CXX" >&6; }
21033    CXX="$PROPER_COMPILER_CXX"
21034  else
21035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21036$as_echo "no, keeping CXX" >&6; }
21037    CXX="$TEST_COMPILER"
21038  fi
21039
21040  COMPILER=$CXX
21041  COMPILER_NAME=$COMPILER_NAME
21042
21043  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21044    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21045    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21046    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21047    if test $? -ne 0; then
21048      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21049
21050      { $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
21051$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21052      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21053$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21054      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21055    else
21056      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21057      COMPILER_VENDOR="Sun Studio"
21058    fi
21059  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21060    # First line typically looks something like:
21061    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21062    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21063    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21064    COMPILER_VENDOR="Microsoft CL.EXE"
21065    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21066    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21067      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21068        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21069      fi
21070    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21071      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21072        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21073      fi
21074    fi
21075  else
21076    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21077    # Check that this is likely to be GCC.
21078    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21079    if test $? -ne 0; then
21080      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21081$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21082      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21083$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21084      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21085    fi
21086
21087    # First line typically looks something like:
21088    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21089    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21090    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21091  fi
21092  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21093  CXX_VERSION="$COMPILER_VERSION"
21094  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21095  CXX_VENDOR="$COMPILER_VENDOR"
21096
21097  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21098$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21099
21100
21101# Now that we have resolved CXX ourself, let autoconf have its go at it
21102ac_ext=cpp
21103ac_cpp='$CXXCPP $CPPFLAGS'
21104ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21105ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21106ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21107if test -z "$CXX"; then
21108  if test -n "$CCC"; then
21109    CXX=$CCC
21110  else
21111    if test -n "$ac_tool_prefix"; then
21112  for ac_prog in $CXX
21113  do
21114    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21115set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21117$as_echo_n "checking for $ac_word... " >&6; }
21118if ${ac_cv_prog_CXX+:} false; then :
21119  $as_echo_n "(cached) " >&6
21120else
21121  if test -n "$CXX"; then
21122  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21123else
21124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21125for as_dir in $PATH
21126do
21127  IFS=$as_save_IFS
21128  test -z "$as_dir" && as_dir=.
21129    for ac_exec_ext in '' $ac_executable_extensions; do
21130  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21131    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21133    break 2
21134  fi
21135done
21136  done
21137IFS=$as_save_IFS
21138
21139fi
21140fi
21141CXX=$ac_cv_prog_CXX
21142if test -n "$CXX"; then
21143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21144$as_echo "$CXX" >&6; }
21145else
21146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21147$as_echo "no" >&6; }
21148fi
21149
21150
21151    test -n "$CXX" && break
21152  done
21153fi
21154if test -z "$CXX"; then
21155  ac_ct_CXX=$CXX
21156  for ac_prog in $CXX
21157do
21158  # Extract the first word of "$ac_prog", so it can be a program name with args.
21159set dummy $ac_prog; ac_word=$2
21160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21161$as_echo_n "checking for $ac_word... " >&6; }
21162if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21163  $as_echo_n "(cached) " >&6
21164else
21165  if test -n "$ac_ct_CXX"; then
21166  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21167else
21168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21169for as_dir in $PATH
21170do
21171  IFS=$as_save_IFS
21172  test -z "$as_dir" && as_dir=.
21173    for ac_exec_ext in '' $ac_executable_extensions; do
21174  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21175    ac_cv_prog_ac_ct_CXX="$ac_prog"
21176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21177    break 2
21178  fi
21179done
21180  done
21181IFS=$as_save_IFS
21182
21183fi
21184fi
21185ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21186if test -n "$ac_ct_CXX"; then
21187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21188$as_echo "$ac_ct_CXX" >&6; }
21189else
21190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21191$as_echo "no" >&6; }
21192fi
21193
21194
21195  test -n "$ac_ct_CXX" && break
21196done
21197
21198  if test "x$ac_ct_CXX" = x; then
21199    CXX="g++"
21200  else
21201    case $cross_compiling:$ac_tool_warned in
21202yes:)
21203{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21204$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21205ac_tool_warned=yes ;;
21206esac
21207    CXX=$ac_ct_CXX
21208  fi
21209fi
21210
21211  fi
21212fi
21213# Provide some information about the compiler.
21214$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21215set X $ac_compile
21216ac_compiler=$2
21217for ac_option in --version -v -V -qversion; do
21218  { { ac_try="$ac_compiler $ac_option >&5"
21219case "(($ac_try" in
21220  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21221  *) ac_try_echo=$ac_try;;
21222esac
21223eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21224$as_echo "$ac_try_echo"; } >&5
21225  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21226  ac_status=$?
21227  if test -s conftest.err; then
21228    sed '10a\
21229... rest of stderr output deleted ...
21230         10q' conftest.err >conftest.er1
21231    cat conftest.er1 >&5
21232  fi
21233  rm -f conftest.er1 conftest.err
21234  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21235  test $ac_status = 0; }
21236done
21237
21238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21239$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21240if ${ac_cv_cxx_compiler_gnu+:} false; then :
21241  $as_echo_n "(cached) " >&6
21242else
21243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21244/* end confdefs.h.  */
21245
21246int
21247main ()
21248{
21249#ifndef __GNUC__
21250       choke me
21251#endif
21252
21253  ;
21254  return 0;
21255}
21256_ACEOF
21257if ac_fn_cxx_try_compile "$LINENO"; then :
21258  ac_compiler_gnu=yes
21259else
21260  ac_compiler_gnu=no
21261fi
21262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21263ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21264
21265fi
21266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21267$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21268if test $ac_compiler_gnu = yes; then
21269  GXX=yes
21270else
21271  GXX=
21272fi
21273ac_test_CXXFLAGS=${CXXFLAGS+set}
21274ac_save_CXXFLAGS=$CXXFLAGS
21275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21276$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21277if ${ac_cv_prog_cxx_g+:} false; then :
21278  $as_echo_n "(cached) " >&6
21279else
21280  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21281   ac_cxx_werror_flag=yes
21282   ac_cv_prog_cxx_g=no
21283   CXXFLAGS="-g"
21284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21285/* end confdefs.h.  */
21286
21287int
21288main ()
21289{
21290
21291  ;
21292  return 0;
21293}
21294_ACEOF
21295if ac_fn_cxx_try_compile "$LINENO"; then :
21296  ac_cv_prog_cxx_g=yes
21297else
21298  CXXFLAGS=""
21299      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21300/* end confdefs.h.  */
21301
21302int
21303main ()
21304{
21305
21306  ;
21307  return 0;
21308}
21309_ACEOF
21310if ac_fn_cxx_try_compile "$LINENO"; then :
21311
21312else
21313  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21314	 CXXFLAGS="-g"
21315	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21316/* end confdefs.h.  */
21317
21318int
21319main ()
21320{
21321
21322  ;
21323  return 0;
21324}
21325_ACEOF
21326if ac_fn_cxx_try_compile "$LINENO"; then :
21327  ac_cv_prog_cxx_g=yes
21328fi
21329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21330fi
21331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21332fi
21333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21334   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21335fi
21336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21337$as_echo "$ac_cv_prog_cxx_g" >&6; }
21338if test "$ac_test_CXXFLAGS" = set; then
21339  CXXFLAGS=$ac_save_CXXFLAGS
21340elif test $ac_cv_prog_cxx_g = yes; then
21341  if test "$GXX" = yes; then
21342    CXXFLAGS="-g -O2"
21343  else
21344    CXXFLAGS="-g"
21345  fi
21346else
21347  if test "$GXX" = yes; then
21348    CXXFLAGS="-O2"
21349  else
21350    CXXFLAGS=
21351  fi
21352fi
21353ac_ext=cpp
21354ac_cpp='$CXXCPP $CPPFLAGS'
21355ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21356ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21357ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21358
21359
21360### Locate other tools
21361
21362if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21363    ac_ext=m
21364ac_cpp='$OBJCPP $CPPFLAGS'
21365ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21366ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21367ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21368if test -n "$ac_tool_prefix"; then
21369  for ac_prog in gcc objcc objc cc CC
21370  do
21371    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21372set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21374$as_echo_n "checking for $ac_word... " >&6; }
21375if ${ac_cv_prog_OBJC+:} false; then :
21376  $as_echo_n "(cached) " >&6
21377else
21378  if test -n "$OBJC"; then
21379  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21380else
21381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21382for as_dir in $PATH
21383do
21384  IFS=$as_save_IFS
21385  test -z "$as_dir" && as_dir=.
21386    for ac_exec_ext in '' $ac_executable_extensions; do
21387  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21388    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21390    break 2
21391  fi
21392done
21393  done
21394IFS=$as_save_IFS
21395
21396fi
21397fi
21398OBJC=$ac_cv_prog_OBJC
21399if test -n "$OBJC"; then
21400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21401$as_echo "$OBJC" >&6; }
21402else
21403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21404$as_echo "no" >&6; }
21405fi
21406
21407
21408    test -n "$OBJC" && break
21409  done
21410fi
21411if test -z "$OBJC"; then
21412  ac_ct_OBJC=$OBJC
21413  for ac_prog in gcc objcc objc cc CC
21414do
21415  # Extract the first word of "$ac_prog", so it can be a program name with args.
21416set dummy $ac_prog; ac_word=$2
21417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21418$as_echo_n "checking for $ac_word... " >&6; }
21419if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21420  $as_echo_n "(cached) " >&6
21421else
21422  if test -n "$ac_ct_OBJC"; then
21423  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21424else
21425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21426for as_dir in $PATH
21427do
21428  IFS=$as_save_IFS
21429  test -z "$as_dir" && as_dir=.
21430    for ac_exec_ext in '' $ac_executable_extensions; do
21431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21432    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21434    break 2
21435  fi
21436done
21437  done
21438IFS=$as_save_IFS
21439
21440fi
21441fi
21442ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21443if test -n "$ac_ct_OBJC"; then
21444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21445$as_echo "$ac_ct_OBJC" >&6; }
21446else
21447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21448$as_echo "no" >&6; }
21449fi
21450
21451
21452  test -n "$ac_ct_OBJC" && break
21453done
21454
21455  if test "x$ac_ct_OBJC" = x; then
21456    OBJC="gcc"
21457  else
21458    case $cross_compiling:$ac_tool_warned in
21459yes:)
21460{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21461$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21462ac_tool_warned=yes ;;
21463esac
21464    OBJC=$ac_ct_OBJC
21465  fi
21466fi
21467
21468# Provide some information about the compiler.
21469$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21470set X $ac_compile
21471ac_compiler=$2
21472for ac_option in --version -v -V -qversion; do
21473  { { ac_try="$ac_compiler $ac_option >&5"
21474case "(($ac_try" in
21475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21476  *) ac_try_echo=$ac_try;;
21477esac
21478eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21479$as_echo "$ac_try_echo"; } >&5
21480  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21481  ac_status=$?
21482  if test -s conftest.err; then
21483    sed '10a\
21484... rest of stderr output deleted ...
21485         10q' conftest.err >conftest.er1
21486    cat conftest.er1 >&5
21487  fi
21488  rm -f conftest.er1 conftest.err
21489  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21490  test $ac_status = 0; }
21491done
21492
21493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21494$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21495if ${ac_cv_objc_compiler_gnu+:} false; then :
21496  $as_echo_n "(cached) " >&6
21497else
21498  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21499/* end confdefs.h.  */
21500
21501int
21502main ()
21503{
21504#ifndef __GNUC__
21505       choke me
21506#endif
21507
21508  ;
21509  return 0;
21510}
21511_ACEOF
21512if ac_fn_objc_try_compile "$LINENO"; then :
21513  ac_compiler_gnu=yes
21514else
21515  ac_compiler_gnu=no
21516fi
21517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21518ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21519
21520fi
21521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21522$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21523if test $ac_compiler_gnu = yes; then
21524  GOBJC=yes
21525else
21526  GOBJC=
21527fi
21528ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21529ac_save_OBJCFLAGS=$OBJCFLAGS
21530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21531$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21532if ${ac_cv_prog_objc_g+:} false; then :
21533  $as_echo_n "(cached) " >&6
21534else
21535  ac_save_objc_werror_flag=$ac_objc_werror_flag
21536   ac_objc_werror_flag=yes
21537   ac_cv_prog_objc_g=no
21538   OBJCFLAGS="-g"
21539   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21540/* end confdefs.h.  */
21541
21542int
21543main ()
21544{
21545
21546  ;
21547  return 0;
21548}
21549_ACEOF
21550if ac_fn_objc_try_compile "$LINENO"; then :
21551  ac_cv_prog_objc_g=yes
21552else
21553  OBJCFLAGS=""
21554      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21555/* end confdefs.h.  */
21556
21557int
21558main ()
21559{
21560
21561  ;
21562  return 0;
21563}
21564_ACEOF
21565if ac_fn_objc_try_compile "$LINENO"; then :
21566
21567else
21568  ac_objc_werror_flag=$ac_save_objc_werror_flag
21569	 OBJCFLAGS="-g"
21570	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21571/* end confdefs.h.  */
21572
21573int
21574main ()
21575{
21576
21577  ;
21578  return 0;
21579}
21580_ACEOF
21581if ac_fn_objc_try_compile "$LINENO"; then :
21582  ac_cv_prog_objc_g=yes
21583fi
21584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21585fi
21586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21587fi
21588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21589   ac_objc_werror_flag=$ac_save_objc_werror_flag
21590fi
21591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21592$as_echo "$ac_cv_prog_objc_g" >&6; }
21593if test "$ac_test_OBJCFLAGS" = set; then
21594  OBJCFLAGS=$ac_save_OBJCFLAGS
21595elif test $ac_cv_prog_objc_g = yes; then
21596  if test "$GOBJC" = yes; then
21597    OBJCFLAGS="-g -O2"
21598  else
21599    OBJCFLAGS="-g"
21600  fi
21601else
21602  if test "$GOBJC" = yes; then
21603    OBJCFLAGS="-O2"
21604  else
21605    OBJCFLAGS=
21606  fi
21607fi
21608ac_ext=cpp
21609ac_cpp='$CXXCPP $CPPFLAGS'
21610ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21611ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21612ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21613
21614
21615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21616
21617  # First separate the path from the arguments. This will split at the first
21618  # space.
21619  complete="$OBJC"
21620  path="${complete%% *}"
21621  tmp="$complete EOL"
21622  arguments="${tmp#* }"
21623
21624  # Input might be given as Windows format, start by converting to
21625  # unix format.
21626  new_path=`$CYGPATH -u "$path"`
21627
21628  # Now try to locate executable using which
21629  new_path=`$WHICH "$new_path" 2> /dev/null`
21630  # bat and cmd files are not always considered executable in cygwin causing which
21631  # to not find them
21632  if test "x$new_path" = x \
21633           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21634           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21635    new_path=`$CYGPATH -u "$path"`
21636  fi
21637  if test "x$new_path" = x; then
21638    # Oops. Which didn't find the executable.
21639    # The splitting of arguments from the executable at a space might have been incorrect,
21640    # since paths with space are more likely in Windows. Give it another try with the whole
21641    # argument.
21642    path="$complete"
21643    arguments="EOL"
21644    new_path=`$CYGPATH -u "$path"`
21645    new_path=`$WHICH "$new_path" 2> /dev/null`
21646    # bat and cmd files are not always considered executable in cygwin causing which
21647    # to not find them
21648    if test "x$new_path" = x \
21649             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21650             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21651      new_path=`$CYGPATH -u "$path"`
21652    fi
21653    if test "x$new_path" = x; then
21654      # It's still not found. Now this is an unrecoverable error.
21655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21656$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21657      has_space=`$ECHO "$complete" | $GREP " "`
21658      if test "x$has_space" != x; then
21659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21661      fi
21662      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21663    fi
21664  fi
21665
21666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21669  # "foo.exe" is OK but "foo" is an error.
21670  #
21671  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21672  # It is also a way to make sure we got the proper file name for the real test later on.
21673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21674  if test "x$test_shortpath" = x; then
21675    # Short path failed, file does not exist as specified.
21676    # Try adding .exe or .cmd
21677    if test -f "${new_path}.exe"; then
21678       input_to_shortpath="${new_path}.exe"
21679    elif test -f "${new_path}.cmd"; then
21680       input_to_shortpath="${new_path}.cmd"
21681    else
21682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21683$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21684      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21685$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21686      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21687    fi
21688  else
21689    input_to_shortpath="$new_path"
21690  fi
21691
21692  # Call helper function which possibly converts this using DOS-style short mode.
21693  # If so, the updated path is stored in $new_path.
21694  new_path="$input_to_shortpath"
21695
21696  input_path="$input_to_shortpath"
21697  # Check if we need to convert this using DOS-style short mode. If the path
21698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21699  # take no chances and rewrite it.
21700  # Note: m4 eats our [], so we need to use [ and ] instead.
21701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21702  if test "x$has_forbidden_chars" != x; then
21703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21707      # Going to short mode and back again did indeed matter. Since short mode is
21708      # case insensitive, let's make it lowercase to improve readability.
21709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21710      # Now convert it back to Unix-stile (cygpath)
21711      input_path=`$CYGPATH -u "$shortmode_path"`
21712      new_path="$input_path"
21713    fi
21714  fi
21715
21716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21717  if test "x$test_cygdrive_prefix" = x; then
21718    # As a simple fix, exclude /usr/bin since it's not a real path.
21719    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21721      # a path prefixed by /cygdrive for fixpath to work.
21722      new_path="$CYGWIN_ROOT_PATH$input_path"
21723    fi
21724  fi
21725
21726  # remove trailing .exe if any
21727  new_path="${new_path/%.exe/}"
21728
21729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21730
21731  # First separate the path from the arguments. This will split at the first
21732  # space.
21733  complete="$OBJC"
21734  path="${complete%% *}"
21735  tmp="$complete EOL"
21736  arguments="${tmp#* }"
21737
21738  # Input might be given as Windows format, start by converting to
21739  # unix format.
21740  new_path="$path"
21741
21742  windows_path="$new_path"
21743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21744    unix_path=`$CYGPATH -u "$windows_path"`
21745    new_path="$unix_path"
21746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21748    new_path="$unix_path"
21749  fi
21750
21751
21752  # Now try to locate executable using which
21753  new_path=`$WHICH "$new_path" 2> /dev/null`
21754
21755  if test "x$new_path" = x; then
21756    # Oops. Which didn't find the executable.
21757    # The splitting of arguments from the executable at a space might have been incorrect,
21758    # since paths with space are more likely in Windows. Give it another try with the whole
21759    # argument.
21760    path="$complete"
21761    arguments="EOL"
21762    new_path="$path"
21763
21764  windows_path="$new_path"
21765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21766    unix_path=`$CYGPATH -u "$windows_path"`
21767    new_path="$unix_path"
21768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21770    new_path="$unix_path"
21771  fi
21772
21773
21774    new_path=`$WHICH "$new_path" 2> /dev/null`
21775
21776    if test "x$new_path" = x; then
21777      # It's still not found. Now this is an unrecoverable error.
21778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21779$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21780      has_space=`$ECHO "$complete" | $GREP " "`
21781      if test "x$has_space" != x; then
21782        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21783$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21784      fi
21785      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21786    fi
21787  fi
21788
21789  # Now new_path has a complete unix path to the binary
21790  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21791    # Keep paths in /bin as-is, but remove trailing .exe if any
21792    new_path="${new_path/%.exe/}"
21793    # Do not save /bin paths to all_fixpath_prefixes!
21794  else
21795    # Not in mixed or Windows style, start by that.
21796    new_path=`cmd //c echo $new_path`
21797
21798  input_path="$new_path"
21799  # Check if we need to convert this using DOS-style short mode. If the path
21800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21801  # take no chances and rewrite it.
21802  # Note: m4 eats our [], so we need to use [ and ] instead.
21803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21804  if test "x$has_forbidden_chars" != x; then
21805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21807  fi
21808
21809    # Output is in $new_path
21810
21811  windows_path="$new_path"
21812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21813    unix_path=`$CYGPATH -u "$windows_path"`
21814    new_path="$unix_path"
21815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21817    new_path="$unix_path"
21818  fi
21819
21820    # remove trailing .exe if any
21821    new_path="${new_path/%.exe/}"
21822
21823    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21824    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21825  fi
21826
21827  else
21828    # We're on a posix platform. Hooray! :)
21829    # First separate the path from the arguments. This will split at the first
21830    # space.
21831    complete="$OBJC"
21832    path="${complete%% *}"
21833    tmp="$complete EOL"
21834    arguments="${tmp#* }"
21835
21836    # Cannot rely on the command "which" here since it doesn't always work.
21837    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21838    if test -z "$is_absolute_path"; then
21839      # Path to executable is not absolute. Find it.
21840      IFS_save="$IFS"
21841      IFS=:
21842      for p in $PATH; do
21843        if test -f "$p/$path" && test -x "$p/$path"; then
21844          new_path="$p/$path"
21845          break
21846        fi
21847      done
21848      IFS="$IFS_save"
21849    else
21850      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21851$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21852      new_path="$path"
21853    fi
21854
21855    if test "x$new_path" = x; then
21856        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21857$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21858        has_space=`$ECHO "$complete" | $GREP " "`
21859        if test "x$has_space" != x; then
21860          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21861$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21862        fi
21863        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21864      fi
21865  fi
21866
21867      # Now join together the path and the arguments once again
21868      if test "x$arguments" != xEOL; then
21869        new_complete="$new_path ${arguments% *}"
21870      else
21871        new_complete="$new_path"
21872      fi
21873
21874  if test "x$complete" != "x$new_complete"; then
21875      OBJC="$new_complete"
21876      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21877$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21878    fi
21879
21880else
21881    OBJC=
21882fi
21883
21884# Restore the flags to the user specified values.
21885# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21886CFLAGS="$ORG_CFLAGS"
21887CXXFLAGS="$ORG_CXXFLAGS"
21888OBJCFLAGS="$ORG_OBJCFLAGS"
21889
21890LD="$CC"
21891LDEXE="$CC"
21892LDCXX="$CXX"
21893LDEXECXX="$CXX"
21894
21895# LDEXE is the linker to use, when creating executables.
21896
21897# Linking C++ libraries.
21898
21899# Linking C++ executables.
21900
21901
21902if test "x$OPENJDK_TARGET_OS" != xwindows; then
21903    if test -n "$ac_tool_prefix"; then
21904  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21905set dummy ${ac_tool_prefix}ar; ac_word=$2
21906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21907$as_echo_n "checking for $ac_word... " >&6; }
21908if ${ac_cv_prog_AR+:} false; then :
21909  $as_echo_n "(cached) " >&6
21910else
21911  if test -n "$AR"; then
21912  ac_cv_prog_AR="$AR" # Let the user override the test.
21913else
21914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21915for as_dir in $PATH
21916do
21917  IFS=$as_save_IFS
21918  test -z "$as_dir" && as_dir=.
21919    for ac_exec_ext in '' $ac_executable_extensions; do
21920  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21921    ac_cv_prog_AR="${ac_tool_prefix}ar"
21922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21923    break 2
21924  fi
21925done
21926  done
21927IFS=$as_save_IFS
21928
21929fi
21930fi
21931AR=$ac_cv_prog_AR
21932if test -n "$AR"; then
21933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21934$as_echo "$AR" >&6; }
21935else
21936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21937$as_echo "no" >&6; }
21938fi
21939
21940
21941fi
21942if test -z "$ac_cv_prog_AR"; then
21943  ac_ct_AR=$AR
21944  # Extract the first word of "ar", so it can be a program name with args.
21945set dummy ar; ac_word=$2
21946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21947$as_echo_n "checking for $ac_word... " >&6; }
21948if ${ac_cv_prog_ac_ct_AR+:} false; then :
21949  $as_echo_n "(cached) " >&6
21950else
21951  if test -n "$ac_ct_AR"; then
21952  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21953else
21954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21955for as_dir in $PATH
21956do
21957  IFS=$as_save_IFS
21958  test -z "$as_dir" && as_dir=.
21959    for ac_exec_ext in '' $ac_executable_extensions; do
21960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21961    ac_cv_prog_ac_ct_AR="ar"
21962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21963    break 2
21964  fi
21965done
21966  done
21967IFS=$as_save_IFS
21968
21969fi
21970fi
21971ac_ct_AR=$ac_cv_prog_ac_ct_AR
21972if test -n "$ac_ct_AR"; then
21973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21974$as_echo "$ac_ct_AR" >&6; }
21975else
21976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21977$as_echo "no" >&6; }
21978fi
21979
21980  if test "x$ac_ct_AR" = x; then
21981    AR=""
21982  else
21983    case $cross_compiling:$ac_tool_warned in
21984yes:)
21985{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21986$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21987ac_tool_warned=yes ;;
21988esac
21989    AR=$ac_ct_AR
21990  fi
21991else
21992  AR="$ac_cv_prog_AR"
21993fi
21994
21995
21996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21997
21998  # First separate the path from the arguments. This will split at the first
21999  # space.
22000  complete="$AR"
22001  path="${complete%% *}"
22002  tmp="$complete EOL"
22003  arguments="${tmp#* }"
22004
22005  # Input might be given as Windows format, start by converting to
22006  # unix format.
22007  new_path=`$CYGPATH -u "$path"`
22008
22009  # Now try to locate executable using which
22010  new_path=`$WHICH "$new_path" 2> /dev/null`
22011  # bat and cmd files are not always considered executable in cygwin causing which
22012  # to not find them
22013  if test "x$new_path" = x \
22014           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22015           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22016    new_path=`$CYGPATH -u "$path"`
22017  fi
22018  if test "x$new_path" = x; then
22019    # Oops. Which didn't find the executable.
22020    # The splitting of arguments from the executable at a space might have been incorrect,
22021    # since paths with space are more likely in Windows. Give it another try with the whole
22022    # argument.
22023    path="$complete"
22024    arguments="EOL"
22025    new_path=`$CYGPATH -u "$path"`
22026    new_path=`$WHICH "$new_path" 2> /dev/null`
22027    # bat and cmd files are not always considered executable in cygwin causing which
22028    # to not find them
22029    if test "x$new_path" = x \
22030             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22031             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22032      new_path=`$CYGPATH -u "$path"`
22033    fi
22034    if test "x$new_path" = x; then
22035      # It's still not found. Now this is an unrecoverable error.
22036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22037$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22038      has_space=`$ECHO "$complete" | $GREP " "`
22039      if test "x$has_space" != x; then
22040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22042      fi
22043      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22044    fi
22045  fi
22046
22047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22050  # "foo.exe" is OK but "foo" is an error.
22051  #
22052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22053  # It is also a way to make sure we got the proper file name for the real test later on.
22054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22055  if test "x$test_shortpath" = x; then
22056    # Short path failed, file does not exist as specified.
22057    # Try adding .exe or .cmd
22058    if test -f "${new_path}.exe"; then
22059       input_to_shortpath="${new_path}.exe"
22060    elif test -f "${new_path}.cmd"; then
22061       input_to_shortpath="${new_path}.cmd"
22062    else
22063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22064$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22067      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22068    fi
22069  else
22070    input_to_shortpath="$new_path"
22071  fi
22072
22073  # Call helper function which possibly converts this using DOS-style short mode.
22074  # If so, the updated path is stored in $new_path.
22075  new_path="$input_to_shortpath"
22076
22077  input_path="$input_to_shortpath"
22078  # Check if we need to convert this using DOS-style short mode. If the path
22079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22080  # take no chances and rewrite it.
22081  # Note: m4 eats our [], so we need to use [ and ] instead.
22082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22083  if test "x$has_forbidden_chars" != x; then
22084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22088      # Going to short mode and back again did indeed matter. Since short mode is
22089      # case insensitive, let's make it lowercase to improve readability.
22090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22091      # Now convert it back to Unix-stile (cygpath)
22092      input_path=`$CYGPATH -u "$shortmode_path"`
22093      new_path="$input_path"
22094    fi
22095  fi
22096
22097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22098  if test "x$test_cygdrive_prefix" = x; then
22099    # As a simple fix, exclude /usr/bin since it's not a real path.
22100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22102      # a path prefixed by /cygdrive for fixpath to work.
22103      new_path="$CYGWIN_ROOT_PATH$input_path"
22104    fi
22105  fi
22106
22107  # remove trailing .exe if any
22108  new_path="${new_path/%.exe/}"
22109
22110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22111
22112  # First separate the path from the arguments. This will split at the first
22113  # space.
22114  complete="$AR"
22115  path="${complete%% *}"
22116  tmp="$complete EOL"
22117  arguments="${tmp#* }"
22118
22119  # Input might be given as Windows format, start by converting to
22120  # unix format.
22121  new_path="$path"
22122
22123  windows_path="$new_path"
22124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22125    unix_path=`$CYGPATH -u "$windows_path"`
22126    new_path="$unix_path"
22127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22129    new_path="$unix_path"
22130  fi
22131
22132
22133  # Now try to locate executable using which
22134  new_path=`$WHICH "$new_path" 2> /dev/null`
22135
22136  if test "x$new_path" = x; then
22137    # Oops. Which didn't find the executable.
22138    # The splitting of arguments from the executable at a space might have been incorrect,
22139    # since paths with space are more likely in Windows. Give it another try with the whole
22140    # argument.
22141    path="$complete"
22142    arguments="EOL"
22143    new_path="$path"
22144
22145  windows_path="$new_path"
22146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22147    unix_path=`$CYGPATH -u "$windows_path"`
22148    new_path="$unix_path"
22149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22151    new_path="$unix_path"
22152  fi
22153
22154
22155    new_path=`$WHICH "$new_path" 2> /dev/null`
22156
22157    if test "x$new_path" = x; then
22158      # It's still not found. Now this is an unrecoverable error.
22159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22160$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22161      has_space=`$ECHO "$complete" | $GREP " "`
22162      if test "x$has_space" != x; then
22163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22165      fi
22166      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22167    fi
22168  fi
22169
22170  # Now new_path has a complete unix path to the binary
22171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22172    # Keep paths in /bin as-is, but remove trailing .exe if any
22173    new_path="${new_path/%.exe/}"
22174    # Do not save /bin paths to all_fixpath_prefixes!
22175  else
22176    # Not in mixed or Windows style, start by that.
22177    new_path=`cmd //c echo $new_path`
22178
22179  input_path="$new_path"
22180  # Check if we need to convert this using DOS-style short mode. If the path
22181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22182  # take no chances and rewrite it.
22183  # Note: m4 eats our [], so we need to use [ and ] instead.
22184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22185  if test "x$has_forbidden_chars" != x; then
22186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22188  fi
22189
22190    # Output is in $new_path
22191
22192  windows_path="$new_path"
22193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22194    unix_path=`$CYGPATH -u "$windows_path"`
22195    new_path="$unix_path"
22196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22198    new_path="$unix_path"
22199  fi
22200
22201    # remove trailing .exe if any
22202    new_path="${new_path/%.exe/}"
22203
22204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22206  fi
22207
22208  else
22209    # We're on a posix platform. Hooray! :)
22210    # First separate the path from the arguments. This will split at the first
22211    # space.
22212    complete="$AR"
22213    path="${complete%% *}"
22214    tmp="$complete EOL"
22215    arguments="${tmp#* }"
22216
22217    # Cannot rely on the command "which" here since it doesn't always work.
22218    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22219    if test -z "$is_absolute_path"; then
22220      # Path to executable is not absolute. Find it.
22221      IFS_save="$IFS"
22222      IFS=:
22223      for p in $PATH; do
22224        if test -f "$p/$path" && test -x "$p/$path"; then
22225          new_path="$p/$path"
22226          break
22227        fi
22228      done
22229      IFS="$IFS_save"
22230    else
22231      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22232$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22233      new_path="$path"
22234    fi
22235
22236    if test "x$new_path" = x; then
22237        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22238$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22239        has_space=`$ECHO "$complete" | $GREP " "`
22240        if test "x$has_space" != x; then
22241          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22242$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22243        fi
22244        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22245      fi
22246  fi
22247
22248      # Now join together the path and the arguments once again
22249      if test "x$arguments" != xEOL; then
22250        new_complete="$new_path ${arguments% *}"
22251      else
22252        new_complete="$new_path"
22253      fi
22254
22255  if test "x$complete" != "x$new_complete"; then
22256      AR="$new_complete"
22257      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22258$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22259    fi
22260
22261fi
22262if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22263    ARFLAGS="-r"
22264else
22265    ARFLAGS=""
22266fi
22267
22268
22269# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22270HOTSPOT_CXX="$CXX"
22271HOTSPOT_LD="$LD"
22272
22273
22274
22275COMPILER_NAME=gcc
22276COMPILER_TYPE=CC
22277if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22278
22279    # For now, assume that we are always compiling using cl.exe.
22280    CC_OUT_OPTION=-Fo
22281    EXE_OUT_OPTION=-out:
22282    LD_OUT_OPTION=-out:
22283    AR_OUT_OPTION=-out:
22284    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22285    # program for something completely different.
22286    # Extract the first word of "link", so it can be a program name with args.
22287set dummy link; ac_word=$2
22288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22289$as_echo_n "checking for $ac_word... " >&6; }
22290if ${ac_cv_prog_WINLD+:} false; then :
22291  $as_echo_n "(cached) " >&6
22292else
22293  if test -n "$WINLD"; then
22294  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22295else
22296  ac_prog_rejected=no
22297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22298for as_dir in $PATH
22299do
22300  IFS=$as_save_IFS
22301  test -z "$as_dir" && as_dir=.
22302    for ac_exec_ext in '' $ac_executable_extensions; do
22303  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22304    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22305       ac_prog_rejected=yes
22306       continue
22307     fi
22308    ac_cv_prog_WINLD="link"
22309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22310    break 2
22311  fi
22312done
22313  done
22314IFS=$as_save_IFS
22315
22316if test $ac_prog_rejected = yes; then
22317  # We found a bogon in the path, so make sure we never use it.
22318  set dummy $ac_cv_prog_WINLD
22319  shift
22320  if test $# != 0; then
22321    # We chose a different compiler from the bogus one.
22322    # However, it has the same basename, so the bogon will be chosen
22323    # first if we set WINLD to just the basename; use the full file name.
22324    shift
22325    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22326  fi
22327fi
22328fi
22329fi
22330WINLD=$ac_cv_prog_WINLD
22331if test -n "$WINLD"; then
22332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22333$as_echo "$WINLD" >&6; }
22334else
22335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22336$as_echo "no" >&6; }
22337fi
22338
22339
22340    # Since we must ignore the first found link, WINLD will contain
22341    # the full path to the link.exe program.
22342
22343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22344
22345  # First separate the path from the arguments. This will split at the first
22346  # space.
22347  complete="$WINLD"
22348  path="${complete%% *}"
22349  tmp="$complete EOL"
22350  arguments="${tmp#* }"
22351
22352  # Input might be given as Windows format, start by converting to
22353  # unix format.
22354  new_path=`$CYGPATH -u "$path"`
22355
22356  # Now try to locate executable using which
22357  new_path=`$WHICH "$new_path" 2> /dev/null`
22358  # bat and cmd files are not always considered executable in cygwin causing which
22359  # to not find them
22360  if test "x$new_path" = x \
22361           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22362           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22363    new_path=`$CYGPATH -u "$path"`
22364  fi
22365  if test "x$new_path" = x; then
22366    # Oops. Which didn't find the executable.
22367    # The splitting of arguments from the executable at a space might have been incorrect,
22368    # since paths with space are more likely in Windows. Give it another try with the whole
22369    # argument.
22370    path="$complete"
22371    arguments="EOL"
22372    new_path=`$CYGPATH -u "$path"`
22373    new_path=`$WHICH "$new_path" 2> /dev/null`
22374    # bat and cmd files are not always considered executable in cygwin causing which
22375    # to not find them
22376    if test "x$new_path" = x \
22377             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22378             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22379      new_path=`$CYGPATH -u "$path"`
22380    fi
22381    if test "x$new_path" = x; then
22382      # It's still not found. Now this is an unrecoverable error.
22383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22384$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22385      has_space=`$ECHO "$complete" | $GREP " "`
22386      if test "x$has_space" != x; then
22387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22389      fi
22390      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22391    fi
22392  fi
22393
22394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22397  # "foo.exe" is OK but "foo" is an error.
22398  #
22399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22400  # It is also a way to make sure we got the proper file name for the real test later on.
22401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22402  if test "x$test_shortpath" = x; then
22403    # Short path failed, file does not exist as specified.
22404    # Try adding .exe or .cmd
22405    if test -f "${new_path}.exe"; then
22406       input_to_shortpath="${new_path}.exe"
22407    elif test -f "${new_path}.cmd"; then
22408       input_to_shortpath="${new_path}.cmd"
22409    else
22410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22411$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22412      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22413$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22414      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22415    fi
22416  else
22417    input_to_shortpath="$new_path"
22418  fi
22419
22420  # Call helper function which possibly converts this using DOS-style short mode.
22421  # If so, the updated path is stored in $new_path.
22422  new_path="$input_to_shortpath"
22423
22424  input_path="$input_to_shortpath"
22425  # Check if we need to convert this using DOS-style short mode. If the path
22426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22427  # take no chances and rewrite it.
22428  # Note: m4 eats our [], so we need to use [ and ] instead.
22429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22430  if test "x$has_forbidden_chars" != x; then
22431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22435      # Going to short mode and back again did indeed matter. Since short mode is
22436      # case insensitive, let's make it lowercase to improve readability.
22437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22438      # Now convert it back to Unix-stile (cygpath)
22439      input_path=`$CYGPATH -u "$shortmode_path"`
22440      new_path="$input_path"
22441    fi
22442  fi
22443
22444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22445  if test "x$test_cygdrive_prefix" = x; then
22446    # As a simple fix, exclude /usr/bin since it's not a real path.
22447    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22449      # a path prefixed by /cygdrive for fixpath to work.
22450      new_path="$CYGWIN_ROOT_PATH$input_path"
22451    fi
22452  fi
22453
22454  # remove trailing .exe if any
22455  new_path="${new_path/%.exe/}"
22456
22457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22458
22459  # First separate the path from the arguments. This will split at the first
22460  # space.
22461  complete="$WINLD"
22462  path="${complete%% *}"
22463  tmp="$complete EOL"
22464  arguments="${tmp#* }"
22465
22466  # Input might be given as Windows format, start by converting to
22467  # unix format.
22468  new_path="$path"
22469
22470  windows_path="$new_path"
22471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22472    unix_path=`$CYGPATH -u "$windows_path"`
22473    new_path="$unix_path"
22474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22476    new_path="$unix_path"
22477  fi
22478
22479
22480  # Now try to locate executable using which
22481  new_path=`$WHICH "$new_path" 2> /dev/null`
22482
22483  if test "x$new_path" = x; then
22484    # Oops. Which didn't find the executable.
22485    # The splitting of arguments from the executable at a space might have been incorrect,
22486    # since paths with space are more likely in Windows. Give it another try with the whole
22487    # argument.
22488    path="$complete"
22489    arguments="EOL"
22490    new_path="$path"
22491
22492  windows_path="$new_path"
22493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22494    unix_path=`$CYGPATH -u "$windows_path"`
22495    new_path="$unix_path"
22496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22498    new_path="$unix_path"
22499  fi
22500
22501
22502    new_path=`$WHICH "$new_path" 2> /dev/null`
22503
22504    if test "x$new_path" = x; then
22505      # It's still not found. Now this is an unrecoverable error.
22506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22507$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22508      has_space=`$ECHO "$complete" | $GREP " "`
22509      if test "x$has_space" != x; then
22510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22512      fi
22513      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22514    fi
22515  fi
22516
22517  # Now new_path has a complete unix path to the binary
22518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22519    # Keep paths in /bin as-is, but remove trailing .exe if any
22520    new_path="${new_path/%.exe/}"
22521    # Do not save /bin paths to all_fixpath_prefixes!
22522  else
22523    # Not in mixed or Windows style, start by that.
22524    new_path=`cmd //c echo $new_path`
22525
22526  input_path="$new_path"
22527  # Check if we need to convert this using DOS-style short mode. If the path
22528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22529  # take no chances and rewrite it.
22530  # Note: m4 eats our [], so we need to use [ and ] instead.
22531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22532  if test "x$has_forbidden_chars" != x; then
22533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22535  fi
22536
22537    # Output is in $new_path
22538
22539  windows_path="$new_path"
22540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22541    unix_path=`$CYGPATH -u "$windows_path"`
22542    new_path="$unix_path"
22543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22545    new_path="$unix_path"
22546  fi
22547
22548    # remove trailing .exe if any
22549    new_path="${new_path/%.exe/}"
22550
22551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22553  fi
22554
22555  else
22556    # We're on a posix platform. Hooray! :)
22557    # First separate the path from the arguments. This will split at the first
22558    # space.
22559    complete="$WINLD"
22560    path="${complete%% *}"
22561    tmp="$complete EOL"
22562    arguments="${tmp#* }"
22563
22564    # Cannot rely on the command "which" here since it doesn't always work.
22565    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22566    if test -z "$is_absolute_path"; then
22567      # Path to executable is not absolute. Find it.
22568      IFS_save="$IFS"
22569      IFS=:
22570      for p in $PATH; do
22571        if test -f "$p/$path" && test -x "$p/$path"; then
22572          new_path="$p/$path"
22573          break
22574        fi
22575      done
22576      IFS="$IFS_save"
22577    else
22578      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22579$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22580      new_path="$path"
22581    fi
22582
22583    if test "x$new_path" = x; then
22584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22585$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22586        has_space=`$ECHO "$complete" | $GREP " "`
22587        if test "x$has_space" != x; then
22588          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22589$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22590        fi
22591        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22592      fi
22593  fi
22594
22595      # Now join together the path and the arguments once again
22596      if test "x$arguments" != xEOL; then
22597        new_complete="$new_path ${arguments% *}"
22598      else
22599        new_complete="$new_path"
22600      fi
22601
22602  if test "x$complete" != "x$new_complete"; then
22603      WINLD="$new_complete"
22604      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22605$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22606    fi
22607
22608    printf "Windows linker was found at $WINLD\n"
22609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22610$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22611    "$WINLD" --version > /dev/null
22612    if test $? -eq 0 ; then
22613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22614$as_echo "no" >&6; }
22615      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22616    else
22617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22618$as_echo "yes" >&6; }
22619    fi
22620    LD="$WINLD"
22621    LDEXE="$WINLD"
22622    LDCXX="$WINLD"
22623    LDEXECXX="$WINLD"
22624
22625    # Extract the first word of "mt", so it can be a program name with args.
22626set dummy mt; ac_word=$2
22627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22628$as_echo_n "checking for $ac_word... " >&6; }
22629if ${ac_cv_prog_MT+:} false; then :
22630  $as_echo_n "(cached) " >&6
22631else
22632  if test -n "$MT"; then
22633  ac_cv_prog_MT="$MT" # Let the user override the test.
22634else
22635  ac_prog_rejected=no
22636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22637for as_dir in $PATH
22638do
22639  IFS=$as_save_IFS
22640  test -z "$as_dir" && as_dir=.
22641    for ac_exec_ext in '' $ac_executable_extensions; do
22642  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22643    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22644       ac_prog_rejected=yes
22645       continue
22646     fi
22647    ac_cv_prog_MT="mt"
22648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22649    break 2
22650  fi
22651done
22652  done
22653IFS=$as_save_IFS
22654
22655if test $ac_prog_rejected = yes; then
22656  # We found a bogon in the path, so make sure we never use it.
22657  set dummy $ac_cv_prog_MT
22658  shift
22659  if test $# != 0; then
22660    # We chose a different compiler from the bogus one.
22661    # However, it has the same basename, so the bogon will be chosen
22662    # first if we set MT to just the basename; use the full file name.
22663    shift
22664    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22665  fi
22666fi
22667fi
22668fi
22669MT=$ac_cv_prog_MT
22670if test -n "$MT"; then
22671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22672$as_echo "$MT" >&6; }
22673else
22674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22675$as_echo "no" >&6; }
22676fi
22677
22678
22679
22680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22681
22682  # First separate the path from the arguments. This will split at the first
22683  # space.
22684  complete="$MT"
22685  path="${complete%% *}"
22686  tmp="$complete EOL"
22687  arguments="${tmp#* }"
22688
22689  # Input might be given as Windows format, start by converting to
22690  # unix format.
22691  new_path=`$CYGPATH -u "$path"`
22692
22693  # Now try to locate executable using which
22694  new_path=`$WHICH "$new_path" 2> /dev/null`
22695  # bat and cmd files are not always considered executable in cygwin causing which
22696  # to not find them
22697  if test "x$new_path" = x \
22698           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22699           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22700    new_path=`$CYGPATH -u "$path"`
22701  fi
22702  if test "x$new_path" = x; then
22703    # Oops. Which didn't find the executable.
22704    # The splitting of arguments from the executable at a space might have been incorrect,
22705    # since paths with space are more likely in Windows. Give it another try with the whole
22706    # argument.
22707    path="$complete"
22708    arguments="EOL"
22709    new_path=`$CYGPATH -u "$path"`
22710    new_path=`$WHICH "$new_path" 2> /dev/null`
22711    # bat and cmd files are not always considered executable in cygwin causing which
22712    # to not find them
22713    if test "x$new_path" = x \
22714             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22715             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22716      new_path=`$CYGPATH -u "$path"`
22717    fi
22718    if test "x$new_path" = x; then
22719      # It's still not found. Now this is an unrecoverable error.
22720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22721$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22722      has_space=`$ECHO "$complete" | $GREP " "`
22723      if test "x$has_space" != x; then
22724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22726      fi
22727      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22728    fi
22729  fi
22730
22731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22734  # "foo.exe" is OK but "foo" is an error.
22735  #
22736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22737  # It is also a way to make sure we got the proper file name for the real test later on.
22738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22739  if test "x$test_shortpath" = x; then
22740    # Short path failed, file does not exist as specified.
22741    # Try adding .exe or .cmd
22742    if test -f "${new_path}.exe"; then
22743       input_to_shortpath="${new_path}.exe"
22744    elif test -f "${new_path}.cmd"; then
22745       input_to_shortpath="${new_path}.cmd"
22746    else
22747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22748$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22749      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22750$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22751      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22752    fi
22753  else
22754    input_to_shortpath="$new_path"
22755  fi
22756
22757  # Call helper function which possibly converts this using DOS-style short mode.
22758  # If so, the updated path is stored in $new_path.
22759  new_path="$input_to_shortpath"
22760
22761  input_path="$input_to_shortpath"
22762  # Check if we need to convert this using DOS-style short mode. If the path
22763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22764  # take no chances and rewrite it.
22765  # Note: m4 eats our [], so we need to use [ and ] instead.
22766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22767  if test "x$has_forbidden_chars" != x; then
22768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22772      # Going to short mode and back again did indeed matter. Since short mode is
22773      # case insensitive, let's make it lowercase to improve readability.
22774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22775      # Now convert it back to Unix-stile (cygpath)
22776      input_path=`$CYGPATH -u "$shortmode_path"`
22777      new_path="$input_path"
22778    fi
22779  fi
22780
22781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22782  if test "x$test_cygdrive_prefix" = x; then
22783    # As a simple fix, exclude /usr/bin since it's not a real path.
22784    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22786      # a path prefixed by /cygdrive for fixpath to work.
22787      new_path="$CYGWIN_ROOT_PATH$input_path"
22788    fi
22789  fi
22790
22791  # remove trailing .exe if any
22792  new_path="${new_path/%.exe/}"
22793
22794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22795
22796  # First separate the path from the arguments. This will split at the first
22797  # space.
22798  complete="$MT"
22799  path="${complete%% *}"
22800  tmp="$complete EOL"
22801  arguments="${tmp#* }"
22802
22803  # Input might be given as Windows format, start by converting to
22804  # unix format.
22805  new_path="$path"
22806
22807  windows_path="$new_path"
22808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22809    unix_path=`$CYGPATH -u "$windows_path"`
22810    new_path="$unix_path"
22811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22813    new_path="$unix_path"
22814  fi
22815
22816
22817  # Now try to locate executable using which
22818  new_path=`$WHICH "$new_path" 2> /dev/null`
22819
22820  if test "x$new_path" = x; then
22821    # Oops. Which didn't find the executable.
22822    # The splitting of arguments from the executable at a space might have been incorrect,
22823    # since paths with space are more likely in Windows. Give it another try with the whole
22824    # argument.
22825    path="$complete"
22826    arguments="EOL"
22827    new_path="$path"
22828
22829  windows_path="$new_path"
22830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22831    unix_path=`$CYGPATH -u "$windows_path"`
22832    new_path="$unix_path"
22833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22835    new_path="$unix_path"
22836  fi
22837
22838
22839    new_path=`$WHICH "$new_path" 2> /dev/null`
22840
22841    if test "x$new_path" = x; then
22842      # It's still not found. Now this is an unrecoverable error.
22843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22844$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22845      has_space=`$ECHO "$complete" | $GREP " "`
22846      if test "x$has_space" != x; then
22847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22849      fi
22850      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22851    fi
22852  fi
22853
22854  # Now new_path has a complete unix path to the binary
22855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22856    # Keep paths in /bin as-is, but remove trailing .exe if any
22857    new_path="${new_path/%.exe/}"
22858    # Do not save /bin paths to all_fixpath_prefixes!
22859  else
22860    # Not in mixed or Windows style, start by that.
22861    new_path=`cmd //c echo $new_path`
22862
22863  input_path="$new_path"
22864  # Check if we need to convert this using DOS-style short mode. If the path
22865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22866  # take no chances and rewrite it.
22867  # Note: m4 eats our [], so we need to use [ and ] instead.
22868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22869  if test "x$has_forbidden_chars" != x; then
22870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22872  fi
22873
22874    # Output is in $new_path
22875
22876  windows_path="$new_path"
22877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22878    unix_path=`$CYGPATH -u "$windows_path"`
22879    new_path="$unix_path"
22880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22882    new_path="$unix_path"
22883  fi
22884
22885    # remove trailing .exe if any
22886    new_path="${new_path/%.exe/}"
22887
22888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22890  fi
22891
22892  else
22893    # We're on a posix platform. Hooray! :)
22894    # First separate the path from the arguments. This will split at the first
22895    # space.
22896    complete="$MT"
22897    path="${complete%% *}"
22898    tmp="$complete EOL"
22899    arguments="${tmp#* }"
22900
22901    # Cannot rely on the command "which" here since it doesn't always work.
22902    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22903    if test -z "$is_absolute_path"; then
22904      # Path to executable is not absolute. Find it.
22905      IFS_save="$IFS"
22906      IFS=:
22907      for p in $PATH; do
22908        if test -f "$p/$path" && test -x "$p/$path"; then
22909          new_path="$p/$path"
22910          break
22911        fi
22912      done
22913      IFS="$IFS_save"
22914    else
22915      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22916$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22917      new_path="$path"
22918    fi
22919
22920    if test "x$new_path" = x; then
22921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22922$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22923        has_space=`$ECHO "$complete" | $GREP " "`
22924        if test "x$has_space" != x; then
22925          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22926$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22927        fi
22928        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22929      fi
22930  fi
22931
22932      # Now join together the path and the arguments once again
22933      if test "x$arguments" != xEOL; then
22934        new_complete="$new_path ${arguments% *}"
22935      else
22936        new_complete="$new_path"
22937      fi
22938
22939  if test "x$complete" != "x$new_complete"; then
22940      MT="$new_complete"
22941      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22942$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22943    fi
22944
22945    # The resource compiler
22946    # Extract the first word of "rc", so it can be a program name with args.
22947set dummy rc; ac_word=$2
22948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22949$as_echo_n "checking for $ac_word... " >&6; }
22950if ${ac_cv_prog_RC+:} false; then :
22951  $as_echo_n "(cached) " >&6
22952else
22953  if test -n "$RC"; then
22954  ac_cv_prog_RC="$RC" # Let the user override the test.
22955else
22956  ac_prog_rejected=no
22957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22958for as_dir in $PATH
22959do
22960  IFS=$as_save_IFS
22961  test -z "$as_dir" && as_dir=.
22962    for ac_exec_ext in '' $ac_executable_extensions; do
22963  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22964    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22965       ac_prog_rejected=yes
22966       continue
22967     fi
22968    ac_cv_prog_RC="rc"
22969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22970    break 2
22971  fi
22972done
22973  done
22974IFS=$as_save_IFS
22975
22976if test $ac_prog_rejected = yes; then
22977  # We found a bogon in the path, so make sure we never use it.
22978  set dummy $ac_cv_prog_RC
22979  shift
22980  if test $# != 0; then
22981    # We chose a different compiler from the bogus one.
22982    # However, it has the same basename, so the bogon will be chosen
22983    # first if we set RC to just the basename; use the full file name.
22984    shift
22985    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22986  fi
22987fi
22988fi
22989fi
22990RC=$ac_cv_prog_RC
22991if test -n "$RC"; then
22992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22993$as_echo "$RC" >&6; }
22994else
22995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22996$as_echo "no" >&6; }
22997fi
22998
22999
23000
23001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23002
23003  # First separate the path from the arguments. This will split at the first
23004  # space.
23005  complete="$RC"
23006  path="${complete%% *}"
23007  tmp="$complete EOL"
23008  arguments="${tmp#* }"
23009
23010  # Input might be given as Windows format, start by converting to
23011  # unix format.
23012  new_path=`$CYGPATH -u "$path"`
23013
23014  # Now try to locate executable using which
23015  new_path=`$WHICH "$new_path" 2> /dev/null`
23016  # bat and cmd files are not always considered executable in cygwin causing which
23017  # to not find them
23018  if test "x$new_path" = x \
23019           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23020           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23021    new_path=`$CYGPATH -u "$path"`
23022  fi
23023  if test "x$new_path" = x; then
23024    # Oops. Which didn't find the executable.
23025    # The splitting of arguments from the executable at a space might have been incorrect,
23026    # since paths with space are more likely in Windows. Give it another try with the whole
23027    # argument.
23028    path="$complete"
23029    arguments="EOL"
23030    new_path=`$CYGPATH -u "$path"`
23031    new_path=`$WHICH "$new_path" 2> /dev/null`
23032    # bat and cmd files are not always considered executable in cygwin causing which
23033    # to not find them
23034    if test "x$new_path" = x \
23035             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23036             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23037      new_path=`$CYGPATH -u "$path"`
23038    fi
23039    if test "x$new_path" = x; then
23040      # It's still not found. Now this is an unrecoverable error.
23041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23042$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23043      has_space=`$ECHO "$complete" | $GREP " "`
23044      if test "x$has_space" != x; then
23045        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23046$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23047      fi
23048      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23049    fi
23050  fi
23051
23052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23055  # "foo.exe" is OK but "foo" is an error.
23056  #
23057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23058  # It is also a way to make sure we got the proper file name for the real test later on.
23059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23060  if test "x$test_shortpath" = x; then
23061    # Short path failed, file does not exist as specified.
23062    # Try adding .exe or .cmd
23063    if test -f "${new_path}.exe"; then
23064       input_to_shortpath="${new_path}.exe"
23065    elif test -f "${new_path}.cmd"; then
23066       input_to_shortpath="${new_path}.cmd"
23067    else
23068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23069$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23070      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23071$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23072      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23073    fi
23074  else
23075    input_to_shortpath="$new_path"
23076  fi
23077
23078  # Call helper function which possibly converts this using DOS-style short mode.
23079  # If so, the updated path is stored in $new_path.
23080  new_path="$input_to_shortpath"
23081
23082  input_path="$input_to_shortpath"
23083  # Check if we need to convert this using DOS-style short mode. If the path
23084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23085  # take no chances and rewrite it.
23086  # Note: m4 eats our [], so we need to use [ and ] instead.
23087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23088  if test "x$has_forbidden_chars" != x; then
23089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23093      # Going to short mode and back again did indeed matter. Since short mode is
23094      # case insensitive, let's make it lowercase to improve readability.
23095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23096      # Now convert it back to Unix-stile (cygpath)
23097      input_path=`$CYGPATH -u "$shortmode_path"`
23098      new_path="$input_path"
23099    fi
23100  fi
23101
23102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23103  if test "x$test_cygdrive_prefix" = x; then
23104    # As a simple fix, exclude /usr/bin since it's not a real path.
23105    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23107      # a path prefixed by /cygdrive for fixpath to work.
23108      new_path="$CYGWIN_ROOT_PATH$input_path"
23109    fi
23110  fi
23111
23112  # remove trailing .exe if any
23113  new_path="${new_path/%.exe/}"
23114
23115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23116
23117  # First separate the path from the arguments. This will split at the first
23118  # space.
23119  complete="$RC"
23120  path="${complete%% *}"
23121  tmp="$complete EOL"
23122  arguments="${tmp#* }"
23123
23124  # Input might be given as Windows format, start by converting to
23125  # unix format.
23126  new_path="$path"
23127
23128  windows_path="$new_path"
23129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23130    unix_path=`$CYGPATH -u "$windows_path"`
23131    new_path="$unix_path"
23132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23134    new_path="$unix_path"
23135  fi
23136
23137
23138  # Now try to locate executable using which
23139  new_path=`$WHICH "$new_path" 2> /dev/null`
23140
23141  if test "x$new_path" = x; then
23142    # Oops. Which didn't find the executable.
23143    # The splitting of arguments from the executable at a space might have been incorrect,
23144    # since paths with space are more likely in Windows. Give it another try with the whole
23145    # argument.
23146    path="$complete"
23147    arguments="EOL"
23148    new_path="$path"
23149
23150  windows_path="$new_path"
23151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23152    unix_path=`$CYGPATH -u "$windows_path"`
23153    new_path="$unix_path"
23154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23156    new_path="$unix_path"
23157  fi
23158
23159
23160    new_path=`$WHICH "$new_path" 2> /dev/null`
23161
23162    if test "x$new_path" = x; then
23163      # It's still not found. Now this is an unrecoverable error.
23164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23165$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23166      has_space=`$ECHO "$complete" | $GREP " "`
23167      if test "x$has_space" != x; then
23168        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23169$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23170      fi
23171      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23172    fi
23173  fi
23174
23175  # Now new_path has a complete unix path to the binary
23176  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23177    # Keep paths in /bin as-is, but remove trailing .exe if any
23178    new_path="${new_path/%.exe/}"
23179    # Do not save /bin paths to all_fixpath_prefixes!
23180  else
23181    # Not in mixed or Windows style, start by that.
23182    new_path=`cmd //c echo $new_path`
23183
23184  input_path="$new_path"
23185  # Check if we need to convert this using DOS-style short mode. If the path
23186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23187  # take no chances and rewrite it.
23188  # Note: m4 eats our [], so we need to use [ and ] instead.
23189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23190  if test "x$has_forbidden_chars" != x; then
23191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23193  fi
23194
23195    # Output is in $new_path
23196
23197  windows_path="$new_path"
23198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23199    unix_path=`$CYGPATH -u "$windows_path"`
23200    new_path="$unix_path"
23201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23203    new_path="$unix_path"
23204  fi
23205
23206    # remove trailing .exe if any
23207    new_path="${new_path/%.exe/}"
23208
23209    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23210    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23211  fi
23212
23213  else
23214    # We're on a posix platform. Hooray! :)
23215    # First separate the path from the arguments. This will split at the first
23216    # space.
23217    complete="$RC"
23218    path="${complete%% *}"
23219    tmp="$complete EOL"
23220    arguments="${tmp#* }"
23221
23222    # Cannot rely on the command "which" here since it doesn't always work.
23223    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23224    if test -z "$is_absolute_path"; then
23225      # Path to executable is not absolute. Find it.
23226      IFS_save="$IFS"
23227      IFS=:
23228      for p in $PATH; do
23229        if test -f "$p/$path" && test -x "$p/$path"; then
23230          new_path="$p/$path"
23231          break
23232        fi
23233      done
23234      IFS="$IFS_save"
23235    else
23236      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23237$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23238      new_path="$path"
23239    fi
23240
23241    if test "x$new_path" = x; then
23242        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23243$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23244        has_space=`$ECHO "$complete" | $GREP " "`
23245        if test "x$has_space" != x; then
23246          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23247$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23248        fi
23249        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23250      fi
23251  fi
23252
23253      # Now join together the path and the arguments once again
23254      if test "x$arguments" != xEOL; then
23255        new_complete="$new_path ${arguments% *}"
23256      else
23257        new_complete="$new_path"
23258      fi
23259
23260  if test "x$complete" != "x$new_complete"; then
23261      RC="$new_complete"
23262      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23263$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23264    fi
23265
23266
23267    # For hotspot, we need these in Windows mixed path,
23268    # so rewrite them all. Need added .exe suffix.
23269    HOTSPOT_CXX="$CXX.exe"
23270    HOTSPOT_LD="$LD.exe"
23271    HOTSPOT_MT="$MT.exe"
23272    HOTSPOT_RC="$RC.exe"
23273
23274  unix_path="$HOTSPOT_CXX"
23275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23276    windows_path=`$CYGPATH -m "$unix_path"`
23277    HOTSPOT_CXX="$windows_path"
23278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23279    windows_path=`cmd //c echo $unix_path`
23280    HOTSPOT_CXX="$windows_path"
23281  fi
23282
23283
23284  unix_path="$HOTSPOT_LD"
23285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23286    windows_path=`$CYGPATH -m "$unix_path"`
23287    HOTSPOT_LD="$windows_path"
23288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23289    windows_path=`cmd //c echo $unix_path`
23290    HOTSPOT_LD="$windows_path"
23291  fi
23292
23293
23294  unix_path="$HOTSPOT_MT"
23295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23296    windows_path=`$CYGPATH -m "$unix_path"`
23297    HOTSPOT_MT="$windows_path"
23298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23299    windows_path=`cmd //c echo $unix_path`
23300    HOTSPOT_MT="$windows_path"
23301  fi
23302
23303
23304  unix_path="$HOTSPOT_RC"
23305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23306    windows_path=`$CYGPATH -m "$unix_path"`
23307    HOTSPOT_RC="$windows_path"
23308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23309    windows_path=`cmd //c echo $unix_path`
23310    HOTSPOT_RC="$windows_path"
23311  fi
23312
23313
23314
23315
23316    RC_FLAGS="-nologo -l 0x409 -r"
23317    if test "x$VARIANT" = xOPT; then :
23318
23319        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23320
23321fi
23322    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23323    if test "x$JDK_UPDATE_VERSION" = x; then :
23324
23325        JDK_UPDATE_VERSION_NOTNULL=0
23326
23327fi
23328    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23329    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23330    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23331    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23332    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23333    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23334    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23335
23336    # lib.exe is used to create static libraries.
23337    # Extract the first word of "lib", so it can be a program name with args.
23338set dummy lib; ac_word=$2
23339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23340$as_echo_n "checking for $ac_word... " >&6; }
23341if ${ac_cv_prog_WINAR+:} false; then :
23342  $as_echo_n "(cached) " >&6
23343else
23344  if test -n "$WINAR"; then
23345  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23346else
23347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23348for as_dir in $PATH
23349do
23350  IFS=$as_save_IFS
23351  test -z "$as_dir" && as_dir=.
23352    for ac_exec_ext in '' $ac_executable_extensions; do
23353  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23354    ac_cv_prog_WINAR="lib"
23355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23356    break 2
23357  fi
23358done
23359  done
23360IFS=$as_save_IFS
23361
23362fi
23363fi
23364WINAR=$ac_cv_prog_WINAR
23365if test -n "$WINAR"; then
23366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23367$as_echo "$WINAR" >&6; }
23368else
23369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23370$as_echo "no" >&6; }
23371fi
23372
23373
23374
23375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23376
23377  # First separate the path from the arguments. This will split at the first
23378  # space.
23379  complete="$WINAR"
23380  path="${complete%% *}"
23381  tmp="$complete EOL"
23382  arguments="${tmp#* }"
23383
23384  # Input might be given as Windows format, start by converting to
23385  # unix format.
23386  new_path=`$CYGPATH -u "$path"`
23387
23388  # Now try to locate executable using which
23389  new_path=`$WHICH "$new_path" 2> /dev/null`
23390  # bat and cmd files are not always considered executable in cygwin causing which
23391  # to not find them
23392  if test "x$new_path" = x \
23393           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23394           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23395    new_path=`$CYGPATH -u "$path"`
23396  fi
23397  if test "x$new_path" = x; then
23398    # Oops. Which didn't find the executable.
23399    # The splitting of arguments from the executable at a space might have been incorrect,
23400    # since paths with space are more likely in Windows. Give it another try with the whole
23401    # argument.
23402    path="$complete"
23403    arguments="EOL"
23404    new_path=`$CYGPATH -u "$path"`
23405    new_path=`$WHICH "$new_path" 2> /dev/null`
23406    # bat and cmd files are not always considered executable in cygwin causing which
23407    # to not find them
23408    if test "x$new_path" = x \
23409             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23410             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23411      new_path=`$CYGPATH -u "$path"`
23412    fi
23413    if test "x$new_path" = x; then
23414      # It's still not found. Now this is an unrecoverable error.
23415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23416$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23417      has_space=`$ECHO "$complete" | $GREP " "`
23418      if test "x$has_space" != x; then
23419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23421      fi
23422      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23423    fi
23424  fi
23425
23426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23429  # "foo.exe" is OK but "foo" is an error.
23430  #
23431  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23432  # It is also a way to make sure we got the proper file name for the real test later on.
23433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23434  if test "x$test_shortpath" = x; then
23435    # Short path failed, file does not exist as specified.
23436    # Try adding .exe or .cmd
23437    if test -f "${new_path}.exe"; then
23438       input_to_shortpath="${new_path}.exe"
23439    elif test -f "${new_path}.cmd"; then
23440       input_to_shortpath="${new_path}.cmd"
23441    else
23442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23443$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23444      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23445$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23446      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23447    fi
23448  else
23449    input_to_shortpath="$new_path"
23450  fi
23451
23452  # Call helper function which possibly converts this using DOS-style short mode.
23453  # If so, the updated path is stored in $new_path.
23454  new_path="$input_to_shortpath"
23455
23456  input_path="$input_to_shortpath"
23457  # Check if we need to convert this using DOS-style short mode. If the path
23458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23459  # take no chances and rewrite it.
23460  # Note: m4 eats our [], so we need to use [ and ] instead.
23461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23462  if test "x$has_forbidden_chars" != x; then
23463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23467      # Going to short mode and back again did indeed matter. Since short mode is
23468      # case insensitive, let's make it lowercase to improve readability.
23469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23470      # Now convert it back to Unix-stile (cygpath)
23471      input_path=`$CYGPATH -u "$shortmode_path"`
23472      new_path="$input_path"
23473    fi
23474  fi
23475
23476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23477  if test "x$test_cygdrive_prefix" = x; then
23478    # As a simple fix, exclude /usr/bin since it's not a real path.
23479    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23481      # a path prefixed by /cygdrive for fixpath to work.
23482      new_path="$CYGWIN_ROOT_PATH$input_path"
23483    fi
23484  fi
23485
23486  # remove trailing .exe if any
23487  new_path="${new_path/%.exe/}"
23488
23489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23490
23491  # First separate the path from the arguments. This will split at the first
23492  # space.
23493  complete="$WINAR"
23494  path="${complete%% *}"
23495  tmp="$complete EOL"
23496  arguments="${tmp#* }"
23497
23498  # Input might be given as Windows format, start by converting to
23499  # unix format.
23500  new_path="$path"
23501
23502  windows_path="$new_path"
23503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23504    unix_path=`$CYGPATH -u "$windows_path"`
23505    new_path="$unix_path"
23506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23508    new_path="$unix_path"
23509  fi
23510
23511
23512  # Now try to locate executable using which
23513  new_path=`$WHICH "$new_path" 2> /dev/null`
23514
23515  if test "x$new_path" = x; then
23516    # Oops. Which didn't find the executable.
23517    # The splitting of arguments from the executable at a space might have been incorrect,
23518    # since paths with space are more likely in Windows. Give it another try with the whole
23519    # argument.
23520    path="$complete"
23521    arguments="EOL"
23522    new_path="$path"
23523
23524  windows_path="$new_path"
23525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23526    unix_path=`$CYGPATH -u "$windows_path"`
23527    new_path="$unix_path"
23528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23530    new_path="$unix_path"
23531  fi
23532
23533
23534    new_path=`$WHICH "$new_path" 2> /dev/null`
23535
23536    if test "x$new_path" = x; then
23537      # It's still not found. Now this is an unrecoverable error.
23538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23539$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23540      has_space=`$ECHO "$complete" | $GREP " "`
23541      if test "x$has_space" != x; then
23542        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23543$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23544      fi
23545      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23546    fi
23547  fi
23548
23549  # Now new_path has a complete unix path to the binary
23550  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23551    # Keep paths in /bin as-is, but remove trailing .exe if any
23552    new_path="${new_path/%.exe/}"
23553    # Do not save /bin paths to all_fixpath_prefixes!
23554  else
23555    # Not in mixed or Windows style, start by that.
23556    new_path=`cmd //c echo $new_path`
23557
23558  input_path="$new_path"
23559  # Check if we need to convert this using DOS-style short mode. If the path
23560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23561  # take no chances and rewrite it.
23562  # Note: m4 eats our [], so we need to use [ and ] instead.
23563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23564  if test "x$has_forbidden_chars" != x; then
23565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23566    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23567  fi
23568
23569    # Output is in $new_path
23570
23571  windows_path="$new_path"
23572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23573    unix_path=`$CYGPATH -u "$windows_path"`
23574    new_path="$unix_path"
23575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23577    new_path="$unix_path"
23578  fi
23579
23580    # remove trailing .exe if any
23581    new_path="${new_path/%.exe/}"
23582
23583    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23584    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23585  fi
23586
23587  else
23588    # We're on a posix platform. Hooray! :)
23589    # First separate the path from the arguments. This will split at the first
23590    # space.
23591    complete="$WINAR"
23592    path="${complete%% *}"
23593    tmp="$complete EOL"
23594    arguments="${tmp#* }"
23595
23596    # Cannot rely on the command "which" here since it doesn't always work.
23597    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23598    if test -z "$is_absolute_path"; then
23599      # Path to executable is not absolute. Find it.
23600      IFS_save="$IFS"
23601      IFS=:
23602      for p in $PATH; do
23603        if test -f "$p/$path" && test -x "$p/$path"; then
23604          new_path="$p/$path"
23605          break
23606        fi
23607      done
23608      IFS="$IFS_save"
23609    else
23610      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23611$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23612      new_path="$path"
23613    fi
23614
23615    if test "x$new_path" = x; then
23616        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23617$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23618        has_space=`$ECHO "$complete" | $GREP " "`
23619        if test "x$has_space" != x; then
23620          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23621$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23622        fi
23623        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23624      fi
23625  fi
23626
23627      # Now join together the path and the arguments once again
23628      if test "x$arguments" != xEOL; then
23629        new_complete="$new_path ${arguments% *}"
23630      else
23631        new_complete="$new_path"
23632      fi
23633
23634  if test "x$complete" != "x$new_complete"; then
23635      WINAR="$new_complete"
23636      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23637$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23638    fi
23639
23640    AR="$WINAR"
23641    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23642
23643    # Extract the first word of "dumpbin", so it can be a program name with args.
23644set dummy dumpbin; ac_word=$2
23645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23646$as_echo_n "checking for $ac_word... " >&6; }
23647if ${ac_cv_prog_DUMPBIN+:} false; then :
23648  $as_echo_n "(cached) " >&6
23649else
23650  if test -n "$DUMPBIN"; then
23651  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23652else
23653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23654for as_dir in $PATH
23655do
23656  IFS=$as_save_IFS
23657  test -z "$as_dir" && as_dir=.
23658    for ac_exec_ext in '' $ac_executable_extensions; do
23659  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23660    ac_cv_prog_DUMPBIN="dumpbin"
23661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23662    break 2
23663  fi
23664done
23665  done
23666IFS=$as_save_IFS
23667
23668fi
23669fi
23670DUMPBIN=$ac_cv_prog_DUMPBIN
23671if test -n "$DUMPBIN"; then
23672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23673$as_echo "$DUMPBIN" >&6; }
23674else
23675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23676$as_echo "no" >&6; }
23677fi
23678
23679
23680
23681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23682
23683  # First separate the path from the arguments. This will split at the first
23684  # space.
23685  complete="$DUMPBIN"
23686  path="${complete%% *}"
23687  tmp="$complete EOL"
23688  arguments="${tmp#* }"
23689
23690  # Input might be given as Windows format, start by converting to
23691  # unix format.
23692  new_path=`$CYGPATH -u "$path"`
23693
23694  # Now try to locate executable using which
23695  new_path=`$WHICH "$new_path" 2> /dev/null`
23696  # bat and cmd files are not always considered executable in cygwin causing which
23697  # to not find them
23698  if test "x$new_path" = x \
23699           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23700           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23701    new_path=`$CYGPATH -u "$path"`
23702  fi
23703  if test "x$new_path" = x; then
23704    # Oops. Which didn't find the executable.
23705    # The splitting of arguments from the executable at a space might have been incorrect,
23706    # since paths with space are more likely in Windows. Give it another try with the whole
23707    # argument.
23708    path="$complete"
23709    arguments="EOL"
23710    new_path=`$CYGPATH -u "$path"`
23711    new_path=`$WHICH "$new_path" 2> /dev/null`
23712    # bat and cmd files are not always considered executable in cygwin causing which
23713    # to not find them
23714    if test "x$new_path" = x \
23715             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23716             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23717      new_path=`$CYGPATH -u "$path"`
23718    fi
23719    if test "x$new_path" = x; then
23720      # It's still not found. Now this is an unrecoverable error.
23721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23722$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23723      has_space=`$ECHO "$complete" | $GREP " "`
23724      if test "x$has_space" != x; then
23725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23727      fi
23728      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23729    fi
23730  fi
23731
23732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23735  # "foo.exe" is OK but "foo" is an error.
23736  #
23737  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23738  # It is also a way to make sure we got the proper file name for the real test later on.
23739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23740  if test "x$test_shortpath" = x; then
23741    # Short path failed, file does not exist as specified.
23742    # Try adding .exe or .cmd
23743    if test -f "${new_path}.exe"; then
23744       input_to_shortpath="${new_path}.exe"
23745    elif test -f "${new_path}.cmd"; then
23746       input_to_shortpath="${new_path}.cmd"
23747    else
23748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23749$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23750      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23751$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23752      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23753    fi
23754  else
23755    input_to_shortpath="$new_path"
23756  fi
23757
23758  # Call helper function which possibly converts this using DOS-style short mode.
23759  # If so, the updated path is stored in $new_path.
23760  new_path="$input_to_shortpath"
23761
23762  input_path="$input_to_shortpath"
23763  # Check if we need to convert this using DOS-style short mode. If the path
23764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23765  # take no chances and rewrite it.
23766  # Note: m4 eats our [], so we need to use [ and ] instead.
23767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23768  if test "x$has_forbidden_chars" != x; then
23769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23773      # Going to short mode and back again did indeed matter. Since short mode is
23774      # case insensitive, let's make it lowercase to improve readability.
23775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23776      # Now convert it back to Unix-stile (cygpath)
23777      input_path=`$CYGPATH -u "$shortmode_path"`
23778      new_path="$input_path"
23779    fi
23780  fi
23781
23782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23783  if test "x$test_cygdrive_prefix" = x; then
23784    # As a simple fix, exclude /usr/bin since it's not a real path.
23785    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23787      # a path prefixed by /cygdrive for fixpath to work.
23788      new_path="$CYGWIN_ROOT_PATH$input_path"
23789    fi
23790  fi
23791
23792  # remove trailing .exe if any
23793  new_path="${new_path/%.exe/}"
23794
23795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23796
23797  # First separate the path from the arguments. This will split at the first
23798  # space.
23799  complete="$DUMPBIN"
23800  path="${complete%% *}"
23801  tmp="$complete EOL"
23802  arguments="${tmp#* }"
23803
23804  # Input might be given as Windows format, start by converting to
23805  # unix format.
23806  new_path="$path"
23807
23808  windows_path="$new_path"
23809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23810    unix_path=`$CYGPATH -u "$windows_path"`
23811    new_path="$unix_path"
23812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23814    new_path="$unix_path"
23815  fi
23816
23817
23818  # Now try to locate executable using which
23819  new_path=`$WHICH "$new_path" 2> /dev/null`
23820
23821  if test "x$new_path" = x; then
23822    # Oops. Which didn't find the executable.
23823    # The splitting of arguments from the executable at a space might have been incorrect,
23824    # since paths with space are more likely in Windows. Give it another try with the whole
23825    # argument.
23826    path="$complete"
23827    arguments="EOL"
23828    new_path="$path"
23829
23830  windows_path="$new_path"
23831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23832    unix_path=`$CYGPATH -u "$windows_path"`
23833    new_path="$unix_path"
23834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23836    new_path="$unix_path"
23837  fi
23838
23839
23840    new_path=`$WHICH "$new_path" 2> /dev/null`
23841
23842    if test "x$new_path" = x; then
23843      # It's still not found. Now this is an unrecoverable error.
23844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23845$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23846      has_space=`$ECHO "$complete" | $GREP " "`
23847      if test "x$has_space" != x; then
23848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23850      fi
23851      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23852    fi
23853  fi
23854
23855  # Now new_path has a complete unix path to the binary
23856  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23857    # Keep paths in /bin as-is, but remove trailing .exe if any
23858    new_path="${new_path/%.exe/}"
23859    # Do not save /bin paths to all_fixpath_prefixes!
23860  else
23861    # Not in mixed or Windows style, start by that.
23862    new_path=`cmd //c echo $new_path`
23863
23864  input_path="$new_path"
23865  # Check if we need to convert this using DOS-style short mode. If the path
23866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23867  # take no chances and rewrite it.
23868  # Note: m4 eats our [], so we need to use [ and ] instead.
23869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23870  if test "x$has_forbidden_chars" != x; then
23871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23873  fi
23874
23875    # Output is in $new_path
23876
23877  windows_path="$new_path"
23878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23879    unix_path=`$CYGPATH -u "$windows_path"`
23880    new_path="$unix_path"
23881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23883    new_path="$unix_path"
23884  fi
23885
23886    # remove trailing .exe if any
23887    new_path="${new_path/%.exe/}"
23888
23889    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23890    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23891  fi
23892
23893  else
23894    # We're on a posix platform. Hooray! :)
23895    # First separate the path from the arguments. This will split at the first
23896    # space.
23897    complete="$DUMPBIN"
23898    path="${complete%% *}"
23899    tmp="$complete EOL"
23900    arguments="${tmp#* }"
23901
23902    # Cannot rely on the command "which" here since it doesn't always work.
23903    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23904    if test -z "$is_absolute_path"; then
23905      # Path to executable is not absolute. Find it.
23906      IFS_save="$IFS"
23907      IFS=:
23908      for p in $PATH; do
23909        if test -f "$p/$path" && test -x "$p/$path"; then
23910          new_path="$p/$path"
23911          break
23912        fi
23913      done
23914      IFS="$IFS_save"
23915    else
23916      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23917$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23918      new_path="$path"
23919    fi
23920
23921    if test "x$new_path" = x; then
23922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23923$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23924        has_space=`$ECHO "$complete" | $GREP " "`
23925        if test "x$has_space" != x; then
23926          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23927$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23928        fi
23929        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23930      fi
23931  fi
23932
23933      # Now join together the path and the arguments once again
23934      if test "x$arguments" != xEOL; then
23935        new_complete="$new_path ${arguments% *}"
23936      else
23937        new_complete="$new_path"
23938      fi
23939
23940  if test "x$complete" != "x$new_complete"; then
23941      DUMPBIN="$new_complete"
23942      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23943$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23944    fi
23945
23946
23947    COMPILER_TYPE=CL
23948    CCXXFLAGS="$CCXXFLAGS -nologo"
23949
23950fi
23951
23952
23953
23954ac_ext=c
23955ac_cpp='$CPP $CPPFLAGS'
23956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23958ac_compiler_gnu=$ac_cv_c_compiler_gnu
23959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23960$as_echo_n "checking how to run the C preprocessor... " >&6; }
23961# On Suns, sometimes $CPP names a directory.
23962if test -n "$CPP" && test -d "$CPP"; then
23963  CPP=
23964fi
23965if test -z "$CPP"; then
23966  if ${ac_cv_prog_CPP+:} false; then :
23967  $as_echo_n "(cached) " >&6
23968else
23969      # Double quotes because CPP needs to be expanded
23970    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23971    do
23972      ac_preproc_ok=false
23973for ac_c_preproc_warn_flag in '' yes
23974do
23975  # Use a header file that comes with gcc, so configuring glibc
23976  # with a fresh cross-compiler works.
23977  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23978  # <limits.h> exists even on freestanding compilers.
23979  # On the NeXT, cc -E runs the code through the compiler's parser,
23980  # not just through cpp. "Syntax error" is here to catch this case.
23981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23982/* end confdefs.h.  */
23983#ifdef __STDC__
23984# include <limits.h>
23985#else
23986# include <assert.h>
23987#endif
23988		     Syntax error
23989_ACEOF
23990if ac_fn_c_try_cpp "$LINENO"; then :
23991
23992else
23993  # Broken: fails on valid input.
23994continue
23995fi
23996rm -f conftest.err conftest.i conftest.$ac_ext
23997
23998  # OK, works on sane cases.  Now check whether nonexistent headers
23999  # can be detected and how.
24000  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24001/* end confdefs.h.  */
24002#include <ac_nonexistent.h>
24003_ACEOF
24004if ac_fn_c_try_cpp "$LINENO"; then :
24005  # Broken: success on invalid input.
24006continue
24007else
24008  # Passes both tests.
24009ac_preproc_ok=:
24010break
24011fi
24012rm -f conftest.err conftest.i conftest.$ac_ext
24013
24014done
24015# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24016rm -f conftest.i conftest.err conftest.$ac_ext
24017if $ac_preproc_ok; then :
24018  break
24019fi
24020
24021    done
24022    ac_cv_prog_CPP=$CPP
24023
24024fi
24025  CPP=$ac_cv_prog_CPP
24026else
24027  ac_cv_prog_CPP=$CPP
24028fi
24029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24030$as_echo "$CPP" >&6; }
24031ac_preproc_ok=false
24032for ac_c_preproc_warn_flag in '' yes
24033do
24034  # Use a header file that comes with gcc, so configuring glibc
24035  # with a fresh cross-compiler works.
24036  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24037  # <limits.h> exists even on freestanding compilers.
24038  # On the NeXT, cc -E runs the code through the compiler's parser,
24039  # not just through cpp. "Syntax error" is here to catch this case.
24040  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24041/* end confdefs.h.  */
24042#ifdef __STDC__
24043# include <limits.h>
24044#else
24045# include <assert.h>
24046#endif
24047		     Syntax error
24048_ACEOF
24049if ac_fn_c_try_cpp "$LINENO"; then :
24050
24051else
24052  # Broken: fails on valid input.
24053continue
24054fi
24055rm -f conftest.err conftest.i conftest.$ac_ext
24056
24057  # OK, works on sane cases.  Now check whether nonexistent headers
24058  # can be detected and how.
24059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24060/* end confdefs.h.  */
24061#include <ac_nonexistent.h>
24062_ACEOF
24063if ac_fn_c_try_cpp "$LINENO"; then :
24064  # Broken: success on invalid input.
24065continue
24066else
24067  # Passes both tests.
24068ac_preproc_ok=:
24069break
24070fi
24071rm -f conftest.err conftest.i conftest.$ac_ext
24072
24073done
24074# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24075rm -f conftest.i conftest.err conftest.$ac_ext
24076if $ac_preproc_ok; then :
24077
24078else
24079  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24081as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24082See \`config.log' for more details" "$LINENO" 5; }
24083fi
24084
24085ac_ext=cpp
24086ac_cpp='$CXXCPP $CPPFLAGS'
24087ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24088ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24089ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24090
24091
24092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24093
24094  # First separate the path from the arguments. This will split at the first
24095  # space.
24096  complete="$CPP"
24097  path="${complete%% *}"
24098  tmp="$complete EOL"
24099  arguments="${tmp#* }"
24100
24101  # Input might be given as Windows format, start by converting to
24102  # unix format.
24103  new_path=`$CYGPATH -u "$path"`
24104
24105  # Now try to locate executable using which
24106  new_path=`$WHICH "$new_path" 2> /dev/null`
24107  # bat and cmd files are not always considered executable in cygwin causing which
24108  # to not find them
24109  if test "x$new_path" = x \
24110           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24111           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24112    new_path=`$CYGPATH -u "$path"`
24113  fi
24114  if test "x$new_path" = x; then
24115    # Oops. Which didn't find the executable.
24116    # The splitting of arguments from the executable at a space might have been incorrect,
24117    # since paths with space are more likely in Windows. Give it another try with the whole
24118    # argument.
24119    path="$complete"
24120    arguments="EOL"
24121    new_path=`$CYGPATH -u "$path"`
24122    new_path=`$WHICH "$new_path" 2> /dev/null`
24123    # bat and cmd files are not always considered executable in cygwin causing which
24124    # to not find them
24125    if test "x$new_path" = x \
24126             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24127             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24128      new_path=`$CYGPATH -u "$path"`
24129    fi
24130    if test "x$new_path" = x; then
24131      # It's still not found. Now this is an unrecoverable error.
24132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24133$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24134      has_space=`$ECHO "$complete" | $GREP " "`
24135      if test "x$has_space" != x; then
24136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24138      fi
24139      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24140    fi
24141  fi
24142
24143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24146  # "foo.exe" is OK but "foo" is an error.
24147  #
24148  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24149  # It is also a way to make sure we got the proper file name for the real test later on.
24150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24151  if test "x$test_shortpath" = x; then
24152    # Short path failed, file does not exist as specified.
24153    # Try adding .exe or .cmd
24154    if test -f "${new_path}.exe"; then
24155       input_to_shortpath="${new_path}.exe"
24156    elif test -f "${new_path}.cmd"; then
24157       input_to_shortpath="${new_path}.cmd"
24158    else
24159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24160$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24161      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24162$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24163      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24164    fi
24165  else
24166    input_to_shortpath="$new_path"
24167  fi
24168
24169  # Call helper function which possibly converts this using DOS-style short mode.
24170  # If so, the updated path is stored in $new_path.
24171  new_path="$input_to_shortpath"
24172
24173  input_path="$input_to_shortpath"
24174  # Check if we need to convert this using DOS-style short mode. If the path
24175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24176  # take no chances and rewrite it.
24177  # Note: m4 eats our [], so we need to use [ and ] instead.
24178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24179  if test "x$has_forbidden_chars" != x; then
24180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24184      # Going to short mode and back again did indeed matter. Since short mode is
24185      # case insensitive, let's make it lowercase to improve readability.
24186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24187      # Now convert it back to Unix-stile (cygpath)
24188      input_path=`$CYGPATH -u "$shortmode_path"`
24189      new_path="$input_path"
24190    fi
24191  fi
24192
24193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24194  if test "x$test_cygdrive_prefix" = x; then
24195    # As a simple fix, exclude /usr/bin since it's not a real path.
24196    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24198      # a path prefixed by /cygdrive for fixpath to work.
24199      new_path="$CYGWIN_ROOT_PATH$input_path"
24200    fi
24201  fi
24202
24203  # remove trailing .exe if any
24204  new_path="${new_path/%.exe/}"
24205
24206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24207
24208  # First separate the path from the arguments. This will split at the first
24209  # space.
24210  complete="$CPP"
24211  path="${complete%% *}"
24212  tmp="$complete EOL"
24213  arguments="${tmp#* }"
24214
24215  # Input might be given as Windows format, start by converting to
24216  # unix format.
24217  new_path="$path"
24218
24219  windows_path="$new_path"
24220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24221    unix_path=`$CYGPATH -u "$windows_path"`
24222    new_path="$unix_path"
24223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24225    new_path="$unix_path"
24226  fi
24227
24228
24229  # Now try to locate executable using which
24230  new_path=`$WHICH "$new_path" 2> /dev/null`
24231
24232  if test "x$new_path" = x; then
24233    # Oops. Which didn't find the executable.
24234    # The splitting of arguments from the executable at a space might have been incorrect,
24235    # since paths with space are more likely in Windows. Give it another try with the whole
24236    # argument.
24237    path="$complete"
24238    arguments="EOL"
24239    new_path="$path"
24240
24241  windows_path="$new_path"
24242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24243    unix_path=`$CYGPATH -u "$windows_path"`
24244    new_path="$unix_path"
24245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24247    new_path="$unix_path"
24248  fi
24249
24250
24251    new_path=`$WHICH "$new_path" 2> /dev/null`
24252
24253    if test "x$new_path" = x; then
24254      # It's still not found. Now this is an unrecoverable error.
24255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24256$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24257      has_space=`$ECHO "$complete" | $GREP " "`
24258      if test "x$has_space" != x; then
24259        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24260$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24261      fi
24262      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24263    fi
24264  fi
24265
24266  # Now new_path has a complete unix path to the binary
24267  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24268    # Keep paths in /bin as-is, but remove trailing .exe if any
24269    new_path="${new_path/%.exe/}"
24270    # Do not save /bin paths to all_fixpath_prefixes!
24271  else
24272    # Not in mixed or Windows style, start by that.
24273    new_path=`cmd //c echo $new_path`
24274
24275  input_path="$new_path"
24276  # Check if we need to convert this using DOS-style short mode. If the path
24277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24278  # take no chances and rewrite it.
24279  # Note: m4 eats our [], so we need to use [ and ] instead.
24280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24281  if test "x$has_forbidden_chars" != x; then
24282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24284  fi
24285
24286    # Output is in $new_path
24287
24288  windows_path="$new_path"
24289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24290    unix_path=`$CYGPATH -u "$windows_path"`
24291    new_path="$unix_path"
24292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24294    new_path="$unix_path"
24295  fi
24296
24297    # remove trailing .exe if any
24298    new_path="${new_path/%.exe/}"
24299
24300    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24301    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24302  fi
24303
24304  else
24305    # We're on a posix platform. Hooray! :)
24306    # First separate the path from the arguments. This will split at the first
24307    # space.
24308    complete="$CPP"
24309    path="${complete%% *}"
24310    tmp="$complete EOL"
24311    arguments="${tmp#* }"
24312
24313    # Cannot rely on the command "which" here since it doesn't always work.
24314    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24315    if test -z "$is_absolute_path"; then
24316      # Path to executable is not absolute. Find it.
24317      IFS_save="$IFS"
24318      IFS=:
24319      for p in $PATH; do
24320        if test -f "$p/$path" && test -x "$p/$path"; then
24321          new_path="$p/$path"
24322          break
24323        fi
24324      done
24325      IFS="$IFS_save"
24326    else
24327      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24328$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24329      new_path="$path"
24330    fi
24331
24332    if test "x$new_path" = x; then
24333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24334$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24335        has_space=`$ECHO "$complete" | $GREP " "`
24336        if test "x$has_space" != x; then
24337          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24338$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24339        fi
24340        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24341      fi
24342  fi
24343
24344      # Now join together the path and the arguments once again
24345      if test "x$arguments" != xEOL; then
24346        new_complete="$new_path ${arguments% *}"
24347      else
24348        new_complete="$new_path"
24349      fi
24350
24351  if test "x$complete" != "x$new_complete"; then
24352      CPP="$new_complete"
24353      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24354$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24355    fi
24356
24357
24358ac_ext=cpp
24359ac_cpp='$CXXCPP $CPPFLAGS'
24360ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24361ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24362ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24364$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24365if test -z "$CXXCPP"; then
24366  if ${ac_cv_prog_CXXCPP+:} false; then :
24367  $as_echo_n "(cached) " >&6
24368else
24369      # Double quotes because CXXCPP needs to be expanded
24370    for CXXCPP in "$CXX -E" "/lib/cpp"
24371    do
24372      ac_preproc_ok=false
24373for ac_cxx_preproc_warn_flag in '' yes
24374do
24375  # Use a header file that comes with gcc, so configuring glibc
24376  # with a fresh cross-compiler works.
24377  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24378  # <limits.h> exists even on freestanding compilers.
24379  # On the NeXT, cc -E runs the code through the compiler's parser,
24380  # not just through cpp. "Syntax error" is here to catch this case.
24381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24382/* end confdefs.h.  */
24383#ifdef __STDC__
24384# include <limits.h>
24385#else
24386# include <assert.h>
24387#endif
24388		     Syntax error
24389_ACEOF
24390if ac_fn_cxx_try_cpp "$LINENO"; then :
24391
24392else
24393  # Broken: fails on valid input.
24394continue
24395fi
24396rm -f conftest.err conftest.i conftest.$ac_ext
24397
24398  # OK, works on sane cases.  Now check whether nonexistent headers
24399  # can be detected and how.
24400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24401/* end confdefs.h.  */
24402#include <ac_nonexistent.h>
24403_ACEOF
24404if ac_fn_cxx_try_cpp "$LINENO"; then :
24405  # Broken: success on invalid input.
24406continue
24407else
24408  # Passes both tests.
24409ac_preproc_ok=:
24410break
24411fi
24412rm -f conftest.err conftest.i conftest.$ac_ext
24413
24414done
24415# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24416rm -f conftest.i conftest.err conftest.$ac_ext
24417if $ac_preproc_ok; then :
24418  break
24419fi
24420
24421    done
24422    ac_cv_prog_CXXCPP=$CXXCPP
24423
24424fi
24425  CXXCPP=$ac_cv_prog_CXXCPP
24426else
24427  ac_cv_prog_CXXCPP=$CXXCPP
24428fi
24429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24430$as_echo "$CXXCPP" >&6; }
24431ac_preproc_ok=false
24432for ac_cxx_preproc_warn_flag in '' yes
24433do
24434  # Use a header file that comes with gcc, so configuring glibc
24435  # with a fresh cross-compiler works.
24436  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24437  # <limits.h> exists even on freestanding compilers.
24438  # On the NeXT, cc -E runs the code through the compiler's parser,
24439  # not just through cpp. "Syntax error" is here to catch this case.
24440  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24441/* end confdefs.h.  */
24442#ifdef __STDC__
24443# include <limits.h>
24444#else
24445# include <assert.h>
24446#endif
24447		     Syntax error
24448_ACEOF
24449if ac_fn_cxx_try_cpp "$LINENO"; then :
24450
24451else
24452  # Broken: fails on valid input.
24453continue
24454fi
24455rm -f conftest.err conftest.i conftest.$ac_ext
24456
24457  # OK, works on sane cases.  Now check whether nonexistent headers
24458  # can be detected and how.
24459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24460/* end confdefs.h.  */
24461#include <ac_nonexistent.h>
24462_ACEOF
24463if ac_fn_cxx_try_cpp "$LINENO"; then :
24464  # Broken: success on invalid input.
24465continue
24466else
24467  # Passes both tests.
24468ac_preproc_ok=:
24469break
24470fi
24471rm -f conftest.err conftest.i conftest.$ac_ext
24472
24473done
24474# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24475rm -f conftest.i conftest.err conftest.$ac_ext
24476if $ac_preproc_ok; then :
24477
24478else
24479  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24480$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24481as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24482See \`config.log' for more details" "$LINENO" 5; }
24483fi
24484
24485ac_ext=cpp
24486ac_cpp='$CXXCPP $CPPFLAGS'
24487ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24488ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24489ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24490
24491
24492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24493
24494  # First separate the path from the arguments. This will split at the first
24495  # space.
24496  complete="$CXXCPP"
24497  path="${complete%% *}"
24498  tmp="$complete EOL"
24499  arguments="${tmp#* }"
24500
24501  # Input might be given as Windows format, start by converting to
24502  # unix format.
24503  new_path=`$CYGPATH -u "$path"`
24504
24505  # Now try to locate executable using which
24506  new_path=`$WHICH "$new_path" 2> /dev/null`
24507  # bat and cmd files are not always considered executable in cygwin causing which
24508  # to not find them
24509  if test "x$new_path" = x \
24510           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24511           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24512    new_path=`$CYGPATH -u "$path"`
24513  fi
24514  if test "x$new_path" = x; then
24515    # Oops. Which didn't find the executable.
24516    # The splitting of arguments from the executable at a space might have been incorrect,
24517    # since paths with space are more likely in Windows. Give it another try with the whole
24518    # argument.
24519    path="$complete"
24520    arguments="EOL"
24521    new_path=`$CYGPATH -u "$path"`
24522    new_path=`$WHICH "$new_path" 2> /dev/null`
24523    # bat and cmd files are not always considered executable in cygwin causing which
24524    # to not find them
24525    if test "x$new_path" = x \
24526             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24527             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24528      new_path=`$CYGPATH -u "$path"`
24529    fi
24530    if test "x$new_path" = x; then
24531      # It's still not found. Now this is an unrecoverable error.
24532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24533$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24534      has_space=`$ECHO "$complete" | $GREP " "`
24535      if test "x$has_space" != x; then
24536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24538      fi
24539      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24540    fi
24541  fi
24542
24543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24546  # "foo.exe" is OK but "foo" is an error.
24547  #
24548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24549  # It is also a way to make sure we got the proper file name for the real test later on.
24550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24551  if test "x$test_shortpath" = x; then
24552    # Short path failed, file does not exist as specified.
24553    # Try adding .exe or .cmd
24554    if test -f "${new_path}.exe"; then
24555       input_to_shortpath="${new_path}.exe"
24556    elif test -f "${new_path}.cmd"; then
24557       input_to_shortpath="${new_path}.cmd"
24558    else
24559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24560$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24561      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24562$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24563      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24564    fi
24565  else
24566    input_to_shortpath="$new_path"
24567  fi
24568
24569  # Call helper function which possibly converts this using DOS-style short mode.
24570  # If so, the updated path is stored in $new_path.
24571  new_path="$input_to_shortpath"
24572
24573  input_path="$input_to_shortpath"
24574  # Check if we need to convert this using DOS-style short mode. If the path
24575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24576  # take no chances and rewrite it.
24577  # Note: m4 eats our [], so we need to use [ and ] instead.
24578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24579  if test "x$has_forbidden_chars" != x; then
24580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24584      # Going to short mode and back again did indeed matter. Since short mode is
24585      # case insensitive, let's make it lowercase to improve readability.
24586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24587      # Now convert it back to Unix-stile (cygpath)
24588      input_path=`$CYGPATH -u "$shortmode_path"`
24589      new_path="$input_path"
24590    fi
24591  fi
24592
24593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24594  if test "x$test_cygdrive_prefix" = x; then
24595    # As a simple fix, exclude /usr/bin since it's not a real path.
24596    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24598      # a path prefixed by /cygdrive for fixpath to work.
24599      new_path="$CYGWIN_ROOT_PATH$input_path"
24600    fi
24601  fi
24602
24603  # remove trailing .exe if any
24604  new_path="${new_path/%.exe/}"
24605
24606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24607
24608  # First separate the path from the arguments. This will split at the first
24609  # space.
24610  complete="$CXXCPP"
24611  path="${complete%% *}"
24612  tmp="$complete EOL"
24613  arguments="${tmp#* }"
24614
24615  # Input might be given as Windows format, start by converting to
24616  # unix format.
24617  new_path="$path"
24618
24619  windows_path="$new_path"
24620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24621    unix_path=`$CYGPATH -u "$windows_path"`
24622    new_path="$unix_path"
24623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24625    new_path="$unix_path"
24626  fi
24627
24628
24629  # Now try to locate executable using which
24630  new_path=`$WHICH "$new_path" 2> /dev/null`
24631
24632  if test "x$new_path" = x; then
24633    # Oops. Which didn't find the executable.
24634    # The splitting of arguments from the executable at a space might have been incorrect,
24635    # since paths with space are more likely in Windows. Give it another try with the whole
24636    # argument.
24637    path="$complete"
24638    arguments="EOL"
24639    new_path="$path"
24640
24641  windows_path="$new_path"
24642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24643    unix_path=`$CYGPATH -u "$windows_path"`
24644    new_path="$unix_path"
24645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24647    new_path="$unix_path"
24648  fi
24649
24650
24651    new_path=`$WHICH "$new_path" 2> /dev/null`
24652
24653    if test "x$new_path" = x; then
24654      # It's still not found. Now this is an unrecoverable error.
24655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24656$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24657      has_space=`$ECHO "$complete" | $GREP " "`
24658      if test "x$has_space" != x; then
24659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24661      fi
24662      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24663    fi
24664  fi
24665
24666  # Now new_path has a complete unix path to the binary
24667  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24668    # Keep paths in /bin as-is, but remove trailing .exe if any
24669    new_path="${new_path/%.exe/}"
24670    # Do not save /bin paths to all_fixpath_prefixes!
24671  else
24672    # Not in mixed or Windows style, start by that.
24673    new_path=`cmd //c echo $new_path`
24674
24675  input_path="$new_path"
24676  # Check if we need to convert this using DOS-style short mode. If the path
24677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24678  # take no chances and rewrite it.
24679  # Note: m4 eats our [], so we need to use [ and ] instead.
24680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24681  if test "x$has_forbidden_chars" != x; then
24682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24684  fi
24685
24686    # Output is in $new_path
24687
24688  windows_path="$new_path"
24689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24690    unix_path=`$CYGPATH -u "$windows_path"`
24691    new_path="$unix_path"
24692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24694    new_path="$unix_path"
24695  fi
24696
24697    # remove trailing .exe if any
24698    new_path="${new_path/%.exe/}"
24699
24700    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24701    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24702  fi
24703
24704  else
24705    # We're on a posix platform. Hooray! :)
24706    # First separate the path from the arguments. This will split at the first
24707    # space.
24708    complete="$CXXCPP"
24709    path="${complete%% *}"
24710    tmp="$complete EOL"
24711    arguments="${tmp#* }"
24712
24713    # Cannot rely on the command "which" here since it doesn't always work.
24714    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24715    if test -z "$is_absolute_path"; then
24716      # Path to executable is not absolute. Find it.
24717      IFS_save="$IFS"
24718      IFS=:
24719      for p in $PATH; do
24720        if test -f "$p/$path" && test -x "$p/$path"; then
24721          new_path="$p/$path"
24722          break
24723        fi
24724      done
24725      IFS="$IFS_save"
24726    else
24727      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24728$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24729      new_path="$path"
24730    fi
24731
24732    if test "x$new_path" = x; then
24733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24734$as_echo "$as_me: The path of CXXCPP, 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}: This might be caused by spaces in the path, which is not allowed." >&5
24738$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24739        fi
24740        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24741      fi
24742  fi
24743
24744      # Now join together the path and the arguments once again
24745      if test "x$arguments" != xEOL; then
24746        new_complete="$new_path ${arguments% *}"
24747      else
24748        new_complete="$new_path"
24749      fi
24750
24751  if test "x$complete" != "x$new_complete"; then
24752      CXXCPP="$new_complete"
24753      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24754$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24755    fi
24756
24757
24758if test "x$COMPILE_TYPE" != "xcross"; then
24759    # If we are not cross compiling, use the same compilers for
24760    # building the build platform executables. The cross-compilation
24761    # case needed to be done earlier, but this can only be done after
24762    # the native tools have been localized.
24763    BUILD_CC="$CC"
24764    BUILD_CXX="$CXX"
24765    BUILD_LD="$LD"
24766fi
24767
24768# for solaris we really need solaris tools, and not gnu equivalent
24769#   these seems to normally reside in /usr/ccs/bin so add that to path before
24770#   starting to probe
24771#
24772#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24773#         so that it can be overriden --with-tools-dir
24774if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24775    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24776fi
24777
24778# Find the right assembler.
24779if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24780    # Extract the first word of "as", so it can be a program name with args.
24781set dummy as; ac_word=$2
24782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24783$as_echo_n "checking for $ac_word... " >&6; }
24784if ${ac_cv_path_AS+:} false; then :
24785  $as_echo_n "(cached) " >&6
24786else
24787  case $AS in
24788  [\\/]* | ?:[\\/]*)
24789  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24790  ;;
24791  *)
24792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24793for as_dir in $PATH
24794do
24795  IFS=$as_save_IFS
24796  test -z "$as_dir" && as_dir=.
24797    for ac_exec_ext in '' $ac_executable_extensions; do
24798  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24799    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24801    break 2
24802  fi
24803done
24804  done
24805IFS=$as_save_IFS
24806
24807  ;;
24808esac
24809fi
24810AS=$ac_cv_path_AS
24811if test -n "$AS"; then
24812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24813$as_echo "$AS" >&6; }
24814else
24815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24816$as_echo "no" >&6; }
24817fi
24818
24819
24820
24821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24822
24823  # First separate the path from the arguments. This will split at the first
24824  # space.
24825  complete="$AS"
24826  path="${complete%% *}"
24827  tmp="$complete EOL"
24828  arguments="${tmp#* }"
24829
24830  # Input might be given as Windows format, start by converting to
24831  # unix format.
24832  new_path=`$CYGPATH -u "$path"`
24833
24834  # Now try to locate executable using which
24835  new_path=`$WHICH "$new_path" 2> /dev/null`
24836  # bat and cmd files are not always considered executable in cygwin causing which
24837  # to not find them
24838  if test "x$new_path" = x \
24839           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24840           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24841    new_path=`$CYGPATH -u "$path"`
24842  fi
24843  if test "x$new_path" = x; then
24844    # Oops. Which didn't find the executable.
24845    # The splitting of arguments from the executable at a space might have been incorrect,
24846    # since paths with space are more likely in Windows. Give it another try with the whole
24847    # argument.
24848    path="$complete"
24849    arguments="EOL"
24850    new_path=`$CYGPATH -u "$path"`
24851    new_path=`$WHICH "$new_path" 2> /dev/null`
24852    # bat and cmd files are not always considered executable in cygwin causing which
24853    # to not find them
24854    if test "x$new_path" = x \
24855             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24856             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24857      new_path=`$CYGPATH -u "$path"`
24858    fi
24859    if test "x$new_path" = x; then
24860      # It's still not found. Now this is an unrecoverable error.
24861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24862$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24863      has_space=`$ECHO "$complete" | $GREP " "`
24864      if test "x$has_space" != x; then
24865        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24866$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24867      fi
24868      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24869    fi
24870  fi
24871
24872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24875  # "foo.exe" is OK but "foo" is an error.
24876  #
24877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24878  # It is also a way to make sure we got the proper file name for the real test later on.
24879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24880  if test "x$test_shortpath" = x; then
24881    # Short path failed, file does not exist as specified.
24882    # Try adding .exe or .cmd
24883    if test -f "${new_path}.exe"; then
24884       input_to_shortpath="${new_path}.exe"
24885    elif test -f "${new_path}.cmd"; then
24886       input_to_shortpath="${new_path}.cmd"
24887    else
24888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24889$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24890      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24891$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24892      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24893    fi
24894  else
24895    input_to_shortpath="$new_path"
24896  fi
24897
24898  # Call helper function which possibly converts this using DOS-style short mode.
24899  # If so, the updated path is stored in $new_path.
24900  new_path="$input_to_shortpath"
24901
24902  input_path="$input_to_shortpath"
24903  # Check if we need to convert this using DOS-style short mode. If the path
24904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24905  # take no chances and rewrite it.
24906  # Note: m4 eats our [], so we need to use [ and ] instead.
24907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24908  if test "x$has_forbidden_chars" != x; then
24909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24913      # Going to short mode and back again did indeed matter. Since short mode is
24914      # case insensitive, let's make it lowercase to improve readability.
24915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24916      # Now convert it back to Unix-stile (cygpath)
24917      input_path=`$CYGPATH -u "$shortmode_path"`
24918      new_path="$input_path"
24919    fi
24920  fi
24921
24922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24923  if test "x$test_cygdrive_prefix" = x; then
24924    # As a simple fix, exclude /usr/bin since it's not a real path.
24925    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24927      # a path prefixed by /cygdrive for fixpath to work.
24928      new_path="$CYGWIN_ROOT_PATH$input_path"
24929    fi
24930  fi
24931
24932  # remove trailing .exe if any
24933  new_path="${new_path/%.exe/}"
24934
24935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24936
24937  # First separate the path from the arguments. This will split at the first
24938  # space.
24939  complete="$AS"
24940  path="${complete%% *}"
24941  tmp="$complete EOL"
24942  arguments="${tmp#* }"
24943
24944  # Input might be given as Windows format, start by converting to
24945  # unix format.
24946  new_path="$path"
24947
24948  windows_path="$new_path"
24949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24950    unix_path=`$CYGPATH -u "$windows_path"`
24951    new_path="$unix_path"
24952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24954    new_path="$unix_path"
24955  fi
24956
24957
24958  # Now try to locate executable using which
24959  new_path=`$WHICH "$new_path" 2> /dev/null`
24960
24961  if test "x$new_path" = x; then
24962    # Oops. Which didn't find the executable.
24963    # The splitting of arguments from the executable at a space might have been incorrect,
24964    # since paths with space are more likely in Windows. Give it another try with the whole
24965    # argument.
24966    path="$complete"
24967    arguments="EOL"
24968    new_path="$path"
24969
24970  windows_path="$new_path"
24971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24972    unix_path=`$CYGPATH -u "$windows_path"`
24973    new_path="$unix_path"
24974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24976    new_path="$unix_path"
24977  fi
24978
24979
24980    new_path=`$WHICH "$new_path" 2> /dev/null`
24981
24982    if test "x$new_path" = x; then
24983      # It's still not found. Now this is an unrecoverable error.
24984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24985$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24986      has_space=`$ECHO "$complete" | $GREP " "`
24987      if test "x$has_space" != x; then
24988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24990      fi
24991      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24992    fi
24993  fi
24994
24995  # Now new_path has a complete unix path to the binary
24996  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24997    # Keep paths in /bin as-is, but remove trailing .exe if any
24998    new_path="${new_path/%.exe/}"
24999    # Do not save /bin paths to all_fixpath_prefixes!
25000  else
25001    # Not in mixed or Windows style, start by that.
25002    new_path=`cmd //c echo $new_path`
25003
25004  input_path="$new_path"
25005  # Check if we need to convert this using DOS-style short mode. If the path
25006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25007  # take no chances and rewrite it.
25008  # Note: m4 eats our [], so we need to use [ and ] instead.
25009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25010  if test "x$has_forbidden_chars" != x; then
25011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25013  fi
25014
25015    # Output is in $new_path
25016
25017  windows_path="$new_path"
25018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25019    unix_path=`$CYGPATH -u "$windows_path"`
25020    new_path="$unix_path"
25021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25023    new_path="$unix_path"
25024  fi
25025
25026    # remove trailing .exe if any
25027    new_path="${new_path/%.exe/}"
25028
25029    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25030    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25031  fi
25032
25033  else
25034    # We're on a posix platform. Hooray! :)
25035    # First separate the path from the arguments. This will split at the first
25036    # space.
25037    complete="$AS"
25038    path="${complete%% *}"
25039    tmp="$complete EOL"
25040    arguments="${tmp#* }"
25041
25042    # Cannot rely on the command "which" here since it doesn't always work.
25043    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25044    if test -z "$is_absolute_path"; then
25045      # Path to executable is not absolute. Find it.
25046      IFS_save="$IFS"
25047      IFS=:
25048      for p in $PATH; do
25049        if test -f "$p/$path" && test -x "$p/$path"; then
25050          new_path="$p/$path"
25051          break
25052        fi
25053      done
25054      IFS="$IFS_save"
25055    else
25056      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25057$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25058      new_path="$path"
25059    fi
25060
25061    if test "x$new_path" = x; then
25062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25063$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25064        has_space=`$ECHO "$complete" | $GREP " "`
25065        if test "x$has_space" != x; then
25066          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25067$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25068        fi
25069        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25070      fi
25071  fi
25072
25073      # Now join together the path and the arguments once again
25074      if test "x$arguments" != xEOL; then
25075        new_complete="$new_path ${arguments% *}"
25076      else
25077        new_complete="$new_path"
25078      fi
25079
25080  if test "x$complete" != "x$new_complete"; then
25081      AS="$new_complete"
25082      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25083$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25084    fi
25085
25086else
25087    AS="$CC -c"
25088fi
25089
25090
25091if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25092    for ac_prog in gnm nm
25093do
25094  # Extract the first word of "$ac_prog", so it can be a program name with args.
25095set dummy $ac_prog; ac_word=$2
25096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25097$as_echo_n "checking for $ac_word... " >&6; }
25098if ${ac_cv_path_NM+:} false; then :
25099  $as_echo_n "(cached) " >&6
25100else
25101  case $NM in
25102  [\\/]* | ?:[\\/]*)
25103  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25104  ;;
25105  *)
25106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25107for as_dir in $PATH
25108do
25109  IFS=$as_save_IFS
25110  test -z "$as_dir" && as_dir=.
25111    for ac_exec_ext in '' $ac_executable_extensions; do
25112  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25113    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25115    break 2
25116  fi
25117done
25118  done
25119IFS=$as_save_IFS
25120
25121  ;;
25122esac
25123fi
25124NM=$ac_cv_path_NM
25125if test -n "$NM"; then
25126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25127$as_echo "$NM" >&6; }
25128else
25129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25130$as_echo "no" >&6; }
25131fi
25132
25133
25134  test -n "$NM" && break
25135done
25136
25137
25138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25139
25140  # First separate the path from the arguments. This will split at the first
25141  # space.
25142  complete="$NM"
25143  path="${complete%% *}"
25144  tmp="$complete EOL"
25145  arguments="${tmp#* }"
25146
25147  # Input might be given as Windows format, start by converting to
25148  # unix format.
25149  new_path=`$CYGPATH -u "$path"`
25150
25151  # Now try to locate executable using which
25152  new_path=`$WHICH "$new_path" 2> /dev/null`
25153  # bat and cmd files are not always considered executable in cygwin causing which
25154  # to not find them
25155  if test "x$new_path" = x \
25156           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25157           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25158    new_path=`$CYGPATH -u "$path"`
25159  fi
25160  if test "x$new_path" = x; then
25161    # Oops. Which didn't find the executable.
25162    # The splitting of arguments from the executable at a space might have been incorrect,
25163    # since paths with space are more likely in Windows. Give it another try with the whole
25164    # argument.
25165    path="$complete"
25166    arguments="EOL"
25167    new_path=`$CYGPATH -u "$path"`
25168    new_path=`$WHICH "$new_path" 2> /dev/null`
25169    # bat and cmd files are not always considered executable in cygwin causing which
25170    # to not find them
25171    if test "x$new_path" = x \
25172             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25173             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25174      new_path=`$CYGPATH -u "$path"`
25175    fi
25176    if test "x$new_path" = x; then
25177      # It's still not found. Now this is an unrecoverable error.
25178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25179$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25180      has_space=`$ECHO "$complete" | $GREP " "`
25181      if test "x$has_space" != x; then
25182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25184      fi
25185      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25186    fi
25187  fi
25188
25189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25192  # "foo.exe" is OK but "foo" is an error.
25193  #
25194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25195  # It is also a way to make sure we got the proper file name for the real test later on.
25196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25197  if test "x$test_shortpath" = x; then
25198    # Short path failed, file does not exist as specified.
25199    # Try adding .exe or .cmd
25200    if test -f "${new_path}.exe"; then
25201       input_to_shortpath="${new_path}.exe"
25202    elif test -f "${new_path}.cmd"; then
25203       input_to_shortpath="${new_path}.cmd"
25204    else
25205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25206$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25207      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25208$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25209      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25210    fi
25211  else
25212    input_to_shortpath="$new_path"
25213  fi
25214
25215  # Call helper function which possibly converts this using DOS-style short mode.
25216  # If so, the updated path is stored in $new_path.
25217  new_path="$input_to_shortpath"
25218
25219  input_path="$input_to_shortpath"
25220  # Check if we need to convert this using DOS-style short mode. If the path
25221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25222  # take no chances and rewrite it.
25223  # Note: m4 eats our [], so we need to use [ and ] instead.
25224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25225  if test "x$has_forbidden_chars" != x; then
25226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25230      # Going to short mode and back again did indeed matter. Since short mode is
25231      # case insensitive, let's make it lowercase to improve readability.
25232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25233      # Now convert it back to Unix-stile (cygpath)
25234      input_path=`$CYGPATH -u "$shortmode_path"`
25235      new_path="$input_path"
25236    fi
25237  fi
25238
25239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25240  if test "x$test_cygdrive_prefix" = x; then
25241    # As a simple fix, exclude /usr/bin since it's not a real path.
25242    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25244      # a path prefixed by /cygdrive for fixpath to work.
25245      new_path="$CYGWIN_ROOT_PATH$input_path"
25246    fi
25247  fi
25248
25249  # remove trailing .exe if any
25250  new_path="${new_path/%.exe/}"
25251
25252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25253
25254  # First separate the path from the arguments. This will split at the first
25255  # space.
25256  complete="$NM"
25257  path="${complete%% *}"
25258  tmp="$complete EOL"
25259  arguments="${tmp#* }"
25260
25261  # Input might be given as Windows format, start by converting to
25262  # unix format.
25263  new_path="$path"
25264
25265  windows_path="$new_path"
25266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25267    unix_path=`$CYGPATH -u "$windows_path"`
25268    new_path="$unix_path"
25269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25271    new_path="$unix_path"
25272  fi
25273
25274
25275  # Now try to locate executable using which
25276  new_path=`$WHICH "$new_path" 2> /dev/null`
25277
25278  if test "x$new_path" = x; then
25279    # Oops. Which didn't find the executable.
25280    # The splitting of arguments from the executable at a space might have been incorrect,
25281    # since paths with space are more likely in Windows. Give it another try with the whole
25282    # argument.
25283    path="$complete"
25284    arguments="EOL"
25285    new_path="$path"
25286
25287  windows_path="$new_path"
25288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25289    unix_path=`$CYGPATH -u "$windows_path"`
25290    new_path="$unix_path"
25291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25293    new_path="$unix_path"
25294  fi
25295
25296
25297    new_path=`$WHICH "$new_path" 2> /dev/null`
25298
25299    if test "x$new_path" = x; then
25300      # It's still not found. Now this is an unrecoverable error.
25301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25302$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25303      has_space=`$ECHO "$complete" | $GREP " "`
25304      if test "x$has_space" != x; then
25305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25307      fi
25308      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25309    fi
25310  fi
25311
25312  # Now new_path has a complete unix path to the binary
25313  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25314    # Keep paths in /bin as-is, but remove trailing .exe if any
25315    new_path="${new_path/%.exe/}"
25316    # Do not save /bin paths to all_fixpath_prefixes!
25317  else
25318    # Not in mixed or Windows style, start by that.
25319    new_path=`cmd //c echo $new_path`
25320
25321  input_path="$new_path"
25322  # Check if we need to convert this using DOS-style short mode. If the path
25323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25324  # take no chances and rewrite it.
25325  # Note: m4 eats our [], so we need to use [ and ] instead.
25326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25327  if test "x$has_forbidden_chars" != x; then
25328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25330  fi
25331
25332    # Output is in $new_path
25333
25334  windows_path="$new_path"
25335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25336    unix_path=`$CYGPATH -u "$windows_path"`
25337    new_path="$unix_path"
25338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25340    new_path="$unix_path"
25341  fi
25342
25343    # remove trailing .exe if any
25344    new_path="${new_path/%.exe/}"
25345
25346    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25347    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25348  fi
25349
25350  else
25351    # We're on a posix platform. Hooray! :)
25352    # First separate the path from the arguments. This will split at the first
25353    # space.
25354    complete="$NM"
25355    path="${complete%% *}"
25356    tmp="$complete EOL"
25357    arguments="${tmp#* }"
25358
25359    # Cannot rely on the command "which" here since it doesn't always work.
25360    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25361    if test -z "$is_absolute_path"; then
25362      # Path to executable is not absolute. Find it.
25363      IFS_save="$IFS"
25364      IFS=:
25365      for p in $PATH; do
25366        if test -f "$p/$path" && test -x "$p/$path"; then
25367          new_path="$p/$path"
25368          break
25369        fi
25370      done
25371      IFS="$IFS_save"
25372    else
25373      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25374$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25375      new_path="$path"
25376    fi
25377
25378    if test "x$new_path" = x; then
25379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25380$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25381        has_space=`$ECHO "$complete" | $GREP " "`
25382        if test "x$has_space" != x; then
25383          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25384$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25385        fi
25386        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25387      fi
25388  fi
25389
25390      # Now join together the path and the arguments once again
25391      if test "x$arguments" != xEOL; then
25392        new_complete="$new_path ${arguments% *}"
25393      else
25394        new_complete="$new_path"
25395      fi
25396
25397  if test "x$complete" != "x$new_complete"; then
25398      NM="$new_complete"
25399      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25400$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25401    fi
25402
25403    # Extract the first word of "strip", so it can be a program name with args.
25404set dummy strip; ac_word=$2
25405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25406$as_echo_n "checking for $ac_word... " >&6; }
25407if ${ac_cv_path_STRIP+:} false; then :
25408  $as_echo_n "(cached) " >&6
25409else
25410  case $STRIP in
25411  [\\/]* | ?:[\\/]*)
25412  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25413  ;;
25414  *)
25415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25416for as_dir in $PATH
25417do
25418  IFS=$as_save_IFS
25419  test -z "$as_dir" && as_dir=.
25420    for ac_exec_ext in '' $ac_executable_extensions; do
25421  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25422    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25424    break 2
25425  fi
25426done
25427  done
25428IFS=$as_save_IFS
25429
25430  ;;
25431esac
25432fi
25433STRIP=$ac_cv_path_STRIP
25434if test -n "$STRIP"; then
25435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25436$as_echo "$STRIP" >&6; }
25437else
25438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25439$as_echo "no" >&6; }
25440fi
25441
25442
25443
25444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25445
25446  # First separate the path from the arguments. This will split at the first
25447  # space.
25448  complete="$STRIP"
25449  path="${complete%% *}"
25450  tmp="$complete EOL"
25451  arguments="${tmp#* }"
25452
25453  # Input might be given as Windows format, start by converting to
25454  # unix format.
25455  new_path=`$CYGPATH -u "$path"`
25456
25457  # Now try to locate executable using which
25458  new_path=`$WHICH "$new_path" 2> /dev/null`
25459  # bat and cmd files are not always considered executable in cygwin causing which
25460  # to not find them
25461  if test "x$new_path" = x \
25462           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25463           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25464    new_path=`$CYGPATH -u "$path"`
25465  fi
25466  if test "x$new_path" = x; then
25467    # Oops. Which didn't find the executable.
25468    # The splitting of arguments from the executable at a space might have been incorrect,
25469    # since paths with space are more likely in Windows. Give it another try with the whole
25470    # argument.
25471    path="$complete"
25472    arguments="EOL"
25473    new_path=`$CYGPATH -u "$path"`
25474    new_path=`$WHICH "$new_path" 2> /dev/null`
25475    # bat and cmd files are not always considered executable in cygwin causing which
25476    # to not find them
25477    if test "x$new_path" = x \
25478             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25479             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25480      new_path=`$CYGPATH -u "$path"`
25481    fi
25482    if test "x$new_path" = x; then
25483      # It's still not found. Now this is an unrecoverable error.
25484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25485$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25486      has_space=`$ECHO "$complete" | $GREP " "`
25487      if test "x$has_space" != x; then
25488        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25489$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25490      fi
25491      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25492    fi
25493  fi
25494
25495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25498  # "foo.exe" is OK but "foo" is an error.
25499  #
25500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25501  # It is also a way to make sure we got the proper file name for the real test later on.
25502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25503  if test "x$test_shortpath" = x; then
25504    # Short path failed, file does not exist as specified.
25505    # Try adding .exe or .cmd
25506    if test -f "${new_path}.exe"; then
25507       input_to_shortpath="${new_path}.exe"
25508    elif test -f "${new_path}.cmd"; then
25509       input_to_shortpath="${new_path}.cmd"
25510    else
25511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25512$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25513      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25514$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25515      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25516    fi
25517  else
25518    input_to_shortpath="$new_path"
25519  fi
25520
25521  # Call helper function which possibly converts this using DOS-style short mode.
25522  # If so, the updated path is stored in $new_path.
25523  new_path="$input_to_shortpath"
25524
25525  input_path="$input_to_shortpath"
25526  # Check if we need to convert this using DOS-style short mode. If the path
25527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25528  # take no chances and rewrite it.
25529  # Note: m4 eats our [], so we need to use [ and ] instead.
25530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25531  if test "x$has_forbidden_chars" != x; then
25532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25536      # Going to short mode and back again did indeed matter. Since short mode is
25537      # case insensitive, let's make it lowercase to improve readability.
25538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25539      # Now convert it back to Unix-stile (cygpath)
25540      input_path=`$CYGPATH -u "$shortmode_path"`
25541      new_path="$input_path"
25542    fi
25543  fi
25544
25545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25546  if test "x$test_cygdrive_prefix" = x; then
25547    # As a simple fix, exclude /usr/bin since it's not a real path.
25548    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25550      # a path prefixed by /cygdrive for fixpath to work.
25551      new_path="$CYGWIN_ROOT_PATH$input_path"
25552    fi
25553  fi
25554
25555  # remove trailing .exe if any
25556  new_path="${new_path/%.exe/}"
25557
25558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25559
25560  # First separate the path from the arguments. This will split at the first
25561  # space.
25562  complete="$STRIP"
25563  path="${complete%% *}"
25564  tmp="$complete EOL"
25565  arguments="${tmp#* }"
25566
25567  # Input might be given as Windows format, start by converting to
25568  # unix format.
25569  new_path="$path"
25570
25571  windows_path="$new_path"
25572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25573    unix_path=`$CYGPATH -u "$windows_path"`
25574    new_path="$unix_path"
25575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25577    new_path="$unix_path"
25578  fi
25579
25580
25581  # Now try to locate executable using which
25582  new_path=`$WHICH "$new_path" 2> /dev/null`
25583
25584  if test "x$new_path" = x; then
25585    # Oops. Which didn't find the executable.
25586    # The splitting of arguments from the executable at a space might have been incorrect,
25587    # since paths with space are more likely in Windows. Give it another try with the whole
25588    # argument.
25589    path="$complete"
25590    arguments="EOL"
25591    new_path="$path"
25592
25593  windows_path="$new_path"
25594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25595    unix_path=`$CYGPATH -u "$windows_path"`
25596    new_path="$unix_path"
25597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25599    new_path="$unix_path"
25600  fi
25601
25602
25603    new_path=`$WHICH "$new_path" 2> /dev/null`
25604
25605    if test "x$new_path" = x; then
25606      # It's still not found. Now this is an unrecoverable error.
25607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25608$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25609      has_space=`$ECHO "$complete" | $GREP " "`
25610      if test "x$has_space" != x; then
25611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25613      fi
25614      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25615    fi
25616  fi
25617
25618  # Now new_path has a complete unix path to the binary
25619  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25620    # Keep paths in /bin as-is, but remove trailing .exe if any
25621    new_path="${new_path/%.exe/}"
25622    # Do not save /bin paths to all_fixpath_prefixes!
25623  else
25624    # Not in mixed or Windows style, start by that.
25625    new_path=`cmd //c echo $new_path`
25626
25627  input_path="$new_path"
25628  # Check if we need to convert this using DOS-style short mode. If the path
25629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25630  # take no chances and rewrite it.
25631  # Note: m4 eats our [], so we need to use [ and ] instead.
25632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25633  if test "x$has_forbidden_chars" != x; then
25634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25636  fi
25637
25638    # Output is in $new_path
25639
25640  windows_path="$new_path"
25641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25642    unix_path=`$CYGPATH -u "$windows_path"`
25643    new_path="$unix_path"
25644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25646    new_path="$unix_path"
25647  fi
25648
25649    # remove trailing .exe if any
25650    new_path="${new_path/%.exe/}"
25651
25652    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25653    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25654  fi
25655
25656  else
25657    # We're on a posix platform. Hooray! :)
25658    # First separate the path from the arguments. This will split at the first
25659    # space.
25660    complete="$STRIP"
25661    path="${complete%% *}"
25662    tmp="$complete EOL"
25663    arguments="${tmp#* }"
25664
25665    # Cannot rely on the command "which" here since it doesn't always work.
25666    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25667    if test -z "$is_absolute_path"; then
25668      # Path to executable is not absolute. Find it.
25669      IFS_save="$IFS"
25670      IFS=:
25671      for p in $PATH; do
25672        if test -f "$p/$path" && test -x "$p/$path"; then
25673          new_path="$p/$path"
25674          break
25675        fi
25676      done
25677      IFS="$IFS_save"
25678    else
25679      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25680$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25681      new_path="$path"
25682    fi
25683
25684    if test "x$new_path" = x; then
25685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25686$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25687        has_space=`$ECHO "$complete" | $GREP " "`
25688        if test "x$has_space" != x; then
25689          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25690$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25691        fi
25692        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25693      fi
25694  fi
25695
25696      # Now join together the path and the arguments once again
25697      if test "x$arguments" != xEOL; then
25698        new_complete="$new_path ${arguments% *}"
25699      else
25700        new_complete="$new_path"
25701      fi
25702
25703  if test "x$complete" != "x$new_complete"; then
25704      STRIP="$new_complete"
25705      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25706$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25707    fi
25708
25709    # Extract the first word of "mcs", so it can be a program name with args.
25710set dummy mcs; ac_word=$2
25711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25712$as_echo_n "checking for $ac_word... " >&6; }
25713if ${ac_cv_path_MCS+:} false; then :
25714  $as_echo_n "(cached) " >&6
25715else
25716  case $MCS in
25717  [\\/]* | ?:[\\/]*)
25718  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25719  ;;
25720  *)
25721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25722for as_dir in $PATH
25723do
25724  IFS=$as_save_IFS
25725  test -z "$as_dir" && as_dir=.
25726    for ac_exec_ext in '' $ac_executable_extensions; do
25727  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25728    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25730    break 2
25731  fi
25732done
25733  done
25734IFS=$as_save_IFS
25735
25736  ;;
25737esac
25738fi
25739MCS=$ac_cv_path_MCS
25740if test -n "$MCS"; then
25741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25742$as_echo "$MCS" >&6; }
25743else
25744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25745$as_echo "no" >&6; }
25746fi
25747
25748
25749
25750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25751
25752  # First separate the path from the arguments. This will split at the first
25753  # space.
25754  complete="$MCS"
25755  path="${complete%% *}"
25756  tmp="$complete EOL"
25757  arguments="${tmp#* }"
25758
25759  # Input might be given as Windows format, start by converting to
25760  # unix format.
25761  new_path=`$CYGPATH -u "$path"`
25762
25763  # Now try to locate executable using which
25764  new_path=`$WHICH "$new_path" 2> /dev/null`
25765  # bat and cmd files are not always considered executable in cygwin causing which
25766  # to not find them
25767  if test "x$new_path" = x \
25768           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25769           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25770    new_path=`$CYGPATH -u "$path"`
25771  fi
25772  if test "x$new_path" = x; then
25773    # Oops. Which didn't find the executable.
25774    # The splitting of arguments from the executable at a space might have been incorrect,
25775    # since paths with space are more likely in Windows. Give it another try with the whole
25776    # argument.
25777    path="$complete"
25778    arguments="EOL"
25779    new_path=`$CYGPATH -u "$path"`
25780    new_path=`$WHICH "$new_path" 2> /dev/null`
25781    # bat and cmd files are not always considered executable in cygwin causing which
25782    # to not find them
25783    if test "x$new_path" = x \
25784             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25785             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25786      new_path=`$CYGPATH -u "$path"`
25787    fi
25788    if test "x$new_path" = x; then
25789      # It's still not found. Now this is an unrecoverable error.
25790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25791$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25792      has_space=`$ECHO "$complete" | $GREP " "`
25793      if test "x$has_space" != x; then
25794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25796      fi
25797      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25798    fi
25799  fi
25800
25801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25804  # "foo.exe" is OK but "foo" is an error.
25805  #
25806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25807  # It is also a way to make sure we got the proper file name for the real test later on.
25808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25809  if test "x$test_shortpath" = x; then
25810    # Short path failed, file does not exist as specified.
25811    # Try adding .exe or .cmd
25812    if test -f "${new_path}.exe"; then
25813       input_to_shortpath="${new_path}.exe"
25814    elif test -f "${new_path}.cmd"; then
25815       input_to_shortpath="${new_path}.cmd"
25816    else
25817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25818$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25821      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25822    fi
25823  else
25824    input_to_shortpath="$new_path"
25825  fi
25826
25827  # Call helper function which possibly converts this using DOS-style short mode.
25828  # If so, the updated path is stored in $new_path.
25829  new_path="$input_to_shortpath"
25830
25831  input_path="$input_to_shortpath"
25832  # Check if we need to convert this using DOS-style short mode. If the path
25833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25834  # take no chances and rewrite it.
25835  # Note: m4 eats our [], so we need to use [ and ] instead.
25836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25837  if test "x$has_forbidden_chars" != x; then
25838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25842      # Going to short mode and back again did indeed matter. Since short mode is
25843      # case insensitive, let's make it lowercase to improve readability.
25844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25845      # Now convert it back to Unix-stile (cygpath)
25846      input_path=`$CYGPATH -u "$shortmode_path"`
25847      new_path="$input_path"
25848    fi
25849  fi
25850
25851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25852  if test "x$test_cygdrive_prefix" = x; then
25853    # As a simple fix, exclude /usr/bin since it's not a real path.
25854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25856      # a path prefixed by /cygdrive for fixpath to work.
25857      new_path="$CYGWIN_ROOT_PATH$input_path"
25858    fi
25859  fi
25860
25861  # remove trailing .exe if any
25862  new_path="${new_path/%.exe/}"
25863
25864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25865
25866  # First separate the path from the arguments. This will split at the first
25867  # space.
25868  complete="$MCS"
25869  path="${complete%% *}"
25870  tmp="$complete EOL"
25871  arguments="${tmp#* }"
25872
25873  # Input might be given as Windows format, start by converting to
25874  # unix format.
25875  new_path="$path"
25876
25877  windows_path="$new_path"
25878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25879    unix_path=`$CYGPATH -u "$windows_path"`
25880    new_path="$unix_path"
25881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25883    new_path="$unix_path"
25884  fi
25885
25886
25887  # Now try to locate executable using which
25888  new_path=`$WHICH "$new_path" 2> /dev/null`
25889
25890  if test "x$new_path" = x; then
25891    # Oops. Which didn't find the executable.
25892    # The splitting of arguments from the executable at a space might have been incorrect,
25893    # since paths with space are more likely in Windows. Give it another try with the whole
25894    # argument.
25895    path="$complete"
25896    arguments="EOL"
25897    new_path="$path"
25898
25899  windows_path="$new_path"
25900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25901    unix_path=`$CYGPATH -u "$windows_path"`
25902    new_path="$unix_path"
25903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25905    new_path="$unix_path"
25906  fi
25907
25908
25909    new_path=`$WHICH "$new_path" 2> /dev/null`
25910
25911    if test "x$new_path" = x; then
25912      # It's still not found. Now this is an unrecoverable error.
25913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25914$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25915      has_space=`$ECHO "$complete" | $GREP " "`
25916      if test "x$has_space" != x; then
25917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25919      fi
25920      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25921    fi
25922  fi
25923
25924  # Now new_path has a complete unix path to the binary
25925  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25926    # Keep paths in /bin as-is, but remove trailing .exe if any
25927    new_path="${new_path/%.exe/}"
25928    # Do not save /bin paths to all_fixpath_prefixes!
25929  else
25930    # Not in mixed or Windows style, start by that.
25931    new_path=`cmd //c echo $new_path`
25932
25933  input_path="$new_path"
25934  # Check if we need to convert this using DOS-style short mode. If the path
25935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25936  # take no chances and rewrite it.
25937  # Note: m4 eats our [], so we need to use [ and ] instead.
25938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25939  if test "x$has_forbidden_chars" != x; then
25940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25942  fi
25943
25944    # Output is in $new_path
25945
25946  windows_path="$new_path"
25947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25948    unix_path=`$CYGPATH -u "$windows_path"`
25949    new_path="$unix_path"
25950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25952    new_path="$unix_path"
25953  fi
25954
25955    # remove trailing .exe if any
25956    new_path="${new_path/%.exe/}"
25957
25958    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25959    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25960  fi
25961
25962  else
25963    # We're on a posix platform. Hooray! :)
25964    # First separate the path from the arguments. This will split at the first
25965    # space.
25966    complete="$MCS"
25967    path="${complete%% *}"
25968    tmp="$complete EOL"
25969    arguments="${tmp#* }"
25970
25971    # Cannot rely on the command "which" here since it doesn't always work.
25972    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25973    if test -z "$is_absolute_path"; then
25974      # Path to executable is not absolute. Find it.
25975      IFS_save="$IFS"
25976      IFS=:
25977      for p in $PATH; do
25978        if test -f "$p/$path" && test -x "$p/$path"; then
25979          new_path="$p/$path"
25980          break
25981        fi
25982      done
25983      IFS="$IFS_save"
25984    else
25985      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25986$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25987      new_path="$path"
25988    fi
25989
25990    if test "x$new_path" = x; then
25991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25992$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25993        has_space=`$ECHO "$complete" | $GREP " "`
25994        if test "x$has_space" != x; then
25995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25997        fi
25998        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25999      fi
26000  fi
26001
26002      # Now join together the path and the arguments once again
26003      if test "x$arguments" != xEOL; then
26004        new_complete="$new_path ${arguments% *}"
26005      else
26006        new_complete="$new_path"
26007      fi
26008
26009  if test "x$complete" != "x$new_complete"; then
26010      MCS="$new_complete"
26011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26012$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26013    fi
26014
26015elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26016    if test -n "$ac_tool_prefix"; then
26017  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26018set dummy ${ac_tool_prefix}nm; ac_word=$2
26019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26020$as_echo_n "checking for $ac_word... " >&6; }
26021if ${ac_cv_prog_NM+:} false; then :
26022  $as_echo_n "(cached) " >&6
26023else
26024  if test -n "$NM"; then
26025  ac_cv_prog_NM="$NM" # Let the user override the test.
26026else
26027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26028for as_dir in $PATH
26029do
26030  IFS=$as_save_IFS
26031  test -z "$as_dir" && as_dir=.
26032    for ac_exec_ext in '' $ac_executable_extensions; do
26033  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26034    ac_cv_prog_NM="${ac_tool_prefix}nm"
26035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26036    break 2
26037  fi
26038done
26039  done
26040IFS=$as_save_IFS
26041
26042fi
26043fi
26044NM=$ac_cv_prog_NM
26045if test -n "$NM"; then
26046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26047$as_echo "$NM" >&6; }
26048else
26049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26050$as_echo "no" >&6; }
26051fi
26052
26053
26054fi
26055if test -z "$ac_cv_prog_NM"; then
26056  ac_ct_NM=$NM
26057  # Extract the first word of "nm", so it can be a program name with args.
26058set dummy nm; ac_word=$2
26059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26060$as_echo_n "checking for $ac_word... " >&6; }
26061if ${ac_cv_prog_ac_ct_NM+:} false; then :
26062  $as_echo_n "(cached) " >&6
26063else
26064  if test -n "$ac_ct_NM"; then
26065  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26066else
26067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26068for as_dir in $PATH
26069do
26070  IFS=$as_save_IFS
26071  test -z "$as_dir" && as_dir=.
26072    for ac_exec_ext in '' $ac_executable_extensions; do
26073  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26074    ac_cv_prog_ac_ct_NM="nm"
26075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26076    break 2
26077  fi
26078done
26079  done
26080IFS=$as_save_IFS
26081
26082fi
26083fi
26084ac_ct_NM=$ac_cv_prog_ac_ct_NM
26085if test -n "$ac_ct_NM"; then
26086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26087$as_echo "$ac_ct_NM" >&6; }
26088else
26089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26090$as_echo "no" >&6; }
26091fi
26092
26093  if test "x$ac_ct_NM" = x; then
26094    NM=""
26095  else
26096    case $cross_compiling:$ac_tool_warned in
26097yes:)
26098{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26099$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26100ac_tool_warned=yes ;;
26101esac
26102    NM=$ac_ct_NM
26103  fi
26104else
26105  NM="$ac_cv_prog_NM"
26106fi
26107
26108
26109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26110
26111  # First separate the path from the arguments. This will split at the first
26112  # space.
26113  complete="$NM"
26114  path="${complete%% *}"
26115  tmp="$complete EOL"
26116  arguments="${tmp#* }"
26117
26118  # Input might be given as Windows format, start by converting to
26119  # unix format.
26120  new_path=`$CYGPATH -u "$path"`
26121
26122  # Now try to locate executable using which
26123  new_path=`$WHICH "$new_path" 2> /dev/null`
26124  # bat and cmd files are not always considered executable in cygwin causing which
26125  # to not find them
26126  if test "x$new_path" = x \
26127           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26128           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26129    new_path=`$CYGPATH -u "$path"`
26130  fi
26131  if test "x$new_path" = x; then
26132    # Oops. Which didn't find the executable.
26133    # The splitting of arguments from the executable at a space might have been incorrect,
26134    # since paths with space are more likely in Windows. Give it another try with the whole
26135    # argument.
26136    path="$complete"
26137    arguments="EOL"
26138    new_path=`$CYGPATH -u "$path"`
26139    new_path=`$WHICH "$new_path" 2> /dev/null`
26140    # bat and cmd files are not always considered executable in cygwin causing which
26141    # to not find them
26142    if test "x$new_path" = x \
26143             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26144             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26145      new_path=`$CYGPATH -u "$path"`
26146    fi
26147    if test "x$new_path" = x; then
26148      # It's still not found. Now this is an unrecoverable error.
26149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26150$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26151      has_space=`$ECHO "$complete" | $GREP " "`
26152      if test "x$has_space" != x; then
26153        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26154$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26155      fi
26156      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26157    fi
26158  fi
26159
26160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26163  # "foo.exe" is OK but "foo" is an error.
26164  #
26165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26166  # It is also a way to make sure we got the proper file name for the real test later on.
26167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26168  if test "x$test_shortpath" = x; then
26169    # Short path failed, file does not exist as specified.
26170    # Try adding .exe or .cmd
26171    if test -f "${new_path}.exe"; then
26172       input_to_shortpath="${new_path}.exe"
26173    elif test -f "${new_path}.cmd"; then
26174       input_to_shortpath="${new_path}.cmd"
26175    else
26176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26177$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26178      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26179$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26180      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26181    fi
26182  else
26183    input_to_shortpath="$new_path"
26184  fi
26185
26186  # Call helper function which possibly converts this using DOS-style short mode.
26187  # If so, the updated path is stored in $new_path.
26188  new_path="$input_to_shortpath"
26189
26190  input_path="$input_to_shortpath"
26191  # Check if we need to convert this using DOS-style short mode. If the path
26192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26193  # take no chances and rewrite it.
26194  # Note: m4 eats our [], so we need to use [ and ] instead.
26195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26196  if test "x$has_forbidden_chars" != x; then
26197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26201      # Going to short mode and back again did indeed matter. Since short mode is
26202      # case insensitive, let's make it lowercase to improve readability.
26203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26204      # Now convert it back to Unix-stile (cygpath)
26205      input_path=`$CYGPATH -u "$shortmode_path"`
26206      new_path="$input_path"
26207    fi
26208  fi
26209
26210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26211  if test "x$test_cygdrive_prefix" = x; then
26212    # As a simple fix, exclude /usr/bin since it's not a real path.
26213    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26215      # a path prefixed by /cygdrive for fixpath to work.
26216      new_path="$CYGWIN_ROOT_PATH$input_path"
26217    fi
26218  fi
26219
26220  # remove trailing .exe if any
26221  new_path="${new_path/%.exe/}"
26222
26223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26224
26225  # First separate the path from the arguments. This will split at the first
26226  # space.
26227  complete="$NM"
26228  path="${complete%% *}"
26229  tmp="$complete EOL"
26230  arguments="${tmp#* }"
26231
26232  # Input might be given as Windows format, start by converting to
26233  # unix format.
26234  new_path="$path"
26235
26236  windows_path="$new_path"
26237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26238    unix_path=`$CYGPATH -u "$windows_path"`
26239    new_path="$unix_path"
26240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26242    new_path="$unix_path"
26243  fi
26244
26245
26246  # Now try to locate executable using which
26247  new_path=`$WHICH "$new_path" 2> /dev/null`
26248
26249  if test "x$new_path" = x; then
26250    # Oops. Which didn't find the executable.
26251    # The splitting of arguments from the executable at a space might have been incorrect,
26252    # since paths with space are more likely in Windows. Give it another try with the whole
26253    # argument.
26254    path="$complete"
26255    arguments="EOL"
26256    new_path="$path"
26257
26258  windows_path="$new_path"
26259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26260    unix_path=`$CYGPATH -u "$windows_path"`
26261    new_path="$unix_path"
26262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26264    new_path="$unix_path"
26265  fi
26266
26267
26268    new_path=`$WHICH "$new_path" 2> /dev/null`
26269
26270    if test "x$new_path" = x; then
26271      # It's still not found. Now this is an unrecoverable error.
26272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26273$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26274      has_space=`$ECHO "$complete" | $GREP " "`
26275      if test "x$has_space" != x; then
26276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26278      fi
26279      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26280    fi
26281  fi
26282
26283  # Now new_path has a complete unix path to the binary
26284  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26285    # Keep paths in /bin as-is, but remove trailing .exe if any
26286    new_path="${new_path/%.exe/}"
26287    # Do not save /bin paths to all_fixpath_prefixes!
26288  else
26289    # Not in mixed or Windows style, start by that.
26290    new_path=`cmd //c echo $new_path`
26291
26292  input_path="$new_path"
26293  # Check if we need to convert this using DOS-style short mode. If the path
26294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26295  # take no chances and rewrite it.
26296  # Note: m4 eats our [], so we need to use [ and ] instead.
26297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26298  if test "x$has_forbidden_chars" != x; then
26299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26301  fi
26302
26303    # Output is in $new_path
26304
26305  windows_path="$new_path"
26306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26307    unix_path=`$CYGPATH -u "$windows_path"`
26308    new_path="$unix_path"
26309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26311    new_path="$unix_path"
26312  fi
26313
26314    # remove trailing .exe if any
26315    new_path="${new_path/%.exe/}"
26316
26317    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26318    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26319  fi
26320
26321  else
26322    # We're on a posix platform. Hooray! :)
26323    # First separate the path from the arguments. This will split at the first
26324    # space.
26325    complete="$NM"
26326    path="${complete%% *}"
26327    tmp="$complete EOL"
26328    arguments="${tmp#* }"
26329
26330    # Cannot rely on the command "which" here since it doesn't always work.
26331    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26332    if test -z "$is_absolute_path"; then
26333      # Path to executable is not absolute. Find it.
26334      IFS_save="$IFS"
26335      IFS=:
26336      for p in $PATH; do
26337        if test -f "$p/$path" && test -x "$p/$path"; then
26338          new_path="$p/$path"
26339          break
26340        fi
26341      done
26342      IFS="$IFS_save"
26343    else
26344      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26345$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26346      new_path="$path"
26347    fi
26348
26349    if test "x$new_path" = x; then
26350        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26351$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26352        has_space=`$ECHO "$complete" | $GREP " "`
26353        if test "x$has_space" != x; then
26354          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26355$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26356        fi
26357        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26358      fi
26359  fi
26360
26361      # Now join together the path and the arguments once again
26362      if test "x$arguments" != xEOL; then
26363        new_complete="$new_path ${arguments% *}"
26364      else
26365        new_complete="$new_path"
26366      fi
26367
26368  if test "x$complete" != "x$new_complete"; then
26369      NM="$new_complete"
26370      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26371$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26372    fi
26373
26374    if test -n "$ac_tool_prefix"; then
26375  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26376set dummy ${ac_tool_prefix}strip; ac_word=$2
26377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26378$as_echo_n "checking for $ac_word... " >&6; }
26379if ${ac_cv_prog_STRIP+:} false; then :
26380  $as_echo_n "(cached) " >&6
26381else
26382  if test -n "$STRIP"; then
26383  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26384else
26385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26386for as_dir in $PATH
26387do
26388  IFS=$as_save_IFS
26389  test -z "$as_dir" && as_dir=.
26390    for ac_exec_ext in '' $ac_executable_extensions; do
26391  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26392    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26394    break 2
26395  fi
26396done
26397  done
26398IFS=$as_save_IFS
26399
26400fi
26401fi
26402STRIP=$ac_cv_prog_STRIP
26403if test -n "$STRIP"; then
26404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26405$as_echo "$STRIP" >&6; }
26406else
26407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26408$as_echo "no" >&6; }
26409fi
26410
26411
26412fi
26413if test -z "$ac_cv_prog_STRIP"; then
26414  ac_ct_STRIP=$STRIP
26415  # Extract the first word of "strip", so it can be a program name with args.
26416set dummy strip; ac_word=$2
26417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26418$as_echo_n "checking for $ac_word... " >&6; }
26419if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26420  $as_echo_n "(cached) " >&6
26421else
26422  if test -n "$ac_ct_STRIP"; then
26423  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26424else
26425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26426for as_dir in $PATH
26427do
26428  IFS=$as_save_IFS
26429  test -z "$as_dir" && as_dir=.
26430    for ac_exec_ext in '' $ac_executable_extensions; do
26431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26432    ac_cv_prog_ac_ct_STRIP="strip"
26433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26434    break 2
26435  fi
26436done
26437  done
26438IFS=$as_save_IFS
26439
26440fi
26441fi
26442ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26443if test -n "$ac_ct_STRIP"; then
26444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26445$as_echo "$ac_ct_STRIP" >&6; }
26446else
26447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26448$as_echo "no" >&6; }
26449fi
26450
26451  if test "x$ac_ct_STRIP" = x; then
26452    STRIP=""
26453  else
26454    case $cross_compiling:$ac_tool_warned in
26455yes:)
26456{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26457$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26458ac_tool_warned=yes ;;
26459esac
26460    STRIP=$ac_ct_STRIP
26461  fi
26462else
26463  STRIP="$ac_cv_prog_STRIP"
26464fi
26465
26466
26467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26468
26469  # First separate the path from the arguments. This will split at the first
26470  # space.
26471  complete="$STRIP"
26472  path="${complete%% *}"
26473  tmp="$complete EOL"
26474  arguments="${tmp#* }"
26475
26476  # Input might be given as Windows format, start by converting to
26477  # unix format.
26478  new_path=`$CYGPATH -u "$path"`
26479
26480  # Now try to locate executable using which
26481  new_path=`$WHICH "$new_path" 2> /dev/null`
26482  # bat and cmd files are not always considered executable in cygwin causing which
26483  # to not find them
26484  if test "x$new_path" = x \
26485           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26486           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26487    new_path=`$CYGPATH -u "$path"`
26488  fi
26489  if test "x$new_path" = x; then
26490    # Oops. Which didn't find the executable.
26491    # The splitting of arguments from the executable at a space might have been incorrect,
26492    # since paths with space are more likely in Windows. Give it another try with the whole
26493    # argument.
26494    path="$complete"
26495    arguments="EOL"
26496    new_path=`$CYGPATH -u "$path"`
26497    new_path=`$WHICH "$new_path" 2> /dev/null`
26498    # bat and cmd files are not always considered executable in cygwin causing which
26499    # to not find them
26500    if test "x$new_path" = x \
26501             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26502             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26503      new_path=`$CYGPATH -u "$path"`
26504    fi
26505    if test "x$new_path" = x; then
26506      # It's still not found. Now this is an unrecoverable error.
26507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26508$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26509      has_space=`$ECHO "$complete" | $GREP " "`
26510      if test "x$has_space" != x; then
26511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26513      fi
26514      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26515    fi
26516  fi
26517
26518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26521  # "foo.exe" is OK but "foo" is an error.
26522  #
26523  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26524  # It is also a way to make sure we got the proper file name for the real test later on.
26525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26526  if test "x$test_shortpath" = x; then
26527    # Short path failed, file does not exist as specified.
26528    # Try adding .exe or .cmd
26529    if test -f "${new_path}.exe"; then
26530       input_to_shortpath="${new_path}.exe"
26531    elif test -f "${new_path}.cmd"; then
26532       input_to_shortpath="${new_path}.cmd"
26533    else
26534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26535$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26536      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26537$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26538      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26539    fi
26540  else
26541    input_to_shortpath="$new_path"
26542  fi
26543
26544  # Call helper function which possibly converts this using DOS-style short mode.
26545  # If so, the updated path is stored in $new_path.
26546  new_path="$input_to_shortpath"
26547
26548  input_path="$input_to_shortpath"
26549  # Check if we need to convert this using DOS-style short mode. If the path
26550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26551  # take no chances and rewrite it.
26552  # Note: m4 eats our [], so we need to use [ and ] instead.
26553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26554  if test "x$has_forbidden_chars" != x; then
26555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26559      # Going to short mode and back again did indeed matter. Since short mode is
26560      # case insensitive, let's make it lowercase to improve readability.
26561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26562      # Now convert it back to Unix-stile (cygpath)
26563      input_path=`$CYGPATH -u "$shortmode_path"`
26564      new_path="$input_path"
26565    fi
26566  fi
26567
26568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26569  if test "x$test_cygdrive_prefix" = x; then
26570    # As a simple fix, exclude /usr/bin since it's not a real path.
26571    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26573      # a path prefixed by /cygdrive for fixpath to work.
26574      new_path="$CYGWIN_ROOT_PATH$input_path"
26575    fi
26576  fi
26577
26578  # remove trailing .exe if any
26579  new_path="${new_path/%.exe/}"
26580
26581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26582
26583  # First separate the path from the arguments. This will split at the first
26584  # space.
26585  complete="$STRIP"
26586  path="${complete%% *}"
26587  tmp="$complete EOL"
26588  arguments="${tmp#* }"
26589
26590  # Input might be given as Windows format, start by converting to
26591  # unix format.
26592  new_path="$path"
26593
26594  windows_path="$new_path"
26595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26596    unix_path=`$CYGPATH -u "$windows_path"`
26597    new_path="$unix_path"
26598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26600    new_path="$unix_path"
26601  fi
26602
26603
26604  # Now try to locate executable using which
26605  new_path=`$WHICH "$new_path" 2> /dev/null`
26606
26607  if test "x$new_path" = x; then
26608    # Oops. Which didn't find the executable.
26609    # The splitting of arguments from the executable at a space might have been incorrect,
26610    # since paths with space are more likely in Windows. Give it another try with the whole
26611    # argument.
26612    path="$complete"
26613    arguments="EOL"
26614    new_path="$path"
26615
26616  windows_path="$new_path"
26617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26618    unix_path=`$CYGPATH -u "$windows_path"`
26619    new_path="$unix_path"
26620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26622    new_path="$unix_path"
26623  fi
26624
26625
26626    new_path=`$WHICH "$new_path" 2> /dev/null`
26627
26628    if test "x$new_path" = x; then
26629      # It's still not found. Now this is an unrecoverable error.
26630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26631$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26632      has_space=`$ECHO "$complete" | $GREP " "`
26633      if test "x$has_space" != x; then
26634        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26635$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26636      fi
26637      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26638    fi
26639  fi
26640
26641  # Now new_path has a complete unix path to the binary
26642  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26643    # Keep paths in /bin as-is, but remove trailing .exe if any
26644    new_path="${new_path/%.exe/}"
26645    # Do not save /bin paths to all_fixpath_prefixes!
26646  else
26647    # Not in mixed or Windows style, start by that.
26648    new_path=`cmd //c echo $new_path`
26649
26650  input_path="$new_path"
26651  # Check if we need to convert this using DOS-style short mode. If the path
26652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26653  # take no chances and rewrite it.
26654  # Note: m4 eats our [], so we need to use [ and ] instead.
26655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26656  if test "x$has_forbidden_chars" != x; then
26657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26659  fi
26660
26661    # Output is in $new_path
26662
26663  windows_path="$new_path"
26664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26665    unix_path=`$CYGPATH -u "$windows_path"`
26666    new_path="$unix_path"
26667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26669    new_path="$unix_path"
26670  fi
26671
26672    # remove trailing .exe if any
26673    new_path="${new_path/%.exe/}"
26674
26675    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26676    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26677  fi
26678
26679  else
26680    # We're on a posix platform. Hooray! :)
26681    # First separate the path from the arguments. This will split at the first
26682    # space.
26683    complete="$STRIP"
26684    path="${complete%% *}"
26685    tmp="$complete EOL"
26686    arguments="${tmp#* }"
26687
26688    # Cannot rely on the command "which" here since it doesn't always work.
26689    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26690    if test -z "$is_absolute_path"; then
26691      # Path to executable is not absolute. Find it.
26692      IFS_save="$IFS"
26693      IFS=:
26694      for p in $PATH; do
26695        if test -f "$p/$path" && test -x "$p/$path"; then
26696          new_path="$p/$path"
26697          break
26698        fi
26699      done
26700      IFS="$IFS_save"
26701    else
26702      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26703$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26704      new_path="$path"
26705    fi
26706
26707    if test "x$new_path" = x; then
26708        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26709$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26710        has_space=`$ECHO "$complete" | $GREP " "`
26711        if test "x$has_space" != x; then
26712          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26713$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26714        fi
26715        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26716      fi
26717  fi
26718
26719      # Now join together the path and the arguments once again
26720      if test "x$arguments" != xEOL; then
26721        new_complete="$new_path ${arguments% *}"
26722      else
26723        new_complete="$new_path"
26724      fi
26725
26726  if test "x$complete" != "x$new_complete"; then
26727      STRIP="$new_complete"
26728      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26729$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26730    fi
26731
26732fi
26733
26734# objcopy is used for moving debug symbols to separate files when
26735# full debug symbols are enabled.
26736if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26737    if test -n "$ac_tool_prefix"; then
26738  for ac_prog in gobjcopy objcopy
26739  do
26740    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26741set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26743$as_echo_n "checking for $ac_word... " >&6; }
26744if ${ac_cv_prog_OBJCOPY+:} false; then :
26745  $as_echo_n "(cached) " >&6
26746else
26747  if test -n "$OBJCOPY"; then
26748  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26749else
26750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26751for as_dir in $PATH
26752do
26753  IFS=$as_save_IFS
26754  test -z "$as_dir" && as_dir=.
26755    for ac_exec_ext in '' $ac_executable_extensions; do
26756  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26757    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26759    break 2
26760  fi
26761done
26762  done
26763IFS=$as_save_IFS
26764
26765fi
26766fi
26767OBJCOPY=$ac_cv_prog_OBJCOPY
26768if test -n "$OBJCOPY"; then
26769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26770$as_echo "$OBJCOPY" >&6; }
26771else
26772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26773$as_echo "no" >&6; }
26774fi
26775
26776
26777    test -n "$OBJCOPY" && break
26778  done
26779fi
26780if test -z "$OBJCOPY"; then
26781  ac_ct_OBJCOPY=$OBJCOPY
26782  for ac_prog in gobjcopy objcopy
26783do
26784  # Extract the first word of "$ac_prog", so it can be a program name with args.
26785set dummy $ac_prog; ac_word=$2
26786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26787$as_echo_n "checking for $ac_word... " >&6; }
26788if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
26789  $as_echo_n "(cached) " >&6
26790else
26791  if test -n "$ac_ct_OBJCOPY"; then
26792  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26793else
26794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26795for as_dir in $PATH
26796do
26797  IFS=$as_save_IFS
26798  test -z "$as_dir" && as_dir=.
26799    for ac_exec_ext in '' $ac_executable_extensions; do
26800  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26801    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26803    break 2
26804  fi
26805done
26806  done
26807IFS=$as_save_IFS
26808
26809fi
26810fi
26811ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26812if test -n "$ac_ct_OBJCOPY"; then
26813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26814$as_echo "$ac_ct_OBJCOPY" >&6; }
26815else
26816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26817$as_echo "no" >&6; }
26818fi
26819
26820
26821  test -n "$ac_ct_OBJCOPY" && break
26822done
26823
26824  if test "x$ac_ct_OBJCOPY" = x; then
26825    OBJCOPY=""
26826  else
26827    case $cross_compiling:$ac_tool_warned in
26828yes:)
26829{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26830$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26831ac_tool_warned=yes ;;
26832esac
26833    OBJCOPY=$ac_ct_OBJCOPY
26834  fi
26835fi
26836
26837    # Only call fixup if objcopy was found.
26838    if test -n "$OBJCOPY"; then
26839
26840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26841
26842  # First separate the path from the arguments. This will split at the first
26843  # space.
26844  complete="$OBJCOPY"
26845  path="${complete%% *}"
26846  tmp="$complete EOL"
26847  arguments="${tmp#* }"
26848
26849  # Input might be given as Windows format, start by converting to
26850  # unix format.
26851  new_path=`$CYGPATH -u "$path"`
26852
26853  # Now try to locate executable using which
26854  new_path=`$WHICH "$new_path" 2> /dev/null`
26855  # bat and cmd files are not always considered executable in cygwin causing which
26856  # to not find them
26857  if test "x$new_path" = x \
26858           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26859           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26860    new_path=`$CYGPATH -u "$path"`
26861  fi
26862  if test "x$new_path" = x; then
26863    # Oops. Which didn't find the executable.
26864    # The splitting of arguments from the executable at a space might have been incorrect,
26865    # since paths with space are more likely in Windows. Give it another try with the whole
26866    # argument.
26867    path="$complete"
26868    arguments="EOL"
26869    new_path=`$CYGPATH -u "$path"`
26870    new_path=`$WHICH "$new_path" 2> /dev/null`
26871    # bat and cmd files are not always considered executable in cygwin causing which
26872    # to not find them
26873    if test "x$new_path" = x \
26874             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26875             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26876      new_path=`$CYGPATH -u "$path"`
26877    fi
26878    if test "x$new_path" = x; then
26879      # It's still not found. Now this is an unrecoverable error.
26880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26881$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26882      has_space=`$ECHO "$complete" | $GREP " "`
26883      if test "x$has_space" != x; then
26884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26886      fi
26887      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26888    fi
26889  fi
26890
26891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26894  # "foo.exe" is OK but "foo" is an error.
26895  #
26896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26897  # It is also a way to make sure we got the proper file name for the real test later on.
26898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26899  if test "x$test_shortpath" = x; then
26900    # Short path failed, file does not exist as specified.
26901    # Try adding .exe or .cmd
26902    if test -f "${new_path}.exe"; then
26903       input_to_shortpath="${new_path}.exe"
26904    elif test -f "${new_path}.cmd"; then
26905       input_to_shortpath="${new_path}.cmd"
26906    else
26907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26908$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26909      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26910$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26911      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26912    fi
26913  else
26914    input_to_shortpath="$new_path"
26915  fi
26916
26917  # Call helper function which possibly converts this using DOS-style short mode.
26918  # If so, the updated path is stored in $new_path.
26919  new_path="$input_to_shortpath"
26920
26921  input_path="$input_to_shortpath"
26922  # Check if we need to convert this using DOS-style short mode. If the path
26923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26924  # take no chances and rewrite it.
26925  # Note: m4 eats our [], so we need to use [ and ] instead.
26926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26927  if test "x$has_forbidden_chars" != x; then
26928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26932      # Going to short mode and back again did indeed matter. Since short mode is
26933      # case insensitive, let's make it lowercase to improve readability.
26934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26935      # Now convert it back to Unix-stile (cygpath)
26936      input_path=`$CYGPATH -u "$shortmode_path"`
26937      new_path="$input_path"
26938    fi
26939  fi
26940
26941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26942  if test "x$test_cygdrive_prefix" = x; then
26943    # As a simple fix, exclude /usr/bin since it's not a real path.
26944    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26946      # a path prefixed by /cygdrive for fixpath to work.
26947      new_path="$CYGWIN_ROOT_PATH$input_path"
26948    fi
26949  fi
26950
26951  # remove trailing .exe if any
26952  new_path="${new_path/%.exe/}"
26953
26954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26955
26956  # First separate the path from the arguments. This will split at the first
26957  # space.
26958  complete="$OBJCOPY"
26959  path="${complete%% *}"
26960  tmp="$complete EOL"
26961  arguments="${tmp#* }"
26962
26963  # Input might be given as Windows format, start by converting to
26964  # unix format.
26965  new_path="$path"
26966
26967  windows_path="$new_path"
26968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26969    unix_path=`$CYGPATH -u "$windows_path"`
26970    new_path="$unix_path"
26971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26973    new_path="$unix_path"
26974  fi
26975
26976
26977  # Now try to locate executable using which
26978  new_path=`$WHICH "$new_path" 2> /dev/null`
26979
26980  if test "x$new_path" = x; then
26981    # Oops. Which didn't find the executable.
26982    # The splitting of arguments from the executable at a space might have been incorrect,
26983    # since paths with space are more likely in Windows. Give it another try with the whole
26984    # argument.
26985    path="$complete"
26986    arguments="EOL"
26987    new_path="$path"
26988
26989  windows_path="$new_path"
26990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26991    unix_path=`$CYGPATH -u "$windows_path"`
26992    new_path="$unix_path"
26993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26995    new_path="$unix_path"
26996  fi
26997
26998
26999    new_path=`$WHICH "$new_path" 2> /dev/null`
27000
27001    if test "x$new_path" = x; then
27002      # It's still not found. Now this is an unrecoverable error.
27003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27004$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27005      has_space=`$ECHO "$complete" | $GREP " "`
27006      if test "x$has_space" != x; then
27007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27009      fi
27010      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27011    fi
27012  fi
27013
27014  # Now new_path has a complete unix path to the binary
27015  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27016    # Keep paths in /bin as-is, but remove trailing .exe if any
27017    new_path="${new_path/%.exe/}"
27018    # Do not save /bin paths to all_fixpath_prefixes!
27019  else
27020    # Not in mixed or Windows style, start by that.
27021    new_path=`cmd //c echo $new_path`
27022
27023  input_path="$new_path"
27024  # Check if we need to convert this using DOS-style short mode. If the path
27025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27026  # take no chances and rewrite it.
27027  # Note: m4 eats our [], so we need to use [ and ] instead.
27028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27029  if test "x$has_forbidden_chars" != x; then
27030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27032  fi
27033
27034    # Output is in $new_path
27035
27036  windows_path="$new_path"
27037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27038    unix_path=`$CYGPATH -u "$windows_path"`
27039    new_path="$unix_path"
27040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27042    new_path="$unix_path"
27043  fi
27044
27045    # remove trailing .exe if any
27046    new_path="${new_path/%.exe/}"
27047
27048    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27049    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27050  fi
27051
27052  else
27053    # We're on a posix platform. Hooray! :)
27054    # First separate the path from the arguments. This will split at the first
27055    # space.
27056    complete="$OBJCOPY"
27057    path="${complete%% *}"
27058    tmp="$complete EOL"
27059    arguments="${tmp#* }"
27060
27061    # Cannot rely on the command "which" here since it doesn't always work.
27062    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27063    if test -z "$is_absolute_path"; then
27064      # Path to executable is not absolute. Find it.
27065      IFS_save="$IFS"
27066      IFS=:
27067      for p in $PATH; do
27068        if test -f "$p/$path" && test -x "$p/$path"; then
27069          new_path="$p/$path"
27070          break
27071        fi
27072      done
27073      IFS="$IFS_save"
27074    else
27075      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27076$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27077      new_path="$path"
27078    fi
27079
27080    if test "x$new_path" = x; then
27081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27082$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27083        has_space=`$ECHO "$complete" | $GREP " "`
27084        if test "x$has_space" != x; then
27085          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27086$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27087        fi
27088        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27089      fi
27090  fi
27091
27092      # Now join together the path and the arguments once again
27093      if test "x$arguments" != xEOL; then
27094        new_complete="$new_path ${arguments% *}"
27095      else
27096        new_complete="$new_path"
27097      fi
27098
27099  if test "x$complete" != "x$new_complete"; then
27100      OBJCOPY="$new_complete"
27101      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27102$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27103    fi
27104
27105    fi
27106fi
27107
27108if test -n "$ac_tool_prefix"; then
27109  for ac_prog in gobjdump objdump
27110  do
27111    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27112set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27114$as_echo_n "checking for $ac_word... " >&6; }
27115if ${ac_cv_prog_OBJDUMP+:} false; then :
27116  $as_echo_n "(cached) " >&6
27117else
27118  if test -n "$OBJDUMP"; then
27119  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27120else
27121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27122for as_dir in $PATH
27123do
27124  IFS=$as_save_IFS
27125  test -z "$as_dir" && as_dir=.
27126    for ac_exec_ext in '' $ac_executable_extensions; do
27127  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27128    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27130    break 2
27131  fi
27132done
27133  done
27134IFS=$as_save_IFS
27135
27136fi
27137fi
27138OBJDUMP=$ac_cv_prog_OBJDUMP
27139if test -n "$OBJDUMP"; then
27140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27141$as_echo "$OBJDUMP" >&6; }
27142else
27143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27144$as_echo "no" >&6; }
27145fi
27146
27147
27148    test -n "$OBJDUMP" && break
27149  done
27150fi
27151if test -z "$OBJDUMP"; then
27152  ac_ct_OBJDUMP=$OBJDUMP
27153  for ac_prog in gobjdump objdump
27154do
27155  # Extract the first word of "$ac_prog", so it can be a program name with args.
27156set dummy $ac_prog; ac_word=$2
27157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27158$as_echo_n "checking for $ac_word... " >&6; }
27159if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27160  $as_echo_n "(cached) " >&6
27161else
27162  if test -n "$ac_ct_OBJDUMP"; then
27163  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27164else
27165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27166for as_dir in $PATH
27167do
27168  IFS=$as_save_IFS
27169  test -z "$as_dir" && as_dir=.
27170    for ac_exec_ext in '' $ac_executable_extensions; do
27171  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27172    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27174    break 2
27175  fi
27176done
27177  done
27178IFS=$as_save_IFS
27179
27180fi
27181fi
27182ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27183if test -n "$ac_ct_OBJDUMP"; then
27184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27185$as_echo "$ac_ct_OBJDUMP" >&6; }
27186else
27187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27188$as_echo "no" >&6; }
27189fi
27190
27191
27192  test -n "$ac_ct_OBJDUMP" && break
27193done
27194
27195  if test "x$ac_ct_OBJDUMP" = x; then
27196    OBJDUMP=""
27197  else
27198    case $cross_compiling:$ac_tool_warned in
27199yes:)
27200{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27201$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27202ac_tool_warned=yes ;;
27203esac
27204    OBJDUMP=$ac_ct_OBJDUMP
27205  fi
27206fi
27207
27208if test "x$OBJDUMP" != x; then
27209  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27210
27211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27212
27213  # First separate the path from the arguments. This will split at the first
27214  # space.
27215  complete="$OBJDUMP"
27216  path="${complete%% *}"
27217  tmp="$complete EOL"
27218  arguments="${tmp#* }"
27219
27220  # Input might be given as Windows format, start by converting to
27221  # unix format.
27222  new_path=`$CYGPATH -u "$path"`
27223
27224  # Now try to locate executable using which
27225  new_path=`$WHICH "$new_path" 2> /dev/null`
27226  # bat and cmd files are not always considered executable in cygwin causing which
27227  # to not find them
27228  if test "x$new_path" = x \
27229           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27230           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27231    new_path=`$CYGPATH -u "$path"`
27232  fi
27233  if test "x$new_path" = x; then
27234    # Oops. Which didn't find the executable.
27235    # The splitting of arguments from the executable at a space might have been incorrect,
27236    # since paths with space are more likely in Windows. Give it another try with the whole
27237    # argument.
27238    path="$complete"
27239    arguments="EOL"
27240    new_path=`$CYGPATH -u "$path"`
27241    new_path=`$WHICH "$new_path" 2> /dev/null`
27242    # bat and cmd files are not always considered executable in cygwin causing which
27243    # to not find them
27244    if test "x$new_path" = x \
27245             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27246             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27247      new_path=`$CYGPATH -u "$path"`
27248    fi
27249    if test "x$new_path" = x; then
27250      # It's still not found. Now this is an unrecoverable error.
27251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27252$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27253      has_space=`$ECHO "$complete" | $GREP " "`
27254      if test "x$has_space" != x; then
27255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27257      fi
27258      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27259    fi
27260  fi
27261
27262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27265  # "foo.exe" is OK but "foo" is an error.
27266  #
27267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27268  # It is also a way to make sure we got the proper file name for the real test later on.
27269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27270  if test "x$test_shortpath" = x; then
27271    # Short path failed, file does not exist as specified.
27272    # Try adding .exe or .cmd
27273    if test -f "${new_path}.exe"; then
27274       input_to_shortpath="${new_path}.exe"
27275    elif test -f "${new_path}.cmd"; then
27276       input_to_shortpath="${new_path}.cmd"
27277    else
27278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27279$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27280      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27281$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27282      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27283    fi
27284  else
27285    input_to_shortpath="$new_path"
27286  fi
27287
27288  # Call helper function which possibly converts this using DOS-style short mode.
27289  # If so, the updated path is stored in $new_path.
27290  new_path="$input_to_shortpath"
27291
27292  input_path="$input_to_shortpath"
27293  # Check if we need to convert this using DOS-style short mode. If the path
27294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27295  # take no chances and rewrite it.
27296  # Note: m4 eats our [], so we need to use [ and ] instead.
27297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27298  if test "x$has_forbidden_chars" != x; then
27299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27303      # Going to short mode and back again did indeed matter. Since short mode is
27304      # case insensitive, let's make it lowercase to improve readability.
27305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27306      # Now convert it back to Unix-stile (cygpath)
27307      input_path=`$CYGPATH -u "$shortmode_path"`
27308      new_path="$input_path"
27309    fi
27310  fi
27311
27312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27313  if test "x$test_cygdrive_prefix" = x; then
27314    # As a simple fix, exclude /usr/bin since it's not a real path.
27315    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27317      # a path prefixed by /cygdrive for fixpath to work.
27318      new_path="$CYGWIN_ROOT_PATH$input_path"
27319    fi
27320  fi
27321
27322  # remove trailing .exe if any
27323  new_path="${new_path/%.exe/}"
27324
27325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27326
27327  # First separate the path from the arguments. This will split at the first
27328  # space.
27329  complete="$OBJDUMP"
27330  path="${complete%% *}"
27331  tmp="$complete EOL"
27332  arguments="${tmp#* }"
27333
27334  # Input might be given as Windows format, start by converting to
27335  # unix format.
27336  new_path="$path"
27337
27338  windows_path="$new_path"
27339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27340    unix_path=`$CYGPATH -u "$windows_path"`
27341    new_path="$unix_path"
27342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27344    new_path="$unix_path"
27345  fi
27346
27347
27348  # Now try to locate executable using which
27349  new_path=`$WHICH "$new_path" 2> /dev/null`
27350
27351  if test "x$new_path" = x; then
27352    # Oops. Which didn't find the executable.
27353    # The splitting of arguments from the executable at a space might have been incorrect,
27354    # since paths with space are more likely in Windows. Give it another try with the whole
27355    # argument.
27356    path="$complete"
27357    arguments="EOL"
27358    new_path="$path"
27359
27360  windows_path="$new_path"
27361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27362    unix_path=`$CYGPATH -u "$windows_path"`
27363    new_path="$unix_path"
27364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27366    new_path="$unix_path"
27367  fi
27368
27369
27370    new_path=`$WHICH "$new_path" 2> /dev/null`
27371
27372    if test "x$new_path" = x; then
27373      # It's still not found. Now this is an unrecoverable error.
27374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27375$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27376      has_space=`$ECHO "$complete" | $GREP " "`
27377      if test "x$has_space" != x; then
27378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27380      fi
27381      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27382    fi
27383  fi
27384
27385  # Now new_path has a complete unix path to the binary
27386  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27387    # Keep paths in /bin as-is, but remove trailing .exe if any
27388    new_path="${new_path/%.exe/}"
27389    # Do not save /bin paths to all_fixpath_prefixes!
27390  else
27391    # Not in mixed or Windows style, start by that.
27392    new_path=`cmd //c echo $new_path`
27393
27394  input_path="$new_path"
27395  # Check if we need to convert this using DOS-style short mode. If the path
27396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27397  # take no chances and rewrite it.
27398  # Note: m4 eats our [], so we need to use [ and ] instead.
27399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27400  if test "x$has_forbidden_chars" != x; then
27401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27403  fi
27404
27405    # Output is in $new_path
27406
27407  windows_path="$new_path"
27408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27409    unix_path=`$CYGPATH -u "$windows_path"`
27410    new_path="$unix_path"
27411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27413    new_path="$unix_path"
27414  fi
27415
27416    # remove trailing .exe if any
27417    new_path="${new_path/%.exe/}"
27418
27419    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27420    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27421  fi
27422
27423  else
27424    # We're on a posix platform. Hooray! :)
27425    # First separate the path from the arguments. This will split at the first
27426    # space.
27427    complete="$OBJDUMP"
27428    path="${complete%% *}"
27429    tmp="$complete EOL"
27430    arguments="${tmp#* }"
27431
27432    # Cannot rely on the command "which" here since it doesn't always work.
27433    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27434    if test -z "$is_absolute_path"; then
27435      # Path to executable is not absolute. Find it.
27436      IFS_save="$IFS"
27437      IFS=:
27438      for p in $PATH; do
27439        if test -f "$p/$path" && test -x "$p/$path"; then
27440          new_path="$p/$path"
27441          break
27442        fi
27443      done
27444      IFS="$IFS_save"
27445    else
27446      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27447$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27448      new_path="$path"
27449    fi
27450
27451    if test "x$new_path" = x; then
27452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27453$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27454        has_space=`$ECHO "$complete" | $GREP " "`
27455        if test "x$has_space" != x; then
27456          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27458        fi
27459        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27460      fi
27461  fi
27462
27463      # Now join together the path and the arguments once again
27464      if test "x$arguments" != xEOL; then
27465        new_complete="$new_path ${arguments% *}"
27466      else
27467        new_complete="$new_path"
27468      fi
27469
27470  if test "x$complete" != "x$new_complete"; then
27471      OBJDUMP="$new_complete"
27472      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27473$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27474    fi
27475
27476fi
27477
27478if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27479   # Extract the first word of "lipo", so it can be a program name with args.
27480set dummy lipo; ac_word=$2
27481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27482$as_echo_n "checking for $ac_word... " >&6; }
27483if ${ac_cv_path_LIPO+:} false; then :
27484  $as_echo_n "(cached) " >&6
27485else
27486  case $LIPO in
27487  [\\/]* | ?:[\\/]*)
27488  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27489  ;;
27490  *)
27491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27492for as_dir in $PATH
27493do
27494  IFS=$as_save_IFS
27495  test -z "$as_dir" && as_dir=.
27496    for ac_exec_ext in '' $ac_executable_extensions; do
27497  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27498    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27500    break 2
27501  fi
27502done
27503  done
27504IFS=$as_save_IFS
27505
27506  ;;
27507esac
27508fi
27509LIPO=$ac_cv_path_LIPO
27510if test -n "$LIPO"; then
27511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27512$as_echo "$LIPO" >&6; }
27513else
27514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27515$as_echo "no" >&6; }
27516fi
27517
27518
27519
27520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27521
27522  # First separate the path from the arguments. This will split at the first
27523  # space.
27524  complete="$LIPO"
27525  path="${complete%% *}"
27526  tmp="$complete EOL"
27527  arguments="${tmp#* }"
27528
27529  # Input might be given as Windows format, start by converting to
27530  # unix format.
27531  new_path=`$CYGPATH -u "$path"`
27532
27533  # Now try to locate executable using which
27534  new_path=`$WHICH "$new_path" 2> /dev/null`
27535  # bat and cmd files are not always considered executable in cygwin causing which
27536  # to not find them
27537  if test "x$new_path" = x \
27538           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27539           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27540    new_path=`$CYGPATH -u "$path"`
27541  fi
27542  if test "x$new_path" = x; then
27543    # Oops. Which didn't find the executable.
27544    # The splitting of arguments from the executable at a space might have been incorrect,
27545    # since paths with space are more likely in Windows. Give it another try with the whole
27546    # argument.
27547    path="$complete"
27548    arguments="EOL"
27549    new_path=`$CYGPATH -u "$path"`
27550    new_path=`$WHICH "$new_path" 2> /dev/null`
27551    # bat and cmd files are not always considered executable in cygwin causing which
27552    # to not find them
27553    if test "x$new_path" = x \
27554             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27555             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27556      new_path=`$CYGPATH -u "$path"`
27557    fi
27558    if test "x$new_path" = x; then
27559      # It's still not found. Now this is an unrecoverable error.
27560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27561$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27562      has_space=`$ECHO "$complete" | $GREP " "`
27563      if test "x$has_space" != x; then
27564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27566      fi
27567      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27568    fi
27569  fi
27570
27571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27574  # "foo.exe" is OK but "foo" is an error.
27575  #
27576  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27577  # It is also a way to make sure we got the proper file name for the real test later on.
27578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27579  if test "x$test_shortpath" = x; then
27580    # Short path failed, file does not exist as specified.
27581    # Try adding .exe or .cmd
27582    if test -f "${new_path}.exe"; then
27583       input_to_shortpath="${new_path}.exe"
27584    elif test -f "${new_path}.cmd"; then
27585       input_to_shortpath="${new_path}.cmd"
27586    else
27587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27588$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27589      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27590$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27591      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27592    fi
27593  else
27594    input_to_shortpath="$new_path"
27595  fi
27596
27597  # Call helper function which possibly converts this using DOS-style short mode.
27598  # If so, the updated path is stored in $new_path.
27599  new_path="$input_to_shortpath"
27600
27601  input_path="$input_to_shortpath"
27602  # Check if we need to convert this using DOS-style short mode. If the path
27603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27604  # take no chances and rewrite it.
27605  # Note: m4 eats our [], so we need to use [ and ] instead.
27606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27607  if test "x$has_forbidden_chars" != x; then
27608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27612      # Going to short mode and back again did indeed matter. Since short mode is
27613      # case insensitive, let's make it lowercase to improve readability.
27614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27615      # Now convert it back to Unix-stile (cygpath)
27616      input_path=`$CYGPATH -u "$shortmode_path"`
27617      new_path="$input_path"
27618    fi
27619  fi
27620
27621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27622  if test "x$test_cygdrive_prefix" = x; then
27623    # As a simple fix, exclude /usr/bin since it's not a real path.
27624    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27626      # a path prefixed by /cygdrive for fixpath to work.
27627      new_path="$CYGWIN_ROOT_PATH$input_path"
27628    fi
27629  fi
27630
27631  # remove trailing .exe if any
27632  new_path="${new_path/%.exe/}"
27633
27634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27635
27636  # First separate the path from the arguments. This will split at the first
27637  # space.
27638  complete="$LIPO"
27639  path="${complete%% *}"
27640  tmp="$complete EOL"
27641  arguments="${tmp#* }"
27642
27643  # Input might be given as Windows format, start by converting to
27644  # unix format.
27645  new_path="$path"
27646
27647  windows_path="$new_path"
27648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27649    unix_path=`$CYGPATH -u "$windows_path"`
27650    new_path="$unix_path"
27651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27653    new_path="$unix_path"
27654  fi
27655
27656
27657  # Now try to locate executable using which
27658  new_path=`$WHICH "$new_path" 2> /dev/null`
27659
27660  if test "x$new_path" = x; then
27661    # Oops. Which didn't find the executable.
27662    # The splitting of arguments from the executable at a space might have been incorrect,
27663    # since paths with space are more likely in Windows. Give it another try with the whole
27664    # argument.
27665    path="$complete"
27666    arguments="EOL"
27667    new_path="$path"
27668
27669  windows_path="$new_path"
27670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27671    unix_path=`$CYGPATH -u "$windows_path"`
27672    new_path="$unix_path"
27673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27675    new_path="$unix_path"
27676  fi
27677
27678
27679    new_path=`$WHICH "$new_path" 2> /dev/null`
27680
27681    if test "x$new_path" = x; then
27682      # It's still not found. Now this is an unrecoverable error.
27683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27684$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27685      has_space=`$ECHO "$complete" | $GREP " "`
27686      if test "x$has_space" != x; then
27687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27689      fi
27690      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27691    fi
27692  fi
27693
27694  # Now new_path has a complete unix path to the binary
27695  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27696    # Keep paths in /bin as-is, but remove trailing .exe if any
27697    new_path="${new_path/%.exe/}"
27698    # Do not save /bin paths to all_fixpath_prefixes!
27699  else
27700    # Not in mixed or Windows style, start by that.
27701    new_path=`cmd //c echo $new_path`
27702
27703  input_path="$new_path"
27704  # Check if we need to convert this using DOS-style short mode. If the path
27705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27706  # take no chances and rewrite it.
27707  # Note: m4 eats our [], so we need to use [ and ] instead.
27708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27709  if test "x$has_forbidden_chars" != x; then
27710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27712  fi
27713
27714    # Output is in $new_path
27715
27716  windows_path="$new_path"
27717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27718    unix_path=`$CYGPATH -u "$windows_path"`
27719    new_path="$unix_path"
27720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27722    new_path="$unix_path"
27723  fi
27724
27725    # remove trailing .exe if any
27726    new_path="${new_path/%.exe/}"
27727
27728    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27729    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27730  fi
27731
27732  else
27733    # We're on a posix platform. Hooray! :)
27734    # First separate the path from the arguments. This will split at the first
27735    # space.
27736    complete="$LIPO"
27737    path="${complete%% *}"
27738    tmp="$complete EOL"
27739    arguments="${tmp#* }"
27740
27741    # Cannot rely on the command "which" here since it doesn't always work.
27742    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27743    if test -z "$is_absolute_path"; then
27744      # Path to executable is not absolute. Find it.
27745      IFS_save="$IFS"
27746      IFS=:
27747      for p in $PATH; do
27748        if test -f "$p/$path" && test -x "$p/$path"; then
27749          new_path="$p/$path"
27750          break
27751        fi
27752      done
27753      IFS="$IFS_save"
27754    else
27755      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27756$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27757      new_path="$path"
27758    fi
27759
27760    if test "x$new_path" = x; then
27761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27762$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27763        has_space=`$ECHO "$complete" | $GREP " "`
27764        if test "x$has_space" != x; then
27765          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27766$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27767        fi
27768        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27769      fi
27770  fi
27771
27772      # Now join together the path and the arguments once again
27773      if test "x$arguments" != xEOL; then
27774        new_complete="$new_path ${arguments% *}"
27775      else
27776        new_complete="$new_path"
27777      fi
27778
27779  if test "x$complete" != "x$new_complete"; then
27780      LIPO="$new_complete"
27781      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27782$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27783    fi
27784
27785fi
27786
27787# Restore old path without tools dir
27788PATH="$OLD_PATH"
27789
27790
27791# FIXME: Currently we must test this after paths but before flags. Fix!
27792
27793# And we can test some aspects on the target using configure macros.
27794
27795
27796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27797$as_echo_n "checking for ANSI C header files... " >&6; }
27798if ${ac_cv_header_stdc+:} false; then :
27799  $as_echo_n "(cached) " >&6
27800else
27801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27802/* end confdefs.h.  */
27803#include <stdlib.h>
27804#include <stdarg.h>
27805#include <string.h>
27806#include <float.h>
27807
27808int
27809main ()
27810{
27811
27812  ;
27813  return 0;
27814}
27815_ACEOF
27816if ac_fn_cxx_try_compile "$LINENO"; then :
27817  ac_cv_header_stdc=yes
27818else
27819  ac_cv_header_stdc=no
27820fi
27821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27822
27823if test $ac_cv_header_stdc = yes; then
27824  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27826/* end confdefs.h.  */
27827#include <string.h>
27828
27829_ACEOF
27830if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27831  $EGREP "memchr" >/dev/null 2>&1; then :
27832
27833else
27834  ac_cv_header_stdc=no
27835fi
27836rm -f conftest*
27837
27838fi
27839
27840if test $ac_cv_header_stdc = yes; then
27841  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27842  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27843/* end confdefs.h.  */
27844#include <stdlib.h>
27845
27846_ACEOF
27847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27848  $EGREP "free" >/dev/null 2>&1; then :
27849
27850else
27851  ac_cv_header_stdc=no
27852fi
27853rm -f conftest*
27854
27855fi
27856
27857if test $ac_cv_header_stdc = yes; then
27858  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27859  if test "$cross_compiling" = yes; then :
27860  :
27861else
27862  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27863/* end confdefs.h.  */
27864#include <ctype.h>
27865#include <stdlib.h>
27866#if ((' ' & 0x0FF) == 0x020)
27867# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27868# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27869#else
27870# define ISLOWER(c) \
27871		   (('a' <= (c) && (c) <= 'i') \
27872		     || ('j' <= (c) && (c) <= 'r') \
27873		     || ('s' <= (c) && (c) <= 'z'))
27874# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27875#endif
27876
27877#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27878int
27879main ()
27880{
27881  int i;
27882  for (i = 0; i < 256; i++)
27883    if (XOR (islower (i), ISLOWER (i))
27884	|| toupper (i) != TOUPPER (i))
27885      return 2;
27886  return 0;
27887}
27888_ACEOF
27889if ac_fn_cxx_try_run "$LINENO"; then :
27890
27891else
27892  ac_cv_header_stdc=no
27893fi
27894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27895  conftest.$ac_objext conftest.beam conftest.$ac_ext
27896fi
27897
27898fi
27899fi
27900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27901$as_echo "$ac_cv_header_stdc" >&6; }
27902if test $ac_cv_header_stdc = yes; then
27903
27904$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27905
27906fi
27907
27908# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27909for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27910		  inttypes.h stdint.h unistd.h
27911do :
27912  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27913ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27914"
27915if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27916  cat >>confdefs.h <<_ACEOF
27917#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27918_ACEOF
27919
27920fi
27921
27922done
27923
27924
27925
27926###############################################################################
27927#
27928# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27929# (The JVM can use 32 or 64 bit Java pointers but that decision
27930# is made at runtime.)
27931#
27932if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27933  # Always specify -m flags on Solaris
27934
27935  # keep track of c/cxx flags that we added outselves...
27936  #   to prevent emitting warning...
27937  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27938  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27939  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27940
27941  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27942  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27943  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27944
27945  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27946  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27947  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27948
27949elif test "x$COMPILE_TYPE" = xreduced; then
27950  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27951    # Specify -m if running reduced on other Posix platforms
27952
27953  # keep track of c/cxx flags that we added outselves...
27954  #   to prevent emitting warning...
27955  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27956  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27957  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27958
27959  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27960  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27961  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27962
27963  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27964  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27965  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27966
27967  fi
27968fi
27969
27970# Make compilation sanity check
27971for ac_header in stdio.h
27972do :
27973  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27974if test "x$ac_cv_header_stdio_h" = xyes; then :
27975  cat >>confdefs.h <<_ACEOF
27976#define HAVE_STDIO_H 1
27977_ACEOF
27978
27979else
27980
27981  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27982$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27983  if test "x$COMPILE_TYPE" = xreduced; then
27984    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27985$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27986  elif test "x$COMPILE_TYPE" = xcross; then
27987    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27988$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27989  fi
27990  as_fn_error $? "Cannot continue." "$LINENO" 5
27991
27992fi
27993
27994done
27995
27996
27997# The cast to long int works around a bug in the HP C Compiler
27998# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27999# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28000# This bug is HP SR number 8606223364.
28001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28002$as_echo_n "checking size of int *... " >&6; }
28003if ${ac_cv_sizeof_int_p+:} false; then :
28004  $as_echo_n "(cached) " >&6
28005else
28006  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28007
28008else
28009  if test "$ac_cv_type_int_p" = yes; then
28010     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28012as_fn_error 77 "cannot compute sizeof (int *)
28013See \`config.log' for more details" "$LINENO" 5; }
28014   else
28015     ac_cv_sizeof_int_p=0
28016   fi
28017fi
28018
28019fi
28020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28021$as_echo "$ac_cv_sizeof_int_p" >&6; }
28022
28023
28024
28025cat >>confdefs.h <<_ACEOF
28026#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28027_ACEOF
28028
28029
28030
28031if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28032  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28033  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28034fi
28035
28036if test "x$SIZEOF_INT_P" = x; then
28037    # The test failed, lets stick to the assumed value.
28038    { $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
28039$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28040else
28041    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28042
28043    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28044        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
28045    fi
28046fi
28047
28048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28049$as_echo_n "checking for target address size... " >&6; }
28050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28051$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28052
28053
28054###############################################################################
28055#
28056# Is the target little of big endian?
28057#
28058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28059$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28060if ${ac_cv_c_bigendian+:} false; then :
28061  $as_echo_n "(cached) " >&6
28062else
28063  ac_cv_c_bigendian=unknown
28064    # See if we're dealing with a universal compiler.
28065    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28066/* end confdefs.h.  */
28067#ifndef __APPLE_CC__
28068	       not a universal capable compiler
28069	     #endif
28070	     typedef int dummy;
28071
28072_ACEOF
28073if ac_fn_cxx_try_compile "$LINENO"; then :
28074
28075	# Check for potential -arch flags.  It is not universal unless
28076	# there are at least two -arch flags with different values.
28077	ac_arch=
28078	ac_prev=
28079	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28080	 if test -n "$ac_prev"; then
28081	   case $ac_word in
28082	     i?86 | x86_64 | ppc | ppc64)
28083	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28084		 ac_arch=$ac_word
28085	       else
28086		 ac_cv_c_bigendian=universal
28087		 break
28088	       fi
28089	       ;;
28090	   esac
28091	   ac_prev=
28092	 elif test "x$ac_word" = "x-arch"; then
28093	   ac_prev=arch
28094	 fi
28095       done
28096fi
28097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28098    if test $ac_cv_c_bigendian = unknown; then
28099      # See if sys/param.h defines the BYTE_ORDER macro.
28100      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28101/* end confdefs.h.  */
28102#include <sys/types.h>
28103	     #include <sys/param.h>
28104
28105int
28106main ()
28107{
28108#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28109		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28110		     && LITTLE_ENDIAN)
28111	      bogus endian macros
28112	     #endif
28113
28114  ;
28115  return 0;
28116}
28117_ACEOF
28118if ac_fn_cxx_try_compile "$LINENO"; then :
28119  # It does; now see whether it defined to BIG_ENDIAN or not.
28120	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28121/* end confdefs.h.  */
28122#include <sys/types.h>
28123		#include <sys/param.h>
28124
28125int
28126main ()
28127{
28128#if BYTE_ORDER != BIG_ENDIAN
28129		 not big endian
28130		#endif
28131
28132  ;
28133  return 0;
28134}
28135_ACEOF
28136if ac_fn_cxx_try_compile "$LINENO"; then :
28137  ac_cv_c_bigendian=yes
28138else
28139  ac_cv_c_bigendian=no
28140fi
28141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28142fi
28143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28144    fi
28145    if test $ac_cv_c_bigendian = unknown; then
28146      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28147      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28148/* end confdefs.h.  */
28149#include <limits.h>
28150
28151int
28152main ()
28153{
28154#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28155	      bogus endian macros
28156	     #endif
28157
28158  ;
28159  return 0;
28160}
28161_ACEOF
28162if ac_fn_cxx_try_compile "$LINENO"; then :
28163  # It does; now see whether it defined to _BIG_ENDIAN or not.
28164	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28165/* end confdefs.h.  */
28166#include <limits.h>
28167
28168int
28169main ()
28170{
28171#ifndef _BIG_ENDIAN
28172		 not big endian
28173		#endif
28174
28175  ;
28176  return 0;
28177}
28178_ACEOF
28179if ac_fn_cxx_try_compile "$LINENO"; then :
28180  ac_cv_c_bigendian=yes
28181else
28182  ac_cv_c_bigendian=no
28183fi
28184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28185fi
28186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28187    fi
28188    if test $ac_cv_c_bigendian = unknown; then
28189      # Compile a test program.
28190      if test "$cross_compiling" = yes; then :
28191  # Try to guess by grepping values from an object file.
28192	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28193/* end confdefs.h.  */
28194short int ascii_mm[] =
28195		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28196		short int ascii_ii[] =
28197		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28198		int use_ascii (int i) {
28199		  return ascii_mm[i] + ascii_ii[i];
28200		}
28201		short int ebcdic_ii[] =
28202		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28203		short int ebcdic_mm[] =
28204		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28205		int use_ebcdic (int i) {
28206		  return ebcdic_mm[i] + ebcdic_ii[i];
28207		}
28208		extern int foo;
28209
28210int
28211main ()
28212{
28213return use_ascii (foo) == use_ebcdic (foo);
28214  ;
28215  return 0;
28216}
28217_ACEOF
28218if ac_fn_cxx_try_compile "$LINENO"; then :
28219  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28220	      ac_cv_c_bigendian=yes
28221	    fi
28222	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28223	      if test "$ac_cv_c_bigendian" = unknown; then
28224		ac_cv_c_bigendian=no
28225	      else
28226		# finding both strings is unlikely to happen, but who knows?
28227		ac_cv_c_bigendian=unknown
28228	      fi
28229	    fi
28230fi
28231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28232else
28233  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28234/* end confdefs.h.  */
28235$ac_includes_default
28236int
28237main ()
28238{
28239
28240	     /* Are we little or big endian?  From Harbison&Steele.  */
28241	     union
28242	     {
28243	       long int l;
28244	       char c[sizeof (long int)];
28245	     } u;
28246	     u.l = 1;
28247	     return u.c[sizeof (long int) - 1] == 1;
28248
28249  ;
28250  return 0;
28251}
28252_ACEOF
28253if ac_fn_cxx_try_run "$LINENO"; then :
28254  ac_cv_c_bigendian=no
28255else
28256  ac_cv_c_bigendian=yes
28257fi
28258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28259  conftest.$ac_objext conftest.beam conftest.$ac_ext
28260fi
28261
28262    fi
28263fi
28264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28265$as_echo "$ac_cv_c_bigendian" >&6; }
28266 case $ac_cv_c_bigendian in #(
28267   yes)
28268     ENDIAN="big";; #(
28269   no)
28270     ENDIAN="little" ;; #(
28271   universal)
28272     ENDIAN="universal_endianness"
28273     ;; #(
28274   *)
28275     ENDIAN="unknown" ;;
28276 esac
28277
28278
28279if test "x$ENDIAN" = xuniversal_endianness; then
28280    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28281fi
28282if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28283    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
28284fi
28285
28286
28287# Configure flags for the tools
28288
28289
28290###############################################################################
28291#
28292# How to compile shared libraries.
28293#
28294
28295if test "x$GCC" = xyes; then
28296    COMPILER_NAME=gcc
28297    PICFLAG="-fPIC"
28298    LIBRARY_PREFIX=lib
28299    SHARED_LIBRARY='lib$1.so'
28300    STATIC_LIBRARY='lib$1.a'
28301    SHARED_LIBRARY_FLAGS="-shared"
28302    SHARED_LIBRARY_SUFFIX='.so'
28303    STATIC_LIBRARY_SUFFIX='.a'
28304    OBJ_SUFFIX='.o'
28305    EXE_SUFFIX=''
28306    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28307    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28308    C_FLAG_REORDER=''
28309    CXX_FLAG_REORDER=''
28310    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28311    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28312    LD="$CC"
28313    LDEXE="$CC"
28314    LDCXX="$CXX"
28315    LDEXECXX="$CXX"
28316    POST_STRIP_CMD="$STRIP -g"
28317
28318    # Linking is different on MacOSX
28319    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28320        # Might change in the future to clang.
28321        COMPILER_NAME=gcc
28322        SHARED_LIBRARY='lib$1.dylib'
28323        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28324        SHARED_LIBRARY_SUFFIX='.dylib'
28325        EXE_SUFFIX=''
28326        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28327        SET_SHARED_LIBRARY_MAPFILE=''
28328        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28329        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28330        POST_STRIP_CMD="$STRIP -S"
28331    fi
28332else
28333    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28334        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28335        COMPILER_NAME=ossc
28336        PICFLAG="-KPIC"
28337        LIBRARY_PREFIX=lib
28338        SHARED_LIBRARY='lib$1.so'
28339        STATIC_LIBRARY='lib$1.a'
28340        SHARED_LIBRARY_FLAGS="-G"
28341        SHARED_LIBRARY_SUFFIX='.so'
28342        STATIC_LIBRARY_SUFFIX='.a'
28343        OBJ_SUFFIX='.o'
28344        EXE_SUFFIX=''
28345        SET_SHARED_LIBRARY_NAME=''
28346        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28347	C_FLAG_REORDER='-xF'
28348	CXX_FLAG_REORDER='-xF'
28349        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28350        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28351        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28352        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28353        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28354        POST_STRIP_CMD="$STRIP -x"
28355        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28356    fi
28357    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28358        # If it is not gcc, then assume it is the MS Visual Studio compiler
28359        COMPILER_NAME=cl
28360        PICFLAG=""
28361        LIBRARY_PREFIX=
28362        SHARED_LIBRARY='$1.dll'
28363        STATIC_LIBRARY='$1.lib'
28364        SHARED_LIBRARY_FLAGS="-LD"
28365        SHARED_LIBRARY_SUFFIX='.dll'
28366        STATIC_LIBRARY_SUFFIX='.lib'
28367        OBJ_SUFFIX='.obj'
28368        EXE_SUFFIX='.exe'
28369        SET_SHARED_LIBRARY_NAME=''
28370        SET_SHARED_LIBRARY_MAPFILE=''
28371        SET_SHARED_LIBRARY_ORIGIN=''
28372        SET_EXECUTABLE_ORIGIN=''
28373    fi
28374fi
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393# The (cross) compiler is now configured, we can now test capabilities
28394# of the target platform.
28395
28396
28397
28398###############################################################################
28399#
28400# Setup the opt flags for different compilers
28401# and different operating systems.
28402#
28403
28404#
28405# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28406#
28407if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28408    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28409    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28410    CFLAGS="$CFLAGS -mstackrealign"
28411    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28412$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28413    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28414/* end confdefs.h.  */
28415int main() { return 0; }
28416_ACEOF
28417if ac_fn_cxx_try_link "$LINENO"; then :
28418
28419		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28420$as_echo "yes" >&6; }
28421
28422else
28423
28424		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28425$as_echo "no" >&6; }
28426	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28427
28428fi
28429rm -f core conftest.err conftest.$ac_objext \
28430    conftest$ac_exeext conftest.$ac_ext
28431fi
28432
28433C_FLAG_DEPS="-MMD -MF"
28434CXX_FLAG_DEPS="-MMD -MF"
28435
28436case $COMPILER_TYPE in
28437  CC )
28438    D_FLAG="-g"
28439    case $COMPILER_NAME in
28440      gcc )
28441      	case $OPENJDK_TARGET_OS in
28442	  macosx )
28443	    # On MacOSX we optimize for size, something
28444	    # we should do for all platforms?
28445	    C_O_FLAG_HI="-Os"
28446	    C_O_FLAG_NORM="-Os"
28447	    C_O_FLAG_NONE=""
28448	    ;;
28449	  *)
28450	    C_O_FLAG_HI="-O3"
28451	    C_O_FLAG_NORM="-O2"
28452	    C_O_FLAG_NONE="-O0"
28453	    CFLAGS_DEBUG_SYMBOLS="-g"
28454	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28455	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28456	       CFLAGS_DEBUG_SYMBOLS="-g1"
28457	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28458	    fi
28459	    ;;
28460	esac
28461        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28462        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28463        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28464        ;;
28465      ossc )
28466        #
28467        # Forte has different names for this with their C++ compiler...
28468        #
28469        C_FLAG_DEPS="-xMMD -xMF"
28470        CXX_FLAG_DEPS="-xMMD -xMF"
28471
28472        # Extra options used with HIGHEST
28473        #
28474        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28475        #          done with care, there are some assumptions below that need to
28476        #          be understood about the use of pointers, and IEEE behavior.
28477        #
28478        # Use non-standard floating point mode (not IEEE 754)
28479        CC_HIGHEST="$CC_HIGHEST -fns"
28480        # Do some simplification of floating point arithmetic (not IEEE 754)
28481        CC_HIGHEST="$CC_HIGHEST -fsimple"
28482        # Use single precision floating point with 'float'
28483        CC_HIGHEST="$CC_HIGHEST -fsingle"
28484        # Assume memory references via basic pointer types do not alias
28485        #   (Source with excessing pointer casting and data access with mixed
28486        #    pointer types are not recommended)
28487        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28488        # Use intrinsic or inline versions for math/std functions
28489        #   (If you expect perfect errno behavior, do not use this)
28490        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28491        # Loop data dependency optimizations (need -xO3 or higher)
28492        CC_HIGHEST="$CC_HIGHEST -xdepend"
28493        # Pointer parameters to functions do not overlap
28494        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28495        #    If you pass in multiple pointers to the same data, do not use this)
28496        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28497        # Inline some library routines
28498        #   (If you expect perfect errno behavior, do not use this)
28499        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28500        # Use optimized math routines
28501        #   (If you expect perfect errno behavior, do not use this)
28502        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28503        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28504
28505        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28506          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28507          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28508        fi
28509
28510        case $OPENJDK_TARGET_CPU_ARCH in
28511          x86)
28512            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28513            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28514            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28515            C_O_FLAG_NONE="-xregs=no%frameptr"
28516            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28517            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28518            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28519            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28520            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28521               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28522               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28523            fi
28524            ;;
28525          sparc)
28526            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28527            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28528            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28529            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28530            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28531            C_O_FLAG_NONE=""
28532            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28533            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28534            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28535            CXX_O_FLAG_NONE=""
28536            ;;
28537        esac
28538
28539    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28540    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28541    esac
28542    ;;
28543  CL )
28544    D_FLAG=
28545    C_O_FLAG_HIGHEST="-O2"
28546    C_O_FLAG_HI="-O1"
28547    C_O_FLAG_NORM="-O1"
28548    C_O_FLAG_NONE="-Od"
28549    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28550    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28551    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28552    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28553    ;;
28554esac
28555
28556if test -z "$C_O_FLAG_HIGHEST"; then
28557   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28558fi
28559
28560if test -z "$CXX_O_FLAG_HIGHEST"; then
28561   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28562fi
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28578   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28579$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28580fi
28581
28582if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28583   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28584$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28585fi
28586
28587if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28588   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28589$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28590fi
28591
28592
28593# Check whether --with-extra-cflags was given.
28594if test "${with_extra_cflags+set}" = set; then :
28595  withval=$with_extra_cflags;
28596fi
28597
28598
28599
28600# Check whether --with-extra-cxxflags was given.
28601if test "${with_extra_cxxflags+set}" = set; then :
28602  withval=$with_extra_cxxflags;
28603fi
28604
28605
28606
28607# Check whether --with-extra-ldflags was given.
28608if test "${with_extra_ldflags+set}" = set; then :
28609  withval=$with_extra_ldflags;
28610fi
28611
28612
28613CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28614CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28615LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28616
28617# Hotspot needs these set in their legacy form
28618LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28619LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28620LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28621
28622
28623
28624
28625
28626###############################################################################
28627#
28628# Now setup the CFLAGS and LDFLAGS for the JDK build.
28629# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28630#
28631case $COMPILER_NAME in
28632      gcc )
28633      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28634                          -pipe \
28635                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28636	  case $OPENJDK_TARGET_CPU_ARCH in
28637	  arm )
28638            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28639	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28640	  ;;
28641	  ppc )
28642            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28643	  ;;
28644	  * )
28645	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28646	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28647          ;;
28648	  esac
28649          ;;
28650      ossc )
28651          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28652          case $OPENJDK_TARGET_CPU_ARCH in
28653          x86 )
28654            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28655       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28656          ;;
28657          esac
28658
28659      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28660      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28661
28662          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28663          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28664          ;;
28665      cl )
28666          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28667               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28668	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28669	       -DWIN32 -DIAL"
28670          case $OPENJDK_TARGET_CPU in
28671              x86 )
28672                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28673                  ;;
28674              x86_64 )
28675                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28676                  ;;
28677          esac
28678          ;;
28679esac
28680
28681###############################################################################
28682
28683CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28684
28685# The package path is used only on macosx?
28686PACKAGE_PATH=/opt/local
28687
28688
28689if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28690    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28691    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28692    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28693    #   Note: -Dmacro         is the same as    #define macro 1
28694    #         -Dmacro=	    is the same as    #define macro
28695    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28696        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28697    else
28698        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28699    fi
28700else
28701    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28702fi
28703if test "x$OPENJDK_TARGET_OS" = xlinux; then
28704    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28705fi
28706if test "x$OPENJDK_TARGET_OS" = xwindows; then
28707    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28708fi
28709if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28710    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28711fi
28712if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28713    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28714    # Setting these parameters makes it an error to link to macosx APIs that are
28715    # newer than the given OS version and makes the linked binaries compatible even
28716    # if built on a newer version of the OS.
28717    # The expected format is X.Y.Z
28718    MACOSX_VERSION_MIN=10.7.0
28719
28720    # The macro takes the version with no dots, ex: 1070
28721    # Let the flags variables get resolved in make for easier override on make
28722    # command line.
28723    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28724    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28725fi
28726if test "x$OPENJDK_TARGET_OS" = xbsd; then
28727    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28728fi
28729if test "x$DEBUG_LEVEL" = xrelease; then
28730    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28731    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28732        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28733    fi
28734else
28735    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28736fi
28737
28738CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28739CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28740
28741CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28742        -I${JDK_OUTPUTDIR}/include \
28743        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28744        -I${JDK_TOPDIR}/src/share/javavm/export \
28745        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28746        -I${JDK_TOPDIR}/src/share/native/common \
28747        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28748
28749# The shared libraries are compiled using the picflag.
28750CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28751CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28752
28753# Executable flags
28754CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28755CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28756
28757# Now this is odd. The JDK native libraries have to link against libjvm.so
28758# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28759# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28760# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28761# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28762# libraries will link to whatever is in memory. Yuck.
28763#
28764# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28765if test "x$COMPILER_NAME" = xcl; then
28766    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28767    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28768        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28769    fi
28770    # TODO: make -debug optional "--disable-full-debug-symbols"
28771    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28772    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28773    LDFLAGS_JDKLIB_SUFFIX=""
28774    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28775        LDFLAGS_STACK_SIZE=1048576
28776    else
28777        LDFLAGS_STACK_SIZE=327680
28778    fi
28779    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28780else
28781    if test "x$COMPILER_NAME" = xgcc; then
28782        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28783        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28784        if test -n "$HAS_GNU_HASH"; then
28785            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28786        fi
28787        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28788          # And since we now know that the linker is gnu, then add -z defs, to forbid
28789          # undefined symbols in object files.
28790          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28791          if test "x$DEBUG_LEVEL" = "xrelease"; then
28792              # When building release libraries, tell the linker optimize them.
28793              # Should this be supplied to the OSS linker as well?
28794              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28795          fi
28796        fi
28797    fi
28798    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28799                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28800
28801    # On some platforms (mac) the linker warns about non existing -L dirs.
28802    # Add server first if available. Linking aginst client does not always produce the same results.
28803    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28804    # Default to server for other variants.
28805    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28806        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28807    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28808        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28809    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28810        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28811    else
28812        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28813    fi
28814
28815    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28816    if test "x$COMPILER_NAME" = xossc; then
28817        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28818    fi
28819
28820    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28821    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28822        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28823    fi
28824fi
28825
28826# Adjust flags according to debug level.
28827case $DEBUG_LEVEL in
28828      fastdebug )
28829              CFLAGS="$CFLAGS $D_FLAG"
28830              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28831              ;;
28832      slowdebug )
28833              CFLAGS="$CFLAGS $D_FLAG"
28834	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28835	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28836	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28837	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28838              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28839              ;;
28840esac
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856# Setup debug symbols (need objcopy from the toolchain for that)
28857
28858#
28859# ENABLE_DEBUG_SYMBOLS
28860# This must be done after the toolchain is setup, since we're looking at objcopy.
28861#
28862# Check whether --enable-debug-symbols was given.
28863if test "${enable_debug_symbols+set}" = set; then :
28864  enableval=$enable_debug_symbols;
28865fi
28866
28867
28868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28869$as_echo_n "checking if we should generate debug symbols... " >&6; }
28870
28871if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28872   # explicit enabling of enable-debug-symbols and can't find objcopy
28873   #   this is an error
28874   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28875fi
28876
28877if test "x$enable_debug_symbols" = "xyes"; then
28878  ENABLE_DEBUG_SYMBOLS=true
28879elif test "x$enable_debug_symbols" = "xno"; then
28880  ENABLE_DEBUG_SYMBOLS=false
28881else
28882  # default on macosx is false
28883  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28884    ENABLE_DEBUG_SYMBOLS=false
28885  # Default is on if objcopy is found, otherwise off
28886  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28887    ENABLE_DEBUG_SYMBOLS=true
28888  else
28889    ENABLE_DEBUG_SYMBOLS=false
28890  fi
28891fi
28892
28893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28894$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28895
28896#
28897# ZIP_DEBUGINFO_FILES
28898#
28899# Check whether --enable-zip-debug-info was given.
28900if test "${enable_zip_debug_info+set}" = set; then :
28901  enableval=$enable_zip_debug_info;
28902fi
28903
28904
28905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28906$as_echo_n "checking if we should zip debug-info files... " >&6; }
28907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28908$as_echo "${enable_zip_debug_info}" >&6; }
28909
28910if test "x${enable_zip_debug_info}" = "xno"; then
28911   ZIP_DEBUGINFO_FILES=false
28912else
28913   ZIP_DEBUGINFO_FILES=true
28914fi
28915
28916
28917
28918
28919
28920
28921
28922###############################################################################
28923#
28924# Check dependencies for external and internal libraries.
28925#
28926###############################################################################
28927
28928
28929
28930###############################################################################
28931#
28932# OS specific settings that we never will need to probe.
28933#
28934if test "x$OPENJDK_TARGET_OS" = xlinux; then
28935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28936$as_echo_n "checking what is not needed on Linux?... " >&6; }
28937    PULSE_NOT_NEEDED=yes
28938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28939$as_echo "pulse" >&6; }
28940fi
28941
28942if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28944$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28945    ALSA_NOT_NEEDED=yes
28946    PULSE_NOT_NEEDED=yes
28947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28948$as_echo "alsa pulse" >&6; }
28949fi
28950
28951if test "x$OPENJDK_TARGET_OS" = xwindows; then
28952    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28953$as_echo_n "checking what is not needed on Windows?... " >&6; }
28954    CUPS_NOT_NEEDED=yes
28955    ALSA_NOT_NEEDED=yes
28956    PULSE_NOT_NEEDED=yes
28957    X11_NOT_NEEDED=yes
28958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28959$as_echo "alsa cups pulse x11" >&6; }
28960fi
28961
28962if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28964$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28965    ALSA_NOT_NEEDED=yes
28966    PULSE_NOT_NEEDED=yes
28967    X11_NOT_NEEDED=yes
28968    FREETYPE2_NOT_NEEDED=yes
28969    # If the java runtime framework is disabled, then we need X11.
28970    # This will be adjusted below.
28971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28972$as_echo "alsa pulse x11" >&6; }
28973fi
28974
28975if test "x$OPENJDK_TARGET_OS" = xbsd; then
28976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28977$as_echo_n "checking what is not needed on bsd?... " >&6; }
28978    ALSA_NOT_NEEDED=yes
28979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28980$as_echo "alsa" >&6; }
28981fi
28982
28983if test "x$OPENJDK" = "xfalse"; then
28984    FREETYPE2_NOT_NEEDED=yes
28985fi
28986
28987if test "x$SUPPORT_HEADFUL" = xno; then
28988    X11_NOT_NEEDED=yes
28989fi
28990
28991###############################################################################
28992#
28993# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28994# that uses this API.
28995#
28996# Check whether --enable-macosx-runtime-support was given.
28997if test "${enable_macosx_runtime_support+set}" = set; then :
28998  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28999else
29000  MACOSX_RUNTIME_SUPPORT="no"
29001fi
29002
29003
29004USE_MACOSX_RUNTIME_SUPPORT=no
29005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29006$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29007if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29008    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29009        MACOSX_RUNTIME_SUPPORT=yes
29010        USE_MACOSX_RUNTIME_SUPPORT=yes
29011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29012$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29013    else
29014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29015$as_echo "yes, but explicitly disabled." >&6; }
29016    fi
29017else
29018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29019$as_echo "no" >&6; }
29020fi
29021
29022if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29024$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29025    X11_NOT_NEEDED=
29026    FREETYPE2_NOT_NEEDED=
29027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29028$as_echo "alsa pulse" >&6; }
29029fi
29030
29031
29032
29033
29034###############################################################################
29035#
29036# Check for X Windows
29037#
29038
29039# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29040# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29041# --x-libraries for the sysroot, if that seems to be correct.
29042if test "x$SYS_ROOT" != "x/"; then
29043  if test "x$x_includes" = xNONE; then
29044    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29045      x_includes="$SYS_ROOT/usr/X11R6/include"
29046    fi
29047  fi
29048  if test "x$x_libraries" = xNONE; then
29049    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29050      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29051    fi
29052  fi
29053fi
29054
29055# Now let autoconf do it's magic
29056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29057$as_echo_n "checking for X... " >&6; }
29058
29059
29060# Check whether --with-x was given.
29061if test "${with_x+set}" = set; then :
29062  withval=$with_x;
29063fi
29064
29065# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29066if test "x$with_x" = xno; then
29067  # The user explicitly disabled X.
29068  have_x=disabled
29069else
29070  case $x_includes,$x_libraries in #(
29071    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29072    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29073  $as_echo_n "(cached) " >&6
29074else
29075  # One or both of the vars are not set, and there is no cached value.
29076ac_x_includes=no ac_x_libraries=no
29077rm -f -r conftest.dir
29078if mkdir conftest.dir; then
29079  cd conftest.dir
29080  cat >Imakefile <<'_ACEOF'
29081incroot:
29082	@echo incroot='${INCROOT}'
29083usrlibdir:
29084	@echo usrlibdir='${USRLIBDIR}'
29085libdir:
29086	@echo libdir='${LIBDIR}'
29087_ACEOF
29088  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29089    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29090    for ac_var in incroot usrlibdir libdir; do
29091      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29092    done
29093    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29094    for ac_extension in a so sl dylib la dll; do
29095      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29096	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29097	ac_im_usrlibdir=$ac_im_libdir; break
29098      fi
29099    done
29100    # Screen out bogus values from the imake configuration.  They are
29101    # bogus both because they are the default anyway, and because
29102    # using them would break gcc on systems where it needs fixed includes.
29103    case $ac_im_incroot in
29104	/usr/include) ac_x_includes= ;;
29105	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29106    esac
29107    case $ac_im_usrlibdir in
29108	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29109	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29110    esac
29111  fi
29112  cd ..
29113  rm -f -r conftest.dir
29114fi
29115
29116# Standard set of common directories for X headers.
29117# Check X11 before X11Rn because it is often a symlink to the current release.
29118ac_x_header_dirs='
29119/usr/X11/include
29120/usr/X11R7/include
29121/usr/X11R6/include
29122/usr/X11R5/include
29123/usr/X11R4/include
29124
29125/usr/include/X11
29126/usr/include/X11R7
29127/usr/include/X11R6
29128/usr/include/X11R5
29129/usr/include/X11R4
29130
29131/usr/local/X11/include
29132/usr/local/X11R7/include
29133/usr/local/X11R6/include
29134/usr/local/X11R5/include
29135/usr/local/X11R4/include
29136
29137/usr/local/include/X11
29138/usr/local/include/X11R7
29139/usr/local/include/X11R6
29140/usr/local/include/X11R5
29141/usr/local/include/X11R4
29142
29143/usr/X386/include
29144/usr/x386/include
29145/usr/XFree86/include/X11
29146
29147/usr/include
29148/usr/local/include
29149/usr/unsupported/include
29150/usr/athena/include
29151/usr/local/x11r5/include
29152/usr/lpp/Xamples/include
29153
29154/usr/openwin/include
29155/usr/openwin/share/include'
29156
29157if test "$ac_x_includes" = no; then
29158  # Guess where to find include files, by looking for Xlib.h.
29159  # First, try using that file with no special directory specified.
29160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29161/* end confdefs.h.  */
29162#include <X11/Xlib.h>
29163_ACEOF
29164if ac_fn_cxx_try_cpp "$LINENO"; then :
29165  # We can compile using X headers with no special include directory.
29166ac_x_includes=
29167else
29168  for ac_dir in $ac_x_header_dirs; do
29169  if test -r "$ac_dir/X11/Xlib.h"; then
29170    ac_x_includes=$ac_dir
29171    break
29172  fi
29173done
29174fi
29175rm -f conftest.err conftest.i conftest.$ac_ext
29176fi # $ac_x_includes = no
29177
29178if test "$ac_x_libraries" = no; then
29179  # Check for the libraries.
29180  # See if we find them without any special options.
29181  # Don't add to $LIBS permanently.
29182  ac_save_LIBS=$LIBS
29183  LIBS="-lX11 $LIBS"
29184  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29185/* end confdefs.h.  */
29186#include <X11/Xlib.h>
29187int
29188main ()
29189{
29190XrmInitialize ()
29191  ;
29192  return 0;
29193}
29194_ACEOF
29195if ac_fn_cxx_try_link "$LINENO"; then :
29196  LIBS=$ac_save_LIBS
29197# We can link X programs with no special library path.
29198ac_x_libraries=
29199else
29200  LIBS=$ac_save_LIBS
29201for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29202do
29203  # Don't even attempt the hair of trying to link an X program!
29204  for ac_extension in a so sl dylib la dll; do
29205    if test -r "$ac_dir/libX11.$ac_extension"; then
29206      ac_x_libraries=$ac_dir
29207      break 2
29208    fi
29209  done
29210done
29211fi
29212rm -f core conftest.err conftest.$ac_objext \
29213    conftest$ac_exeext conftest.$ac_ext
29214fi # $ac_x_libraries = no
29215
29216case $ac_x_includes,$ac_x_libraries in #(
29217  no,* | *,no | *\'*)
29218    # Didn't find X, or a directory has "'" in its name.
29219    ac_cv_have_x="have_x=no";; #(
29220  *)
29221    # Record where we found X for the cache.
29222    ac_cv_have_x="have_x=yes\
29223	ac_x_includes='$ac_x_includes'\
29224	ac_x_libraries='$ac_x_libraries'"
29225esac
29226fi
29227;; #(
29228    *) have_x=yes;;
29229  esac
29230  eval "$ac_cv_have_x"
29231fi # $with_x != no
29232
29233if test "$have_x" != yes; then
29234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29235$as_echo "$have_x" >&6; }
29236  no_x=yes
29237else
29238  # If each of the values was on the command line, it overrides each guess.
29239  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29240  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29241  # Update the cache value to reflect the command line values.
29242  ac_cv_have_x="have_x=yes\
29243	ac_x_includes='$x_includes'\
29244	ac_x_libraries='$x_libraries'"
29245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29246$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29247fi
29248
29249if test "$no_x" = yes; then
29250  # Not all programs may use this symbol, but it does not hurt to define it.
29251
29252$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29253
29254  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29255else
29256  if test -n "$x_includes"; then
29257    X_CFLAGS="$X_CFLAGS -I$x_includes"
29258  fi
29259
29260  # It would also be nice to do this for all -L options, not just this one.
29261  if test -n "$x_libraries"; then
29262    X_LIBS="$X_LIBS -L$x_libraries"
29263    # For Solaris; some versions of Sun CC require a space after -R and
29264    # others require no space.  Words are not sufficient . . . .
29265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29266$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29267    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29268    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29269    ac_cxx_werror_flag=yes
29270    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29271/* end confdefs.h.  */
29272
29273int
29274main ()
29275{
29276
29277  ;
29278  return 0;
29279}
29280_ACEOF
29281if ac_fn_cxx_try_link "$LINENO"; then :
29282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29283$as_echo "no" >&6; }
29284       X_LIBS="$X_LIBS -R$x_libraries"
29285else
29286  LIBS="$ac_xsave_LIBS -R $x_libraries"
29287       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29288/* end confdefs.h.  */
29289
29290int
29291main ()
29292{
29293
29294  ;
29295  return 0;
29296}
29297_ACEOF
29298if ac_fn_cxx_try_link "$LINENO"; then :
29299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29300$as_echo "yes" >&6; }
29301	  X_LIBS="$X_LIBS -R $x_libraries"
29302else
29303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29304$as_echo "neither works" >&6; }
29305fi
29306rm -f core conftest.err conftest.$ac_objext \
29307    conftest$ac_exeext conftest.$ac_ext
29308fi
29309rm -f core conftest.err conftest.$ac_objext \
29310    conftest$ac_exeext conftest.$ac_ext
29311    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29312    LIBS=$ac_xsave_LIBS
29313  fi
29314
29315  # Check for system-dependent libraries X programs must link with.
29316  # Do this before checking for the system-independent R6 libraries
29317  # (-lICE), since we may need -lsocket or whatever for X linking.
29318
29319  if test "$ISC" = yes; then
29320    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29321  else
29322    # Martyn Johnson says this is needed for Ultrix, if the X
29323    # libraries were built with DECnet support.  And Karl Berry says
29324    # the Alpha needs dnet_stub (dnet does not exist).
29325    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29326    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29327/* end confdefs.h.  */
29328
29329/* Override any GCC internal prototype to avoid an error.
29330   Use char because int might match the return type of a GCC
29331   builtin and then its argument prototype would still apply.  */
29332#ifdef __cplusplus
29333extern "C"
29334#endif
29335char XOpenDisplay ();
29336int
29337main ()
29338{
29339return XOpenDisplay ();
29340  ;
29341  return 0;
29342}
29343_ACEOF
29344if ac_fn_cxx_try_link "$LINENO"; then :
29345
29346else
29347  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29348$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29349if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
29350  $as_echo_n "(cached) " >&6
29351else
29352  ac_check_lib_save_LIBS=$LIBS
29353LIBS="-ldnet  $LIBS"
29354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29355/* end confdefs.h.  */
29356
29357/* Override any GCC internal prototype to avoid an error.
29358   Use char because int might match the return type of a GCC
29359   builtin and then its argument prototype would still apply.  */
29360#ifdef __cplusplus
29361extern "C"
29362#endif
29363char dnet_ntoa ();
29364int
29365main ()
29366{
29367return dnet_ntoa ();
29368  ;
29369  return 0;
29370}
29371_ACEOF
29372if ac_fn_cxx_try_link "$LINENO"; then :
29373  ac_cv_lib_dnet_dnet_ntoa=yes
29374else
29375  ac_cv_lib_dnet_dnet_ntoa=no
29376fi
29377rm -f core conftest.err conftest.$ac_objext \
29378    conftest$ac_exeext conftest.$ac_ext
29379LIBS=$ac_check_lib_save_LIBS
29380fi
29381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29382$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29383if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
29384  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29385fi
29386
29387    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29388      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
29389$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29390if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
29391  $as_echo_n "(cached) " >&6
29392else
29393  ac_check_lib_save_LIBS=$LIBS
29394LIBS="-ldnet_stub  $LIBS"
29395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29396/* end confdefs.h.  */
29397
29398/* Override any GCC internal prototype to avoid an error.
29399   Use char because int might match the return type of a GCC
29400   builtin and then its argument prototype would still apply.  */
29401#ifdef __cplusplus
29402extern "C"
29403#endif
29404char dnet_ntoa ();
29405int
29406main ()
29407{
29408return dnet_ntoa ();
29409  ;
29410  return 0;
29411}
29412_ACEOF
29413if ac_fn_cxx_try_link "$LINENO"; then :
29414  ac_cv_lib_dnet_stub_dnet_ntoa=yes
29415else
29416  ac_cv_lib_dnet_stub_dnet_ntoa=no
29417fi
29418rm -f core conftest.err conftest.$ac_objext \
29419    conftest$ac_exeext conftest.$ac_ext
29420LIBS=$ac_check_lib_save_LIBS
29421fi
29422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29423$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29424if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
29425  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29426fi
29427
29428    fi
29429fi
29430rm -f core conftest.err conftest.$ac_objext \
29431    conftest$ac_exeext conftest.$ac_ext
29432    LIBS="$ac_xsave_LIBS"
29433
29434    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29435    # to get the SysV transport functions.
29436    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29437    # needs -lnsl.
29438    # The nsl library prevents programs from opening the X display
29439    # on Irix 5.2, according to T.E. Dickey.
29440    # The functions gethostbyname, getservbyname, and inet_addr are
29441    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29442    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
29443if test "x$ac_cv_func_gethostbyname" = xyes; then :
29444
29445fi
29446
29447    if test $ac_cv_func_gethostbyname = no; then
29448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
29449$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29450if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
29451  $as_echo_n "(cached) " >&6
29452else
29453  ac_check_lib_save_LIBS=$LIBS
29454LIBS="-lnsl  $LIBS"
29455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29456/* end confdefs.h.  */
29457
29458/* Override any GCC internal prototype to avoid an error.
29459   Use char because int might match the return type of a GCC
29460   builtin and then its argument prototype would still apply.  */
29461#ifdef __cplusplus
29462extern "C"
29463#endif
29464char gethostbyname ();
29465int
29466main ()
29467{
29468return gethostbyname ();
29469  ;
29470  return 0;
29471}
29472_ACEOF
29473if ac_fn_cxx_try_link "$LINENO"; then :
29474  ac_cv_lib_nsl_gethostbyname=yes
29475else
29476  ac_cv_lib_nsl_gethostbyname=no
29477fi
29478rm -f core conftest.err conftest.$ac_objext \
29479    conftest$ac_exeext conftest.$ac_ext
29480LIBS=$ac_check_lib_save_LIBS
29481fi
29482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29483$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29484if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
29485  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29486fi
29487
29488      if test $ac_cv_lib_nsl_gethostbyname = no; then
29489	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29490$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29491if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
29492  $as_echo_n "(cached) " >&6
29493else
29494  ac_check_lib_save_LIBS=$LIBS
29495LIBS="-lbsd  $LIBS"
29496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29497/* end confdefs.h.  */
29498
29499/* Override any GCC internal prototype to avoid an error.
29500   Use char because int might match the return type of a GCC
29501   builtin and then its argument prototype would still apply.  */
29502#ifdef __cplusplus
29503extern "C"
29504#endif
29505char gethostbyname ();
29506int
29507main ()
29508{
29509return gethostbyname ();
29510  ;
29511  return 0;
29512}
29513_ACEOF
29514if ac_fn_cxx_try_link "$LINENO"; then :
29515  ac_cv_lib_bsd_gethostbyname=yes
29516else
29517  ac_cv_lib_bsd_gethostbyname=no
29518fi
29519rm -f core conftest.err conftest.$ac_objext \
29520    conftest$ac_exeext conftest.$ac_ext
29521LIBS=$ac_check_lib_save_LIBS
29522fi
29523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29524$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29525if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
29526  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29527fi
29528
29529      fi
29530    fi
29531
29532    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29533    # socket/setsockopt and other routines are undefined under SCO ODT
29534    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29535    # on later versions), says Simon Leinen: it contains gethostby*
29536    # variants that don't use the name server (or something).  -lsocket
29537    # must be given before -lnsl if both are needed.  We assume that
29538    # if connect needs -lnsl, so does gethostbyname.
29539    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29540if test "x$ac_cv_func_connect" = xyes; then :
29541
29542fi
29543
29544    if test $ac_cv_func_connect = no; then
29545      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29546$as_echo_n "checking for connect in -lsocket... " >&6; }
29547if ${ac_cv_lib_socket_connect+:} false; then :
29548  $as_echo_n "(cached) " >&6
29549else
29550  ac_check_lib_save_LIBS=$LIBS
29551LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29553/* end confdefs.h.  */
29554
29555/* Override any GCC internal prototype to avoid an error.
29556   Use char because int might match the return type of a GCC
29557   builtin and then its argument prototype would still apply.  */
29558#ifdef __cplusplus
29559extern "C"
29560#endif
29561char connect ();
29562int
29563main ()
29564{
29565return connect ();
29566  ;
29567  return 0;
29568}
29569_ACEOF
29570if ac_fn_cxx_try_link "$LINENO"; then :
29571  ac_cv_lib_socket_connect=yes
29572else
29573  ac_cv_lib_socket_connect=no
29574fi
29575rm -f core conftest.err conftest.$ac_objext \
29576    conftest$ac_exeext conftest.$ac_ext
29577LIBS=$ac_check_lib_save_LIBS
29578fi
29579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29580$as_echo "$ac_cv_lib_socket_connect" >&6; }
29581if test "x$ac_cv_lib_socket_connect" = xyes; then :
29582  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29583fi
29584
29585    fi
29586
29587    # Guillermo Gomez says -lposix is necessary on A/UX.
29588    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29589if test "x$ac_cv_func_remove" = xyes; then :
29590
29591fi
29592
29593    if test $ac_cv_func_remove = no; then
29594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29595$as_echo_n "checking for remove in -lposix... " >&6; }
29596if ${ac_cv_lib_posix_remove+:} false; then :
29597  $as_echo_n "(cached) " >&6
29598else
29599  ac_check_lib_save_LIBS=$LIBS
29600LIBS="-lposix  $LIBS"
29601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29602/* end confdefs.h.  */
29603
29604/* Override any GCC internal prototype to avoid an error.
29605   Use char because int might match the return type of a GCC
29606   builtin and then its argument prototype would still apply.  */
29607#ifdef __cplusplus
29608extern "C"
29609#endif
29610char remove ();
29611int
29612main ()
29613{
29614return remove ();
29615  ;
29616  return 0;
29617}
29618_ACEOF
29619if ac_fn_cxx_try_link "$LINENO"; then :
29620  ac_cv_lib_posix_remove=yes
29621else
29622  ac_cv_lib_posix_remove=no
29623fi
29624rm -f core conftest.err conftest.$ac_objext \
29625    conftest$ac_exeext conftest.$ac_ext
29626LIBS=$ac_check_lib_save_LIBS
29627fi
29628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29629$as_echo "$ac_cv_lib_posix_remove" >&6; }
29630if test "x$ac_cv_lib_posix_remove" = xyes; then :
29631  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29632fi
29633
29634    fi
29635
29636    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29637    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29638if test "x$ac_cv_func_shmat" = xyes; then :
29639
29640fi
29641
29642    if test $ac_cv_func_shmat = no; then
29643      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29644$as_echo_n "checking for shmat in -lipc... " >&6; }
29645if ${ac_cv_lib_ipc_shmat+:} false; then :
29646  $as_echo_n "(cached) " >&6
29647else
29648  ac_check_lib_save_LIBS=$LIBS
29649LIBS="-lipc  $LIBS"
29650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29651/* end confdefs.h.  */
29652
29653/* Override any GCC internal prototype to avoid an error.
29654   Use char because int might match the return type of a GCC
29655   builtin and then its argument prototype would still apply.  */
29656#ifdef __cplusplus
29657extern "C"
29658#endif
29659char shmat ();
29660int
29661main ()
29662{
29663return shmat ();
29664  ;
29665  return 0;
29666}
29667_ACEOF
29668if ac_fn_cxx_try_link "$LINENO"; then :
29669  ac_cv_lib_ipc_shmat=yes
29670else
29671  ac_cv_lib_ipc_shmat=no
29672fi
29673rm -f core conftest.err conftest.$ac_objext \
29674    conftest$ac_exeext conftest.$ac_ext
29675LIBS=$ac_check_lib_save_LIBS
29676fi
29677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29678$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29679if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
29680  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29681fi
29682
29683    fi
29684  fi
29685
29686  # Check for libraries that X11R6 Xt/Xaw programs need.
29687  ac_save_LDFLAGS=$LDFLAGS
29688  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29689  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29690  # check for ICE first), but we must link in the order -lSM -lICE or
29691  # we get undefined symbols.  So assume we have SM if we have ICE.
29692  # These have to be linked with before -lX11, unlike the other
29693  # libraries we check for below, so use a different variable.
29694  # John Interrante, Karl Berry
29695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29696$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29697if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
29698  $as_echo_n "(cached) " >&6
29699else
29700  ac_check_lib_save_LIBS=$LIBS
29701LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29703/* end confdefs.h.  */
29704
29705/* Override any GCC internal prototype to avoid an error.
29706   Use char because int might match the return type of a GCC
29707   builtin and then its argument prototype would still apply.  */
29708#ifdef __cplusplus
29709extern "C"
29710#endif
29711char IceConnectionNumber ();
29712int
29713main ()
29714{
29715return IceConnectionNumber ();
29716  ;
29717  return 0;
29718}
29719_ACEOF
29720if ac_fn_cxx_try_link "$LINENO"; then :
29721  ac_cv_lib_ICE_IceConnectionNumber=yes
29722else
29723  ac_cv_lib_ICE_IceConnectionNumber=no
29724fi
29725rm -f core conftest.err conftest.$ac_objext \
29726    conftest$ac_exeext conftest.$ac_ext
29727LIBS=$ac_check_lib_save_LIBS
29728fi
29729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29730$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29731if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
29732  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29733fi
29734
29735  LDFLAGS=$ac_save_LDFLAGS
29736
29737fi
29738
29739
29740# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29741# this doesn't make sense so we remove it.
29742if test "x$COMPILE_TYPE" = xcross; then
29743  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29744fi
29745
29746if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29747
29748    # Print a helpful message on how to acquire the necessary build dependency.
29749    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29750    MISSING_DEPENDENCY=x11
29751    PKGHANDLER_COMMAND=
29752
29753    case $PKGHANDLER in
29754	apt-get)
29755                apt_help     $MISSING_DEPENDENCY ;;
29756    yum)
29757                yum_help     $MISSING_DEPENDENCY ;;
29758	port)
29759                port_help    $MISSING_DEPENDENCY ;;
29760	pkgutil)
29761                pkgutil_help $MISSING_DEPENDENCY ;;
29762	pkgadd)
29763                pkgadd_help  $MISSING_DEPENDENCY ;;
29764    * )
29765      break ;;
29766    esac
29767
29768    if test "x$PKGHANDLER_COMMAND" != x; then
29769        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29770    fi
29771
29772    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29773fi
29774
29775# Some of the old makefiles require a setting of OPENWIN_HOME
29776# Since the X11R6 directory has disappeared on later Linuxes,
29777# we need to probe for it.
29778if test "x$OPENJDK_TARGET_OS" = xlinux; then
29779    if test -d "$SYS_ROOT/usr/X11R6"; then
29780        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29781    fi
29782    if test -d "$SYS_ROOT/usr/include/X11"; then
29783        OPENWIN_HOME="$SYS_ROOT/usr"
29784    fi
29785fi
29786if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29787    OPENWIN_HOME="/usr/openwin"
29788fi
29789
29790
29791
29792#
29793# Weird Sol10 something check...TODO change to try compile
29794#
29795if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29796  if test "`uname -r`" = "5.10"; then
29797     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29798     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29799     fi
29800  fi
29801fi
29802
29803ac_ext=c
29804ac_cpp='$CPP $CPPFLAGS'
29805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29807ac_compiler_gnu=$ac_cv_c_compiler_gnu
29808
29809OLD_CFLAGS="$CFLAGS"
29810CFLAGS="$CFLAGS $X_CFLAGS"
29811
29812# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29813for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29814do :
29815  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29816ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29817                   # include <X11/Xutil.h>
29818
29819"
29820if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29821  cat >>confdefs.h <<_ACEOF
29822#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29823_ACEOF
29824 X11_A_OK=yes
29825else
29826  X11_A_OK=no
29827fi
29828
29829done
29830
29831
29832CFLAGS="$OLD_CFLAGS"
29833ac_ext=cpp
29834ac_cpp='$CXXCPP $CPPFLAGS'
29835ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29836ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29837ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29838
29839
29840if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29841
29842    # Print a helpful message on how to acquire the necessary build dependency.
29843    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29844    MISSING_DEPENDENCY=x11
29845    PKGHANDLER_COMMAND=
29846
29847    case $PKGHANDLER in
29848	apt-get)
29849                apt_help     $MISSING_DEPENDENCY ;;
29850    yum)
29851                yum_help     $MISSING_DEPENDENCY ;;
29852	port)
29853                port_help    $MISSING_DEPENDENCY ;;
29854	pkgutil)
29855                pkgutil_help $MISSING_DEPENDENCY ;;
29856	pkgadd)
29857                pkgadd_help  $MISSING_DEPENDENCY ;;
29858    * )
29859      break ;;
29860    esac
29861
29862    if test "x$PKGHANDLER_COMMAND" != x; then
29863        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29864    fi
29865
29866    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29867fi
29868
29869
29870
29871
29872
29873
29874###############################################################################
29875#
29876# The common unix printing system cups is used to print from java.
29877#
29878
29879# Check whether --with-cups was given.
29880if test "${with_cups+set}" = set; then :
29881  withval=$with_cups;
29882fi
29883
29884
29885# Check whether --with-cups-include was given.
29886if test "${with_cups_include+set}" = set; then :
29887  withval=$with_cups_include;
29888fi
29889
29890
29891if test "x$CUPS_NOT_NEEDED" = xyes; then
29892	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29893		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29894$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29895	fi
29896	CUPS_CFLAGS=
29897else
29898	CUPS_FOUND=no
29899
29900	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29901	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29902	fi
29903
29904	if test "x${with_cups}" != x; then
29905	    CUPS_CFLAGS="-I${with_cups}/include"
29906	    CUPS_FOUND=yes
29907	fi
29908	if test "x${with_cups_include}" != x; then
29909	    CUPS_CFLAGS="-I${with_cups_include}"
29910	    CUPS_FOUND=yes
29911	fi
29912	if test "x$CUPS_FOUND" = xno; then
29913
29914
29915    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29916        # Source the builddeps file again, to make sure it uses the latest variables!
29917        . $builddepsfile
29918        # Look for a target and build machine specific resource!
29919        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29920        if test "x$resource" = x; then
29921            # Ok, lets instead look for a target specific resource
29922            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29923        fi
29924        if test "x$resource" = x; then
29925            # Ok, lets instead look for a build specific resource
29926            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29927        fi
29928        if test "x$resource" = x; then
29929            # Ok, lets instead look for a generic resource
29930            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29931            resource=${builddep_cups}
29932        fi
29933        if test "x$resource" != x; then
29934            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29935$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29936	    # If the resource in the builddeps.conf file is an existing directory,
29937	    # for example /java/linux/cups
29938	    if test -d ${resource}; then
29939	       depdir=${resource}
29940	    else
29941
29942# cups is for example mymodule
29943# $resource is for example libs/general/libmymod_1_2_3.zip
29944# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29945# $with_builddeps_dir is for example /localhome/builddeps
29946# depdir is the name of the variable into which we store the depdir, eg MYMOD
29947# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29948# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29949    filename=`basename $resource`
29950    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29951    filebase=${filename%%.*}
29952    extension=${filename#*.}
29953    installdir=$with_builddeps_dir/$filebase
29954    if test ! -f $installdir/$filename.unpacked; then
29955        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29956$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29957        if test ! -d $installdir; then
29958            mkdir -p $installdir
29959        fi
29960        if test ! -d $installdir; then
29961            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29962        fi
29963        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29964        touch $tmpfile
29965        if test ! -f $tmpfile; then
29966            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29967        fi
29968
29969    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29970    # $tmpfile is the local file name for the downloaded file.
29971    VALID_TOOL=no
29972    if test "x$BDEPS_FTP" = xwget; then
29973       VALID_TOOL=yes
29974       wget -O $tmpfile $with_builddeps_server/$resource
29975    fi
29976    if test "x$BDEPS_FTP" = xlftp; then
29977       VALID_TOOL=yes
29978       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29979    fi
29980    if test "x$BDEPS_FTP" = xftp; then
29981        VALID_TOOL=yes
29982        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29983        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29984        FTPUSERPWD=${FTPSERVER%%@*}
29985        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29986            FTPUSER=${userpwd%%:*}
29987            FTPPWD=${userpwd#*@}
29988            FTPSERVER=${FTPSERVER#*@}
29989        else
29990            FTPUSER=ftp
29991            FTPPWD=ftp
29992        fi
29993        # the "pass" command does not work on some
29994        # ftp clients (read ftp.exe) but if it works,
29995        # passive mode is better!
29996        (\
29997            echo "user $FTPUSER $FTPPWD"        ;\
29998            echo "pass"                         ;\
29999            echo "bin"                          ;\
30000            echo "get $FTPPATH $tmpfile"              ;\
30001        ) | ftp -in $FTPSERVER
30002    fi
30003    if test "x$VALID_TOOL" != xyes; then
30004       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30005    fi
30006
30007        mv $tmpfile $installdir/$filename
30008        if test ! -s $installdir/$filename; then
30009            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30010        fi
30011        case "$extension" in
30012            zip)  echo "Unzipping $installdir/$filename..."
30013               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30014            ;;
30015            tar.gz) echo "Untaring $installdir/$filename..."
30016               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30017            ;;
30018            tgz) echo "Untaring $installdir/$filename..."
30019               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30020            ;;
30021            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30022            ;;
30023        esac
30024    fi
30025    if test -f $installdir/$filename.unpacked; then
30026        depdir=$installdir
30027    fi
30028
30029	    fi
30030            # Source the builddeps file again, because in the previous command, the depdir
30031            # was updated to point at the current build dependency install directory.
30032            . $builddepsfile
30033            # Now extract variables from the builddeps.conf files.
30034            theroot=${builddep_cups_ROOT}
30035            thecflags=${builddep_cups_CFLAGS}
30036            thelibs=${builddep_cups_LIBS}
30037            if test "x$depdir" = x; then
30038                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30039            fi
30040            CUPS=$depdir
30041            if test "x$theroot" != x; then
30042               CUPS="$theroot"
30043            fi
30044            if test "x$thecflags" != x; then
30045               CUPS_CFLAGS="$thecflags"
30046            fi
30047            if test "x$thelibs" != x; then
30048               CUPS_LIBS="$thelibs"
30049            fi
30050            CUPS_FOUND=yes
30051
30052        fi
30053
30054    fi
30055
30056	fi
30057	if test "x$CUPS_FOUND" = xno; then
30058	    # Are the cups headers installed in the default /usr/include location?
30059	    for ac_header in cups/cups.h cups/ppd.h
30060do :
30061  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30062ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30063if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30064  cat >>confdefs.h <<_ACEOF
30065#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30066_ACEOF
30067 CUPS_FOUND=yes
30068	                      CUPS_CFLAGS=
30069	                      DEFAULT_CUPS=yes
30070fi
30071
30072done
30073
30074	fi
30075	if test "x$CUPS_FOUND" = xno; then
30076	    # Getting nervous now? Lets poke around for standard Solaris third-party
30077	    # package installation locations.
30078	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30079$as_echo_n "checking for cups headers... " >&6; }
30080	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30081	       # An SFW package seems to be installed!
30082	       CUPS_FOUND=yes
30083	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30084	    elif test -s /opt/csw/include/cups/cups.h; then
30085	       # A CSW package seems to be installed!
30086	       CUPS_FOUND=yes
30087	       CUPS_CFLAGS="-I/opt/csw/include"
30088	    fi
30089	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30090$as_echo "$CUPS_FOUND" >&6; }
30091	fi
30092	if test "x$CUPS_FOUND" = xno; then
30093
30094    # Print a helpful message on how to acquire the necessary build dependency.
30095    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30096    MISSING_DEPENDENCY=cups
30097    PKGHANDLER_COMMAND=
30098
30099    case $PKGHANDLER in
30100	apt-get)
30101                apt_help     $MISSING_DEPENDENCY ;;
30102    yum)
30103                yum_help     $MISSING_DEPENDENCY ;;
30104	port)
30105                port_help    $MISSING_DEPENDENCY ;;
30106	pkgutil)
30107                pkgutil_help $MISSING_DEPENDENCY ;;
30108	pkgadd)
30109                pkgadd_help  $MISSING_DEPENDENCY ;;
30110    * )
30111      break ;;
30112    esac
30113
30114    if test "x$PKGHANDLER_COMMAND" != x; then
30115        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30116    fi
30117
30118	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30119	fi
30120fi
30121
30122
30123
30124
30125
30126
30127###############################################################################
30128#
30129# The ubiquitous freetype2 library is used to render fonts.
30130#
30131
30132# Check whether --with-freetype was given.
30133if test "${with_freetype+set}" = set; then :
30134  withval=$with_freetype;
30135fi
30136
30137
30138# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30139USING_SYSTEM_FT_LIB=false
30140
30141if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30142	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30143		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30144$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30145	fi
30146	FREETYPE2_CFLAGS=
30147	FREETYPE2_LIBS=
30148        FREETYPE2_LIB_PATH=
30149else
30150	FREETYPE2_FOUND=no
30151
30152	if test "x$with_freetype" != x; then
30153
30154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30155
30156  # Input might be given as Windows format, start by converting to
30157  # unix format.
30158  path="$with_freetype"
30159  new_path=`$CYGPATH -u "$path"`
30160
30161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30164  # "foo.exe" is OK but "foo" is an error.
30165  #
30166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30167  # It is also a way to make sure we got the proper file name for the real test later on.
30168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30169  if test "x$test_shortpath" = x; then
30170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30171$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30172    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30173  fi
30174
30175  # Call helper function which possibly converts this using DOS-style short mode.
30176  # If so, the updated path is stored in $new_path.
30177
30178  input_path="$new_path"
30179  # Check if we need to convert this using DOS-style short mode. If the path
30180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30181  # take no chances and rewrite it.
30182  # Note: m4 eats our [], so we need to use [ and ] instead.
30183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30184  if test "x$has_forbidden_chars" != x; then
30185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30189      # Going to short mode and back again did indeed matter. Since short mode is
30190      # case insensitive, let's make it lowercase to improve readability.
30191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30192      # Now convert it back to Unix-stile (cygpath)
30193      input_path=`$CYGPATH -u "$shortmode_path"`
30194      new_path="$input_path"
30195    fi
30196  fi
30197
30198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30199  if test "x$test_cygdrive_prefix" = x; then
30200    # As a simple fix, exclude /usr/bin since it's not a real path.
30201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30203      # a path prefixed by /cygdrive for fixpath to work.
30204      new_path="$CYGWIN_ROOT_PATH$input_path"
30205    fi
30206  fi
30207
30208
30209  if test "x$path" != "x$new_path"; then
30210    with_freetype="$new_path"
30211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30212$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30213  fi
30214
30215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30216
30217  path="$with_freetype"
30218  has_colon=`$ECHO $path | $GREP ^.:`
30219  new_path="$path"
30220  if test "x$has_colon" = x; then
30221    # Not in mixed or Windows style, start by that.
30222    new_path=`cmd //c echo $path`
30223  fi
30224
30225
30226  input_path="$new_path"
30227  # Check if we need to convert this using DOS-style short mode. If the path
30228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30229  # take no chances and rewrite it.
30230  # Note: m4 eats our [], so we need to use [ and ] instead.
30231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30232  if test "x$has_forbidden_chars" != x; then
30233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30235  fi
30236
30237
30238  windows_path="$new_path"
30239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30240    unix_path=`$CYGPATH -u "$windows_path"`
30241    new_path="$unix_path"
30242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30244    new_path="$unix_path"
30245  fi
30246
30247  if test "x$path" != "x$new_path"; then
30248    with_freetype="$new_path"
30249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30250$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30251  fi
30252
30253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30255
30256  else
30257    # We're on a posix platform. Hooray! :)
30258    path="$with_freetype"
30259
30260    if test ! -f "$path" && test ! -d "$path"; then
30261      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30262    fi
30263
30264    has_space=`$ECHO "$path" | $GREP " "`
30265    if test "x$has_space" != x; then
30266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30267$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30268      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30269    fi
30270  fi
30271
30272	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30273            FREETYPE2_LIB_PATH="$with_freetype/lib"
30274            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30275                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30276                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30277            fi
30278            if test "x$OPENJDK_TARGET_OS" = xwindows; then
30279                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30280            fi
30281	    FREETYPE2_CFLAGS="-I$with_freetype/include"
30282            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30283                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30284            fi
30285 	    FREETYPE2_FOUND=yes
30286   	    if test "x$FREETYPE2_FOUND" = xyes; then
30287	        # Verify that the directories exist
30288                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30289		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30290		fi
30291	        # List the contents of the lib.
30292		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30293                if test "x$FREETYPELIB" = x; then
30294		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30295		fi
30296	        # Check one h-file
30297                if ! test -s "$with_freetype/include/ft2build.h"; then
30298		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30299		fi
30300            fi
30301        fi
30302	if test "x$FREETYPE2_FOUND" = xno; then
30303
30304
30305    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30306        # Source the builddeps file again, to make sure it uses the latest variables!
30307        . $builddepsfile
30308        # Look for a target and build machine specific resource!
30309        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30310        if test "x$resource" = x; then
30311            # Ok, lets instead look for a target specific resource
30312            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30313        fi
30314        if test "x$resource" = x; then
30315            # Ok, lets instead look for a build specific resource
30316            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30317        fi
30318        if test "x$resource" = x; then
30319            # Ok, lets instead look for a generic resource
30320            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30321            resource=${builddep_freetype2}
30322        fi
30323        if test "x$resource" != x; then
30324            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30325$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30326	    # If the resource in the builddeps.conf file is an existing directory,
30327	    # for example /java/linux/cups
30328	    if test -d ${resource}; then
30329	       depdir=${resource}
30330	    else
30331
30332# freetype2 is for example mymodule
30333# $resource is for example libs/general/libmymod_1_2_3.zip
30334# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30335# $with_builddeps_dir is for example /localhome/builddeps
30336# depdir is the name of the variable into which we store the depdir, eg MYMOD
30337# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30338# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30339    filename=`basename $resource`
30340    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30341    filebase=${filename%%.*}
30342    extension=${filename#*.}
30343    installdir=$with_builddeps_dir/$filebase
30344    if test ! -f $installdir/$filename.unpacked; then
30345        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30346$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30347        if test ! -d $installdir; then
30348            mkdir -p $installdir
30349        fi
30350        if test ! -d $installdir; then
30351            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30352        fi
30353        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30354        touch $tmpfile
30355        if test ! -f $tmpfile; then
30356            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30357        fi
30358
30359    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30360    # $tmpfile is the local file name for the downloaded file.
30361    VALID_TOOL=no
30362    if test "x$BDEPS_FTP" = xwget; then
30363       VALID_TOOL=yes
30364       wget -O $tmpfile $with_builddeps_server/$resource
30365    fi
30366    if test "x$BDEPS_FTP" = xlftp; then
30367       VALID_TOOL=yes
30368       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30369    fi
30370    if test "x$BDEPS_FTP" = xftp; then
30371        VALID_TOOL=yes
30372        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30373        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30374        FTPUSERPWD=${FTPSERVER%%@*}
30375        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30376            FTPUSER=${userpwd%%:*}
30377            FTPPWD=${userpwd#*@}
30378            FTPSERVER=${FTPSERVER#*@}
30379        else
30380            FTPUSER=ftp
30381            FTPPWD=ftp
30382        fi
30383        # the "pass" command does not work on some
30384        # ftp clients (read ftp.exe) but if it works,
30385        # passive mode is better!
30386        (\
30387            echo "user $FTPUSER $FTPPWD"        ;\
30388            echo "pass"                         ;\
30389            echo "bin"                          ;\
30390            echo "get $FTPPATH $tmpfile"              ;\
30391        ) | ftp -in $FTPSERVER
30392    fi
30393    if test "x$VALID_TOOL" != xyes; then
30394       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30395    fi
30396
30397        mv $tmpfile $installdir/$filename
30398        if test ! -s $installdir/$filename; then
30399            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30400        fi
30401        case "$extension" in
30402            zip)  echo "Unzipping $installdir/$filename..."
30403               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30404            ;;
30405            tar.gz) echo "Untaring $installdir/$filename..."
30406               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30407            ;;
30408            tgz) echo "Untaring $installdir/$filename..."
30409               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30410            ;;
30411            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30412            ;;
30413        esac
30414    fi
30415    if test -f $installdir/$filename.unpacked; then
30416        depdir=$installdir
30417    fi
30418
30419	    fi
30420            # Source the builddeps file again, because in the previous command, the depdir
30421            # was updated to point at the current build dependency install directory.
30422            . $builddepsfile
30423            # Now extract variables from the builddeps.conf files.
30424            theroot=${builddep_freetype2_ROOT}
30425            thecflags=${builddep_freetype2_CFLAGS}
30426            thelibs=${builddep_freetype2_LIBS}
30427            if test "x$depdir" = x; then
30428                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
30429            fi
30430            FREETYPE2=$depdir
30431            if test "x$theroot" != x; then
30432               FREETYPE2="$theroot"
30433            fi
30434            if test "x$thecflags" != x; then
30435               FREETYPE2_CFLAGS="$thecflags"
30436            fi
30437            if test "x$thelibs" != x; then
30438               FREETYPE2_LIBS="$thelibs"
30439            fi
30440            FREETYPE2_FOUND=yes
30441            else FREETYPE2_FOUND=no
30442
30443        fi
30444        else FREETYPE2_FOUND=no
30445
30446    fi
30447
30448            USING_SYSTEM_FT_LIB=true
30449	fi
30450	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
30451            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
30452
30453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30454
30455  # Input might be given as Windows format, start by converting to
30456  # unix format.
30457  path="$FREETYPELOCATION"
30458  new_path=`$CYGPATH -u "$path"`
30459
30460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30463  # "foo.exe" is OK but "foo" is an error.
30464  #
30465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30466  # It is also a way to make sure we got the proper file name for the real test later on.
30467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30468  if test "x$test_shortpath" = x; then
30469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30470$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30471    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30472  fi
30473
30474  # Call helper function which possibly converts this using DOS-style short mode.
30475  # If so, the updated path is stored in $new_path.
30476
30477  input_path="$new_path"
30478  # Check if we need to convert this using DOS-style short mode. If the path
30479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30480  # take no chances and rewrite it.
30481  # Note: m4 eats our [], so we need to use [ and ] instead.
30482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30483  if test "x$has_forbidden_chars" != x; then
30484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30488      # Going to short mode and back again did indeed matter. Since short mode is
30489      # case insensitive, let's make it lowercase to improve readability.
30490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30491      # Now convert it back to Unix-stile (cygpath)
30492      input_path=`$CYGPATH -u "$shortmode_path"`
30493      new_path="$input_path"
30494    fi
30495  fi
30496
30497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30498  if test "x$test_cygdrive_prefix" = x; then
30499    # As a simple fix, exclude /usr/bin since it's not a real path.
30500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30502      # a path prefixed by /cygdrive for fixpath to work.
30503      new_path="$CYGWIN_ROOT_PATH$input_path"
30504    fi
30505  fi
30506
30507
30508  if test "x$path" != "x$new_path"; then
30509    FREETYPELOCATION="$new_path"
30510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30511$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30512  fi
30513
30514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30515
30516  path="$FREETYPELOCATION"
30517  has_colon=`$ECHO $path | $GREP ^.:`
30518  new_path="$path"
30519  if test "x$has_colon" = x; then
30520    # Not in mixed or Windows style, start by that.
30521    new_path=`cmd //c echo $path`
30522  fi
30523
30524
30525  input_path="$new_path"
30526  # Check if we need to convert this using DOS-style short mode. If the path
30527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30528  # take no chances and rewrite it.
30529  # Note: m4 eats our [], so we need to use [ and ] instead.
30530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30531  if test "x$has_forbidden_chars" != x; then
30532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30534  fi
30535
30536
30537  windows_path="$new_path"
30538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30539    unix_path=`$CYGPATH -u "$windows_path"`
30540    new_path="$unix_path"
30541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30543    new_path="$unix_path"
30544  fi
30545
30546  if test "x$path" != "x$new_path"; then
30547    FREETYPELOCATION="$new_path"
30548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30549$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30550  fi
30551
30552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30554
30555  else
30556    # We're on a posix platform. Hooray! :)
30557    path="$FREETYPELOCATION"
30558
30559    if test ! -f "$path" && test ! -d "$path"; then
30560      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30561    fi
30562
30563    has_space=`$ECHO "$path" | $GREP " "`
30564    if test "x$has_space" != x; then
30565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30566$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30567      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30568    fi
30569  fi
30570
30571	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30572$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30573	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30574	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30575	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30576 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30577                if ! test -s "$FREETYPE2_LIBS"; then
30578		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30579		fi
30580                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30581		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30582		fi
30583                USING_SYSTEM_FT_LIB=true
30584                FREETYPE2_FOUND=yes
30585	    fi
30586	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30587$as_echo "$FREETYPE2_FOUND" >&6; }
30588        fi
30589	if test "x$FREETYPE2_FOUND" = xno; then
30590
30591pkg_failed=no
30592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30593$as_echo_n "checking for FREETYPE2... " >&6; }
30594
30595if test -n "$FREETYPE2_CFLAGS"; then
30596    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30597 elif test -n "$PKG_CONFIG"; then
30598    if test -n "$PKG_CONFIG" && \
30599    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30600  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30601  ac_status=$?
30602  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30603  test $ac_status = 0; }; then
30604  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30605else
30606  pkg_failed=yes
30607fi
30608 else
30609    pkg_failed=untried
30610fi
30611if test -n "$FREETYPE2_LIBS"; then
30612    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30613 elif test -n "$PKG_CONFIG"; then
30614    if test -n "$PKG_CONFIG" && \
30615    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30616  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30617  ac_status=$?
30618  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30619  test $ac_status = 0; }; then
30620  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30621else
30622  pkg_failed=yes
30623fi
30624 else
30625    pkg_failed=untried
30626fi
30627
30628
30629
30630if test $pkg_failed = yes; then
30631
30632if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30633        _pkg_short_errors_supported=yes
30634else
30635        _pkg_short_errors_supported=no
30636fi
30637        if test $_pkg_short_errors_supported = yes; then
30638	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30639        else
30640	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30641        fi
30642	# Put the nasty error message in config.log where it belongs
30643	echo "$FREETYPE2_PKG_ERRORS" >&5
30644
30645	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30646$as_echo "no" >&6; }
30647                FREETYPE2_FOUND=no
30648elif test $pkg_failed = untried; then
30649	FREETYPE2_FOUND=no
30650else
30651	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30652	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30654$as_echo "yes" >&6; }
30655	FREETYPE2_FOUND=yes
30656fi
30657            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30658            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30659            USING_SYSTEM_FT_LIB=true
30660            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30661            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30662              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30663            fi
30664	fi
30665	if test "x$FREETYPE2_FOUND" = xno; then
30666	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30667$as_echo_n "checking for freetype in some standard locations... " >&6; }
30668
30669	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30670	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30671	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30672	    fi
30673	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30674	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30675	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30676	    fi
30677
30678	    PREV_CXXCFLAGS="$CXXFLAGS"
30679	    PREV_LDFLAGS="$LDFLAGS"
30680	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30681	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30682	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30683/* end confdefs.h.  */
30684#include<ft2build.h>
30685	                    #include FT_FREETYPE_H
30686	                   int main() { return 0; }
30687
30688_ACEOF
30689if ac_fn_cxx_try_link "$LINENO"; then :
30690
30691	                      # Yes, the default cflags and libs did the trick.
30692	                      FREETYPE2_FOUND=yes
30693	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30694	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30695
30696else
30697
30698	                      FREETYPE2_FOUND=no
30699
30700fi
30701rm -f core conftest.err conftest.$ac_objext \
30702    conftest$ac_exeext conftest.$ac_ext
30703            CXXCFLAGS="$PREV_CXXFLAGS"
30704	    LDFLAGS="$PREV_LDFLAGS"
30705	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30706$as_echo "$FREETYPE2_FOUND" >&6; }
30707            USING_SYSTEM_FT_LIB=true
30708	fi
30709	if test "x$FREETYPE2_FOUND" = xno; then
30710
30711    # Print a helpful message on how to acquire the necessary build dependency.
30712    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30713    MISSING_DEPENDENCY=freetype2
30714    PKGHANDLER_COMMAND=
30715
30716    case $PKGHANDLER in
30717	apt-get)
30718                apt_help     $MISSING_DEPENDENCY ;;
30719    yum)
30720                yum_help     $MISSING_DEPENDENCY ;;
30721	port)
30722                port_help    $MISSING_DEPENDENCY ;;
30723	pkgutil)
30724                pkgutil_help $MISSING_DEPENDENCY ;;
30725	pkgadd)
30726                pkgadd_help  $MISSING_DEPENDENCY ;;
30727    * )
30728      break ;;
30729    esac
30730
30731    if test "x$PKGHANDLER_COMMAND" != x; then
30732        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30733    fi
30734
30735		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30736	fi
30737
30738        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30739            # AC_CHECK_LIB does not support use of cl.exe
30740            PREV_LDFLAGS="$LDFLAGS"
30741            LDFLAGS="$FREETYPE2_LIBS"
30742            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30743$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30744if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
30745  $as_echo_n "(cached) " >&6
30746else
30747  ac_check_lib_save_LIBS=$LIBS
30748LIBS="-lfreetype  $LIBS"
30749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30750/* end confdefs.h.  */
30751
30752/* Override any GCC internal prototype to avoid an error.
30753   Use char because int might match the return type of a GCC
30754   builtin and then its argument prototype would still apply.  */
30755#ifdef __cplusplus
30756extern "C"
30757#endif
30758char FT_Init_FreeType ();
30759int
30760main ()
30761{
30762return FT_Init_FreeType ();
30763  ;
30764  return 0;
30765}
30766_ACEOF
30767if ac_fn_cxx_try_link "$LINENO"; then :
30768  ac_cv_lib_freetype_FT_Init_FreeType=yes
30769else
30770  ac_cv_lib_freetype_FT_Init_FreeType=no
30771fi
30772rm -f core conftest.err conftest.$ac_objext \
30773    conftest$ac_exeext conftest.$ac_ext
30774LIBS=$ac_check_lib_save_LIBS
30775fi
30776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30777$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30778if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
30779  FREETYPE2_FOUND=true
30780else
30781  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30782fi
30783
30784            LDFLAGS="$PREV_LDFLAGS"
30785        fi
30786fi
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796###############################################################################
30797#
30798# Check for alsa headers and libraries. Used on Linux/GNU systems.
30799#
30800
30801# Check whether --with-alsa was given.
30802if test "${with_alsa+set}" = set; then :
30803  withval=$with_alsa;
30804fi
30805
30806
30807# Check whether --with-alsa-include was given.
30808if test "${with_alsa_include+set}" = set; then :
30809  withval=$with_alsa_include;
30810fi
30811
30812
30813# Check whether --with-alsa-lib was given.
30814if test "${with_alsa_lib+set}" = set; then :
30815  withval=$with_alsa_lib;
30816fi
30817
30818
30819if test "x$ALSA_NOT_NEEDED" = xyes; then
30820	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30821		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30822$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30823	fi
30824	ALSA_CFLAGS=
30825	ALSA_LIBS=
30826else
30827	ALSA_FOUND=no
30828
30829	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30830	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30831	fi
30832
30833	if test "x${with_alsa}" != x; then
30834	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30835	    ALSA_CFLAGS="-I${with_alsa}/include"
30836	    ALSA_FOUND=yes
30837	fi
30838	if test "x${with_alsa_include}" != x; then
30839	    ALSA_CFLAGS="-I${with_alsa_include}"
30840	    ALSA_FOUND=yes
30841	fi
30842	if test "x${with_alsa_lib}" != x; then
30843	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30844	    ALSA_FOUND=yes
30845	fi
30846	if test "x$ALSA_FOUND" = xno; then
30847
30848
30849    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30850        # Source the builddeps file again, to make sure it uses the latest variables!
30851        . $builddepsfile
30852        # Look for a target and build machine specific resource!
30853        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30854        if test "x$resource" = x; then
30855            # Ok, lets instead look for a target specific resource
30856            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30857        fi
30858        if test "x$resource" = x; then
30859            # Ok, lets instead look for a build specific resource
30860            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30861        fi
30862        if test "x$resource" = x; then
30863            # Ok, lets instead look for a generic resource
30864            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30865            resource=${builddep_alsa}
30866        fi
30867        if test "x$resource" != x; then
30868            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30869$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30870	    # If the resource in the builddeps.conf file is an existing directory,
30871	    # for example /java/linux/cups
30872	    if test -d ${resource}; then
30873	       depdir=${resource}
30874	    else
30875
30876# alsa is for example mymodule
30877# $resource is for example libs/general/libmymod_1_2_3.zip
30878# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30879# $with_builddeps_dir is for example /localhome/builddeps
30880# depdir is the name of the variable into which we store the depdir, eg MYMOD
30881# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30882# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30883    filename=`basename $resource`
30884    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30885    filebase=${filename%%.*}
30886    extension=${filename#*.}
30887    installdir=$with_builddeps_dir/$filebase
30888    if test ! -f $installdir/$filename.unpacked; then
30889        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30890$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30891        if test ! -d $installdir; then
30892            mkdir -p $installdir
30893        fi
30894        if test ! -d $installdir; then
30895            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30896        fi
30897        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30898        touch $tmpfile
30899        if test ! -f $tmpfile; then
30900            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30901        fi
30902
30903    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30904    # $tmpfile is the local file name for the downloaded file.
30905    VALID_TOOL=no
30906    if test "x$BDEPS_FTP" = xwget; then
30907       VALID_TOOL=yes
30908       wget -O $tmpfile $with_builddeps_server/$resource
30909    fi
30910    if test "x$BDEPS_FTP" = xlftp; then
30911       VALID_TOOL=yes
30912       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30913    fi
30914    if test "x$BDEPS_FTP" = xftp; then
30915        VALID_TOOL=yes
30916        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30917        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30918        FTPUSERPWD=${FTPSERVER%%@*}
30919        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30920            FTPUSER=${userpwd%%:*}
30921            FTPPWD=${userpwd#*@}
30922            FTPSERVER=${FTPSERVER#*@}
30923        else
30924            FTPUSER=ftp
30925            FTPPWD=ftp
30926        fi
30927        # the "pass" command does not work on some
30928        # ftp clients (read ftp.exe) but if it works,
30929        # passive mode is better!
30930        (\
30931            echo "user $FTPUSER $FTPPWD"        ;\
30932            echo "pass"                         ;\
30933            echo "bin"                          ;\
30934            echo "get $FTPPATH $tmpfile"              ;\
30935        ) | ftp -in $FTPSERVER
30936    fi
30937    if test "x$VALID_TOOL" != xyes; then
30938       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30939    fi
30940
30941        mv $tmpfile $installdir/$filename
30942        if test ! -s $installdir/$filename; then
30943            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30944        fi
30945        case "$extension" in
30946            zip)  echo "Unzipping $installdir/$filename..."
30947               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30948            ;;
30949            tar.gz) echo "Untaring $installdir/$filename..."
30950               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30951            ;;
30952            tgz) echo "Untaring $installdir/$filename..."
30953               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30954            ;;
30955            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30956            ;;
30957        esac
30958    fi
30959    if test -f $installdir/$filename.unpacked; then
30960        depdir=$installdir
30961    fi
30962
30963	    fi
30964            # Source the builddeps file again, because in the previous command, the depdir
30965            # was updated to point at the current build dependency install directory.
30966            . $builddepsfile
30967            # Now extract variables from the builddeps.conf files.
30968            theroot=${builddep_alsa_ROOT}
30969            thecflags=${builddep_alsa_CFLAGS}
30970            thelibs=${builddep_alsa_LIBS}
30971            if test "x$depdir" = x; then
30972                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30973            fi
30974            ALSA=$depdir
30975            if test "x$theroot" != x; then
30976               ALSA="$theroot"
30977            fi
30978            if test "x$thecflags" != x; then
30979               ALSA_CFLAGS="$thecflags"
30980            fi
30981            if test "x$thelibs" != x; then
30982               ALSA_LIBS="$thelibs"
30983            fi
30984            ALSA_FOUND=yes
30985            else ALSA_FOUND=no
30986
30987        fi
30988        else ALSA_FOUND=no
30989
30990    fi
30991
30992	fi
30993	if test "x$ALSA_FOUND" = xno; then
30994
30995pkg_failed=no
30996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30997$as_echo_n "checking for ALSA... " >&6; }
30998
30999if test -n "$ALSA_CFLAGS"; then
31000    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31001 elif test -n "$PKG_CONFIG"; then
31002    if test -n "$PKG_CONFIG" && \
31003    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31004  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31005  ac_status=$?
31006  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31007  test $ac_status = 0; }; then
31008  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31009else
31010  pkg_failed=yes
31011fi
31012 else
31013    pkg_failed=untried
31014fi
31015if test -n "$ALSA_LIBS"; then
31016    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31017 elif test -n "$PKG_CONFIG"; then
31018    if test -n "$PKG_CONFIG" && \
31019    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31020  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31021  ac_status=$?
31022  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31023  test $ac_status = 0; }; then
31024  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31025else
31026  pkg_failed=yes
31027fi
31028 else
31029    pkg_failed=untried
31030fi
31031
31032
31033
31034if test $pkg_failed = yes; then
31035
31036if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31037        _pkg_short_errors_supported=yes
31038else
31039        _pkg_short_errors_supported=no
31040fi
31041        if test $_pkg_short_errors_supported = yes; then
31042	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31043        else
31044	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31045        fi
31046	# Put the nasty error message in config.log where it belongs
31047	echo "$ALSA_PKG_ERRORS" >&5
31048
31049	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31050$as_echo "no" >&6; }
31051                ALSA_FOUND=no
31052elif test $pkg_failed = untried; then
31053	ALSA_FOUND=no
31054else
31055	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31056	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31057        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31058$as_echo "yes" >&6; }
31059	ALSA_FOUND=yes
31060fi
31061	fi
31062	if test "x$ALSA_FOUND" = xno; then
31063	    for ac_header in alsa/asoundlib.h
31064do :
31065  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31066if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31067  cat >>confdefs.h <<_ACEOF
31068#define HAVE_ALSA_ASOUNDLIB_H 1
31069_ACEOF
31070 ALSA_FOUND=yes
31071	                      ALSA_CFLAGS=-Iignoreme
31072	                      ALSA_LIBS=-lasound
31073	                      DEFAULT_ALSA=yes
31074else
31075  ALSA_FOUND=no
31076fi
31077
31078done
31079
31080	fi
31081	if test "x$ALSA_FOUND" = xno; then
31082
31083    # Print a helpful message on how to acquire the necessary build dependency.
31084    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31085    MISSING_DEPENDENCY=alsa
31086    PKGHANDLER_COMMAND=
31087
31088    case $PKGHANDLER in
31089	apt-get)
31090                apt_help     $MISSING_DEPENDENCY ;;
31091    yum)
31092                yum_help     $MISSING_DEPENDENCY ;;
31093	port)
31094                port_help    $MISSING_DEPENDENCY ;;
31095	pkgutil)
31096                pkgutil_help $MISSING_DEPENDENCY ;;
31097	pkgadd)
31098                pkgadd_help  $MISSING_DEPENDENCY ;;
31099    * )
31100      break ;;
31101    esac
31102
31103    if test "x$PKGHANDLER_COMMAND" != x; then
31104        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31105    fi
31106
31107	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31108	fi
31109fi
31110
31111
31112
31113
31114
31115
31116
31117###############################################################################
31118#
31119# Check for the jpeg library
31120#
31121
31122USE_EXTERNAL_LIBJPEG=true
31123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31124$as_echo_n "checking for main in -ljpeg... " >&6; }
31125if ${ac_cv_lib_jpeg_main+:} false; then :
31126  $as_echo_n "(cached) " >&6
31127else
31128  ac_check_lib_save_LIBS=$LIBS
31129LIBS="-ljpeg  $LIBS"
31130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31131/* end confdefs.h.  */
31132
31133
31134int
31135main ()
31136{
31137return main ();
31138  ;
31139  return 0;
31140}
31141_ACEOF
31142if ac_fn_cxx_try_link "$LINENO"; then :
31143  ac_cv_lib_jpeg_main=yes
31144else
31145  ac_cv_lib_jpeg_main=no
31146fi
31147rm -f core conftest.err conftest.$ac_objext \
31148    conftest$ac_exeext conftest.$ac_ext
31149LIBS=$ac_check_lib_save_LIBS
31150fi
31151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31152$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31153if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31154  cat >>confdefs.h <<_ACEOF
31155#define HAVE_LIBJPEG 1
31156_ACEOF
31157
31158  LIBS="-ljpeg $LIBS"
31159
31160else
31161   USE_EXTERNAL_LIBJPEG=false
31162               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31163$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31164
31165fi
31166
31167
31168
31169###############################################################################
31170#
31171# Check for the gif library
31172#
31173
31174USE_EXTERNAL_LIBJPEG=true
31175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
31176$as_echo_n "checking for main in -lgif... " >&6; }
31177if ${ac_cv_lib_gif_main+:} false; then :
31178  $as_echo_n "(cached) " >&6
31179else
31180  ac_check_lib_save_LIBS=$LIBS
31181LIBS="-lgif  $LIBS"
31182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31183/* end confdefs.h.  */
31184
31185
31186int
31187main ()
31188{
31189return main ();
31190  ;
31191  return 0;
31192}
31193_ACEOF
31194if ac_fn_cxx_try_link "$LINENO"; then :
31195  ac_cv_lib_gif_main=yes
31196else
31197  ac_cv_lib_gif_main=no
31198fi
31199rm -f core conftest.err conftest.$ac_objext \
31200    conftest$ac_exeext conftest.$ac_ext
31201LIBS=$ac_check_lib_save_LIBS
31202fi
31203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
31204$as_echo "$ac_cv_lib_gif_main" >&6; }
31205if test "x$ac_cv_lib_gif_main" = xyes; then :
31206  cat >>confdefs.h <<_ACEOF
31207#define HAVE_LIBGIF 1
31208_ACEOF
31209
31210  LIBS="-lgif $LIBS"
31211
31212else
31213   USE_EXTERNAL_LIBGIF=false
31214               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
31215$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
31216
31217fi
31218
31219
31220
31221###############################################################################
31222#
31223# Check for the zlib library
31224#
31225
31226
31227# Check whether --with-zlib was given.
31228if test "${with_zlib+set}" = set; then :
31229  withval=$with_zlib;
31230fi
31231
31232
31233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31234$as_echo_n "checking for compress in -lz... " >&6; }
31235if ${ac_cv_lib_z_compress+:} false; then :
31236  $as_echo_n "(cached) " >&6
31237else
31238  ac_check_lib_save_LIBS=$LIBS
31239LIBS="-lz  $LIBS"
31240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31241/* end confdefs.h.  */
31242
31243/* Override any GCC internal prototype to avoid an error.
31244   Use char because int might match the return type of a GCC
31245   builtin and then its argument prototype would still apply.  */
31246#ifdef __cplusplus
31247extern "C"
31248#endif
31249char compress ();
31250int
31251main ()
31252{
31253return compress ();
31254  ;
31255  return 0;
31256}
31257_ACEOF
31258if ac_fn_cxx_try_link "$LINENO"; then :
31259  ac_cv_lib_z_compress=yes
31260else
31261  ac_cv_lib_z_compress=no
31262fi
31263rm -f core conftest.err conftest.$ac_objext \
31264    conftest$ac_exeext conftest.$ac_ext
31265LIBS=$ac_check_lib_save_LIBS
31266fi
31267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31268$as_echo "$ac_cv_lib_z_compress" >&6; }
31269if test "x$ac_cv_lib_z_compress" = xyes; then :
31270   ZLIB_FOUND=yes
31271else
31272   ZLIB_FOUND=no
31273fi
31274
31275
31276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31277$as_echo_n "checking for which zlib to use... " >&6; }
31278
31279DEFAULT_ZLIB=bundled
31280if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31281#
31282# On macosx default is system...on others default is
31283#
31284    DEFAULT_ZLIB=system
31285fi
31286
31287if test "x${ZLIB_FOUND}" != "xyes"; then
31288#
31289# If we don't find any system...set default to bundled
31290#
31291    DEFAULT_ZLIB=bundled
31292fi
31293
31294#
31295# If user didn't specify, use DEFAULT_ZLIB
31296#
31297if test "x${with_zlib}" = "x"; then
31298    with_zlib=${DEFAULT_ZLIB}
31299fi
31300
31301if test "x${with_zlib}" = "xbundled"; then
31302    USE_EXTERNAL_LIBZ=false
31303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31304$as_echo "bundled" >&6; }
31305elif test "x${with_zlib}" = "xsystem"; then
31306    if test "x${ZLIB_FOUND}" = "xyes"; then
31307        USE_EXTERNAL_LIBZ=true
31308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31309$as_echo "system" >&6; }
31310    else
31311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31312$as_echo "system not found" >&6; }
31313        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31314    fi
31315else
31316    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31317fi
31318
31319
31320
31321###############################################################################
31322LIBZIP_CAN_USE_MMAP=true
31323
31324
31325
31326###############################################################################
31327#
31328# Check if altzone exists in time.h
31329#
31330
31331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31332/* end confdefs.h.  */
31333#include <time.h>
31334int
31335main ()
31336{
31337return (int)altzone;
31338  ;
31339  return 0;
31340}
31341_ACEOF
31342if ac_fn_cxx_try_link "$LINENO"; then :
31343  has_altzone=yes
31344else
31345  has_altzone=no
31346fi
31347rm -f core conftest.err conftest.$ac_objext \
31348    conftest$ac_exeext conftest.$ac_ext
31349if test "x$has_altzone" = xyes; then
31350
31351$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
31352
31353fi
31354
31355###############################################################################
31356#
31357# Check the maths library
31358#
31359
31360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
31361$as_echo_n "checking for cos in -lm... " >&6; }
31362if ${ac_cv_lib_m_cos+:} false; then :
31363  $as_echo_n "(cached) " >&6
31364else
31365  ac_check_lib_save_LIBS=$LIBS
31366LIBS="-lm  $LIBS"
31367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31368/* end confdefs.h.  */
31369
31370/* Override any GCC internal prototype to avoid an error.
31371   Use char because int might match the return type of a GCC
31372   builtin and then its argument prototype would still apply.  */
31373#ifdef __cplusplus
31374extern "C"
31375#endif
31376char cos ();
31377int
31378main ()
31379{
31380return cos ();
31381  ;
31382  return 0;
31383}
31384_ACEOF
31385if ac_fn_cxx_try_link "$LINENO"; then :
31386  ac_cv_lib_m_cos=yes
31387else
31388  ac_cv_lib_m_cos=no
31389fi
31390rm -f core conftest.err conftest.$ac_objext \
31391    conftest$ac_exeext conftest.$ac_ext
31392LIBS=$ac_check_lib_save_LIBS
31393fi
31394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
31395$as_echo "$ac_cv_lib_m_cos" >&6; }
31396if test "x$ac_cv_lib_m_cos" = xyes; then :
31397  cat >>confdefs.h <<_ACEOF
31398#define HAVE_LIBM 1
31399_ACEOF
31400
31401  LIBS="-lm $LIBS"
31402
31403else
31404
31405                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
31406$as_echo "$as_me: Maths library was not found" >&6;}
31407
31408fi
31409
31410
31411
31412###############################################################################
31413#
31414# Check for libdl.so
31415
31416save_LIBS="$LIBS"
31417LIBS=""
31418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
31419$as_echo_n "checking for dlopen in -ldl... " >&6; }
31420if ${ac_cv_lib_dl_dlopen+:} false; then :
31421  $as_echo_n "(cached) " >&6
31422else
31423  ac_check_lib_save_LIBS=$LIBS
31424LIBS="-ldl  $LIBS"
31425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31426/* end confdefs.h.  */
31427
31428/* Override any GCC internal prototype to avoid an error.
31429   Use char because int might match the return type of a GCC
31430   builtin and then its argument prototype would still apply.  */
31431#ifdef __cplusplus
31432extern "C"
31433#endif
31434char dlopen ();
31435int
31436main ()
31437{
31438return dlopen ();
31439  ;
31440  return 0;
31441}
31442_ACEOF
31443if ac_fn_cxx_try_link "$LINENO"; then :
31444  ac_cv_lib_dl_dlopen=yes
31445else
31446  ac_cv_lib_dl_dlopen=no
31447fi
31448rm -f core conftest.err conftest.$ac_objext \
31449    conftest$ac_exeext conftest.$ac_ext
31450LIBS=$ac_check_lib_save_LIBS
31451fi
31452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
31453$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
31454if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
31455  cat >>confdefs.h <<_ACEOF
31456#define HAVE_LIBDL 1
31457_ACEOF
31458
31459  LIBS="-ldl $LIBS"
31460
31461fi
31462
31463LIBDL="$LIBS"
31464
31465LIBS="$save_LIBS"
31466
31467
31468
31469###############################################################################
31470#
31471# statically link libstdc++ before C++ ABI is stablized on Linux unless
31472# dynamic build is configured on command line.
31473#
31474
31475# Check whether --with-stdc++lib was given.
31476if test "${with_stdc__lib+set}" = set; then :
31477  withval=$with_stdc__lib;
31478    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31479        && test "x$with_stdc__lib" != xdefault; then
31480      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31481    fi
31482
31483else
31484  with_stdc__lib=default
31485
31486fi
31487
31488
31489if test "x$OPENJDK_TARGET_OS" = xlinux; then
31490    # Test if -lstdc++ works.
31491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31492$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31493    ac_ext=cpp
31494ac_cpp='$CXXCPP $CPPFLAGS'
31495ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31496ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31497ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31498
31499    OLD_CXXFLAGS="$CXXFLAGS"
31500    CXXFLAGS="$CXXFLAGS -lstdc++"
31501    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31502/* end confdefs.h.  */
31503
31504int
31505main ()
31506{
31507return 0;
31508  ;
31509  return 0;
31510}
31511_ACEOF
31512if ac_fn_cxx_try_link "$LINENO"; then :
31513  has_dynamic_libstdcxx=yes
31514else
31515  has_dynamic_libstdcxx=no
31516fi
31517rm -f core conftest.err conftest.$ac_objext \
31518    conftest$ac_exeext conftest.$ac_ext
31519    CXXFLAGS="$OLD_CXXFLAGS"
31520    ac_ext=cpp
31521ac_cpp='$CXXCPP $CPPFLAGS'
31522ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31523ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31524ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31525
31526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31527$as_echo "$has_dynamic_libstdcxx" >&6; }
31528
31529    # Test if stdc++ can be linked statically.
31530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31531$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31532    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31533    ac_ext=cpp
31534ac_cpp='$CXXCPP $CPPFLAGS'
31535ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31536ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31537ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31538
31539    OLD_LIBS="$LIBS"
31540    OLD_CXX="$CXX"
31541    LIBS="$STATIC_STDCXX_FLAGS"
31542    CXX="$CC"
31543    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31544/* end confdefs.h.  */
31545
31546int
31547main ()
31548{
31549return 0;
31550  ;
31551  return 0;
31552}
31553_ACEOF
31554if ac_fn_cxx_try_link "$LINENO"; then :
31555  has_static_libstdcxx=yes
31556else
31557  has_static_libstdcxx=no
31558fi
31559rm -f core conftest.err conftest.$ac_objext \
31560    conftest$ac_exeext conftest.$ac_ext
31561    LIBS="$OLD_LIBS"
31562    CXX="$OLD_CXX"
31563    ac_ext=cpp
31564ac_cpp='$CXXCPP $CPPFLAGS'
31565ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31566ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31567ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31568
31569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31570$as_echo "$has_static_libstdcxx" >&6; }
31571
31572    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31573        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31574    fi
31575
31576    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31577        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31578    fi
31579
31580    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31581        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31582    fi
31583
31584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31585$as_echo_n "checking how to link with libstdc++... " >&6; }
31586    # If dynamic was requested, it's available since it would fail above otherwise.
31587    # If dynamic wasn't requested, go with static unless it isn't available.
31588    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31589        LIBCXX="$LIBCXX -lstdc++"
31590        LDCXX="$CXX"
31591        STATIC_CXX_SETTING="STATIC_CXX=false"
31592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31593$as_echo "dynamic" >&6; }
31594    else
31595        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31596        LDCXX="$CC"
31597        STATIC_CXX_SETTING="STATIC_CXX=true"
31598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31599$as_echo "static" >&6; }
31600    fi
31601fi
31602
31603
31604# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31605if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31606    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31607fi
31608
31609# TODO better (platform agnostic) test
31610if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31611    LIBCXX="-lstdc++"
31612fi
31613
31614
31615
31616
31617
31618# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31619
31620# When using cygwin or msys, we need a wrapper binary that renames
31621# /cygdrive/c/ arguments into c:/ arguments and peeks into
31622# @files and rewrites these too! This wrapper binary is
31623# called fixpath.
31624FIXPATH=
31625if test "x$OPENJDK_BUILD_OS" = xwindows; then
31626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31627$as_echo_n "checking if fixpath can be created... " >&6; }
31628    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31629    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31630    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31631      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31632      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31633      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31634      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31635    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31636      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31637      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31638
31639      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31640      # @ was chosen as separator to minimize risk of other tools messing around with it
31641      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31642      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31643
31644      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31645    fi
31646    rm -f $OUTPUT_ROOT/fixpath*
31647    cd $OUTPUT_ROOT
31648    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31649    cd $CURDIR
31650
31651    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31653$as_echo "no" >&6; }
31654        cat $OUTPUT_ROOT/fixpath1.log
31655        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31656    fi
31657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31658$as_echo "yes" >&6; }
31659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31660$as_echo_n "checking if fixpath.exe works... " >&6; }
31661    cd $OUTPUT_ROOT
31662    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31663    cd $CURDIR
31664    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31666$as_echo "no" >&6; }
31667        cat $OUTPUT_ROOT/fixpath2.log
31668        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31669    fi
31670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31671$as_echo "yes" >&6; }
31672    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31673fi
31674
31675
31676
31677
31678###############################################################################
31679#
31680# We need to do some final tweaking, when everything else is done.
31681#
31682###############################################################################
31683
31684
31685HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31686
31687
31688# The name of the Service Agent jar.
31689SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31690if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31691  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31692fi
31693
31694
31695
31696
31697###############################################################################
31698#
31699# Configure parts of the build that only affect the build performance,
31700# not the result.
31701#
31702###############################################################################
31703
31704
31705  # How many cores do we have on this build system?
31706
31707# Check whether --with-num-cores was given.
31708if test "${with_num_cores+set}" = set; then :
31709  withval=$with_num_cores;
31710fi
31711
31712  if test "x$with_num_cores" = x; then
31713    # The number of cores were not specified, try to probe them.
31714
31715    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31716$as_echo_n "checking for number of cores... " >&6; }
31717    NUM_CORES=1
31718    FOUND_CORES=no
31719
31720    if test -f /proc/cpuinfo; then
31721        # Looks like a Linux (or cygwin) system
31722        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31723        FOUND_CORES=yes
31724    elif test -x /usr/sbin/psrinfo; then
31725        # Looks like a Solaris system
31726        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31727        FOUND_CORES=yes
31728    elif test -x /usr/sbin/system_profiler; then
31729        # Looks like a MacOSX system
31730        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31731        FOUND_CORES=yes
31732    elif test -n "$NUMBER_OF_PROCESSORS"; then
31733        # On windows, look in the env
31734        NUM_CORES=$NUMBER_OF_PROCESSORS
31735        FOUND_CORES=yes
31736    fi
31737
31738    if test "x$FOUND_CORES" = xyes; then
31739        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31740$as_echo "$NUM_CORES" >&6; }
31741    else
31742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31743$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31745$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31746    fi
31747
31748
31749  else
31750    NUM_CORES=$with_num_cores
31751  fi
31752
31753
31754
31755  # How much memory do we have on this build system?
31756
31757# Check whether --with-memory-size was given.
31758if test "${with_memory_size+set}" = set; then :
31759  withval=$with_memory_size;
31760fi
31761
31762  if test "x$with_memory_size" = x; then
31763    # The memory size was not specified, try to probe it.
31764
31765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31766$as_echo_n "checking for memory size... " >&6; }
31767    # Default to 1024 MB
31768    MEMORY_SIZE=1024
31769    FOUND_MEM=no
31770
31771    if test -f /proc/meminfo; then
31772        # Looks like a Linux (or cygwin) system
31773        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31774        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31775        FOUND_MEM=yes
31776    elif test -x /usr/sbin/prtconf; then
31777        # Looks like a Solaris system
31778        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31779        FOUND_MEM=yes
31780    elif test -x /usr/sbin/system_profiler; then
31781        # Looks like a MacOSX system
31782        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31783        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31784        FOUND_MEM=yes
31785    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31786        # Windows, but without cygwin
31787        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31788        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31789        FOUND_MEM=yes
31790    fi
31791
31792    if test "x$FOUND_MEM" = xyes; then
31793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31794$as_echo "$MEMORY_SIZE MB" >&6; }
31795    else
31796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31797$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31798        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31799$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31800    fi
31801
31802  else
31803    MEMORY_SIZE=$with_memory_size
31804  fi
31805
31806
31807
31808  # Provide a decent default number of parallel jobs for make depending on
31809  # number of cores, amount of memory and machine architecture.
31810
31811# Check whether --with-jobs was given.
31812if test "${with_jobs+set}" = set; then :
31813  withval=$with_jobs;
31814fi
31815
31816  if test "x$with_jobs" = x; then
31817    # Number of jobs was not specified, calculate.
31818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
31819$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
31820    # Approximate memory in GB, rounding up a bit.
31821    memory_gb=`expr $MEMORY_SIZE / 1100`
31822    # Pick the lowest of memory in gb and number of cores.
31823    if test "$memory_gb" -lt "$NUM_CORES"; then
31824      JOBS="$memory_gb"
31825    else
31826      JOBS="$NUM_CORES"
31827      # On bigger machines, leave some room for other processes to run
31828      if test "$JOBS" -gt "4"; then
31829        JOBS=`expr $JOBS '*' 90 / 100`
31830      fi
31831    fi
31832    # Cap number of jobs to 16
31833    if test "$JOBS" -gt "16"; then
31834      JOBS=16
31835    fi
31836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
31837$as_echo "$JOBS" >&6; }
31838  else
31839    JOBS=$with_jobs
31840  fi
31841
31842
31843
31844# Setup smart javac (after cores and memory have been setup)
31845
31846
31847# Check whether --with-sjavac-server-java was given.
31848if test "${with_sjavac_server_java+set}" = set; then :
31849  withval=$with_sjavac_server_java;
31850fi
31851
31852
31853if test "x$with_sjavac_server_java" != x; then
31854    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31855    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31856    if test "x$FOUND_VERSION" = x; then
31857        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31858    fi
31859else
31860    SJAVAC_SERVER_JAVA=""
31861    # Hotspot specific options.
31862
31863    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31864    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31865    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31866    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31867    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31868        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31869    fi
31870
31871    # JRockit specific options.
31872
31873    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31874    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31875    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31876    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31877    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31878        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31879    fi
31880
31881    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31882fi
31883
31884
31885
31886# Check whether --with-sjavac-server-cores was given.
31887if test "${with_sjavac_server_cores+set}" = set; then :
31888  withval=$with_sjavac_server_cores;
31889fi
31890
31891if test "x$with_sjavac_server_cores" != x; then
31892    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31893else
31894    if test "$NUM_CORES" -gt 16; then
31895        # We set this arbitrary limit because we want to limit the heap
31896        # size of the javac server.
31897        # In the future we will make the javac compilers in the server
31898        # share more and more state, thus enabling us to use more and
31899        # more concurrent threads in the server.
31900        SJAVAC_SERVER_CORES="16"
31901    else
31902        SJAVAC_SERVER_CORES="$NUM_CORES"
31903    fi
31904
31905    if test "$MEMORY_SIZE" -gt "17000"; then
31906        MAX_HEAP_MEM=10000
31907
31908    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31909    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31910    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31911    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31912    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31913        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31914    fi
31915
31916
31917    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31918    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31919    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31920    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31921    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31922        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31923    fi
31924
31925    elif test "$MEMORY_SIZE" -gt "10000"; then
31926        MAX_HEAP_MEM=6000
31927
31928    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31929    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31930    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31931    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31932    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31933        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31934    fi
31935
31936
31937    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31938    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31939    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31940    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31941    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31942        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31943    fi
31944
31945    elif test "$MEMORY_SIZE" -gt "5000"; then
31946        MAX_HEAP_MEM=3000
31947
31948    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31949    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31950    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31951    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31952    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31953        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31954    fi
31955
31956
31957    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31958    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31959    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31960    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31961    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31962        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31963    fi
31964
31965    elif test "$MEMORY_SIZE" -gt "3800"; then
31966        MAX_HEAP_MEM=2500
31967
31968    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31969    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31970    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31971    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31972    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31973        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31974    fi
31975
31976    elif test "$MEMORY_SIZE" -gt "1900"; then
31977        MAX_HEAP_MEM=1200
31978
31979    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31980    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31981    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31982    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31983    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31984        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31985    fi
31986
31987    elif test "$MEMORY_SIZE" -gt "1000"; then
31988        MAX_HEAP_MEM=900
31989
31990    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31991    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31992    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31993    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31994    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31995        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31996    fi
31997
31998    else
31999        MAX_HEAP_MEM=512
32000
32001    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32002    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
32003    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
32004    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
32005    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32006        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32007    fi
32008
32009    fi
32010
32011
32012    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32013    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
32014    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
32015    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
32016    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32017        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
32018    fi
32019
32020
32021    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32022    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
32023    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
32024    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
32025    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32026        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
32027    fi
32028
32029
32030    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32031    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
32032    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
32033    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
32034    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32035        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
32036    fi
32037
32038
32039    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
32040    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
32041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
32042$as_echo_n "checking if number of server cores must be reduced... " >&6; }
32043        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
32044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
32045$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
32046    fi
32047fi
32048
32049
32050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32051$as_echo_n "checking whether to use sjavac... " >&6; }
32052# Check whether --enable-sjavac was given.
32053if test "${enable_sjavac+set}" = set; then :
32054  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32055else
32056  ENABLE_SJAVAC='no'
32057fi
32058
32059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32060$as_echo "$ENABLE_SJAVAC" >&6; }
32061
32062
32063if test "x$ENABLE_SJAVAC" = xyes; then
32064    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32065else
32066    SJAVAC_SERVER_DIR=
32067fi
32068
32069
32070
32071
32072# Can the C/C++ compiler use precompiled headers?
32073
32074
32075###############################################################################
32076#
32077# Can the C/C++ compiler use precompiled headers?
32078#
32079# Check whether --enable-precompiled-headers was given.
32080if test "${enable_precompiled_headers+set}" = set; then :
32081  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32082else
32083  ENABLE_PRECOMPH=yes
32084fi
32085
32086
32087USE_PRECOMPILED_HEADER=1
32088if test "x$ENABLE_PRECOMPH" = xno; then
32089    USE_PRECOMPILED_HEADER=0
32090fi
32091
32092if test "x$ENABLE_PRECOMPH" = xyes; then
32093    # Check that the compiler actually supports precomp headers.
32094    if test "x$GCC" = xyes; then
32095         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32096$as_echo_n "checking that precompiled headers work... " >&6; }
32097         echo "int alfa();" > conftest.h
32098         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32099         if test ! -f conftest.hpp.gch; then
32100             USE_PRECOMPILED_HEADER=0
32101             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32102$as_echo "no" >&6; }
32103         else
32104             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32105$as_echo "yes" >&6; }
32106         fi
32107         rm -f conftest.h conftest.hpp.gch
32108    fi
32109fi
32110
32111
32112
32113
32114# Setup use of ccache, if available
32115
32116    # Check whether --enable-ccache was given.
32117if test "${enable_ccache+set}" = set; then :
32118  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32119else
32120  ENABLE_CCACHE=yes
32121fi
32122
32123    if test "x$ENABLE_CCACHE" = xyes; then
32124        # Extract the first word of "ccache", so it can be a program name with args.
32125set dummy ccache; ac_word=$2
32126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32127$as_echo_n "checking for $ac_word... " >&6; }
32128if ${ac_cv_path_CCACHE+:} false; then :
32129  $as_echo_n "(cached) " >&6
32130else
32131  case $CCACHE in
32132  [\\/]* | ?:[\\/]*)
32133  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32134  ;;
32135  *)
32136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32137for as_dir in $PATH
32138do
32139  IFS=$as_save_IFS
32140  test -z "$as_dir" && as_dir=.
32141    for ac_exec_ext in '' $ac_executable_extensions; do
32142  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32143    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32145    break 2
32146  fi
32147done
32148  done
32149IFS=$as_save_IFS
32150
32151  ;;
32152esac
32153fi
32154CCACHE=$ac_cv_path_CCACHE
32155if test -n "$CCACHE"; then
32156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
32157$as_echo "$CCACHE" >&6; }
32158else
32159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32160$as_echo "no" >&6; }
32161fi
32162
32163
32164    else
32165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
32166$as_echo_n "checking for ccache... " >&6; }
32167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
32168$as_echo "explicitly disabled" >&6; }
32169        CCACHE=
32170    fi
32171
32172
32173
32174# Check whether --with-ccache-dir was given.
32175if test "${with_ccache_dir+set}" = set; then :
32176  withval=$with_ccache_dir;
32177fi
32178
32179
32180    if test "x$with_ccache_dir" != x; then
32181        # When using a non home ccache directory, assume the use is to share ccache files
32182        # with other users. Thus change the umask.
32183        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
32184    fi
32185    CCACHE_FOUND=""
32186    if test "x$CCACHE" != x; then
32187
32188    if test "x$CCACHE" != x; then
32189        CCACHE_FOUND="true"
32190        # Only use ccache if it is 3.1.4 or later, which supports
32191        # precompiled headers.
32192        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
32193$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
32194        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
32195        if test "x$HAS_GOOD_CCACHE" = x; then
32196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
32197$as_echo "no, disabling ccache" >&6; }
32198            CCACHE=
32199        else
32200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32201$as_echo "yes" >&6; }
32202            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
32203$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
32204            PUSHED_FLAGS="$CXXFLAGS"
32205            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
32206            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32207/* end confdefs.h.  */
32208
32209int
32210main ()
32211{
32212
32213  ;
32214  return 0;
32215}
32216_ACEOF
32217if ac_fn_cxx_try_compile "$LINENO"; then :
32218  CC_KNOWS_CCACHE_TRICK=yes
32219else
32220  CC_KNOWS_CCACHE_TRICK=no
32221fi
32222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32223            CXXFLAGS="$PUSHED_FLAGS"
32224            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
32225                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32226$as_echo "yes" >&6; }
32227            else
32228                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
32229$as_echo "no, disabling ccaching of precompiled headers" >&6; }
32230                CCACHE=
32231            fi
32232        fi
32233    fi
32234
32235    if test "x$CCACHE" != x; then
32236        CCACHE_SLOPPINESS=time_macros
32237        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
32238        CCACHE_FLAGS=-fpch-preprocess
32239
32240        if test "x$SET_CCACHE_DIR" != x; then
32241            mkdir -p $CCACHE_DIR > /dev/null 2>&1
32242	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
32243        fi
32244    fi
32245
32246    fi
32247
32248
32249###############################################################################
32250#
32251# And now the finish...
32252#
32253###############################################################################
32254
32255# Check for some common pitfalls
32256
32257  if test x"$OPENJDK_BUILD_OS" = xwindows; then
32258    file_to_test="$SRC_ROOT/LICENSE"
32259    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
32260      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
32261    fi
32262  fi
32263
32264
32265
32266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
32267$as_echo_n "checking if build directory is on local disk... " >&6; }
32268
32269	# df -l lists only local disks; if the given directory is not found then
32270	# a non-zero exit code is given
32271  if test "x$DF" = x; then
32272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32273      # msys does not have df; use Windows "net use" instead.
32274      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
32275      if test "x$IS_NETWORK_DISK" = x; then
32276        OUTPUT_DIR_IS_LOCAL="yes"
32277      else
32278        OUTPUT_DIR_IS_LOCAL="no"
32279      fi
32280    else
32281      # No df here, say it's local
32282      OUTPUT_DIR_IS_LOCAL="yes"
32283    fi
32284  else
32285    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
32286      OUTPUT_DIR_IS_LOCAL="yes"
32287    else
32288      OUTPUT_DIR_IS_LOCAL="no"
32289    fi
32290  fi
32291
32292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
32293$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
32294
32295
32296
32297# Check if the user has any old-style ALT_ variables set.
32298FOUND_ALT_VARIABLES=`env | grep ^ALT_`
32299
32300# Before generating output files, test if they exist. If they do, this is a reconfigure.
32301# Since we can't properly handle the dependencies for this, warn the user about the situation
32302if test -e $OUTPUT_ROOT/spec.gmk; then
32303  IS_RECONFIGURE=yes
32304else
32305  IS_RECONFIGURE=no
32306fi
32307
32308if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
32309  HIDE_PERFORMANCE_HINTS=yes
32310else
32311  HIDE_PERFORMANCE_HINTS=no
32312  # Hide it the next time around...
32313  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
32314fi
32315
32316
32317
32318# At the end, call the custom hook. (Dummy macro if no custom sources available)
32319
32320
32321# We're messing a bit with internal autoconf variables to put the config.status
32322# in the output directory instead of the current directory.
32323CONFIG_STATUS="$OUTPUT_ROOT/config.status"
32324# Create the actual output files. Now the main work of configure is done.
32325cat >confcache <<\_ACEOF
32326# This file is a shell script that caches the results of configure
32327# tests run on this system so they can be shared between configure
32328# scripts and configure runs, see configure's option --config-cache.
32329# It is not useful on other systems.  If it contains results you don't
32330# want to keep, you may remove or edit it.
32331#
32332# config.status only pays attention to the cache file if you give it
32333# the --recheck option to rerun configure.
32334#
32335# `ac_cv_env_foo' variables (set or unset) will be overridden when
32336# loading this file, other *unset* `ac_cv_foo' will be assigned the
32337# following values.
32338
32339_ACEOF
32340
32341# The following way of writing the cache mishandles newlines in values,
32342# but we know of no workaround that is simple, portable, and efficient.
32343# So, we kill variables containing newlines.
32344# Ultrix sh set writes to stderr and can't be redirected directly,
32345# and sets the high bit in the cache file unless we assign to the vars.
32346(
32347  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32348    eval ac_val=\$$ac_var
32349    case $ac_val in #(
32350    *${as_nl}*)
32351      case $ac_var in #(
32352      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32353$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32354      esac
32355      case $ac_var in #(
32356      _ | IFS | as_nl) ;; #(
32357      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
32358      *) { eval $ac_var=; unset $ac_var;} ;;
32359      esac ;;
32360    esac
32361  done
32362
32363  (set) 2>&1 |
32364    case $as_nl`(ac_space=' '; set) 2>&1` in #(
32365    *${as_nl}ac_space=\ *)
32366      # `set' does not quote correctly, so add quotes: double-quote
32367      # substitution turns \\\\ into \\, and sed turns \\ into \.
32368      sed -n \
32369	"s/'/'\\\\''/g;
32370	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32371      ;; #(
32372    *)
32373      # `set' quotes correctly as required by POSIX, so do not add quotes.
32374      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32375      ;;
32376    esac |
32377    sort
32378) |
32379  sed '
32380     /^ac_cv_env_/b end
32381     t clear
32382     :clear
32383     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32384     t end
32385     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32386     :end' >>confcache
32387if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32388  if test -w "$cache_file"; then
32389    if test "x$cache_file" != "x/dev/null"; then
32390      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32391$as_echo "$as_me: updating cache $cache_file" >&6;}
32392      if test ! -f "$cache_file" || test -h "$cache_file"; then
32393	cat confcache >"$cache_file"
32394      else
32395        case $cache_file in #(
32396        */* | ?:*)
32397	  mv -f confcache "$cache_file"$$ &&
32398	  mv -f "$cache_file"$$ "$cache_file" ;; #(
32399        *)
32400	  mv -f confcache "$cache_file" ;;
32401	esac
32402      fi
32403    fi
32404  else
32405    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32406$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32407  fi
32408fi
32409rm -f confcache
32410
32411test "x$prefix" = xNONE && prefix=$ac_default_prefix
32412# Let make expand exec_prefix.
32413test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32414
32415DEFS=-DHAVE_CONFIG_H
32416
32417ac_libobjs=
32418ac_ltlibobjs=
32419U=
32420for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32421  # 1. Remove the extension, and $U if already installed.
32422  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32423  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32424  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
32425  #    will be set to the directory where LIBOBJS objects are built.
32426  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32427  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32428done
32429LIBOBJS=$ac_libobjs
32430
32431LTLIBOBJS=$ac_ltlibobjs
32432
32433
32434
32435: "${CONFIG_STATUS=./config.status}"
32436ac_write_fail=0
32437ac_clean_files_save=$ac_clean_files
32438ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32439{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32440$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32441as_write_fail=0
32442cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32443#! $SHELL
32444# Generated by $as_me.
32445# Run this file to recreate the current configuration.
32446# Compiler output produced by configure, useful for debugging
32447# configure, is in config.log if it exists.
32448
32449debug=false
32450ac_cs_recheck=false
32451ac_cs_silent=false
32452
32453SHELL=\${CONFIG_SHELL-$SHELL}
32454export SHELL
32455_ASEOF
32456cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
32457## -------------------- ##
32458## M4sh Initialization. ##
32459## -------------------- ##
32460
32461# Be more Bourne compatible
32462DUALCASE=1; export DUALCASE # for MKS sh
32463if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
32464  emulate sh
32465  NULLCMD=:
32466  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32467  # is contrary to our usage.  Disable this feature.
32468  alias -g '${1+"$@"}'='"$@"'
32469  setopt NO_GLOB_SUBST
32470else
32471  case `(set -o) 2>/dev/null` in #(
32472  *posix*) :
32473    set -o posix ;; #(
32474  *) :
32475     ;;
32476esac
32477fi
32478
32479
32480as_nl='
32481'
32482export as_nl
32483# Printing a long string crashes Solaris 7 /usr/bin/printf.
32484as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32485as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32486as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32487# Prefer a ksh shell builtin over an external printf program on Solaris,
32488# but without wasting forks for bash or zsh.
32489if test -z "$BASH_VERSION$ZSH_VERSION" \
32490    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32491  as_echo='print -r --'
32492  as_echo_n='print -rn --'
32493elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32494  as_echo='printf %s\n'
32495  as_echo_n='printf %s'
32496else
32497  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32498    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32499    as_echo_n='/usr/ucb/echo -n'
32500  else
32501    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32502    as_echo_n_body='eval
32503      arg=$1;
32504      case $arg in #(
32505      *"$as_nl"*)
32506	expr "X$arg" : "X\\(.*\\)$as_nl";
32507	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32508      esac;
32509      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32510    '
32511    export as_echo_n_body
32512    as_echo_n='sh -c $as_echo_n_body as_echo'
32513  fi
32514  export as_echo_body
32515  as_echo='sh -c $as_echo_body as_echo'
32516fi
32517
32518# The user is always right.
32519if test "${PATH_SEPARATOR+set}" != set; then
32520  PATH_SEPARATOR=:
32521  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32522    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32523      PATH_SEPARATOR=';'
32524  }
32525fi
32526
32527
32528# IFS
32529# We need space, tab and new line, in precisely that order.  Quoting is
32530# there to prevent editors from complaining about space-tab.
32531# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32532# splitting by setting IFS to empty value.)
32533IFS=" ""	$as_nl"
32534
32535# Find who we are.  Look in the path if we contain no directory separator.
32536as_myself=
32537case $0 in #((
32538  *[\\/]* ) as_myself=$0 ;;
32539  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32540for as_dir in $PATH
32541do
32542  IFS=$as_save_IFS
32543  test -z "$as_dir" && as_dir=.
32544    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32545  done
32546IFS=$as_save_IFS
32547
32548     ;;
32549esac
32550# We did not find ourselves, most probably we were run as `sh COMMAND'
32551# in which case we are not to be found in the path.
32552if test "x$as_myself" = x; then
32553  as_myself=$0
32554fi
32555if test ! -f "$as_myself"; then
32556  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32557  exit 1
32558fi
32559
32560# Unset variables that we do not need and which cause bugs (e.g. in
32561# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32562# suppresses any "Segmentation fault" message there.  '((' could
32563# trigger a bug in pdksh 5.2.14.
32564for as_var in BASH_ENV ENV MAIL MAILPATH
32565do eval test x\${$as_var+set} = xset \
32566  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32567done
32568PS1='$ '
32569PS2='> '
32570PS4='+ '
32571
32572# NLS nuisances.
32573LC_ALL=C
32574export LC_ALL
32575LANGUAGE=C
32576export LANGUAGE
32577
32578# CDPATH.
32579(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32580
32581
32582# as_fn_error STATUS ERROR [LINENO LOG_FD]
32583# ----------------------------------------
32584# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32585# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32586# script with STATUS, using 1 if that was 0.
32587as_fn_error ()
32588{
32589  as_status=$1; test $as_status -eq 0 && as_status=1
32590  if test "$4"; then
32591    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32592    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32593  fi
32594  $as_echo "$as_me: error: $2" >&2
32595  as_fn_exit $as_status
32596} # as_fn_error
32597
32598
32599# as_fn_set_status STATUS
32600# -----------------------
32601# Set $? to STATUS, without forking.
32602as_fn_set_status ()
32603{
32604  return $1
32605} # as_fn_set_status
32606
32607# as_fn_exit STATUS
32608# -----------------
32609# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32610as_fn_exit ()
32611{
32612  set +e
32613  as_fn_set_status $1
32614  exit $1
32615} # as_fn_exit
32616
32617# as_fn_unset VAR
32618# ---------------
32619# Portably unset VAR.
32620as_fn_unset ()
32621{
32622  { eval $1=; unset $1;}
32623}
32624as_unset=as_fn_unset
32625# as_fn_append VAR VALUE
32626# ----------------------
32627# Append the text in VALUE to the end of the definition contained in VAR. Take
32628# advantage of any shell optimizations that allow amortized linear growth over
32629# repeated appends, instead of the typical quadratic growth present in naive
32630# implementations.
32631if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32632  eval 'as_fn_append ()
32633  {
32634    eval $1+=\$2
32635  }'
32636else
32637  as_fn_append ()
32638  {
32639    eval $1=\$$1\$2
32640  }
32641fi # as_fn_append
32642
32643# as_fn_arith ARG...
32644# ------------------
32645# Perform arithmetic evaluation on the ARGs, and store the result in the
32646# global $as_val. Take advantage of shells that can avoid forks. The arguments
32647# must be portable across $(()) and expr.
32648if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32649  eval 'as_fn_arith ()
32650  {
32651    as_val=$(( $* ))
32652  }'
32653else
32654  as_fn_arith ()
32655  {
32656    as_val=`expr "$@" || test $? -eq 1`
32657  }
32658fi # as_fn_arith
32659
32660
32661if expr a : '\(a\)' >/dev/null 2>&1 &&
32662   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32663  as_expr=expr
32664else
32665  as_expr=false
32666fi
32667
32668if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32669  as_basename=basename
32670else
32671  as_basename=false
32672fi
32673
32674if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32675  as_dirname=dirname
32676else
32677  as_dirname=false
32678fi
32679
32680as_me=`$as_basename -- "$0" ||
32681$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32682	 X"$0" : 'X\(//\)$' \| \
32683	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32684$as_echo X/"$0" |
32685    sed '/^.*\/\([^/][^/]*\)\/*$/{
32686	    s//\1/
32687	    q
32688	  }
32689	  /^X\/\(\/\/\)$/{
32690	    s//\1/
32691	    q
32692	  }
32693	  /^X\/\(\/\).*/{
32694	    s//\1/
32695	    q
32696	  }
32697	  s/.*/./; q'`
32698
32699# Avoid depending upon Character Ranges.
32700as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32701as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32702as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32703as_cr_digits='0123456789'
32704as_cr_alnum=$as_cr_Letters$as_cr_digits
32705
32706ECHO_C= ECHO_N= ECHO_T=
32707case `echo -n x` in #(((((
32708-n*)
32709  case `echo 'xy\c'` in
32710  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32711  xy)  ECHO_C='\c';;
32712  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32713       ECHO_T='	';;
32714  esac;;
32715*)
32716  ECHO_N='-n';;
32717esac
32718
32719rm -f conf$$ conf$$.exe conf$$.file
32720if test -d conf$$.dir; then
32721  rm -f conf$$.dir/conf$$.file
32722else
32723  rm -f conf$$.dir
32724  mkdir conf$$.dir 2>/dev/null
32725fi
32726if (echo >conf$$.file) 2>/dev/null; then
32727  if ln -s conf$$.file conf$$ 2>/dev/null; then
32728    as_ln_s='ln -s'
32729    # ... but there are two gotchas:
32730    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32731    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32732    # In both cases, we have to default to `cp -p'.
32733    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32734      as_ln_s='cp -p'
32735  elif ln conf$$.file conf$$ 2>/dev/null; then
32736    as_ln_s=ln
32737  else
32738    as_ln_s='cp -p'
32739  fi
32740else
32741  as_ln_s='cp -p'
32742fi
32743rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32744rmdir conf$$.dir 2>/dev/null
32745
32746
32747# as_fn_mkdir_p
32748# -------------
32749# Create "$as_dir" as a directory, including parents if necessary.
32750as_fn_mkdir_p ()
32751{
32752
32753  case $as_dir in #(
32754  -*) as_dir=./$as_dir;;
32755  esac
32756  test -d "$as_dir" || eval $as_mkdir_p || {
32757    as_dirs=
32758    while :; do
32759      case $as_dir in #(
32760      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32761      *) as_qdir=$as_dir;;
32762      esac
32763      as_dirs="'$as_qdir' $as_dirs"
32764      as_dir=`$as_dirname -- "$as_dir" ||
32765$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32766	 X"$as_dir" : 'X\(//\)[^/]' \| \
32767	 X"$as_dir" : 'X\(//\)$' \| \
32768	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32769$as_echo X"$as_dir" |
32770    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32771	    s//\1/
32772	    q
32773	  }
32774	  /^X\(\/\/\)[^/].*/{
32775	    s//\1/
32776	    q
32777	  }
32778	  /^X\(\/\/\)$/{
32779	    s//\1/
32780	    q
32781	  }
32782	  /^X\(\/\).*/{
32783	    s//\1/
32784	    q
32785	  }
32786	  s/.*/./; q'`
32787      test -d "$as_dir" && break
32788    done
32789    test -z "$as_dirs" || eval "mkdir $as_dirs"
32790  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32791
32792
32793} # as_fn_mkdir_p
32794if mkdir -p . 2>/dev/null; then
32795  as_mkdir_p='mkdir -p "$as_dir"'
32796else
32797  test -d ./-p && rmdir ./-p
32798  as_mkdir_p=false
32799fi
32800
32801if test -x / >/dev/null 2>&1; then
32802  as_test_x='test -x'
32803else
32804  if ls -dL / >/dev/null 2>&1; then
32805    as_ls_L_option=L
32806  else
32807    as_ls_L_option=
32808  fi
32809  as_test_x='
32810    eval sh -c '\''
32811      if test -d "$1"; then
32812	test -d "$1/.";
32813      else
32814	case $1 in #(
32815	-*)set "./$1";;
32816	esac;
32817	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32818	???[sx]*):;;*)false;;esac;fi
32819    '\'' sh
32820  '
32821fi
32822as_executable_p=$as_test_x
32823
32824# Sed expression to map a string onto a valid CPP name.
32825as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32826
32827# Sed expression to map a string onto a valid variable name.
32828as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32829
32830
32831exec 6>&1
32832## ----------------------------------- ##
32833## Main body of $CONFIG_STATUS script. ##
32834## ----------------------------------- ##
32835_ASEOF
32836test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32837
32838cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32839# Save the log message, to keep $0 and so on meaningful, and to
32840# report actual input values of CONFIG_FILES etc. instead of their
32841# values after options handling.
32842ac_log="
32843This file was extended by OpenJDK $as_me jdk8, which was
32844generated by GNU Autoconf 2.68.  Invocation command line was
32845
32846  CONFIG_FILES    = $CONFIG_FILES
32847  CONFIG_HEADERS  = $CONFIG_HEADERS
32848  CONFIG_LINKS    = $CONFIG_LINKS
32849  CONFIG_COMMANDS = $CONFIG_COMMANDS
32850  $ $0 $@
32851
32852on `(hostname || uname -n) 2>/dev/null | sed 1q`
32853"
32854
32855_ACEOF
32856
32857case $ac_config_files in *"
32858"*) set x $ac_config_files; shift; ac_config_files=$*;;
32859esac
32860
32861case $ac_config_headers in *"
32862"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32863esac
32864
32865
32866cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32867# Files that config.status was made for.
32868config_files="$ac_config_files"
32869config_headers="$ac_config_headers"
32870
32871_ACEOF
32872
32873cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32874ac_cs_usage="\
32875\`$as_me' instantiates files and other configuration actions
32876from templates according to the current configuration.  Unless the files
32877and actions are specified as TAGs, all are instantiated by default.
32878
32879Usage: $0 [OPTION]... [TAG]...
32880
32881  -h, --help       print this help, then exit
32882  -V, --version    print version number and configuration settings, then exit
32883      --config     print configuration, then exit
32884  -q, --quiet, --silent
32885                   do not print progress messages
32886  -d, --debug      don't remove temporary files
32887      --recheck    update $as_me by reconfiguring in the same conditions
32888      --file=FILE[:TEMPLATE]
32889                   instantiate the configuration file FILE
32890      --header=FILE[:TEMPLATE]
32891                   instantiate the configuration header FILE
32892
32893Configuration files:
32894$config_files
32895
32896Configuration headers:
32897$config_headers
32898
32899Report bugs to <build-dev@openjdk.java.net>.
32900OpenJDK home page: <http://openjdk.java.net>."
32901
32902_ACEOF
32903cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32904ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32905ac_cs_version="\\
32906OpenJDK config.status jdk8
32907configured by $0, generated by GNU Autoconf 2.68,
32908  with options \\"\$ac_cs_config\\"
32909
32910Copyright (C) 2010 Free Software Foundation, Inc.
32911This config.status script is free software; the Free Software Foundation
32912gives unlimited permission to copy, distribute and modify it."
32913
32914ac_pwd='$ac_pwd'
32915srcdir='$srcdir'
32916AWK='$AWK'
32917test -n "\$AWK" || AWK=awk
32918_ACEOF
32919
32920cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32921# The default lists apply if the user does not specify any file.
32922ac_need_defaults=:
32923while test $# != 0
32924do
32925  case $1 in
32926  --*=?*)
32927    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32928    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32929    ac_shift=:
32930    ;;
32931  --*=)
32932    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32933    ac_optarg=
32934    ac_shift=:
32935    ;;
32936  *)
32937    ac_option=$1
32938    ac_optarg=$2
32939    ac_shift=shift
32940    ;;
32941  esac
32942
32943  case $ac_option in
32944  # Handling of the options.
32945  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32946    ac_cs_recheck=: ;;
32947  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32948    $as_echo "$ac_cs_version"; exit ;;
32949  --config | --confi | --conf | --con | --co | --c )
32950    $as_echo "$ac_cs_config"; exit ;;
32951  --debug | --debu | --deb | --de | --d | -d )
32952    debug=: ;;
32953  --file | --fil | --fi | --f )
32954    $ac_shift
32955    case $ac_optarg in
32956    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32957    '') as_fn_error $? "missing file argument" ;;
32958    esac
32959    as_fn_append CONFIG_FILES " '$ac_optarg'"
32960    ac_need_defaults=false;;
32961  --header | --heade | --head | --hea )
32962    $ac_shift
32963    case $ac_optarg in
32964    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32965    esac
32966    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32967    ac_need_defaults=false;;
32968  --he | --h)
32969    # Conflict between --help and --header
32970    as_fn_error $? "ambiguous option: \`$1'
32971Try \`$0 --help' for more information.";;
32972  --help | --hel | -h )
32973    $as_echo "$ac_cs_usage"; exit ;;
32974  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32975  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32976    ac_cs_silent=: ;;
32977
32978  # This is an error.
32979  -*) as_fn_error $? "unrecognized option: \`$1'
32980Try \`$0 --help' for more information." ;;
32981
32982  *) as_fn_append ac_config_targets " $1"
32983     ac_need_defaults=false ;;
32984
32985  esac
32986  shift
32987done
32988
32989ac_configure_extra_args=
32990
32991if $ac_cs_silent; then
32992  exec 6>/dev/null
32993  ac_configure_extra_args="$ac_configure_extra_args --silent"
32994fi
32995
32996_ACEOF
32997cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32998if \$ac_cs_recheck; then
32999  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33000  shift
33001  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33002  CONFIG_SHELL='$SHELL'
33003  export CONFIG_SHELL
33004  exec "\$@"
33005fi
33006
33007_ACEOF
33008cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33009exec 5>>config.log
33010{
33011  echo
33012  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33013## Running $as_me. ##
33014_ASBOX
33015  $as_echo "$ac_log"
33016} >&5
33017
33018_ACEOF
33019cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33020_ACEOF
33021
33022cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33023
33024# Handling of arguments.
33025for ac_config_target in $ac_config_targets
33026do
33027  case $ac_config_target in
33028    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33029    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33030    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33031    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33032    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33033    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33034    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33035
33036  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33037  esac
33038done
33039
33040
33041# If the user did not use the arguments to specify the items to instantiate,
33042# then the envvar interface is used.  Set only those that are not.
33043# We use the long form for the default assignment because of an extremely
33044# bizarre bug on SunOS 4.1.3.
33045if $ac_need_defaults; then
33046  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33047  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33048fi
33049
33050# Have a temporary directory for convenience.  Make it in the build tree
33051# simply because there is no reason against having it here, and in addition,
33052# creating and moving files from /tmp can sometimes cause problems.
33053# Hook for its removal unless debugging.
33054# Note that there is a small window in which the directory will not be cleaned:
33055# after its creation but before its name has been assigned to `$tmp'.
33056$debug ||
33057{
33058  tmp= ac_tmp=
33059  trap 'exit_status=$?
33060  : "${ac_tmp:=$tmp}"
33061  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33062' 0
33063  trap 'as_fn_exit 1' 1 2 13 15
33064}
33065# Create a (secure) tmp directory for tmp files.
33066
33067{
33068  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33069  test -d "$tmp"
33070}  ||
33071{
33072  tmp=./conf$$-$RANDOM
33073  (umask 077 && mkdir "$tmp")
33074} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33075ac_tmp=$tmp
33076
33077# Set up the scripts for CONFIG_FILES section.
33078# No need to generate them if there are no CONFIG_FILES.
33079# This happens for instance with `./config.status config.h'.
33080if test -n "$CONFIG_FILES"; then
33081
33082
33083ac_cr=`echo X | tr X '\015'`
33084# On cygwin, bash can eat \r inside `` if the user requested igncr.
33085# But we know of no other shell where ac_cr would be empty at this
33086# point, so we can use a bashism as a fallback.
33087if test "x$ac_cr" = x; then
33088  eval ac_cr=\$\'\\r\'
33089fi
33090ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33091if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33092  ac_cs_awk_cr='\\r'
33093else
33094  ac_cs_awk_cr=$ac_cr
33095fi
33096
33097echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33098_ACEOF
33099
33100
33101{
33102  echo "cat >conf$$subs.awk <<_ACEOF" &&
33103  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33104  echo "_ACEOF"
33105} >conf$$subs.sh ||
33106  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33107ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33108ac_delim='%!_!# '
33109for ac_last_try in false false false false false :; do
33110  . ./conf$$subs.sh ||
33111    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33112
33113  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33114  if test $ac_delim_n = $ac_delim_num; then
33115    break
33116  elif $ac_last_try; then
33117    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33118  else
33119    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33120  fi
33121done
33122rm -f conf$$subs.sh
33123
33124cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33125cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
33126_ACEOF
33127sed -n '
33128h
33129s/^/S["/; s/!.*/"]=/
33130p
33131g
33132s/^[^!]*!//
33133:repl
33134t repl
33135s/'"$ac_delim"'$//
33136t delim
33137:nl
33138h
33139s/\(.\{148\}\)..*/\1/
33140t more1
33141s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33142p
33143n
33144b repl
33145:more1
33146s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33147p
33148g
33149s/.\{148\}//
33150t nl
33151:delim
33152h
33153s/\(.\{148\}\)..*/\1/
33154t more2
33155s/["\\]/\\&/g; s/^/"/; s/$/"/
33156p
33157b
33158:more2
33159s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33160p
33161g
33162s/.\{148\}//
33163t delim
33164' <conf$$subs.awk | sed '
33165/^[^""]/{
33166  N
33167  s/\n//
33168}
33169' >>$CONFIG_STATUS || ac_write_fail=1
33170rm -f conf$$subs.awk
33171cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33172_ACAWK
33173cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
33174  for (key in S) S_is_set[key] = 1
33175  FS = ""
33176
33177}
33178{
33179  line = $ 0
33180  nfields = split(line, field, "@")
33181  substed = 0
33182  len = length(field[1])
33183  for (i = 2; i < nfields; i++) {
33184    key = field[i]
33185    keylen = length(key)
33186    if (S_is_set[key]) {
33187      value = S[key]
33188      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33189      len += length(value) + length(field[++i])
33190      substed = 1
33191    } else
33192      len += 1 + keylen
33193  }
33194
33195  print line
33196}
33197
33198_ACAWK
33199_ACEOF
33200cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33201if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33202  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33203else
33204  cat
33205fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
33206  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33207_ACEOF
33208
33209# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33210# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33211# trailing colons and then remove the whole line if VPATH becomes empty
33212# (actually we leave an empty line to preserve line numbers).
33213if test "x$srcdir" = x.; then
33214  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
33215h
33216s///
33217s/^/:/
33218s/[	 ]*$/:/
33219s/:\$(srcdir):/:/g
33220s/:\${srcdir}:/:/g
33221s/:@srcdir@:/:/g
33222s/^:*//
33223s/:*$//
33224x
33225s/\(=[	 ]*\).*/\1/
33226G
33227s/\n//
33228s/^[^=]*=[	 ]*$//
33229}'
33230fi
33231
33232cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33233fi # test -n "$CONFIG_FILES"
33234
33235# Set up the scripts for CONFIG_HEADERS section.
33236# No need to generate them if there are no CONFIG_HEADERS.
33237# This happens for instance with `./config.status Makefile'.
33238if test -n "$CONFIG_HEADERS"; then
33239cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
33240BEGIN {
33241_ACEOF
33242
33243# Transform confdefs.h into an awk script `defines.awk', embedded as
33244# here-document in config.status, that substitutes the proper values into
33245# config.h.in to produce config.h.
33246
33247# Create a delimiter string that does not exist in confdefs.h, to ease
33248# handling of long lines.
33249ac_delim='%!_!# '
33250for ac_last_try in false false :; do
33251  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
33252  if test -z "$ac_tt"; then
33253    break
33254  elif $ac_last_try; then
33255    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33256  else
33257    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33258  fi
33259done
33260
33261# For the awk script, D is an array of macro values keyed by name,
33262# likewise P contains macro parameters if any.  Preserve backslash
33263# newline sequences.
33264
33265ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33266sed -n '
33267s/.\{148\}/&'"$ac_delim"'/g
33268t rset
33269:rset
33270s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
33271t def
33272d
33273:def
33274s/\\$//
33275t bsnl
33276s/["\\]/\\&/g
33277s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33278D["\1"]=" \3"/p
33279s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
33280d
33281:bsnl
33282s/["\\]/\\&/g
33283s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33284D["\1"]=" \3\\\\\\n"\\/p
33285t cont
33286s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33287t cont
33288d
33289:cont
33290n
33291s/.\{148\}/&'"$ac_delim"'/g
33292t clear
33293:clear
33294s/\\$//
33295t bsnlc
33296s/["\\]/\\&/g; s/^/"/; s/$/"/p
33297d
33298:bsnlc
33299s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33300b cont
33301' <confdefs.h | sed '
33302s/'"$ac_delim"'/"\\\
33303"/g' >>$CONFIG_STATUS || ac_write_fail=1
33304
33305cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33306  for (key in D) D_is_set[key] = 1
33307  FS = ""
33308}
33309/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33310  line = \$ 0
33311  split(line, arg, " ")
33312  if (arg[1] == "#") {
33313    defundef = arg[2]
33314    mac1 = arg[3]
33315  } else {
33316    defundef = substr(arg[1], 2)
33317    mac1 = arg[2]
33318  }
33319  split(mac1, mac2, "(") #)
33320  macro = mac2[1]
33321  prefix = substr(line, 1, index(line, defundef) - 1)
33322  if (D_is_set[macro]) {
33323    # Preserve the white space surrounding the "#".
33324    print prefix "define", macro P[macro] D[macro]
33325    next
33326  } else {
33327    # Replace #undef with comments.  This is necessary, for example,
33328    # in the case of _POSIX_SOURCE, which is predefined and required
33329    # on some systems where configure will not decide to define it.
33330    if (defundef == "undef") {
33331      print "/*", prefix defundef, macro, "*/"
33332      next
33333    }
33334  }
33335}
33336{ print }
33337_ACAWK
33338_ACEOF
33339cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33340  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33341fi # test -n "$CONFIG_HEADERS"
33342
33343
33344eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
33345shift
33346for ac_tag
33347do
33348  case $ac_tag in
33349  :[FHLC]) ac_mode=$ac_tag; continue;;
33350  esac
33351  case $ac_mode$ac_tag in
33352  :[FHL]*:*);;
33353  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
33354  :[FH]-) ac_tag=-:-;;
33355  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33356  esac
33357  ac_save_IFS=$IFS
33358  IFS=:
33359  set x $ac_tag
33360  IFS=$ac_save_IFS
33361  shift
33362  ac_file=$1
33363  shift
33364
33365  case $ac_mode in
33366  :L) ac_source=$1;;
33367  :[FH])
33368    ac_file_inputs=
33369    for ac_f
33370    do
33371      case $ac_f in
33372      -) ac_f="$ac_tmp/stdin";;
33373      *) # Look for the file first in the build tree, then in the source tree
33374	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
33375	 # because $ac_f cannot contain `:'.
33376	 test -f "$ac_f" ||
33377	   case $ac_f in
33378	   [\\/$]*) false;;
33379	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33380	   esac ||
33381	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
33382      esac
33383      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33384      as_fn_append ac_file_inputs " '$ac_f'"
33385    done
33386
33387    # Let's still pretend it is `configure' which instantiates (i.e., don't
33388    # use $as_me), people would be surprised to read:
33389    #    /* config.h.  Generated by config.status.  */
33390    configure_input='Generated from '`
33391	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33392	`' by configure.'
33393    if test x"$ac_file" != x-; then
33394      configure_input="$ac_file.  $configure_input"
33395      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33396$as_echo "$as_me: creating $ac_file" >&6;}
33397    fi
33398    # Neutralize special characters interpreted by sed in replacement strings.
33399    case $configure_input in #(
33400    *\&* | *\|* | *\\* )
33401       ac_sed_conf_input=`$as_echo "$configure_input" |
33402       sed 's/[\\\\&|]/\\\\&/g'`;; #(
33403    *) ac_sed_conf_input=$configure_input;;
33404    esac
33405
33406    case $ac_tag in
33407    *:-:* | *:-) cat >"$ac_tmp/stdin" \
33408      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
33409    esac
33410    ;;
33411  esac
33412
33413  ac_dir=`$as_dirname -- "$ac_file" ||
33414$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33415	 X"$ac_file" : 'X\(//\)[^/]' \| \
33416	 X"$ac_file" : 'X\(//\)$' \| \
33417	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33418$as_echo X"$ac_file" |
33419    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33420	    s//\1/
33421	    q
33422	  }
33423	  /^X\(\/\/\)[^/].*/{
33424	    s//\1/
33425	    q
33426	  }
33427	  /^X\(\/\/\)$/{
33428	    s//\1/
33429	    q
33430	  }
33431	  /^X\(\/\).*/{
33432	    s//\1/
33433	    q
33434	  }
33435	  s/.*/./; q'`
33436  as_dir="$ac_dir"; as_fn_mkdir_p
33437  ac_builddir=.
33438
33439case "$ac_dir" in
33440.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33441*)
33442  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33443  # A ".." for each directory in $ac_dir_suffix.
33444  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33445  case $ac_top_builddir_sub in
33446  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33447  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33448  esac ;;
33449esac
33450ac_abs_top_builddir=$ac_pwd
33451ac_abs_builddir=$ac_pwd$ac_dir_suffix
33452# for backward compatibility:
33453ac_top_builddir=$ac_top_build_prefix
33454
33455case $srcdir in
33456  .)  # We are building in place.
33457    ac_srcdir=.
33458    ac_top_srcdir=$ac_top_builddir_sub
33459    ac_abs_top_srcdir=$ac_pwd ;;
33460  [\\/]* | ?:[\\/]* )  # Absolute name.
33461    ac_srcdir=$srcdir$ac_dir_suffix;
33462    ac_top_srcdir=$srcdir
33463    ac_abs_top_srcdir=$srcdir ;;
33464  *) # Relative name.
33465    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33466    ac_top_srcdir=$ac_top_build_prefix$srcdir
33467    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33468esac
33469ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33470
33471
33472  case $ac_mode in
33473  :F)
33474  #
33475  # CONFIG_FILE
33476  #
33477
33478_ACEOF
33479
33480cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33481# If the template does not know about datarootdir, expand it.
33482# FIXME: This hack should be removed a few years after 2.60.
33483ac_datarootdir_hack=; ac_datarootdir_seen=
33484ac_sed_dataroot='
33485/datarootdir/ {
33486  p
33487  q
33488}
33489/@datadir@/p
33490/@docdir@/p
33491/@infodir@/p
33492/@localedir@/p
33493/@mandir@/p'
33494case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33495*datarootdir*) ac_datarootdir_seen=yes;;
33496*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33497  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33498$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33499_ACEOF
33500cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33501  ac_datarootdir_hack='
33502  s&@datadir@&$datadir&g
33503  s&@docdir@&$docdir&g
33504  s&@infodir@&$infodir&g
33505  s&@localedir@&$localedir&g
33506  s&@mandir@&$mandir&g
33507  s&\\\${datarootdir}&$datarootdir&g' ;;
33508esac
33509_ACEOF
33510
33511# Neutralize VPATH when `$srcdir' = `.'.
33512# Shell code in configure.ac might set extrasub.
33513# FIXME: do we really want to maintain this feature?
33514cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33515ac_sed_extra="$ac_vpsub
33516$extrasub
33517_ACEOF
33518cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33519:t
33520/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33521s|@configure_input@|$ac_sed_conf_input|;t t
33522s&@top_builddir@&$ac_top_builddir_sub&;t t
33523s&@top_build_prefix@&$ac_top_build_prefix&;t t
33524s&@srcdir@&$ac_srcdir&;t t
33525s&@abs_srcdir@&$ac_abs_srcdir&;t t
33526s&@top_srcdir@&$ac_top_srcdir&;t t
33527s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33528s&@builddir@&$ac_builddir&;t t
33529s&@abs_builddir@&$ac_abs_builddir&;t t
33530s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33531$ac_datarootdir_hack
33532"
33533eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
33534  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33535
33536test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33537  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
33538  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
33539      "$ac_tmp/out"`; test -z "$ac_out"; } &&
33540  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33541which seems to be undefined.  Please make sure it is defined" >&5
33542$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33543which seems to be undefined.  Please make sure it is defined" >&2;}
33544
33545  rm -f "$ac_tmp/stdin"
33546  case $ac_file in
33547  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33548  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33549  esac \
33550  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33551 ;;
33552  :H)
33553  #
33554  # CONFIG_HEADER
33555  #
33556  if test x"$ac_file" != x-; then
33557    {
33558      $as_echo "/* $configure_input  */" \
33559      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33560    } >"$ac_tmp/config.h" \
33561      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33562    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33563      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33564$as_echo "$as_me: $ac_file is unchanged" >&6;}
33565    else
33566      rm -f "$ac_file"
33567      mv "$ac_tmp/config.h" "$ac_file" \
33568	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33569    fi
33570  else
33571    $as_echo "/* $configure_input  */" \
33572      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33573      || as_fn_error $? "could not create -" "$LINENO" 5
33574  fi
33575 ;;
33576
33577
33578  esac
33579
33580done # for ac_tag
33581
33582
33583as_fn_exit 0
33584_ACEOF
33585ac_clean_files=$ac_clean_files_save
33586
33587test $ac_write_fail = 0 ||
33588  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33589
33590
33591# configure is writing to config.log, and then calls config.status.
33592# config.status does its own redirection, appending to config.log.
33593# Unfortunately, on DOS this fails, as config.log is still kept open
33594# by configure, so config.status won't be able to write to it; its
33595# output is simply discarded.  So we exec the FD to /dev/null,
33596# effectively closing config.log, so it can be properly (re)opened and
33597# appended to by config.status.  When coming back to configure, we
33598# need to make the FD available again.
33599if test "$no_create" != yes; then
33600  ac_cs_success=:
33601  ac_config_status_args=
33602  test "$silent" = yes &&
33603    ac_config_status_args="$ac_config_status_args --quiet"
33604  exec 5>/dev/null
33605  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33606  exec 5>>config.log
33607  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33608  # would make configure fail if this is the last instruction.
33609  $ac_cs_success || as_fn_exit 1
33610fi
33611if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33612  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33613$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33614fi
33615
33616
33617# Make the compare script executable
33618$CHMOD +x $OUTPUT_ROOT/compare.sh
33619
33620# Finally output some useful information to the user
33621
33622# Finally output some useful information to the user
33623
33624if test "x$CCACHE_FOUND" != x; then
33625	if  test "x$HAS_GOOD_CCACHE" = x; then
33626		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33627		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33628	else
33629		CCACHE_STATUS="installed and in use"
33630	fi
33631else
33632	if test "x$GCC" = xyes; then
33633		CCACHE_STATUS="not installed (consider installing)"
33634		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33635	else
33636		CCACHE_STATUS="not available for your system"
33637	fi
33638fi
33639
33640printf "\n"
33641printf "====================================================\n"
33642printf "A new configuration has been successfully created in\n"
33643printf "$OUTPUT_ROOT\n"
33644if test "x$CONFIGURE_COMMAND_LINE" != x; then
33645	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33646else
33647	printf "using default settings.\n"
33648fi
33649
33650printf "\n"
33651printf "Configuration summary:\n"
33652printf "* Debug level:    $DEBUG_LEVEL\n"
33653printf "* JDK variant:    $JDK_VARIANT\n"
33654printf "* JVM variants:   $with_jvm_variants\n"
33655printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33656
33657printf "\n"
33658printf "Tools summary:\n"
33659if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33660  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33661fi
33662printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33663printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33664printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33665
33666printf "\n"
33667printf "Build performance summary:\n"
33668printf "* Cores to use:   $JOBS\n"
33669printf "* Memory limit:   $MEMORY_SIZE MB\n"
33670printf "* ccache status:  $CCACHE_STATUS\n"
33671printf "\n"
33672
33673if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33674	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33675	printf "$CCACHE_HELP_MSG\n"
33676
33677    # Print a helpful message on how to acquire the necessary build dependency.
33678    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33679    MISSING_DEPENDENCY=ccache
33680    PKGHANDLER_COMMAND=
33681
33682    case $PKGHANDLER in
33683	apt-get)
33684                apt_help     $MISSING_DEPENDENCY ;;
33685    yum)
33686                yum_help     $MISSING_DEPENDENCY ;;
33687	port)
33688                port_help    $MISSING_DEPENDENCY ;;
33689	pkgutil)
33690                pkgutil_help $MISSING_DEPENDENCY ;;
33691	pkgadd)
33692                pkgadd_help  $MISSING_DEPENDENCY ;;
33693    * )
33694      break ;;
33695    esac
33696
33697    if test "x$PKGHANDLER_COMMAND" != x; then
33698        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33699    fi
33700
33701	printf "$HELP_MSG\n"
33702	printf "\n"
33703fi
33704
33705if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33706	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33707	printf "will result in longer build times.\n"
33708	printf "\n"
33709fi
33710
33711if test "x$FOUND_ALT_VARIABLES" != "x"; then
33712	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33713	printf "These are not respected, and will be ignored. It is recommended\n"
33714	printf "that you clean your environment. The following variables are set:\n"
33715	printf "$FOUND_ALT_VARIABLES\n"
33716	printf "\n"
33717fi
33718
33719if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33720	printf "WARNING: Your build output directory is not on a local disk.\n"
33721	printf "This will severely degrade build performance!\n"
33722	printf "It is recommended that you create an output directory on a local disk,\n"
33723	printf "and run the configure script again from that directory.\n"
33724	printf "\n"
33725fi
33726
33727if test "x$IS_RECONFIGURE" = "xyes"; then
33728	printf "WARNING: The result of this configuration has overridden an older\n"
33729	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33730	printf "proper build. Failure to do so might result in strange build problems.\n"
33731	printf "\n"
33732fi
33733
33734